@searchstax-inc/searchstudio-ux-angular 4.1.72 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +323 -264
- package/fesm2022/searchstax-inc-searchstudio-ux-angular.mjs +994 -788
- package/fesm2022/searchstax-inc-searchstudio-ux-angular.mjs.map +1 -1
- package/package.json +6 -8
- package/types/searchstax-inc-searchstudio-ux-angular.d.ts +388 -0
- package/esm2022/lib/components/searchstax-input/searchstax-input.component.mjs +0 -81
- package/esm2022/lib/components/searchstax-results/searchstax-results.component.mjs +0 -88
- package/esm2022/lib/components/searchstax-search-answer/searchstax-search-answer.component.mjs +0 -49
- package/esm2022/lib/components/searchstax-search-external/searchstax-search-external.component.mjs +0 -41
- package/esm2022/lib/components/searchstax-search-facets/searchstax-search-facets.component.mjs +0 -119
- package/esm2022/lib/components/searchstax-search-location/searchstax-search-location.component.mjs +0 -92
- package/esm2022/lib/components/searchstax-search-overview/searchstax-search-overview.component.mjs +0 -42
- package/esm2022/lib/components/searchstax-search-pagination/searchstax-search-pagination.component.mjs +0 -64
- package/esm2022/lib/components/searchstax-search-related/searchstax-search-related.component.mjs +0 -45
- package/esm2022/lib/components/searchstax-search-sorting/searchstax-search-sorting.component.mjs +0 -46
- package/esm2022/lib/components/searchstax-wrapper.component.mjs +0 -93
- package/esm2022/lib/components/templates/SearchstaxLocationWidgetTemplateConfig.mjs +0 -91
- package/esm2022/lib/components/templates/searchstax-search-answer-template.mjs +0 -119
- package/esm2022/lib/components/templates/searchstax-search-external-template.mjs +0 -107
- package/esm2022/lib/components/templates/searchstax-search-facet-desktop-template.mjs +0 -209
- package/esm2022/lib/components/templates/searchstax-search-facet-mobile-template.mjs +0 -343
- package/esm2022/lib/components/templates/searchstax-search-input-template.mjs +0 -126
- package/esm2022/lib/components/templates/searchstax-search-location-template.mjs +0 -152
- package/esm2022/lib/components/templates/searchstax-search-no-results-template.mjs +0 -83
- package/esm2022/lib/components/templates/searchstax-search-overview-template.mjs +0 -87
- package/esm2022/lib/components/templates/searchstax-search-pagination-infinite-template.mjs +0 -60
- package/esm2022/lib/components/templates/searchstax-search-pagination-template.mjs +0 -96
- package/esm2022/lib/components/templates/searchstax-search-related-template.mjs +0 -81
- package/esm2022/lib/components/templates/searchstax-search-results-template.mjs +0 -181
- package/esm2022/lib/components/templates/searchstax-search-sorting-template.mjs +0 -76
- package/esm2022/lib/searchstudio-ux-angular.module.mjs +0 -138
- package/esm2022/lib/services/store-service.service.mjs +0 -17
- package/esm2022/public-api.mjs +0 -30
- package/esm2022/searchstax-inc-searchstudio-ux-angular.mjs +0 -5
- package/index.d.ts +0 -5
- package/lib/components/searchstax-input/searchstax-input.component.d.ts +0 -37
- package/lib/components/searchstax-results/searchstax-results.component.d.ts +0 -27
- package/lib/components/searchstax-search-answer/searchstax-search-answer.component.d.ts +0 -20
- package/lib/components/searchstax-search-external/searchstax-search-external.component.d.ts +0 -17
- package/lib/components/searchstax-search-facets/searchstax-search-facets.component.d.ts +0 -38
- package/lib/components/searchstax-search-location/searchstax-search-location.component.d.ts +0 -33
- package/lib/components/searchstax-search-overview/searchstax-search-overview.component.d.ts +0 -17
- package/lib/components/searchstax-search-pagination/searchstax-search-pagination.component.d.ts +0 -21
- package/lib/components/searchstax-search-related/searchstax-search-related.component.d.ts +0 -19
- package/lib/components/searchstax-search-sorting/searchstax-search-sorting.component.d.ts +0 -18
- package/lib/components/searchstax-wrapper.component.d.ts +0 -31
- package/lib/components/templates/SearchstaxLocationWidgetTemplateConfig.d.ts +0 -13
- package/lib/components/templates/searchstax-search-answer-template.d.ts +0 -7
- package/lib/components/templates/searchstax-search-external-template.d.ts +0 -7
- package/lib/components/templates/searchstax-search-facet-desktop-template.d.ts +0 -7
- package/lib/components/templates/searchstax-search-facet-mobile-template.d.ts +0 -7
- package/lib/components/templates/searchstax-search-input-template.d.ts +0 -7
- package/lib/components/templates/searchstax-search-location-template.d.ts +0 -7
- package/lib/components/templates/searchstax-search-no-results-template.d.ts +0 -7
- package/lib/components/templates/searchstax-search-overview-template.d.ts +0 -7
- package/lib/components/templates/searchstax-search-pagination-infinite-template.d.ts +0 -7
- package/lib/components/templates/searchstax-search-pagination-template.d.ts +0 -7
- package/lib/components/templates/searchstax-search-related-template.d.ts +0 -7
- package/lib/components/templates/searchstax-search-results-template.d.ts +0 -7
- package/lib/components/templates/searchstax-search-sorting-template.d.ts +0 -7
- package/lib/searchstudio-ux-angular.module.d.ts +0 -32
- package/lib/services/store-service.service.d.ts +0 -8
- package/public-api.d.ts +0 -26
|
@@ -1,22 +1,37 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, EventEmitter, Output, Input, Component, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import { Searchstax } from '@searchstax-inc/searchstudio-ux-js';
|
|
4
|
-
import
|
|
4
|
+
import { ReplaySubject } from 'rxjs';
|
|
5
|
+
import { take } from 'rxjs/operators';
|
|
6
|
+
import * as i2 from '@angular/common';
|
|
5
7
|
import { CommonModule } from '@angular/common';
|
|
6
|
-
import * as i2 from '@angular/forms';
|
|
8
|
+
import * as i2$1 from '@angular/forms';
|
|
7
9
|
import { FormsModule } from '@angular/forms';
|
|
8
10
|
|
|
9
11
|
class StoreServiceService {
|
|
10
12
|
constructor() {
|
|
11
|
-
this.searchstax = new Searchstax(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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: "21.2.7", ngImport: i0, type: StoreServiceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
29
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: StoreServiceService, providedIn: "root" }); }
|
|
15
30
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: StoreServiceService, decorators: [{
|
|
17
32
|
type: Injectable,
|
|
18
33
|
args: [{
|
|
19
|
-
providedIn:
|
|
34
|
+
providedIn: "root",
|
|
20
35
|
}]
|
|
21
36
|
}], ctorParameters: () => [] });
|
|
22
37
|
|
|
@@ -61,17 +76,18 @@ class SearchstaxWrapper {
|
|
|
61
76
|
questionURL: this.questionURL
|
|
62
77
|
});
|
|
63
78
|
this.initialized.emit(this.storeServiceService.searchstax);
|
|
79
|
+
this.storeServiceService.notifyDataLayerReady();
|
|
64
80
|
}
|
|
65
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
66
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
81
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxWrapper, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
82
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", 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: `
|
|
67
83
|
<div>
|
|
68
84
|
<ng-content></ng-content>
|
|
69
85
|
</div>
|
|
70
86
|
`, isInline: true }); }
|
|
71
87
|
}
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
88
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxWrapper, decorators: [{
|
|
73
89
|
type: Component,
|
|
74
|
-
args: [{ selector: 'app-searchstax-wrapper', template: `
|
|
90
|
+
args: [{ standalone: false, selector: 'app-searchstax-wrapper', template: `
|
|
75
91
|
<div>
|
|
76
92
|
<ng-content></ng-content>
|
|
77
93
|
</div>
|
|
@@ -110,6 +126,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
110
126
|
type: Output
|
|
111
127
|
}] } });
|
|
112
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
|
+
*/
|
|
134
|
+
function subscribeInNgZone(ngZone, source, next, cdr) {
|
|
135
|
+
return source.subscribe((value) => {
|
|
136
|
+
ngZone.run(() => {
|
|
137
|
+
next(value);
|
|
138
|
+
cdr.detectChanges();
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
|
|
113
143
|
//CUT START
|
|
114
144
|
const config = {
|
|
115
145
|
appId: "APP_ID",
|
|
@@ -201,8 +231,8 @@ const locationWidgetConfig = {
|
|
|
201
231
|
|
|
202
232
|
// reusable-template.component.ts
|
|
203
233
|
class LocationTemplateComponent {
|
|
204
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
205
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
234
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: LocationTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
235
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: LocationTemplateComponent, isStandalone: false, selector: "app-location-template", viewQueries: [{ propertyName: "locationTemplate", first: true, predicate: ["locationTemplate"], descendants: true, static: true }], ngImport: i0, template: `
|
|
206
236
|
<ng-template
|
|
207
237
|
#locationTemplate
|
|
208
238
|
let-context="context"
|
|
@@ -215,11 +245,11 @@ class LocationTemplateComponent {
|
|
|
215
245
|
let-locationError="locationError"
|
|
216
246
|
let-getCurrentLocation="getCurrentLocation"
|
|
217
247
|
>
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
248
|
+
@if (locationData) {
|
|
249
|
+
<div
|
|
250
|
+
class="searchstax-location-input-container"
|
|
251
|
+
data-test-id="searchstax-location-input-container"
|
|
252
|
+
>
|
|
223
253
|
<div class="searchstax-location-input-wrapper">
|
|
224
254
|
<span class="searchstax-location-input-label">NEAR</span>
|
|
225
255
|
<div class="searchstax-location-input-wrapper-inner">
|
|
@@ -244,35 +274,41 @@ class LocationTemplateComponent {
|
|
|
244
274
|
Use my current location
|
|
245
275
|
</button>
|
|
246
276
|
</div>
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
>
|
|
252
|
-
<select
|
|
253
|
-
*ngIf="locationData.shouldShowLocationDistanceDropdown"
|
|
254
|
-
id="searchstax-location-radius-select"
|
|
255
|
-
class="searchstax-location-radius-select"
|
|
256
|
-
aria-label="Search Location Radius Select"
|
|
257
|
-
data-test-id="searchstax-location-radius-select"
|
|
258
|
-
(change)="radiusChange($event, context)"
|
|
259
|
-
[(ngModel)]="context.selectValue"
|
|
260
|
-
>
|
|
261
|
-
<option
|
|
262
|
-
*ngFor="let value of locationData.locationSearchDistanceValues"
|
|
263
|
-
[value]="value.value"
|
|
277
|
+
@if (locationData.shouldShowLocationDistanceDropdown) {
|
|
278
|
+
<span
|
|
279
|
+
class="searchstax-location-input-label"
|
|
280
|
+
>WITHIN</span
|
|
264
281
|
>
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
282
|
+
}
|
|
283
|
+
@if (locationData.shouldShowLocationDistanceDropdown) {
|
|
284
|
+
<select
|
|
285
|
+
id="searchstax-location-radius-select"
|
|
286
|
+
class="searchstax-location-radius-select"
|
|
287
|
+
aria-label="Search Location Radius Select"
|
|
288
|
+
data-test-id="searchstax-location-radius-select"
|
|
289
|
+
(change)="radiusChange($event, context)"
|
|
290
|
+
[(ngModel)]="context.selectValue"
|
|
291
|
+
>
|
|
292
|
+
@for (
|
|
293
|
+
value of locationData.locationSearchDistanceValues;
|
|
294
|
+
track value.value
|
|
295
|
+
) {
|
|
296
|
+
<option [value]="value.value">
|
|
297
|
+
{{ value.label }}
|
|
298
|
+
</option>
|
|
299
|
+
}
|
|
300
|
+
</select>
|
|
301
|
+
}
|
|
268
302
|
</div>
|
|
269
|
-
|
|
303
|
+
</div>
|
|
304
|
+
}
|
|
270
305
|
</ng-template>
|
|
271
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
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])[formControlName],select:not([multiple])[formControl],select:not([multiple])[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"] }] }); }
|
|
272
307
|
}
|
|
273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
308
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: LocationTemplateComponent, decorators: [{
|
|
274
309
|
type: Component,
|
|
275
310
|
args: [{
|
|
311
|
+
standalone: false,
|
|
276
312
|
selector: "app-location-template",
|
|
277
313
|
template: `
|
|
278
314
|
<ng-template
|
|
@@ -287,11 +323,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
287
323
|
let-locationError="locationError"
|
|
288
324
|
let-getCurrentLocation="getCurrentLocation"
|
|
289
325
|
>
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
326
|
+
@if (locationData) {
|
|
327
|
+
<div
|
|
328
|
+
class="searchstax-location-input-container"
|
|
329
|
+
data-test-id="searchstax-location-input-container"
|
|
330
|
+
>
|
|
295
331
|
<div class="searchstax-location-input-wrapper">
|
|
296
332
|
<span class="searchstax-location-input-label">NEAR</span>
|
|
297
333
|
<div class="searchstax-location-input-wrapper-inner">
|
|
@@ -316,40 +352,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
316
352
|
Use my current location
|
|
317
353
|
</button>
|
|
318
354
|
</div>
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
>
|
|
324
|
-
<select
|
|
325
|
-
*ngIf="locationData.shouldShowLocationDistanceDropdown"
|
|
326
|
-
id="searchstax-location-radius-select"
|
|
327
|
-
class="searchstax-location-radius-select"
|
|
328
|
-
aria-label="Search Location Radius Select"
|
|
329
|
-
data-test-id="searchstax-location-radius-select"
|
|
330
|
-
(change)="radiusChange($event, context)"
|
|
331
|
-
[(ngModel)]="context.selectValue"
|
|
332
|
-
>
|
|
333
|
-
<option
|
|
334
|
-
*ngFor="let value of locationData.locationSearchDistanceValues"
|
|
335
|
-
[value]="value.value"
|
|
355
|
+
@if (locationData.shouldShowLocationDistanceDropdown) {
|
|
356
|
+
<span
|
|
357
|
+
class="searchstax-location-input-label"
|
|
358
|
+
>WITHIN</span
|
|
336
359
|
>
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
360
|
+
}
|
|
361
|
+
@if (locationData.shouldShowLocationDistanceDropdown) {
|
|
362
|
+
<select
|
|
363
|
+
id="searchstax-location-radius-select"
|
|
364
|
+
class="searchstax-location-radius-select"
|
|
365
|
+
aria-label="Search Location Radius Select"
|
|
366
|
+
data-test-id="searchstax-location-radius-select"
|
|
367
|
+
(change)="radiusChange($event, context)"
|
|
368
|
+
[(ngModel)]="context.selectValue"
|
|
369
|
+
>
|
|
370
|
+
@for (
|
|
371
|
+
value of locationData.locationSearchDistanceValues;
|
|
372
|
+
track value.value
|
|
373
|
+
) {
|
|
374
|
+
<option [value]="value.value">
|
|
375
|
+
{{ value.label }}
|
|
376
|
+
</option>
|
|
377
|
+
}
|
|
378
|
+
</select>
|
|
379
|
+
}
|
|
340
380
|
</div>
|
|
341
|
-
|
|
381
|
+
</div>
|
|
382
|
+
}
|
|
342
383
|
</ng-template>
|
|
343
384
|
`,
|
|
344
385
|
}]
|
|
345
386
|
}], propDecorators: { locationTemplate: [{
|
|
346
387
|
type: ViewChild,
|
|
347
|
-
args: ["locationTemplate"]
|
|
388
|
+
args: ["locationTemplate", { static: true }]
|
|
348
389
|
}] } });
|
|
349
390
|
|
|
350
391
|
class SearchstaxSearchLocationWidget {
|
|
351
|
-
constructor(storeServiceService) {
|
|
392
|
+
constructor(storeServiceService, ngZone, cdr) {
|
|
352
393
|
this.storeServiceService = storeServiceService;
|
|
394
|
+
this.ngZone = ngZone;
|
|
395
|
+
this.cdr = cdr;
|
|
353
396
|
this.locationData = null;
|
|
354
397
|
this.inputValue = "";
|
|
355
398
|
this.selectValue = "";
|
|
@@ -360,7 +403,9 @@ class SearchstaxSearchLocationWidget {
|
|
|
360
403
|
}
|
|
361
404
|
ngOnInit() {
|
|
362
405
|
if (this.storeServiceService.searchstax) {
|
|
363
|
-
this.
|
|
406
|
+
this.storeServiceService.whenDataLayerReady(() => {
|
|
407
|
+
this.attachObservables();
|
|
408
|
+
});
|
|
364
409
|
setTimeout(() => {
|
|
365
410
|
this.addWidget();
|
|
366
411
|
}, 100);
|
|
@@ -399,30 +444,30 @@ class SearchstaxSearchLocationWidget {
|
|
|
399
444
|
}
|
|
400
445
|
}
|
|
401
446
|
attachObservables() {
|
|
402
|
-
this.storeServiceService.searchstax.dataLayer.$locationWidgetTemplateData
|
|
447
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$locationWidgetTemplateData, (sortingData) => {
|
|
403
448
|
this.locationData = sortingData;
|
|
404
|
-
});
|
|
405
|
-
this.storeServiceService.searchstax.dataLayer.$searchObject
|
|
406
|
-
this.inputValue = result
|
|
407
|
-
this.selectValue = result
|
|
408
|
-
});
|
|
409
|
-
this.storeServiceService.searchstax.dataLayer.$locationError
|
|
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) => {
|
|
410
455
|
this.locationError = locationError;
|
|
411
|
-
});
|
|
412
|
-
this.storeServiceService.searchstax.dataLayer.$searchLocationChange
|
|
456
|
+
}, this.cdr);
|
|
457
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchLocationChange, (location) => {
|
|
413
458
|
this.inputValue = location;
|
|
414
|
-
});
|
|
415
|
-
this.storeServiceService.searchstax.dataLayer.$searchRadiusChange
|
|
459
|
+
}, this.cdr);
|
|
460
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchRadiusChange, (radius) => {
|
|
416
461
|
this.selectValue = radius;
|
|
417
|
-
});
|
|
462
|
+
}, this.cdr);
|
|
418
463
|
}
|
|
419
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
420
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
464
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", 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: "21.2.7", 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" }] }); }
|
|
421
466
|
}
|
|
422
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
467
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxSearchLocationWidget, decorators: [{
|
|
423
468
|
type: Component,
|
|
424
|
-
args: [{ selector: "app-searchstax-search-location", template: "<div\n [id]=\"'searchstax-location-container' + rand\"\n class=\"searchstax-location-container\"\n>\n
|
|
425
|
-
}], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { templateOverride: [{
|
|
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: [{
|
|
426
471
|
type: Input
|
|
427
472
|
}], locationSearchEnabled: [{
|
|
428
473
|
type: Input
|
|
@@ -436,8 +481,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
436
481
|
|
|
437
482
|
// reusable-template.component.ts
|
|
438
483
|
class InputTemplateComponent {
|
|
439
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
440
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
484
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: InputTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
485
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: InputTemplateComponent, isStandalone: false, selector: "app-input-template", viewQueries: [{ propertyName: "inputTemplate", first: true, predicate: ["inputTemplate"], descendants: true, static: true }], ngImport: i0, template: `
|
|
441
486
|
<ng-template
|
|
442
487
|
#inputTemplate
|
|
443
488
|
let-suggestions="suggestions"
|
|
@@ -460,10 +505,10 @@ class InputTemplateComponent {
|
|
|
460
505
|
[ngClass]="{ hidden: suggestions.length === 0 }"
|
|
461
506
|
(mouseleave)="onMouseLeave(context)"
|
|
462
507
|
>
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
508
|
+
@for (suggestion of suggestions; track $index) {
|
|
509
|
+
<div
|
|
510
|
+
class="searchstax-autosuggest-item"
|
|
511
|
+
>
|
|
467
512
|
<div
|
|
468
513
|
class="searchstax-autosuggest-item-term-container"
|
|
469
514
|
[innerHtml]="suggestion.term"
|
|
@@ -471,7 +516,8 @@ class InputTemplateComponent {
|
|
|
471
516
|
tabindex="0"
|
|
472
517
|
(click)="onMouseClick($event, context)"
|
|
473
518
|
></div>
|
|
474
|
-
|
|
519
|
+
</div>
|
|
520
|
+
}
|
|
475
521
|
</div>
|
|
476
522
|
</div>
|
|
477
523
|
<app-searchstax-search-location
|
|
@@ -490,11 +536,12 @@ class InputTemplateComponent {
|
|
|
490
536
|
aria-label="search"
|
|
491
537
|
></button>
|
|
492
538
|
</ng-template>
|
|
493
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
539
|
+
`, 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"] }] }); }
|
|
494
540
|
}
|
|
495
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
541
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: InputTemplateComponent, decorators: [{
|
|
496
542
|
type: Component,
|
|
497
543
|
args: [{
|
|
544
|
+
standalone: false,
|
|
498
545
|
selector: "app-input-template",
|
|
499
546
|
template: `
|
|
500
547
|
<ng-template
|
|
@@ -519,10 +566,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
519
566
|
[ngClass]="{ hidden: suggestions.length === 0 }"
|
|
520
567
|
(mouseleave)="onMouseLeave(context)"
|
|
521
568
|
>
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
569
|
+
@for (suggestion of suggestions; track $index) {
|
|
570
|
+
<div
|
|
571
|
+
class="searchstax-autosuggest-item"
|
|
572
|
+
>
|
|
526
573
|
<div
|
|
527
574
|
class="searchstax-autosuggest-item-term-container"
|
|
528
575
|
[innerHtml]="suggestion.term"
|
|
@@ -530,7 +577,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
530
577
|
tabindex="0"
|
|
531
578
|
(click)="onMouseClick($event, context)"
|
|
532
579
|
></div>
|
|
533
|
-
|
|
580
|
+
</div>
|
|
581
|
+
}
|
|
534
582
|
</div>
|
|
535
583
|
</div>
|
|
536
584
|
<app-searchstax-search-location
|
|
@@ -553,47 +601,79 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
553
601
|
}]
|
|
554
602
|
}], propDecorators: { inputTemplate: [{
|
|
555
603
|
type: ViewChild,
|
|
556
|
-
args: ["inputTemplate"]
|
|
604
|
+
args: ["inputTemplate", { static: true }]
|
|
557
605
|
}] } });
|
|
558
606
|
|
|
559
607
|
class SearchstaxInputWidget {
|
|
560
|
-
constructor(storeServiceService) {
|
|
608
|
+
constructor(storeServiceService, ngZone, cdr) {
|
|
561
609
|
this.storeServiceService = storeServiceService;
|
|
610
|
+
this.ngZone = ngZone;
|
|
611
|
+
this.cdr = cdr;
|
|
562
612
|
this.searchInputId = "";
|
|
563
613
|
this.hooks = {};
|
|
564
614
|
this.suggestions = [];
|
|
565
615
|
this.context = this;
|
|
566
616
|
this.templateData = null;
|
|
567
617
|
this.locationWidgetConfig = locationWidgetConfig;
|
|
618
|
+
this.searchInputWidgetAttached = false;
|
|
568
619
|
}
|
|
569
620
|
ngOnInit() {
|
|
570
621
|
if (this.storeServiceService.searchstax) {
|
|
571
|
-
this.
|
|
572
|
-
|
|
622
|
+
this.storeServiceService.whenDataLayerReady(() => {
|
|
623
|
+
this.attachObservables();
|
|
624
|
+
});
|
|
573
625
|
if (this.afterAutosuggest) {
|
|
574
626
|
this.hooks["afterAutosuggest"] = this.afterAutosuggest;
|
|
575
627
|
}
|
|
576
628
|
if (this.beforeAutosuggest) {
|
|
577
629
|
this.hooks["beforeAutosuggest"] = this.beforeAutosuggest;
|
|
578
630
|
}
|
|
579
|
-
setTimeout(() => {
|
|
580
|
-
this.storeServiceService.searchstax.addSearchInputWidget("searchstax-input-container", {
|
|
581
|
-
suggestAfterMinChars: this.suggestAfterMinChars,
|
|
582
|
-
hooks: this.hooks,
|
|
583
|
-
templates: {
|
|
584
|
-
mainTemplate: {
|
|
585
|
-
template: ``,
|
|
586
|
-
searchInputId: this.searchInputId ?? "searchstax-search-input",
|
|
587
|
-
},
|
|
588
|
-
},
|
|
589
|
-
});
|
|
590
|
-
this.storeServiceService.searchstax.dataLayer.setInputTemplateRendered(true);
|
|
591
|
-
}, 100);
|
|
592
631
|
}
|
|
593
632
|
else {
|
|
594
633
|
throw Error("Searchstax instance needs to be passed via props");
|
|
595
634
|
}
|
|
596
635
|
}
|
|
636
|
+
/**
|
|
637
|
+
* Studio JS looks up `#searchInputId` as soon as `addSearchInputWidget` runs.
|
|
638
|
+
* The real input is stamped by `ngTemplateOutlet` after child views exist, so
|
|
639
|
+
* `ngOnInit` + a fixed delay can run too early (especially with control flow).
|
|
640
|
+
*/
|
|
641
|
+
ngAfterViewInit() {
|
|
642
|
+
this.tryAttachSearchInputWidget(0);
|
|
643
|
+
}
|
|
644
|
+
tryAttachSearchInputWidget(attempt) {
|
|
645
|
+
const searchstax = this.storeServiceService.searchstax;
|
|
646
|
+
if (!searchstax || this.searchInputWidgetAttached) {
|
|
647
|
+
return;
|
|
648
|
+
}
|
|
649
|
+
if (typeof document === "undefined") {
|
|
650
|
+
return;
|
|
651
|
+
}
|
|
652
|
+
const inputId = this.searchInputId || "searchstax-search-input";
|
|
653
|
+
if (document.getElementById(inputId)) {
|
|
654
|
+
searchstax.addSearchInputWidget("searchstax-input-container", {
|
|
655
|
+
suggestAfterMinChars: this.suggestAfterMinChars,
|
|
656
|
+
hooks: this.hooks,
|
|
657
|
+
templates: {
|
|
658
|
+
mainTemplate: {
|
|
659
|
+
template: ``,
|
|
660
|
+
searchInputId: inputId,
|
|
661
|
+
},
|
|
662
|
+
},
|
|
663
|
+
});
|
|
664
|
+
searchstax.dataLayer.setInputTemplateRendered(true);
|
|
665
|
+
this.searchInputWidgetAttached = true;
|
|
666
|
+
return;
|
|
667
|
+
}
|
|
668
|
+
const maxAttempts = 60;
|
|
669
|
+
if (attempt < maxAttempts) {
|
|
670
|
+
requestAnimationFrame(() => this.tryAttachSearchInputWidget(attempt + 1));
|
|
671
|
+
}
|
|
672
|
+
else {
|
|
673
|
+
console.warn(`[Searchstax] Input #${inputId} not found after view init; search input widget was not attached. ` +
|
|
674
|
+
`With a custom templateOverride, set the input id to match [searchInputId] (default "${inputId}").`);
|
|
675
|
+
}
|
|
676
|
+
}
|
|
597
677
|
onMouseLeave(context) {
|
|
598
678
|
context.storeServiceService.searchstax.searchInputWidget?.resetAutosuggestSelection();
|
|
599
679
|
context.storeServiceService.searchstax.searchInputWidget?.markActiveAutosuggestItem();
|
|
@@ -606,20 +686,20 @@ class SearchstaxInputWidget {
|
|
|
606
686
|
context.storeServiceService.searchstax.searchInputWidget?.suggestionChosen();
|
|
607
687
|
}
|
|
608
688
|
attachObservables() {
|
|
609
|
-
this.storeServiceService.searchstax.dataLayer.$autosuggestResults
|
|
689
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$autosuggestResults, (suggestions) => {
|
|
610
690
|
this.suggestions = suggestions?.suggestions ?? [];
|
|
611
|
-
});
|
|
612
|
-
this.storeServiceService.searchstax.dataLayer.$inputWidgetTemplateData
|
|
691
|
+
}, this.cdr);
|
|
692
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$inputWidgetTemplateData, (data) => {
|
|
613
693
|
this.templateData = data;
|
|
614
|
-
});
|
|
694
|
+
}, this.cdr);
|
|
615
695
|
}
|
|
616
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
617
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
696
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxInputWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
697
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", 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" }] }); }
|
|
618
698
|
}
|
|
619
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxInputWidget, decorators: [{
|
|
620
700
|
type: Component,
|
|
621
|
-
args: [{ selector: "app-searchstax-input", template: "<div id=\"searchstax-input-container\">\n <div\n class=\"searchstax-search-input-container searchstax-search-input-container-new\"\n [class]=\"{\n 'searchstax-alternative-render': !!templateData?.locationEnabled\n }\"\n >\n
|
|
622
|
-
}], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { afterAutosuggest: [{
|
|
701
|
+
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" }]
|
|
702
|
+
}], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { afterAutosuggest: [{
|
|
623
703
|
type: Input
|
|
624
704
|
}], beforeAutosuggest: [{
|
|
625
705
|
type: Input
|
|
@@ -633,8 +713,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
633
713
|
|
|
634
714
|
// reusable-template.component.ts
|
|
635
715
|
class ResultsTemplateComponent {
|
|
636
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
637
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
716
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: ResultsTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
717
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: ResultsTemplateComponent, isStandalone: false, selector: "app-results-template", viewQueries: [{ propertyName: "resultsTemplate", first: true, predicate: ["resultsTemplate"], descendants: true, static: true }], ngImport: i0, template: `
|
|
638
718
|
<ng-template
|
|
639
719
|
#resultsTemplate
|
|
640
720
|
let-searchResults="searchResults"
|
|
@@ -642,10 +722,13 @@ class ResultsTemplateComponent {
|
|
|
642
722
|
let-isImage="isImage"
|
|
643
723
|
let-context="context"
|
|
644
724
|
>
|
|
645
|
-
<div class="searchstax-search-results">
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
725
|
+
<div class="searchstax-search-results" id="searchstax-search-results">
|
|
726
|
+
@for (
|
|
727
|
+
searchResult of searchResults ?? [];
|
|
728
|
+
track searchResult.uniqueId
|
|
729
|
+
) {
|
|
730
|
+
<a
|
|
731
|
+
[href]="searchResult.url"
|
|
649
732
|
[attr.data-searchstax-unique-result-id]="searchResult.uniqueId"
|
|
650
733
|
(click)="resultClicked(searchResult, $event, context)"
|
|
651
734
|
(keyup.enter)="resultClicked(searchResult, $event, context)"
|
|
@@ -658,21 +741,22 @@ class ResultsTemplateComponent {
|
|
|
658
741
|
class="searchstax-search-result"
|
|
659
742
|
[ngClass]="{ 'has-thumbnail': searchResult.thumbnail }"
|
|
660
743
|
>
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
744
|
+
@if (searchResult.promoted) {
|
|
745
|
+
<div class="searchstax-search-result-promoted"></div>
|
|
746
|
+
}
|
|
747
|
+
@if (searchResult.ribbon) {
|
|
748
|
+
<div
|
|
749
|
+
[innerHTML]="searchResult.ribbon"
|
|
750
|
+
class="searchstax-search-result-ribbon"
|
|
751
|
+
></div>
|
|
752
|
+
}
|
|
753
|
+
@if (searchResult.thumbnail) {
|
|
754
|
+
<img
|
|
755
|
+
alt=""
|
|
756
|
+
[src]="searchResult.thumbnail"
|
|
757
|
+
class="searchstax-thumbnail"
|
|
758
|
+
/>
|
|
759
|
+
}
|
|
676
760
|
<div class="searchstax-search-result-title-container">
|
|
677
761
|
<span
|
|
678
762
|
class="searchstax-search-result-title"
|
|
@@ -680,46 +764,53 @@ class ResultsTemplateComponent {
|
|
|
680
764
|
[innerHTML]="searchResult.title"
|
|
681
765
|
></span>
|
|
682
766
|
</div>
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
767
|
+
@if (searchResult.paths) {
|
|
768
|
+
<p
|
|
769
|
+
tabindex="0"
|
|
770
|
+
class="searchstax-search-result-common"
|
|
771
|
+
[innerHTML]="searchResult.paths"
|
|
772
|
+
></p>
|
|
773
|
+
}
|
|
774
|
+
@if (searchResult.description) {
|
|
775
|
+
<p
|
|
776
|
+
tabindex="0"
|
|
777
|
+
[innerHTML]="searchResult.description"
|
|
778
|
+
class="searchstax-search-result-description searchstax-search-result-common"
|
|
779
|
+
></p>
|
|
780
|
+
}
|
|
781
|
+
@for (
|
|
782
|
+
unmappedField of searchResult.unmappedFields ?? [];
|
|
783
|
+
track $index
|
|
784
|
+
) {
|
|
785
|
+
@if (isImage(unmappedField)) {
|
|
786
|
+
<div class="searchstax-search-result-image-container">
|
|
787
|
+
<img
|
|
788
|
+
alt=""
|
|
789
|
+
[src]="unmappedField.value"
|
|
790
|
+
class="searchstax-result-image"
|
|
791
|
+
/>
|
|
792
|
+
</div>
|
|
793
|
+
} @else {
|
|
794
|
+
<div>
|
|
795
|
+
<p
|
|
796
|
+
tabindex="0"
|
|
797
|
+
class="searchstax-search-result-common"
|
|
798
|
+
[innerHTML]="unmappedField.value"
|
|
799
|
+
></p>
|
|
800
|
+
</div>
|
|
801
|
+
}
|
|
802
|
+
}
|
|
714
803
|
</div>
|
|
715
|
-
|
|
804
|
+
</a>
|
|
805
|
+
}
|
|
716
806
|
</div>
|
|
717
807
|
</ng-template>
|
|
718
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
808
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
719
809
|
}
|
|
720
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
810
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: ResultsTemplateComponent, decorators: [{
|
|
721
811
|
type: Component,
|
|
722
812
|
args: [{
|
|
813
|
+
standalone: false,
|
|
723
814
|
selector: "app-results-template",
|
|
724
815
|
template: `
|
|
725
816
|
<ng-template
|
|
@@ -729,10 +820,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
729
820
|
let-isImage="isImage"
|
|
730
821
|
let-context="context"
|
|
731
822
|
>
|
|
732
|
-
<div class="searchstax-search-results">
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
823
|
+
<div class="searchstax-search-results" id="searchstax-search-results">
|
|
824
|
+
@for (
|
|
825
|
+
searchResult of searchResults ?? [];
|
|
826
|
+
track searchResult.uniqueId
|
|
827
|
+
) {
|
|
828
|
+
<a
|
|
829
|
+
[href]="searchResult.url"
|
|
736
830
|
[attr.data-searchstax-unique-result-id]="searchResult.uniqueId"
|
|
737
831
|
(click)="resultClicked(searchResult, $event, context)"
|
|
738
832
|
(keyup.enter)="resultClicked(searchResult, $event, context)"
|
|
@@ -745,21 +839,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
745
839
|
class="searchstax-search-result"
|
|
746
840
|
[ngClass]="{ 'has-thumbnail': searchResult.thumbnail }"
|
|
747
841
|
>
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
842
|
+
@if (searchResult.promoted) {
|
|
843
|
+
<div class="searchstax-search-result-promoted"></div>
|
|
844
|
+
}
|
|
845
|
+
@if (searchResult.ribbon) {
|
|
846
|
+
<div
|
|
847
|
+
[innerHTML]="searchResult.ribbon"
|
|
848
|
+
class="searchstax-search-result-ribbon"
|
|
849
|
+
></div>
|
|
850
|
+
}
|
|
851
|
+
@if (searchResult.thumbnail) {
|
|
852
|
+
<img
|
|
853
|
+
alt=""
|
|
854
|
+
[src]="searchResult.thumbnail"
|
|
855
|
+
class="searchstax-thumbnail"
|
|
856
|
+
/>
|
|
857
|
+
}
|
|
763
858
|
<div class="searchstax-search-result-title-container">
|
|
764
859
|
<span
|
|
765
860
|
class="searchstax-search-result-title"
|
|
@@ -767,52 +862,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
767
862
|
[innerHTML]="searchResult.title"
|
|
768
863
|
></span>
|
|
769
864
|
</div>
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
865
|
+
@if (searchResult.paths) {
|
|
866
|
+
<p
|
|
867
|
+
tabindex="0"
|
|
868
|
+
class="searchstax-search-result-common"
|
|
869
|
+
[innerHTML]="searchResult.paths"
|
|
870
|
+
></p>
|
|
871
|
+
}
|
|
872
|
+
@if (searchResult.description) {
|
|
873
|
+
<p
|
|
874
|
+
tabindex="0"
|
|
875
|
+
[innerHTML]="searchResult.description"
|
|
876
|
+
class="searchstax-search-result-description searchstax-search-result-common"
|
|
877
|
+
></p>
|
|
878
|
+
}
|
|
879
|
+
@for (
|
|
880
|
+
unmappedField of searchResult.unmappedFields ?? [];
|
|
881
|
+
track $index
|
|
882
|
+
) {
|
|
883
|
+
@if (isImage(unmappedField)) {
|
|
884
|
+
<div class="searchstax-search-result-image-container">
|
|
885
|
+
<img
|
|
886
|
+
alt=""
|
|
887
|
+
[src]="unmappedField.value"
|
|
888
|
+
class="searchstax-result-image"
|
|
889
|
+
/>
|
|
890
|
+
</div>
|
|
891
|
+
} @else {
|
|
892
|
+
<div>
|
|
893
|
+
<p
|
|
894
|
+
tabindex="0"
|
|
895
|
+
class="searchstax-search-result-common"
|
|
896
|
+
[innerHTML]="unmappedField.value"
|
|
897
|
+
></p>
|
|
898
|
+
</div>
|
|
899
|
+
}
|
|
900
|
+
}
|
|
801
901
|
</div>
|
|
802
|
-
|
|
902
|
+
</a>
|
|
903
|
+
}
|
|
803
904
|
</div>
|
|
804
905
|
</ng-template>
|
|
805
906
|
`,
|
|
806
907
|
}]
|
|
807
908
|
}], propDecorators: { resultsTemplate: [{
|
|
808
909
|
type: ViewChild,
|
|
809
|
-
args: ["resultsTemplate"]
|
|
910
|
+
args: ["resultsTemplate", { static: true }]
|
|
810
911
|
}] } });
|
|
811
912
|
|
|
812
913
|
// reusable-template.component.ts
|
|
813
914
|
class NoResultsTemplateComponent {
|
|
814
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
815
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
915
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: NoResultsTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
916
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: NoResultsTemplateComponent, isStandalone: false, selector: "app-no-results-template", viewQueries: [{ propertyName: "noResultsTemplate", first: true, predicate: ["noResultsTemplate"], descendants: true, static: true }], ngImport: i0, template: `
|
|
816
917
|
<ng-template
|
|
817
918
|
#noResultsTemplate
|
|
818
919
|
let-metadata="metadata"
|
|
@@ -824,18 +925,20 @@ class NoResultsTemplateComponent {
|
|
|
824
925
|
Showing <strong>no results</strong> for
|
|
825
926
|
<strong>"{{ searchTerm }}"</strong>
|
|
826
927
|
<br />
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
928
|
+
@if (metadata?.spellingSuggestion) {
|
|
929
|
+
<span
|
|
930
|
+
> Did you mean
|
|
931
|
+
<a
|
|
932
|
+
href="#"
|
|
933
|
+
[attr.aria-label]="'did you mean: ' + metadata?.spellingSuggestion"
|
|
934
|
+
class="searchstax-suggestion-term"
|
|
935
|
+
(click)="
|
|
936
|
+
executeSearch(metadata?.spellingSuggestion ?? '', $event, context)
|
|
937
|
+
"
|
|
938
|
+
>{{ metadata?.spellingSuggestion }}</a
|
|
939
|
+
>?</span
|
|
940
|
+
>
|
|
941
|
+
}
|
|
839
942
|
</div>
|
|
840
943
|
<ul>
|
|
841
944
|
<li>
|
|
@@ -844,11 +947,12 @@ class NoResultsTemplateComponent {
|
|
|
844
947
|
</li>
|
|
845
948
|
</ul>
|
|
846
949
|
</ng-template>
|
|
847
|
-
`, isInline: true
|
|
950
|
+
`, isInline: true }); }
|
|
848
951
|
}
|
|
849
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
952
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: NoResultsTemplateComponent, decorators: [{
|
|
850
953
|
type: Component,
|
|
851
954
|
args: [{
|
|
955
|
+
standalone: false,
|
|
852
956
|
selector: "app-no-results-template",
|
|
853
957
|
template: `
|
|
854
958
|
<ng-template
|
|
@@ -862,18 +966,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
862
966
|
Showing <strong>no results</strong> for
|
|
863
967
|
<strong>"{{ searchTerm }}"</strong>
|
|
864
968
|
<br />
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
969
|
+
@if (metadata?.spellingSuggestion) {
|
|
970
|
+
<span
|
|
971
|
+
> Did you mean
|
|
972
|
+
<a
|
|
973
|
+
href="#"
|
|
974
|
+
[attr.aria-label]="'did you mean: ' + metadata?.spellingSuggestion"
|
|
975
|
+
class="searchstax-suggestion-term"
|
|
976
|
+
(click)="
|
|
977
|
+
executeSearch(metadata?.spellingSuggestion ?? '', $event, context)
|
|
978
|
+
"
|
|
979
|
+
>{{ metadata?.spellingSuggestion }}</a
|
|
980
|
+
>?</span
|
|
981
|
+
>
|
|
982
|
+
}
|
|
877
983
|
</div>
|
|
878
984
|
<ul>
|
|
879
985
|
<li>
|
|
@@ -886,7 +992,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
886
992
|
}]
|
|
887
993
|
}], propDecorators: { noResultsTemplate: [{
|
|
888
994
|
type: ViewChild,
|
|
889
|
-
args: ["noResultsTemplate"]
|
|
995
|
+
args: ["noResultsTemplate", { static: true }]
|
|
890
996
|
}] } });
|
|
891
997
|
|
|
892
998
|
class SearchstaxResultsWidget {
|
|
@@ -897,8 +1003,10 @@ class SearchstaxResultsWidget {
|
|
|
897
1003
|
}
|
|
898
1004
|
return hooks;
|
|
899
1005
|
}
|
|
900
|
-
constructor(storeServiceService) {
|
|
1006
|
+
constructor(storeServiceService, ngZone, cdr) {
|
|
901
1007
|
this.storeServiceService = storeServiceService;
|
|
1008
|
+
this.ngZone = ngZone;
|
|
1009
|
+
this.cdr = cdr;
|
|
902
1010
|
this.searchResults = null;
|
|
903
1011
|
this.metadata = null;
|
|
904
1012
|
this.searchTerm = '';
|
|
@@ -906,7 +1014,9 @@ class SearchstaxResultsWidget {
|
|
|
906
1014
|
}
|
|
907
1015
|
ngOnInit() {
|
|
908
1016
|
if (this.storeServiceService.searchstax) {
|
|
909
|
-
this.
|
|
1017
|
+
this.storeServiceService.whenDataLayerReady(() => {
|
|
1018
|
+
this.attachObservables();
|
|
1019
|
+
});
|
|
910
1020
|
setTimeout(() => {
|
|
911
1021
|
this.storeServiceService.searchstax.addSearchResultsWidget('searchstax-results-container', {
|
|
912
1022
|
templates: {},
|
|
@@ -925,25 +1035,26 @@ class SearchstaxResultsWidget {
|
|
|
925
1035
|
context.storeServiceService.searchstax.executeSearch(term);
|
|
926
1036
|
}
|
|
927
1037
|
attachObservables() {
|
|
928
|
-
this.storeServiceService.searchstax.dataLayer.$searchResults
|
|
1038
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchResults, (results) => {
|
|
929
1039
|
const current = this.searchResults ? [...this.searchResults] : [];
|
|
930
1040
|
const newResults = results ?? [];
|
|
931
1041
|
const resultsCombined = this.renderMethod === "infiniteScroll"
|
|
932
1042
|
? [...current, ...newResults]
|
|
933
1043
|
: results;
|
|
934
|
-
if (this.storeServiceService.searchstax.dataLayer.$searchObject.value
|
|
1044
|
+
if (this.storeServiceService.searchstax.dataLayer.$searchObject.value
|
|
1045
|
+
?.page === 1) {
|
|
935
1046
|
this.searchResults = newResults;
|
|
936
1047
|
}
|
|
937
1048
|
else {
|
|
938
1049
|
this.searchResults = resultsCombined;
|
|
939
1050
|
}
|
|
940
|
-
});
|
|
941
|
-
this.storeServiceService.searchstax.dataLayer.$searchTermChange
|
|
1051
|
+
}, this.cdr);
|
|
1052
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchTermChange, (result) => {
|
|
942
1053
|
this.searchTerm = result;
|
|
943
|
-
});
|
|
944
|
-
this.storeServiceService.searchstax.dataLayer.$searchResultsMetadata
|
|
1054
|
+
}, this.cdr);
|
|
1055
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchResultsMetadata, (value) => {
|
|
945
1056
|
this.metadata = value;
|
|
946
|
-
});
|
|
1057
|
+
}, this.cdr);
|
|
947
1058
|
}
|
|
948
1059
|
resultClicked(result, event, context) {
|
|
949
1060
|
event.preventDefault();
|
|
@@ -953,13 +1064,13 @@ class SearchstaxResultsWidget {
|
|
|
953
1064
|
isImage(field) {
|
|
954
1065
|
return field.isImage && typeof field.value === 'string';
|
|
955
1066
|
}
|
|
956
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
957
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1067
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxResultsWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1068
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", 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" }] }); }
|
|
958
1069
|
}
|
|
959
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1070
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxResultsWidget, decorators: [{
|
|
960
1071
|
type: Component,
|
|
961
|
-
args: [{ selector: 'app-searchstax-results', template: "<div id=\"searchstax-results-container\">\n <section aria-label=\"search results container\" tabindex=\"0\">\n <div\n class=\"searchstax-search-results-container\"\n id=\"searchstax-search-results-container\"\n >\n <div id=\"searchstax-result-container\">\n
|
|
962
|
-
}], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { afterLinkClick: [{
|
|
1072
|
+
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" }]
|
|
1073
|
+
}], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { afterLinkClick: [{
|
|
963
1074
|
type: Input
|
|
964
1075
|
}], noResultsTemplate: [{
|
|
965
1076
|
type: Input
|
|
@@ -973,8 +1084,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
973
1084
|
|
|
974
1085
|
// reusable-template.component.ts
|
|
975
1086
|
class OverviewTemplateComponent {
|
|
976
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
977
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1087
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: OverviewTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1088
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: OverviewTemplateComponent, isStandalone: false, selector: "app-overview-template", viewQueries: [{ propertyName: "overviewTemplate", first: true, predicate: ["feedbackTemplate"], descendants: true, static: true }], ngImport: i0, template: `
|
|
978
1089
|
<ng-template
|
|
979
1090
|
#feedbackTemplate
|
|
980
1091
|
let-searchFeedbackData="searchFeedbackData"
|
|
@@ -988,12 +1099,15 @@ class OverviewTemplateComponent {
|
|
|
988
1099
|
{{ searchFeedbackData!.endResultIndex }}</b
|
|
989
1100
|
>
|
|
990
1101
|
of <b>{{ searchFeedbackData!.totalResults }}</b> results
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
1102
|
+
@if (searchFeedbackData.searchTerm) {
|
|
1103
|
+
<span
|
|
1104
|
+
>for "<b>{{ searchFeedbackData!.searchTerm }}</b
|
|
1105
|
+
>"
|
|
1106
|
+
</span>
|
|
1107
|
+
}
|
|
995
1108
|
<div class="searchstax-feedback-container-suggested">
|
|
996
|
-
|
|
1109
|
+
@if (searchFeedbackData.autoCorrectedQuery) {
|
|
1110
|
+
<div>
|
|
997
1111
|
Search instead for
|
|
998
1112
|
<a
|
|
999
1113
|
href="#"
|
|
@@ -1004,15 +1118,17 @@ class OverviewTemplateComponent {
|
|
|
1004
1118
|
"
|
|
1005
1119
|
>{{ searchFeedbackData!.originalQuery }}</a
|
|
1006
1120
|
>
|
|
1007
|
-
|
|
1121
|
+
</div>
|
|
1122
|
+
}
|
|
1008
1123
|
</div>
|
|
1009
1124
|
</h2>
|
|
1010
1125
|
</ng-template>
|
|
1011
|
-
`, isInline: true
|
|
1126
|
+
`, isInline: true }); }
|
|
1012
1127
|
}
|
|
1013
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: OverviewTemplateComponent, decorators: [{
|
|
1014
1129
|
type: Component,
|
|
1015
1130
|
args: [{
|
|
1131
|
+
standalone: false,
|
|
1016
1132
|
selector: "app-overview-template",
|
|
1017
1133
|
template: `
|
|
1018
1134
|
<ng-template
|
|
@@ -1028,12 +1144,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1028
1144
|
{{ searchFeedbackData!.endResultIndex }}</b
|
|
1029
1145
|
>
|
|
1030
1146
|
of <b>{{ searchFeedbackData!.totalResults }}</b> results
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1147
|
+
@if (searchFeedbackData.searchTerm) {
|
|
1148
|
+
<span
|
|
1149
|
+
>for "<b>{{ searchFeedbackData!.searchTerm }}</b
|
|
1150
|
+
>"
|
|
1151
|
+
</span>
|
|
1152
|
+
}
|
|
1035
1153
|
<div class="searchstax-feedback-container-suggested">
|
|
1036
|
-
|
|
1154
|
+
@if (searchFeedbackData.autoCorrectedQuery) {
|
|
1155
|
+
<div>
|
|
1037
1156
|
Search instead for
|
|
1038
1157
|
<a
|
|
1039
1158
|
href="#"
|
|
@@ -1044,7 +1163,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1044
1163
|
"
|
|
1045
1164
|
>{{ searchFeedbackData!.originalQuery }}</a
|
|
1046
1165
|
>
|
|
1047
|
-
|
|
1166
|
+
</div>
|
|
1167
|
+
}
|
|
1048
1168
|
</div>
|
|
1049
1169
|
</h2>
|
|
1050
1170
|
</ng-template>
|
|
@@ -1052,19 +1172,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1052
1172
|
}]
|
|
1053
1173
|
}], propDecorators: { overviewTemplate: [{
|
|
1054
1174
|
type: ViewChild,
|
|
1055
|
-
args: ["feedbackTemplate"]
|
|
1175
|
+
args: ["feedbackTemplate", { static: true }]
|
|
1056
1176
|
}] } });
|
|
1057
1177
|
|
|
1058
1178
|
class SearchstaxSearchFeedbackWidget {
|
|
1059
|
-
constructor(storeServiceService) {
|
|
1179
|
+
constructor(storeServiceService, ngZone, cdr) {
|
|
1060
1180
|
this.storeServiceService = storeServiceService;
|
|
1181
|
+
this.ngZone = ngZone;
|
|
1182
|
+
this.cdr = cdr;
|
|
1061
1183
|
this.searchFeedbackData = null;
|
|
1062
1184
|
this.rand = Math.random();
|
|
1063
1185
|
this.context = this;
|
|
1064
1186
|
}
|
|
1065
1187
|
ngOnInit() {
|
|
1066
1188
|
if (this.storeServiceService.searchstax) {
|
|
1067
|
-
this.
|
|
1189
|
+
this.storeServiceService.whenDataLayerReady(() => {
|
|
1190
|
+
this.attachObservables();
|
|
1191
|
+
});
|
|
1068
1192
|
setTimeout(() => {
|
|
1069
1193
|
this.storeServiceService.searchstax.addSearchFeedbackWidget("search-feedback-container" + this.rand, {});
|
|
1070
1194
|
}, 0);
|
|
@@ -1078,24 +1202,24 @@ class SearchstaxSearchFeedbackWidget {
|
|
|
1078
1202
|
context.storeServiceService.searchstax.searchFeedbackWidget?.onOriginalQueryClick(e);
|
|
1079
1203
|
}
|
|
1080
1204
|
attachObservables() {
|
|
1081
|
-
this.storeServiceService.searchstax.dataLayer.$searchFeedbackData
|
|
1205
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchFeedbackData, (searchFeedbackData) => {
|
|
1082
1206
|
this.searchFeedbackData = searchFeedbackData;
|
|
1083
|
-
});
|
|
1207
|
+
}, this.cdr);
|
|
1084
1208
|
}
|
|
1085
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1086
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1209
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxSearchFeedbackWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1210
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", 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" }] }); }
|
|
1087
1211
|
}
|
|
1088
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1212
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxSearchFeedbackWidget, decorators: [{
|
|
1089
1213
|
type: Component,
|
|
1090
|
-
args: [{ selector: "app-searchstax-search-feedback", template: "<div\n class=\"search-feedback-container\"\n [id]=\"'search-feedback-container' + rand\"\n>\n
|
|
1091
|
-
}], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { templateOverride: [{
|
|
1214
|
+
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" }]
|
|
1215
|
+
}], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { templateOverride: [{
|
|
1092
1216
|
type: Input
|
|
1093
1217
|
}] } });
|
|
1094
1218
|
|
|
1095
1219
|
// reusable-template.component.ts
|
|
1096
1220
|
class PaginationTemplateComponent {
|
|
1097
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1098
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1221
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: PaginationTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1222
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: PaginationTemplateComponent, isStandalone: false, selector: "app-pagination-template", viewQueries: [{ propertyName: "paginationTemplate", first: true, predicate: ["paginationTemplate"], descendants: true, static: true }], ngImport: i0, template: `
|
|
1099
1223
|
<ng-template
|
|
1100
1224
|
#paginationTemplate
|
|
1101
1225
|
let-paginationData="paginationData"
|
|
@@ -1136,9 +1260,10 @@ class PaginationTemplateComponent {
|
|
|
1136
1260
|
</ng-template>
|
|
1137
1261
|
`, isInline: true }); }
|
|
1138
1262
|
}
|
|
1139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: PaginationTemplateComponent, decorators: [{
|
|
1140
1264
|
type: Component,
|
|
1141
1265
|
args: [{
|
|
1266
|
+
standalone: false,
|
|
1142
1267
|
selector: "app-pagination-template",
|
|
1143
1268
|
template: `
|
|
1144
1269
|
<ng-template
|
|
@@ -1183,13 +1308,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1183
1308
|
}]
|
|
1184
1309
|
}], propDecorators: { paginationTemplate: [{
|
|
1185
1310
|
type: ViewChild,
|
|
1186
|
-
args: ["paginationTemplate"]
|
|
1311
|
+
args: ["paginationTemplate", { static: true }]
|
|
1187
1312
|
}] } });
|
|
1188
1313
|
|
|
1189
1314
|
// reusable-template.component.ts
|
|
1190
1315
|
class PaginationInfiniteTemplateComponent {
|
|
1191
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1192
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
1316
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: PaginationInfiniteTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1317
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: PaginationInfiniteTemplateComponent, isStandalone: false, selector: "app-pagination-infinite-template", viewQueries: [{ propertyName: "infiniteScrollTemplate", first: true, predicate: ["infiniteScrollTemplate"], descendants: true, static: true }], ngImport: i0, template: `
|
|
1193
1318
|
<ng-template
|
|
1194
1319
|
#infiniteScrollTemplate
|
|
1195
1320
|
let-paginationData="paginationData"
|
|
@@ -1212,9 +1337,10 @@ class PaginationInfiniteTemplateComponent {
|
|
|
1212
1337
|
</ng-template>
|
|
1213
1338
|
`, isInline: true }); }
|
|
1214
1339
|
}
|
|
1215
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: PaginationInfiniteTemplateComponent, decorators: [{
|
|
1216
1341
|
type: Component,
|
|
1217
1342
|
args: [{
|
|
1343
|
+
standalone: false,
|
|
1218
1344
|
selector: "app-pagination-infinite-template",
|
|
1219
1345
|
template: `
|
|
1220
1346
|
<ng-template
|
|
@@ -1241,12 +1367,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1241
1367
|
}]
|
|
1242
1368
|
}], propDecorators: { infiniteScrollTemplate: [{
|
|
1243
1369
|
type: ViewChild,
|
|
1244
|
-
args: ["infiniteScrollTemplate"]
|
|
1370
|
+
args: ["infiniteScrollTemplate", { static: true }]
|
|
1245
1371
|
}] } });
|
|
1246
1372
|
|
|
1247
1373
|
class SearchstaxSearchPaginationWidget {
|
|
1248
|
-
constructor(storeServiceService) {
|
|
1374
|
+
constructor(storeServiceService, ngZone, cdr) {
|
|
1249
1375
|
this.storeServiceService = storeServiceService;
|
|
1376
|
+
this.ngZone = ngZone;
|
|
1377
|
+
this.cdr = cdr;
|
|
1250
1378
|
this.paginationData = null;
|
|
1251
1379
|
this.rand = Math.random();
|
|
1252
1380
|
this.context = this;
|
|
@@ -1254,7 +1382,9 @@ class SearchstaxSearchPaginationWidget {
|
|
|
1254
1382
|
}
|
|
1255
1383
|
ngOnInit() {
|
|
1256
1384
|
if (this.storeServiceService.searchstax) {
|
|
1257
|
-
this.
|
|
1385
|
+
this.storeServiceService.whenDataLayerReady(() => {
|
|
1386
|
+
this.attachObservables();
|
|
1387
|
+
});
|
|
1258
1388
|
setTimeout(() => {
|
|
1259
1389
|
this.addWidget();
|
|
1260
1390
|
}, 0);
|
|
@@ -1283,20 +1413,20 @@ class SearchstaxSearchPaginationWidget {
|
|
|
1283
1413
|
}
|
|
1284
1414
|
}
|
|
1285
1415
|
attachObservables() {
|
|
1286
|
-
this.storeServiceService.searchstax.dataLayer.$searchObject
|
|
1416
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchObject, (_pagination) => {
|
|
1287
1417
|
this.addWidget();
|
|
1288
|
-
});
|
|
1289
|
-
this.storeServiceService.searchstax.dataLayer.$paginationData
|
|
1418
|
+
}, this.cdr);
|
|
1419
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$paginationData, (pagination) => {
|
|
1290
1420
|
this.paginationData = pagination;
|
|
1291
|
-
});
|
|
1421
|
+
}, this.cdr);
|
|
1292
1422
|
}
|
|
1293
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1294
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1423
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxSearchPaginationWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1424
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", 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" }] }); }
|
|
1295
1425
|
}
|
|
1296
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxSearchPaginationWidget, decorators: [{
|
|
1297
1427
|
type: Component,
|
|
1298
|
-
args: [{ selector: "app-searchstax-search-pagination", template: "<div [id]=\"'searchstax-pagination-container' + rand\">\n
|
|
1299
|
-
}], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { templateOverride: [{
|
|
1428
|
+
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" }]
|
|
1429
|
+
}], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { templateOverride: [{
|
|
1300
1430
|
type: Input
|
|
1301
1431
|
}], infiniteScrollTemplateOverride: [{
|
|
1302
1432
|
type: Input
|
|
@@ -1304,8 +1434,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1304
1434
|
|
|
1305
1435
|
// reusable-template.component.ts
|
|
1306
1436
|
class FacetDesktopTemplateComponent {
|
|
1307
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1308
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1437
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: FacetDesktopTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1438
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: FacetDesktopTemplateComponent, isStandalone: false, selector: "app-facet-desktop-template", viewQueries: [{ propertyName: "templateOverrideDesktop", first: true, predicate: ["templateOverrideDesktop"], descendants: true, static: true }], ngImport: i0, template: `
|
|
1309
1439
|
<ng-template
|
|
1310
1440
|
#templateOverrideDesktop
|
|
1311
1441
|
let-facetsTemplateDataDesktop="facetsTemplateDataDesktop"
|
|
@@ -1318,11 +1448,14 @@ class FacetDesktopTemplateComponent {
|
|
|
1318
1448
|
let-showMoreLessDesktop="showMoreLessDesktop"
|
|
1319
1449
|
>
|
|
1320
1450
|
<div class="searchstax-facets-container-desktop">
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1451
|
+
@for (
|
|
1452
|
+
facet of facetsTemplateDataDesktop?.facets ?? [];
|
|
1453
|
+
track facet.name
|
|
1454
|
+
) {
|
|
1455
|
+
<div
|
|
1456
|
+
class="searchstax-facet-container"
|
|
1457
|
+
[class]="{ active: isNotDeactivated(facet.name, context) }"
|
|
1458
|
+
>
|
|
1326
1459
|
<div>
|
|
1327
1460
|
<div
|
|
1328
1461
|
class="searchstax-facet-title-container"
|
|
@@ -1334,14 +1467,17 @@ class FacetDesktopTemplateComponent {
|
|
|
1334
1467
|
<div class="searchstax-facet-title-arrow active"></div>
|
|
1335
1468
|
</div>
|
|
1336
1469
|
<div class="searchstax-facet-values-container" aria-live="polite">
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1470
|
+
@for (
|
|
1471
|
+
facetValue of facetValues(facet);
|
|
1472
|
+
track $index
|
|
1473
|
+
) {
|
|
1474
|
+
<div
|
|
1475
|
+
class="searchstax-facet-value-container"
|
|
1476
|
+
[class]="{
|
|
1477
|
+
'searchstax-facet-value-disabled': facetValue.disabled
|
|
1478
|
+
}"
|
|
1479
|
+
#facetValueRow
|
|
1480
|
+
>
|
|
1345
1481
|
<div class="searchstax-facet-input">
|
|
1346
1482
|
<input
|
|
1347
1483
|
type="checkbox"
|
|
@@ -1352,59 +1488,67 @@ class FacetDesktopTemplateComponent {
|
|
|
1352
1488
|
"
|
|
1353
1489
|
[disabled]="facetValue.disabled"
|
|
1354
1490
|
(click)="
|
|
1355
|
-
selectFacet(
|
|
1491
|
+
selectFacet(facetValueRow, $event, facetValue, true, context)
|
|
1356
1492
|
"
|
|
1357
1493
|
/>
|
|
1358
1494
|
</div>
|
|
1359
1495
|
<div
|
|
1360
1496
|
class="searchstax-facet-value-label"
|
|
1361
|
-
(click)="
|
|
1497
|
+
(click)="
|
|
1498
|
+
selectFacet(facetValueRow, $event, facetValue, false, context)
|
|
1499
|
+
"
|
|
1362
1500
|
>
|
|
1363
1501
|
{{ facetValue.value }}
|
|
1364
1502
|
</div>
|
|
1365
1503
|
<div
|
|
1366
1504
|
class="searchstax-facet-value-count"
|
|
1367
|
-
(click)="
|
|
1505
|
+
(click)="
|
|
1506
|
+
selectFacet(facetValueRow, $event, facetValue, false, context)
|
|
1507
|
+
"
|
|
1368
1508
|
>
|
|
1369
1509
|
({{ facetValue.count }})
|
|
1370
1510
|
</div>
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
>
|
|
1376
|
-
<div
|
|
1377
|
-
class="searchstax-facet-show-more-container"
|
|
1378
|
-
(click)="showMoreLessDesktop($event, facet, context)"
|
|
1379
|
-
(keyup.enter)="showMoreLessDesktop($event, facet, context)"
|
|
1380
|
-
(keyup.space)="showMoreLessDesktop($event, facet, context)"
|
|
1381
|
-
tabindex="0"
|
|
1382
|
-
role="button"
|
|
1383
|
-
>
|
|
1384
|
-
<div
|
|
1385
|
-
*ngIf="facet.showingAllFacets"
|
|
1386
|
-
class="searchstax-facet-show-less-button searchstax-facet-show-button"
|
|
1387
|
-
>
|
|
1388
|
-
less
|
|
1389
|
-
</div>
|
|
1511
|
+
</div>
|
|
1512
|
+
}
|
|
1513
|
+
@if (facet.hasMoreFacets) {
|
|
1514
|
+
<div class="searchstax-facet-show-more-container">
|
|
1390
1515
|
<div
|
|
1391
|
-
|
|
1392
|
-
|
|
1516
|
+
class="searchstax-facet-show-more-container"
|
|
1517
|
+
(click)="showMoreLessDesktop($event, facet, context)"
|
|
1518
|
+
(keyup.enter)="showMoreLessDesktop($event, facet, context)"
|
|
1519
|
+
(keyup.space)="showMoreLessDesktop($event, facet, context)"
|
|
1520
|
+
tabindex="0"
|
|
1521
|
+
role="button"
|
|
1393
1522
|
>
|
|
1394
|
-
|
|
1523
|
+
@if (facet.showingAllFacets) {
|
|
1524
|
+
<div
|
|
1525
|
+
class="searchstax-facet-show-less-button searchstax-facet-show-button"
|
|
1526
|
+
>
|
|
1527
|
+
less
|
|
1528
|
+
</div>
|
|
1529
|
+
}
|
|
1530
|
+
@if (!facet.showingAllFacets) {
|
|
1531
|
+
<div
|
|
1532
|
+
class="searchstax-facet-show-more-button searchstax-facet-show-button"
|
|
1533
|
+
>
|
|
1534
|
+
more
|
|
1535
|
+
</div>
|
|
1536
|
+
}
|
|
1395
1537
|
</div>
|
|
1396
1538
|
</div>
|
|
1397
|
-
|
|
1539
|
+
}
|
|
1398
1540
|
</div>
|
|
1399
1541
|
</div>
|
|
1400
|
-
|
|
1542
|
+
</div>
|
|
1543
|
+
}
|
|
1401
1544
|
</div>
|
|
1402
1545
|
</ng-template>
|
|
1403
|
-
`, isInline: true
|
|
1546
|
+
`, isInline: true }); }
|
|
1404
1547
|
}
|
|
1405
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1548
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: FacetDesktopTemplateComponent, decorators: [{
|
|
1406
1549
|
type: Component,
|
|
1407
1550
|
args: [{
|
|
1551
|
+
standalone: false,
|
|
1408
1552
|
selector: "app-facet-desktop-template",
|
|
1409
1553
|
template: `
|
|
1410
1554
|
<ng-template
|
|
@@ -1419,11 +1563,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1419
1563
|
let-showMoreLessDesktop="showMoreLessDesktop"
|
|
1420
1564
|
>
|
|
1421
1565
|
<div class="searchstax-facets-container-desktop">
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1566
|
+
@for (
|
|
1567
|
+
facet of facetsTemplateDataDesktop?.facets ?? [];
|
|
1568
|
+
track facet.name
|
|
1569
|
+
) {
|
|
1570
|
+
<div
|
|
1571
|
+
class="searchstax-facet-container"
|
|
1572
|
+
[class]="{ active: isNotDeactivated(facet.name, context) }"
|
|
1573
|
+
>
|
|
1427
1574
|
<div>
|
|
1428
1575
|
<div
|
|
1429
1576
|
class="searchstax-facet-title-container"
|
|
@@ -1435,14 +1582,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1435
1582
|
<div class="searchstax-facet-title-arrow active"></div>
|
|
1436
1583
|
</div>
|
|
1437
1584
|
<div class="searchstax-facet-values-container" aria-live="polite">
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1585
|
+
@for (
|
|
1586
|
+
facetValue of facetValues(facet);
|
|
1587
|
+
track $index
|
|
1588
|
+
) {
|
|
1589
|
+
<div
|
|
1590
|
+
class="searchstax-facet-value-container"
|
|
1591
|
+
[class]="{
|
|
1592
|
+
'searchstax-facet-value-disabled': facetValue.disabled
|
|
1593
|
+
}"
|
|
1594
|
+
#facetValueRow
|
|
1595
|
+
>
|
|
1446
1596
|
<div class="searchstax-facet-input">
|
|
1447
1597
|
<input
|
|
1448
1598
|
type="checkbox"
|
|
@@ -1453,65 +1603,72 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1453
1603
|
"
|
|
1454
1604
|
[disabled]="facetValue.disabled"
|
|
1455
1605
|
(click)="
|
|
1456
|
-
selectFacet(
|
|
1606
|
+
selectFacet(facetValueRow, $event, facetValue, true, context)
|
|
1457
1607
|
"
|
|
1458
1608
|
/>
|
|
1459
1609
|
</div>
|
|
1460
1610
|
<div
|
|
1461
1611
|
class="searchstax-facet-value-label"
|
|
1462
|
-
(click)="
|
|
1612
|
+
(click)="
|
|
1613
|
+
selectFacet(facetValueRow, $event, facetValue, false, context)
|
|
1614
|
+
"
|
|
1463
1615
|
>
|
|
1464
1616
|
{{ facetValue.value }}
|
|
1465
1617
|
</div>
|
|
1466
1618
|
<div
|
|
1467
1619
|
class="searchstax-facet-value-count"
|
|
1468
|
-
(click)="
|
|
1620
|
+
(click)="
|
|
1621
|
+
selectFacet(facetValueRow, $event, facetValue, false, context)
|
|
1622
|
+
"
|
|
1469
1623
|
>
|
|
1470
1624
|
({{ facetValue.count }})
|
|
1471
1625
|
</div>
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
>
|
|
1477
|
-
<div
|
|
1478
|
-
class="searchstax-facet-show-more-container"
|
|
1479
|
-
(click)="showMoreLessDesktop($event, facet, context)"
|
|
1480
|
-
(keyup.enter)="showMoreLessDesktop($event, facet, context)"
|
|
1481
|
-
(keyup.space)="showMoreLessDesktop($event, facet, context)"
|
|
1482
|
-
tabindex="0"
|
|
1483
|
-
role="button"
|
|
1484
|
-
>
|
|
1485
|
-
<div
|
|
1486
|
-
*ngIf="facet.showingAllFacets"
|
|
1487
|
-
class="searchstax-facet-show-less-button searchstax-facet-show-button"
|
|
1488
|
-
>
|
|
1489
|
-
less
|
|
1490
|
-
</div>
|
|
1626
|
+
</div>
|
|
1627
|
+
}
|
|
1628
|
+
@if (facet.hasMoreFacets) {
|
|
1629
|
+
<div class="searchstax-facet-show-more-container">
|
|
1491
1630
|
<div
|
|
1492
|
-
|
|
1493
|
-
|
|
1631
|
+
class="searchstax-facet-show-more-container"
|
|
1632
|
+
(click)="showMoreLessDesktop($event, facet, context)"
|
|
1633
|
+
(keyup.enter)="showMoreLessDesktop($event, facet, context)"
|
|
1634
|
+
(keyup.space)="showMoreLessDesktop($event, facet, context)"
|
|
1635
|
+
tabindex="0"
|
|
1636
|
+
role="button"
|
|
1494
1637
|
>
|
|
1495
|
-
|
|
1638
|
+
@if (facet.showingAllFacets) {
|
|
1639
|
+
<div
|
|
1640
|
+
class="searchstax-facet-show-less-button searchstax-facet-show-button"
|
|
1641
|
+
>
|
|
1642
|
+
less
|
|
1643
|
+
</div>
|
|
1644
|
+
}
|
|
1645
|
+
@if (!facet.showingAllFacets) {
|
|
1646
|
+
<div
|
|
1647
|
+
class="searchstax-facet-show-more-button searchstax-facet-show-button"
|
|
1648
|
+
>
|
|
1649
|
+
more
|
|
1650
|
+
</div>
|
|
1651
|
+
}
|
|
1496
1652
|
</div>
|
|
1497
1653
|
</div>
|
|
1498
|
-
|
|
1654
|
+
}
|
|
1499
1655
|
</div>
|
|
1500
1656
|
</div>
|
|
1501
|
-
|
|
1657
|
+
</div>
|
|
1658
|
+
}
|
|
1502
1659
|
</div>
|
|
1503
1660
|
</ng-template>
|
|
1504
1661
|
`,
|
|
1505
1662
|
}]
|
|
1506
1663
|
}], propDecorators: { templateOverrideDesktop: [{
|
|
1507
1664
|
type: ViewChild,
|
|
1508
|
-
args: ["templateOverrideDesktop"]
|
|
1665
|
+
args: ["templateOverrideDesktop", { static: true }]
|
|
1509
1666
|
}] } });
|
|
1510
1667
|
|
|
1511
1668
|
// reusable-template.component.ts
|
|
1512
1669
|
class FacetMobileTemplateComponent {
|
|
1513
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1514
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
1670
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: FacetMobileTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1671
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: FacetMobileTemplateComponent, isStandalone: false, selector: "app-facet-mobile-template", viewQueries: [{ propertyName: "templateOverrideMobile", first: true, predicate: ["templateOverrideMobile"], descendants: true, static: true }], ngImport: i0, template: `
|
|
1515
1672
|
<ng-template
|
|
1516
1673
|
#templateOverrideMobile
|
|
1517
1674
|
let-isNotDeactivated="isNotDeactivated"
|
|
@@ -1539,24 +1696,26 @@ class FacetMobileTemplateComponent {
|
|
|
1539
1696
|
<div class="searchstax-facets-pill-label">Filter By</div>
|
|
1540
1697
|
</div>
|
|
1541
1698
|
<div class="searchstax-facets-pills-selected">
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1699
|
+
@for (facet of selectedFacetsCheckboxes; track $index) {
|
|
1700
|
+
<div
|
|
1701
|
+
class="searchstax-facets-pill searchstax-facets-pill-facets"
|
|
1702
|
+
(click)="unselectFacet(facet, context)"
|
|
1703
|
+
>
|
|
1547
1704
|
<div class="searchstax-facets-pill-label">
|
|
1548
1705
|
{{ facet.value }} ({{ facet.count }})
|
|
1549
1706
|
</div>
|
|
1550
1707
|
<div class="searchstax-facets-pill-icon-close"></div>
|
|
1551
|
-
|
|
1708
|
+
</div>
|
|
1709
|
+
}
|
|
1552
1710
|
</div>
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1711
|
+
@if (selectedFacetsCheckboxes.length) {
|
|
1712
|
+
<div
|
|
1713
|
+
class="searchstax-facets-pill searchstax-clear-filters searchstax-facets-pill-clear-all"
|
|
1714
|
+
(click)="unselectAll(context)"
|
|
1715
|
+
>
|
|
1558
1716
|
<div class="searchstax-facets-pill-label">Clear Filters</div>
|
|
1559
|
-
|
|
1717
|
+
</div>
|
|
1718
|
+
}
|
|
1560
1719
|
</div>
|
|
1561
1720
|
<div
|
|
1562
1721
|
class="searchstax-facets-mobile-overlay"
|
|
@@ -1575,13 +1734,16 @@ class FacetMobileTemplateComponent {
|
|
|
1575
1734
|
></div>
|
|
1576
1735
|
</div>
|
|
1577
1736
|
<div class="searchstax-facets-container-mobile">
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1737
|
+
@for (
|
|
1738
|
+
facet of facetsTemplateDataMobile?.facets ?? [];
|
|
1739
|
+
track facet.name
|
|
1740
|
+
) {
|
|
1741
|
+
<div
|
|
1742
|
+
class="searchstax-facet-container"
|
|
1743
|
+
[class]="{
|
|
1744
|
+
active: isNotDeactivated(facet.name, context)
|
|
1745
|
+
}"
|
|
1746
|
+
>
|
|
1585
1747
|
<div>
|
|
1586
1748
|
<div
|
|
1587
1749
|
class="searchstax-facet-title-container"
|
|
@@ -1596,14 +1758,17 @@ class FacetMobileTemplateComponent {
|
|
|
1596
1758
|
class="searchstax-facet-values-container"
|
|
1597
1759
|
aria-live="polite"
|
|
1598
1760
|
>
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1761
|
+
@for (
|
|
1762
|
+
facetValue of facetValues(facet);
|
|
1763
|
+
track $index
|
|
1764
|
+
) {
|
|
1765
|
+
<div
|
|
1766
|
+
class="searchstax-facet-value-container"
|
|
1767
|
+
[class]="{
|
|
1768
|
+
'searchstax-facet-value-disabled': facetValue.disabled
|
|
1769
|
+
}"
|
|
1770
|
+
#facetValueRow
|
|
1771
|
+
>
|
|
1607
1772
|
<div class="searchstax-facet-input">
|
|
1608
1773
|
<input
|
|
1609
1774
|
type="checkbox"
|
|
@@ -1614,14 +1779,14 @@ class FacetMobileTemplateComponent {
|
|
|
1614
1779
|
"
|
|
1615
1780
|
[disabled]="facetValue.disabled"
|
|
1616
1781
|
(click)="
|
|
1617
|
-
selectFacet(
|
|
1782
|
+
selectFacet(facetValueRow, $event, facetValue, true, context)
|
|
1618
1783
|
"
|
|
1619
1784
|
/>
|
|
1620
1785
|
</div>
|
|
1621
1786
|
<div
|
|
1622
1787
|
class="searchstax-facet-value-label"
|
|
1623
1788
|
(click)="
|
|
1624
|
-
selectFacet(
|
|
1789
|
+
selectFacet(facetValueRow, $event, facetValue, false, context)
|
|
1625
1790
|
"
|
|
1626
1791
|
>
|
|
1627
1792
|
{{ facetValue.value }}
|
|
@@ -1629,40 +1794,43 @@ class FacetMobileTemplateComponent {
|
|
|
1629
1794
|
<div
|
|
1630
1795
|
class="searchstax-facet-value-count"
|
|
1631
1796
|
(click)="
|
|
1632
|
-
selectFacet(
|
|
1797
|
+
selectFacet(facetValueRow, $event, facetValue, false, context)
|
|
1633
1798
|
"
|
|
1634
1799
|
>
|
|
1635
1800
|
({{ facetValue.count }})
|
|
1636
1801
|
</div>
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
>
|
|
1642
|
-
<div
|
|
1643
|
-
class="searchstax-facet-show-more-container"
|
|
1644
|
-
(click)="showMoreLessMobile($event, facet, context)"
|
|
1645
|
-
(keyup.enter)="showMoreLessMobile($event, facet, context)"
|
|
1646
|
-
(keyup.space)="showMoreLessMobile($event, facet, context)"
|
|
1647
|
-
tabindex="0"
|
|
1648
|
-
>
|
|
1649
|
-
<div
|
|
1650
|
-
*ngIf="facet.showingAllFacets"
|
|
1651
|
-
class="searchstax-facet-show-less-button searchstax-facet-show-button"
|
|
1652
|
-
>
|
|
1653
|
-
less
|
|
1654
|
-
</div>
|
|
1802
|
+
</div>
|
|
1803
|
+
}
|
|
1804
|
+
@if (facet.hasMoreFacets) {
|
|
1805
|
+
<div class="searchstax-facet-show-more-container">
|
|
1655
1806
|
<div
|
|
1656
|
-
|
|
1657
|
-
|
|
1807
|
+
class="searchstax-facet-show-more-container"
|
|
1808
|
+
(click)="showMoreLessMobile($event, facet, context)"
|
|
1809
|
+
(keyup.enter)="showMoreLessMobile($event, facet, context)"
|
|
1810
|
+
(keyup.space)="showMoreLessMobile($event, facet, context)"
|
|
1811
|
+
tabindex="0"
|
|
1658
1812
|
>
|
|
1659
|
-
|
|
1813
|
+
@if (facet.showingAllFacets) {
|
|
1814
|
+
<div
|
|
1815
|
+
class="searchstax-facet-show-less-button searchstax-facet-show-button"
|
|
1816
|
+
>
|
|
1817
|
+
less
|
|
1818
|
+
</div>
|
|
1819
|
+
}
|
|
1820
|
+
@if (!facet.showingAllFacets) {
|
|
1821
|
+
<div
|
|
1822
|
+
class="searchstax-facet-show-more-button searchstax-facet-show-button"
|
|
1823
|
+
>
|
|
1824
|
+
more
|
|
1825
|
+
</div>
|
|
1826
|
+
}
|
|
1660
1827
|
</div>
|
|
1661
1828
|
</div>
|
|
1662
|
-
|
|
1829
|
+
}
|
|
1663
1830
|
</div>
|
|
1664
1831
|
</div>
|
|
1665
|
-
|
|
1832
|
+
</div>
|
|
1833
|
+
}
|
|
1666
1834
|
</div>
|
|
1667
1835
|
<button
|
|
1668
1836
|
class="searchstax-facets-mobile-overlay-done"
|
|
@@ -1673,11 +1841,12 @@ class FacetMobileTemplateComponent {
|
|
|
1673
1841
|
</div>
|
|
1674
1842
|
</div>
|
|
1675
1843
|
</ng-template>
|
|
1676
|
-
`, isInline: true
|
|
1844
|
+
`, isInline: true }); }
|
|
1677
1845
|
}
|
|
1678
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
1846
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: FacetMobileTemplateComponent, decorators: [{
|
|
1679
1847
|
type: Component,
|
|
1680
1848
|
args: [{
|
|
1849
|
+
standalone: false,
|
|
1681
1850
|
selector: "app-facet-mobile-template",
|
|
1682
1851
|
template: `
|
|
1683
1852
|
<ng-template
|
|
@@ -1707,24 +1876,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1707
1876
|
<div class="searchstax-facets-pill-label">Filter By</div>
|
|
1708
1877
|
</div>
|
|
1709
1878
|
<div class="searchstax-facets-pills-selected">
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1879
|
+
@for (facet of selectedFacetsCheckboxes; track $index) {
|
|
1880
|
+
<div
|
|
1881
|
+
class="searchstax-facets-pill searchstax-facets-pill-facets"
|
|
1882
|
+
(click)="unselectFacet(facet, context)"
|
|
1883
|
+
>
|
|
1715
1884
|
<div class="searchstax-facets-pill-label">
|
|
1716
1885
|
{{ facet.value }} ({{ facet.count }})
|
|
1717
1886
|
</div>
|
|
1718
1887
|
<div class="searchstax-facets-pill-icon-close"></div>
|
|
1719
|
-
|
|
1888
|
+
</div>
|
|
1889
|
+
}
|
|
1720
1890
|
</div>
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1891
|
+
@if (selectedFacetsCheckboxes.length) {
|
|
1892
|
+
<div
|
|
1893
|
+
class="searchstax-facets-pill searchstax-clear-filters searchstax-facets-pill-clear-all"
|
|
1894
|
+
(click)="unselectAll(context)"
|
|
1895
|
+
>
|
|
1726
1896
|
<div class="searchstax-facets-pill-label">Clear Filters</div>
|
|
1727
|
-
|
|
1897
|
+
</div>
|
|
1898
|
+
}
|
|
1728
1899
|
</div>
|
|
1729
1900
|
<div
|
|
1730
1901
|
class="searchstax-facets-mobile-overlay"
|
|
@@ -1743,13 +1914,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1743
1914
|
></div>
|
|
1744
1915
|
</div>
|
|
1745
1916
|
<div class="searchstax-facets-container-mobile">
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1917
|
+
@for (
|
|
1918
|
+
facet of facetsTemplateDataMobile?.facets ?? [];
|
|
1919
|
+
track facet.name
|
|
1920
|
+
) {
|
|
1921
|
+
<div
|
|
1922
|
+
class="searchstax-facet-container"
|
|
1923
|
+
[class]="{
|
|
1924
|
+
active: isNotDeactivated(facet.name, context)
|
|
1925
|
+
}"
|
|
1926
|
+
>
|
|
1753
1927
|
<div>
|
|
1754
1928
|
<div
|
|
1755
1929
|
class="searchstax-facet-title-container"
|
|
@@ -1764,14 +1938,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1764
1938
|
class="searchstax-facet-values-container"
|
|
1765
1939
|
aria-live="polite"
|
|
1766
1940
|
>
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1941
|
+
@for (
|
|
1942
|
+
facetValue of facetValues(facet);
|
|
1943
|
+
track $index
|
|
1944
|
+
) {
|
|
1945
|
+
<div
|
|
1946
|
+
class="searchstax-facet-value-container"
|
|
1947
|
+
[class]="{
|
|
1948
|
+
'searchstax-facet-value-disabled': facetValue.disabled
|
|
1949
|
+
}"
|
|
1950
|
+
#facetValueRow
|
|
1951
|
+
>
|
|
1775
1952
|
<div class="searchstax-facet-input">
|
|
1776
1953
|
<input
|
|
1777
1954
|
type="checkbox"
|
|
@@ -1782,14 +1959,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1782
1959
|
"
|
|
1783
1960
|
[disabled]="facetValue.disabled"
|
|
1784
1961
|
(click)="
|
|
1785
|
-
selectFacet(
|
|
1962
|
+
selectFacet(facetValueRow, $event, facetValue, true, context)
|
|
1786
1963
|
"
|
|
1787
1964
|
/>
|
|
1788
1965
|
</div>
|
|
1789
1966
|
<div
|
|
1790
1967
|
class="searchstax-facet-value-label"
|
|
1791
1968
|
(click)="
|
|
1792
|
-
selectFacet(
|
|
1969
|
+
selectFacet(facetValueRow, $event, facetValue, false, context)
|
|
1793
1970
|
"
|
|
1794
1971
|
>
|
|
1795
1972
|
{{ facetValue.value }}
|
|
@@ -1797,40 +1974,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1797
1974
|
<div
|
|
1798
1975
|
class="searchstax-facet-value-count"
|
|
1799
1976
|
(click)="
|
|
1800
|
-
selectFacet(
|
|
1977
|
+
selectFacet(facetValueRow, $event, facetValue, false, context)
|
|
1801
1978
|
"
|
|
1802
1979
|
>
|
|
1803
1980
|
({{ facetValue.count }})
|
|
1804
1981
|
</div>
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
>
|
|
1810
|
-
<div
|
|
1811
|
-
class="searchstax-facet-show-more-container"
|
|
1812
|
-
(click)="showMoreLessMobile($event, facet, context)"
|
|
1813
|
-
(keyup.enter)="showMoreLessMobile($event, facet, context)"
|
|
1814
|
-
(keyup.space)="showMoreLessMobile($event, facet, context)"
|
|
1815
|
-
tabindex="0"
|
|
1816
|
-
>
|
|
1982
|
+
</div>
|
|
1983
|
+
}
|
|
1984
|
+
@if (facet.hasMoreFacets) {
|
|
1985
|
+
<div class="searchstax-facet-show-more-container">
|
|
1817
1986
|
<div
|
|
1818
|
-
|
|
1819
|
-
|
|
1987
|
+
class="searchstax-facet-show-more-container"
|
|
1988
|
+
(click)="showMoreLessMobile($event, facet, context)"
|
|
1989
|
+
(keyup.enter)="showMoreLessMobile($event, facet, context)"
|
|
1990
|
+
(keyup.space)="showMoreLessMobile($event, facet, context)"
|
|
1991
|
+
tabindex="0"
|
|
1820
1992
|
>
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1993
|
+
@if (facet.showingAllFacets) {
|
|
1994
|
+
<div
|
|
1995
|
+
class="searchstax-facet-show-less-button searchstax-facet-show-button"
|
|
1996
|
+
>
|
|
1997
|
+
less
|
|
1998
|
+
</div>
|
|
1999
|
+
}
|
|
2000
|
+
@if (!facet.showingAllFacets) {
|
|
2001
|
+
<div
|
|
2002
|
+
class="searchstax-facet-show-more-button searchstax-facet-show-button"
|
|
2003
|
+
>
|
|
2004
|
+
more
|
|
2005
|
+
</div>
|
|
2006
|
+
}
|
|
1828
2007
|
</div>
|
|
1829
2008
|
</div>
|
|
1830
|
-
|
|
2009
|
+
}
|
|
1831
2010
|
</div>
|
|
1832
2011
|
</div>
|
|
1833
|
-
|
|
2012
|
+
</div>
|
|
2013
|
+
}
|
|
1834
2014
|
</div>
|
|
1835
2015
|
<button
|
|
1836
2016
|
class="searchstax-facets-mobile-overlay-done"
|
|
@@ -1845,13 +2025,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1845
2025
|
}]
|
|
1846
2026
|
}], propDecorators: { templateOverrideMobile: [{
|
|
1847
2027
|
type: ViewChild,
|
|
1848
|
-
args: ["templateOverrideMobile"]
|
|
2028
|
+
args: ["templateOverrideMobile", { static: true }]
|
|
1849
2029
|
}] } });
|
|
1850
2030
|
|
|
1851
2031
|
class SearchstaxSearchFacetsWidget {
|
|
1852
2032
|
// @ViewChildren("facetContainers") facetContainers: QueryList<ElementRef>;
|
|
1853
|
-
constructor(storeServiceService) {
|
|
2033
|
+
constructor(storeServiceService, ngZone, cdr) {
|
|
1854
2034
|
this.storeServiceService = storeServiceService;
|
|
2035
|
+
this.ngZone = ngZone;
|
|
2036
|
+
this.cdr = cdr;
|
|
1855
2037
|
this.facetsTemplateDataDesktop = null;
|
|
1856
2038
|
this.facetsTemplateDataMobile = null;
|
|
1857
2039
|
this.context = this;
|
|
@@ -1861,7 +2043,9 @@ class SearchstaxSearchFacetsWidget {
|
|
|
1861
2043
|
}
|
|
1862
2044
|
ngOnInit() {
|
|
1863
2045
|
if (this.storeServiceService.searchstax) {
|
|
1864
|
-
this.
|
|
2046
|
+
this.storeServiceService.whenDataLayerReady(() => {
|
|
2047
|
+
this.attachObservables();
|
|
2048
|
+
});
|
|
1865
2049
|
setTimeout(() => {
|
|
1866
2050
|
this.addWidget();
|
|
1867
2051
|
}, 0);
|
|
@@ -1882,18 +2066,18 @@ class SearchstaxSearchFacetsWidget {
|
|
|
1882
2066
|
});
|
|
1883
2067
|
}
|
|
1884
2068
|
attachObservables() {
|
|
1885
|
-
this.storeServiceService.searchstax.dataLayer.$facetsTemplateData
|
|
2069
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$facetsTemplateData, (data) => {
|
|
1886
2070
|
if (data?.isMobile) {
|
|
1887
2071
|
this.facetsTemplateDataMobile = data;
|
|
1888
2072
|
}
|
|
1889
2073
|
else {
|
|
1890
2074
|
this.facetsTemplateDataDesktop = data;
|
|
1891
2075
|
}
|
|
1892
|
-
});
|
|
1893
|
-
this.storeServiceService.searchstax.dataLayer.$selectedFacetsTemplateData
|
|
2076
|
+
}, this.cdr);
|
|
2077
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$selectedFacetsTemplateData, (data) => {
|
|
1894
2078
|
const da = data ?? [];
|
|
1895
|
-
this.selectedFacetsCheckboxes = da.filter((d) => d.type ===
|
|
1896
|
-
});
|
|
2079
|
+
this.selectedFacetsCheckboxes = da.filter((d) => d.type === "checkbox");
|
|
2080
|
+
}, this.cdr);
|
|
1897
2081
|
}
|
|
1898
2082
|
unselectFacet(facet, context) {
|
|
1899
2083
|
context.storeServiceService.searchstax.searchFacetsWidget?.unselectFacet(facet);
|
|
@@ -1939,13 +2123,13 @@ class SearchstaxSearchFacetsWidget {
|
|
|
1939
2123
|
facetMobileData(facet) {
|
|
1940
2124
|
return facet;
|
|
1941
2125
|
}
|
|
1942
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1943
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2126
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxSearchFacetsWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2127
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", 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" }] }); }
|
|
1944
2128
|
}
|
|
1945
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxSearchFacetsWidget, decorators: [{
|
|
1946
2130
|
type: Component,
|
|
1947
|
-
args: [{ selector: "app-searchstax-search-facets", template: "<div [id]=\"'searchstax-facets-container' + rand\">\n
|
|
1948
|
-
}], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { templateOverrideMobile: [{
|
|
2131
|
+
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" }]
|
|
2132
|
+
}], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { templateOverrideMobile: [{
|
|
1949
2133
|
type: Input
|
|
1950
2134
|
}], templateOverrideDesktop: [{
|
|
1951
2135
|
type: Input
|
|
@@ -1963,8 +2147,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1963
2147
|
|
|
1964
2148
|
// reusable-template.component.ts
|
|
1965
2149
|
class SortingTemplateComponent {
|
|
1966
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
1967
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2150
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SortingTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2151
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: SortingTemplateComponent, isStandalone: false, selector: "app-sorting-template", viewQueries: [{ propertyName: "sortingTemplate", first: true, predicate: ["sortingTemplateOverride"], descendants: true, static: true }], ngImport: i0, template: `
|
|
1968
2152
|
<ng-template
|
|
1969
2153
|
#sortingTemplateOverride
|
|
1970
2154
|
let-selectedSorting="selectedSorting"
|
|
@@ -1983,20 +2167,23 @@ class SortingTemplateComponent {
|
|
|
1983
2167
|
[(ngModel)]="context.selectedSorting"
|
|
1984
2168
|
(change)="orderChange($event, context)"
|
|
1985
2169
|
>
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
2170
|
+
@for (
|
|
2171
|
+
sortOption of context.sortingData?.sortOptions ?? [];
|
|
2172
|
+
track sortOption.key
|
|
2173
|
+
) {
|
|
2174
|
+
<option [value]="sortOption.key">
|
|
2175
|
+
{{ sortOption.value }}
|
|
2176
|
+
</option>
|
|
2177
|
+
}
|
|
1992
2178
|
</select>
|
|
1993
2179
|
</div>
|
|
1994
2180
|
</ng-template>
|
|
1995
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
|
2181
|
+
`, 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])[formControlName],select:not([multiple])[formControl],select:not([multiple])[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"] }] }); }
|
|
1996
2182
|
}
|
|
1997
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SortingTemplateComponent, decorators: [{
|
|
1998
2184
|
type: Component,
|
|
1999
2185
|
args: [{
|
|
2186
|
+
standalone: false,
|
|
2000
2187
|
selector: "app-sorting-template",
|
|
2001
2188
|
template: `
|
|
2002
2189
|
<ng-template
|
|
@@ -2017,12 +2204,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2017
2204
|
[(ngModel)]="context.selectedSorting"
|
|
2018
2205
|
(change)="orderChange($event, context)"
|
|
2019
2206
|
>
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2207
|
+
@for (
|
|
2208
|
+
sortOption of context.sortingData?.sortOptions ?? [];
|
|
2209
|
+
track sortOption.key
|
|
2210
|
+
) {
|
|
2211
|
+
<option [value]="sortOption.key">
|
|
2212
|
+
{{ sortOption.value }}
|
|
2213
|
+
</option>
|
|
2214
|
+
}
|
|
2026
2215
|
</select>
|
|
2027
2216
|
</div>
|
|
2028
2217
|
</ng-template>
|
|
@@ -2030,12 +2219,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2030
2219
|
}]
|
|
2031
2220
|
}], propDecorators: { sortingTemplate: [{
|
|
2032
2221
|
type: ViewChild,
|
|
2033
|
-
args: ["sortingTemplateOverride"]
|
|
2222
|
+
args: ["sortingTemplateOverride", { static: true }]
|
|
2034
2223
|
}] } });
|
|
2035
2224
|
|
|
2036
2225
|
class SearchstaxSearchSortingWidget {
|
|
2037
|
-
constructor(storeServiceService) {
|
|
2226
|
+
constructor(storeServiceService, ngZone, cdr) {
|
|
2038
2227
|
this.storeServiceService = storeServiceService;
|
|
2228
|
+
this.ngZone = ngZone;
|
|
2229
|
+
this.cdr = cdr;
|
|
2039
2230
|
this.sortingData = null;
|
|
2040
2231
|
this.rand = Math.random();
|
|
2041
2232
|
this.context = this;
|
|
@@ -2043,7 +2234,9 @@ class SearchstaxSearchSortingWidget {
|
|
|
2043
2234
|
}
|
|
2044
2235
|
ngOnInit() {
|
|
2045
2236
|
if (this.storeServiceService.searchstax) {
|
|
2046
|
-
this.
|
|
2237
|
+
this.storeServiceService.whenDataLayerReady(() => {
|
|
2238
|
+
this.attachObservables();
|
|
2239
|
+
});
|
|
2047
2240
|
setTimeout(() => {
|
|
2048
2241
|
this.storeServiceService.searchstax.addSearchSortingWidget("search-sorting-container" + this.rand, {});
|
|
2049
2242
|
}, 0);
|
|
@@ -2057,27 +2250,27 @@ class SearchstaxSearchSortingWidget {
|
|
|
2057
2250
|
context.storeServiceService.searchstax.searchSortingWidget?.setOrderQuery(e.target.value);
|
|
2058
2251
|
}
|
|
2059
2252
|
attachObservables() {
|
|
2060
|
-
this.storeServiceService.searchstax.dataLayer.$searchSortingData
|
|
2253
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchSortingData, (sortingData) => {
|
|
2061
2254
|
this.sortingData = sortingData;
|
|
2062
|
-
});
|
|
2063
|
-
this.storeServiceService.searchstax.dataLayer.$searchObject
|
|
2064
|
-
this.selectedSorting = decodeURIComponent(searchObject?.order ??
|
|
2065
|
-
});
|
|
2255
|
+
}, this.cdr);
|
|
2256
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchObject, (searchObject) => {
|
|
2257
|
+
this.selectedSorting = decodeURIComponent(searchObject?.order ?? "");
|
|
2258
|
+
}, this.cdr);
|
|
2066
2259
|
}
|
|
2067
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2068
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2260
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxSearchSortingWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2261
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", 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" }] }); }
|
|
2069
2262
|
}
|
|
2070
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2263
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxSearchSortingWidget, decorators: [{
|
|
2071
2264
|
type: Component,
|
|
2072
|
-
args: [{ selector: "app-searchstax-search-sorting", template: "<div class=\"search-feedback-container\" [id]=\"'search-sorting-container' + rand\">\n
|
|
2073
|
-
}], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { templateOverride: [{
|
|
2265
|
+
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" }]
|
|
2266
|
+
}], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { templateOverride: [{
|
|
2074
2267
|
type: Input
|
|
2075
2268
|
}] } });
|
|
2076
2269
|
|
|
2077
2270
|
// reusable-template.component.ts
|
|
2078
2271
|
class AnswerTemplateComponent {
|
|
2079
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2080
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2272
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: AnswerTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2273
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: AnswerTemplateComponent, isStandalone: false, selector: "app-answer-template", viewQueries: [{ propertyName: "answerTemplate", first: true, predicate: ["answerTemplate"], descendants: true, static: true }], ngImport: i0, template: `
|
|
2081
2274
|
<ng-template
|
|
2082
2275
|
#answerTemplate
|
|
2083
2276
|
let-answerData="answerData"
|
|
@@ -2094,31 +2287,30 @@ class AnswerTemplateComponent {
|
|
|
2094
2287
|
}"
|
|
2095
2288
|
>
|
|
2096
2289
|
<div class="searchstax-answer-title">Smart Answers</div>
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2290
|
+
@if (answerData.shouldShowAnswerError) {
|
|
2291
|
+
<div
|
|
2292
|
+
class="searchstax-answer-error"
|
|
2293
|
+
[innerHTML]="answerData.answerErrorMessage"
|
|
2294
|
+
></div>
|
|
2295
|
+
}
|
|
2102
2296
|
<div
|
|
2103
2297
|
class="searchstax-answer-description"
|
|
2104
2298
|
[innerHTML]="answerData.fullAnswerFormatted"
|
|
2105
2299
|
></div>
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
></div>
|
|
2110
|
-
</div>
|
|
2111
|
-
<div
|
|
2112
|
-
*ngIf="answerData.showMoreButtonVisible"
|
|
2113
|
-
class="searchstax-answer-load-more-button-container"
|
|
2114
|
-
>
|
|
2115
|
-
<button
|
|
2116
|
-
class="searchstax-answer-load-more-button"
|
|
2117
|
-
(click)="showMore($event, context)"
|
|
2118
|
-
>
|
|
2119
|
-
Show More
|
|
2120
|
-
</button>
|
|
2300
|
+
@if (answerData.answerLoading) {
|
|
2301
|
+
<div class="searchstax-answer-loading"></div>
|
|
2302
|
+
}
|
|
2121
2303
|
</div>
|
|
2304
|
+
@if (answerData.showMoreButtonVisible) {
|
|
2305
|
+
<div class="searchstax-answer-load-more-button-container">
|
|
2306
|
+
<button
|
|
2307
|
+
class="searchstax-answer-load-more-button"
|
|
2308
|
+
(click)="showMore($event, context)"
|
|
2309
|
+
>
|
|
2310
|
+
Show More
|
|
2311
|
+
</button>
|
|
2312
|
+
</div>
|
|
2313
|
+
}
|
|
2122
2314
|
</div>
|
|
2123
2315
|
<div class="searchstax-answer-footer">
|
|
2124
2316
|
<div id="feedbackWidgetContainer"></div>
|
|
@@ -2127,11 +2319,12 @@ class AnswerTemplateComponent {
|
|
|
2127
2319
|
</div>
|
|
2128
2320
|
</div>
|
|
2129
2321
|
</ng-template>
|
|
2130
|
-
`, isInline: true
|
|
2322
|
+
`, isInline: true }); }
|
|
2131
2323
|
}
|
|
2132
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2324
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: AnswerTemplateComponent, decorators: [{
|
|
2133
2325
|
type: Component,
|
|
2134
2326
|
args: [{
|
|
2327
|
+
standalone: false,
|
|
2135
2328
|
selector: "app-answer-template",
|
|
2136
2329
|
template: `
|
|
2137
2330
|
<ng-template
|
|
@@ -2150,31 +2343,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2150
2343
|
}"
|
|
2151
2344
|
>
|
|
2152
2345
|
<div class="searchstax-answer-title">Smart Answers</div>
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2346
|
+
@if (answerData.shouldShowAnswerError) {
|
|
2347
|
+
<div
|
|
2348
|
+
class="searchstax-answer-error"
|
|
2349
|
+
[innerHTML]="answerData.answerErrorMessage"
|
|
2350
|
+
></div>
|
|
2351
|
+
}
|
|
2158
2352
|
<div
|
|
2159
2353
|
class="searchstax-answer-description"
|
|
2160
2354
|
[innerHTML]="answerData.fullAnswerFormatted"
|
|
2161
2355
|
></div>
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
></div>
|
|
2166
|
-
</div>
|
|
2167
|
-
<div
|
|
2168
|
-
*ngIf="answerData.showMoreButtonVisible"
|
|
2169
|
-
class="searchstax-answer-load-more-button-container"
|
|
2170
|
-
>
|
|
2171
|
-
<button
|
|
2172
|
-
class="searchstax-answer-load-more-button"
|
|
2173
|
-
(click)="showMore($event, context)"
|
|
2174
|
-
>
|
|
2175
|
-
Show More
|
|
2176
|
-
</button>
|
|
2356
|
+
@if (answerData.answerLoading) {
|
|
2357
|
+
<div class="searchstax-answer-loading"></div>
|
|
2358
|
+
}
|
|
2177
2359
|
</div>
|
|
2360
|
+
@if (answerData.showMoreButtonVisible) {
|
|
2361
|
+
<div class="searchstax-answer-load-more-button-container">
|
|
2362
|
+
<button
|
|
2363
|
+
class="searchstax-answer-load-more-button"
|
|
2364
|
+
(click)="showMore($event, context)"
|
|
2365
|
+
>
|
|
2366
|
+
Show More
|
|
2367
|
+
</button>
|
|
2368
|
+
</div>
|
|
2369
|
+
}
|
|
2178
2370
|
</div>
|
|
2179
2371
|
<div class="searchstax-answer-footer">
|
|
2180
2372
|
<div id="feedbackWidgetContainer"></div>
|
|
@@ -2187,19 +2379,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2187
2379
|
}]
|
|
2188
2380
|
}], propDecorators: { answerTemplate: [{
|
|
2189
2381
|
type: ViewChild,
|
|
2190
|
-
args: ["answerTemplate"]
|
|
2382
|
+
args: ["answerTemplate", { static: true }]
|
|
2191
2383
|
}] } });
|
|
2192
2384
|
|
|
2193
2385
|
class SearchstaxSearchAnswerWidget {
|
|
2194
|
-
constructor(storeServiceService) {
|
|
2386
|
+
constructor(storeServiceService, ngZone, cdr) {
|
|
2195
2387
|
this.storeServiceService = storeServiceService;
|
|
2388
|
+
this.ngZone = ngZone;
|
|
2389
|
+
this.cdr = cdr;
|
|
2196
2390
|
this.answerData = null;
|
|
2197
2391
|
this.rand = Math.random();
|
|
2198
2392
|
this.context = this;
|
|
2199
2393
|
}
|
|
2200
2394
|
ngOnInit() {
|
|
2201
2395
|
if (this.storeServiceService.searchstax) {
|
|
2202
|
-
this.
|
|
2396
|
+
this.storeServiceService.whenDataLayerReady(() => {
|
|
2397
|
+
this.attachObservables();
|
|
2398
|
+
});
|
|
2203
2399
|
setTimeout(() => {
|
|
2204
2400
|
this.storeServiceService.searchstax.addAnswerWidget('searchstax-answer-container' + this.rand, { showMoreAfterWordCount: this.showMoreAfterWordCount, feedbackwidget: this.feedbackwidget, testString: this.testString });
|
|
2205
2401
|
}, 0);
|
|
@@ -2214,17 +2410,17 @@ class SearchstaxSearchAnswerWidget {
|
|
|
2214
2410
|
}
|
|
2215
2411
|
}
|
|
2216
2412
|
attachObservables() {
|
|
2217
|
-
this.storeServiceService.searchstax.dataLayer.$answerData
|
|
2413
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$answerData, (answerData) => {
|
|
2218
2414
|
this.answerData = answerData;
|
|
2219
|
-
});
|
|
2415
|
+
}, this.cdr);
|
|
2220
2416
|
}
|
|
2221
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2222
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2417
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxSearchAnswerWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2418
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", 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" }] }); }
|
|
2223
2419
|
}
|
|
2224
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2420
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxSearchAnswerWidget, decorators: [{
|
|
2225
2421
|
type: Component,
|
|
2226
|
-
args: [{ selector: "app-searchstax-answer", template: "<div [id]=\"'searchstax-answer-container' + rand\">\n
|
|
2227
|
-
}], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { templateOverride: [{
|
|
2422
|
+
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" }]
|
|
2423
|
+
}], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { templateOverride: [{
|
|
2228
2424
|
type: Input
|
|
2229
2425
|
}], feedbackwidget: [{
|
|
2230
2426
|
type: Input
|
|
@@ -2236,8 +2432,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2236
2432
|
|
|
2237
2433
|
// reusable-template.component.ts
|
|
2238
2434
|
class RelatedTemplateComponent {
|
|
2239
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2240
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2435
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: RelatedTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2436
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: RelatedTemplateComponent, isStandalone: false, selector: "app-related-template", viewQueries: [{ propertyName: "relatedTemplate", first: true, predicate: ["relatedTemplate"], descendants: true, static: true }], ngImport: i0, template: `
|
|
2241
2437
|
<ng-template
|
|
2242
2438
|
#relatedTemplate
|
|
2243
2439
|
let-rand="rand"
|
|
@@ -2250,29 +2446,36 @@ class RelatedTemplateComponent {
|
|
|
2250
2446
|
[id]="'searchstax-related-searches-container' + rand"
|
|
2251
2447
|
>
|
|
2252
2448
|
Related searches: <span id="searchstax-related-searches"></span>
|
|
2253
|
-
|
|
2254
|
-
class="searchstax-related-search"
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2449
|
+
@if (relatedData.relatedSearches) {
|
|
2450
|
+
<span class="searchstax-related-search">
|
|
2451
|
+
@for (
|
|
2452
|
+
related of relatedData.relatedSearches;
|
|
2453
|
+
track $index
|
|
2454
|
+
) {
|
|
2455
|
+
<span
|
|
2456
|
+
(click)="executeSearch(related, context)"
|
|
2457
|
+
(keyup.enter)="executeSearch(related, context)"
|
|
2458
|
+
(keyup.space)="executeSearch(related, context)"
|
|
2459
|
+
tabindex="0"
|
|
2460
|
+
class="searchstax-related-search searchstax-related-search-item"
|
|
2461
|
+
[attr.aria-label]="'Related search: ' + related.related_search"
|
|
2462
|
+
>
|
|
2463
|
+
{{ related.related_search }}
|
|
2464
|
+
@if (!related.last) {
|
|
2465
|
+
<span>,</span>
|
|
2466
|
+
}
|
|
2467
|
+
</span>
|
|
2468
|
+
}
|
|
2267
2469
|
</span>
|
|
2268
|
-
|
|
2470
|
+
}
|
|
2269
2471
|
</div>
|
|
2270
2472
|
</ng-template>
|
|
2271
|
-
`, isInline: true
|
|
2473
|
+
`, isInline: true }); }
|
|
2272
2474
|
}
|
|
2273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2475
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: RelatedTemplateComponent, decorators: [{
|
|
2274
2476
|
type: Component,
|
|
2275
2477
|
args: [{
|
|
2478
|
+
standalone: false,
|
|
2276
2479
|
selector: "app-related-template",
|
|
2277
2480
|
template: `
|
|
2278
2481
|
<ng-template
|
|
@@ -2287,41 +2490,51 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2287
2490
|
[id]="'searchstax-related-searches-container' + rand"
|
|
2288
2491
|
>
|
|
2289
2492
|
Related searches: <span id="searchstax-related-searches"></span>
|
|
2290
|
-
|
|
2291
|
-
class="searchstax-related-search"
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2493
|
+
@if (relatedData.relatedSearches) {
|
|
2494
|
+
<span class="searchstax-related-search">
|
|
2495
|
+
@for (
|
|
2496
|
+
related of relatedData.relatedSearches;
|
|
2497
|
+
track $index
|
|
2498
|
+
) {
|
|
2499
|
+
<span
|
|
2500
|
+
(click)="executeSearch(related, context)"
|
|
2501
|
+
(keyup.enter)="executeSearch(related, context)"
|
|
2502
|
+
(keyup.space)="executeSearch(related, context)"
|
|
2503
|
+
tabindex="0"
|
|
2504
|
+
class="searchstax-related-search searchstax-related-search-item"
|
|
2505
|
+
[attr.aria-label]="'Related search: ' + related.related_search"
|
|
2506
|
+
>
|
|
2507
|
+
{{ related.related_search }}
|
|
2508
|
+
@if (!related.last) {
|
|
2509
|
+
<span>,</span>
|
|
2510
|
+
}
|
|
2511
|
+
</span>
|
|
2512
|
+
}
|
|
2304
2513
|
</span>
|
|
2305
|
-
|
|
2514
|
+
}
|
|
2306
2515
|
</div>
|
|
2307
2516
|
</ng-template>
|
|
2308
2517
|
`,
|
|
2309
2518
|
}]
|
|
2310
2519
|
}], propDecorators: { relatedTemplate: [{
|
|
2311
2520
|
type: ViewChild,
|
|
2312
|
-
args: ["relatedTemplate"]
|
|
2521
|
+
args: ["relatedTemplate", { static: true }]
|
|
2313
2522
|
}] } });
|
|
2314
2523
|
|
|
2315
2524
|
class SearchstaxSearchRelatedSearchesWidget {
|
|
2316
|
-
constructor(storeServiceService) {
|
|
2525
|
+
constructor(storeServiceService, ngZone, cdr) {
|
|
2317
2526
|
this.storeServiceService = storeServiceService;
|
|
2527
|
+
this.ngZone = ngZone;
|
|
2528
|
+
this.cdr = cdr;
|
|
2318
2529
|
this.relatedData = null;
|
|
2319
2530
|
this.rand = Math.random();
|
|
2320
2531
|
this.context = this;
|
|
2321
2532
|
}
|
|
2322
2533
|
ngOnInit() {
|
|
2323
2534
|
if (this.storeServiceService.searchstax) {
|
|
2324
|
-
this.
|
|
2535
|
+
this.storeServiceService.whenDataLayerReady(() => {
|
|
2536
|
+
this.attachObservables();
|
|
2537
|
+
});
|
|
2325
2538
|
setTimeout(() => {
|
|
2326
2539
|
this.storeServiceService.searchstax.addRelatedSearchesWidget("searchstax-related-searches-container" + this.rand, { relatedSearchesURL: this.relatedSearchesURL ?? "", relatedSearchesAPIKey: this.relatedSearchesAPIKey ?? "" });
|
|
2327
2540
|
}, 0);
|
|
@@ -2334,17 +2547,17 @@ class SearchstaxSearchRelatedSearchesWidget {
|
|
|
2334
2547
|
context.storeServiceService.searchstax.relatedSearchesWidget?.executeSearch(result);
|
|
2335
2548
|
}
|
|
2336
2549
|
attachObservables() {
|
|
2337
|
-
this.storeServiceService.searchstax.dataLayer.$searchRelatedSearchesData
|
|
2550
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchRelatedSearchesData, (relatedData) => {
|
|
2338
2551
|
this.relatedData = relatedData;
|
|
2339
|
-
});
|
|
2552
|
+
}, this.cdr);
|
|
2340
2553
|
}
|
|
2341
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2342
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2554
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxSearchRelatedSearchesWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2555
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", 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" }] }); }
|
|
2343
2556
|
}
|
|
2344
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2557
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxSearchRelatedSearchesWidget, decorators: [{
|
|
2345
2558
|
type: Component,
|
|
2346
|
-
args: [{ selector: "app-searchstax-related-searches", template: "
|
|
2347
|
-
}], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { relatedSearchesURL: [{
|
|
2559
|
+
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" }]
|
|
2560
|
+
}], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { relatedSearchesURL: [{
|
|
2348
2561
|
type: Input
|
|
2349
2562
|
}], relatedSearchesAPIKey: [{
|
|
2350
2563
|
type: Input
|
|
@@ -2354,8 +2567,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2354
2567
|
|
|
2355
2568
|
// reusable-template.component.ts
|
|
2356
2569
|
class ExternalPromotionsTemplateComponent {
|
|
2357
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2358
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2570
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: ExternalPromotionsTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2571
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: ExternalPromotionsTemplateComponent, isStandalone: false, selector: "app-external-template", viewQueries: [{ propertyName: "externalPromotionsTemplate", first: true, predicate: ["externalPromotionsTemplate"], descendants: true, static: true }], ngImport: i0, template: `
|
|
2359
2572
|
<ng-template
|
|
2360
2573
|
#externalPromotionsTemplate
|
|
2361
2574
|
let-context="context"
|
|
@@ -2366,44 +2579,51 @@ class ExternalPromotionsTemplateComponent {
|
|
|
2366
2579
|
class="searchstax-external-promotions-container"
|
|
2367
2580
|
id="searchstax-external-promotions-container"
|
|
2368
2581
|
>
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
<a
|
|
2377
|
-
*ngIf="externalPromotion.url"
|
|
2378
|
-
[href]="externalPromotion.url"
|
|
2379
|
-
(click)="trackClick(externalPromotion, $event, context)"
|
|
2380
|
-
class="searchstax-result-item-link"
|
|
2381
|
-
></a>
|
|
2382
|
-
<div class="searchstax-search-result-title-container">
|
|
2383
|
-
<span class="searchstax-search-result-title">{{
|
|
2384
|
-
externalPromotion.name
|
|
2385
|
-
}}</span>
|
|
2386
|
-
</div>
|
|
2387
|
-
<p
|
|
2388
|
-
*ngIf="externalPromotion.description"
|
|
2389
|
-
class="searchstax-search-result-description searchstax-search-result-common"
|
|
2390
|
-
>
|
|
2391
|
-
{{ externalPromotion.description }}
|
|
2392
|
-
</p>
|
|
2393
|
-
<p
|
|
2394
|
-
*ngIf="externalPromotion.url"
|
|
2395
|
-
class="searchstax-search-result-description searchstax-search-result-common"
|
|
2582
|
+
@for (
|
|
2583
|
+
externalPromotion of externalPromotionsData?.externalPromotions ??
|
|
2584
|
+
[];
|
|
2585
|
+
track $index
|
|
2586
|
+
) {
|
|
2587
|
+
<div
|
|
2588
|
+
class="searchstax-external-promotion searchstax-search-result"
|
|
2396
2589
|
>
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2590
|
+
<div class="icon-elevated"></div>
|
|
2591
|
+
@if (externalPromotion.url) {
|
|
2592
|
+
<a
|
|
2593
|
+
[href]="externalPromotion.url"
|
|
2594
|
+
(click)="trackClick(externalPromotion, $event, context)"
|
|
2595
|
+
class="searchstax-result-item-link"
|
|
2596
|
+
></a>
|
|
2597
|
+
}
|
|
2598
|
+
<div class="searchstax-search-result-title-container">
|
|
2599
|
+
<span class="searchstax-search-result-title">{{
|
|
2600
|
+
externalPromotion.name
|
|
2601
|
+
}}</span>
|
|
2602
|
+
</div>
|
|
2603
|
+
@if (externalPromotion.description) {
|
|
2604
|
+
<p
|
|
2605
|
+
class="searchstax-search-result-description searchstax-search-result-common"
|
|
2606
|
+
>
|
|
2607
|
+
{{ externalPromotion.description }}
|
|
2608
|
+
</p>
|
|
2609
|
+
}
|
|
2610
|
+
@if (externalPromotion.url) {
|
|
2611
|
+
<p
|
|
2612
|
+
class="searchstax-search-result-description searchstax-search-result-common"
|
|
2613
|
+
>
|
|
2614
|
+
{{ externalPromotion.url }}
|
|
2615
|
+
</p>
|
|
2616
|
+
}
|
|
2617
|
+
</div>
|
|
2618
|
+
}
|
|
2400
2619
|
</div>
|
|
2401
2620
|
</ng-template>
|
|
2402
|
-
`, isInline: true
|
|
2621
|
+
`, isInline: true }); }
|
|
2403
2622
|
}
|
|
2404
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2623
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: ExternalPromotionsTemplateComponent, decorators: [{
|
|
2405
2624
|
type: Component,
|
|
2406
2625
|
args: [{
|
|
2626
|
+
standalone: false,
|
|
2407
2627
|
selector: "app-external-template",
|
|
2408
2628
|
template: `
|
|
2409
2629
|
<ng-template
|
|
@@ -2416,56 +2636,66 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
2416
2636
|
class="searchstax-external-promotions-container"
|
|
2417
2637
|
id="searchstax-external-promotions-container"
|
|
2418
2638
|
>
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
<a
|
|
2427
|
-
*ngIf="externalPromotion.url"
|
|
2428
|
-
[href]="externalPromotion.url"
|
|
2429
|
-
(click)="trackClick(externalPromotion, $event, context)"
|
|
2430
|
-
class="searchstax-result-item-link"
|
|
2431
|
-
></a>
|
|
2432
|
-
<div class="searchstax-search-result-title-container">
|
|
2433
|
-
<span class="searchstax-search-result-title">{{
|
|
2434
|
-
externalPromotion.name
|
|
2435
|
-
}}</span>
|
|
2436
|
-
</div>
|
|
2437
|
-
<p
|
|
2438
|
-
*ngIf="externalPromotion.description"
|
|
2439
|
-
class="searchstax-search-result-description searchstax-search-result-common"
|
|
2440
|
-
>
|
|
2441
|
-
{{ externalPromotion.description }}
|
|
2442
|
-
</p>
|
|
2443
|
-
<p
|
|
2444
|
-
*ngIf="externalPromotion.url"
|
|
2445
|
-
class="searchstax-search-result-description searchstax-search-result-common"
|
|
2639
|
+
@for (
|
|
2640
|
+
externalPromotion of externalPromotionsData?.externalPromotions ??
|
|
2641
|
+
[];
|
|
2642
|
+
track $index
|
|
2643
|
+
) {
|
|
2644
|
+
<div
|
|
2645
|
+
class="searchstax-external-promotion searchstax-search-result"
|
|
2446
2646
|
>
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2647
|
+
<div class="icon-elevated"></div>
|
|
2648
|
+
@if (externalPromotion.url) {
|
|
2649
|
+
<a
|
|
2650
|
+
[href]="externalPromotion.url"
|
|
2651
|
+
(click)="trackClick(externalPromotion, $event, context)"
|
|
2652
|
+
class="searchstax-result-item-link"
|
|
2653
|
+
></a>
|
|
2654
|
+
}
|
|
2655
|
+
<div class="searchstax-search-result-title-container">
|
|
2656
|
+
<span class="searchstax-search-result-title">{{
|
|
2657
|
+
externalPromotion.name
|
|
2658
|
+
}}</span>
|
|
2659
|
+
</div>
|
|
2660
|
+
@if (externalPromotion.description) {
|
|
2661
|
+
<p
|
|
2662
|
+
class="searchstax-search-result-description searchstax-search-result-common"
|
|
2663
|
+
>
|
|
2664
|
+
{{ externalPromotion.description }}
|
|
2665
|
+
</p>
|
|
2666
|
+
}
|
|
2667
|
+
@if (externalPromotion.url) {
|
|
2668
|
+
<p
|
|
2669
|
+
class="searchstax-search-result-description searchstax-search-result-common"
|
|
2670
|
+
>
|
|
2671
|
+
{{ externalPromotion.url }}
|
|
2672
|
+
</p>
|
|
2673
|
+
}
|
|
2674
|
+
</div>
|
|
2675
|
+
}
|
|
2450
2676
|
</div>
|
|
2451
2677
|
</ng-template>
|
|
2452
2678
|
`,
|
|
2453
2679
|
}]
|
|
2454
2680
|
}], propDecorators: { externalPromotionsTemplate: [{
|
|
2455
2681
|
type: ViewChild,
|
|
2456
|
-
args: ["externalPromotionsTemplate"]
|
|
2682
|
+
args: ["externalPromotionsTemplate", { static: true }]
|
|
2457
2683
|
}] } });
|
|
2458
2684
|
|
|
2459
2685
|
class SearchstaxSearchExternalPromotionsWidget {
|
|
2460
|
-
constructor(storeServiceService) {
|
|
2686
|
+
constructor(storeServiceService, ngZone, cdr) {
|
|
2461
2687
|
this.storeServiceService = storeServiceService;
|
|
2688
|
+
this.ngZone = ngZone;
|
|
2689
|
+
this.cdr = cdr;
|
|
2462
2690
|
this.externalPromotionsData = null;
|
|
2463
2691
|
this.rand = Math.random();
|
|
2464
2692
|
this.context = this;
|
|
2465
2693
|
}
|
|
2466
2694
|
ngOnInit() {
|
|
2467
2695
|
if (this.storeServiceService.searchstax) {
|
|
2468
|
-
this.
|
|
2696
|
+
this.storeServiceService.whenDataLayerReady(() => {
|
|
2697
|
+
this.attachObservables();
|
|
2698
|
+
});
|
|
2469
2699
|
setTimeout(() => {
|
|
2470
2700
|
this.storeServiceService.searchstax.addExternalPromotionsWidget("searchstax-external-promotions-layout-container" + this.rand, {});
|
|
2471
2701
|
}, 0);
|
|
@@ -2478,23 +2708,49 @@ class SearchstaxSearchExternalPromotionsWidget {
|
|
|
2478
2708
|
context.storeServiceService.searchstax.externalPromotionsWidget?.trackClick(externalPromotion, event);
|
|
2479
2709
|
}
|
|
2480
2710
|
attachObservables() {
|
|
2481
|
-
this.storeServiceService.searchstax.dataLayer.$searchExternalPromotionsData
|
|
2711
|
+
subscribeInNgZone(this.ngZone, this.storeServiceService.searchstax.dataLayer.$searchExternalPromotionsData, (externalPromotionsData) => {
|
|
2482
2712
|
this.externalPromotionsData = externalPromotionsData;
|
|
2483
|
-
});
|
|
2713
|
+
}, this.cdr);
|
|
2484
2714
|
}
|
|
2485
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2486
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
2715
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxSearchExternalPromotionsWidget, deps: [{ token: StoreServiceService }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2716
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", 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" }] }); }
|
|
2487
2717
|
}
|
|
2488
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2718
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstaxSearchExternalPromotionsWidget, decorators: [{
|
|
2489
2719
|
type: Component,
|
|
2490
|
-
args: [{ selector: "app-searchstax-external-promotions", template: "<div [id]=\"'searchstax-external-promotions-layout-container' + rand\">\n
|
|
2491
|
-
}], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { templateOverride: [{
|
|
2720
|
+
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" }]
|
|
2721
|
+
}], ctorParameters: () => [{ type: StoreServiceService }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }], propDecorators: { templateOverride: [{
|
|
2492
2722
|
type: Input
|
|
2493
2723
|
}] } });
|
|
2494
2724
|
|
|
2725
|
+
const libraryComponents = [
|
|
2726
|
+
SearchstaxWrapper,
|
|
2727
|
+
SearchstaxInputWidget,
|
|
2728
|
+
SearchstaxResultsWidget,
|
|
2729
|
+
SearchstaxSearchFeedbackWidget,
|
|
2730
|
+
SearchstaxSearchPaginationWidget,
|
|
2731
|
+
SearchstaxSearchFacetsWidget,
|
|
2732
|
+
SearchstaxSearchSortingWidget,
|
|
2733
|
+
SearchstaxSearchRelatedSearchesWidget,
|
|
2734
|
+
SearchstaxSearchExternalPromotionsWidget,
|
|
2735
|
+
SearchstaxSearchAnswerWidget,
|
|
2736
|
+
SearchstaxSearchLocationWidget,
|
|
2737
|
+
AnswerTemplateComponent,
|
|
2738
|
+
OverviewTemplateComponent,
|
|
2739
|
+
InputTemplateComponent,
|
|
2740
|
+
LocationTemplateComponent,
|
|
2741
|
+
PaginationTemplateComponent,
|
|
2742
|
+
PaginationInfiniteTemplateComponent,
|
|
2743
|
+
ResultsTemplateComponent,
|
|
2744
|
+
NoResultsTemplateComponent,
|
|
2745
|
+
ExternalPromotionsTemplateComponent,
|
|
2746
|
+
SortingTemplateComponent,
|
|
2747
|
+
RelatedTemplateComponent,
|
|
2748
|
+
FacetDesktopTemplateComponent,
|
|
2749
|
+
FacetMobileTemplateComponent,
|
|
2750
|
+
];
|
|
2495
2751
|
class SearchstudioUxAngularModule {
|
|
2496
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
2497
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
2752
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstudioUxAngularModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2753
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.7", ngImport: i0, type: SearchstudioUxAngularModule, declarations: [SearchstaxWrapper,
|
|
2498
2754
|
SearchstaxInputWidget,
|
|
2499
2755
|
SearchstaxResultsWidget,
|
|
2500
2756
|
SearchstaxSearchFeedbackWidget,
|
|
@@ -2541,64 +2797,14 @@ class SearchstudioUxAngularModule {
|
|
|
2541
2797
|
RelatedTemplateComponent,
|
|
2542
2798
|
FacetDesktopTemplateComponent,
|
|
2543
2799
|
FacetMobileTemplateComponent] }); }
|
|
2544
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
2800
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstudioUxAngularModule, imports: [CommonModule, FormsModule] }); }
|
|
2545
2801
|
}
|
|
2546
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
2802
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: SearchstudioUxAngularModule, decorators: [{
|
|
2547
2803
|
type: NgModule,
|
|
2548
2804
|
args: [{
|
|
2549
|
-
declarations: [
|
|
2550
|
-
SearchstaxWrapper,
|
|
2551
|
-
SearchstaxInputWidget,
|
|
2552
|
-
SearchstaxResultsWidget,
|
|
2553
|
-
SearchstaxSearchFeedbackWidget,
|
|
2554
|
-
SearchstaxSearchPaginationWidget,
|
|
2555
|
-
SearchstaxSearchFacetsWidget,
|
|
2556
|
-
SearchstaxSearchSortingWidget,
|
|
2557
|
-
SearchstaxSearchRelatedSearchesWidget,
|
|
2558
|
-
SearchstaxSearchExternalPromotionsWidget,
|
|
2559
|
-
SearchstaxSearchAnswerWidget,
|
|
2560
|
-
SearchstaxSearchLocationWidget,
|
|
2561
|
-
AnswerTemplateComponent,
|
|
2562
|
-
OverviewTemplateComponent,
|
|
2563
|
-
InputTemplateComponent,
|
|
2564
|
-
LocationTemplateComponent,
|
|
2565
|
-
PaginationTemplateComponent,
|
|
2566
|
-
PaginationInfiniteTemplateComponent,
|
|
2567
|
-
ResultsTemplateComponent,
|
|
2568
|
-
NoResultsTemplateComponent,
|
|
2569
|
-
ExternalPromotionsTemplateComponent,
|
|
2570
|
-
SortingTemplateComponent,
|
|
2571
|
-
RelatedTemplateComponent,
|
|
2572
|
-
FacetDesktopTemplateComponent,
|
|
2573
|
-
FacetMobileTemplateComponent
|
|
2574
|
-
],
|
|
2805
|
+
declarations: [...libraryComponents],
|
|
2575
2806
|
imports: [CommonModule, FormsModule],
|
|
2576
|
-
exports: [
|
|
2577
|
-
SearchstaxWrapper,
|
|
2578
|
-
SearchstaxInputWidget,
|
|
2579
|
-
SearchstaxResultsWidget,
|
|
2580
|
-
SearchstaxSearchFeedbackWidget,
|
|
2581
|
-
SearchstaxSearchPaginationWidget,
|
|
2582
|
-
SearchstaxSearchFacetsWidget,
|
|
2583
|
-
SearchstaxSearchSortingWidget,
|
|
2584
|
-
SearchstaxSearchRelatedSearchesWidget,
|
|
2585
|
-
SearchstaxSearchExternalPromotionsWidget,
|
|
2586
|
-
SearchstaxSearchAnswerWidget,
|
|
2587
|
-
SearchstaxSearchLocationWidget,
|
|
2588
|
-
AnswerTemplateComponent,
|
|
2589
|
-
OverviewTemplateComponent,
|
|
2590
|
-
InputTemplateComponent,
|
|
2591
|
-
LocationTemplateComponent,
|
|
2592
|
-
PaginationTemplateComponent,
|
|
2593
|
-
PaginationInfiniteTemplateComponent,
|
|
2594
|
-
ResultsTemplateComponent,
|
|
2595
|
-
NoResultsTemplateComponent,
|
|
2596
|
-
ExternalPromotionsTemplateComponent,
|
|
2597
|
-
SortingTemplateComponent,
|
|
2598
|
-
RelatedTemplateComponent,
|
|
2599
|
-
FacetDesktopTemplateComponent,
|
|
2600
|
-
FacetMobileTemplateComponent
|
|
2601
|
-
],
|
|
2807
|
+
exports: [...libraryComponents],
|
|
2602
2808
|
}]
|
|
2603
2809
|
}] });
|
|
2604
2810
|
|