@searchstax-inc/searchstudio-ux-angular 4.2.37 → 4.2.57

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.
@@ -1,238 +1,280 @@
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 { ReplaySubject } from 'rxjs';
5
- import { take } from 'rxjs/operators';
6
- import * as i2 from '@angular/common';
7
- import { CommonModule } from '@angular/common';
8
- import * as i2$1 from '@angular/forms';
9
- import { FormsModule } from '@angular/forms';
10
-
11
- class StoreServiceService {
12
- constructor() {
13
- this.searchstax = new Searchstax(3 /* ISearchstaxRenderEngine.angular */);
14
- /**
15
- * `Searchstax.initialize()` assigns a fresh `dataLayer`. Widgets must not
16
- * subscribe before that runs, or they listen to stale observables and never
17
- * see search results (projection order can run child `ngOnInit` first).
18
- */
19
- this.dataLayerReady$ = new ReplaySubject(1);
20
- }
21
- /** Called from `SearchstaxWrapper` immediately after `initialize()`. */
22
- notifyDataLayerReady() {
23
- this.dataLayerReady$.next();
24
- }
25
- whenDataLayerReady(callback) {
26
- this.dataLayerReady$.pipe(take(1)).subscribe(() => callback());
27
- }
28
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: StoreServiceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
29
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: StoreServiceService, providedIn: "root" }); }
30
- }
31
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: StoreServiceService, decorators: [{
32
- type: Injectable,
33
- args: [{
34
- providedIn: "root",
35
- }]
36
- }], ctorParameters: () => [] });
37
-
38
- class SearchstaxWrapper {
39
- constructor(storeServiceService) {
40
- this.storeServiceService = storeServiceService;
41
- this.language = 'en';
42
- this.model = '';
43
- this.searchURL = '';
44
- this.suggesterURL = '';
45
- this.trackApiKey = '';
46
- this.searchAuth = '';
47
- this.analyticsBaseUrl = '';
48
- this.analyticsSrc = '';
49
- this.questionURL = '';
50
- this.authType = 'basic';
51
- this.autoCorrect = true;
52
- this.initialized = new EventEmitter();
53
- this.hooks = {};
54
- }
55
- ngOnInit() {
56
- if (this.beforeSearch) {
57
- this.hooks.beforeSearch = this.beforeSearch;
58
- }
59
- if (this.afterSearch) {
60
- this.hooks.afterSearch = this.afterSearch;
61
- }
62
- this.storeServiceService.searchstax.initialize({
63
- language: this.language,
64
- model: this.model,
65
- searchURL: this.searchURL,
66
- suggesterURL: this.suggesterURL,
67
- trackApiKey: this.trackApiKey,
68
- searchAuth: this.searchAuth,
69
- authType: this.authType,
70
- autoCorrect: this.autoCorrect,
71
- router: this.router,
72
- hooks: this.hooks,
73
- analyticsBaseUrl: this.analyticsBaseUrl,
74
- analyticsSrc: this.analyticsSrc,
75
- sessionId: this.sessionId,
76
- questionURL: this.questionURL
77
- });
78
- this.initialized.emit(this.storeServiceService.searchstax);
79
- this.storeServiceService.notifyDataLayerReady();
80
- }
81
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxWrapper, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
82
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.1", type: SearchstaxWrapper, isStandalone: false, 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: `
1
+ import * as i0 from "@angular/core";
2
+ import { Component, EventEmitter, Injectable, Input, NgModule, Output, ViewChild } from "@angular/core";
3
+ import { Searchstax } from "@searchstax-inc/searchstudio-ux-js";
4
+ import { ReplaySubject } from "rxjs";
5
+ import { take } from "rxjs/operators";
6
+ import * as i1 from "@angular/common";
7
+ import { CommonModule } from "@angular/common";
8
+ import * as i2 from "@angular/forms";
9
+ import { FormsModule } from "@angular/forms";
10
+ var StoreServiceService = class StoreServiceService {
11
+ constructor() {
12
+ this.searchstax = new Searchstax(3);
13
+ this.dataLayerReady$ = new ReplaySubject(1);
14
+ }
15
+ notifyDataLayerReady() {
16
+ this.dataLayerReady$.next();
17
+ }
18
+ whenDataLayerReady(callback) {
19
+ this.dataLayerReady$.pipe(take(1)).subscribe(() => callback());
20
+ }
21
+ static {
22
+ this.ɵfac = i0.ɵɵngDeclareFactory({
23
+ minVersion: "12.0.0",
24
+ version: "22.1.1",
25
+ ngImport: i0,
26
+ type: StoreServiceService,
27
+ deps: [],
28
+ target: i0.ɵɵFactoryTarget.Injectable
29
+ });
30
+ }
31
+ static {
32
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
33
+ minVersion: "12.0.0",
34
+ version: "22.1.1",
35
+ ngImport: i0,
36
+ type: StoreServiceService,
37
+ providedIn: "root"
38
+ });
39
+ }
40
+ };
41
+ i0.ɵɵngDeclareClassMetadata({
42
+ minVersion: "12.0.0",
43
+ version: "22.1.1",
44
+ ngImport: i0,
45
+ type: StoreServiceService,
46
+ decorators: [{
47
+ type: Injectable,
48
+ args: [{ providedIn: "root" }]
49
+ }],
50
+ ctorParameters: () => []
51
+ });
52
+ var SearchstaxWrapper = class SearchstaxWrapper {
53
+ constructor(storeServiceService) {
54
+ this.storeServiceService = storeServiceService;
55
+ this.language = "en";
56
+ this.model = "";
57
+ this.searchURL = "";
58
+ this.suggesterURL = "";
59
+ this.trackApiKey = "";
60
+ this.searchAuth = "";
61
+ this.analyticsBaseUrl = "";
62
+ this.analyticsSrc = "";
63
+ this.questionURL = "";
64
+ this.authType = "basic";
65
+ this.autoCorrect = true;
66
+ this.initialized = new EventEmitter();
67
+ this.hooks = {};
68
+ }
69
+ ngOnInit() {
70
+ if (this.beforeSearch) this.hooks.beforeSearch = this.beforeSearch;
71
+ if (this.afterSearch) this.hooks.afterSearch = this.afterSearch;
72
+ this.storeServiceService.searchstax.initialize({
73
+ language: this.language,
74
+ model: this.model,
75
+ searchURL: this.searchURL,
76
+ suggesterURL: this.suggesterURL,
77
+ trackApiKey: this.trackApiKey,
78
+ searchAuth: this.searchAuth,
79
+ authType: this.authType,
80
+ autoCorrect: this.autoCorrect,
81
+ router: this.router,
82
+ hooks: this.hooks,
83
+ analyticsBaseUrl: this.analyticsBaseUrl,
84
+ analyticsSrc: this.analyticsSrc,
85
+ sessionId: this.sessionId,
86
+ questionURL: this.questionURL
87
+ });
88
+ this.initialized.emit(this.storeServiceService.searchstax);
89
+ this.storeServiceService.notifyDataLayerReady();
90
+ }
91
+ static {
92
+ this.ɵfac = i0.ɵɵngDeclareFactory({
93
+ minVersion: "12.0.0",
94
+ version: "22.1.1",
95
+ ngImport: i0,
96
+ type: SearchstaxWrapper,
97
+ deps: [{ token: StoreServiceService }],
98
+ target: i0.ɵɵFactoryTarget.Component
99
+ });
100
+ }
101
+ static {
102
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
103
+ minVersion: "14.0.0",
104
+ version: "22.1.1",
105
+ type: SearchstaxWrapper,
106
+ isStandalone: false,
107
+ selector: "app-searchstax-wrapper",
108
+ inputs: {
109
+ language: "language",
110
+ model: "model",
111
+ searchURL: "searchURL",
112
+ suggesterURL: "suggesterURL",
113
+ trackApiKey: "trackApiKey",
114
+ searchAuth: "searchAuth",
115
+ sessionId: "sessionId",
116
+ analyticsBaseUrl: "analyticsBaseUrl",
117
+ analyticsSrc: "analyticsSrc",
118
+ questionURL: "questionURL",
119
+ authType: "authType",
120
+ autoCorrect: "autoCorrect",
121
+ router: "router",
122
+ beforeSearch: "beforeSearch",
123
+ afterSearch: "afterSearch"
124
+ },
125
+ outputs: { initialized: "initialized" },
126
+ ngImport: i0,
127
+ template: `
83
128
  <div>
84
129
  <ng-content></ng-content>
85
130
  </div>
86
- `, isInline: true }); }
87
- }
88
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxWrapper, decorators: [{
89
- type: Component,
90
- args: [{ standalone: false, selector: 'app-searchstax-wrapper', template: `
131
+ `,
132
+ isInline: true
133
+ });
134
+ }
135
+ };
136
+ i0.ɵɵngDeclareClassMetadata({
137
+ minVersion: "12.0.0",
138
+ version: "22.1.1",
139
+ ngImport: i0,
140
+ type: SearchstaxWrapper,
141
+ decorators: [{
142
+ type: Component,
143
+ args: [{
144
+ standalone: false,
145
+ selector: "app-searchstax-wrapper",
146
+ template: `
91
147
  <div>
92
148
  <ng-content></ng-content>
93
149
  </div>
94
- ` }]
95
- }], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { language: [{
96
- type: Input
97
- }], model: [{
98
- type: Input
99
- }], searchURL: [{
100
- type: Input
101
- }], suggesterURL: [{
102
- type: Input
103
- }], trackApiKey: [{
104
- type: Input
105
- }], searchAuth: [{
106
- type: Input
107
- }], sessionId: [{
108
- type: Input
109
- }], analyticsBaseUrl: [{
110
- type: Input
111
- }], analyticsSrc: [{
112
- type: Input
113
- }], questionURL: [{
114
- type: Input
115
- }], authType: [{
116
- type: Input
117
- }], autoCorrect: [{
118
- type: Input
119
- }], router: [{
120
- type: Input
121
- }], beforeSearch: [{
122
- type: Input
123
- }], afterSearch: [{
124
- type: Input
125
- }], initialized: [{
126
- type: Output
127
- }] } });
128
-
129
- /**
130
- * Studio JS often emits on dataLayer streams outside Angular's zone (fetch/XHR).
131
- * `NgZone.run()` alone does not always schedule a tick for library components, so
132
- * pass the host `ChangeDetectorRef` to refresh the widget after each emission.
133
- */
150
+ `
151
+ }]
152
+ }],
153
+ ctorParameters: () => [{ type: StoreServiceService }],
154
+ propDecorators: {
155
+ language: [{ type: Input }],
156
+ model: [{ type: Input }],
157
+ searchURL: [{ type: Input }],
158
+ suggesterURL: [{ type: Input }],
159
+ trackApiKey: [{ type: Input }],
160
+ searchAuth: [{ type: Input }],
161
+ sessionId: [{ type: Input }],
162
+ analyticsBaseUrl: [{ type: Input }],
163
+ analyticsSrc: [{ type: Input }],
164
+ questionURL: [{ type: Input }],
165
+ authType: [{ type: Input }],
166
+ autoCorrect: [{ type: Input }],
167
+ router: [{ type: Input }],
168
+ beforeSearch: [{ type: Input }],
169
+ afterSearch: [{ type: Input }],
170
+ initialized: [{ type: Output }]
171
+ }
172
+ });
134
173
  function subscribeInNgZone(ngZone, source, next, cdr) {
135
- return source.subscribe((value) => {
136
- ngZone.run(() => {
137
- next(value);
138
- cdr.detectChanges();
139
- });
140
- });
174
+ return source.subscribe((value) => {
175
+ ngZone.run(() => {
176
+ next(value);
177
+ cdr.detectChanges();
178
+ });
179
+ });
141
180
  }
142
-
143
- //CUT START
144
181
  const config = {
145
- appId: "APP_ID",
146
- relatedSearchesAPIKey: "KEY"
182
+ appId: "APP_ID",
183
+ relatedSearchesAPIKey: "KEY"
147
184
  };
148
185
  const locationWidgetConfig = {
149
- locationDecode: (term) => {
150
- return new Promise((resolve) => {
151
- // make a request to google geocoding API to retrieve lat, lon and address
152
- const geocodingAPIKey = "GEOCODING_API_KEY";
153
- const geocodingURL = `https://maps.googleapis.com/maps/api/geocode/json?address=${encodeURIComponent(term)}&key=${geocodingAPIKey}`;
154
- fetch(geocodingURL)
155
- .then((response) => response.json())
156
- .then((data) => {
157
- if (data.status === "OK" && data.results.length > 0) {
158
- const result = data.results[0];
159
- const location = {
160
- lat: result.geometry.location.lat,
161
- lon: result.geometry.location.lng,
162
- address: result.formatted_address,
163
- };
164
- resolve(location);
165
- }
166
- else {
167
- resolve({
168
- address: undefined,
169
- lat: undefined,
170
- lon: undefined,
171
- error: true,
172
- });
173
- }
174
- })
175
- .catch(() => {
176
- resolve({
177
- address: undefined,
178
- lat: undefined,
179
- lon: undefined,
180
- error: true,
181
- });
182
- });
183
- });
184
- },
185
- locationDecodeCoordinatesToAddress: (lat, lon) => {
186
- return new Promise((resolve) => {
187
- fetch(`https://geocoding-staging.searchstax.co/reverse?location=${lat},${lon}&components=country:US&app_id=${config.appId}`, {
188
- method: "GET",
189
- headers: {
190
- Authorization: `Token ${config.relatedSearchesAPIKey}`,
191
- },
192
- })
193
- .then((response) => response.json())
194
- .then((data) => {
195
- if (data.status === "OK" && data.results.length > 0) {
196
- const result = data.results[0];
197
- resolve({
198
- address: result.formatted_address,
199
- lat: lat,
200
- lon: lon,
201
- error: false,
202
- });
203
- }
204
- else {
205
- resolve({
206
- address: undefined,
207
- lat: lat,
208
- lon: lon,
209
- error: true,
210
- });
211
- }
212
- })
213
- .catch(() => {
214
- resolve({
215
- address: undefined,
216
- lat: lat,
217
- lon: lon,
218
- error: true,
219
- });
220
- });
221
- });
222
- },
223
- locationSearchEnabled: false,
224
- locationValuesOverride: {
225
- locationDistanceEnabled: true,
226
- filterValues: ["any", "1000"],
227
- filterUnit: "miles",
228
- locationFilterDefaultValue: "any"
229
- },
186
+ locationDecode: (term) => {
187
+ return new Promise((resolve) => {
188
+ const geocodingURL = `https://maps.googleapis.com/maps/api/geocode/json?address=${encodeURIComponent(term)}&key=GEOCODING_API_KEY`;
189
+ fetch(geocodingURL).then((response) => response.json()).then((data) => {
190
+ if (data.status === "OK" && data.results.length > 0) {
191
+ const result = data.results[0];
192
+ resolve({
193
+ lat: result.geometry.location.lat,
194
+ lon: result.geometry.location.lng,
195
+ address: result.formatted_address
196
+ });
197
+ } else resolve({
198
+ address: void 0,
199
+ lat: void 0,
200
+ lon: void 0,
201
+ error: true
202
+ });
203
+ }).catch(() => {
204
+ resolve({
205
+ address: void 0,
206
+ lat: void 0,
207
+ lon: void 0,
208
+ error: true
209
+ });
210
+ });
211
+ });
212
+ },
213
+ locationDecodeCoordinatesToAddress: (lat, lon) => {
214
+ return new Promise((resolve) => {
215
+ fetch(`https://geocoding-staging.searchstax.co/reverse?location=${lat},${lon}&components=country:US&app_id=${config.appId}`, {
216
+ method: "GET",
217
+ headers: { Authorization: `Token ${config.relatedSearchesAPIKey}` }
218
+ }).then((response) => response.json()).then((data) => {
219
+ if (data.status === "OK" && data.results.length > 0) {
220
+ const result = data.results[0];
221
+ resolve({
222
+ address: result.formatted_address,
223
+ lat,
224
+ lon,
225
+ error: false
226
+ });
227
+ } else resolve({
228
+ address: void 0,
229
+ lat,
230
+ lon,
231
+ error: true
232
+ });
233
+ }).catch(() => {
234
+ resolve({
235
+ address: void 0,
236
+ lat,
237
+ lon,
238
+ error: true
239
+ });
240
+ });
241
+ });
242
+ },
243
+ locationSearchEnabled: false,
244
+ locationValuesOverride: {
245
+ locationDistanceEnabled: true,
246
+ filterValues: ["any", "1000"],
247
+ filterUnit: "miles",
248
+ locationFilterDefaultValue: "any"
249
+ }
230
250
  };
231
-
232
- // reusable-template.component.ts
233
- class LocationTemplateComponent {
234
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: LocationTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
235
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: LocationTemplateComponent, isStandalone: false, selector: "app-location-template", viewQueries: [{ propertyName: "locationTemplate", first: true, predicate: ["locationTemplate"], descendants: true, static: true }], ngImport: i0, template: `
251
+ var LocationTemplateComponent = class LocationTemplateComponent {
252
+ static {
253
+ this.ɵfac = i0.ɵɵngDeclareFactory({
254
+ minVersion: "12.0.0",
255
+ version: "22.1.1",
256
+ ngImport: i0,
257
+ type: LocationTemplateComponent,
258
+ deps: [],
259
+ target: i0.ɵɵFactoryTarget.Component
260
+ });
261
+ }
262
+ static {
263
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
264
+ minVersion: "17.0.0",
265
+ version: "22.1.1",
266
+ type: LocationTemplateComponent,
267
+ isStandalone: false,
268
+ selector: "app-location-template",
269
+ viewQueries: [{
270
+ propertyName: "locationTemplate",
271
+ first: true,
272
+ predicate: ["locationTemplate"],
273
+ descendants: true,
274
+ static: true
275
+ }],
276
+ ngImport: i0,
277
+ template: `
236
278
  <ng-template
237
279
  #locationTemplate
238
280
  let-context="context"
@@ -303,14 +345,66 @@ class LocationTemplateComponent {
303
345
  </div>
304
346
  }
305
347
  </ng-template>
306
- `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.SelectControlValueAccessor, selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
307
- }
308
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: LocationTemplateComponent, decorators: [{
309
- type: Component,
310
- args: [{
311
- standalone: false,
312
- selector: "app-location-template",
313
- template: `
348
+ `,
349
+ isInline: true,
350
+ dependencies: [
351
+ {
352
+ kind: "directive",
353
+ type: i1.NgClass,
354
+ selector: "[ngClass]",
355
+ inputs: ["class", "ngClass"]
356
+ },
357
+ {
358
+ kind: "directive",
359
+ type: i2.NgSelectOption,
360
+ selector: "option",
361
+ inputs: ["ngValue", "value"]
362
+ },
363
+ {
364
+ kind: "directive",
365
+ type: i2.ɵNgSelectMultipleOption,
366
+ selector: "option",
367
+ inputs: ["ngValue", "value"]
368
+ },
369
+ {
370
+ kind: "directive",
371
+ type: i2.SelectControlValueAccessor,
372
+ selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]",
373
+ inputs: ["compareWith"]
374
+ },
375
+ {
376
+ kind: "directive",
377
+ type: i2.NgControlStatus,
378
+ selector: "[formControlName],[ngModel],[formControl]"
379
+ },
380
+ {
381
+ kind: "directive",
382
+ type: i2.NgModel,
383
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
384
+ inputs: [
385
+ "name",
386
+ "disabled",
387
+ "ngModel",
388
+ "ngModelOptions"
389
+ ],
390
+ outputs: ["ngModelChange"],
391
+ exportAs: ["ngModel"]
392
+ }
393
+ ]
394
+ });
395
+ }
396
+ };
397
+ i0.ɵɵngDeclareClassMetadata({
398
+ minVersion: "12.0.0",
399
+ version: "22.1.1",
400
+ ngImport: i0,
401
+ type: LocationTemplateComponent,
402
+ decorators: [{
403
+ type: Component,
404
+ args: [{
405
+ standalone: false,
406
+ selector: "app-location-template",
407
+ template: `
314
408
  <ng-template
315
409
  #locationTemplate
316
410
  let-context="context"
@@ -381,108 +475,181 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
381
475
  </div>
382
476
  }
383
477
  </ng-template>
