@searchstax-inc/searchstudio-ux-angular 1.2.30 → 1.2.51
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/README.md +110 -0
- package/esm2022/lib/components/searchstax-input/searchstax-input.component.mjs +55 -14
- package/esm2022/lib/components/searchstax-search-location/searchstax-search-location.component.mjs +92 -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 +153 -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 +33 -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,166 @@ 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
|
+
locationDecodeCoordinatesToAddress: this.locationDecodeCoordinatesToAddress,
|
|
158
|
+
},
|
|
159
|
+
locationSearchEnabled: this.locationSearchEnabled,
|
|
160
|
+
locationValuesOverride: this.locationValuesOverride,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
attachObservables() {
|
|
165
|
+
this.storeServiceService.searchstax.dataLayer.$locationWidgetTemplateData.subscribe((sortingData) => {
|
|
166
|
+
this.locationData = sortingData;
|
|
167
|
+
});
|
|
168
|
+
this.storeServiceService.searchstax.dataLayer.$searchObject.subscribe((result) => {
|
|
169
|
+
this.inputValue = result.location.address ?? "";
|
|
170
|
+
this.selectValue = result.location.radius || "";
|
|
171
|
+
});
|
|
172
|
+
this.storeServiceService.searchstax.dataLayer.$locationError.subscribe((locationError) => {
|
|
173
|
+
this.locationError = locationError;
|
|
174
|
+
});
|
|
175
|
+
this.storeServiceService.searchstax.dataLayer.$searchLocationChange.subscribe((location) => {
|
|
176
|
+
this.inputValue = location;
|
|
177
|
+
});
|
|
178
|
+
this.storeServiceService.searchstax.dataLayer.$searchRadiusChange.subscribe((radius) => {
|
|
179
|
+
this.selectValue = radius;
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchLocationWidget, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
183
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxSearchLocationWidget, selector: "app-searchstax-search-location", inputs: { templateOverride: "templateOverride", locationSearchEnabled: "locationSearchEnabled", locationValuesOverride: "locationValuesOverride", locationDecode: "locationDecode", locationDecodeCoordinatesToAddress: "locationDecodeCoordinatesToAddress" }, ngImport: i0, template: "<div\n [id]=\"'searchstax-location-container' + rand\"\n class=\"searchstax-location-container\"\n>\n <div\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"] }] }); }
|
|
184
|
+
}
|
|
185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchLocationWidget, decorators: [{
|
|
186
|
+
type: Component,
|
|
187
|
+
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" }]
|
|
188
|
+
}], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { templateOverride: [{
|
|
189
|
+
type: Input
|
|
190
|
+
}], locationSearchEnabled: [{
|
|
191
|
+
type: Input
|
|
192
|
+
}], locationValuesOverride: [{
|
|
193
|
+
type: Input
|
|
194
|
+
}], locationDecode: [{
|
|
195
|
+
type: Input
|
|
196
|
+
}], locationDecodeCoordinatesToAddress: [{
|
|
197
|
+
type: Input
|
|
198
|
+
}] } });
|
|
199
|
+
|
|
109
200
|
class SearchstaxInputWidget {
|
|
110
201
|
constructor(storeServiceService) {
|
|
111
202
|
this.storeServiceService = storeServiceService;
|
|
112
|
-
this.searchInputId =
|
|
203
|
+
this.searchInputId = "";
|
|
113
204
|
this.hooks = {};
|
|
114
205
|
this.suggestions = [];
|
|
115
206
|
this.context = this;
|
|
207
|
+
this.templateData = null;
|
|
116
208
|
}
|
|
117
209
|
ngOnInit() {
|
|
118
|
-
console.log('this.templateOverride', this.templateOverride);
|
|
119
210
|
if (this.storeServiceService.searchstax) {
|
|
120
211
|
this.attachObservables();
|
|
121
212
|
// const hooks: { [key: string]: (prop: any) => any } = {}
|
|
122
213
|
if (this.afterAutosuggest) {
|
|
123
|
-
this.hooks[
|
|
214
|
+
this.hooks["afterAutosuggest"] = this.afterAutosuggest;
|
|
124
215
|
}
|
|
125
216
|
if (this.beforeAutosuggest) {
|
|
126
|
-
this.hooks[
|
|
217
|
+
this.hooks["beforeAutosuggest"] = this.beforeAutosuggest;
|
|
127
218
|
}
|
|
128
219
|
setTimeout(() => {
|
|
129
|
-
this.storeServiceService.searchstax.addSearchInputWidget(
|
|
220
|
+
this.storeServiceService.searchstax.addSearchInputWidget("searchstax-input-container", {
|
|
130
221
|
suggestAfterMinChars: this.suggestAfterMinChars,
|
|
131
222
|
hooks: this.hooks,
|
|
132
223
|
templates: {
|
|
133
224
|
mainTemplate: {
|
|
134
225
|
template: ``,
|
|
135
|
-
searchInputId: this.searchInputId ??
|
|
136
|
-
}
|
|
137
|
-
}
|
|
226
|
+
searchInputId: this.searchInputId ?? "searchstax-search-input",
|
|
227
|
+
},
|
|
228
|
+
},
|
|
138
229
|
});
|
|
139
|
-
|
|
230
|
+
this.storeServiceService.searchstax.dataLayer.setInputTemplateRendered(true);
|
|
231
|
+
}, 100);
|
|
140
232
|
}
|
|
141
233
|
else {
|
|
142
|
-
throw Error(
|
|
234
|
+
throw Error("Searchstax instance needs to be passed via props");
|
|
143
235
|
}
|
|
144
236
|
}
|
|
237
|
+
locationDecode(term) {
|
|
238
|
+
return new Promise((resolve) => {
|
|
239
|
+
// make a request to google geocoding API to retrieve lat, lon and address
|
|
240
|
+
const geocodingAPIKey = "AIzaSyDK5wQQaz7kmP60_DViAto5rTQ301eVBFs";
|
|
241
|
+
const geocodingURL = `https://maps.googleapis.com/maps/api/geocode/json?address=${encodeURIComponent(term)}&key=${geocodingAPIKey}`;
|
|
242
|
+
fetch(geocodingURL)
|
|
243
|
+
.then((response) => response.json())
|
|
244
|
+
.then((data) => {
|
|
245
|
+
if (data.status === "OK" && data.results.length > 0) {
|
|
246
|
+
const result = data.results[0];
|
|
247
|
+
const location = {
|
|
248
|
+
lat: result.geometry.location.lat,
|
|
249
|
+
lon: result.geometry.location.lng,
|
|
250
|
+
address: result.formatted_address,
|
|
251
|
+
};
|
|
252
|
+
resolve(location);
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
resolve({
|
|
256
|
+
address: undefined,
|
|
257
|
+
lat: undefined,
|
|
258
|
+
lon: undefined,
|
|
259
|
+
error: true,
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
})
|
|
263
|
+
.catch(() => {
|
|
264
|
+
resolve({
|
|
265
|
+
address: undefined,
|
|
266
|
+
lat: undefined,
|
|
267
|
+
lon: undefined,
|
|
268
|
+
error: true,
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
}
|
|
145
273
|
onMouseLeave(context) {
|
|
146
274
|
context.storeServiceService.searchstax.searchInputWidget?.resetAutosuggestSelection();
|
|
147
275
|
context.storeServiceService.searchstax.searchInputWidget?.markActiveAutosuggestItem();
|
|
@@ -157,13 +285,16 @@ class SearchstaxInputWidget {
|
|
|
157
285
|
this.storeServiceService.searchstax.dataLayer.$autosuggestResults.subscribe((suggestions) => {
|
|
158
286
|
this.suggestions = suggestions?.suggestions ?? [];
|
|
159
287
|
});
|
|
288
|
+
this.storeServiceService.searchstax.dataLayer.$inputWidgetTemplateData.subscribe((data) => {
|
|
289
|
+
this.templateData = data;
|
|
290
|
+
});
|
|
160
291
|
}
|
|
161
292
|
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 <
|
|
293
|
+
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", "locationSearchEnabled", "locationValuesOverride", "locationDecode", "locationDecodeCoordinatesToAddress"] }] }); }
|
|
163
294
|
}
|
|
164
295
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxInputWidget, decorators: [{
|
|
165
296
|
type: Component,
|
|
166
|
-
args: [{ selector:
|
|
297
|
+
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
298
|
}], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { afterAutosuggest: [{
|
|
168
299
|
type: Input
|
|
169
300
|
}], beforeAutosuggest: [{
|
|
@@ -628,7 +759,8 @@ class SearchstudioUxAngularModule {
|
|
|
628
759
|
SearchstaxSearchSortingWidget,
|
|
629
760
|
SearchstaxSearchRelatedSearchesWidget,
|
|
630
761
|
SearchstaxSearchExternalPromotionsWidget,
|
|
631
|
-
SearchstaxSearchAnswerWidget
|
|
762
|
+
SearchstaxSearchAnswerWidget,
|
|
763
|
+
SearchstaxSearchLocationWidget], imports: [CommonModule, FormsModule], exports: [SearchstaxWrapper,
|
|
632
764
|
SearchstaxInputWidget,
|
|
633
765
|
SearchstaxResultsWidget,
|
|
634
766
|
SearchstaxSearchFeedbackWidget,
|
|
@@ -637,7 +769,8 @@ class SearchstudioUxAngularModule {
|
|
|
637
769
|
SearchstaxSearchSortingWidget,
|
|
638
770
|
SearchstaxSearchRelatedSearchesWidget,
|
|
639
771
|
SearchstaxSearchExternalPromotionsWidget,
|
|
640
|
-
SearchstaxSearchAnswerWidget
|
|
772
|
+
SearchstaxSearchAnswerWidget,
|
|
773
|
+
SearchstaxSearchLocationWidget] }); }
|
|
641
774
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstudioUxAngularModule, imports: [CommonModule, FormsModule] }); }
|
|
642
775
|
}
|
|
643
776
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstudioUxAngularModule, decorators: [{
|
|
@@ -653,7 +786,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
653
786
|
SearchstaxSearchSortingWidget,
|
|
654
787
|
SearchstaxSearchRelatedSearchesWidget,
|
|
655
788
|
SearchstaxSearchExternalPromotionsWidget,
|
|
656
|
-
SearchstaxSearchAnswerWidget
|
|
789
|
+
SearchstaxSearchAnswerWidget,
|
|
790
|
+
SearchstaxSearchLocationWidget
|
|
657
791
|
],
|
|
658
792
|
imports: [CommonModule, FormsModule],
|
|
659
793
|
exports: [
|
|
@@ -666,7 +800,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
666
800
|
SearchstaxSearchSortingWidget,
|
|
667
801
|
SearchstaxSearchRelatedSearchesWidget,
|
|
668
802
|
SearchstaxSearchExternalPromotionsWidget,
|
|
669
|
-
SearchstaxSearchAnswerWidget
|
|
803
|
+
SearchstaxSearchAnswerWidget,
|
|
804
|
+
SearchstaxSearchLocationWidget
|
|
670
805
|
],
|
|
671
806
|
}]
|
|
672
807
|
}] });
|
|
@@ -679,5 +814,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
679
814
|
* Generated bundle index. Do not edit.
|
|
680
815
|
*/
|
|
681
816
|
|
|
682
|
-
export { SearchstaxInputWidget, SearchstaxResultsWidget, SearchstaxSearchAnswerWidget, SearchstaxSearchExternalPromotionsWidget, SearchstaxSearchFacetsWidget, SearchstaxSearchFeedbackWidget, SearchstaxSearchPaginationWidget, SearchstaxSearchRelatedSearchesWidget, SearchstaxSearchSortingWidget, SearchstaxWrapper, SearchstudioUxAngularModule, StoreServiceService };
|
|
817
|
+
export { SearchstaxInputWidget, SearchstaxResultsWidget, SearchstaxSearchAnswerWidget, SearchstaxSearchExternalPromotionsWidget, SearchstaxSearchFacetsWidget, SearchstaxSearchFeedbackWidget, SearchstaxSearchLocationWidget, SearchstaxSearchPaginationWidget, SearchstaxSearchRelatedSearchesWidget, SearchstaxSearchSortingWidget, SearchstaxWrapper, SearchstudioUxAngularModule, StoreServiceService };
|
|
683
818
|
//# sourceMappingURL=searchstax-inc-searchstudio-ux-angular.mjs.map
|