@searchstax-inc/searchstudio-ux-angular 1.2.30 → 1.2.44
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/esm2022/lib/components/searchstax-input/searchstax-input.component.mjs +55 -14
- package/esm2022/lib/components/searchstax-search-location/searchstax-search-location.component.mjs +83 -0
- package/esm2022/lib/components/searchstax-wrapper.component.mjs +6 -2
- package/esm2022/lib/searchstudio-ux-angular.module.mjs +10 -5
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/searchstax-inc-searchstudio-ux-angular.mjs +144 -18
- package/fesm2022/searchstax-inc-searchstudio-ux-angular.mjs.map +1 -1
- package/lib/components/searchstax-input/searchstax-input.component.d.ts +5 -3
- package/lib/components/searchstax-search-location/searchstax-search-location.component.d.ts +26 -0
- package/lib/components/searchstax-wrapper.component.d.ts +2 -1
- package/lib/searchstudio-ux-angular.module.d.ts +4 -3
- package/package.json +4 -4
- package/public-api.d.ts +1 -0
|
@@ -24,6 +24,7 @@ class SearchstaxWrapper {
|
|
|
24
24
|
constructor(storeServiceService) {
|
|
25
25
|
this.storeServiceService = storeServiceService;
|
|
26
26
|
this.language = 'en';
|
|
27
|
+
this.model = '';
|
|
27
28
|
this.searchURL = '';
|
|
28
29
|
this.suggesterURL = '';
|
|
29
30
|
this.trackApiKey = '';
|
|
@@ -45,6 +46,7 @@ class SearchstaxWrapper {
|
|
|
45
46
|
}
|
|
46
47
|
this.storeServiceService.searchstax.initialize({
|
|
47
48
|
language: this.language,
|
|
49
|
+
model: this.model,
|
|
48
50
|
searchURL: this.searchURL,
|
|
49
51
|
suggesterURL: this.suggesterURL,
|
|
50
52
|
trackApiKey: this.trackApiKey,
|
|
@@ -61,7 +63,7 @@ class SearchstaxWrapper {
|
|
|
61
63
|
this.initialized.emit(this.storeServiceService.searchstax);
|
|
62
64
|
}
|
|
63
65
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxWrapper, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
64
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxWrapper, selector: "app-searchstax-wrapper", inputs: { language: "language", 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: `
|
|
66
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxWrapper, selector: "app-searchstax-wrapper", inputs: { language: "language", model: "model", searchURL: "searchURL", suggesterURL: "suggesterURL", trackApiKey: "trackApiKey", searchAuth: "searchAuth", sessionId: "sessionId", analyticsBaseUrl: "analyticsBaseUrl", analyticsSrc: "analyticsSrc", questionURL: "questionURL", authType: "authType", autoCorrect: "autoCorrect", router: "router", beforeSearch: "beforeSearch", afterSearch: "afterSearch" }, outputs: { initialized: "initialized" }, ngImport: i0, template: `
|
|
65
67
|
<div>
|
|
66
68
|
<ng-content></ng-content>
|
|
67
69
|
</div>
|
|
@@ -76,6 +78,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
76
78
|
` }]
|
|
77
79
|
}], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { language: [{
|
|
78
80
|
type: Input
|
|
81
|
+
}], model: [{
|
|
82
|
+
type: Input
|
|
79
83
|
}], searchURL: [{
|
|
80
84
|
type: Input
|
|
81
85
|
}], suggesterURL: [{
|
|
@@ -106,42 +110,157 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
106
110
|
type: Output
|
|
107
111
|
}] } });
|
|
108
112
|
|
|
113
|
+
class SearchstaxSearchLocationWidget {
|
|
114
|
+
constructor(storeServiceService) {
|
|
115
|
+
this.storeServiceService = storeServiceService;
|
|
116
|
+
this.locationData = null;
|
|
117
|
+
this.inputValue = "";
|
|
118
|
+
this.selectValue = "";
|
|
119
|
+
this.locationAdded = false;
|
|
120
|
+
this.locationError = false;
|
|
121
|
+
this.rand = Math.random();
|
|
122
|
+
this.context = this;
|
|
123
|
+
}
|
|
124
|
+
ngOnInit() {
|
|
125
|
+
if (this.storeServiceService.searchstax) {
|
|
126
|
+
this.attachObservables();
|
|
127
|
+
setTimeout(() => {
|
|
128
|
+
this.addWidget();
|
|
129
|
+
}, 100);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
throw Error("Searchstax instance needs to be passed via props");
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
locationBlur(context) {
|
|
136
|
+
context.storeServiceService.searchstax.searchLocationWidget?.triggerGeocoder(context.inputValue);
|
|
137
|
+
}
|
|
138
|
+
radiusChange(e, context) {
|
|
139
|
+
const target = e.target;
|
|
140
|
+
context.selectValue = target.value;
|
|
141
|
+
context.storeServiceService.searchstax.searchLocationWidget?.setRadiusValue(context.selectValue);
|
|
142
|
+
}
|
|
143
|
+
inputChange(e, context) {
|
|
144
|
+
const target = e.target;
|
|
145
|
+
context.inputValue = target.value;
|
|
146
|
+
}
|
|
147
|
+
getCurrentLocation(context) {
|
|
148
|
+
context.storeServiceService.searchstax.searchLocationWidget?.getCurrentLocation();
|
|
149
|
+
}
|
|
150
|
+
addWidget() {
|
|
151
|
+
if (!this.locationAdded &&
|
|
152
|
+
this.storeServiceService.searchstax.routerHelper) {
|
|
153
|
+
this.locationAdded = true;
|
|
154
|
+
this.storeServiceService.searchstax.addSearchLocationWidget("searchstax-location-container" + this.rand, {
|
|
155
|
+
hooks: {
|
|
156
|
+
locationDecode: this.locationDecode,
|
|
157
|
+
},
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
attachObservables() {
|
|
162
|
+
this.storeServiceService.searchstax.dataLayer.$locationWidgetTemplateData.subscribe((sortingData) => {
|
|
163
|
+
this.locationData = sortingData;
|
|
164
|
+
});
|
|
165
|
+
this.storeServiceService.searchstax.dataLayer.$searchObject.subscribe((result) => {
|
|
166
|
+
this.inputValue = result.location.address ?? "";
|
|
167
|
+
this.selectValue = result.location.radius || "";
|
|
168
|
+
});
|
|
169
|
+
this.storeServiceService.searchstax.dataLayer.$locationError.subscribe((locationError) => {
|
|
170
|
+
this.locationError = locationError;
|
|
171
|
+
});
|
|
172
|
+
this.storeServiceService.searchstax.dataLayer.$searchLocationChange.subscribe((location) => {
|
|
173
|
+
this.inputValue = location;
|
|
174
|
+
});
|
|
175
|
+
this.storeServiceService.searchstax.dataLayer.$searchRadiusChange.subscribe((radius) => {
|
|
176
|
+
this.selectValue = radius;
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchLocationWidget, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
180
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxSearchLocationWidget, selector: "app-searchstax-search-location", inputs: { templateOverride: "templateOverride", locationDecode: "locationDecode" }, ngImport: i0, template: "<div\n [id]=\"'searchstax-location-container' + rand\"\n class=\"searchstax-location-container\"\n>\n <div\n class=\"searchstax-location-input-container\"\n data-test-id=\"searchstax-location-input-container\"\n *ngIf=\"locationData && !templateOverride\"\n >\n <div class=\"searchstax-location-input-wrapper\">\n <span class=\"searchstax-location-input-label\">NEAR</span>\n <div class=\"searchstax-location-input-wrapper-inner\">\n <input\n type=\"text\"\n id=\"searchstax-location-input\"\n class=\"searchstax-location-input\"\n [ngClass]=\"{\n 'searchstax-input-location-error': locationError\n }\"\n placeholder=\"Zip, Postal Code or City...\"\n aria-label=\"Search Location Input\"\n data-test-id=\"searchstax-location-input\"\n [(ngModel)]=\"inputValue\"\n (blur)=\"locationBlur(context)\"\n />\n <button\n (click)=\"getCurrentLocation(context)\"\n class=\"searchstax-get-current-location-button\"\n >\n Use my current location\n </button>\n </div>\n <span\n *ngIf=\"locationData.shouldShowLocationDistanceDropdown\"\n class=\"searchstax-location-input-label\"\n >WITHIN</span\n >\n <select\n *ngIf=\"locationData.shouldShowLocationDistanceDropdown\"\n id=\"searchstax-location-radius-select\"\n class=\"searchstax-location-radius-select\"\n aria-label=\"Search Location Radius Select\"\n data-test-id=\"searchstax-location-radius-select\"\n (change)=\"radiusChange($event, context)\"\n [(ngModel)]=\"selectValue\"\n >\n <option\n *ngFor=\"let value of locationData.locationSearchDistanceValues\"\n [value]=\"value.value\"\n >\n {{ value.label }}\n </option>\n </select>\n </div>\n </div>\n\n <div *ngIf=\"locationData && templateOverride\">\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
181
|
+
}
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchLocationWidget, decorators: [{
|
|
183
|
+
type: Component,
|
|
184
|
+
args: [{ selector: "app-searchstax-search-location", template: "<div\n [id]=\"'searchstax-location-container' + rand\"\n class=\"searchstax-location-container\"\n>\n <div\n class=\"searchstax-location-input-container\"\n data-test-id=\"searchstax-location-input-container\"\n *ngIf=\"locationData && !templateOverride\"\n >\n <div class=\"searchstax-location-input-wrapper\">\n <span class=\"searchstax-location-input-label\">NEAR</span>\n <div class=\"searchstax-location-input-wrapper-inner\">\n <input\n type=\"text\"\n id=\"searchstax-location-input\"\n class=\"searchstax-location-input\"\n [ngClass]=\"{\n 'searchstax-input-location-error': locationError\n }\"\n placeholder=\"Zip, Postal Code or City...\"\n aria-label=\"Search Location Input\"\n data-test-id=\"searchstax-location-input\"\n [(ngModel)]=\"inputValue\"\n (blur)=\"locationBlur(context)\"\n />\n <button\n (click)=\"getCurrentLocation(context)\"\n class=\"searchstax-get-current-location-button\"\n >\n Use my current location\n </button>\n </div>\n <span\n *ngIf=\"locationData.shouldShowLocationDistanceDropdown\"\n class=\"searchstax-location-input-label\"\n >WITHIN</span\n >\n <select\n *ngIf=\"locationData.shouldShowLocationDistanceDropdown\"\n id=\"searchstax-location-radius-select\"\n class=\"searchstax-location-radius-select\"\n aria-label=\"Search Location Radius Select\"\n data-test-id=\"searchstax-location-radius-select\"\n (change)=\"radiusChange($event, context)\"\n [(ngModel)]=\"selectValue\"\n >\n <option\n *ngFor=\"let value of locationData.locationSearchDistanceValues\"\n [value]=\"value.value\"\n >\n {{ value.label }}\n </option>\n </select>\n </div>\n </div>\n\n <div *ngIf=\"locationData && templateOverride\">\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </div>\n</div>\n" }]
|
|
185
|
+
}], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { templateOverride: [{
|
|
186
|
+
type: Input
|
|
187
|
+
}], locationDecode: [{
|
|
188
|
+
type: Input
|
|
189
|
+
}] } });
|
|
190
|
+
|
|
109
191
|
class SearchstaxInputWidget {
|
|
110
192
|
constructor(storeServiceService) {
|
|
111
193
|
this.storeServiceService = storeServiceService;
|
|
112
|
-
this.searchInputId =
|
|
194
|
+
this.searchInputId = "";
|
|
113
195
|
this.hooks = {};
|
|
114
196
|
this.suggestions = [];
|
|
115
197
|
this.context = this;
|
|
198
|
+
this.templateData = null;
|
|
116
199
|
}
|
|
117
200
|
ngOnInit() {
|
|
118
|
-
console.log('this.templateOverride', this.templateOverride);
|
|
119
201
|
if (this.storeServiceService.searchstax) {
|
|
120
202
|
this.attachObservables();
|
|
121
203
|
// const hooks: { [key: string]: (prop: any) => any } = {}
|
|
122
204
|
if (this.afterAutosuggest) {
|
|
123
|
-
this.hooks[
|
|
205
|
+
this.hooks["afterAutosuggest"] = this.afterAutosuggest;
|
|
124
206
|
}
|
|
125
207
|
if (this.beforeAutosuggest) {
|
|
126
|
-
this.hooks[
|
|
208
|
+
this.hooks["beforeAutosuggest"] = this.beforeAutosuggest;
|
|
127
209
|
}
|
|
128
210
|
setTimeout(() => {
|
|
129
|
-
this.storeServiceService.searchstax.addSearchInputWidget(
|
|
211
|
+
this.storeServiceService.searchstax.addSearchInputWidget("searchstax-input-container", {
|
|
130
212
|
suggestAfterMinChars: this.suggestAfterMinChars,
|
|
131
213
|
hooks: this.hooks,
|
|
132
214
|
templates: {
|
|
133
215
|
mainTemplate: {
|
|
134
216
|
template: ``,
|
|
135
|
-
searchInputId: this.searchInputId ??
|
|
136
|
-
}
|
|
137
|
-
}
|
|
217
|
+
searchInputId: this.searchInputId ?? "searchstax-search-input",
|
|
218
|
+
},
|
|
219
|
+
},
|
|
138
220
|
});
|
|
139
|
-
|
|
221
|
+
this.storeServiceService.searchstax.dataLayer.setInputTemplateRendered(true);
|
|
222
|
+
}, 100);
|
|
140
223
|
}
|
|
141
224
|
else {
|
|
142
|
-
throw Error(
|
|
225
|
+
throw Error("Searchstax instance needs to be passed via props");
|
|
143
226
|
}
|
|
144
227
|
}
|
|
228
|
+
locationDecode(term) {
|
|
229
|
+
return new Promise((resolve) => {
|
|
230
|
+
// make a request to google geocoding API to retrieve lat, lon and address
|
|
231
|
+
const geocodingAPIKey = "AIzaSyDK5wQQaz7kmP60_DViAto5rTQ301eVBFs";
|
|
232
|
+
const geocodingURL = `https://maps.googleapis.com/maps/api/geocode/json?address=${encodeURIComponent(term)}&key=${geocodingAPIKey}`;
|
|
233
|
+
fetch(geocodingURL)
|
|
234
|
+
.then((response) => response.json())
|
|
235
|
+
.then((data) => {
|
|
236
|
+
if (data.status === "OK" && data.results.length > 0) {
|
|
237
|
+
const result = data.results[0];
|
|
238
|
+
const location = {
|
|
239
|
+
lat: result.geometry.location.lat,
|
|
240
|
+
lon: result.geometry.location.lng,
|
|
241
|
+
address: result.formatted_address,
|
|
242
|
+
};
|
|
243
|
+
resolve(location);
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
resolve({
|
|
247
|
+
address: undefined,
|
|
248
|
+
lat: undefined,
|
|
249
|
+
lon: undefined,
|
|
250
|
+
error: true,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
})
|
|
254
|
+
.catch(() => {
|
|
255
|
+
resolve({
|
|
256
|
+
address: undefined,
|
|
257
|
+
lat: undefined,
|
|
258
|
+
lon: undefined,
|
|
259
|
+
error: true,
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
});
|
|
263
|
+
}
|
|
145
264
|
onMouseLeave(context) {
|
|
146
265
|
context.storeServiceService.searchstax.searchInputWidget?.resetAutosuggestSelection();
|
|
147
266
|
context.storeServiceService.searchstax.searchInputWidget?.markActiveAutosuggestItem();
|
|
@@ -157,13 +276,16 @@ class SearchstaxInputWidget {
|
|
|
157
276
|
this.storeServiceService.searchstax.dataLayer.$autosuggestResults.subscribe((suggestions) => {
|
|
158
277
|
this.suggestions = suggestions?.suggestions ?? [];
|
|
159
278
|
});
|
|
279
|
+
this.storeServiceService.searchstax.dataLayer.$inputWidgetTemplateData.subscribe((data) => {
|
|
280
|
+
this.templateData = data;
|
|
281
|
+
});
|
|
160
282
|
}
|
|
161
283
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxInputWidget, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
162
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxInputWidget, selector: "app-searchstax-input", inputs: { afterAutosuggest: "afterAutosuggest", beforeAutosuggest: "beforeAutosuggest", searchInputId: "searchInputId", suggestAfterMinChars: "suggestAfterMinChars", templateOverride: "templateOverride" }, ngImport: i0, template: "<div id=\"searchstax-input-container\">\n <div class=\"searchstax-search-input-container\">\n <
|
|
284
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxInputWidget, selector: "app-searchstax-input", inputs: { afterAutosuggest: "afterAutosuggest", beforeAutosuggest: "beforeAutosuggest", searchInputId: "searchInputId", suggestAfterMinChars: "suggestAfterMinChars", templateOverride: "templateOverride" }, ngImport: i0, template: "<div id=\"searchstax-input-container\">\n <div class=\"searchstax-search-input-container searchstax-search-input-container-new\" [class]=\"{ 'searchstax-alternative-render': !!templateData?.locationEnabled }\">\n <ng-container *ngIf=\"!templateOverride\">\n <div class=\"searchstax-search-input-wrapper\">\n <input\n type=\"text\"\n id=\"searchstax-search-input\"\n class=\"searchstax-search-input\"\n placeholder=\"SEARCH FOR...\"\n aria-label=\"search\"\n />\n <div\n class=\"searchstax-autosuggest-container\"\n [ngClass]=\"{ hidden: suggestions.length === 0 }\"\n (mouseleave)=\"(onMouseLeave)\"\n >\n <div\n class=\"searchstax-autosuggest-item\"\n *ngFor=\"let suggestion of suggestions\"\n >\n <div\n class=\"searchstax-autosuggest-item-term-container\"\n [innerHtml]=\"suggestion.term\"\n (mouseover)=\"onMouseOver(suggestion, context)\"\n tabindex=\"0\"\n (click)=\"onMouseClick($event, context)\"\n ></div>\n </div>\n </div>\n </div>\n <app-searchstax-search-location [locationDecode]=\"locationDecode\"></app-searchstax-search-location>\n <button\n class=\"searchstax-spinner-icon\"\n id=\"searchstax-search-input-action-button\"\n aria-label=\"search\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"templateOverride\">\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </ng-container>\n\n <!-- <slot\n name=\"input\"\n :suggestions=\"suggestions\"\n :onMouseClick=\"onMouseClick\"\n :onMouseOver=\"onMouseOver\"\n :onMouseLeave=\"onMouseLeave\"\n ></slot> -->\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SearchstaxSearchLocationWidget, selector: "app-searchstax-search-location", inputs: ["templateOverride", "locationDecode"] }] }); }
|
|
163
285
|
}
|
|
164
286
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxInputWidget, decorators: [{
|
|
165
287
|
type: Component,
|
|
166
|
-
args: [{ selector:
|
|
288
|
+
args: [{ selector: "app-searchstax-input", template: "<div id=\"searchstax-input-container\">\n <div class=\"searchstax-search-input-container searchstax-search-input-container-new\" [class]=\"{ 'searchstax-alternative-render': !!templateData?.locationEnabled }\">\n <ng-container *ngIf=\"!templateOverride\">\n <div class=\"searchstax-search-input-wrapper\">\n <input\n type=\"text\"\n id=\"searchstax-search-input\"\n class=\"searchstax-search-input\"\n placeholder=\"SEARCH FOR...\"\n aria-label=\"search\"\n />\n <div\n class=\"searchstax-autosuggest-container\"\n [ngClass]=\"{ hidden: suggestions.length === 0 }\"\n (mouseleave)=\"(onMouseLeave)\"\n >\n <div\n class=\"searchstax-autosuggest-item\"\n *ngFor=\"let suggestion of suggestions\"\n >\n <div\n class=\"searchstax-autosuggest-item-term-container\"\n [innerHtml]=\"suggestion.term\"\n (mouseover)=\"onMouseOver(suggestion, context)\"\n tabindex=\"0\"\n (click)=\"onMouseClick($event, context)\"\n ></div>\n </div>\n </div>\n </div>\n <app-searchstax-search-location [locationDecode]=\"locationDecode\"></app-searchstax-search-location>\n <button\n class=\"searchstax-spinner-icon\"\n id=\"searchstax-search-input-action-button\"\n aria-label=\"search\"\n ></button>\n </ng-container>\n <ng-container *ngIf=\"templateOverride\">\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </ng-container>\n\n <!-- <slot\n name=\"input\"\n :suggestions=\"suggestions\"\n :onMouseClick=\"onMouseClick\"\n :onMouseOver=\"onMouseOver\"\n :onMouseLeave=\"onMouseLeave\"\n ></slot> -->\n </div>\n</div>\n" }]
|
|
167
289
|
}], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { afterAutosuggest: [{
|
|
168
290
|
type: Input
|
|
169
291
|
}], beforeAutosuggest: [{
|
|
@@ -628,7 +750,8 @@ class SearchstudioUxAngularModule {
|
|
|
628
750
|
SearchstaxSearchSortingWidget,
|
|
629
751
|
SearchstaxSearchRelatedSearchesWidget,
|
|
630
752
|
SearchstaxSearchExternalPromotionsWidget,
|
|
631
|
-
SearchstaxSearchAnswerWidget
|
|
753
|
+
SearchstaxSearchAnswerWidget,
|
|
754
|
+
SearchstaxSearchLocationWidget], imports: [CommonModule, FormsModule], exports: [SearchstaxWrapper,
|
|
632
755
|
SearchstaxInputWidget,
|
|
633
756
|
SearchstaxResultsWidget,
|
|
634
757
|
SearchstaxSearchFeedbackWidget,
|
|
@@ -637,7 +760,8 @@ class SearchstudioUxAngularModule {
|
|
|
637
760
|
SearchstaxSearchSortingWidget,
|
|
638
761
|
SearchstaxSearchRelatedSearchesWidget,
|
|
639
762
|
SearchstaxSearchExternalPromotionsWidget,
|
|
640
|
-
SearchstaxSearchAnswerWidget
|
|
763
|
+
SearchstaxSearchAnswerWidget,
|
|
764
|
+
SearchstaxSearchLocationWidget] }); }
|
|
641
765
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstudioUxAngularModule, imports: [CommonModule, FormsModule] }); }
|
|
642
766
|
}
|
|
643
767
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstudioUxAngularModule, decorators: [{
|
|
@@ -653,7 +777,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
653
777
|
SearchstaxSearchSortingWidget,
|
|
654
778
|
SearchstaxSearchRelatedSearchesWidget,
|
|
655
779
|
SearchstaxSearchExternalPromotionsWidget,
|
|
656
|
-
SearchstaxSearchAnswerWidget
|
|
780
|
+
SearchstaxSearchAnswerWidget,
|
|
781
|
+
SearchstaxSearchLocationWidget
|
|
657
782
|
],
|
|
658
783
|
imports: [CommonModule, FormsModule],
|
|
659
784
|
exports: [
|
|
@@ -666,7 +791,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
666
791
|
SearchstaxSearchSortingWidget,
|
|
667
792
|
SearchstaxSearchRelatedSearchesWidget,
|
|
668
793
|
SearchstaxSearchExternalPromotionsWidget,
|
|
669
|
-
SearchstaxSearchAnswerWidget
|
|
794
|
+
SearchstaxSearchAnswerWidget,
|
|
795
|
+
SearchstaxSearchLocationWidget
|
|
670
796
|
],
|
|
671
797
|
}]
|
|
672
798
|
}] });
|
|
@@ -679,5 +805,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
679
805
|
* Generated bundle index. Do not edit.
|
|
680
806
|
*/
|
|
681
807
|
|
|
682
|
-
export { SearchstaxInputWidget, SearchstaxResultsWidget, SearchstaxSearchAnswerWidget, SearchstaxSearchExternalPromotionsWidget, SearchstaxSearchFacetsWidget, SearchstaxSearchFeedbackWidget, SearchstaxSearchPaginationWidget, SearchstaxSearchRelatedSearchesWidget, SearchstaxSearchSortingWidget, SearchstaxWrapper, SearchstudioUxAngularModule, StoreServiceService };
|
|
808
|
+
export { SearchstaxInputWidget, SearchstaxResultsWidget, SearchstaxSearchAnswerWidget, SearchstaxSearchExternalPromotionsWidget, SearchstaxSearchFacetsWidget, SearchstaxSearchFeedbackWidget, SearchstaxSearchLocationWidget, SearchstaxSearchPaginationWidget, SearchstaxSearchRelatedSearchesWidget, SearchstaxSearchSortingWidget, SearchstaxWrapper, SearchstudioUxAngularModule, StoreServiceService };
|
|
683
809
|
//# sourceMappingURL=searchstax-inc-searchstudio-ux-angular.mjs.map
|