384
- `,
385
- }]
386
- }], propDecorators: { locationTemplate: [{
387
- type: ViewChild,
388
- args: ["locationTemplate", { static: true }]
389
- }] } });
390
-
391
- class SearchstaxSearchLocationWidget {
392
- constructor(storeServiceService, ngZone, cdr) {
393
- this.storeServiceService = storeServiceService;
394
- this.ngZone = ngZone;
395
- this.cdr = cdr;
396
- this.locationData = null;
397
- this.inputValue = "";
398
- this.selectValue = "";
399
- this.locationAdded = false;
400
- this.locationError = false;
401
- this.rand = Math.random();
402
- this.context = this;
403
- }
404
- ngOnInit() {
405
- if (this.storeServiceService.searchstax) {
406
- this.storeServiceService.whenDataLayerReady(() => {
407
- this.attachObservables();
408
- });
409
- setTimeout(() => {
410
- this.addWidget();
411
- }, 100);
412
- }
413
- else {
414
- throw Error("Searchstax instance needs to be passed via props");
415
- }
416
- }
417
- locationBlur(context) {
418
- context.storeServiceService.searchstax.searchLocationWidget?.triggerGeocoder(context.inputValue);
419
- }
420
- radiusChange(e, context) {
421
- const target = e.target;
422
- context.selectValue = target.value;
423
- context.storeServiceService.searchstax.searchLocationWidget?.setRadiusValue(context.selectValue);
424
- }
425
- inputChange(e, context) {
426
- const target = e.target;
427
- context.inputValue = target.value;
428
- }
429
- getCurrentLocation(context) {
430
- context.storeServiceService.searchstax.searchLocationWidget?.getCurrentLocation();
431
- }
432
- addWidget() {
433
- if (!this.locationAdded &&
434
- this.storeServiceService.searchstax.routerHelper) {
435
- this.locationAdded = true;
436
- this.storeServiceService.searchstax.addSearchLocationWidget("searchstax-location-container" + this.rand, {
437
- hooks: {
438
- locationDecode: this.locationDecode,
439
- locationDecodeCoordinatesToAddress: this.locationDecodeCoordinatesToAddress,
440
- },
441
- locationSearchEnabled: this.locationSearchEnabled,
442
- locationValuesOverride: this.locationValuesOverride,
443
- });
444
- }
445
- }
446
- attachObservables() {
447
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$locationWidgetTemplateData, (sortingData) => {
448
- this.locationData = sortingData;
449
- }, this.cdr);
450
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchObject, (result) => {
451
- this.inputValue = result?.location?.address ?? "";
452
- this.selectValue = result?.location?.radius || "";
453
- }, this.cdr);
454
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$locationError, (locationError) => {
455
- this.locationError = locationError;
456
- }, this.cdr);
457
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchLocationChange, (location) => {
458
- this.inputValue = location;
459
- }, this.cdr);
460
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchRadiusChange, (radius) => {
461
- this.selectValue = radius;
462
- }, this.cdr);
463
- }
464
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxSearchLocationWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
465
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: SearchstaxSearchLocationWidget, isStandalone: false, 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 @if (!!locationData && !templateOverride) {\n <div>\n <app-location-template #ref></app-location-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.locationTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (!!locationData && templateOverride) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LocationTemplateComponent, selector: "app-location-template" }] }); }
466
- }
467
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxSearchLocationWidget, decorators: [{
468
- type: Component,
469
- args: [{ standalone: false, selector: "app-searchstax-search-location", template: "<div\n [id]=\"'searchstax-location-container' + rand\"\n class=\"searchstax-location-container\"\n>\n @if (!!locationData && !templateOverride) {\n <div>\n <app-location-template #ref></app-location-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.locationTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (!!locationData && templateOverride) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n" }]
470
- }], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { templateOverride: [{
471
- type: Input
472
- }], locationSearchEnabled: [{
473
- type: Input
474
- }], locationValuesOverride: [{
475
- type: Input
476
- }], locationDecode: [{
477
- type: Input
478
- }], locationDecodeCoordinatesToAddress: [{
479
- type: Input
480
- }] } });
481
-
482
- // reusable-template.component.ts
483
- class InputTemplateComponent {
484
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: InputTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
485
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: InputTemplateComponent, isStandalone: false, selector: "app-input-template", viewQueries: [{ propertyName: "inputTemplate", first: true, predicate: ["inputTemplate"], descendants: true, static: true }], ngImport: i0, template: `
478
+ `
479
+ }]
480
+ }],
481
+ propDecorators: { locationTemplate: [{
482
+ type: ViewChild,
483
+ args: ["locationTemplate", { static: true }]
484
+ }] }
485
+ });
486
+ var SearchstaxSearchLocationWidget = class SearchstaxSearchLocationWidget {
487
+ constructor(storeServiceService, ngZone, cdr) {
488
+ this.storeServiceService = storeServiceService;
489
+ this.ngZone = ngZone;
490
+ this.cdr = cdr;
491
+ this.locationData = null;
492
+ this.inputValue = "";
493
+ this.selectValue = "";
494
+ this.locationAdded = false;
495
+ this.locationError = false;
496
+ this.rand = Math.random();
497
+ this.context = this;
498
+ }
499
+ ngOnInit() {
500
+ if (this.storeServiceService.searchstax) {
501
+ this.storeServiceService.whenDataLayerReady(() => {
502
+ this.attachObservables();
503
+ });
504
+ setTimeout(() => {
505
+ this.addWidget();
506
+ }, 100);
507
+ } else throw Error("Searchstax instance needs to be passed via props");
508
+ }
509
+ locationBlur(context) {
510
+ context.storeServiceService.searchstax.searchLocationWidget?.triggerGeocoder(context.inputValue);
511
+ }
512
+ radiusChange(e, context) {
513
+ context.selectValue = e.target.value;
514
+ context.storeServiceService.searchstax.searchLocationWidget?.setRadiusValue(context.selectValue);
515
+ }
516
+ inputChange(e, context) {
517
+ context.inputValue = e.target.value;
518
+ }
519
+ getCurrentLocation(context) {
520
+ context.storeServiceService.searchstax.searchLocationWidget?.getCurrentLocation();
521
+ }
522
+ addWidget() {
523
+ if (!this.locationAdded && this.storeServiceService.searchstax.routerHelper) {
524
+ this.locationAdded = true;
525
+ this.storeServiceService.searchstax.addSearchLocationWidget("searchstax-location-container" + this.rand, {
526
+ hooks: {
527
+ locationDecode: this.locationDecode,
528
+ locationDecodeCoordinatesToAddress: this.locationDecodeCoordinatesToAddress
529
+ },
530
+ locationSearchEnabled: this.locationSearchEnabled,
531
+ locationValuesOverride: this.locationValuesOverride
532
+ });
533
+ }
534
+ }
535
+ attachObservables() {
536
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$locationWidgetTemplateData, (sortingData) => {
537
+ this.locationData = sortingData;
538
+ }, this.cdr);
539
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchObject, (result) => {
540
+ this.inputValue = result?.location?.address ?? "";
541
+ this.selectValue = result?.location?.radius || "";
542
+ }, this.cdr);
543
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$locationError, (locationError) => {
544
+ this.locationError = locationError;
545
+ }, this.cdr);
546
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchLocationChange, (location) => {
547
+ this.inputValue = location;
548
+ }, this.cdr);
549
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchRadiusChange, (radius) => {
550
+ this.selectValue = radius;
551
+ }, this.cdr);
552
+ }
553
+ static {
554
+ this.ɵfac = i0.ɵɵngDeclareFactory({
555
+ minVersion: "12.0.0",
556
+ version: "22.1.1",
557
+ ngImport: i0,
558
+ type: SearchstaxSearchLocationWidget,
559
+ deps: [
560
+ { token: StoreServiceService },
561
+ { token: i0.NgZone },
562
+ { token: i0.ChangeDetectorRef }
563
+ ],
564
+ target: i0.ɵɵFactoryTarget.Component
565
+ });
566
+ }
567
+ static {
568
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
569
+ minVersion: "17.0.0",
570
+ version: "22.1.1",
571
+ type: SearchstaxSearchLocationWidget,
572
+ isStandalone: false,
573
+ selector: "app-searchstax-search-location",
574
+ inputs: {
575
+ templateOverride: "templateOverride",
576
+ locationSearchEnabled: "locationSearchEnabled",
577
+ locationValuesOverride: "locationValuesOverride",
578
+ locationDecode: "locationDecode",
579
+ locationDecodeCoordinatesToAddress: "locationDecodeCoordinatesToAddress"
580
+ },
581
+ ngImport: i0,
582
+ template: "<div\n [id]=\"'searchstax-location-container' + rand\"\n class=\"searchstax-location-container\"\n>\n @if (!!locationData && !templateOverride) {\n <div>\n <app-location-template #ref></app-location-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.locationTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (!!locationData && templateOverride) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n",
583
+ dependencies: [{
584
+ kind: "directive",
585
+ type: i1.NgTemplateOutlet,
586
+ selector: "[ngTemplateOutlet]",
587
+ inputs: [
588
+ "ngTemplateOutletContext",
589
+ "ngTemplateOutlet",
590
+ "ngTemplateOutletInjector"
591
+ ]
592
+ }, {
593
+ kind: "component",
594
+ type: LocationTemplateComponent,
595
+ selector: "app-location-template"
596
+ }]
597
+ });
598
+ }
599
+ };
600
+ i0.ɵɵngDeclareClassMetadata({
601
+ minVersion: "12.0.0",
602
+ version: "22.1.1",
603
+ ngImport: i0,
604
+ type: SearchstaxSearchLocationWidget,
605
+ decorators: [{
606
+ type: Component,
607
+ args: [{
608
+ standalone: false,
609
+ selector: "app-searchstax-search-location",
610
+ template: "<div\n [id]=\"'searchstax-location-container' + rand\"\n class=\"searchstax-location-container\"\n>\n @if (!!locationData && !templateOverride) {\n <div>\n <app-location-template #ref></app-location-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.locationTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (!!locationData && templateOverride) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n"
611
+ }]
612
+ }],
613
+ ctorParameters: () => [
614
+ { type: StoreServiceService },
615
+ { type: i0.NgZone },
616
+ { type: i0.ChangeDetectorRef }
617
+ ],
618
+ propDecorators: {
619
+ templateOverride: [{ type: Input }],
620
+ locationSearchEnabled: [{ type: Input }],
621
+ locationValuesOverride: [{ type: Input }],
622
+ locationDecode: [{ type: Input }],
623
+ locationDecodeCoordinatesToAddress: [{ type: Input }]
624
+ }
625
+ });
626
+ var InputTemplateComponent = class InputTemplateComponent {
627
+ static {
628
+ this.ɵfac = i0.ɵɵngDeclareFactory({
629
+ minVersion: "12.0.0",
630
+ version: "22.1.1",
631
+ ngImport: i0,
632
+ type: InputTemplateComponent,
633
+ deps: [],
634
+ target: i0.ɵɵFactoryTarget.Component
635
+ });
636
+ }
637
+ static {
638
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
639
+ minVersion: "17.0.0",
640
+ version: "22.1.1",
641
+ type: InputTemplateComponent,
642
+ isStandalone: false,
643
+ selector: "app-input-template",
644
+ viewQueries: [{
645
+ propertyName: "inputTemplate",
646
+ first: true,
647
+ predicate: ["inputTemplate"],
648
+ descendants: true,
649
+ static: true
650
+ }],
651
+ ngImport: i0,
652
+ template: `
486
653
  <ng-template
487
654
  #inputTemplate
488
655
  let-suggestions="suggestions"
