@searchstax-inc/searchstudio-ux-js 0.3.6 → 0.3.8
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.
|
@@ -408,6 +408,76 @@ export interface ISearchstaxSearchSortingTemplateData {
|
|
|
408
408
|
template: string;
|
|
409
409
|
selectId: string;
|
|
410
410
|
}
|
|
411
|
+
declare class SearchInputWidget {
|
|
412
|
+
private dataLayer;
|
|
413
|
+
private config;
|
|
414
|
+
private suggestAfterMinChars;
|
|
415
|
+
private containerId;
|
|
416
|
+
private currentInputValue;
|
|
417
|
+
autosuggestResults?: ISearchstaxSEARCHTERM;
|
|
418
|
+
private searchInput?;
|
|
419
|
+
private actionButton?;
|
|
420
|
+
private autosuggestContainer?;
|
|
421
|
+
private buttonState;
|
|
422
|
+
private selectedAutosuggestItem;
|
|
423
|
+
private suggestTrigger;
|
|
424
|
+
private searchTrigger;
|
|
425
|
+
constructor(params: {
|
|
426
|
+
containerId: string;
|
|
427
|
+
config: ISearchstaxSearchInputConfig;
|
|
428
|
+
searchTrigger: (term: string) => void;
|
|
429
|
+
suggestTrigger: (term: string) => void;
|
|
430
|
+
dataLayer: DataLAyer;
|
|
431
|
+
});
|
|
432
|
+
private renderMainTemplate;
|
|
433
|
+
private createAutosuggestContainer;
|
|
434
|
+
private actionButtonInit;
|
|
435
|
+
private attachSubscriptions;
|
|
436
|
+
private handleLoadingChange;
|
|
437
|
+
private handleSearchTermChange;
|
|
438
|
+
private updateActionButtonState;
|
|
439
|
+
selectPreviousAutosuggestItem(): void;
|
|
440
|
+
selectNextAutosuggestItem(): void;
|
|
441
|
+
resetAutosuggestSelection(): void;
|
|
442
|
+
markActiveAutosuggestItem(): void;
|
|
443
|
+
private inputKeyupEvent;
|
|
444
|
+
private autosuggestHandling;
|
|
445
|
+
private inputPasteEvent;
|
|
446
|
+
private executeSuggest;
|
|
447
|
+
private executeSearch;
|
|
448
|
+
private suggestionChosen;
|
|
449
|
+
private hideAutosuggest;
|
|
450
|
+
private cleanSuggestionTerm;
|
|
451
|
+
autosuggestItemClicked(suggestion: ISearchstaxSuggestion): void;
|
|
452
|
+
private createAutosuggestItem;
|
|
453
|
+
onSuggestionEnter(suggestion: ISearchstaxSuggestion): void;
|
|
454
|
+
appendSuggestions(suggestions: ISearchstaxSuggestResponse): void;
|
|
455
|
+
}
|
|
456
|
+
declare class SearchResultsWidget {
|
|
457
|
+
dataLayer: DataLAyer;
|
|
458
|
+
config: ISearchstaxSearchResultsConfig;
|
|
459
|
+
linkClickCallback: (uniqueId: string) => void;
|
|
460
|
+
searchCallback: (term: string) => void;
|
|
461
|
+
containerId: string;
|
|
462
|
+
searchResultsMainContainer: HTMLElement;
|
|
463
|
+
searchResultsContainer?: HTMLElement;
|
|
464
|
+
searchResultLinks: HTMLElement[];
|
|
465
|
+
constructor(params: {
|
|
466
|
+
containerId: string;
|
|
467
|
+
linkClickCallback: (uniqueId: string) => void;
|
|
468
|
+
config: ISearchstaxSearchResultsConfig;
|
|
469
|
+
dataLayer: DataLAyer;
|
|
470
|
+
searchTrigger: (term: string) => void;
|
|
471
|
+
});
|
|
472
|
+
private initializeSubscriptions;
|
|
473
|
+
changeTemplate(): void;
|
|
474
|
+
private renderNoResultsTemplate;
|
|
475
|
+
private renderResults;
|
|
476
|
+
private removeLinkClickEvents;
|
|
477
|
+
private get uniqueIdAttribute();
|
|
478
|
+
private attachLinkClickEvents;
|
|
479
|
+
private renderMainTemplate;
|
|
480
|
+
}
|
|
411
481
|
export declare class Searchstax {
|
|
412
482
|
private routerEnabled;
|
|
413
483
|
private cachedQuery;
|
|
@@ -420,8 +490,8 @@ export declare class Searchstax {
|
|
|
420
490
|
private searchFacetsConfig?;
|
|
421
491
|
private relatedSearchesConfig?;
|
|
422
492
|
private externalPromotionsConfig?;
|
|
423
|
-
|
|
424
|
-
|
|
493
|
+
searchInputWidget?: SearchInputWidget;
|
|
494
|
+
searchResultsWidget?: SearchResultsWidget;
|
|
425
495
|
private searchFacetsWidget?;
|
|
426
496
|
private searchPaginationWidget?;
|
|
427
497
|
private searchFeedbackWidget?;
|
|
@@ -408,6 +408,76 @@ export interface ISearchstaxSearchSortingTemplateData {
|
|
|
408
408
|
template: string;
|
|
409
409
|
selectId: string;
|
|
410
410
|
}
|
|
411
|
+
declare class SearchInputWidget {
|
|
412
|
+
private dataLayer;
|
|
413
|
+
private config;
|
|
414
|
+
private suggestAfterMinChars;
|
|
415
|
+
private containerId;
|
|
416
|
+
private currentInputValue;
|
|
417
|
+
autosuggestResults?: ISearchstaxSEARCHTERM;
|
|
418
|
+
private searchInput?;
|
|
419
|
+
private actionButton?;
|
|
420
|
+
private autosuggestContainer?;
|
|
421
|
+
private buttonState;
|
|
422
|
+
private selectedAutosuggestItem;
|
|
423
|
+
private suggestTrigger;
|
|
424
|
+
private searchTrigger;
|
|
425
|
+
constructor(params: {
|
|
426
|
+
containerId: string;
|
|
427
|
+
config: ISearchstaxSearchInputConfig;
|
|
428
|
+
searchTrigger: (term: string) => void;
|
|
429
|
+
suggestTrigger: (term: string) => void;
|
|
430
|
+
dataLayer: DataLAyer;
|
|
431
|
+
});
|
|
432
|
+
private renderMainTemplate;
|
|
433
|
+
private createAutosuggestContainer;
|
|
434
|
+
private actionButtonInit;
|
|
435
|
+
private attachSubscriptions;
|
|
436
|
+
private handleLoadingChange;
|
|
437
|
+
private handleSearchTermChange;
|
|
438
|
+
private updateActionButtonState;
|
|
439
|
+
selectPreviousAutosuggestItem(): void;
|
|
440
|
+
selectNextAutosuggestItem(): void;
|
|
441
|
+
resetAutosuggestSelection(): void;
|
|
442
|
+
markActiveAutosuggestItem(): void;
|
|
443
|
+
private inputKeyupEvent;
|
|
444
|
+
private autosuggestHandling;
|
|
445
|
+
private inputPasteEvent;
|
|
446
|
+
private executeSuggest;
|
|
447
|
+
private executeSearch;
|
|
448
|
+
private suggestionChosen;
|
|
449
|
+
private hideAutosuggest;
|
|
450
|
+
private cleanSuggestionTerm;
|
|
451
|
+
autosuggestItemClicked(suggestion: ISearchstaxSuggestion): void;
|
|
452
|
+
private createAutosuggestItem;
|
|
453
|
+
onSuggestionEnter(suggestion: ISearchstaxSuggestion): void;
|
|
454
|
+
appendSuggestions(suggestions: ISearchstaxSuggestResponse): void;
|
|
455
|
+
}
|
|
456
|
+
declare class SearchResultsWidget {
|
|
457
|
+
dataLayer: DataLAyer;
|
|
458
|
+
config: ISearchstaxSearchResultsConfig;
|
|
459
|
+
linkClickCallback: (uniqueId: string) => void;
|
|
460
|
+
searchCallback: (term: string) => void;
|
|
461
|
+
containerId: string;
|
|
462
|
+
searchResultsMainContainer: HTMLElement;
|
|
463
|
+
searchResultsContainer?: HTMLElement;
|
|
464
|
+
searchResultLinks: HTMLElement[];
|
|
465
|
+
constructor(params: {
|
|
466
|
+
containerId: string;
|
|
467
|
+
linkClickCallback: (uniqueId: string) => void;
|
|
468
|
+
config: ISearchstaxSearchResultsConfig;
|
|
469
|
+
dataLayer: DataLAyer;
|
|
470
|
+
searchTrigger: (term: string) => void;
|
|
471
|
+
});
|
|
472
|
+
private initializeSubscriptions;
|
|
473
|
+
changeTemplate(): void;
|
|
474
|
+
private renderNoResultsTemplate;
|
|
475
|
+
private renderResults;
|
|
476
|
+
private removeLinkClickEvents;
|
|
477
|
+
private get uniqueIdAttribute();
|
|
478
|
+
private attachLinkClickEvents;
|
|
479
|
+
private renderMainTemplate;
|
|
480
|
+
}
|
|
411
481
|
export declare class Searchstax {
|
|
412
482
|
private routerEnabled;
|
|
413
483
|
private cachedQuery;
|
|
@@ -420,8 +490,8 @@ export declare class Searchstax {
|
|
|
420
490
|
private searchFacetsConfig?;
|
|
421
491
|
private relatedSearchesConfig?;
|
|
422
492
|
private externalPromotionsConfig?;
|
|
423
|
-
|
|
424
|
-
|
|
493
|
+
searchInputWidget?: SearchInputWidget;
|
|
494
|
+
searchResultsWidget?: SearchResultsWidget;
|
|
425
495
|
private searchFacetsWidget?;
|
|
426
496
|
private searchPaginationWidget?;
|
|
427
497
|
private searchFeedbackWidget?;
|