@@ -549,14 +716,39 @@ class InputTemplateComponent {
549
716
  aria-label="search"
550
717
  ></button>
551
718
  </ng-template>
552
- `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: SearchstaxSearchLocationWidget, selector: "app-searchstax-search-location", inputs: ["templateOverride", "locationSearchEnabled", "locationValuesOverride", "locationDecode", "locationDecodeCoordinatesToAddress"] }] }); }
553
- }
554
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: InputTemplateComponent, decorators: [{
555
- type: Component,
556
- args: [{
557
- standalone: false,
558
- selector: "app-input-template",
559
- template: `
719
+ `,
720
+ isInline: true,
721
+ dependencies: [{
722
+ kind: "directive",
723
+ type: i1.NgClass,
724
+ selector: "[ngClass]",
725
+ inputs: ["class", "ngClass"]
726
+ }, {
727
+ kind: "component",
728
+ type: SearchstaxSearchLocationWidget,
729
+ selector: "app-searchstax-search-location",
730
+ inputs: [
731
+ "templateOverride",
732
+ "locationSearchEnabled",
733
+ "locationValuesOverride",
734
+ "locationDecode",
735
+ "locationDecodeCoordinatesToAddress"
736
+ ]
737
+ }]
738
+ });
739
+ }
740
+ };
741
+ i0.ɵɵngDeclareClassMetadata({
742
+ minVersion: "12.0.0",
743
+ version: "22.1.1",
744
+ ngImport: i0,
745
+ type: InputTemplateComponent,
746
+ decorators: [{
747
+ type: Component,
748
+ args: [{
749
+ standalone: false,
750
+ selector: "app-input-template",
751
+ template: `
560
752
  <ng-template
561
753
  #inputTemplate
562
754
  let-suggestions="suggestions"
@@ -623,128 +815,183 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
623
815
  aria-label="search"
624
816
  ></button>
625
817
  </ng-template>
626
- `,
627
- }]
628
- }], propDecorators: { inputTemplate: [{
629
- type: ViewChild,
630
- args: ["inputTemplate", { static: true }]
631
- }] } });
632
-
633
- class SearchstaxInputWidget {
634
- constructor(storeServiceService, ngZone, cdr) {
635
- this.storeServiceService = storeServiceService;
636
- this.ngZone = ngZone;
637
- this.cdr = cdr;
638
- this.searchInputId = "";
639
- this.hooks = {};
640
- this.suggestions = [];
641
- this.context = this;
642
- this.templateData = null;
643
- this.locationWidgetConfig = locationWidgetConfig;
644
- this.searchInputWidgetAttached = false;
645
- }
646
- ngOnInit() {
647
- if (this.storeServiceService.searchstax) {
648
- this.storeServiceService.whenDataLayerReady(() => {
649
- this.attachObservables();
650
- });
651
- if (this.afterAutosuggest) {
652
- this.hooks["afterAutosuggest"] = this.afterAutosuggest;
653
- }
654
- if (this.beforeAutosuggest) {
655
- this.hooks["beforeAutosuggest"] = this.beforeAutosuggest;
656
- }
657
- }
658
- else {
659
- throw Error("Searchstax instance needs to be passed via props");
660
- }
661
- }
662
- /**
663
- * Studio JS looks up `#searchInputId` as soon as `addSearchInputWidget` runs.
664
- * The real input is stamped by `ngTemplateOutlet` after child views exist, so
665
- * `ngOnInit` + a fixed delay can run too early (especially with control flow).
666
- */
667
- ngAfterViewInit() {
668
- this.tryAttachSearchInputWidget(0);
669
- }
670
- tryAttachSearchInputWidget(attempt) {
671
- const searchstax = this.storeServiceService.searchstax;
672
- if (!searchstax || this.searchInputWidgetAttached) {
673
- return;
674
- }
675
- if (typeof document === "undefined") {
676
- return;
677
- }
678
- const inputId = this.searchInputId || "searchstax-search-input";
679
- if (document.getElementById(inputId)) {
680
- searchstax.addSearchInputWidget("searchstax-input-container", {
681
- suggestAfterMinChars: this.suggestAfterMinChars,
682
- hooks: this.hooks,
683
- templates: {
684
- mainTemplate: {
685
- template: ``,
686
- searchInputId: inputId,
687
- },
688
- },
689
- });
690
- searchstax.dataLayer.setInputTemplateRendered(true);
691
- this.searchInputWidgetAttached = true;
692
- return;
693
- }
694
- const maxAttempts = 60;
695
- if (attempt < maxAttempts) {
696
- requestAnimationFrame(() => this.tryAttachSearchInputWidget(attempt + 1));
697
- }
698
- else {
699
- console.warn(`[Searchstax] Input #${inputId} not found after view init; search input widget was not attached. ` +
700
- `With a custom templateOverride, set the input id to match [searchInputId] (default "${inputId}").`);
701
- }
702
- }
703
- onMouseLeave(context) {
704
- context.storeServiceService.searchstax.searchInputWidget?.resetAutosuggestSelection();
705
- context.storeServiceService.searchstax.searchInputWidget?.markActiveAutosuggestItem();
706
- }
707
- onMouseOver(suggestion, context) {
708
- context.storeServiceService.searchstax.searchInputWidget?.onSuggestionEnter(suggestion);
709
- }
710
- onMouseClick(e, context) {
711
- e.stopImmediatePropagation();
712
- context.storeServiceService.searchstax.searchInputWidget?.suggestionChosen();
713
- }
714
- onClearClick(e, context) {
715
- e.stopImmediatePropagation();
716
- context.storeServiceService.searchstax.searchInputWidget?.clearInput();
717
- }
718
- attachObservables() {
719
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$autosuggestResults, (suggestions) => {
720
- this.suggestions = suggestions?.suggestions ?? [];
721
- }, this.cdr);
722
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$inputWidgetTemplateData, (data) => {
723
- this.templateData = data;
724
- }, this.cdr);
725
- }
726
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxInputWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
727
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: SearchstaxInputWidget, isStandalone: false, 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 @if (!templateOverride) {\n <app-input-template #ref></app-input-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.inputTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n }\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: InputTemplateComponent, selector: "app-input-template" }] }); }
728
- }
729
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxInputWidget, decorators: [{
730
- type: Component,
731
- args: [{ standalone: false, 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 @if (!templateOverride) {\n <app-input-template #ref></app-input-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.inputTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n }\n </div>\n</div>\n" }]
732
- }], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { afterAutosuggest: [{
733
- type: Input
734
- }], beforeAutosuggest: [{
735
- type: Input
736
- }], searchInputId: [{
737
- type: Input
738
- }], suggestAfterMinChars: [{
739
- type: Input
740
- }], templateOverride: [{
741
- type: Input
742
- }] } });
743
-
744
- // reusable-template.component.ts
745
- class ResultsTemplateComponent {
746
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ResultsTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
747
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: ResultsTemplateComponent, isStandalone: false, selector: "app-results-template", viewQueries: [{ propertyName: "resultsTemplate", first: true, predicate: ["resultsTemplate"], descendants: true, static: true }], ngImport: i0, template: `
818
+ `
819
+ }]
820
+ }],
821
+ propDecorators: { inputTemplate: [{
822
+ type: ViewChild,
823
+ args: ["inputTemplate", { static: true }]
824
+ }] }
825
+ });
826
+ var SearchstaxInputWidget = class SearchstaxInputWidget {
827
+ constructor(storeServiceService, ngZone, cdr) {
828
+ this.storeServiceService = storeServiceService;
829
+ this.ngZone = ngZone;
830
+ this.cdr = cdr;
831
+ this.searchInputId = "";
832
+ this.hooks = {};
833
+ this.suggestions = [];
834
+ this.context = this;
835
+ this.templateData = null;
836
+ this.locationWidgetConfig = locationWidgetConfig;
837
+ this.searchInputWidgetAttached = false;
838
+ }
839
+ ngOnInit() {
840
+ if (this.storeServiceService.searchstax) {
841
+ this.storeServiceService.whenDataLayerReady(() => {
842
+ this.attachObservables();
843
+ });
844
+ if (this.afterAutosuggest) this.hooks["afterAutosuggest"] = this.afterAutosuggest;
845
+ if (this.beforeAutosuggest) this.hooks["beforeAutosuggest"] = this.beforeAutosuggest;
846
+ } else throw Error("Searchstax instance needs to be passed via props");
847
+ }
848
+ ngAfterViewInit() {
849
+ this.tryAttachSearchInputWidget(0);
850
+ }
851
+ tryAttachSearchInputWidget(attempt) {
852
+ const searchstax = this.storeServiceService.searchstax;
853
+ if (!searchstax || this.searchInputWidgetAttached) return;
854
+ if (typeof document === "undefined") return;
855
+ const inputId = this.searchInputId || "searchstax-search-input";
856
+ if (document.getElementById(inputId)) {
857
+ searchstax.addSearchInputWidget("searchstax-input-container", {
858
+ suggestAfterMinChars: this.suggestAfterMinChars,
859
+ hooks: this.hooks,
860
+ templates: { mainTemplate: {
861
+ template: ``,
862
+ searchInputId: inputId
863
+ } }
864
+ });
865
+ searchstax.dataLayer.setInputTemplateRendered(true);
866
+ this.searchInputWidgetAttached = true;
867
+ return;
868
+ }
869
+ if (attempt < 60) requestAnimationFrame(() => this.tryAttachSearchInputWidget(attempt + 1));
870
+ else console.warn(`[Searchstax] Input #${inputId} not found after view init; search input widget was not attached. With a custom templateOverride, set the input id to match [searchInputId] (default "${inputId}").`);
871
+ }
872
+ onMouseLeave(context) {
873
+ context.storeServiceService.searchstax.searchInputWidget?.resetAutosuggestSelection();
874
+ context.storeServiceService.searchstax.searchInputWidget?.markActiveAutosuggestItem();
875
+ }
876
+ onMouseOver(suggestion, context) {
877
+ context.storeServiceService.searchstax.searchInputWidget?.onSuggestionEnter(suggestion);
878
+ }
879
+ onMouseClick(e, context) {
880
+ e.stopImmediatePropagation();
881
+ context.storeServiceService.searchstax.searchInputWidget?.suggestionChosen();
882
+ }
883
+ onClearClick(e, context) {
884
+ e.stopImmediatePropagation();
885
+ context.storeServiceService.searchstax.searchInputWidget?.clearInput();
886
+ }
887
+ attachObservables() {
888
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$autosuggestResults, (suggestions) => {
889
+ this.suggestions = suggestions?.suggestions ?? [];
890
+ }, this.cdr);
891
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$inputWidgetTemplateData, (data) => {
892
+ this.templateData = data;
893
+ }, this.cdr);
894
+ }
895
+ static {
896
+ this.ɵfac = i0.ɵɵngDeclareFactory({
897
+ minVersion: "12.0.0",
898
+ version: "22.1.1",
899
+ ngImport: i0,
900
+ type: SearchstaxInputWidget,
901
+ deps: [
902
+ { token: StoreServiceService },
903
+ { token: i0.NgZone },
904
+ { token: i0.ChangeDetectorRef }
905
+ ],
906
+ target: i0.ɵɵFactoryTarget.Component
907
+ });
908
+ }
909
+ static {
910
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
911
+ minVersion: "17.0.0",
912
+ version: "22.1.1",
913
+ type: SearchstaxInputWidget,
914
+ isStandalone: false,
915
+ selector: "app-searchstax-input",
916
+ inputs: {
917
+ afterAutosuggest: "afterAutosuggest",
918
+ beforeAutosuggest: "beforeAutosuggest",
919
+ searchInputId: "searchInputId",
920
+ suggestAfterMinChars: "suggestAfterMinChars",
921
+ templateOverride: "templateOverride"
922
+ },
923
+ ngImport: i0,
924
+ 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 @if (!templateOverride) {\n <app-input-template #ref></app-input-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.inputTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n }\n </div>\n</div>\n",
925
+ dependencies: [{
926
+ kind: "directive",
927
+ type: i1.NgTemplateOutlet,
928
+ selector: "[ngTemplateOutlet]",
929
+ inputs: [
930
+ "ngTemplateOutletContext",
931
+ "ngTemplateOutlet",
932
+ "ngTemplateOutletInjector"
933
+ ]
934
+ }, {
935
+ kind: "component",
936
+ type: InputTemplateComponent,
937
+ selector: "app-input-template"
938
+ }]
939
+ });
940
+ }
941
+ };
942
+ i0.ɵɵngDeclareClassMetadata({
943
+ minVersion: "12.0.0",
944
+ version: "22.1.1",
945
+ ngImport: i0,
946
+ type: SearchstaxInputWidget,
947
+ decorators: [{
948
+ type: Component,
949
+ args: [{
950
+ standalone: false,
951
+ selector: "app-searchstax-input",
952
+ 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 @if (!templateOverride) {\n <app-input-template #ref></app-input-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.inputTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n } @else {\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n }\n </div>\n</div>\n"
953
+ }]
954
+ }],
955
+ ctorParameters: () => [
956
+ { type: StoreServiceService },
957
+ { type: i0.NgZone },
958
+ { type: i0.ChangeDetectorRef }
959
+ ],
960
+ propDecorators: {
961
+ afterAutosuggest: [{ type: Input }],
962
+ beforeAutosuggest: [{ type: Input }],
963
+ searchInputId: [{ type: Input }],
964
+ suggestAfterMinChars: [{ type: Input }],
965
+ templateOverride: [{ type: Input }]
966
+ }
967
+ });
968
+ var ResultsTemplateComponent = class ResultsTemplateComponent {
969
+ static {
970
+ this.ɵfac = i0.ɵɵngDeclareFactory({
971
+ minVersion: "12.0.0",
972
+ version: "22.1.1",
973
+ ngImport: i0,
974
+ type: ResultsTemplateComponent,
975
+ deps: [],
976
+ target: i0.ɵɵFactoryTarget.Component
977
+ });
978
+ }
979
+ static {
980
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
981
+ minVersion: "17.0.0",
982
+ version: "22.1.1",
983
+ type: ResultsTemplateComponent,
984
+ isStandalone: false,
985
+ selector: "app-results-template",
986
+ viewQueries: [{
987
+ propertyName: "resultsTemplate",
988
+ first: true,
989
+ predicate: ["resultsTemplate"],
990
+ descendants: true,
991
+ static: true
992
+ }],
993
+ ngImport: i0,
994
+ template: `
748
995
  <ng-template
749
996
  #resultsTemplate
750
997
  let-searchResults="searchResults"
@@ -835,14 +1082,28 @@ class ResultsTemplateComponent {
835
1082
  }
836
1083
  </div>
837
1084
  </ng-template>
838
- `, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
839
- }
840
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ResultsTemplateComponent, decorators: [{
841
- type: Component,
842
- args: [{
843
- standalone: false,
844
- selector: "app-results-template",
845
- template: `
1085
+ `,
1086
+ isInline: true,
1087
+ dependencies: [{
1088
+ kind: "directive",
1089
+ type: i1.NgClass,
1090
+ selector: "[ngClass]",
1091
+ inputs: ["class", "ngClass"]
1092
+ }]
1093
+ });
1094
+ }
1095
+ };
1096
+ i0.ɵɵngDeclareClassMetadata({
1097
+ minVersion: "12.0.0",
1098
+ version: "22.1.1",
1099
+ ngImport: i0,
1100
+ type: ResultsTemplateComponent,
1101
+ decorators: [{
1102
+ type: Component,
1103
+ args: [{
1104
+ standalone: false,
1105
+ selector: "app-results-template",
1106
+ template: `
846
1107
  <ng-template
847
1108
  #resultsTemplate
848
1109
  let-searchResults="searchResults"
@@ -933,17 +1194,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
933
1194
  }
934
1195
  </div>
935
1196
  </ng-template>
936
- `,
937
- }]
938
- }], propDecorators: { resultsTemplate: [{
939
- type: ViewChild,
940
- args: ["resultsTemplate", { static: true }]
941
- }] } });
942
-
943
- // reusable-template.component.ts
944
- class NoResultsTemplateComponent {
945
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: NoResultsTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
946
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: NoResultsTemplateComponent, isStandalone: false, selector: "app-no-results-template", viewQueries: [{ propertyName: "noResultsTemplate", first: true, predicate: ["noResultsTemplate"], descendants: true, static: true }], ngImport: i0, template: `
1197
+ `
1198
+ }]
1199
+ }],
1200
+ propDecorators: { resultsTemplate: [{
1201
+ type: ViewChild,
1202
+ args: ["resultsTemplate", { static: true }]
1203
+ }] }
1204
+ });
1205
+ var NoResultsTemplateComponent = class NoResultsTemplateComponent {
1206
+ static {
1207
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1208
+ minVersion: "12.0.0",
1209
+ version: "22.1.1",
1210
+ ngImport: i0,
1211
+ type: NoResultsTemplateComponent,
1212
+ deps: [],
1213
+ target: i0.ɵɵFactoryTarget.Component
1214
+ });
1215
+ }
1216
+ static {
1217
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1218
+ minVersion: "17.0.0",
1219
+ version: "22.1.1",
1220
+ type: NoResultsTemplateComponent,
1221
+ isStandalone: false,
1222
+ selector: "app-no-results-template",
1223
+ viewQueries: [{
1224
+ propertyName: "noResultsTemplate",
1225
+ first: true,
1226
+ predicate: ["noResultsTemplate"],
1227
+ descendants: true,
1228
+ static: true
1229
+ }],
1230
+ ngImport: i0,
1231
+ template: `
947
1232
  <ng-template
948
1233
  #noResultsTemplate
949
1234
  let-metadata="metadata"
@@ -977,14 +1262,22 @@ class NoResultsTemplateComponent {
977
1262
  </li>
978
1263
  </ul>
979
1264
  </ng-template>
980
- `, isInline: true }); }
981
- }
982
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: NoResultsTemplateComponent, decorators: [{
983
- type: Component,
984
- args: [{
985
- standalone: false,
986
- selector: "app-no-results-template",
987
- template: `
1265
+ `,
1266
+ isInline: true
1267
+ });
1268
+ }
1269
+ };
1270
+ i0.ɵɵngDeclareClassMetadata({
1271
+ minVersion: "12.0.0",
1272
+ version: "22.1.1",
1273
+ ngImport: i0,
1274
+ type: NoResultsTemplateComponent,
1275
+ decorators: [{
1276
+ type: Component,
1277
+ args: [{
1278
+ standalone: false,
1279
+ selector: "app-no-results-template",
1280
+ template: `
988
1281
  <ng-template
989
1282
  #noResultsTemplate
990
1283
  let-metadata="metadata"
@@ -1018,104 +1311,188 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
1018
1311
  </li>
1019
1312
  </ul>
1020
1313
  </ng-template>
1021
- `,
1022
- }]
1023
- }], propDecorators: { noResultsTemplate: [{
1024
- type: ViewChild,
1025
- args: ["noResultsTemplate", { static: true }]
1026
- }] } });
1027
-
1028
- class SearchstaxResultsWidget {
1029
- get hooks() {
1030
- const hooks = {};
1031
- if (this.afterLinkClick) {
1032
- hooks['afterLinkClick'] = this.afterLinkClick;
1033
- }
1034
- return hooks;
1035
- }
1036
- constructor(storeServiceService, ngZone, cdr) {
1037
- this.storeServiceService = storeServiceService;
1038
- this.ngZone = ngZone;
1039
- this.cdr = cdr;
1040
- this.searchResults = null;
1041
- this.metadata = null;
1042
- this.searchTerm = '';
1043
- this.context = this;
1044
- }
1045
- ngOnInit() {
1046
- if (this.storeServiceService.searchstax) {
1047
- this.storeServiceService.whenDataLayerReady(() => {
1048
- this.attachObservables();
1049
- });
1050
- setTimeout(() => {
1051
- this.storeServiceService.searchstax.addSearchResultsWidget('searchstax-results-container', {
1052
- templates: {},
1053
- hooks: this.hooks,
1054
- renderMethod: this.renderMethod ?? "pagination",
1055
- resultsPerPage: this.resultsPerPage,
1056
- });
1057
- }, 0);
1058
- }
1059
- else {
1060
- throw Error('Searchstax instance needs to be passed via props');
1061
- }
1062
- }
1063
- executeSearch(term, event, context) {
1064
- event.preventDefault();
1065
- context.storeServiceService.searchstax.executeSearch(term);
1066
- }
1067
- attachObservables() {
1068
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchResults, (results) => {
1069
- const current = this.searchResults ? [...this.searchResults] : [];
1070
- const newResults = results ?? [];
1071
- const resultsCombined = this.renderMethod === "infiniteScroll"
1072
- ? [...current, ...newResults]
1073
- : results;
1074
- if (this.storeServiceService.searchstax.dataLayer.$searchObject.value
1075
- ?.page === 1) {
1076
- this.searchResults = newResults;
1077
- }
1078
- else {
1079
- this.searchResults = resultsCombined;
1080
- }
1081
- }, this.cdr);
1082
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchTermChange, (result) => {
1083
- this.searchTerm = result;
1084
- }, this.cdr);
1085
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchResultsMetadata, (value) => {
1086
- this.metadata = value;
1087
- }, this.cdr);
1088
- }
1089
- resultClicked(result, event, context) {
1090
- event.preventDefault();
1091
- event.stopPropagation();
1092
- context.storeServiceService.searchstax.executeLinkClick(result.uniqueId);
1093
- }
1094
- isImage(field) {
1095
- return field.isImage && typeof field.value === 'string';
1096
- }
1097
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxResultsWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1098
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: SearchstaxResultsWidget, isStandalone: false, 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 @if (\n searchResults?.length === 0 &&\n searchTerm !== '' &&\n searchTerm !== '*' &&\n storeServiceService.searchstax.dataLayer.parsedData\n ?.firstSearchHappened &&\n !noResultsTemplate\n ) {\n <div>\n <app-no-results-template #noResultsTpl></app-no-results-template>\n <ng-container\n [ngTemplateOutlet]=\"noResultsTpl.noResultsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n @if (\n searchResults?.length === 0 &&\n searchTerm !== '' &&\n searchTerm !== '*' &&\n storeServiceService.searchstax.dataLayer.parsedData\n ?.firstSearchHappened &&\n noResultsTemplate\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"noResultsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (searchResults && searchResults.length && !resultsTemplate) {\n <app-results-template #resultsTpl></app-results-template>\n <ng-container\n [ngTemplateOutlet]=\"resultsTpl.resultsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n }\n\n @if (searchResults && searchResults.length && resultsTemplate) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"resultsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n </div>\n </div>\n </section>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ResultsTemplateComponent, selector: "app-results-template" }, { kind: "component", type: NoResultsTemplateComponent, selector: "app-no-results-template" }] }); }
1099
- }
1100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxResultsWidget, decorators: [{
1101
- type: Component,
1102
- args: [{ standalone: false, 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 @if (\n searchResults?.length === 0 &&\n searchTerm !== '' &&\n searchTerm !== '*' &&\n storeServiceService.searchstax.dataLayer.parsedData\n ?.firstSearchHappened &&\n !noResultsTemplate\n ) {\n <div>\n <app-no-results-template #noResultsTpl></app-no-results-template>\n <ng-container\n [ngTemplateOutlet]=\"noResultsTpl.noResultsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n @if (\n searchResults?.length === 0 &&\n searchTerm !== '' &&\n searchTerm !== '*' &&\n storeServiceService.searchstax.dataLayer.parsedData\n ?.firstSearchHappened &&\n noResultsTemplate\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"noResultsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (searchResults && searchResults.length && !resultsTemplate) {\n <app-results-template #resultsTpl></app-results-template>\n <ng-container\n [ngTemplateOutlet]=\"resultsTpl.resultsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n }\n\n @if (searchResults && searchResults.length && resultsTemplate) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"resultsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n </div>\n </div>\n </section>\n</div>\n" }]
1103
- }], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { afterLinkClick: [{
1104
- type: Input
1105
- }], noResultsTemplate: [{
1106
- type: Input
1107
- }], resultsTemplate: [{
1108
- type: Input
1109
- }], renderMethod: [{
1110
- type: Input
1111
- }], resultsPerPage: [{
1112
- type: Input
1113
- }] } });
1114
-
1115
- // reusable-template.component.ts
1116
- class OverviewTemplateComponent {
1117
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: OverviewTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1118
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: OverviewTemplateComponent, isStandalone: false, selector: "app-overview-template", viewQueries: [{ propertyName: "overviewTemplate", first: true, predicate: ["feedbackTemplate"], descendants: true, static: true }], ngImport: i0, template: `
1314
+ `
1315
+ }]
1316
+ }],
1317
+ propDecorators: { noResultsTemplate: [{
1318
+ type: ViewChild,
1319
+ args: ["noResultsTemplate", { static: true }]
1320
+ }] }
1321
+ });
1322
+ var SearchstaxResultsWidget = class SearchstaxResultsWidget {
1323
+ get hooks() {
1324
+ const hooks = {};
1325
+ if (this.afterLinkClick) hooks["afterLinkClick"] = this.afterLinkClick;
1326
+ return hooks;
1327
+ }
1328
+ constructor(storeServiceService, ngZone, cdr) {
1329
+ this.storeServiceService = storeServiceService;
1330
+ this.ngZone = ngZone;
1331
+ this.cdr = cdr;
1332
+ this.searchResults = null;
1333
+ this.metadata = null;
1334
+ this.searchTerm = "";
1335
+ this.context = this;
1336
+ }
1337
+ ngOnInit() {
1338
+ if (this.storeServiceService.searchstax) {
1339
+ this.storeServiceService.whenDataLayerReady(() => {
1340
+ this.attachObservables();
1341
+ });
1342
+ setTimeout(() => {
1343
+ this.storeServiceService.searchstax.addSearchResultsWidget("searchstax-results-container", {
1344
+ templates: {},
1345
+ hooks: this.hooks,
1346
+ renderMethod: this.renderMethod ?? "pagination",
1347
+ resultsPerPage: this.resultsPerPage,
1348
+ groupedBy: this.groupedBy,
1349
+ linkTarget: this.linkTarget,
1350
+ itemsPerGroup: this.itemsPerGroup
1351
+ });
1352
+ }, 0);
1353
+ } else throw Error("Searchstax instance needs to be passed via props");
1354
+ }
1355
+ executeSearch(term, event, context) {
1356
+ event.preventDefault();
1357
+ context.storeServiceService.searchstax.executeSearch(term);
1358
+ }
1359
+ attachObservables() {
1360
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchResults, (results) => {
1361
+ const current = this.searchResults ? [...this.searchResults] : [];
1362
+ const newResults = results ?? [];
1363
+ const resultsCombined = this.renderMethod === "infiniteScroll" ? [...current, ...newResults] : results;
1364
+ if (this.storeServiceService.searchstax.dataLayer.$searchObject.value?.page === 1) this.searchResults = newResults;
1365
+ else this.searchResults = resultsCombined;
1366
+ }, this.cdr);
1367
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchTermChange, (result) => {
1368
+ this.searchTerm = result;
1369
+ }, this.cdr);
1370
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchResultsMetadata, (value) => {
1371
+ this.metadata = value;
1372
+ }, this.cdr);
1373
+ }
1374
+ resultClicked(result, event, context) {
1375
+ event.preventDefault();
1376
+ event.stopPropagation();
1377
+ context.storeServiceService.searchstax.executeLinkClick(result.uniqueId);
1378
+ }
1379
+ isImage(field) {
1380
+ return field.isImage && typeof field.value === "string";
1381
+ }
1382
+ static {
1383
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1384
+ minVersion: "12.0.0",
1385
+ version: "22.1.1",
1386
+ ngImport: i0,
1387
+ type: SearchstaxResultsWidget,
1388
+ deps: [
1389
+ { token: StoreServiceService },
1390
+ { token: i0.NgZone },
1391
+ { token: i0.ChangeDetectorRef }
1392
+ ],
1393
+ target: i0.ɵɵFactoryTarget.Component
1394
+ });
1395
+ }
1396
+ static {
1397
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1398
+ minVersion: "17.0.0",
1399
+ version: "22.1.1",
1400
+ type: SearchstaxResultsWidget,
1401
+ isStandalone: false,
1402
+ selector: "app-searchstax-results",
1403
+ inputs: {
1404
+ afterLinkClick: "afterLinkClick",
1405
+ noResultsTemplate: "noResultsTemplate",
1406
+ resultsTemplate: "resultsTemplate",
1407
+ renderMethod: "renderMethod",
1408
+ linkTarget: "linkTarget",
1409
+ resultsPerPage: "resultsPerPage",
1410
+ groupedBy: "groupedBy",
1411
+ itemsPerGroup: "itemsPerGroup"
1412
+ },
1413
+ ngImport: i0,
1414
+ 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 @if (\n searchResults?.length === 0 &&\n searchTerm !== '' &&\n searchTerm !== '*' &&\n storeServiceService.searchstax.dataLayer.parsedData\n ?.firstSearchHappened &&\n !noResultsTemplate\n ) {\n <div>\n <app-no-results-template #noResultsTpl></app-no-results-template>\n <ng-container\n [ngTemplateOutlet]=\"noResultsTpl.noResultsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n @if (\n searchResults?.length === 0 &&\n searchTerm !== '' &&\n searchTerm !== '*' &&\n storeServiceService.searchstax.dataLayer.parsedData\n ?.firstSearchHappened &&\n noResultsTemplate\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"noResultsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (searchResults && searchResults.length && !resultsTemplate) {\n <app-results-template #resultsTpl></app-results-template>\n <ng-container\n [ngTemplateOutlet]=\"resultsTpl.resultsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n }\n\n @if (searchResults && searchResults.length && resultsTemplate) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"resultsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n </div>\n </div>\n </section>\n</div>\n",
1415
+ dependencies: [
1416
+ {
1417
+ kind: "directive",
1418
+ type: i1.NgTemplateOutlet,
1419
+ selector: "[ngTemplateOutlet]",
1420
+ inputs: [
1421
+ "ngTemplateOutletContext",
1422
+ "ngTemplateOutlet",
1423
+ "ngTemplateOutletInjector"
1424
+ ]
1425
+ },
1426
+ {
1427
+ kind: "component",
1428
+ type: ResultsTemplateComponent,
1429
+ selector: "app-results-template"
1430
+ },
1431
+ {
1432
+ kind: "component",
1433
+ type: NoResultsTemplateComponent,
1434
+ selector: "app-no-results-template"
1435
+ }
1436
+ ]
1437
+ });
1438
+ }
1439
+ };
1440
+ i0.ɵɵngDeclareClassMetadata({
1441
+ minVersion: "12.0.0",
1442
+ version: "22.1.1",
1443
+ ngImport: i0,
1444
+ type: SearchstaxResultsWidget,
1445
+ decorators: [{
1446
+ type: Component,
1447
+ args: [{
1448
+ standalone: false,
1449
+ selector: "app-searchstax-results",
1450
+ 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 @if (\n searchResults?.length === 0 &&\n searchTerm !== '' &&\n searchTerm !== '*' &&\n storeServiceService.searchstax.dataLayer.parsedData\n ?.firstSearchHappened &&\n !noResultsTemplate\n ) {\n <div>\n <app-no-results-template #noResultsTpl></app-no-results-template>\n <ng-container\n [ngTemplateOutlet]=\"noResultsTpl.noResultsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n @if (\n searchResults?.length === 0 &&\n searchTerm !== '' &&\n searchTerm !== '*' &&\n storeServiceService.searchstax.dataLayer.parsedData\n ?.firstSearchHappened &&\n noResultsTemplate\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"noResultsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (searchResults && searchResults.length && !resultsTemplate) {\n <app-results-template #resultsTpl></app-results-template>\n <ng-container\n [ngTemplateOutlet]=\"resultsTpl.resultsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n }\n\n @if (searchResults && searchResults.length && resultsTemplate) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"resultsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n </div>\n </div>\n </section>\n</div>\n"
1451
+ }]
1452
+ }],
1453
+ ctorParameters: () => [
1454
+ { type: StoreServiceService },
1455
+ { type: i0.NgZone },
1456
+ { type: i0.ChangeDetectorRef }
1457
+ ],
1458
+ propDecorators: {
1459
+ afterLinkClick: [{ type: Input }],
1460
+ noResultsTemplate: [{ type: Input }],
1461
+ resultsTemplate: [{ type: Input }],
1462
+ renderMethod: [{ type: Input }],
1463
+ linkTarget: [{ type: Input }],
1464
+ resultsPerPage: [{ type: Input }],
1465
+ groupedBy: [{ type: Input }],
1466
+ itemsPerGroup: [{ type: Input }]
1467
+ }
1468
+ });
1469
+ var OverviewTemplateComponent = class OverviewTemplateComponent {
1470
+ static {
1471
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1472
+ minVersion: "12.0.0",
1473
+ version: "22.1.1",
1474
+ ngImport: i0,
1475
+ type: OverviewTemplateComponent,
1476
+ deps: [],
1477
+ target: i0.ɵɵFactoryTarget.Component
1478
+ });
1479
+ }
1480
+ static {
1481
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1482
+ minVersion: "17.0.0",
1483
+ version: "22.1.1",
1484
+ type: OverviewTemplateComponent,
1485
+ isStandalone: false,
1486
+ selector: "app-overview-template",
1487
+ viewQueries: [{
1488
+ propertyName: "overviewTemplate",
1489
+ first: true,
1490
+ predicate: ["feedbackTemplate"],
1491
+ descendants: true,
1492
+ static: true
1493
+ }],
1494
+ ngImport: i0,
1495
+ template: `
1119
1496
  <ng-template
1120
1497
  #feedbackTemplate
1121
1498
  let-searchFeedbackData="searchFeedbackData"
@@ -1153,14 +1530,22 @@ class OverviewTemplateComponent {
1153
1530
  </div>
1154
1531
  </h2>
1155
1532
  </ng-template>
1156
- `, isInline: true }); }
1157
- }
1158
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: OverviewTemplateComponent, decorators: [{
1159
- type: Component,
1160
- args: [{
1161
- standalone: false,
1162
- selector: "app-overview-template",
1163
- template: `
1533
+ `,
1534
+ isInline: true
1535
+ });
1536
+ }
1537
+ };
1538
+ i0.ɵɵngDeclareClassMetadata({
1539
+ minVersion: "12.0.0",
1540
+ version: "22.1.1",
1541
+ ngImport: i0,
1542
+ type: OverviewTemplateComponent,
1543
+ decorators: [{
1544
+ type: Component,
1545
+ args: [{
1546
+ standalone: false,
1547
+ selector: "app-overview-template",
1548
+ template: `
1164
1549
  <ng-template
1165
1550
  #feedbackTemplate
1166
1551
  let-searchFeedbackData="searchFeedbackData"
@@ -1198,58 +1583,130 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
1198
1583
  </div>
1199
1584
  </h2>
1200
1585
  </ng-template>
1201
- `,
1202
- }]
1203
- }], propDecorators: { overviewTemplate: [{
1204
- type: ViewChild,
1205
- args: ["feedbackTemplate", { static: true }]
1206
- }] } });
1207
-
1208
- class SearchstaxSearchFeedbackWidget {
1209
- constructor(storeServiceService, ngZone, cdr) {
1210
- this.storeServiceService = storeServiceService;
1211
- this.ngZone = ngZone;
1212
- this.cdr = cdr;
1213
- this.searchFeedbackData = null;
1214
- this.rand = Math.random();
1215
- this.context = this;
1216
- }
1217
- ngOnInit() {
1218
- if (this.storeServiceService.searchstax) {
1219
- this.storeServiceService.whenDataLayerReady(() => {
1220
- this.attachObservables();
1221
- });
1222
- setTimeout(() => {
1223
- this.storeServiceService.searchstax.addSearchFeedbackWidget("search-feedback-container" + this.rand, {});
1224
- }, 0);
1225
- }
1226
- else {
1227
- throw Error("Searchstax instance needs to be passed via props");
1228
- }
1229
- }
1230
- onOriginalQueryClick(e, context) {
1231
- e.stopImmediatePropagation();
1232
- context.storeServiceService.searchstax.searchFeedbackWidget?.onOriginalQueryClick(e);
1233
- }
1234
- attachObservables() {
1235
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchFeedbackData, (searchFeedbackData) => {
1236
- this.searchFeedbackData = searchFeedbackData;
1237
- }, this.cdr);
1238
- }
1239
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxSearchFeedbackWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1240
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: SearchstaxSearchFeedbackWidget, isStandalone: false, 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 @if (\n searchFeedbackData &&\n searchFeedbackData?.searchExecuted &&\n !templateOverride &&\n searchFeedbackData?.totalResults\n ) {\n <div class=\"searchstax-feedback-container\">\n <app-overview-template #ref></app-overview-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.overviewTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (\n searchFeedbackData &&\n searchFeedbackData?.searchExecuted &&\n templateOverride &&\n searchFeedbackData?.totalResults\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: OverviewTemplateComponent, selector: "app-overview-template" }] }); }
1241
- }
1242
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxSearchFeedbackWidget, decorators: [{
1243
- type: Component,
1244
- args: [{ standalone: false, selector: "app-searchstax-search-feedback", template: "<div\n class=\"search-feedback-container\"\n [id]=\"'search-feedback-container' + rand\"\n>\n @if (\n searchFeedbackData &&\n searchFeedbackData?.searchExecuted &&\n !templateOverride &&\n searchFeedbackData?.totalResults\n ) {\n <div class=\"searchstax-feedback-container\">\n <app-overview-template #ref></app-overview-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.overviewTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (\n searchFeedbackData &&\n searchFeedbackData?.searchExecuted &&\n templateOverride &&\n searchFeedbackData?.totalResults\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n" }]
1245
- }], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { templateOverride: [{
1246
- type: Input
1247
- }] } });
1248
-
1249
- // reusable-template.component.ts
1250
- class PaginationTemplateComponent {
1251
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: PaginationTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1252
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.1", type: PaginationTemplateComponent, isStandalone: false, selector: "app-pagination-template", viewQueries: [{ propertyName: "paginationTemplate", first: true, predicate: ["paginationTemplate"], descendants: true, static: true }], ngImport: i0, template: `
1586
+ `
1587
+ }]
1588
+ }],
1589
+ propDecorators: { overviewTemplate: [{
1590
+ type: ViewChild,
1591
+ args: ["feedbackTemplate", { static: true }]
1592
+ }] }
1593
+ });
1594
+ var SearchstaxSearchFeedbackWidget = class SearchstaxSearchFeedbackWidget {
1595
+ constructor(storeServiceService, ngZone, cdr) {
1596
+ this.storeServiceService = storeServiceService;
1597
+ this.ngZone = ngZone;
1598
+ this.cdr = cdr;
1599
+ this.searchFeedbackData = null;
1600
+ this.rand = Math.random();
1601
+ this.context = this;
1602
+ }
1603
+ ngOnInit() {
1604
+ if (this.storeServiceService.searchstax) {
1605
+ this.storeServiceService.whenDataLayerReady(() => {
1606
+ this.attachObservables();
1607
+ });
1608
+ setTimeout(() => {
1609
+ this.storeServiceService.searchstax.addSearchFeedbackWidget("search-feedback-container" + this.rand, {});
1610
+ }, 0);
1611
+ } else throw Error("Searchstax instance needs to be passed via props");
1612
+ }
1613
+ onOriginalQueryClick(e, context) {
1614
+ e.stopImmediatePropagation();
1615
+ context.storeServiceService.searchstax.searchFeedbackWidget?.onOriginalQueryClick(e);
1616
+ }
1617
+ attachObservables() {
1618
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchFeedbackData, (searchFeedbackData) => {
1619
+ this.searchFeedbackData = searchFeedbackData;
1620
+ }, this.cdr);
1621
+ }
1622
+ static {
1623
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1624
+ minVersion: "12.0.0",
1625
+ version: "22.1.1",
1626
+ ngImport: i0,
1627
+ type: SearchstaxSearchFeedbackWidget,
1628
+ deps: [
1629
+ { token: StoreServiceService },
1630
+ { token: i0.NgZone },
1631
+ { token: i0.ChangeDetectorRef }
1632
+ ],
1633
+ target: i0.ɵɵFactoryTarget.Component
1634
+ });
1635
+ }
1636
+ static {
1637
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1638
+ minVersion: "17.0.0",
1639
+ version: "22.1.1",
1640
+ type: SearchstaxSearchFeedbackWidget,
1641
+ isStandalone: false,
1642
+ selector: "app-searchstax-search-feedback",
1643
+ inputs: { templateOverride: "templateOverride" },
1644
+ ngImport: i0,
1645
+ template: "<div\n class=\"search-feedback-container\"\n [id]=\"'search-feedback-container' + rand\"\n>\n @if (\n searchFeedbackData &&\n searchFeedbackData?.searchExecuted &&\n !templateOverride &&\n searchFeedbackData?.totalResults\n ) {\n <div class=\"searchstax-feedback-container\">\n <app-overview-template #ref></app-overview-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.overviewTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (\n searchFeedbackData &&\n searchFeedbackData?.searchExecuted &&\n templateOverride &&\n searchFeedbackData?.totalResults\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n",
1646
+ dependencies: [{
1647
+ kind: "directive",
1648
+ type: i1.NgTemplateOutlet,
1649
+ selector: "[ngTemplateOutlet]",
1650
+ inputs: [
1651
+ "ngTemplateOutletContext",
1652
+ "ngTemplateOutlet",
1653
+ "ngTemplateOutletInjector"
1654
+ ]
1655
+ }, {
1656
+ kind: "component",
1657
+ type: OverviewTemplateComponent,
1658
+ selector: "app-overview-template"
1659
+ }]
1660
+ });
1661
+ }
1662
+ };
1663
+ i0.ɵɵngDeclareClassMetadata({
1664
+ minVersion: "12.0.0",
1665
+ version: "22.1.1",
1666
+ ngImport: i0,
1667
+ type: SearchstaxSearchFeedbackWidget,
1668
+ decorators: [{
1669
+ type: Component,
1670
+ args: [{
1671
+ standalone: false,
1672
+ selector: "app-searchstax-search-feedback",
1673
+ template: "<div\n class=\"search-feedback-container\"\n [id]=\"'search-feedback-container' + rand\"\n>\n @if (\n searchFeedbackData &&\n searchFeedbackData?.searchExecuted &&\n !templateOverride &&\n searchFeedbackData?.totalResults\n ) {\n <div class=\"searchstax-feedback-container\">\n <app-overview-template #ref></app-overview-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.overviewTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (\n searchFeedbackData &&\n searchFeedbackData?.searchExecuted &&\n templateOverride &&\n searchFeedbackData?.totalResults\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n"
1674
+ }]
1675
+ }],
1676
+ ctorParameters: () => [
1677
+ { type: StoreServiceService },
1678
+ { type: i0.NgZone },
1679
+ { type: i0.ChangeDetectorRef }
1680
+ ],
1681
+ propDecorators: { templateOverride: [{ type: Input }] }
1682
+ });
1683
+ var PaginationTemplateComponent = class PaginationTemplateComponent {
1684
+ static {
1685
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1686
+ minVersion: "12.0.0",
1687
+ version: "22.1.1",
1688
+ ngImport: i0,
1689
+ type: PaginationTemplateComponent,
1690
+ deps: [],
1691
+ target: i0.ɵɵFactoryTarget.Component
1692
+ });
1693
+ }
1694
+ static {
1695
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1696
+ minVersion: "14.0.0",
1697
+ version: "22.1.1",
1698
+ type: PaginationTemplateComponent,
1699
+ isStandalone: false,
1700
+ selector: "app-pagination-template",
1701
+ viewQueries: [{
1702
+ propertyName: "paginationTemplate",
1703
+ first: true,
1704
+ predicate: ["paginationTemplate"],
1705
+ descendants: true,
1706
+ static: true
1707
+ }],
1708
+ ngImport: i0,
1709
+ template: `
1253
1710
  <ng-template
1254
1711
  #paginationTemplate
1255
1712
  let-paginationData="paginationData"
@@ -1288,14 +1745,22 @@ class PaginationTemplateComponent {
1288
1745
  </div>
1289
1746
  </div>
1290
1747
  </ng-template>
1291
- `, isInline: true }); }
1292
- }
1293
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: PaginationTemplateComponent, decorators: [{
1294
- type: Component,
1295
- args: [{
1296
- standalone: false,
1297
- selector: "app-pagination-template",
1298
- template: `
1748
+ `,
1749
+ isInline: true
1750
+ });
1751
+ }
1752
+ };
1753
+ i0.ɵɵngDeclareClassMetadata({
1754
+ minVersion: "12.0.0",
1755
+ version: "22.1.1",
1756
+ ngImport: i0,
1757
+ type: PaginationTemplateComponent,
1758
+ decorators: [{
1759
+ type: Component,
1760
+ args: [{
1761
+ standalone: false,
1762
+ selector: "app-pagination-template",
1763
+ template: `
1299
1764
  <ng-template
1300
1765
  #paginationTemplate
1301
1766
  let-paginationData="paginationData"
@@ -1334,17 +1799,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
1334
1799
  </div>
1335
1800
  </div>
1336
1801
  </ng-template>
1337
- `,
1338
- }]
1339
- }], propDecorators: { paginationTemplate: [{
1340
- type: ViewChild,
1341
- args: ["paginationTemplate", { static: true }]
1342
- }] } });
1343
-
1344
- // reusable-template.component.ts
1345
- class PaginationInfiniteTemplateComponent {
1346
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: PaginationInfiniteTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1347
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.1", type: PaginationInfiniteTemplateComponent, isStandalone: false, selector: "app-pagination-infinite-template", viewQueries: [{ propertyName: "infiniteScrollTemplate", first: true, predicate: ["infiniteScrollTemplate"], descendants: true, static: true }], ngImport: i0, template: `
1802
+ `
1803
+ }]
1804
+ }],
1805
+ propDecorators: { paginationTemplate: [{
1806
+ type: ViewChild,
1807
+ args: ["paginationTemplate", { static: true }]
1808
+ }] }
1809
+ });
1810
+ var PaginationInfiniteTemplateComponent = class PaginationInfiniteTemplateComponent {
1811
+ static {
1812
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1813
+ minVersion: "12.0.0",
1814
+ version: "22.1.1",
1815
+ ngImport: i0,
1816
+ type: PaginationInfiniteTemplateComponent,
1817
+ deps: [],
1818
+ target: i0.ɵɵFactoryTarget.Component
1819
+ });
1820
+ }
1821
+ static {
1822
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1823
+ minVersion: "14.0.0",
1824
+ version: "22.1.1",
1825
+ type: PaginationInfiniteTemplateComponent,
1826
+ isStandalone: false,
1827
+ selector: "app-pagination-infinite-template",
1828
+ viewQueries: [{
1829
+ propertyName: "infiniteScrollTemplate",
1830
+ first: true,
1831
+ predicate: ["infiniteScrollTemplate"],
1832
+ descendants: true,
1833
+ static: true
1834
+ }],
1835
+ ngImport: i0,
1836
+ template: `
1348
1837
  <ng-template
1349
1838
  #infiniteScrollTemplate
1350
1839
  let-paginationData="paginationData"
@@ -1365,14 +1854,22 @@ class PaginationInfiniteTemplateComponent {
1365
1854
  </div>
1366
1855
  </div>
1367
1856
  </ng-template>
1368
- `, isInline: true }); }
1369
- }
1370
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: PaginationInfiniteTemplateComponent, decorators: [{
1371
- type: Component,
1372
- args: [{
1373
- standalone: false,
1374
- selector: "app-pagination-infinite-template",
1375
- template: `
1857
+ `,
1858
+ isInline: true
1859
+ });
1860
+ }
1861
+ };
1862
+ i0.ɵɵngDeclareClassMetadata({
1863
+ minVersion: "12.0.0",
1864
+ version: "22.1.1",
1865
+ ngImport: i0,
1866
+ type: PaginationInfiniteTemplateComponent,
1867
+ decorators: [{
1868
+ type: Component,
1869
+ args: [{
1870
+ standalone: false,
1871
+ selector: "app-pagination-infinite-template",
1872
+ template: `
1376
1873
  <ng-template
1377
1874
  #infiniteScrollTemplate
1378
1875
  let-paginationData="paginationData"
@@ -1393,79 +1890,158 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
1393
1890
  </div>
1394
1891
  </div>
1395
1892
  </ng-template>
1396
- `,
1397
- }]
1398
- }], propDecorators: { infiniteScrollTemplate: [{
1399
- type: ViewChild,
1400
- args: ["infiniteScrollTemplate", { static: true }]
1401
- }] } });
1402
-
1403
- class SearchstaxSearchPaginationWidget {
1404
- constructor(storeServiceService, ngZone, cdr) {
1405
- this.storeServiceService = storeServiceService;
1406
- this.ngZone = ngZone;
1407
- this.cdr = cdr;
1408
- this.paginationData = null;
1409
- this.rand = Math.random();
1410
- this.context = this;
1411
- this.paginationAdded = false;
1412
- }
1413
- ngOnInit() {
1414
- if (this.storeServiceService.searchstax) {
1415
- this.storeServiceService.whenDataLayerReady(() => {
1416
- this.attachObservables();
1417
- });
1418
- setTimeout(() => {
1419
- this.addWidget();
1420
- }, 0);
1421
- }
1422
- else {
1423
- throw Error("Searchstax instance needs to be passed via props");
1424
- }
1425
- }
1426
- nextPage(event, context) {
1427
- event.stopImmediatePropagation();
1428
- if (!context.paginationData?.isLastPage) {
1429
- context.storeServiceService.searchstax.searchPaginationWidget?.nextPage(event);
1430
- }
1431
- }
1432
- previousPage(event, context) {
1433
- event.stopImmediatePropagation();
1434
- if (!context.paginationData?.isFirstPage) {
1435
- context.storeServiceService.searchstax.searchPaginationWidget?.previousPage(event);
1436
- }
1437
- }
1438
- addWidget() {
1439
- if (!this.paginationAdded &&
1440
- this.storeServiceService.searchstax.routerHelper) {
1441
- this.paginationAdded = true;
1442
- this.storeServiceService.searchstax.addPaginationWidget("searchstax-pagination-container" + this.rand, {});
1443
- }
1444
- }
1445
- attachObservables() {
1446
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchObject, (_pagination) => {
1447
- this.addWidget();
1448
- }, this.cdr);
1449
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$paginationData, (pagination) => {
1450
- this.paginationData = pagination;
1451
- }, this.cdr);
1452
- }
1453
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxSearchPaginationWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
1454
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: SearchstaxSearchPaginationWidget, isStandalone: false, selector: "app-searchstax-search-pagination", inputs: { templateOverride: "templateOverride", infiniteScrollTemplateOverride: "infiniteScrollTemplateOverride" }, ngImport: i0, template: "<div [id]=\"'searchstax-pagination-container' + rand\">\n @if (\n paginationData?.totalResults &&\n !templateOverride &&\n !paginationData?.isInfiniteScroll\n ) {\n <ng-container>\n <app-pagination-template #paginationTpl></app-pagination-template>\n <ng-container\n [ngTemplateOutlet]=\"paginationTpl.paginationTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n paginationData?.totalResults &&\n templateOverride &&\n !paginationData?.isInfiniteScroll\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (\n paginationData?.totalResults &&\n !infiniteScrollTemplateOverride &&\n paginationData?.totalResults !== 0 &&\n !paginationData?.isLastPage &&\n paginationData?.isInfiniteScroll\n ) {\n <ng-container>\n <app-pagination-infinite-template\n #infiniteScrollTpl\n ></app-pagination-infinite-template>\n <ng-container\n [ngTemplateOutlet]=\"infiniteScrollTpl.infiniteScrollTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n paginationData?.totalResults &&\n infiniteScrollTemplateOverride &&\n paginationData?.totalResults !== 0 &&\n !paginationData?.isLastPage &&\n paginationData?.isInfiniteScroll\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"infiniteScrollTemplateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PaginationTemplateComponent, selector: "app-pagination-template" }, { kind: "component", type: PaginationInfiniteTemplateComponent, selector: "app-pagination-infinite-template" }] }); }
1455
- }
1456
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxSearchPaginationWidget, decorators: [{
1457
- type: Component,
1458
- args: [{ standalone: false, selector: "app-searchstax-search-pagination", template: "<div [id]=\"'searchstax-pagination-container' + rand\">\n @if (\n paginationData?.totalResults &&\n !templateOverride &&\n !paginationData?.isInfiniteScroll\n ) {\n <ng-container>\n <app-pagination-template #paginationTpl></app-pagination-template>\n <ng-container\n [ngTemplateOutlet]=\"paginationTpl.paginationTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n paginationData?.totalResults &&\n templateOverride &&\n !paginationData?.isInfiniteScroll\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (\n paginationData?.totalResults &&\n !infiniteScrollTemplateOverride &&\n paginationData?.totalResults !== 0 &&\n !paginationData?.isLastPage &&\n paginationData?.isInfiniteScroll\n ) {\n <ng-container>\n <app-pagination-infinite-template\n #infiniteScrollTpl\n ></app-pagination-infinite-template>\n <ng-container\n [ngTemplateOutlet]=\"infiniteScrollTpl.infiniteScrollTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n paginationData?.totalResults &&\n infiniteScrollTemplateOverride &&\n paginationData?.totalResults !== 0 &&\n !paginationData?.isLastPage &&\n paginationData?.isInfiniteScroll\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"infiniteScrollTemplateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n" }]
1459
- }], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { templateOverride: [{
1460
- type: Input
1461
- }], infiniteScrollTemplateOverride: [{
1462
- type: Input
1463
- }] } });
1464
-
1465
- // reusable-template.component.ts
1466
- class FacetDesktopTemplateComponent {
1467
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: FacetDesktopTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1468
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: FacetDesktopTemplateComponent, isStandalone: false, selector: "app-facet-desktop-template", viewQueries: [{ propertyName: "templateOverrideDesktop", first: true, predicate: ["templateOverrideDesktop"], descendants: true, static: true }], ngImport: i0, template: `
1893
+ `
1894
+ }]
1895
+ }],
1896
+ propDecorators: { infiniteScrollTemplate: [{
1897
+ type: ViewChild,
1898
+ args: ["infiniteScrollTemplate", { static: true }]
1899
+ }] }
1900
+ });
1901
+ var SearchstaxSearchPaginationWidget = class SearchstaxSearchPaginationWidget {
1902
+ constructor(storeServiceService, ngZone, cdr) {
1903
+ this.storeServiceService = storeServiceService;
1904
+ this.ngZone = ngZone;
1905
+ this.cdr = cdr;
1906
+ this.paginationData = null;
1907
+ this.rand = Math.random();
1908
+ this.context = this;
1909
+ this.paginationAdded = false;
1910
+ }
1911
+ ngOnInit() {
1912
+ if (this.storeServiceService.searchstax) {
1913
+ this.storeServiceService.whenDataLayerReady(() => {
1914
+ this.attachObservables();
1915
+ });
1916
+ setTimeout(() => {
1917
+ this.addWidget();
1918
+ }, 0);
1919
+ } else throw Error("Searchstax instance needs to be passed via props");
1920
+ }
1921
+ nextPage(event, context) {
1922
+ event.stopImmediatePropagation();
1923
+ if (!context.paginationData?.isLastPage) context.storeServiceService.searchstax.searchPaginationWidget?.nextPage(event);
1924
+ }
1925
+ previousPage(event, context) {
1926
+ event.stopImmediatePropagation();
1927
+ if (!context.paginationData?.isFirstPage) context.storeServiceService.searchstax.searchPaginationWidget?.previousPage(event);
1928
+ }
1929
+ addWidget() {
1930
+ if (!this.paginationAdded && this.storeServiceService.searchstax.routerHelper) {
1931
+ this.paginationAdded = true;
1932
+ this.storeServiceService.searchstax.addPaginationWidget("searchstax-pagination-container" + this.rand, {});
1933
+ }
1934
+ }
1935
+ attachObservables() {
1936
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchObject, (_pagination) => {
1937
+ this.addWidget();
1938
+ }, this.cdr);
1939
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$paginationData, (pagination) => {
1940
+ this.paginationData = pagination;
1941
+ }, this.cdr);
1942
+ }
1943
+ static {
1944
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1945
+ minVersion: "12.0.0",
1946
+ version: "22.1.1",
1947
+ ngImport: i0,
1948
+ type: SearchstaxSearchPaginationWidget,
1949
+ deps: [
1950
+ { token: StoreServiceService },
1951
+ { token: i0.NgZone },
1952
+ { token: i0.ChangeDetectorRef }
1953
+ ],
1954
+ target: i0.ɵɵFactoryTarget.Component
1955
+ });
1956
+ }
1957
+ static {
1958
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
1959
+ minVersion: "17.0.0",
1960
+ version: "22.1.1",
1961
+ type: SearchstaxSearchPaginationWidget,
1962
+ isStandalone: false,
1963
+ selector: "app-searchstax-search-pagination",
1964
+ inputs: {
1965
+ templateOverride: "templateOverride",
1966
+ infiniteScrollTemplateOverride: "infiniteScrollTemplateOverride"
1967
+ },
1968
+ ngImport: i0,
1969
+ template: "<div [id]=\"'searchstax-pagination-container' + rand\">\n @if (\n paginationData?.totalResults &&\n !templateOverride &&\n !paginationData?.isInfiniteScroll\n ) {\n <ng-container>\n <app-pagination-template #paginationTpl></app-pagination-template>\n <ng-container\n [ngTemplateOutlet]=\"paginationTpl.paginationTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n paginationData?.totalResults &&\n templateOverride &&\n !paginationData?.isInfiniteScroll\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (\n paginationData?.totalResults &&\n !infiniteScrollTemplateOverride &&\n paginationData?.totalResults !== 0 &&\n !paginationData?.isLastPage &&\n paginationData?.isInfiniteScroll\n ) {\n <ng-container>\n <app-pagination-infinite-template\n #infiniteScrollTpl\n ></app-pagination-infinite-template>\n <ng-container\n [ngTemplateOutlet]=\"infiniteScrollTpl.infiniteScrollTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n paginationData?.totalResults &&\n infiniteScrollTemplateOverride &&\n paginationData?.totalResults !== 0 &&\n !paginationData?.isLastPage &&\n paginationData?.isInfiniteScroll\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"infiniteScrollTemplateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n",
1970
+ dependencies: [
1971
+ {
1972
+ kind: "directive",
1973
+ type: i1.NgTemplateOutlet,
1974
+ selector: "[ngTemplateOutlet]",
1975
+ inputs: [
1976
+ "ngTemplateOutletContext",
1977
+ "ngTemplateOutlet",
1978
+ "ngTemplateOutletInjector"
1979
+ ]
1980
+ },
1981
+ {
1982
+ kind: "component",
1983
+ type: PaginationTemplateComponent,
1984
+ selector: "app-pagination-template"
1985
+ },
1986
+ {
1987
+ kind: "component",
1988
+ type: PaginationInfiniteTemplateComponent,
1989
+ selector: "app-pagination-infinite-template"
1990
+ }
1991
+ ]
1992
+ });
1993
+ }
1994
+ };
1995
+ i0.ɵɵngDeclareClassMetadata({
1996
+ minVersion: "12.0.0",
1997
+ version: "22.1.1",
1998
+ ngImport: i0,
1999
+ type: SearchstaxSearchPaginationWidget,
2000
+ decorators: [{
2001
+ type: Component,
2002
+ args: [{
2003
+ standalone: false,
2004
+ selector: "app-searchstax-search-pagination",
2005
+ template: "<div [id]=\"'searchstax-pagination-container' + rand\">\n @if (\n paginationData?.totalResults &&\n !templateOverride &&\n !paginationData?.isInfiniteScroll\n ) {\n <ng-container>\n <app-pagination-template #paginationTpl></app-pagination-template>\n <ng-container\n [ngTemplateOutlet]=\"paginationTpl.paginationTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n paginationData?.totalResults &&\n templateOverride &&\n !paginationData?.isInfiniteScroll\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (\n paginationData?.totalResults &&\n !infiniteScrollTemplateOverride &&\n paginationData?.totalResults !== 0 &&\n !paginationData?.isLastPage &&\n paginationData?.isInfiniteScroll\n ) {\n <ng-container>\n <app-pagination-infinite-template\n #infiniteScrollTpl\n ></app-pagination-infinite-template>\n <ng-container\n [ngTemplateOutlet]=\"infiniteScrollTpl.infiniteScrollTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n paginationData?.totalResults &&\n infiniteScrollTemplateOverride &&\n paginationData?.totalResults !== 0 &&\n !paginationData?.isLastPage &&\n paginationData?.isInfiniteScroll\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"infiniteScrollTemplateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n"
2006
+ }]
2007
+ }],
2008
+ ctorParameters: () => [
2009
+ { type: StoreServiceService },
2010
+ { type: i0.NgZone },
2011
+ { type: i0.ChangeDetectorRef }
2012
+ ],
2013
+ propDecorators: {
2014
+ templateOverride: [{ type: Input }],
2015
+ infiniteScrollTemplateOverride: [{ type: Input }]
2016
+ }
2017
+ });
2018
+ var FacetDesktopTemplateComponent = class FacetDesktopTemplateComponent {
2019
+ static {
2020
+ this.ɵfac = i0.ɵɵngDeclareFactory({
2021
+ minVersion: "12.0.0",
2022
+ version: "22.1.1",
2023
+ ngImport: i0,
2024
+ type: FacetDesktopTemplateComponent,
2025
+ deps: [],
2026
+ target: i0.ɵɵFactoryTarget.Component
2027
+ });
2028
+ }
2029
+ static {
2030
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
2031
+ minVersion: "17.0.0",
2032
+ version: "22.1.1",
2033
+ type: FacetDesktopTemplateComponent,
2034
+ isStandalone: false,
2035
+ selector: "app-facet-desktop-template",
2036
+ viewQueries: [{
2037
+ propertyName: "templateOverrideDesktop",
2038
+ first: true,
2039
+ predicate: ["templateOverrideDesktop"],
2040
+ descendants: true,
2041
+ static: true
2042
+ }],
2043
+ ngImport: i0,
2044
+ template: `
1469
2045
  <ng-template
1470
2046
  #templateOverrideDesktop
1471
2047
  let-facetsTemplateDataDesktop="facetsTemplateDataDesktop"
@@ -1573,14 +2149,22 @@ class FacetDesktopTemplateComponent {
1573
2149
  }
1574
2150
  </div>
1575
2151
  </ng-template>
1576
- `, isInline: true }); }
1577
- }
1578
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: FacetDesktopTemplateComponent, decorators: [{
1579
- type: Component,
1580
- args: [{
1581
- standalone: false,
1582
- selector: "app-facet-desktop-template",
1583
- template: `
2152
+ `,
2153
+ isInline: true
2154
+ });
2155
+ }
2156
+ };
2157
+ i0.ɵɵngDeclareClassMetadata({
2158
+ minVersion: "12.0.0",
2159
+ version: "22.1.1",
2160
+ ngImport: i0,
2161
+ type: FacetDesktopTemplateComponent,
2162
+ decorators: [{
2163
+ type: Component,
2164
+ args: [{
2165
+ standalone: false,
2166
+ selector: "app-facet-desktop-template",
2167
+ template: `
1584
2168
  <ng-template
1585
2169
  #templateOverrideDesktop
1586
2170
  let-facetsTemplateDataDesktop="facetsTemplateDataDesktop"
@@ -1688,17 +2272,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
1688
2272
  }
1689
2273
  </div>
1690
2274
  </ng-template>
1691
- `,
1692
- }]
1693
- }], propDecorators: { templateOverrideDesktop: [{
1694
- type: ViewChild,
1695
- args: ["templateOverrideDesktop", { static: true }]
1696
- }] } });
1697
-
1698
- // reusable-template.component.ts
1699
- class FacetMobileTemplateComponent {
1700
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: FacetMobileTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1701
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: FacetMobileTemplateComponent, isStandalone: false, selector: "app-facet-mobile-template", viewQueries: [{ propertyName: "templateOverrideMobile", first: true, predicate: ["templateOverrideMobile"], descendants: true, static: true }], ngImport: i0, template: `
2275
+ `
2276
+ }]
2277
+ }],
2278
+ propDecorators: { templateOverrideDesktop: [{
2279
+ type: ViewChild,
2280
+ args: ["templateOverrideDesktop", { static: true }]
2281
+ }] }
2282
+ });
2283
+ var FacetMobileTemplateComponent = class FacetMobileTemplateComponent {
2284
+ static {
2285
+ this.ɵfac = i0.ɵɵngDeclareFactory({
2286
+ minVersion: "12.0.0",
2287
+ version: "22.1.1",
2288
+ ngImport: i0,
2289
+ type: FacetMobileTemplateComponent,
2290
+ deps: [],
2291
+ target: i0.ɵɵFactoryTarget.Component
2292
+ });
2293
+ }
2294
+ static {
2295
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
2296
+ minVersion: "17.0.0",
2297
+ version: "22.1.1",
2298
+ type: FacetMobileTemplateComponent,
2299
+ isStandalone: false,
2300
+ selector: "app-facet-mobile-template",
2301
+ viewQueries: [{
2302
+ propertyName: "templateOverrideMobile",
2303
+ first: true,
2304
+ predicate: ["templateOverrideMobile"],
2305
+ descendants: true,
2306
+ static: true
2307
+ }],
2308
+ ngImport: i0,
2309
+ template: `
1702
2310
  <ng-template
1703
2311
  #templateOverrideMobile
1704
2312
  let-isNotDeactivated="isNotDeactivated"
@@ -1871,14 +2479,22 @@ class FacetMobileTemplateComponent {
1871
2479
  </div>
1872
2480
  </div>
1873
2481
  </ng-template>
1874
- `, isInline: true }); }
1875
- }
1876
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: FacetMobileTemplateComponent, decorators: [{
1877
- type: Component,
1878
- args: [{
1879
- standalone: false,
1880
- selector: "app-facet-mobile-template",
1881
- template: `
2482
+ `,
2483
+ isInline: true
2484
+ });
2485
+ }
2486
+ };
2487
+ i0.ɵɵngDeclareClassMetadata({
2488
+ minVersion: "12.0.0",
2489
+ version: "22.1.1",
2490
+ ngImport: i0,
2491
+ type: FacetMobileTemplateComponent,
2492
+ decorators: [{
2493
+ type: Component,
2494
+ args: [{
2495
+ standalone: false,
2496
+ selector: "app-facet-mobile-template",
2497
+ template: `
1882
2498
  <ng-template
1883
2499
  #templateOverrideMobile
1884
2500
  let-isNotDeactivated="isNotDeactivated"
@@ -2051,134 +2667,206 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
2051
2667
  </div>
2052
2668
  </div>
2053
2669
  </ng-template>
2054
- `,
2055
- }]
2056
- }], propDecorators: { templateOverrideMobile: [{
2057
- type: ViewChild,
2058
- args: ["templateOverrideMobile", { static: true }]
2059
- }] } });
2060
-
2061
- class SearchstaxSearchFacetsWidget {
2062
- // @ViewChildren("facetContainers") facetContainers: QueryList<ElementRef>;
2063
- constructor(storeServiceService, ngZone, cdr) {
2064
- this.storeServiceService = storeServiceService;
2065
- this.ngZone = ngZone;
2066
- this.cdr = cdr;
2067
- this.facetsTemplateDataDesktop = null;
2068
- this.facetsTemplateDataMobile = null;
2069
- this.context = this;
2070
- this.selectedFacetsCheckboxes = [];
2071
- this.selectedFacetsRange = [];
2072
- this.rand = Math.random();
2073
- }
2074
- ngOnInit() {
2075
- if (this.storeServiceService.searchstax) {
2076
- this.storeServiceService.whenDataLayerReady(() => {
2077
- this.attachObservables();
2078
- });
2079
- setTimeout(() => {
2080
- this.addWidget();
2081
- }, 0);
2082
- }
2083
- else {
2084
- throw Error("Searchstax instance needs to be passed via props");
2085
- }
2086
- }
2087
- addWidget() {
2088
- this.storeServiceService.searchstax.addFacetsWidget('searchstax-facets-container' + this.rand, {
2089
- facetingType: this.facetingType,
2090
- specificFacets: this.specificFacets,
2091
- itemsPerPageDesktop: this.itemsPerPageDesktop,
2092
- itemsPerPageMobile: this.itemsPerPageMobile,
2093
- hooks: {
2094
- beforeFacetsRender: this.beforeFacetsRender
2095
- }
2096
- });
2097
- }
2098
- attachObservables() {
2099
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$facetsTemplateData, (data) => {
2100
- if (data?.isMobile) {
2101
- this.facetsTemplateDataMobile = data;
2102
- }
2103
- else {
2104
- this.facetsTemplateDataDesktop = data;
2105
- }
2106
- }, this.cdr);
2107
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$selectedFacetsTemplateData, (data) => {
2108
- const da = data ?? [];
2109
- this.selectedFacetsCheckboxes = da.filter((d) => d.type === "checkbox");
2110
- }, this.cdr);
2111
- }
2112
- unselectFacet(facet, context) {
2113
- context.storeServiceService.searchstax.searchFacetsWidget?.[0].unselectFacet(facet);
2114
- }
2115
- unselectAll(context) {
2116
- context.storeServiceService.searchstax.searchFacetsWidget?.[0].removeSelectedFacets();
2117
- }
2118
- isNotDeactivated(name, context) {
2119
- return !context.storeServiceService.searchstax.searchFacetsWidget?.[0].deactivatedFacets[name];
2120
- }
2121
- toggleFacetGroup(name, context) {
2122
- if (context.storeServiceService.searchstax.searchFacetsWidget)
2123
- if (context.isNotDeactivated(name, context)) {
2124
- context.storeServiceService.searchstax.searchFacetsWidget[0].deactivatedFacets[name] = true;
2125
- }
2126
- else {
2127
- context.storeServiceService.searchstax.searchFacetsWidget[0].deactivatedFacets[name] = false;
2128
- }
2129
- }
2130
- isChecked(facetValue, context) {
2131
- return context.storeServiceService.searchstax.searchFacetsWidget?.[0].isChecked(facetValue);
2132
- }
2133
- selectFacet(el, event, data, isInput, context) {
2134
- const wrapperDiv = document.createElement('div');
2135
- wrapperDiv.innerHTML = el.outerHTML;
2136
- context.storeServiceService.searchstax.searchFacetsWidget?.[0].onFacetSelect(event, data, el, isInput);
2137
- }
2138
- showMoreLessDesktop(e, data, context) {
2139
- context.storeServiceService.searchstax.searchFacetsWidget?.[0].onShowMoreLessClick(e, data, false);
2140
- }
2141
- showMoreLessMobile(e, data, context) {
2142
- context.storeServiceService.searchstax.searchFacetsWidget?.[0].onShowMoreLessClick(e, data, true);
2143
- }
2144
- openOverlay(context) {
2145
- context.storeServiceService.searchstax.searchFacetsWidget?.[0].openOverlay();
2146
- }
2147
- closeOverlay(context) {
2148
- context.storeServiceService.searchstax.searchFacetsWidget?.[0].closeOverlay();
2149
- }
2150
- facetValues(facet) {
2151
- return facet.values;
2152
- }
2153
- facetMobileData(facet) {
2154
- return facet;
2155
- }
2156
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxSearchFacetsWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
2157
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: SearchstaxSearchFacetsWidget, isStandalone: false, selector: "app-searchstax-search-facets", inputs: { templateOverrideMobile: "templateOverrideMobile", templateOverrideDesktop: "templateOverrideDesktop", facetingType: "facetingType", itemsPerPageDesktop: "itemsPerPageDesktop", itemsPerPageMobile: "itemsPerPageMobile", specificFacets: "specificFacets", beforeFacetsRender: "beforeFacetsRender" }, ngImport: i0, template: "<div [id]=\"'searchstax-facets-container' + rand\">\n @if (\n facetsTemplateDataDesktop?.hasResultsOrExternalPromotions &&\n !templateOverrideDesktop\n ) {\n <ng-container>\n <app-facet-desktop-template #facetDesktopTpl></app-facet-desktop-template>\n <ng-container\n [ngTemplateOutlet]=\"facetDesktopTpl.templateOverrideDesktop\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n facetsTemplateDataDesktop?.hasResultsOrExternalPromotions &&\n templateOverrideDesktop\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverrideDesktop\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (\n facetsTemplateDataMobile?.hasResultsOrExternalPromotions &&\n !templateOverrideMobile\n ) {\n <ng-container>\n <app-facet-mobile-template #facetMobileTpl></app-facet-mobile-template>\n <ng-container\n [ngTemplateOutlet]=\"facetMobileTpl.templateOverrideMobile\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n facetsTemplateDataMobile?.hasResultsOrExternalPromotions &&\n templateOverrideMobile\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverrideMobile\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: i2.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" }] }); }
2158
- }
2159
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxSearchFacetsWidget, decorators: [{
2160
- type: Component,
2161
- args: [{ standalone: false, selector: "app-searchstax-search-facets", template: "<div [id]=\"'searchstax-facets-container' + rand\">\n @if (\n facetsTemplateDataDesktop?.hasResultsOrExternalPromotions &&\n !templateOverrideDesktop\n ) {\n <ng-container>\n <app-facet-desktop-template #facetDesktopTpl></app-facet-desktop-template>\n <ng-container\n [ngTemplateOutlet]=\"facetDesktopTpl.templateOverrideDesktop\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n facetsTemplateDataDesktop?.hasResultsOrExternalPromotions &&\n templateOverrideDesktop\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverrideDesktop\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (\n facetsTemplateDataMobile?.hasResultsOrExternalPromotions &&\n !templateOverrideMobile\n ) {\n <ng-container>\n <app-facet-mobile-template #facetMobileTpl></app-facet-mobile-template>\n <ng-container\n [ngTemplateOutlet]=\"facetMobileTpl.templateOverrideMobile\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n facetsTemplateDataMobile?.hasResultsOrExternalPromotions &&\n templateOverrideMobile\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverrideMobile\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n" }]
2162
- }], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { templateOverrideMobile: [{
2163
- type: Input
2164
- }], templateOverrideDesktop: [{
2165
- type: Input
2166
- }], facetingType: [{
2167
- type: Input
2168
- }], itemsPerPageDesktop: [{
2169
- type: Input
2170
- }], itemsPerPageMobile: [{
2171
- type: Input
2172
- }], specificFacets: [{
2173
- type: Input
2174
- }], beforeFacetsRender: [{
2175
- type: Input
2176
- }] } });
2177
-
2178
- // reusable-template.component.ts
2179
- class SortingTemplateComponent {
2180
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SortingTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2181
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: SortingTemplateComponent, isStandalone: false, selector: "app-sorting-template", viewQueries: [{ propertyName: "sortingTemplate", first: true, predicate: ["sortingTemplateOverride"], descendants: true, static: true }], ngImport: i0, template: `
2670
+ `
2671
+ }]
2672
+ }],
2673
+ propDecorators: { templateOverrideMobile: [{
2674
+ type: ViewChild,
2675
+ args: ["templateOverrideMobile", { static: true }]
2676
+ }] }
2677
+ });
2678
+ var SearchstaxSearchFacetsWidget = class SearchstaxSearchFacetsWidget {
2679
+ constructor(storeServiceService, ngZone, cdr) {
2680
+ this.storeServiceService = storeServiceService;
2681
+ this.ngZone = ngZone;
2682
+ this.cdr = cdr;
2683
+ this.facetsTemplateDataDesktop = null;
2684
+ this.facetsTemplateDataMobile = null;
2685
+ this.context = this;
2686
+ this.selectedFacetsCheckboxes = [];
2687
+ this.selectedFacetsRange = [];
2688
+ this.rand = Math.random();
2689
+ }
2690
+ ngOnInit() {
2691
+ if (this.storeServiceService.searchstax) {
2692
+ this.storeServiceService.whenDataLayerReady(() => {
2693
+ this.attachObservables();
2694
+ });
2695
+ setTimeout(() => {
2696
+ this.addWidget();
2697
+ }, 0);
2698
+ } else throw Error("Searchstax instance needs to be passed via props");
2699
+ }
2700
+ addWidget() {
2701
+ this.storeServiceService.searchstax.addFacetsWidget("searchstax-facets-container" + this.rand, {
2702
+ facetingType: this.facetingType,
2703
+ specificFacets: this.specificFacets,
2704
+ itemsPerPageDesktop: this.itemsPerPageDesktop,
2705
+ itemsPerPageMobile: this.itemsPerPageMobile,
2706
+ hooks: { beforeFacetsRender: this.beforeFacetsRender }
2707
+ });
2708
+ }
2709
+ attachObservables() {
2710
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$facetsTemplateData, (data) => {
2711
+ if (data?.isMobile) this.facetsTemplateDataMobile = data;
2712
+ else this.facetsTemplateDataDesktop = data;
2713
+ }, this.cdr);
2714
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$selectedFacetsTemplateData, (data) => {
2715
+ const da = data ?? [];
2716
+ this.selectedFacetsCheckboxes = da.filter((d) => d.type === "checkbox");
2717
+ }, this.cdr);
2718
+ }
2719
+ unselectFacet(facet, context) {
2720
+ context.storeServiceService.searchstax.searchFacetsWidget?.[0].unselectFacet(facet);
2721
+ }
2722
+ unselectAll(context) {
2723
+ context.storeServiceService.searchstax.searchFacetsWidget?.[0].removeSelectedFacets();
2724
+ }
2725
+ isNotDeactivated(name, context) {
2726
+ return !context.storeServiceService.searchstax.searchFacetsWidget?.[0].deactivatedFacets[name];
2727
+ }
2728
+ toggleFacetGroup(name, context) {
2729
+ if (context.storeServiceService.searchstax.searchFacetsWidget) if (context.isNotDeactivated(name, context)) context.storeServiceService.searchstax.searchFacetsWidget[0].deactivatedFacets[name] = true;
2730
+ else context.storeServiceService.searchstax.searchFacetsWidget[0].deactivatedFacets[name] = false;
2731
+ }
2732
+ isChecked(facetValue, context) {
2733
+ return context.storeServiceService.searchstax.searchFacetsWidget?.[0].isChecked(facetValue);
2734
+ }
2735
+ selectFacet(el, event, data, isInput, context) {
2736
+ const wrapperDiv = document.createElement("div");
2737
+ wrapperDiv.innerHTML = el.outerHTML;
2738
+ context.storeServiceService.searchstax.searchFacetsWidget?.[0].onFacetSelect(event, data, el, isInput);
2739
+ }
2740
+ showMoreLessDesktop(e, data, context) {
2741
+ context.storeServiceService.searchstax.searchFacetsWidget?.[0].onShowMoreLessClick(e, data, false);
2742
+ }
2743
+ showMoreLessMobile(e, data, context) {
2744
+ context.storeServiceService.searchstax.searchFacetsWidget?.[0].onShowMoreLessClick(e, data, true);
2745
+ }
2746
+ openOverlay(context) {
2747
+ context.storeServiceService.searchstax.searchFacetsWidget?.[0].openOverlay();
2748
+ }
2749
+ closeOverlay(context) {
2750
+ context.storeServiceService.searchstax.searchFacetsWidget?.[0].closeOverlay();
2751
+ }
2752
+ facetValues(facet) {
2753
+ return facet.values;
2754
+ }
2755
+ facetMobileData(facet) {
2756
+ return facet;
2757
+ }
2758
+ static {
2759
+ this.ɵfac = i0.ɵɵngDeclareFactory({
2760
+ minVersion: "12.0.0",
2761
+ version: "22.1.1",
2762
+ ngImport: i0,
2763
+ type: SearchstaxSearchFacetsWidget,
2764
+ deps: [
2765
+ { token: StoreServiceService },
2766
+ { token: i0.NgZone },
2767
+ { token: i0.ChangeDetectorRef }
2768
+ ],
2769
+ target: i0.ɵɵFactoryTarget.Component
2770
+ });
2771
+ }
2772
+ static {
2773
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
2774
+ minVersion: "17.0.0",
2775
+ version: "22.1.1",
2776
+ type: SearchstaxSearchFacetsWidget,
2777
+ isStandalone: false,
2778
+ selector: "app-searchstax-search-facets",
2779
+ inputs: {
2780
+ templateOverrideMobile: "templateOverrideMobile",
2781
+ templateOverrideDesktop: "templateOverrideDesktop",
2782
+ facetingType: "facetingType",
2783
+ itemsPerPageDesktop: "itemsPerPageDesktop",
2784
+ itemsPerPageMobile: "itemsPerPageMobile",
2785
+ specificFacets: "specificFacets",
2786
+ beforeFacetsRender: "beforeFacetsRender"
2787
+ },
2788
+ ngImport: i0,
2789
+ template: "<div [id]=\"'searchstax-facets-container' + rand\">\n @if (\n facetsTemplateDataDesktop?.hasResultsOrExternalPromotions &&\n !templateOverrideDesktop\n ) {\n <ng-container>\n <app-facet-desktop-template #facetDesktopTpl></app-facet-desktop-template>\n <ng-container\n [ngTemplateOutlet]=\"facetDesktopTpl.templateOverrideDesktop\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n facetsTemplateDataDesktop?.hasResultsOrExternalPromotions &&\n templateOverrideDesktop\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverrideDesktop\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (\n facetsTemplateDataMobile?.hasResultsOrExternalPromotions &&\n !templateOverrideMobile\n ) {\n <ng-container>\n <app-facet-mobile-template #facetMobileTpl></app-facet-mobile-template>\n <ng-container\n [ngTemplateOutlet]=\"facetMobileTpl.templateOverrideMobile\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n facetsTemplateDataMobile?.hasResultsOrExternalPromotions &&\n templateOverrideMobile\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverrideMobile\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n",
2790
+ dependencies: [
2791
+ {
2792
+ kind: "directive",
2793
+ type: i1.NgTemplateOutlet,
2794
+ selector: "[ngTemplateOutlet]",
2795
+ inputs: [
2796
+ "ngTemplateOutletContext",
2797
+ "ngTemplateOutlet",
2798
+ "ngTemplateOutletInjector"
2799
+ ]
2800
+ },
2801
+ {
2802
+ kind: "component",
2803
+ type: FacetDesktopTemplateComponent,
2804
+ selector: "app-facet-desktop-template"
2805
+ },
2806
+ {
2807
+ kind: "component",
2808
+ type: FacetMobileTemplateComponent,
2809
+ selector: "app-facet-mobile-template"
2810
+ }
2811
+ ]
2812
+ });
2813
+ }
2814
+ };
2815
+ i0.ɵɵngDeclareClassMetadata({
2816
+ minVersion: "12.0.0",
2817
+ version: "22.1.1",
2818
+ ngImport: i0,
2819
+ type: SearchstaxSearchFacetsWidget,
2820
+ decorators: [{
2821
+ type: Component,
2822
+ args: [{
2823
+ standalone: false,
2824
+ selector: "app-searchstax-search-facets",
2825
+ template: "<div [id]=\"'searchstax-facets-container' + rand\">\n @if (\n facetsTemplateDataDesktop?.hasResultsOrExternalPromotions &&\n !templateOverrideDesktop\n ) {\n <ng-container>\n <app-facet-desktop-template #facetDesktopTpl></app-facet-desktop-template>\n <ng-container\n [ngTemplateOutlet]=\"facetDesktopTpl.templateOverrideDesktop\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n facetsTemplateDataDesktop?.hasResultsOrExternalPromotions &&\n templateOverrideDesktop\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverrideDesktop\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n\n @if (\n facetsTemplateDataMobile?.hasResultsOrExternalPromotions &&\n !templateOverrideMobile\n ) {\n <ng-container>\n <app-facet-mobile-template #facetMobileTpl></app-facet-mobile-template>\n <ng-container\n [ngTemplateOutlet]=\"facetMobileTpl.templateOverrideMobile\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n facetsTemplateDataMobile?.hasResultsOrExternalPromotions &&\n templateOverrideMobile\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverrideMobile\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n"
2826
+ }]
2827
+ }],
2828
+ ctorParameters: () => [
2829
+ { type: StoreServiceService },
2830
+ { type: i0.NgZone },
2831
+ { type: i0.ChangeDetectorRef }
2832
+ ],
2833
+ propDecorators: {
2834
+ templateOverrideMobile: [{ type: Input }],
2835
+ templateOverrideDesktop: [{ type: Input }],
2836
+ facetingType: [{ type: Input }],
2837
+ itemsPerPageDesktop: [{ type: Input }],
2838
+ itemsPerPageMobile: [{ type: Input }],
2839
+ specificFacets: [{ type: Input }],
2840
+ beforeFacetsRender: [{ type: Input }]
2841
+ }
2842
+ });
2843
+ var SortingTemplateComponent = class SortingTemplateComponent {
2844
+ static {
2845
+ this.ɵfac = i0.ɵɵngDeclareFactory({
2846
+ minVersion: "12.0.0",
2847
+ version: "22.1.1",
2848
+ ngImport: i0,
2849
+ type: SortingTemplateComponent,
2850
+ deps: [],
2851
+ target: i0.ɵɵFactoryTarget.Component
2852
+ });
2853
+ }
2854
+ static {
2855
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
2856
+ minVersion: "17.0.0",
2857
+ version: "22.1.1",
2858
+ type: SortingTemplateComponent,
2859
+ isStandalone: false,
2860
+ selector: "app-sorting-template",
2861
+ viewQueries: [{
2862
+ propertyName: "sortingTemplate",
2863
+ first: true,
2864
+ predicate: ["sortingTemplateOverride"],
2865
+ descendants: true,
2866
+ static: true
2867
+ }],
2868
+ ngImport: i0,
2869
+ template: `
2182
2870
  <ng-template
2183
2871
  #sortingTemplateOverride
2184
2872
  let-selectedSorting="selectedSorting"
@@ -2208,14 +2896,60 @@ class SortingTemplateComponent {
2208
2896
  </select>
2209
2897
  </div>
2210
2898
  </ng-template>
2211
- `, isInline: true, dependencies: [{ kind: "directive", type: i2$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.SelectControlValueAccessor, selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
2212
- }
2213
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SortingTemplateComponent, decorators: [{
2214
- type: Component,
2215
- args: [{
2216
- standalone: false,
2217
- selector: "app-sorting-template",
2218
- template: `
2899
+ `,
2900
+ isInline: true,
2901
+ dependencies: [
2902
+ {
2903
+ kind: "directive",
2904
+ type: i2.NgSelectOption,
2905
+ selector: "option",
2906
+ inputs: ["ngValue", "value"]
2907
+ },
2908
+ {
2909
+ kind: "directive",
2910
+ type: i2.ɵNgSelectMultipleOption,
2911
+ selector: "option",
2912
+ inputs: ["ngValue", "value"]
2913
+ },
2914
+ {
2915
+ kind: "directive",
2916
+ type: i2.SelectControlValueAccessor,
2917
+ selector: "select:not([multiple]):not([ngNoCva])[formControlName],select:not([multiple]):not([ngNoCva])[formControl],select:not([multiple]):not([ngNoCva])[ngModel]",
2918
+ inputs: ["compareWith"]
2919
+ },
2920
+ {
2921
+ kind: "directive",
2922
+ type: i2.NgControlStatus,
2923
+ selector: "[formControlName],[ngModel],[formControl]"
2924
+ },
2925
+ {
2926
+ kind: "directive",
2927
+ type: i2.NgModel,
2928
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
2929
+ inputs: [
2930
+ "name",
2931
+ "disabled",
2932
+ "ngModel",
2933
+ "ngModelOptions"
2934
+ ],
2935
+ outputs: ["ngModelChange"],
2936
+ exportAs: ["ngModel"]
2937
+ }
2938
+ ]
2939
+ });
2940
+ }
2941
+ };
2942
+ i0.ɵɵngDeclareClassMetadata({
2943
+ minVersion: "12.0.0",
2944
+ version: "22.1.1",
2945
+ ngImport: i0,
2946
+ type: SortingTemplateComponent,
2947
+ decorators: [{
2948
+ type: Component,
2949
+ args: [{
2950
+ standalone: false,
2951
+ selector: "app-sorting-template",
2952
+ template: `
2219
2953
  <ng-template
2220
2954
  #sortingTemplateOverride
2221
2955
  let-selectedSorting="selectedSorting"
@@ -2245,62 +2979,134 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
2245
2979
  </select>
2246
2980
  </div>
2247
2981
  </ng-template>
2248
- `,
2249
- }]
2250
- }], propDecorators: { sortingTemplate: [{
2251
- type: ViewChild,
2252
- args: ["sortingTemplateOverride", { static: true }]
2253
- }] } });
2254
-
2255
- class SearchstaxSearchSortingWidget {
2256
- constructor(storeServiceService, ngZone, cdr) {
2257
- this.storeServiceService = storeServiceService;
2258
- this.ngZone = ngZone;
2259
- this.cdr = cdr;
2260
- this.sortingData = null;
2261
- this.rand = Math.random();
2262
- this.context = this;
2263
- this.selectedSorting = "";
2264
- }
2265
- ngOnInit() {
2266
- if (this.storeServiceService.searchstax) {
2267
- this.storeServiceService.whenDataLayerReady(() => {
2268
- this.attachObservables();
2269
- });
2270
- setTimeout(() => {
2271
- this.storeServiceService.searchstax.addSearchSortingWidget("search-sorting-container" + this.rand, {});
2272
- }, 0);
2273
- }
2274
- else {
2275
- throw Error("Searchstax instance needs to be passed via props");
2276
- }
2277
- }
2278
- orderChange(e, context) {
2279
- e.stopImmediatePropagation();
2280
- context.storeServiceService.searchstax.searchSortingWidget?.setOrderQuery(e.target.value);
2281
- }
2282
- attachObservables() {
2283
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchSortingData, (sortingData) => {
2284
- this.sortingData = sortingData;
2285
- }, this.cdr);
2286
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchObject, (searchObject) => {
2287
- this.selectedSorting = decodeURIComponent(searchObject?.order ?? "");
2288
- }, this.cdr);
2289
- }
2290
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxSearchSortingWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
2291
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: SearchstaxSearchSortingWidget, isStandalone: false, selector: "app-searchstax-search-sorting", inputs: { templateOverride: "templateOverride" }, ngImport: i0, template: "<div class=\"search-feedback-container\" [id]=\"'search-sorting-container' + rand\">\n @if (\n sortingData &&\n sortingData?.searchExecuted &&\n sortingData?.hasResultsOrExternalPromotions &&\n (sortingData.sortOptions?.length ?? 0) > 0 &&\n !templateOverride\n ) {\n <ng-container>\n <app-sorting-template #ref></app-sorting-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.sortingTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n sortingData &&\n sortingData?.searchExecuted &&\n sortingData?.hasResultsOrExternalPromotions &&\n templateOverride\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SortingTemplateComponent, selector: "app-sorting-template" }] }); }
2292
- }
2293
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxSearchSortingWidget, decorators: [{
2294
- type: Component,
2295
- args: [{ standalone: false, selector: "app-searchstax-search-sorting", template: "<div class=\"search-feedback-container\" [id]=\"'search-sorting-container' + rand\">\n @if (\n sortingData &&\n sortingData?.searchExecuted &&\n sortingData?.hasResultsOrExternalPromotions &&\n (sortingData.sortOptions?.length ?? 0) > 0 &&\n !templateOverride\n ) {\n <ng-container>\n <app-sorting-template #ref></app-sorting-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.sortingTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n sortingData &&\n sortingData?.searchExecuted &&\n sortingData?.hasResultsOrExternalPromotions &&\n templateOverride\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n" }]
2296
- }], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { templateOverride: [{
2297
- type: Input
2298
- }] } });
2299
-
2300
- // reusable-template.component.ts
2301
- class AnswerTemplateComponent {
2302
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: AnswerTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2303
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: AnswerTemplateComponent, isStandalone: false, selector: "app-answer-template", viewQueries: [{ propertyName: "answerTemplate", first: true, predicate: ["answerTemplate"], descendants: true, static: true }], ngImport: i0, template: `
2982
+ `
2983
+ }]
2984
+ }],
2985
+ propDecorators: { sortingTemplate: [{
2986
+ type: ViewChild,
2987
+ args: ["sortingTemplateOverride", { static: true }]
2988
+ }] }
2989
+ });
2990
+ var SearchstaxSearchSortingWidget = class SearchstaxSearchSortingWidget {
2991
+ constructor(storeServiceService, ngZone, cdr) {
2992
+ this.storeServiceService = storeServiceService;
2993
+ this.ngZone = ngZone;
2994
+ this.cdr = cdr;
2995
+ this.sortingData = null;
2996
+ this.rand = Math.random();
2997
+ this.context = this;
2998
+ this.selectedSorting = "";
2999
+ }
3000
+ ngOnInit() {
3001
+ if (this.storeServiceService.searchstax) {
3002
+ this.storeServiceService.whenDataLayerReady(() => {
3003
+ this.attachObservables();
3004
+ });
3005
+ setTimeout(() => {
3006
+ this.storeServiceService.searchstax.addSearchSortingWidget("search-sorting-container" + this.rand, {});
3007
+ }, 0);
3008
+ } else throw Error("Searchstax instance needs to be passed via props");
3009
+ }
3010
+ orderChange(e, context) {
3011
+ e.stopImmediatePropagation();
3012
+ context.storeServiceService.searchstax.searchSortingWidget?.setOrderQuery(e.target.value);
3013
+ }
3014
+ attachObservables() {
3015
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchSortingData, (sortingData) => {
3016
+ this.sortingData = sortingData;
3017
+ }, this.cdr);
3018
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchObject, (searchObject) => {
3019
+ this.selectedSorting = decodeURIComponent(searchObject?.order ?? "");
3020
+ }, this.cdr);
3021
+ }
3022
+ static {
3023
+ this.ɵfac = i0.ɵɵngDeclareFactory({
3024
+ minVersion: "12.0.0",
3025
+ version: "22.1.1",
3026
+ ngImport: i0,
3027
+ type: SearchstaxSearchSortingWidget,
3028
+ deps: [
3029
+ { token: StoreServiceService },
3030
+ { token: i0.NgZone },
3031
+ { token: i0.ChangeDetectorRef }
3032
+ ],
3033
+ target: i0.ɵɵFactoryTarget.Component
3034
+ });
3035
+ }
3036
+ static {
3037
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
3038
+ minVersion: "17.0.0",
3039
+ version: "22.1.1",
3040
+ type: SearchstaxSearchSortingWidget,
3041
+ isStandalone: false,
3042
+ selector: "app-searchstax-search-sorting",
3043
+ inputs: { templateOverride: "templateOverride" },
3044
+ ngImport: i0,
3045
+ template: "<div class=\"search-feedback-container\" [id]=\"'search-sorting-container' + rand\">\n @if (\n sortingData &&\n sortingData?.searchExecuted &&\n sortingData?.hasResultsOrExternalPromotions &&\n (sortingData.sortOptions?.length ?? 0) > 0 &&\n !templateOverride\n ) {\n <ng-container>\n <app-sorting-template #ref></app-sorting-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.sortingTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n sortingData &&\n sortingData?.searchExecuted &&\n sortingData?.hasResultsOrExternalPromotions &&\n templateOverride\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n",
3046
+ dependencies: [{
3047
+ kind: "directive",
3048
+ type: i1.NgTemplateOutlet,
3049
+ selector: "[ngTemplateOutlet]",
3050
+ inputs: [
3051
+ "ngTemplateOutletContext",
3052
+ "ngTemplateOutlet",
3053
+ "ngTemplateOutletInjector"
3054
+ ]
3055
+ }, {
3056
+ kind: "component",
3057
+ type: SortingTemplateComponent,
3058
+ selector: "app-sorting-template"
3059
+ }]
3060
+ });
3061
+ }
3062
+ };
3063
+ i0.ɵɵngDeclareClassMetadata({
3064
+ minVersion: "12.0.0",
3065
+ version: "22.1.1",
3066
+ ngImport: i0,
3067
+ type: SearchstaxSearchSortingWidget,
3068
+ decorators: [{
3069
+ type: Component,
3070
+ args: [{
3071
+ standalone: false,
3072
+ selector: "app-searchstax-search-sorting",
3073
+ template: "<div class=\"search-feedback-container\" [id]=\"'search-sorting-container' + rand\">\n @if (\n sortingData &&\n sortingData?.searchExecuted &&\n sortingData?.hasResultsOrExternalPromotions &&\n (sortingData.sortOptions?.length ?? 0) > 0 &&\n !templateOverride\n ) {\n <ng-container>\n <app-sorting-template #ref></app-sorting-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.sortingTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n\n @if (\n sortingData &&\n sortingData?.searchExecuted &&\n sortingData?.hasResultsOrExternalPromotions &&\n templateOverride\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n"
3074
+ }]
3075
+ }],
3076
+ ctorParameters: () => [
3077
+ { type: StoreServiceService },
3078
+ { type: i0.NgZone },
3079
+ { type: i0.ChangeDetectorRef }
3080
+ ],
3081
+ propDecorators: { templateOverride: [{ type: Input }] }
3082
+ });
3083
+ var AnswerTemplateComponent = class AnswerTemplateComponent {
3084
+ static {
3085
+ this.ɵfac = i0.ɵɵngDeclareFactory({
3086
+ minVersion: "12.0.0",
3087
+ version: "22.1.1",
3088
+ ngImport: i0,
3089
+ type: AnswerTemplateComponent,
3090
+ deps: [],
3091
+ target: i0.ɵɵFactoryTarget.Component
3092
+ });
3093
+ }
3094
+ static {
3095
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
3096
+ minVersion: "17.0.0",
3097
+ version: "22.1.1",
3098
+ type: AnswerTemplateComponent,
3099
+ isStandalone: false,
3100
+ selector: "app-answer-template",
3101
+ viewQueries: [{
3102
+ propertyName: "answerTemplate",
3103
+ first: true,
3104
+ predicate: ["answerTemplate"],
3105
+ descendants: true,
3106
+ static: true
3107
+ }],
3108
+ ngImport: i0,
3109
+ template: `
2304
3110
  <ng-template
2305
3111
  #answerTemplate
2306
3112
  let-answerData="answerData"
@@ -2342,6 +3148,55 @@ class AnswerTemplateComponent {
2342
3148
  </div>
2343
3149
  }
2344
3150
  </div>
3151
+ @if (!answerData.answerLoading && !answerData.showMoreButtonVisible && answerData.isConversation) {
3152
+ <div
3153
+ [class]="{
3154
+ 'searchstax-conversation-container': true,
3155
+ 'searchstax-conversation-container-full-screen': answerData.isFullScreenConversation
3156
+ }"
3157
+ >
3158
+ @if (answerData.showConversationHeader) {
3159
+ <div class="searchstax-conversation-full-screen-header">
3160
+ <button
3161
+ type="button"
3162
+ class="searchstax-conversation-back-to-results"
3163
+ (click)="context.exitConversation(context)"
3164
+ >
3165
+ Back to results
3166
+ </button>
3167
+ <div class="searchstax-conversation-full-screen-title">Ask SearchStax</div>
3168
+ </div>
3169
+ }
3170
+ @if (answerData.showConversationMessages && answerData.conversationMessages?.length) {
3171
+ <div class="searchstax-conversation-messages-container">
3172
+ @for (message of answerData.conversationMessages; track message.conversationMessageId ?? $index) {
3173
+ <div
3174
+ [class]="'searchstax-conversation-messages-container-message' + (message.messageClass ? ' ' + message.messageClass : '')"
3175
+ [innerHTML]="message.formattedMessage"
3176
+ ></div>
3177
+ }
3178
+ </div>
3179
+ }
3180
+ @if (answerData.showConversationInput) {
3181
+ <div class="searchstax-conversation-input-container">
3182
+ <input
3183
+ type="text"
3184
+ id="searchstax-conversation-input"
3185
+ class="searchstax-conversation-input"
3186
+ placeholder="Ask a follow-up question"
3187
+ #conversationInput
3188
+ (keydown.enter)="$event.preventDefault(); context.submitConversationQuestion(conversationInput.value, context, conversationInput)"
3189
+ />
3190
+ <button
3191
+ type="button"
3192
+ class="searchstax-conversation-search-icon searchstax-search-icon"
3193
+ aria-label="Submit follow-up question"
3194
+ (click)="context.submitConversationQuestion(conversationInput.value, context, conversationInput)"
3195
+ ></button>
3196
+ </div>
3197
+ }
3198
+ </div>
3199
+ }
2345
3200
  <div class="searchstax-answer-footer">
2346
3201
  <div id="feedbackWidgetContainer"></div>
2347
3202
  <div class="searchstax-lightweight-widget-separator-inline"></div>
@@ -2349,14 +3204,22 @@ class AnswerTemplateComponent {
2349
3204
  </div>
2350
3205
  </div>
2351
3206
  </ng-template>
2352
- `, isInline: true }); }
2353
- }
2354
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: AnswerTemplateComponent, decorators: [{
2355
- type: Component,
2356
- args: [{
2357
- standalone: false,
2358
- selector: "app-answer-template",
2359
- template: `
3207
+ `,
3208
+ isInline: true
3209
+ });
3210
+ }
3211
+ };
3212
+ i0.ɵɵngDeclareClassMetadata({
3213
+ minVersion: "12.0.0",
3214
+ version: "22.1.1",
3215
+ ngImport: i0,
3216
+ type: AnswerTemplateComponent,
3217
+ decorators: [{
3218
+ type: Component,
3219
+ args: [{
3220
+ standalone: false,
3221
+ selector: "app-answer-template",
3222
+ template: `
2360
3223
  <ng-template
2361
3224
  #answerTemplate
2362
3225
  let-answerData="answerData"
@@ -2398,6 +3261,55 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
2398
3261
  </div>
2399
3262
  }
2400
3263
  </div>
3264
+ @if (!answerData.answerLoading && !answerData.showMoreButtonVisible && answerData.isConversation) {
3265
+ <div
3266
+ [class]="{
3267
+ 'searchstax-conversation-container': true,
3268
+ 'searchstax-conversation-container-full-screen': answerData.isFullScreenConversation
3269
+ }"
3270
+ >
3271
+ @if (answerData.showConversationHeader) {
3272
+ <div class="searchstax-conversation-full-screen-header">
3273
+ <button
3274
+ type="button"
3275
+ class="searchstax-conversation-back-to-results"
3276
+ (click)="context.exitConversation(context)"
3277
+ >
3278
+ Back to results
3279
+ </button>
3280
+ <div class="searchstax-conversation-full-screen-title">Ask SearchStax</div>
3281
+ </div>
3282
+ }
3283
+ @if (answerData.showConversationMessages && answerData.conversationMessages?.length) {
3284
+ <div class="searchstax-conversation-messages-container">
3285
+ @for (message of answerData.conversationMessages; track message.conversationMessageId ?? $index) {
3286
+ <div
3287
+ [class]="'searchstax-conversation-messages-container-message' + (message.messageClass ? ' ' + message.messageClass : '')"
3288
+ [innerHTML]="message.formattedMessage"
3289
+ ></div>
3290
+ }
3291
+ </div>
3292
+ }
3293
+ @if (answerData.showConversationInput) {
3294
+ <div class="searchstax-conversation-input-container">
3295
+ <input
3296
+ type="text"
3297
+ id="searchstax-conversation-input"
3298
+ class="searchstax-conversation-input"
3299
+ placeholder="Ask a follow-up question"
3300
+ #conversationInput
3301
+ (keydown.enter)="$event.preventDefault(); context.submitConversationQuestion(conversationInput.value, context, conversationInput)"
3302
+ />
3303
+ <button
3304
+ type="button"
3305
+ class="searchstax-conversation-search-icon searchstax-search-icon"
3306
+ aria-label="Submit follow-up question"
3307
+ (click)="context.submitConversationQuestion(conversationInput.value, context, conversationInput)"
3308
+ ></button>
3309
+ </div>
3310
+ }
3311
+ </div>
3312
+ }
2401
3313
  <div class="searchstax-answer-footer">
2402
3314
  <div id="feedbackWidgetContainer"></div>
2403
3315
  <div class="searchstax-lightweight-widget-separator-inline"></div>
@@ -2405,65 +3317,155 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
2405
3317
  </div>
2406
3318
  </div>
2407
3319
  </ng-template>
2408
- `,
2409
- }]
2410
- }], propDecorators: { answerTemplate: [{
2411
- type: ViewChild,
2412
- args: ["answerTemplate", { static: true }]
2413
- }] } });
2414
-
2415
- class SearchstaxSearchAnswerWidget {
2416
- constructor(storeServiceService, ngZone, cdr) {
2417
- this.storeServiceService = storeServiceService;
2418
- this.ngZone = ngZone;
2419
- this.cdr = cdr;
2420
- this.answerData = null;
2421
- this.rand = Math.random();
2422
- this.context = this;
2423
- }
2424
- ngOnInit() {
2425
- if (this.storeServiceService.searchstax) {
2426
- this.storeServiceService.whenDataLayerReady(() => {
2427
- this.attachObservables();
2428
- });
2429
- setTimeout(() => {
2430
- this.storeServiceService.searchstax.addAnswerWidget('searchstax-answer-container' + this.rand, { showMoreAfterWordCount: this.showMoreAfterWordCount, feedbackwidget: this.feedbackwidget, testString: this.testString });
2431
- }, 0);
2432
- }
2433
- else {
2434
- throw Error("Searchstax instance needs to be passed via props");
2435
- }
2436
- }
2437
- showMore(event, context) {
2438
- if (context.storeServiceService.searchstax) {
2439
- context.storeServiceService.searchstax.answerWidget?.showMore(event);
2440
- }
2441
- }
2442
- attachObservables() {
2443
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$answerData, (answerData) => {
2444
- this.answerData = answerData;
2445
- }, this.cdr);
2446
- }
2447
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxSearchAnswerWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
2448
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: SearchstaxSearchAnswerWidget, isStandalone: false, selector: "app-searchstax-answer", inputs: { templateOverride: "templateOverride", feedbackwidget: "feedbackwidget", showMoreAfterWordCount: "showMoreAfterWordCount", testString: "testString" }, ngImport: i0, template: "<div [id]=\"'searchstax-answer-container' + rand\">\n @if (\n answerData &&\n answerData?.searchExecuted &&\n answerData.shouldShowAnswer &&\n !templateOverride\n ) {\n <div>\n <app-answer-template #ref></app-answer-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.answerTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n @if (\n answerData &&\n answerData?.searchExecuted &&\n answerData.shouldShowAnswer &&\n templateOverride\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AnswerTemplateComponent, selector: "app-answer-template" }] }); }
2449
- }
2450
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxSearchAnswerWidget, decorators: [{
2451
- type: Component,
2452
- args: [{ standalone: false, selector: "app-searchstax-answer", template: "<div [id]=\"'searchstax-answer-container' + rand\">\n @if (\n answerData &&\n answerData?.searchExecuted &&\n answerData.shouldShowAnswer &&\n !templateOverride\n ) {\n <div>\n <app-answer-template #ref></app-answer-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.answerTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n @if (\n answerData &&\n answerData?.searchExecuted &&\n answerData.shouldShowAnswer &&\n templateOverride\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n" }]
2453
- }], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { templateOverride: [{
2454
- type: Input
2455
- }], feedbackwidget: [{
2456
- type: Input
2457
- }], showMoreAfterWordCount: [{
2458
- type: Input
2459
- }], testString: [{
2460
- type: Input
2461
- }] } });
2462
-
2463
- // reusable-template.component.ts
2464
- class RelatedTemplateComponent {
2465
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: RelatedTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2466
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: RelatedTemplateComponent, isStandalone: false, selector: "app-related-template", viewQueries: [{ propertyName: "relatedTemplate", first: true, predicate: ["relatedTemplate"], descendants: true, static: true }], ngImport: i0, template: `
3320
+ `
3321
+ }]
3322
+ }],
3323
+ propDecorators: { answerTemplate: [{
3324
+ type: ViewChild,
3325
+ args: ["answerTemplate", { static: true }]
3326
+ }] }
3327
+ });
3328
+ var SearchstaxSearchAnswerWidget = class SearchstaxSearchAnswerWidget {
3329
+ constructor(storeServiceService, ngZone, cdr) {
3330
+ this.storeServiceService = storeServiceService;
3331
+ this.ngZone = ngZone;
3332
+ this.cdr = cdr;
3333
+ this.answerData = null;
3334
+ this.rand = Math.random();
3335
+ this.context = this;
3336
+ }
3337
+ ngOnInit() {
3338
+ if (this.storeServiceService.searchstax) {
3339
+ this.storeServiceService.whenDataLayerReady(() => {
3340
+ this.attachObservables();
3341
+ });
3342
+ setTimeout(() => {
3343
+ this.storeServiceService.searchstax.addAnswerWidget("searchstax-answer-container" + this.rand, {
3344
+ showMoreAfterWordCount: this.showMoreAfterWordCount,
3345
+ feedbackwidget: this.feedbackwidget,
3346
+ isFullScreenConversation: this.isFullScreenConversation,
3347
+ emptyConversationMessageOverride: this.emptyConversationMessageOverride,
3348
+ testString: this.testString
3349
+ });
3350
+ }, 0);
3351
+ } else throw Error("Searchstax instance needs to be passed via props");
3352
+ }
3353
+ showMore(event, context) {
3354
+ if (context.storeServiceService.searchstax) context.storeServiceService.searchstax.answerWidget?.showMore(event);
3355
+ }
3356
+ submitConversationQuestion(question, context, inputElement) {
3357
+ if (context.storeServiceService.searchstax) context.storeServiceService.searchstax.answerWidget?.submitConversationQuestion(question, inputElement);
3358
+ }
3359
+ exitConversation(context) {
3360
+ if (context.storeServiceService.searchstax) context.storeServiceService.searchstax.answerWidget?.exitConversation();
3361
+ }
3362
+ attachObservables() {
3363
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$answerData, (answerData) => {
3364
+ this.answerData = answerData;
3365
+ }, this.cdr);
3366
+ }
3367
+ static {
3368
+ this.ɵfac = i0.ɵɵngDeclareFactory({
3369
+ minVersion: "12.0.0",
3370
+ version: "22.1.1",
3371
+ ngImport: i0,
3372
+ type: SearchstaxSearchAnswerWidget,
3373
+ deps: [
3374
+ { token: StoreServiceService },
3375
+ { token: i0.NgZone },
3376
+ { token: i0.ChangeDetectorRef }
3377
+ ],
3378
+ target: i0.ɵɵFactoryTarget.Component
3379
+ });
3380
+ }
3381
+ static {
3382
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
3383
+ minVersion: "17.0.0",
3384
+ version: "22.1.1",
3385
+ type: SearchstaxSearchAnswerWidget,
3386
+ isStandalone: false,
3387
+ selector: "app-searchstax-answer",
3388
+ inputs: {
3389
+ templateOverride: "templateOverride",
3390
+ feedbackwidget: "feedbackwidget",
3391
+ showMoreAfterWordCount: "showMoreAfterWordCount",
3392
+ isFullScreenConversation: "isFullScreenConversation",
3393
+ emptyConversationMessageOverride: "emptyConversationMessageOverride",
3394
+ testString: "testString"
3395
+ },
3396
+ ngImport: i0,
3397
+ template: "<div [id]=\"'searchstax-answer-container' + rand\">\n @if (\n answerData &&\n answerData?.searchExecuted &&\n answerData.shouldShowAnswer &&\n !templateOverride\n ) {\n <div>\n <app-answer-template #ref></app-answer-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.answerTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n @if (\n answerData &&\n answerData?.searchExecuted &&\n answerData.shouldShowAnswer &&\n templateOverride\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n",
3398
+ dependencies: [{
3399
+ kind: "directive",
3400
+ type: i1.NgTemplateOutlet,
3401
+ selector: "[ngTemplateOutlet]",
3402
+ inputs: [
3403
+ "ngTemplateOutletContext",
3404
+ "ngTemplateOutlet",
3405
+ "ngTemplateOutletInjector"
3406
+ ]
3407
+ }, {
3408
+ kind: "component",
3409
+ type: AnswerTemplateComponent,
3410
+ selector: "app-answer-template"
3411
+ }]
3412
+ });
3413
+ }
3414
+ };
3415
+ i0.ɵɵngDeclareClassMetadata({
3416
+ minVersion: "12.0.0",
3417
+ version: "22.1.1",
3418
+ ngImport: i0,
3419
+ type: SearchstaxSearchAnswerWidget,
3420
+ decorators: [{
3421
+ type: Component,
3422
+ args: [{
3423
+ standalone: false,
3424
+ selector: "app-searchstax-answer",
3425
+ template: "<div [id]=\"'searchstax-answer-container' + rand\">\n @if (\n answerData &&\n answerData?.searchExecuted &&\n answerData.shouldShowAnswer &&\n !templateOverride\n ) {\n <div>\n <app-answer-template #ref></app-answer-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.answerTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n @if (\n answerData &&\n answerData?.searchExecuted &&\n answerData.shouldShowAnswer &&\n templateOverride\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n"
3426
+ }]
3427
+ }],
3428
+ ctorParameters: () => [
3429
+ { type: StoreServiceService },
3430
+ { type: i0.NgZone },
3431
+ { type: i0.ChangeDetectorRef }
3432
+ ],
3433
+ propDecorators: {
3434
+ templateOverride: [{ type: Input }],
3435
+ feedbackwidget: [{ type: Input }],
3436
+ showMoreAfterWordCount: [{ type: Input }],
3437
+ isFullScreenConversation: [{ type: Input }],
3438
+ emptyConversationMessageOverride: [{ type: Input }],
3439
+ testString: [{ type: Input }]
3440
+ }
3441
+ });
3442
+ var RelatedTemplateComponent = class RelatedTemplateComponent {
3443
+ static {
3444
+ this.ɵfac = i0.ɵɵngDeclareFactory({
3445
+ minVersion: "12.0.0",
3446
+ version: "22.1.1",
3447
+ ngImport: i0,
3448
+ type: RelatedTemplateComponent,
3449
+ deps: [],
3450
+ target: i0.ɵɵFactoryTarget.Component
3451
+ });
3452
+ }
3453
+ static {
3454
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
3455
+ minVersion: "17.0.0",
3456
+ version: "22.1.1",
3457
+ type: RelatedTemplateComponent,
3458
+ isStandalone: false,
3459
+ selector: "app-related-template",
3460
+ viewQueries: [{
3461
+ propertyName: "relatedTemplate",
3462
+ first: true,
3463
+ predicate: ["relatedTemplate"],
3464
+ descendants: true,
3465
+ static: true
3466
+ }],
3467
+ ngImport: i0,
3468
+ template: `
2467
3469
  <ng-template
2468
3470
  #relatedTemplate
2469
3471
  let-rand="rand"
@@ -2500,14 +3502,22 @@ class RelatedTemplateComponent {
2500
3502
  }
2501
3503
  </div>
2502
3504
  </ng-template>
2503
- `, isInline: true }); }
2504
- }
2505
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: RelatedTemplateComponent, decorators: [{
2506
- type: Component,
2507
- args: [{
2508
- standalone: false,
2509
- selector: "app-related-template",
2510
- template: `
3505
+ `,
3506
+ isInline: true
3507
+ });
3508
+ }
3509
+ };
3510
+ i0.ɵɵngDeclareClassMetadata({
3511
+ minVersion: "12.0.0",
3512
+ version: "22.1.1",
3513
+ ngImport: i0,
3514
+ type: RelatedTemplateComponent,
3515
+ decorators: [{
3516
+ type: Component,
3517
+ args: [{
3518
+ standalone: false,
3519
+ selector: "app-related-template",
3520
+ template: `
2511
3521
  <ng-template
2512
3522
  #relatedTemplate
2513
3523
  let-rand="rand"
@@ -2544,61 +3554,140 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
2544
3554
  }
2545
3555
  </div>
2546
3556
  </ng-template>
2547
- `,
2548
- }]
2549
- }], propDecorators: { relatedTemplate: [{
2550
- type: ViewChild,
2551
- args: ["relatedTemplate", { static: true }]
2552
- }] } });
2553
-
2554
- class SearchstaxSearchRelatedSearchesWidget {
2555
- constructor(storeServiceService, ngZone, cdr) {
2556
- this.storeServiceService = storeServiceService;
2557
- this.ngZone = ngZone;
2558
- this.cdr = cdr;
2559
- this.relatedData = null;
2560
- this.rand = Math.random();
2561
- this.context = this;
2562
- }
2563
- ngOnInit() {
2564
- if (this.storeServiceService.searchstax) {
2565
- this.storeServiceService.whenDataLayerReady(() => {
2566
- this.attachObservables();
2567
- });
2568
- setTimeout(() => {
2569
- this.storeServiceService.searchstax.addRelatedSearchesWidget("searchstax-related-searches-container" + this.rand, { relatedSearchesURL: this.relatedSearchesURL ?? "", relatedSearchesAPIKey: this.relatedSearchesAPIKey ?? "" });
2570
- }, 0);
2571
- }
2572
- else {
2573
- throw Error("Searchstax instance needs to be passed via props");
2574
- }
2575
- }
2576
- executeSearch(result, context) {
2577
- context.storeServiceService.searchstax.relatedSearchesWidget?.executeSearch(result);
2578
- }
2579
- attachObservables() {
2580
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchRelatedSearchesData, (relatedData) => {
2581
- this.relatedData = relatedData;
2582
- }, this.cdr);
2583
- }
2584
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxSearchRelatedSearchesWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
2585
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: SearchstaxSearchRelatedSearchesWidget, isStandalone: false, selector: "app-searchstax-related-searches", inputs: { relatedSearchesURL: "relatedSearchesURL", relatedSearchesAPIKey: "relatedSearchesAPIKey", templateOverride: "templateOverride" }, ngImport: i0, template: "@if (\n relatedData &&\n relatedData?.searchExecuted &&\n relatedData?.hasRelatedSearches &&\n !templateOverride\n) {\n <ng-container>\n <app-related-template #ref></app-related-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.relatedTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n}\n\n@if (\n relatedData &&\n relatedData?.searchExecuted &&\n relatedData?.hasRelatedSearches &&\n templateOverride\n) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n}\n", dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: RelatedTemplateComponent, selector: "app-related-template" }] }); }
2586
- }
2587
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxSearchRelatedSearchesWidget, decorators: [{
2588
- type: Component,
2589
- args: [{ standalone: false, selector: "app-searchstax-related-searches", template: "@if (\n relatedData &&\n relatedData?.searchExecuted &&\n relatedData?.hasRelatedSearches &&\n !templateOverride\n) {\n <ng-container>\n <app-related-template #ref></app-related-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.relatedTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n}\n\n@if (\n relatedData &&\n relatedData?.searchExecuted &&\n relatedData?.hasRelatedSearches &&\n templateOverride\n) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n}\n" }]
2590
- }], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { relatedSearchesURL: [{
2591
- type: Input
2592
- }], relatedSearchesAPIKey: [{
2593
- type: Input
2594
- }], templateOverride: [{
2595
- type: Input
2596
- }] } });
2597
-
2598
- // reusable-template.component.ts
2599
- class ExternalPromotionsTemplateComponent {
2600
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ExternalPromotionsTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2601
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: ExternalPromotionsTemplateComponent, isStandalone: false, selector: "app-external-template", viewQueries: [{ propertyName: "externalPromotionsTemplate", first: true, predicate: ["externalPromotionsTemplate"], descendants: true, static: true }], ngImport: i0, template: `
3557
+ `
3558
+ }]
3559
+ }],
3560
+ propDecorators: { relatedTemplate: [{
3561
+ type: ViewChild,
3562
+ args: ["relatedTemplate", { static: true }]
3563
+ }] }
3564
+ });
3565
+ var SearchstaxSearchRelatedSearchesWidget = class SearchstaxSearchRelatedSearchesWidget {
3566
+ constructor(storeServiceService, ngZone, cdr) {
3567
+ this.storeServiceService = storeServiceService;
3568
+ this.ngZone = ngZone;
3569
+ this.cdr = cdr;
3570
+ this.relatedData = null;
3571
+ this.rand = Math.random();
3572
+ this.context = this;
3573
+ }
3574
+ ngOnInit() {
3575
+ if (this.storeServiceService.searchstax) {
3576
+ this.storeServiceService.whenDataLayerReady(() => {
3577
+ this.attachObservables();
3578
+ });
3579
+ setTimeout(() => {
3580
+ this.storeServiceService.searchstax.addRelatedSearchesWidget("searchstax-related-searches-container" + this.rand, {
3581
+ relatedSearchesURL: this.relatedSearchesURL ?? "",
3582
+ relatedSearchesAPIKey: this.relatedSearchesAPIKey ?? ""
3583
+ });
3584
+ }, 0);
3585
+ } else throw Error("Searchstax instance needs to be passed via props");
3586
+ }
3587
+ executeSearch(result, context) {
3588
+ context.storeServiceService.searchstax.relatedSearchesWidget?.executeSearch(result);
3589
+ }
3590
+ attachObservables() {
3591
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchRelatedSearchesData, (relatedData) => {
3592
+ this.relatedData = relatedData;
3593
+ }, this.cdr);
3594
+ }
3595
+ static {
3596
+ this.ɵfac = i0.ɵɵngDeclareFactory({
3597
+ minVersion: "12.0.0",
3598
+ version: "22.1.1",
3599
+ ngImport: i0,
3600
+ type: SearchstaxSearchRelatedSearchesWidget,
3601
+ deps: [
3602
+ { token: StoreServiceService },
3603
+ { token: i0.NgZone },
3604
+ { token: i0.ChangeDetectorRef }
3605
+ ],
3606
+ target: i0.ɵɵFactoryTarget.Component
3607
+ });
3608
+ }
3609
+ static {
3610
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
3611
+ minVersion: "17.0.0",
3612
+ version: "22.1.1",
3613
+ type: SearchstaxSearchRelatedSearchesWidget,
3614
+ isStandalone: false,
3615
+ selector: "app-searchstax-related-searches",
3616
+ inputs: {
3617
+ relatedSearchesURL: "relatedSearchesURL",
3618
+ relatedSearchesAPIKey: "relatedSearchesAPIKey",
3619
+ templateOverride: "templateOverride"
3620
+ },
3621
+ ngImport: i0,
3622
+ template: "@if (\n relatedData &&\n relatedData?.searchExecuted &&\n relatedData?.hasRelatedSearches &&\n !templateOverride\n) {\n <ng-container>\n <app-related-template #ref></app-related-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.relatedTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n}\n\n@if (\n relatedData &&\n relatedData?.searchExecuted &&\n relatedData?.hasRelatedSearches &&\n templateOverride\n) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n}\n",
3623
+ dependencies: [{
3624
+ kind: "directive",
3625
+ type: i1.NgTemplateOutlet,
3626
+ selector: "[ngTemplateOutlet]",
3627
+ inputs: [
3628
+ "ngTemplateOutletContext",
3629
+ "ngTemplateOutlet",
3630
+ "ngTemplateOutletInjector"
3631
+ ]
3632
+ }, {
3633
+ kind: "component",
3634
+ type: RelatedTemplateComponent,
3635
+ selector: "app-related-template"
3636
+ }]
3637
+ });
3638
+ }
3639
+ };
3640
+ i0.ɵɵngDeclareClassMetadata({
3641
+ minVersion: "12.0.0",
3642
+ version: "22.1.1",
3643
+ ngImport: i0,
3644
+ type: SearchstaxSearchRelatedSearchesWidget,
3645
+ decorators: [{
3646
+ type: Component,
3647
+ args: [{
3648
+ standalone: false,
3649
+ selector: "app-searchstax-related-searches",
3650
+ template: "@if (\n relatedData &&\n relatedData?.searchExecuted &&\n relatedData?.hasRelatedSearches &&\n !templateOverride\n) {\n <ng-container>\n <app-related-template #ref></app-related-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.relatedTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n}\n\n@if (\n relatedData &&\n relatedData?.searchExecuted &&\n relatedData?.hasRelatedSearches &&\n templateOverride\n) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n}\n"
3651
+ }]
3652
+ }],
3653
+ ctorParameters: () => [
3654
+ { type: StoreServiceService },
3655
+ { type: i0.NgZone },
3656
+ { type: i0.ChangeDetectorRef }
3657
+ ],
3658
+ propDecorators: {
3659
+ relatedSearchesURL: [{ type: Input }],
3660
+ relatedSearchesAPIKey: [{ type: Input }],
3661
+ templateOverride: [{ type: Input }]
3662
+ }
3663
+ });
3664
+ var ExternalPromotionsTemplateComponent = class ExternalPromotionsTemplateComponent {
3665
+ static {
3666
+ this.ɵfac = i0.ɵɵngDeclareFactory({
3667
+ minVersion: "12.0.0",
3668
+ version: "22.1.1",
3669
+ ngImport: i0,
3670
+ type: ExternalPromotionsTemplateComponent,
3671
+ deps: [],
3672
+ target: i0.ɵɵFactoryTarget.Component
3673
+ });
3674
+ }
3675
+ static {
3676
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
3677
+ minVersion: "17.0.0",
3678
+ version: "22.1.1",
3679
+ type: ExternalPromotionsTemplateComponent,
3680
+ isStandalone: false,
3681
+ selector: "app-external-template",
3682
+ viewQueries: [{
3683
+ propertyName: "externalPromotionsTemplate",
3684
+ first: true,
3685
+ predicate: ["externalPromotionsTemplate"],
3686
+ descendants: true,
3687
+ static: true
3688
+ }],
3689
+ ngImport: i0,
3690
+ template: `
2602
3691
  <ng-template
2603
3692
  #externalPromotionsTemplate
2604
3693
  let-context="context"
@@ -2648,14 +3737,22 @@ class ExternalPromotionsTemplateComponent {
2648
3737
  }
2649
3738
  </div>
2650
3739
  </ng-template>
2651
- `, isInline: true }); }
2652
- }
2653
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: ExternalPromotionsTemplateComponent, decorators: [{
2654
- type: Component,
2655
- args: [{
2656
- standalone: false,
2657
- selector: "app-external-template",
2658
- template: `
3740
+ `,
3741
+ isInline: true
3742
+ });
3743
+ }
3744
+ };
3745
+ i0.ɵɵngDeclareClassMetadata({
3746
+ minVersion: "12.0.0",
3747
+ version: "22.1.1",
3748
+ ngImport: i0,
3749
+ type: ExternalPromotionsTemplateComponent,
3750
+ decorators: [{
3751
+ type: Component,
3752
+ args: [{
3753
+ standalone: false,
3754
+ selector: "app-external-template",
3755
+ template: `
2659
3756
  <ng-template
2660
3757
  #externalPromotionsTemplate
2661
3758
  let-context="context"
@@ -2705,146 +3802,224 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
2705
3802
  }
2706
3803
  </div>
2707
3804
  </ng-template>
2708
- `,
2709
- }]
2710
- }], propDecorators: { externalPromotionsTemplate: [{
2711
- type: ViewChild,
2712
- args: ["externalPromotionsTemplate", { static: true }]
2713
- }] } });
2714
-
2715
- class SearchstaxSearchExternalPromotionsWidget {
2716
- constructor(storeServiceService, ngZone, cdr) {
2717
- this.storeServiceService = storeServiceService;
2718
- this.ngZone = ngZone;
2719
- this.cdr = cdr;
2720
- this.externalPromotionsData = null;
2721
- this.rand = Math.random();
2722
- this.context = this;
2723
- }
2724
- ngOnInit() {
2725
- if (this.storeServiceService.searchstax) {
2726
- this.storeServiceService.whenDataLayerReady(() => {
2727
- this.attachObservables();
2728
- });
2729
- setTimeout(() => {
2730
- this.storeServiceService.searchstax.addExternalPromotionsWidget("searchstax-external-promotions-layout-container" + this.rand, {});
2731
- }, 0);
2732
- }
2733
- else {
2734
- throw Error("Searchstax instance needs to be passed via props");
2735
- }
2736
- }
2737
- trackClick(externalPromotion, event, context) {
2738
- context.storeServiceService.searchstax.externalPromotionsWidget?.trackClick(externalPromotion, event);
2739
- }
2740
- attachObservables() {
2741
- subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchExternalPromotionsData, (externalPromotionsData) => {
2742
- this.externalPromotionsData = externalPromotionsData;
2743
- }, this.cdr);
2744
- }
2745
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxSearchExternalPromotionsWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
2746
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.1", type: SearchstaxSearchExternalPromotionsWidget, isStandalone: false, selector: "app-searchstax-external-promotions", inputs: { templateOverride: "templateOverride" }, ngImport: i0, template: "<div [id]=\"'searchstax-external-promotions-layout-container' + rand\">\n @if (\n externalPromotionsData &&\n externalPromotionsData?.searchExecuted &&\n externalPromotionsData?.hasExternalPromotions &&\n !templateOverride\n ) {\n <ng-container>\n <app-external-template #ref></app-external-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.externalPromotionsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n @if (\n externalPromotionsData &&\n externalPromotionsData?.searchExecuted &&\n externalPromotionsData?.hasExternalPromotions &&\n templateOverride\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ExternalPromotionsTemplateComponent, selector: "app-external-template" }] }); }
2747
- }
2748
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstaxSearchExternalPromotionsWidget, decorators: [{
2749
- type: Component,
2750
- args: [{ standalone: false, selector: "app-searchstax-external-promotions", template: "<div [id]=\"'searchstax-external-promotions-layout-container' + rand\">\n @if (\n externalPromotionsData &&\n externalPromotionsData?.searchExecuted &&\n externalPromotionsData?.hasExternalPromotions &&\n !templateOverride\n ) {\n <ng-container>\n <app-external-template #ref></app-external-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.externalPromotionsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n @if (\n externalPromotionsData &&\n externalPromotionsData?.searchExecuted &&\n externalPromotionsData?.hasExternalPromotions &&\n templateOverride\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n" }]
2751
- }], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { templateOverride: [{
2752
- type: Input
2753
- }] } });
2754
-
3805
+ `
3806
+ }]
3807
+ }],
3808
+ propDecorators: { externalPromotionsTemplate: [{
3809
+ type: ViewChild,
3810
+ args: ["externalPromotionsTemplate", { static: true }]
3811
+ }] }
3812
+ });
3813
+ var SearchstaxSearchExternalPromotionsWidget = class SearchstaxSearchExternalPromotionsWidget {
3814
+ constructor(storeServiceService, ngZone, cdr) {
3815
+ this.storeServiceService = storeServiceService;
3816
+ this.ngZone = ngZone;
3817
+ this.cdr = cdr;
3818
+ this.externalPromotionsData = null;
3819
+ this.rand = Math.random();
3820
+ this.context = this;
3821
+ }
3822
+ ngOnInit() {
3823
+ if (this.storeServiceService.searchstax) {
3824
+ this.storeServiceService.whenDataLayerReady(() => {
3825
+ this.attachObservables();
3826
+ });
3827
+ setTimeout(() => {
3828
+ this.storeServiceService.searchstax.addExternalPromotionsWidget("searchstax-external-promotions-layout-container" + this.rand, {});
3829
+ }, 0);
3830
+ } else throw Error("Searchstax instance needs to be passed via props");
3831
+ }
3832
+ trackClick(externalPromotion, event, context) {
3833
+ context.storeServiceService.searchstax.externalPromotionsWidget?.trackClick(externalPromotion, event);
3834
+ }
3835
+ attachObservables() {
3836
+ subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchExternalPromotionsData, (externalPromotionsData) => {
3837
+ this.externalPromotionsData = externalPromotionsData;
3838
+ }, this.cdr);
3839
+ }
3840
+ static {
3841
+ this.ɵfac = i0.ɵɵngDeclareFactory({
3842
+ minVersion: "12.0.0",
3843
+ version: "22.1.1",
3844
+ ngImport: i0,
3845
+ type: SearchstaxSearchExternalPromotionsWidget,
3846
+ deps: [
3847
+ { token: StoreServiceService },
3848
+ { token: i0.NgZone },
3849
+ { token: i0.ChangeDetectorRef }
3850
+ ],
3851
+ target: i0.ɵɵFactoryTarget.Component
3852
+ });
3853
+ }
3854
+ static {
3855
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
3856
+ minVersion: "17.0.0",
3857
+ version: "22.1.1",
3858
+ type: SearchstaxSearchExternalPromotionsWidget,
3859
+ isStandalone: false,
3860
+ selector: "app-searchstax-external-promotions",
3861
+ inputs: { templateOverride: "templateOverride" },
3862
+ ngImport: i0,
3863
+ template: "<div [id]=\"'searchstax-external-promotions-layout-container' + rand\">\n @if (\n externalPromotionsData &&\n externalPromotionsData?.searchExecuted &&\n externalPromotionsData?.hasExternalPromotions &&\n !templateOverride\n ) {\n <ng-container>\n <app-external-template #ref></app-external-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.externalPromotionsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n @if (\n externalPromotionsData &&\n externalPromotionsData?.searchExecuted &&\n externalPromotionsData?.hasExternalPromotions &&\n templateOverride\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n",
3864
+ dependencies: [{
3865
+ kind: "directive",
3866
+ type: i1.NgTemplateOutlet,
3867
+ selector: "[ngTemplateOutlet]",
3868
+ inputs: [
3869
+ "ngTemplateOutletContext",
3870
+ "ngTemplateOutlet",
3871
+ "ngTemplateOutletInjector"
3872
+ ]
3873
+ }, {
3874
+ kind: "component",
3875
+ type: ExternalPromotionsTemplateComponent,
3876
+ selector: "app-external-template"
3877
+ }]
3878
+ });
3879
+ }
3880
+ };
3881
+ i0.ɵɵngDeclareClassMetadata({
3882
+ minVersion: "12.0.0",
3883
+ version: "22.1.1",
3884
+ ngImport: i0,
3885
+ type: SearchstaxSearchExternalPromotionsWidget,
3886
+ decorators: [{
3887
+ type: Component,
3888
+ args: [{
3889
+ standalone: false,
3890
+ selector: "app-searchstax-external-promotions",
3891
+ template: "<div [id]=\"'searchstax-external-promotions-layout-container' + rand\">\n @if (\n externalPromotionsData &&\n externalPromotionsData?.searchExecuted &&\n externalPromotionsData?.hasExternalPromotions &&\n !templateOverride\n ) {\n <ng-container>\n <app-external-template #ref></app-external-template>\n <ng-container\n [ngTemplateOutlet]=\"ref.externalPromotionsTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </ng-container>\n }\n @if (\n externalPromotionsData &&\n externalPromotionsData?.searchExecuted &&\n externalPromotionsData?.hasExternalPromotions &&\n templateOverride\n ) {\n <div>\n <ng-container\n [ngTemplateOutlet]=\"templateOverride\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-container>\n </div>\n }\n</div>\n"
3892
+ }]
3893
+ }],
3894
+ ctorParameters: () => [
3895
+ { type: StoreServiceService },
3896
+ { type: i0.NgZone },
3897
+ { type: i0.ChangeDetectorRef }
3898
+ ],
3899
+ propDecorators: { templateOverride: [{ type: Input }] }
3900
+ });
2755
3901
  const libraryComponents = [
2756
- SearchstaxWrapper,
2757
- SearchstaxInputWidget,
2758
- SearchstaxResultsWidget,
2759
- SearchstaxSearchFeedbackWidget,
2760
- SearchstaxSearchPaginationWidget,
2761
- SearchstaxSearchFacetsWidget,
2762
- SearchstaxSearchSortingWidget,
2763
- SearchstaxSearchRelatedSearchesWidget,
2764
- SearchstaxSearchExternalPromotionsWidget,
2765
- SearchstaxSearchAnswerWidget,
2766
- SearchstaxSearchLocationWidget,
2767
- AnswerTemplateComponent,
2768
- OverviewTemplateComponent,
2769
- InputTemplateComponent,
2770
- LocationTemplateComponent,
2771
- PaginationTemplateComponent,
2772
- PaginationInfiniteTemplateComponent,
2773
- ResultsTemplateComponent,
2774
- NoResultsTemplateComponent,
2775
- ExternalPromotionsTemplateComponent,
2776
- SortingTemplateComponent,
2777
- RelatedTemplateComponent,
2778
- FacetDesktopTemplateComponent,
2779
- FacetMobileTemplateComponent,
3902
+ SearchstaxWrapper,
3903
+ SearchstaxInputWidget,
3904
+ SearchstaxResultsWidget,
3905
+ SearchstaxSearchFeedbackWidget,
3906
+ SearchstaxSearchPaginationWidget,
3907
+ SearchstaxSearchFacetsWidget,
3908
+ SearchstaxSearchSortingWidget,
3909
+ SearchstaxSearchRelatedSearchesWidget,
3910
+ SearchstaxSearchExternalPromotionsWidget,
3911
+ SearchstaxSearchAnswerWidget,
3912
+ SearchstaxSearchLocationWidget,
3913
+ AnswerTemplateComponent,
3914
+ OverviewTemplateComponent,
3915
+ InputTemplateComponent,
3916
+ LocationTemplateComponent,
3917
+ PaginationTemplateComponent,
3918
+ PaginationInfiniteTemplateComponent,
3919
+ ResultsTemplateComponent,
3920
+ NoResultsTemplateComponent,
3921
+ ExternalPromotionsTemplateComponent,
3922
+ SortingTemplateComponent,
3923
+ RelatedTemplateComponent,
3924
+ FacetDesktopTemplateComponent,
3925
+ FacetMobileTemplateComponent
2780
3926
  ];
2781
- class SearchstudioUxAngularModule {
2782
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstudioUxAngularModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2783
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.1", ngImport: i0, type: SearchstudioUxAngularModule, declarations: [SearchstaxWrapper,
2784
- SearchstaxInputWidget,
2785
- SearchstaxResultsWidget,
2786
- SearchstaxSearchFeedbackWidget,
2787
- SearchstaxSearchPaginationWidget,
2788
- SearchstaxSearchFacetsWidget,
2789
- SearchstaxSearchSortingWidget,
2790
- SearchstaxSearchRelatedSearchesWidget,
2791
- SearchstaxSearchExternalPromotionsWidget,
2792
- SearchstaxSearchAnswerWidget,
2793
- SearchstaxSearchLocationWidget,
2794
- AnswerTemplateComponent,
2795
- OverviewTemplateComponent,
2796
- InputTemplateComponent,
2797
- LocationTemplateComponent,
2798
- PaginationTemplateComponent,
2799
- PaginationInfiniteTemplateComponent,
2800
- ResultsTemplateComponent,
2801
- NoResultsTemplateComponent,
2802
- ExternalPromotionsTemplateComponent,
2803
- SortingTemplateComponent,
2804
- RelatedTemplateComponent,
2805
- FacetDesktopTemplateComponent,
2806
- FacetMobileTemplateComponent], imports: [CommonModule, FormsModule], exports: [SearchstaxWrapper,
2807
- SearchstaxInputWidget,
2808
- SearchstaxResultsWidget,
2809
- SearchstaxSearchFeedbackWidget,
2810
- SearchstaxSearchPaginationWidget,
2811
- SearchstaxSearchFacetsWidget,
2812
- SearchstaxSearchSortingWidget,
2813
- SearchstaxSearchRelatedSearchesWidget,
2814
- SearchstaxSearchExternalPromotionsWidget,
2815
- SearchstaxSearchAnswerWidget,
2816
- SearchstaxSearchLocationWidget,
2817
- AnswerTemplateComponent,
2818
- OverviewTemplateComponent,
2819
- InputTemplateComponent,
2820
- LocationTemplateComponent,
2821
- PaginationTemplateComponent,
2822
- PaginationInfiniteTemplateComponent,
2823
- ResultsTemplateComponent,
2824
- NoResultsTemplateComponent,
2825
- ExternalPromotionsTemplateComponent,
2826
- SortingTemplateComponent,
2827
- RelatedTemplateComponent,
2828
- FacetDesktopTemplateComponent,
2829
- FacetMobileTemplateComponent] }); }
2830
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstudioUxAngularModule, imports: [CommonModule, FormsModule] }); }
2831
- }
2832
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SearchstudioUxAngularModule, decorators: [{
2833
- type: NgModule,
2834
- args: [{
2835
- declarations: [...libraryComponents],
2836
- imports: [CommonModule, FormsModule],
2837
- exports: [...libraryComponents],
2838
- }]
2839
- }] });
2840
-
2841
- /*
2842
- * Public API Surface of searchstudio-ux-angular
2843
- */
2844
-
2845
- /**
2846
- * Generated bundle index. Do not edit.
2847
- */
2848
-
3927
+ var SearchstudioUxAngularModule = class SearchstudioUxAngularModule {
3928
+ static {
3929
+ this.ɵfac = i0.ɵɵngDeclareFactory({
3930
+ minVersion: "12.0.0",
3931
+ version: "22.1.1",
3932
+ ngImport: i0,
3933
+ type: SearchstudioUxAngularModule,
3934
+ deps: [],
3935
+ target: i0.ɵɵFactoryTarget.NgModule
3936
+ });
3937
+ }
3938
+ static {
3939
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
3940
+ minVersion: "14.0.0",
3941
+ version: "22.1.1",
3942
+ ngImport: i0,
3943
+ type: SearchstudioUxAngularModule,
3944
+ declarations: [
3945
+ SearchstaxWrapper,
3946
+ SearchstaxInputWidget,
3947
+ SearchstaxResultsWidget,
3948
+ SearchstaxSearchFeedbackWidget,
3949
+ SearchstaxSearchPaginationWidget,
3950
+ SearchstaxSearchFacetsWidget,
3951
+ SearchstaxSearchSortingWidget,
3952
+ SearchstaxSearchRelatedSearchesWidget,
3953
+ SearchstaxSearchExternalPromotionsWidget,
3954
+ SearchstaxSearchAnswerWidget,
3955
+ SearchstaxSearchLocationWidget,
3956
+ AnswerTemplateComponent,
3957
+ OverviewTemplateComponent,
3958
+ InputTemplateComponent,
3959
+ LocationTemplateComponent,
3960
+ PaginationTemplateComponent,
3961
+ PaginationInfiniteTemplateComponent,
3962
+ ResultsTemplateComponent,
3963
+ NoResultsTemplateComponent,
3964
+ ExternalPromotionsTemplateComponent,
3965
+ SortingTemplateComponent,
3966
+ RelatedTemplateComponent,
3967
+ FacetDesktopTemplateComponent,
3968
+ FacetMobileTemplateComponent
3969
+ ],
3970
+ imports: [CommonModule, FormsModule],
3971
+ exports: [
3972
+ SearchstaxWrapper,
3973
+ SearchstaxInputWidget,
3974
+ SearchstaxResultsWidget,
3975
+ SearchstaxSearchFeedbackWidget,
3976
+ SearchstaxSearchPaginationWidget,
3977
+ SearchstaxSearchFacetsWidget,
3978
+ SearchstaxSearchSortingWidget,
3979
+ SearchstaxSearchRelatedSearchesWidget,
3980
+ SearchstaxSearchExternalPromotionsWidget,
3981
+ SearchstaxSearchAnswerWidget,
3982
+ SearchstaxSearchLocationWidget,
3983
+ AnswerTemplateComponent,
3984
+ OverviewTemplateComponent,
3985
+ InputTemplateComponent,
3986
+ LocationTemplateComponent,
3987
+ PaginationTemplateComponent,
3988
+ PaginationInfiniteTemplateComponent,
3989
+ ResultsTemplateComponent,
3990
+ NoResultsTemplateComponent,
3991
+ ExternalPromotionsTemplateComponent,
3992
+ SortingTemplateComponent,
3993
+ RelatedTemplateComponent,
3994
+ FacetDesktopTemplateComponent,
3995
+ FacetMobileTemplateComponent
3996
+ ]
3997
+ });
3998
+ }
3999
+ static {
4000
+ this.ɵinj = i0.ɵɵngDeclareInjector({
4001
+ minVersion: "12.0.0",
4002
+ version: "22.1.1",
4003
+ ngImport: i0,
4004
+ type: SearchstudioUxAngularModule,
4005
+ imports: [CommonModule, FormsModule]
4006
+ });
4007
+ }
4008
+ };
4009
+ i0.ɵɵngDeclareClassMetadata({
4010
+ minVersion: "12.0.0",
4011
+ version: "22.1.1",
4012
+ ngImport: i0,
4013
+ type: SearchstudioUxAngularModule,
4014
+ decorators: [{
4015
+ type: NgModule,
4016
+ args: [{
4017
+ declarations: [...libraryComponents],
4018
+ imports: [CommonModule, FormsModule],
4019
+ exports: [...libraryComponents]
4020
+ }]
4021
+ }]
4022
+ });
2849
4023
  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 };
2850
- //# sourceMappingURL=searchstax-inc-searchstudio-ux-angular.mjs.map
4024
+
4025
+ //# sourceMappingURL=searchstax-inc-searchstudio-ux-angular.mjs.map