@sourceloop/search-client 4.3.1 → 4.3.2
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/bundles/sourceloop-search-client.umd.js +1 -1
- package/bundles/sourceloop-search-client.umd.js.map +1 -1
- package/esm2015/lib/search/search.component.js +1 -1
- package/esm2015/lib/search/search.component.scss.shim.ngstyle.js +1 -1
- package/fesm2015/sourceloop-search-client.js +1 -1
- package/fesm2015/sourceloop-search-client.js.map +1 -1
- package/package.json +3 -3
- package/sourceloop-search-client.metadata.json +1 -1
|
@@ -297,7 +297,7 @@
|
|
|
297
297
|
multi: true,
|
|
298
298
|
},
|
|
299
299
|
],
|
|
300
|
-
styles: [":host ::ng-deep .mat-form-field-wrapper{padding:0}:host ::ng-deep .mat-form-field-wrapper .mat-form-field-prefix{margin-right:12px}.toolbar-search-input{width:86%}.toolbar-search-input ::ng-deep input{margin:0}.toolbar-search-input ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent}.toolbar-search-input ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none;border-radius:0}.icomoon.Search,.icomoon.close{height:1rem;width:1rem;font-size:1rem;color:#33333380;padding-bottom:4px}.icomoon.close{cursor:pointer}.toolbar-search-select{width:calc(100% - 86%)}.toolbar-search-select ::ng-deep .mat-select-arrow{opacity:0}.toolbar-search-select ::ng-deep .mat-select-arrow-wrapper{display:inline-block;width:1px}.toolbar-search-select ::ng-deep .mat-select-value-text{font-size:9px}.toolbar-search-select ::ng-deep .mat-form-field-suffix .mat-icon{width:12px;font-size:14px}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent;border-radius:0}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-infix{-webkit-padding-before:.7em!important}.toolbar-search{width:515px;background-color:#f7f7f7;border-radius:0 0 4px 4px}.toolbar-search ::ng-deep .mat-form-field-appearance-outline .mat-form-field-flex{height:39px;align-items:center!important}.toolbar-search ::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0}.toolbar-search ::ng-deep .mat-form-field-infix{height:auto!important}.search-container{position:relative;width:515px}.search-container .search-popup{padding:0 15px 15px;margin:0;max-height:80vh;overflow-x:hidden;overflow-y:auto;position:absolute;top:100%;left:0px;right:0px;z-index:9999;background-color:#fff;box-shadow:0 5px 4px #0003;border-radius:0 0 4px 4px}.search-container .search-popup hr{border:0;border-top:1px solid #ebebeb;margin:0;position
|
|
300
|
+
styles: [":host ::ng-deep .mat-form-field-wrapper{padding:0}:host ::ng-deep .mat-form-field-wrapper .mat-form-field-prefix{margin-right:12px}.toolbar-search-input{width:86%}.toolbar-search-input ::ng-deep input{margin:0}.toolbar-search-input ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent}.toolbar-search-input ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none;border-radius:0}.icomoon.Search,.icomoon.close{height:1rem;width:1rem;font-size:1rem;color:#33333380;padding-bottom:4px}.icomoon.close{cursor:pointer}.toolbar-search-select{width:calc(100% - 86%)}.toolbar-search-select ::ng-deep .mat-select-arrow{opacity:0}.toolbar-search-select ::ng-deep .mat-select-arrow-wrapper{display:inline-block;width:1px}.toolbar-search-select ::ng-deep .mat-select-value-text{font-size:9px}.toolbar-search-select ::ng-deep .mat-form-field-suffix .mat-icon{width:12px;font-size:14px}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent;border-radius:0}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-infix{-webkit-padding-before:.7em!important}.toolbar-search{width:515px;background-color:#f7f7f7;border-radius:0 0 4px 4px}.toolbar-search ::ng-deep .mat-form-field-appearance-outline .mat-form-field-flex{height:39px;align-items:center!important}.toolbar-search ::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0}.toolbar-search ::ng-deep .mat-form-field-infix{height:auto!important}.search-container{position:relative;width:515px}.search-container .search-popup{padding:0 15px 15px;margin:0;max-height:80vh;overflow-x:hidden;overflow-y:auto;position:absolute;top:100%;left:0px;right:0px;z-index:9999;background-color:#fff;box-shadow:0 5px 4px #0003;border-radius:0 0 4px 4px}.search-container .search-popup hr{border:0;border-top:1px solid #ebebeb;margin:0;position:sticky;top:0;padding:0 0 15px;z-index:1}.search-container .search-popup .search-message{display:inline-block;width:100%;text-align:center;font-size:16px;padding-top:12px}.search-container .search-popup .search-item-info{color:#91263b;text-align:center;font-size:12px;margin-bottom:15px;padding-top:12px}.search-container .search-popup ul{padding:0;margin:0}.search-container .search-popup ul li{list-style:none;font-size:1rem;font-weight:400;line-height:1.5;color:#333}.search-container .search-popup ul li.suggestions{font-size:15px;line-height:36px;padding:0 15px 0 44px;align-items:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.search-container .search-popup ul li.suggestions:hover{background-color:#fee8e8}.search-container .search-popup ul li.suggestions svg{margin-right:5px}.search-container .search-popup ul li.suggestions-categorize-false:hover{background-color:#fee8e8}.search-container .search-popup .search-result{padding:10px 0 0;margin:0 -15px}.search-container .search-popup .search-result.no-categorize-result ul{width:100%;padding:0;margin:0 0 10px}.search-container .search-popup .search-result.no-categorize-result ul li{font-size:15px;line-height:36px;padding:0 15px 0 31px;display:flex;align-items:center;cursor:pointer}.search-container .search-popup .search-result.no-categorize-result ul li:hover{background-color:#fee8e8}.search-container .search-popup .search-result.no-categorize-result ul li img{width:18px;margin-right:9px}.search-container .search-popup .suggestions-heading{color:#9c9c9c;font-size:14px;font-weight:normal;margin:0 0 10px 17px;display:flex;align-items:center;position:relative}.search-container .search-popup .suggestions-heading .show-more{position:absolute;right:20px;color:#d1d1d1;font-size:12px;cursor:pointer;text-decoration:none}.search-container .search-popup .suggestions-heading .show-more :hover{text-decoration:underline}.search-container .search-popup .suggestions-heading img{width:18px;margin-right:9px}.search-container .search-popup .recent-searches{padding:10px 0 0;margin:0 -15px}.search-container .search-popup .recent-searches ul{display:inline-block;width:100%}.search-container .search-popup .recent-searches ul li.suggestions{display:flex}.search-container .search-popup .recent-searches ul li.suggestions span{width:100%;overflow:hidden;text-overflow:ellipsis}.search-container .search-popup .recent-searches .suggestions{display:flex}.search-container .search-popup .recent-searches .suggestions-heading{margin-left:30px}.search-container .search-popup .recent-searches li.suggestions{padding-left:31px}::ng-deep .search-select.mat-select-panel{margin-top:30px;margin-left:10px}::ng-deep .search-select .mat-option-text{display:contents!important}::ng-deep .toolbar-search .mat-form-field-infix{font-size:14px}::ng-deep .toolbar-search input{line-height:14px}::ng-deep .toolbar-search .mat-form-field-outline:first-child .mat-form-field-outline-start,::ng-deep .toolbar-search .mat-form-field-outline:first-child .mat-form-field-outline-end{background-color:#f1f3f4}::ng-deep .toolbar-search:hover .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-width:1px!important;border-color:#a53159!important}::ng-deep .toolbar-search:hover .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border:1px solid #a53159!important;border-left-style:none!important;border-right-style:none!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-radius:0;border-color:transparent!important;background-color:#a53159!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#a53159!important;background-color:#a53159!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-select{color:#fff!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .icomoon.arrow_down{color:#fff}::ng-deep .toolbar-search:focus-within .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-width:2px!important;border-color:#90003b!important}::ng-deep .toolbar-search:focus-within .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border:2px solid #90003b!important;border-left-style:none!important;border-right-style:none!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-radius:0;border-color:transparent!important;background-color:#90003b!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#90003b!important;background-color:#90003b!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-select{color:#fff!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .icomoon.arrow_down{color:#fff}::ng-deep .toolbar-search .mat-select-arrow{opacity:0}\n"]
|
|
301
301
|
},] }
|
|
302
302
|
];
|
|
303
303
|
SearchComponent.ctorParameters = function () { return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceloop-search-client.umd.js","sources":["../../src/lib/types.ts","../../src/lib/search/search.component.ts","../../src/lib/search-lib.module.ts","../../src/lib/lib-configuration.ts","../../src/public-api.ts","../../src/sourceloop-search-client.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nexport interface ISearchQuery {\n match: string;\n limit: number | null;\n order: string | null;\n limitByType: boolean | null;\n offset: number | null;\n sources: string[] | null;\n}\nexport interface IModel {\n name: string;\n displayName: string;\n imageUrl?: string;\n icon?: string;\n}\nexport interface IReturnType {\n rank: number;\n source: string;\n}\nexport interface IDefaultReturnType extends IReturnType {\n name: string;\n description: string;\n}\n\nexport interface ISearchService<T extends IReturnType> {\n searchApiRequest(\n requestParameters: ISearchQuery,\n saveInRecents: boolean,\n ): Observable<T[]>;\n recentSearchApiRequest?(): Observable<ISearchQuery[]>;\n}\n\n// cant use T extends IReturnType here\nexport const SEARCH_SERVICE_TOKEN: InjectionToken<ISearchService<IReturnType>> =\n new InjectionToken<ISearchService<IReturnType>>('Search_Service_Token');\n\nexport type RecentSearchEvent = {\n event?: Event;\n keyword: string;\n category: string;\n};\n\nexport type ItemClickedEvent<T> = {\n event: MouseEvent;\n item: T;\n};\n\nexport type TypeEvent = {\n event?: Event;\n input: string;\n};\n// IRequestParameters default values\nexport const DEFAULT_LIMIT = 20;\nexport const DEFAULT_LIMIT_TYPE = false;\nexport const DEFAULT_ORDER = [];\nexport const DEBOUNCE_TIME = 1000;\nexport const DEFAULT_OFFSET = 0;\nexport const DEFAULT_SAVE_IN_RECENTS = true;\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n PLATFORM_ID,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport {Configuration} from '../lib-configuration';\nimport {Subject} from 'rxjs';\nimport {debounceTime, tap} from 'rxjs/operators';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n ISearchService,\n ISearchQuery,\n SEARCH_SERVICE_TOKEN,\n DEBOUNCE_TIME,\n DEFAULT_LIMIT,\n DEFAULT_LIMIT_TYPE,\n DEFAULT_OFFSET,\n DEFAULT_SAVE_IN_RECENTS,\n DEFAULT_ORDER,\n IReturnType,\n RecentSearchEvent,\n TypeEvent,\n ItemClickedEvent,\n IModel,\n} from '../types';\nimport {isPlatformBrowser} from '@angular/common';\n\nconst ALL_LABEL = 'All';\n@Component({\n selector: 'sourceloop-search',\n templateUrl: './search.component.html',\n styleUrls: ['./search.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: SearchComponent,\n multi: true,\n },\n ],\n})\nexport class SearchComponent<T extends IReturnType>\n implements OnInit, OnDestroy, ControlValueAccessor\n{\n searchBoxInput = '';\n suggestionsDisplay = false;\n categoryDisplay = false;\n searching = false;\n suggestions: T[] = [];\n recentSearches: ISearchQuery[] = [];\n category: string = ALL_LABEL;\n searchRequest$ = new Subject<{input: string; event: Event}>();\n\n private _config!: Configuration<T>;\n public get config(): Configuration<T> {\n return this._config;\n }\n @Input()\n public set config(value: Configuration<T>) {\n this._config = value;\n\n if (value && value.models) {\n value.models.unshift({\n name: ALL_LABEL,\n displayName: ALL_LABEL,\n });\n } else if (value && !value.models) {\n value.models = [\n {\n name: ALL_LABEL,\n displayName: ALL_LABEL,\n },\n ];\n } else {\n // do nothing\n }\n }\n\n @Input() titleTemplate?: TemplateRef<any>;\n @Input() subtitleTemplate?: TemplateRef<any>;\n // emitted when user clicks one of the suggested results (including recent search sugestions)\n @Output() clicked = new EventEmitter<ItemClickedEvent<T>>();\n @Output() searched = new EventEmitter<RecentSearchEvent>();\n /* emitted when user makes search request (including recent search requests & requests made on change in category from dropdown)\n In case of recent search Array of recent Search request result is emitted */\n\n onChange!: (value: string | undefined) => void;\n onTouched!: () => void;\n disabled = false;\n\n @ViewChild('searchInput') public searchInputElement!: ElementRef;\n\n constructor(\n @Inject(SEARCH_SERVICE_TOKEN)\n private readonly searchService: ISearchService<T>,\n // tslint:disable-next-line:ban-types\n @Inject(PLATFORM_ID) private readonly platformId: Object,\n private readonly cdr: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {\n this.searchRequest$\n .pipe(\n tap(v => (this.suggestions = [])),\n debounceTime(DEBOUNCE_TIME),\n )\n .subscribe((value: TypeEvent) => {\n this.searched.emit({\n event: value.event,\n keyword: value.input,\n category: this.category,\n });\n this.getSuggestions(value);\n this.cdr.markForCheck();\n });\n }\n\n // ControlValueAccessor Implementation\n writeValue(value: string): void {\n this.searchBoxInput = value;\n }\n // When the value in the UI is changed, this method will invoke a callback function\n registerOnChange(fn: (value: string | undefined) => void): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n getSuggestions(eventValue: TypeEvent) {\n eventValue.input = eventValue.input.trim();\n if (!eventValue.input.length) {\n return;\n }\n const order = this.config.order ?? DEFAULT_ORDER;\n let orderString = '';\n order.forEach(preference => (orderString = `${orderString}${preference} `));\n\n let saveInRecents = this.config.saveInRecents ?? DEFAULT_SAVE_IN_RECENTS;\n if (this.config.saveInRecents && this.config.saveInRecentsOnlyOnEnter) {\n if (\n !eventValue.event ||\n (eventValue.event instanceof KeyboardEvent &&\n eventValue.event.key === 'Enter')\n ) {\n saveInRecents = true; // save in recents only on enter or change in category\n } else {\n // do not save in recent search on typing\n saveInRecents = false;\n }\n }\n /* need to put default value here and not in contructor\n because sonar was giving code smell with definite assertion as all these parameters are optional */\n const requestParameters: ISearchQuery = {\n match: eventValue.input,\n sources: this._categoryToSourceName(this.category),\n limit: this.config.limit ?? DEFAULT_LIMIT,\n limitByType: this.config.limitByType ?? DEFAULT_LIMIT_TYPE,\n order: orderString,\n offset: this.config.offset ?? DEFAULT_OFFSET,\n };\n\n this.searching = true;\n this.cdr.markForCheck();\n this.searchService\n .searchApiRequest(requestParameters, saveInRecents)\n .subscribe(\n (value: T[]) => {\n this.suggestions = value;\n this.searching = false;\n this.cdr.markForCheck();\n },\n (_error: Error) => {\n this.suggestions = [];\n this.searching = false;\n this.cdr.markForCheck();\n },\n );\n }\n getRecentSearches() {\n if (\n !this.config.hideRecentSearch &&\n this.searchService.recentSearchApiRequest\n ) {\n this.searchService.recentSearchApiRequest().subscribe(\n (value: ISearchQuery[]) => {\n this.recentSearches = value;\n this.cdr.markForCheck();\n },\n (_error: Error) => {\n this.recentSearches = [];\n this.cdr.markForCheck();\n },\n );\n }\n }\n\n // event can be KeyBoardEvent or Event of type 'change' fired on change in value of drop down for category\n hitSearchApi(event?: Event) {\n // this will happen only in case user searches something and then erases it, we need to update recent search\n if (!this.searchBoxInput) {\n this.suggestions = [];\n this.getRecentSearches();\n return;\n }\n\n // no debounce time needed in case of searchOnlyOnEnter\n if (this.config.searchOnlyOnEnter) {\n if (!event || (event instanceof KeyboardEvent && event.key === 'Enter')) {\n this.getSuggestions({input: this.searchBoxInput, event});\n }\n return;\n }\n\n // no debounce time needed in case of change in category\n if (!event) {\n this.getSuggestions({input: this.searchBoxInput, event});\n return;\n }\n\n this.searchRequest$.next({\n input: this.searchBoxInput,\n event,\n });\n }\n\n populateValue(suggestion: T, event: MouseEvent) {\n const value = suggestion[\n this.config.displayPropertyName\n ] as unknown as string; // converted to string to assign value to searchBoxInput\n this.searchBoxInput = value;\n this.suggestionsDisplay = false;\n // ngModelChange doesn't detect change in value when populated from outside, hence calling manually\n this.onChange(this.searchBoxInput);\n // need to do this to show more search options for selected suggestion - just in case user reopens search input\n this.getSuggestions({input: this.searchBoxInput, event});\n this.clicked.emit({item: suggestion, event});\n }\n populateValueRecentSearch(recentSearch: ISearchQuery, event: MouseEvent) {\n event.stopPropagation();\n event.preventDefault();\n const value = recentSearch['match'];\n this.searchBoxInput = value;\n this.suggestionsDisplay = false;\n this.onChange(this.searchBoxInput);\n // need to do this to show more search options for selected suggestion - just in case user reopens search input\n this.getSuggestions({input: this.searchBoxInput, event});\n this.focusInput();\n this.showSuggestions();\n }\n\n fetchModelImageUrlFromSuggestion(suggestion: T) {\n const modelName = suggestion[\n 'source' as unknown as keyof T\n ] as unknown as string;\n let url: string | undefined;\n this.config.models.forEach(model => {\n if (model.name === modelName && model.imageUrl) {\n url = model.imageUrl;\n }\n });\n return url;\n }\n\n boldString(str: T[keyof T] | string, substr: string) {\n const strRegExp = new RegExp(`(${substr})`, 'gi');\n const stringToMakeBold: string = str as unknown as string;\n return stringToMakeBold.replace(strRegExp, `<b>$1</b>`);\n }\n\n hideSuggestions() {\n this.suggestionsDisplay = false;\n this.onTouched();\n }\n\n showSuggestions() {\n this.suggestionsDisplay = true;\n this.getRecentSearches();\n }\n\n focusInput() {\n if (isPlatformBrowser(this.platformId)) {\n this.searchInputElement.nativeElement.focus();\n }\n }\n\n setCategory(category: string) {\n this.category = category;\n this.categoryDisplay = false;\n if (this.searchBoxInput) {\n this.hitSearchApi();\n this.focusInput();\n this.showSuggestions();\n }\n }\n\n showCategory() {\n this.categoryDisplay = !this.categoryDisplay;\n }\n\n hideCategory() {\n this.categoryDisplay = false;\n }\n\n resetInput() {\n this.searchBoxInput = '';\n this.suggestions = [];\n this.suggestionsDisplay = true;\n this.focusInput();\n // ngModelChange doesn't detect change in value when populated from outside, hence calling manually\n this.onChange(this.searchBoxInput);\n this.getRecentSearches();\n }\n ngOnDestroy() {\n this.searchRequest$.unsubscribe();\n }\n\n _categoryToSourceName(category: string) {\n if (category === ALL_LABEL) {\n return [];\n } else {\n return [category];\n }\n }\n getModelFromModelName(name: string) {\n return this.config.models.find(item => item.name === name) as IModel;\n }\n getModelsWithSuggestions() {\n const modelsWithSuggestions: {model: IModel; items: T[]}[] = [];\n const sources: string[] = [];\n this.suggestions.forEach(suggestion => {\n if (sources.indexOf(suggestion['source']) >= 0) {\n modelsWithSuggestions.every(modelWithSuggestions => {\n if (modelWithSuggestions.model.name === suggestion['source']) {\n modelWithSuggestions.items.push(suggestion);\n return false;\n }\n return true;\n });\n } else {\n const model = this.getModelFromModelName(suggestion['source']);\n modelsWithSuggestions.push({model, items: [suggestion]});\n sources.push(suggestion['source']);\n }\n });\n return modelsWithSuggestions;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {HttpClientModule} from '@angular/common/http';\nimport {NgModule} from '@angular/core';\nimport {FlexLayoutModule} from '@angular/flex-layout';\nimport {FormsModule} from '@angular/forms';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {MatIconModule} from '@angular/material/icon';\nimport {MatInputModule} from '@angular/material/input';\nimport {MatSelectModule} from '@angular/material/select';\n\nimport {SearchComponent} from './search/search.component';\n\n@NgModule({\n declarations: [SearchComponent],\n imports: [\n CommonModule,\n FormsModule,\n HttpClientModule,\n MatSelectModule,\n MatFormFieldModule,\n MatIconModule,\n MatInputModule,\n FlexLayoutModule,\n ],\n exports: [SearchComponent],\n})\nexport class SearchLibModule {}\n","import {IDefaultReturnType, IModel} from './types';\nexport class Configuration<T = IDefaultReturnType> {\n /** property to be displayed in the results */\n displayPropertyName: keyof T;\n /** list of model configuration to be render and categorize search results */\n models: IModel[];\n /** max number of results (based on limitByType option) */\n limit?: number;\n /** apply limit on individual models, or on overall results */\n limitByType?: boolean;\n /** apply a particular ordering on results */\n order?: string[];\n /** offset for results in case limit is used */\n offset?: number;\n /** save the search query in recent history */\n saveInRecents?: boolean;\n /** a placeholder to display in the search box */\n placeholder?: string;\n /** a function to generate placeholder, overrides the placeholder property */\n placeholderFunction?: (input: string, category: string) => string;\n /** categorize results on the basis of models provided */\n categorizeResults?: boolean;\n /** hides the recent search list */\n hideRecentSearch?: boolean;\n /** hide the category selection button */\n hideCategorizeButton?: boolean;\n /** save value in recent search only on enter or change in category, if false, also saved on typing */\n saveInRecentsOnlyOnEnter?: boolean;\n /** search only on enter key or when category is changed */\n searchOnlyOnEnter?: boolean;\n noResultMessage?: string;\n searchIconClass?: string;\n crossIconClass?: string;\n dropDownButtonIconClass?: string;\n recentSearchIconClass?: string;\n\n constructor(d: Configuration<T>) {\n checkForError(d);\n this.displayPropertyName = d.displayPropertyName;\n this.models = d.models;\n\n /* IRequestParameters - will be given default values before call is made in case undefined/null,\n otherwise there ! is used on which sonar gives code smell */\n this.limit = d.limit;\n this.limitByType = d.limitByType;\n this.order = d.order;\n this.offset = d.offset;\n this.saveInRecents = d.saveInRecents;\n\n const displayTexts = setDisplayText(d);\n this.noResultMessage = displayTexts.noResultMessage;\n this.placeholder = displayTexts.placeholder;\n this.placeholderFunction = displayTexts.placeholderFunction;\n\n const searchConfig = setSearchConfig(d);\n this.categorizeResults = searchConfig.categorizeResults;\n this.hideRecentSearch = searchConfig.hideRecentSearch;\n this.hideCategorizeButton = searchConfig.hideCategorizeButton;\n this.saveInRecentsOnlyOnEnter = searchConfig.saveInRecentsOnlyOnEnter;\n this.searchOnlyOnEnter = searchConfig.searchOnlyOnEnter;\n\n const classes = setIconClasses(d);\n this.searchIconClass = classes.searchIconClass;\n this.crossIconClass = classes.crossIconClass;\n this.dropDownButtonIconClass = classes.dropDownButtonIconClass;\n this.recentSearchIconClass = classes.recentSearchIconClass;\n }\n}\nfunction checkForError<T>(d: Configuration<T>) {\n if (\n d.categorizeResults === false &&\n (d.hideCategorizeButton === false || d.hideCategorizeButton === undefined)\n ) {\n throw new Error(\n 'You must provide hideCategorizeButton:true as categorizeResults is false',\n );\n }\n if (d.saveInRecents === false && d.saveInRecentsOnlyOnEnter === true) {\n throw new Error(\n 'You must provide saveInRecents:true for saveInRecentsOnlyOnEnter:true',\n );\n }\n}\nfunction setDisplayText<T>(d: Configuration<T>) {\n return {\n placeholder: d.placeholder ?? 'Search',\n noResultMessage: d.noResultMessage ?? 'No result found',\n placeholderFunction: d.placeholderFunction,\n };\n}\nfunction setSearchConfig<T>(d: Configuration<T>) {\n return {\n categorizeResults: d.categorizeResults ?? true,\n hideRecentSearch: d.hideRecentSearch ?? false,\n hideCategorizeButton: d.hideCategorizeButton ?? false,\n saveInRecentsOnlyOnEnter: d.saveInRecentsOnlyOnEnter ?? false,\n searchOnlyOnEnter: d.searchOnlyOnEnter ?? false,\n };\n}\nfunction setIconClasses<T>(d: Configuration<T>) {\n return {\n searchIconClass: d.searchIconClass ?? 'icomoon Search',\n crossIconClass: d.crossIconClass ?? 'icomoon close',\n dropDownButtonIconClass: d.dropDownButtonIconClass ?? 'icomoon arrow_down',\n recentSearchIconClass: d.recentSearchIconClass ?? 'icomoon Search',\n };\n}\n","/*\n * Public API Surface of my-lib\n */\n\nexport * from './lib/search-lib.module';\nexport * from './lib/search/search.component';\nexport * from './lib/lib-configuration';\nexport * from './lib/types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["InjectionToken","Subject","EventEmitter","tap","debounceTime","isPlatformBrowser","Component","NG_VALUE_ACCESSOR","Inject","PLATFORM_ID","ChangeDetectorRef","Input","Output","ViewChild","NgModule","CommonModule","FormsModule","HttpClientModule","MatSelectModule","MatFormFieldModule","MatIconModule","MatInputModule","FlexLayoutModule"],"mappings":";;;;;;IAkCA;QACa,oBAAoB,GAC/B,IAAIA,mBAAc,CAA8B,sBAAsB,EAAE;IAiB1E;QACa,aAAa,GAAG,GAAG;QACnB,kBAAkB,GAAG,MAAM;QAC3B,aAAa,GAAG,GAAG;QACnB,aAAa,GAAG,KAAK;QACrB,cAAc,GAAG,EAAE;QACnB,uBAAuB,GAAG;;ICvBvC,IAAM,SAAS,GAAG,KAAK,CAAC;;QAgEtB,yBAEmB,aAAgC;;QAEX,UAAkB,EACvC,GAAsB;YAHtB,kBAAa,GAAb,aAAa,CAAmB;YAEX,eAAU,GAAV,UAAU,CAAQ;YACvC,QAAG,GAAH,GAAG,CAAmB;YArDzC,mBAAc,GAAG,EAAE,CAAC;YACpB,uBAAkB,GAAG,KAAK,CAAC;YAC3B,oBAAe,GAAG,KAAK,CAAC;YACxB,cAAS,GAAG,KAAK,CAAC;YAClB,gBAAW,GAAQ,EAAE,CAAC;YACtB,mBAAc,GAAmB,EAAE,CAAC;YACpC,aAAQ,GAAW,SAAS,CAAC;YAC7B,mBAAc,GAAG,IAAIC,YAAO,EAAiC,CAAC;;YA8BpD,YAAO,GAAG,IAAIC,iBAAY,EAAuB,CAAC;YAClD,aAAQ,GAAG,IAAIA,iBAAY,EAAqB,CAAC;YAM3D,aAAQ,GAAG,KAAK,CAAC;SAUb;QA5CJ,sBAAW,mCAAM;iBAAjB;gBACE,OAAO,IAAI,CAAC,OAAO,CAAC;aACrB;iBACD,UACkB,KAAuB;g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QAC5C,OAAO;YACL,eAAe,EAAE,MAAA,CAAC,CAAC,eAAe,mCAAI,gBAAgB;YACtD,cAAc,EAAE,MAAA,CAAC,CAAC,cAAc,mCAAI,eAAe;YACnD,uBAAuB,EAAE,MAAA,CAAC,CAAC,uBAAuB,mCAAI,oBAAoB;YAC1E,qBAAqB,EAAE,MAAA,CAAC,CAAC,qBAAqB,mCAAI,gBAAgB;SACnE,CAAC;IACJ;;IC1GA;;;;ICAA;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"sourceloop-search-client.umd.js","sources":["../../src/lib/types.ts","../../src/lib/search/search.component.ts","../../src/lib/search-lib.module.ts","../../src/lib/lib-configuration.ts","../../src/public-api.ts","../../src/sourceloop-search-client.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nexport interface ISearchQuery {\n match: string;\n limit: number | null;\n order: string | null;\n limitByType: boolean | null;\n offset: number | null;\n sources: string[] | null;\n}\nexport interface IModel {\n name: string;\n displayName: string;\n imageUrl?: string;\n icon?: string;\n}\nexport interface IReturnType {\n rank: number;\n source: string;\n}\nexport interface IDefaultReturnType extends IReturnType {\n name: string;\n description: string;\n}\n\nexport interface ISearchService<T extends IReturnType> {\n searchApiRequest(\n requestParameters: ISearchQuery,\n saveInRecents: boolean,\n ): Observable<T[]>;\n recentSearchApiRequest?(): Observable<ISearchQuery[]>;\n}\n\n// cant use T extends IReturnType here\nexport const SEARCH_SERVICE_TOKEN: InjectionToken<ISearchService<IReturnType>> =\n new InjectionToken<ISearchService<IReturnType>>('Search_Service_Token');\n\nexport type RecentSearchEvent = {\n event?: Event;\n keyword: string;\n category: string;\n};\n\nexport type ItemClickedEvent<T> = {\n event: MouseEvent;\n item: T;\n};\n\nexport type TypeEvent = {\n event?: Event;\n input: string;\n};\n// IRequestParameters default values\nexport const DEFAULT_LIMIT = 20;\nexport const DEFAULT_LIMIT_TYPE = false;\nexport const DEFAULT_ORDER = [];\nexport const DEBOUNCE_TIME = 1000;\nexport const DEFAULT_OFFSET = 0;\nexport const DEFAULT_SAVE_IN_RECENTS = true;\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n PLATFORM_ID,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport {Configuration} from '../lib-configuration';\nimport {Subject} from 'rxjs';\nimport {debounceTime, tap} from 'rxjs/operators';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n ISearchService,\n ISearchQuery,\n SEARCH_SERVICE_TOKEN,\n DEBOUNCE_TIME,\n DEFAULT_LIMIT,\n DEFAULT_LIMIT_TYPE,\n DEFAULT_OFFSET,\n DEFAULT_SAVE_IN_RECENTS,\n DEFAULT_ORDER,\n IReturnType,\n RecentSearchEvent,\n TypeEvent,\n ItemClickedEvent,\n IModel,\n} from '../types';\nimport {isPlatformBrowser} from '@angular/common';\n\nconst ALL_LABEL = 'All';\n@Component({\n selector: 'sourceloop-search',\n templateUrl: './search.component.html',\n styleUrls: ['./search.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: SearchComponent,\n multi: true,\n },\n ],\n})\nexport class SearchComponent<T extends IReturnType>\n implements OnInit, OnDestroy, ControlValueAccessor\n{\n searchBoxInput = '';\n suggestionsDisplay = false;\n categoryDisplay = false;\n searching = false;\n suggestions: T[] = [];\n recentSearches: ISearchQuery[] = [];\n category: string = ALL_LABEL;\n searchRequest$ = new Subject<{input: string; event: Event}>();\n\n private _config!: Configuration<T>;\n public get config(): Configuration<T> {\n return this._config;\n }\n @Input()\n public set config(value: Configuration<T>) {\n this._config = value;\n\n if (value && value.models) {\n value.models.unshift({\n name: ALL_LABEL,\n displayName: ALL_LABEL,\n });\n } else if (value && !value.models) {\n value.models = [\n {\n name: ALL_LABEL,\n displayName: ALL_LABEL,\n },\n ];\n } else {\n // do nothing\n }\n }\n\n @Input() titleTemplate?: TemplateRef<any>;\n @Input() subtitleTemplate?: TemplateRef<any>;\n // emitted when user clicks one of the suggested results (including recent search sugestions)\n @Output() clicked = new EventEmitter<ItemClickedEvent<T>>();\n @Output() searched = new EventEmitter<RecentSearchEvent>();\n /* emitted when user makes search request (including recent search requests & requests made on change in category from dropdown)\n In case of recent search Array of recent Search request result is emitted */\n\n onChange!: (value: string | undefined) => void;\n onTouched!: () => void;\n disabled = false;\n\n @ViewChild('searchInput') public searchInputElement!: ElementRef;\n\n constructor(\n @Inject(SEARCH_SERVICE_TOKEN)\n private readonly searchService: ISearchService<T>,\n // tslint:disable-next-line:ban-types\n @Inject(PLATFORM_ID) private readonly platformId: Object,\n private readonly cdr: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {\n this.searchRequest$\n .pipe(\n tap(v => (this.suggestions = [])),\n debounceTime(DEBOUNCE_TIME),\n )\n .subscribe((value: TypeEvent) => {\n this.searched.emit({\n event: value.event,\n keyword: value.input,\n category: this.category,\n });\n this.getSuggestions(value);\n this.cdr.markForCheck();\n });\n }\n\n // ControlValueAccessor Implementation\n writeValue(value: string): void {\n this.searchBoxInput = value;\n }\n // When the value in the UI is changed, this method will invoke a callback function\n registerOnChange(fn: (value: string | undefined) => void): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n getSuggestions(eventValue: TypeEvent) {\n eventValue.input = eventValue.input.trim();\n if (!eventValue.input.length) {\n return;\n }\n const order = this.config.order ?? DEFAULT_ORDER;\n let orderString = '';\n order.forEach(preference => (orderString = `${orderString}${preference} `));\n\n let saveInRecents = this.config.saveInRecents ?? DEFAULT_SAVE_IN_RECENTS;\n if (this.config.saveInRecents && this.config.saveInRecentsOnlyOnEnter) {\n if (\n !eventValue.event ||\n (eventValue.event instanceof KeyboardEvent &&\n eventValue.event.key === 'Enter')\n ) {\n saveInRecents = true; // save in recents only on enter or change in category\n } else {\n // do not save in recent search on typing\n saveInRecents = false;\n }\n }\n /* need to put default value here and not in contructor\n because sonar was giving code smell with definite assertion as all these parameters are optional */\n const requestParameters: ISearchQuery = {\n match: eventValue.input,\n sources: this._categoryToSourceName(this.category),\n limit: this.config.limit ?? DEFAULT_LIMIT,\n limitByType: this.config.limitByType ?? DEFAULT_LIMIT_TYPE,\n order: orderString,\n offset: this.config.offset ?? DEFAULT_OFFSET,\n };\n\n this.searching = true;\n this.cdr.markForCheck();\n this.searchService\n .searchApiRequest(requestParameters, saveInRecents)\n .subscribe(\n (value: T[]) => {\n this.suggestions = value;\n this.searching = false;\n this.cdr.markForCheck();\n },\n (_error: Error) => {\n this.suggestions = [];\n this.searching = false;\n this.cdr.markForCheck();\n },\n );\n }\n getRecentSearches() {\n if (\n !this.config.hideRecentSearch &&\n this.searchService.recentSearchApiRequest\n ) {\n this.searchService.recentSearchApiRequest().subscribe(\n (value: ISearchQuery[]) => {\n this.recentSearches = value;\n this.cdr.markForCheck();\n },\n (_error: Error) => {\n this.recentSearches = [];\n this.cdr.markForCheck();\n },\n );\n }\n }\n\n // event can be KeyBoardEvent or Event of type 'change' fired on change in value of drop down for category\n hitSearchApi(event?: Event) {\n // this will happen only in case user searches something and then erases it, we need to update recent search\n if (!this.searchBoxInput) {\n this.suggestions = [];\n this.getRecentSearches();\n return;\n }\n\n // no debounce time needed in case of searchOnlyOnEnter\n if (this.config.searchOnlyOnEnter) {\n if (!event || (event instanceof KeyboardEvent && event.key === 'Enter')) {\n this.getSuggestions({input: this.searchBoxInput, event});\n }\n return;\n }\n\n // no debounce time needed in case of change in category\n if (!event) {\n this.getSuggestions({input: this.searchBoxInput, event});\n return;\n }\n\n this.searchRequest$.next({\n input: this.searchBoxInput,\n event,\n });\n }\n\n populateValue(suggestion: T, event: MouseEvent) {\n const value = suggestion[\n this.config.displayPropertyName\n ] as unknown as string; // converted to string to assign value to searchBoxInput\n this.searchBoxInput = value;\n this.suggestionsDisplay = false;\n // ngModelChange doesn't detect change in value when populated from outside, hence calling manually\n this.onChange(this.searchBoxInput);\n // need to do this to show more search options for selected suggestion - just in case user reopens search input\n this.getSuggestions({input: this.searchBoxInput, event});\n this.clicked.emit({item: suggestion, event});\n }\n populateValueRecentSearch(recentSearch: ISearchQuery, event: MouseEvent) {\n event.stopPropagation();\n event.preventDefault();\n const value = recentSearch['match'];\n this.searchBoxInput = value;\n this.suggestionsDisplay = false;\n this.onChange(this.searchBoxInput);\n // need to do this to show more search options for selected suggestion - just in case user reopens search input\n this.getSuggestions({input: this.searchBoxInput, event});\n this.focusInput();\n this.showSuggestions();\n }\n\n fetchModelImageUrlFromSuggestion(suggestion: T) {\n const modelName = suggestion[\n 'source' as unknown as keyof T\n ] as unknown as string;\n let url: string | undefined;\n this.config.models.forEach(model => {\n if (model.name === modelName && model.imageUrl) {\n url = model.imageUrl;\n }\n });\n return url;\n }\n\n boldString(str: T[keyof T] | string, substr: string) {\n const strRegExp = new RegExp(`(${substr})`, 'gi');\n const stringToMakeBold: string = str as unknown as string;\n return stringToMakeBold.replace(strRegExp, `<b>$1</b>`);\n }\n\n hideSuggestions() {\n this.suggestionsDisplay = false;\n this.onTouched();\n }\n\n showSuggestions() {\n this.suggestionsDisplay = true;\n this.getRecentSearches();\n }\n\n focusInput() {\n if (isPlatformBrowser(this.platformId)) {\n this.searchInputElement.nativeElement.focus();\n }\n }\n\n setCategory(category: string) {\n this.category = category;\n this.categoryDisplay = false;\n if (this.searchBoxInput) {\n this.hitSearchApi();\n this.focusInput();\n this.showSuggestions();\n }\n }\n\n showCategory() {\n this.categoryDisplay = !this.categoryDisplay;\n }\n\n hideCategory() {\n this.categoryDisplay = false;\n }\n\n resetInput() {\n this.searchBoxInput = '';\n this.suggestions = [];\n this.suggestionsDisplay = true;\n this.focusInput();\n // ngModelChange doesn't detect change in value when populated from outside, hence calling manually\n this.onChange(this.searchBoxInput);\n this.getRecentSearches();\n }\n ngOnDestroy() {\n this.searchRequest$.unsubscribe();\n }\n\n _categoryToSourceName(category: string) {\n if (category === ALL_LABEL) {\n return [];\n } else {\n return [category];\n }\n }\n getModelFromModelName(name: string) {\n return this.config.models.find(item => item.name === name) as IModel;\n }\n getModelsWithSuggestions() {\n const modelsWithSuggestions: {model: IModel; items: T[]}[] = [];\n const sources: string[] = [];\n this.suggestions.forEach(suggestion => {\n if (sources.indexOf(suggestion['source']) >= 0) {\n modelsWithSuggestions.every(modelWithSuggestions => {\n if (modelWithSuggestions.model.name === suggestion['source']) {\n modelWithSuggestions.items.push(suggestion);\n return false;\n }\n return true;\n });\n } else {\n const model = this.getModelFromModelName(suggestion['source']);\n modelsWithSuggestions.push({model, items: [suggestion]});\n sources.push(suggestion['source']);\n }\n });\n return modelsWithSuggestions;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {HttpClientModule} from '@angular/common/http';\nimport {NgModule} from '@angular/core';\nimport {FlexLayoutModule} from '@angular/flex-layout';\nimport {FormsModule} from '@angular/forms';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {MatIconModule} from '@angular/material/icon';\nimport {MatInputModule} from '@angular/material/input';\nimport {MatSelectModule} from '@angular/material/select';\n\nimport {SearchComponent} from './search/search.component';\n\n@NgModule({\n declarations: [SearchComponent],\n imports: [\n CommonModule,\n FormsModule,\n HttpClientModule,\n MatSelectModule,\n MatFormFieldModule,\n MatIconModule,\n MatInputModule,\n FlexLayoutModule,\n ],\n exports: [SearchComponent],\n})\nexport class SearchLibModule {}\n","import {IDefaultReturnType, IModel} from './types';\nexport class Configuration<T = IDefaultReturnType> {\n /** property to be displayed in the results */\n displayPropertyName: keyof T;\n /** list of model configuration to be render and categorize search results */\n models: IModel[];\n /** max number of results (based on limitByType option) */\n limit?: number;\n /** apply limit on individual models, or on overall results */\n limitByType?: boolean;\n /** apply a particular ordering on results */\n order?: string[];\n /** offset for results in case limit is used */\n offset?: number;\n /** save the search query in recent history */\n saveInRecents?: boolean;\n /** a placeholder to display in the search box */\n placeholder?: string;\n /** a function to generate placeholder, overrides the placeholder property */\n placeholderFunction?: (input: string, category: string) => string;\n /** categorize results on the basis of models provided */\n categorizeResults?: boolean;\n /** hides the recent search list */\n hideRecentSearch?: boolean;\n /** hide the category selection button */\n hideCategorizeButton?: boolean;\n /** save value in recent search only on enter or change in category, if false, also saved on typing */\n saveInRecentsOnlyOnEnter?: boolean;\n /** search only on enter key or when category is changed */\n searchOnlyOnEnter?: boolean;\n noResultMessage?: string;\n searchIconClass?: string;\n crossIconClass?: string;\n dropDownButtonIconClass?: string;\n recentSearchIconClass?: string;\n\n constructor(d: Configuration<T>) {\n checkForError(d);\n this.displayPropertyName = d.displayPropertyName;\n this.models = d.models;\n\n /* IRequestParameters - will be given default values before call is made in case undefined/null,\n otherwise there ! is used on which sonar gives code smell */\n this.limit = d.limit;\n this.limitByType = d.limitByType;\n this.order = d.order;\n this.offset = d.offset;\n this.saveInRecents = d.saveInRecents;\n\n const displayTexts = setDisplayText(d);\n this.noResultMessage = displayTexts.noResultMessage;\n this.placeholder = displayTexts.placeholder;\n this.placeholderFunction = displayTexts.placeholderFunction;\n\n const searchConfig = setSearchConfig(d);\n this.categorizeResults = searchConfig.categorizeResults;\n this.hideRecentSearch = searchConfig.hideRecentSearch;\n this.hideCategorizeButton = searchConfig.hideCategorizeButton;\n this.saveInRecentsOnlyOnEnter = searchConfig.saveInRecentsOnlyOnEnter;\n this.searchOnlyOnEnter = searchConfig.searchOnlyOnEnter;\n\n const classes = setIconClasses(d);\n this.searchIconClass = classes.searchIconClass;\n this.crossIconClass = classes.crossIconClass;\n this.dropDownButtonIconClass = classes.dropDownButtonIconClass;\n this.recentSearchIconClass = classes.recentSearchIconClass;\n }\n}\nfunction checkForError<T>(d: Configuration<T>) {\n if (\n d.categorizeResults === false &&\n (d.hideCategorizeButton === false || d.hideCategorizeButton === undefined)\n ) {\n throw new Error(\n 'You must provide hideCategorizeButton:true as categorizeResults is false',\n );\n }\n if (d.saveInRecents === false && d.saveInRecentsOnlyOnEnter === true) {\n throw new Error(\n 'You must provide saveInRecents:true for saveInRecentsOnlyOnEnter:true',\n );\n }\n}\nfunction setDisplayText<T>(d: Configuration<T>) {\n return {\n placeholder: d.placeholder ?? 'Search',\n noResultMessage: d.noResultMessage ?? 'No result found',\n placeholderFunction: d.placeholderFunction,\n };\n}\nfunction setSearchConfig<T>(d: Configuration<T>) {\n return {\n categorizeResults: d.categorizeResults ?? true,\n hideRecentSearch: d.hideRecentSearch ?? false,\n hideCategorizeButton: d.hideCategorizeButton ?? false,\n saveInRecentsOnlyOnEnter: d.saveInRecentsOnlyOnEnter ?? false,\n searchOnlyOnEnter: d.searchOnlyOnEnter ?? false,\n };\n}\nfunction setIconClasses<T>(d: Configuration<T>) {\n return {\n searchIconClass: d.searchIconClass ?? 'icomoon Search',\n crossIconClass: d.crossIconClass ?? 'icomoon close',\n dropDownButtonIconClass: d.dropDownButtonIconClass ?? 'icomoon arrow_down',\n recentSearchIconClass: d.recentSearchIconClass ?? 'icomoon Search',\n };\n}\n","/*\n * Public API Surface of my-lib\n */\n\nexport * from './lib/search-lib.module';\nexport * from './lib/search/search.component';\nexport * from './lib/lib-configuration';\nexport * from './lib/types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["InjectionToken","Subject","EventEmitter","tap","debounceTime","isPlatformBrowser","Component","NG_VALUE_ACCESSOR","Inject","PLATFORM_ID","ChangeDetectorRef","Input","Output","ViewChild","NgModule","CommonModule","FormsModule","HttpClientModule","MatSelectModule","MatFormFieldModule","MatIconModule","MatInputModule","FlexLayoutModule"],"mappings":";;;;;;IAkCA;QACa,oBAAoB,GAC/B,IAAIA,mBAAc,CAA8B,sBAAsB,EAAE;IAiB1E;AACO,QAAM,aAAa,GAAG,GAAG;AACzB,QAAM,kBAAkB,GAAG,MAAM;AACjC,QAAM,aAAa,GAAG,GAAG;AACzB,QAAM,aAAa,GAAG,KAAK;AAC3B,QAAM,cAAc,GAAG,EAAE;AACzB,QAAM,uBAAuB,GAAG;;ICvBvC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AE,CAAA,EAAA,GAAA,CAAC,CAAC,oBAAoB,mCAAI,KAAK;YACrD,wBAAwB,EAAE,CAAA,EAAA,GAAA,CAAC,CAAC,wBAAwB,mCAAI,KAAK;YAC7D,iBAAiB,EAAE,CAAA,EAAA,GAAA,CAAC,CAAC,iBAAiB,mCAAI,KAAK;SAChD,CAAC;IACJ,CAAC;IACD,SAAS,cAAc,CAAI,CAAmB,EAAA;;QAC5C,OAAO;YACL,eAAe,EAAE,CAAA,EAAA,GAAA,CAAC,CAAC,eAAe,mCAAI,gBAAgB;YACtD,cAAc,EAAE,CAAA,EAAA,GAAA,CAAC,CAAC,cAAc,mCAAI,eAAe;YACnD,uBAAuB,EAAE,CAAA,EAAA,GAAA,CAAC,CAAC,uBAAuB,mCAAI,oBAAoB;YAC1E,qBAAqB,EAAE,CAAA,EAAA,GAAA,CAAC,CAAC,qBAAqB,mCAAI,gBAAgB;SACnE,CAAC;IACJ;;IC1GA;;IAEG;;ICFH;;IAEG;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -278,7 +278,7 @@ SearchComponent.decorators = [
|
|
|
278
278
|
multi: true,
|
|
279
279
|
},
|
|
280
280
|
],
|
|
281
|
-
styles: [":host ::ng-deep .mat-form-field-wrapper{padding:0}:host ::ng-deep .mat-form-field-wrapper .mat-form-field-prefix{margin-right:12px}.toolbar-search-input{width:86%}.toolbar-search-input ::ng-deep input{margin:0}.toolbar-search-input ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent}.toolbar-search-input ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none;border-radius:0}.icomoon.Search,.icomoon.close{height:1rem;width:1rem;font-size:1rem;color:#33333380;padding-bottom:4px}.icomoon.close{cursor:pointer}.toolbar-search-select{width:calc(100% - 86%)}.toolbar-search-select ::ng-deep .mat-select-arrow{opacity:0}.toolbar-search-select ::ng-deep .mat-select-arrow-wrapper{display:inline-block;width:1px}.toolbar-search-select ::ng-deep .mat-select-value-text{font-size:9px}.toolbar-search-select ::ng-deep .mat-form-field-suffix .mat-icon{width:12px;font-size:14px}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent;border-radius:0}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-infix{-webkit-padding-before:.7em!important}.toolbar-search{width:515px;background-color:#f7f7f7;border-radius:0 0 4px 4px}.toolbar-search ::ng-deep .mat-form-field-appearance-outline .mat-form-field-flex{height:39px;align-items:center!important}.toolbar-search ::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0}.toolbar-search ::ng-deep .mat-form-field-infix{height:auto!important}.search-container{position:relative;width:515px}.search-container .search-popup{padding:0 15px 15px;margin:0;max-height:80vh;overflow-x:hidden;overflow-y:auto;position:absolute;top:100%;left:0px;right:0px;z-index:9999;background-color:#fff;box-shadow:0 5px 4px #0003;border-radius:0 0 4px 4px}.search-container .search-popup hr{border:0;border-top:1px solid #ebebeb;margin:0;position
|
|
281
|
+
styles: [":host ::ng-deep .mat-form-field-wrapper{padding:0}:host ::ng-deep .mat-form-field-wrapper .mat-form-field-prefix{margin-right:12px}.toolbar-search-input{width:86%}.toolbar-search-input ::ng-deep input{margin:0}.toolbar-search-input ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent}.toolbar-search-input ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none;border-radius:0}.icomoon.Search,.icomoon.close{height:1rem;width:1rem;font-size:1rem;color:#33333380;padding-bottom:4px}.icomoon.close{cursor:pointer}.toolbar-search-select{width:calc(100% - 86%)}.toolbar-search-select ::ng-deep .mat-select-arrow{opacity:0}.toolbar-search-select ::ng-deep .mat-select-arrow-wrapper{display:inline-block;width:1px}.toolbar-search-select ::ng-deep .mat-select-value-text{font-size:9px}.toolbar-search-select ::ng-deep .mat-form-field-suffix .mat-icon{width:12px;font-size:14px}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent;border-radius:0}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-infix{-webkit-padding-before:.7em!important}.toolbar-search{width:515px;background-color:#f7f7f7;border-radius:0 0 4px 4px}.toolbar-search ::ng-deep .mat-form-field-appearance-outline .mat-form-field-flex{height:39px;align-items:center!important}.toolbar-search ::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0}.toolbar-search ::ng-deep .mat-form-field-infix{height:auto!important}.search-container{position:relative;width:515px}.search-container .search-popup{padding:0 15px 15px;margin:0;max-height:80vh;overflow-x:hidden;overflow-y:auto;position:absolute;top:100%;left:0px;right:0px;z-index:9999;background-color:#fff;box-shadow:0 5px 4px #0003;border-radius:0 0 4px 4px}.search-container .search-popup hr{border:0;border-top:1px solid #ebebeb;margin:0;position:sticky;top:0;padding:0 0 15px;z-index:1}.search-container .search-popup .search-message{display:inline-block;width:100%;text-align:center;font-size:16px;padding-top:12px}.search-container .search-popup .search-item-info{color:#91263b;text-align:center;font-size:12px;margin-bottom:15px;padding-top:12px}.search-container .search-popup ul{padding:0;margin:0}.search-container .search-popup ul li{list-style:none;font-size:1rem;font-weight:400;line-height:1.5;color:#333}.search-container .search-popup ul li.suggestions{font-size:15px;line-height:36px;padding:0 15px 0 44px;align-items:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.search-container .search-popup ul li.suggestions:hover{background-color:#fee8e8}.search-container .search-popup ul li.suggestions svg{margin-right:5px}.search-container .search-popup ul li.suggestions-categorize-false:hover{background-color:#fee8e8}.search-container .search-popup .search-result{padding:10px 0 0;margin:0 -15px}.search-container .search-popup .search-result.no-categorize-result ul{width:100%;padding:0;margin:0 0 10px}.search-container .search-popup .search-result.no-categorize-result ul li{font-size:15px;line-height:36px;padding:0 15px 0 31px;display:flex;align-items:center;cursor:pointer}.search-container .search-popup .search-result.no-categorize-result ul li:hover{background-color:#fee8e8}.search-container .search-popup .search-result.no-categorize-result ul li img{width:18px;margin-right:9px}.search-container .search-popup .suggestions-heading{color:#9c9c9c;font-size:14px;font-weight:normal;margin:0 0 10px 17px;display:flex;align-items:center;position:relative}.search-container .search-popup .suggestions-heading .show-more{position:absolute;right:20px;color:#d1d1d1;font-size:12px;cursor:pointer;text-decoration:none}.search-container .search-popup .suggestions-heading .show-more :hover{text-decoration:underline}.search-container .search-popup .suggestions-heading img{width:18px;margin-right:9px}.search-container .search-popup .recent-searches{padding:10px 0 0;margin:0 -15px}.search-container .search-popup .recent-searches ul{display:inline-block;width:100%}.search-container .search-popup .recent-searches ul li.suggestions{display:flex}.search-container .search-popup .recent-searches ul li.suggestions span{width:100%;overflow:hidden;text-overflow:ellipsis}.search-container .search-popup .recent-searches .suggestions{display:flex}.search-container .search-popup .recent-searches .suggestions-heading{margin-left:30px}.search-container .search-popup .recent-searches li.suggestions{padding-left:31px}::ng-deep .search-select.mat-select-panel{margin-top:30px;margin-left:10px}::ng-deep .search-select .mat-option-text{display:contents!important}::ng-deep .toolbar-search .mat-form-field-infix{font-size:14px}::ng-deep .toolbar-search input{line-height:14px}::ng-deep .toolbar-search .mat-form-field-outline:first-child .mat-form-field-outline-start,::ng-deep .toolbar-search .mat-form-field-outline:first-child .mat-form-field-outline-end{background-color:#f1f3f4}::ng-deep .toolbar-search:hover .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-width:1px!important;border-color:#a53159!important}::ng-deep .toolbar-search:hover .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border:1px solid #a53159!important;border-left-style:none!important;border-right-style:none!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-radius:0;border-color:transparent!important;background-color:#a53159!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#a53159!important;background-color:#a53159!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-select{color:#fff!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .icomoon.arrow_down{color:#fff}::ng-deep .toolbar-search:focus-within .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-width:2px!important;border-color:#90003b!important}::ng-deep .toolbar-search:focus-within .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border:2px solid #90003b!important;border-left-style:none!important;border-right-style:none!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-radius:0;border-color:transparent!important;background-color:#90003b!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#90003b!important;background-color:#90003b!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-select{color:#fff!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .icomoon.arrow_down{color:#fff}::ng-deep .toolbar-search .mat-select-arrow{opacity:0}\n"]
|
|
282
282
|
},] }
|
|
283
283
|
];
|
|
284
284
|
SearchComponent.ctorParameters = () => [
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* @suppress {suspiciousCode,uselessCode,missingProperties,missingOverride,checkTypes,extraRequire}
|
|
5
5
|
* tslint:disable
|
|
6
6
|
*/
|
|
7
|
-
var styles = ["[_nghost-%COMP%] .mat-form-field-wrapper{padding:0}[_nghost-%COMP%] .mat-form-field-wrapper .mat-form-field-prefix{margin-right:12px}.toolbar-search-input[_ngcontent-%COMP%]{width:86%}.toolbar-search-input[_ngcontent-%COMP%] input{margin:0}.toolbar-search-input[_ngcontent-%COMP%] .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent}.toolbar-search-input[_ngcontent-%COMP%] .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none;border-radius:0}.icomoon.Search[_ngcontent-%COMP%], .icomoon.close[_ngcontent-%COMP%]{height:1rem;width:1rem;font-size:1rem;color:#33333380;padding-bottom:4px}.icomoon.close[_ngcontent-%COMP%]{cursor:pointer}.toolbar-search-select[_ngcontent-%COMP%]{width:calc(100% - 86%)}.toolbar-search-select[_ngcontent-%COMP%] .mat-select-arrow{opacity:0}.toolbar-search-select[_ngcontent-%COMP%] .mat-select-arrow-wrapper{display:inline-block;width:1px}.toolbar-search-select[_ngcontent-%COMP%] .mat-select-value-text{font-size:9px}.toolbar-search-select[_ngcontent-%COMP%] .mat-form-field-suffix .mat-icon{width:12px;font-size:14px}.toolbar-search-select[_ngcontent-%COMP%] .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent;border-radius:0}.toolbar-search-select[_ngcontent-%COMP%] .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none}.toolbar-search-select[_ngcontent-%COMP%] .mat-form-field-flex .mat-form-field-infix{-webkit-padding-before:.7em!important}.toolbar-search[_ngcontent-%COMP%]{width:515px;background-color:#f7f7f7;border-radius:0 0 4px 4px}.toolbar-search[_ngcontent-%COMP%] .mat-form-field-appearance-outline .mat-form-field-flex{height:39px;align-items:center!important}.toolbar-search[_ngcontent-%COMP%] .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0}.toolbar-search[_ngcontent-%COMP%] .mat-form-field-infix{height:auto!important}.search-container[_ngcontent-%COMP%]{position:relative;width:515px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%]{padding:0 15px 15px;margin:0;max-height:80vh;overflow-x:hidden;overflow-y:auto;position:absolute;top:100%;left:0px;right:0px;z-index:9999;background-color:#fff;box-shadow:0 5px 4px #0003;border-radius:0 0 4px 4px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border:0;border-top:1px solid #ebebeb;margin:0;position:-webkit-sticky;position:sticky;top:0;padding:0 0 15px;z-index:1}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .search-message[_ngcontent-%COMP%]{display:inline-block;width:100%;text-align:center;font-size:16px;padding-top:12px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .search-item-info[_ngcontent-%COMP%]{color:#91263b;text-align:center;font-size:12px;margin-bottom:15px;padding-top:12px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{padding:0;margin:0}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{list-style:none;font-size:1rem;font-weight:400;line-height:1.5;color:#333}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.suggestions[_ngcontent-%COMP%]{font-size:15px;line-height:36px;padding:0 15px 0 44px;align-items:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.suggestions[_ngcontent-%COMP%]:hover{background-color:#fee8e8}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.suggestions[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{margin-right:5px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.suggestions-categorize-false[_ngcontent-%COMP%]:hover{background-color:#fee8e8}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .search-result[_ngcontent-%COMP%]{padding:10px 0 0;margin:0 -15px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .search-result.no-categorize-result[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{width:100%;padding:0;margin:0 0 10px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .search-result.no-categorize-result[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:15px;line-height:36px;padding:0 15px 0 31px;display:flex;align-items:center;cursor:pointer}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .search-result.no-categorize-result[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{background-color:#fee8e8}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .search-result.no-categorize-result[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:18px;margin-right:9px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .suggestions-heading[_ngcontent-%COMP%]{color:#9c9c9c;font-size:14px;font-weight:normal;margin:0 0 10px 17px;display:flex;align-items:center;position:relative}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .suggestions-heading[_ngcontent-%COMP%] .show-more[_ngcontent-%COMP%]{position:absolute;right:20px;color:#d1d1d1;font-size:12px;cursor:pointer;text-decoration:none}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .suggestions-heading[_ngcontent-%COMP%] .show-more[_ngcontent-%COMP%] [_ngcontent-%COMP%]:hover{text-decoration:underline}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .suggestions-heading[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:18px;margin-right:9px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .recent-searches[_ngcontent-%COMP%]{padding:10px 0 0;margin:0 -15px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .recent-searches[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{display:inline-block;width:100%}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .recent-searches[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.suggestions[_ngcontent-%COMP%]{display:flex}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .recent-searches[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.suggestions[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{width:100%;overflow:hidden;text-overflow:ellipsis}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .recent-searches[_ngcontent-%COMP%] .suggestions[_ngcontent-%COMP%]{display:flex}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .recent-searches[_ngcontent-%COMP%] .suggestions-heading[_ngcontent-%COMP%]{margin-left:30px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .recent-searches[_ngcontent-%COMP%] li.suggestions[_ngcontent-%COMP%]{padding-left:31px} .search-select.mat-select-panel{margin-top:30px;margin-left:10px} .search-select .mat-option-text{display:contents!important} .toolbar-search .mat-form-field-infix{font-size:14px} .toolbar-search input{line-height:14px} .toolbar-search .mat-form-field-outline:first-child .mat-form-field-outline-start, .toolbar-search .mat-form-field-outline:first-child .mat-form-field-outline-end{background-color:#f1f3f4} .toolbar-search:hover .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-width:1px!important;border-color:#a53159!important} .toolbar-search:hover .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border:1px solid #a53159!important;border-left-style:none!important;border-right-style:none!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important} .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-radius:0;border-color:transparent!important;background-color:#a53159!important} .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#a53159!important;background-color:#a53159!important} .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-select{color:#fff!important} .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .icomoon.arrow_down{color:#fff} .toolbar-search:focus-within .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-width:2px!important;border-color:#90003b!important} .toolbar-search:focus-within .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border:2px solid #90003b!important;border-left-style:none!important;border-right-style:none!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important} .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-radius:0;border-color:transparent!important;background-color:#90003b!important} .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#90003b!important;background-color:#90003b!important} .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-select{color:#fff!important} .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .icomoon.arrow_down{color:#fff} .toolbar-search .mat-select-arrow{opacity:0}"];
|
|
7
|
+
var styles = ["[_nghost-%COMP%] .mat-form-field-wrapper{padding:0}[_nghost-%COMP%] .mat-form-field-wrapper .mat-form-field-prefix{margin-right:12px}.toolbar-search-input[_ngcontent-%COMP%]{width:86%}.toolbar-search-input[_ngcontent-%COMP%] input{margin:0}.toolbar-search-input[_ngcontent-%COMP%] .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent}.toolbar-search-input[_ngcontent-%COMP%] .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none;border-radius:0}.icomoon.Search[_ngcontent-%COMP%], .icomoon.close[_ngcontent-%COMP%]{height:1rem;width:1rem;font-size:1rem;color:#33333380;padding-bottom:4px}.icomoon.close[_ngcontent-%COMP%]{cursor:pointer}.toolbar-search-select[_ngcontent-%COMP%]{width:calc(100% - 86%)}.toolbar-search-select[_ngcontent-%COMP%] .mat-select-arrow{opacity:0}.toolbar-search-select[_ngcontent-%COMP%] .mat-select-arrow-wrapper{display:inline-block;width:1px}.toolbar-search-select[_ngcontent-%COMP%] .mat-select-value-text{font-size:9px}.toolbar-search-select[_ngcontent-%COMP%] .mat-form-field-suffix .mat-icon{width:12px;font-size:14px}.toolbar-search-select[_ngcontent-%COMP%] .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent;border-radius:0}.toolbar-search-select[_ngcontent-%COMP%] .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none}.toolbar-search-select[_ngcontent-%COMP%] .mat-form-field-flex .mat-form-field-infix{-webkit-padding-before:.7em!important}.toolbar-search[_ngcontent-%COMP%]{width:515px;background-color:#f7f7f7;border-radius:0 0 4px 4px}.toolbar-search[_ngcontent-%COMP%] .mat-form-field-appearance-outline .mat-form-field-flex{height:39px;align-items:center!important}.toolbar-search[_ngcontent-%COMP%] .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0}.toolbar-search[_ngcontent-%COMP%] .mat-form-field-infix{height:auto!important}.search-container[_ngcontent-%COMP%]{position:relative;width:515px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%]{padding:0 15px 15px;margin:0;max-height:80vh;overflow-x:hidden;overflow-y:auto;position:absolute;top:100%;left:0px;right:0px;z-index:9999;background-color:#fff;box-shadow:0 5px 4px #0003;border-radius:0 0 4px 4px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border:0;border-top:1px solid #ebebeb;margin:0;position:sticky;top:0;padding:0 0 15px;z-index:1}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .search-message[_ngcontent-%COMP%]{display:inline-block;width:100%;text-align:center;font-size:16px;padding-top:12px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .search-item-info[_ngcontent-%COMP%]{color:#91263b;text-align:center;font-size:12px;margin-bottom:15px;padding-top:12px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{padding:0;margin:0}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{list-style:none;font-size:1rem;font-weight:400;line-height:1.5;color:#333}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.suggestions[_ngcontent-%COMP%]{font-size:15px;line-height:36px;padding:0 15px 0 44px;align-items:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.suggestions[_ngcontent-%COMP%]:hover{background-color:#fee8e8}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.suggestions[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{margin-right:5px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.suggestions-categorize-false[_ngcontent-%COMP%]:hover{background-color:#fee8e8}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .search-result[_ngcontent-%COMP%]{padding:10px 0 0;margin:0 -15px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .search-result.no-categorize-result[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{width:100%;padding:0;margin:0 0 10px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .search-result.no-categorize-result[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-size:15px;line-height:36px;padding:0 15px 0 31px;display:flex;align-items:center;cursor:pointer}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .search-result.no-categorize-result[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:hover{background-color:#fee8e8}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .search-result.no-categorize-result[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:18px;margin-right:9px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .suggestions-heading[_ngcontent-%COMP%]{color:#9c9c9c;font-size:14px;font-weight:normal;margin:0 0 10px 17px;display:flex;align-items:center;position:relative}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .suggestions-heading[_ngcontent-%COMP%] .show-more[_ngcontent-%COMP%]{position:absolute;right:20px;color:#d1d1d1;font-size:12px;cursor:pointer;text-decoration:none}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .suggestions-heading[_ngcontent-%COMP%] .show-more[_ngcontent-%COMP%] [_ngcontent-%COMP%]:hover{text-decoration:underline}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .suggestions-heading[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:18px;margin-right:9px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .recent-searches[_ngcontent-%COMP%]{padding:10px 0 0;margin:0 -15px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .recent-searches[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{display:inline-block;width:100%}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .recent-searches[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.suggestions[_ngcontent-%COMP%]{display:flex}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .recent-searches[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li.suggestions[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{width:100%;overflow:hidden;text-overflow:ellipsis}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .recent-searches[_ngcontent-%COMP%] .suggestions[_ngcontent-%COMP%]{display:flex}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .recent-searches[_ngcontent-%COMP%] .suggestions-heading[_ngcontent-%COMP%]{margin-left:30px}.search-container[_ngcontent-%COMP%] .search-popup[_ngcontent-%COMP%] .recent-searches[_ngcontent-%COMP%] li.suggestions[_ngcontent-%COMP%]{padding-left:31px} .search-select.mat-select-panel{margin-top:30px;margin-left:10px} .search-select .mat-option-text{display:contents!important} .toolbar-search .mat-form-field-infix{font-size:14px} .toolbar-search input{line-height:14px} .toolbar-search .mat-form-field-outline:first-child .mat-form-field-outline-start, .toolbar-search .mat-form-field-outline:first-child .mat-form-field-outline-end{background-color:#f1f3f4} .toolbar-search:hover .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-width:1px!important;border-color:#a53159!important} .toolbar-search:hover .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border:1px solid #a53159!important;border-left-style:none!important;border-right-style:none!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important} .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-radius:0;border-color:transparent!important;background-color:#a53159!important} .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#a53159!important;background-color:#a53159!important} .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-select{color:#fff!important} .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .icomoon.arrow_down{color:#fff} .toolbar-search:focus-within .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-width:2px!important;border-color:#90003b!important} .toolbar-search:focus-within .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border:2px solid #90003b!important;border-left-style:none!important;border-right-style:none!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important} .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-radius:0;border-color:transparent!important;background-color:#90003b!important} .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#90003b!important;background-color:#90003b!important} .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-select{color:#fff!important} .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .icomoon.arrow_down{color:#fff} .toolbar-search .mat-select-arrow{opacity:0}"];
|
|
8
8
|
export { styles as styles };
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VhcmNoLmNvbXBvbmVudC5zY3NzLnNoaW0ubmdzdHlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvc2VhcmNoL3NlYXJjaC5jb21wb25lbnQuc2Nzcy5zaGltLm5nc3R5bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIGkwIGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaTAuQ29tcG9uZW50RmFjdG9yeTtcbiJdfQ==
|
|
@@ -294,7 +294,7 @@ SearchComponent.decorators = [
|
|
|
294
294
|
multi: true,
|
|
295
295
|
},
|
|
296
296
|
],
|
|
297
|
-
styles: [":host ::ng-deep .mat-form-field-wrapper{padding:0}:host ::ng-deep .mat-form-field-wrapper .mat-form-field-prefix{margin-right:12px}.toolbar-search-input{width:86%}.toolbar-search-input ::ng-deep input{margin:0}.toolbar-search-input ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent}.toolbar-search-input ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none;border-radius:0}.icomoon.Search,.icomoon.close{height:1rem;width:1rem;font-size:1rem;color:#33333380;padding-bottom:4px}.icomoon.close{cursor:pointer}.toolbar-search-select{width:calc(100% - 86%)}.toolbar-search-select ::ng-deep .mat-select-arrow{opacity:0}.toolbar-search-select ::ng-deep .mat-select-arrow-wrapper{display:inline-block;width:1px}.toolbar-search-select ::ng-deep .mat-select-value-text{font-size:9px}.toolbar-search-select ::ng-deep .mat-form-field-suffix .mat-icon{width:12px;font-size:14px}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent;border-radius:0}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-infix{-webkit-padding-before:.7em!important}.toolbar-search{width:515px;background-color:#f7f7f7;border-radius:0 0 4px 4px}.toolbar-search ::ng-deep .mat-form-field-appearance-outline .mat-form-field-flex{height:39px;align-items:center!important}.toolbar-search ::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0}.toolbar-search ::ng-deep .mat-form-field-infix{height:auto!important}.search-container{position:relative;width:515px}.search-container .search-popup{padding:0 15px 15px;margin:0;max-height:80vh;overflow-x:hidden;overflow-y:auto;position:absolute;top:100%;left:0px;right:0px;z-index:9999;background-color:#fff;box-shadow:0 5px 4px #0003;border-radius:0 0 4px 4px}.search-container .search-popup hr{border:0;border-top:1px solid #ebebeb;margin:0;position
|
|
297
|
+
styles: [":host ::ng-deep .mat-form-field-wrapper{padding:0}:host ::ng-deep .mat-form-field-wrapper .mat-form-field-prefix{margin-right:12px}.toolbar-search-input{width:86%}.toolbar-search-input ::ng-deep input{margin:0}.toolbar-search-input ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent}.toolbar-search-input ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none;border-radius:0}.icomoon.Search,.icomoon.close{height:1rem;width:1rem;font-size:1rem;color:#33333380;padding-bottom:4px}.icomoon.close{cursor:pointer}.toolbar-search-select{width:calc(100% - 86%)}.toolbar-search-select ::ng-deep .mat-select-arrow{opacity:0}.toolbar-search-select ::ng-deep .mat-select-arrow-wrapper{display:inline-block;width:1px}.toolbar-search-select ::ng-deep .mat-select-value-text{font-size:9px}.toolbar-search-select ::ng-deep .mat-form-field-suffix .mat-icon{width:12px;font-size:14px}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent;border-radius:0}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-infix{-webkit-padding-before:.7em!important}.toolbar-search{width:515px;background-color:#f7f7f7;border-radius:0 0 4px 4px}.toolbar-search ::ng-deep .mat-form-field-appearance-outline .mat-form-field-flex{height:39px;align-items:center!important}.toolbar-search ::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0}.toolbar-search ::ng-deep .mat-form-field-infix{height:auto!important}.search-container{position:relative;width:515px}.search-container .search-popup{padding:0 15px 15px;margin:0;max-height:80vh;overflow-x:hidden;overflow-y:auto;position:absolute;top:100%;left:0px;right:0px;z-index:9999;background-color:#fff;box-shadow:0 5px 4px #0003;border-radius:0 0 4px 4px}.search-container .search-popup hr{border:0;border-top:1px solid #ebebeb;margin:0;position:sticky;top:0;padding:0 0 15px;z-index:1}.search-container .search-popup .search-message{display:inline-block;width:100%;text-align:center;font-size:16px;padding-top:12px}.search-container .search-popup .search-item-info{color:#91263b;text-align:center;font-size:12px;margin-bottom:15px;padding-top:12px}.search-container .search-popup ul{padding:0;margin:0}.search-container .search-popup ul li{list-style:none;font-size:1rem;font-weight:400;line-height:1.5;color:#333}.search-container .search-popup ul li.suggestions{font-size:15px;line-height:36px;padding:0 15px 0 44px;align-items:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.search-container .search-popup ul li.suggestions:hover{background-color:#fee8e8}.search-container .search-popup ul li.suggestions svg{margin-right:5px}.search-container .search-popup ul li.suggestions-categorize-false:hover{background-color:#fee8e8}.search-container .search-popup .search-result{padding:10px 0 0;margin:0 -15px}.search-container .search-popup .search-result.no-categorize-result ul{width:100%;padding:0;margin:0 0 10px}.search-container .search-popup .search-result.no-categorize-result ul li{font-size:15px;line-height:36px;padding:0 15px 0 31px;display:flex;align-items:center;cursor:pointer}.search-container .search-popup .search-result.no-categorize-result ul li:hover{background-color:#fee8e8}.search-container .search-popup .search-result.no-categorize-result ul li img{width:18px;margin-right:9px}.search-container .search-popup .suggestions-heading{color:#9c9c9c;font-size:14px;font-weight:normal;margin:0 0 10px 17px;display:flex;align-items:center;position:relative}.search-container .search-popup .suggestions-heading .show-more{position:absolute;right:20px;color:#d1d1d1;font-size:12px;cursor:pointer;text-decoration:none}.search-container .search-popup .suggestions-heading .show-more :hover{text-decoration:underline}.search-container .search-popup .suggestions-heading img{width:18px;margin-right:9px}.search-container .search-popup .recent-searches{padding:10px 0 0;margin:0 -15px}.search-container .search-popup .recent-searches ul{display:inline-block;width:100%}.search-container .search-popup .recent-searches ul li.suggestions{display:flex}.search-container .search-popup .recent-searches ul li.suggestions span{width:100%;overflow:hidden;text-overflow:ellipsis}.search-container .search-popup .recent-searches .suggestions{display:flex}.search-container .search-popup .recent-searches .suggestions-heading{margin-left:30px}.search-container .search-popup .recent-searches li.suggestions{padding-left:31px}::ng-deep .search-select.mat-select-panel{margin-top:30px;margin-left:10px}::ng-deep .search-select .mat-option-text{display:contents!important}::ng-deep .toolbar-search .mat-form-field-infix{font-size:14px}::ng-deep .toolbar-search input{line-height:14px}::ng-deep .toolbar-search .mat-form-field-outline:first-child .mat-form-field-outline-start,::ng-deep .toolbar-search .mat-form-field-outline:first-child .mat-form-field-outline-end{background-color:#f1f3f4}::ng-deep .toolbar-search:hover .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-width:1px!important;border-color:#a53159!important}::ng-deep .toolbar-search:hover .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border:1px solid #a53159!important;border-left-style:none!important;border-right-style:none!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-radius:0;border-color:transparent!important;background-color:#a53159!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#a53159!important;background-color:#a53159!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-select{color:#fff!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .icomoon.arrow_down{color:#fff}::ng-deep .toolbar-search:focus-within .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-width:2px!important;border-color:#90003b!important}::ng-deep .toolbar-search:focus-within .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border:2px solid #90003b!important;border-left-style:none!important;border-right-style:none!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-radius:0;border-color:transparent!important;background-color:#90003b!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#90003b!important;background-color:#90003b!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-select{color:#fff!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .icomoon.arrow_down{color:#fff}::ng-deep .toolbar-search .mat-select-arrow{opacity:0}\n"]
|
|
298
298
|
},] }
|
|
299
299
|
];
|
|
300
300
|
SearchComponent.ctorParameters = () => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceloop-search-client.js","sources":["../../src/lib/types.ts","../../src/lib/search/search.component.ts","../../src/lib/search-lib.module.ts","../../src/lib/lib-configuration.ts","../../src/public-api.ts","../../src/sourceloop-search-client.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nexport interface ISearchQuery {\n match: string;\n limit: number | null;\n order: string | null;\n limitByType: boolean | null;\n offset: number | null;\n sources: string[] | null;\n}\nexport interface IModel {\n name: string;\n displayName: string;\n imageUrl?: string;\n icon?: string;\n}\nexport interface IReturnType {\n rank: number;\n source: string;\n}\nexport interface IDefaultReturnType extends IReturnType {\n name: string;\n description: string;\n}\n\nexport interface ISearchService<T extends IReturnType> {\n searchApiRequest(\n requestParameters: ISearchQuery,\n saveInRecents: boolean,\n ): Observable<T[]>;\n recentSearchApiRequest?(): Observable<ISearchQuery[]>;\n}\n\n// cant use T extends IReturnType here\nexport const SEARCH_SERVICE_TOKEN: InjectionToken<ISearchService<IReturnType>> =\n new InjectionToken<ISearchService<IReturnType>>('Search_Service_Token');\n\nexport type RecentSearchEvent = {\n event?: Event;\n keyword: string;\n category: string;\n};\n\nexport type ItemClickedEvent<T> = {\n event: MouseEvent;\n item: T;\n};\n\nexport type TypeEvent = {\n event?: Event;\n input: string;\n};\n// IRequestParameters default values\nexport const DEFAULT_LIMIT = 20;\nexport const DEFAULT_LIMIT_TYPE = false;\nexport const DEFAULT_ORDER = [];\nexport const DEBOUNCE_TIME = 1000;\nexport const DEFAULT_OFFSET = 0;\nexport const DEFAULT_SAVE_IN_RECENTS = true;\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n PLATFORM_ID,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport {Configuration} from '../lib-configuration';\nimport {Subject} from 'rxjs';\nimport {debounceTime, tap} from 'rxjs/operators';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n ISearchService,\n ISearchQuery,\n SEARCH_SERVICE_TOKEN,\n DEBOUNCE_TIME,\n DEFAULT_LIMIT,\n DEFAULT_LIMIT_TYPE,\n DEFAULT_OFFSET,\n DEFAULT_SAVE_IN_RECENTS,\n DEFAULT_ORDER,\n IReturnType,\n RecentSearchEvent,\n TypeEvent,\n ItemClickedEvent,\n IModel,\n} from '../types';\nimport {isPlatformBrowser} from '@angular/common';\n\nconst ALL_LABEL = 'All';\n@Component({\n selector: 'sourceloop-search',\n templateUrl: './search.component.html',\n styleUrls: ['./search.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: SearchComponent,\n multi: true,\n },\n ],\n})\nexport class SearchComponent<T extends IReturnType>\n implements OnInit, OnDestroy, ControlValueAccessor\n{\n searchBoxInput = '';\n suggestionsDisplay = false;\n categoryDisplay = false;\n searching = false;\n suggestions: T[] = [];\n recentSearches: ISearchQuery[] = [];\n category: string = ALL_LABEL;\n searchRequest$ = new Subject<{input: string; event: Event}>();\n\n private _config!: Configuration<T>;\n public get config(): Configuration<T> {\n return this._config;\n }\n @Input()\n public set config(value: Configuration<T>) {\n this._config = value;\n\n if (value && value.models) {\n value.models.unshift({\n name: ALL_LABEL,\n displayName: ALL_LABEL,\n });\n } else if (value && !value.models) {\n value.models = [\n {\n name: ALL_LABEL,\n displayName: ALL_LABEL,\n },\n ];\n } else {\n // do nothing\n }\n }\n\n @Input() titleTemplate?: TemplateRef<any>;\n @Input() subtitleTemplate?: TemplateRef<any>;\n // emitted when user clicks one of the suggested results (including recent search sugestions)\n @Output() clicked = new EventEmitter<ItemClickedEvent<T>>();\n @Output() searched = new EventEmitter<RecentSearchEvent>();\n /* emitted when user makes search request (including recent search requests & requests made on change in category from dropdown)\n In case of recent search Array of recent Search request result is emitted */\n\n onChange!: (value: string | undefined) => void;\n onTouched!: () => void;\n disabled = false;\n\n @ViewChild('searchInput') public searchInputElement!: ElementRef;\n\n constructor(\n @Inject(SEARCH_SERVICE_TOKEN)\n private readonly searchService: ISearchService<T>,\n // tslint:disable-next-line:ban-types\n @Inject(PLATFORM_ID) private readonly platformId: Object,\n private readonly cdr: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {\n this.searchRequest$\n .pipe(\n tap(v => (this.suggestions = [])),\n debounceTime(DEBOUNCE_TIME),\n )\n .subscribe((value: TypeEvent) => {\n this.searched.emit({\n event: value.event,\n keyword: value.input,\n category: this.category,\n });\n this.getSuggestions(value);\n this.cdr.markForCheck();\n });\n }\n\n // ControlValueAccessor Implementation\n writeValue(value: string): void {\n this.searchBoxInput = value;\n }\n // When the value in the UI is changed, this method will invoke a callback function\n registerOnChange(fn: (value: string | undefined) => void): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n getSuggestions(eventValue: TypeEvent) {\n eventValue.input = eventValue.input.trim();\n if (!eventValue.input.length) {\n return;\n }\n const order = this.config.order ?? DEFAULT_ORDER;\n let orderString = '';\n order.forEach(preference => (orderString = `${orderString}${preference} `));\n\n let saveInRecents = this.config.saveInRecents ?? DEFAULT_SAVE_IN_RECENTS;\n if (this.config.saveInRecents && this.config.saveInRecentsOnlyOnEnter) {\n if (\n !eventValue.event ||\n (eventValue.event instanceof KeyboardEvent &&\n eventValue.event.key === 'Enter')\n ) {\n saveInRecents = true; // save in recents only on enter or change in category\n } else {\n // do not save in recent search on typing\n saveInRecents = false;\n }\n }\n /* need to put default value here and not in contructor\n because sonar was giving code smell with definite assertion as all these parameters are optional */\n const requestParameters: ISearchQuery = {\n match: eventValue.input,\n sources: this._categoryToSourceName(this.category),\n limit: this.config.limit ?? DEFAULT_LIMIT,\n limitByType: this.config.limitByType ?? DEFAULT_LIMIT_TYPE,\n order: orderString,\n offset: this.config.offset ?? DEFAULT_OFFSET,\n };\n\n this.searching = true;\n this.cdr.markForCheck();\n this.searchService\n .searchApiRequest(requestParameters, saveInRecents)\n .subscribe(\n (value: T[]) => {\n this.suggestions = value;\n this.searching = false;\n this.cdr.markForCheck();\n },\n (_error: Error) => {\n this.suggestions = [];\n this.searching = false;\n this.cdr.markForCheck();\n },\n );\n }\n getRecentSearches() {\n if (\n !this.config.hideRecentSearch &&\n this.searchService.recentSearchApiRequest\n ) {\n this.searchService.recentSearchApiRequest().subscribe(\n (value: ISearchQuery[]) => {\n this.recentSearches = value;\n this.cdr.markForCheck();\n },\n (_error: Error) => {\n this.recentSearches = [];\n this.cdr.markForCheck();\n },\n );\n }\n }\n\n // event can be KeyBoardEvent or Event of type 'change' fired on change in value of drop down for category\n hitSearchApi(event?: Event) {\n // this will happen only in case user searches something and then erases it, we need to update recent search\n if (!this.searchBoxInput) {\n this.suggestions = [];\n this.getRecentSearches();\n return;\n }\n\n // no debounce time needed in case of searchOnlyOnEnter\n if (this.config.searchOnlyOnEnter) {\n if (!event || (event instanceof KeyboardEvent && event.key === 'Enter')) {\n this.getSuggestions({input: this.searchBoxInput, event});\n }\n return;\n }\n\n // no debounce time needed in case of change in category\n if (!event) {\n this.getSuggestions({input: this.searchBoxInput, event});\n return;\n }\n\n this.searchRequest$.next({\n input: this.searchBoxInput,\n event,\n });\n }\n\n populateValue(suggestion: T, event: MouseEvent) {\n const value = suggestion[\n this.config.displayPropertyName\n ] as unknown as string; // converted to string to assign value to searchBoxInput\n this.searchBoxInput = value;\n this.suggestionsDisplay = false;\n // ngModelChange doesn't detect change in value when populated from outside, hence calling manually\n this.onChange(this.searchBoxInput);\n // need to do this to show more search options for selected suggestion - just in case user reopens search input\n this.getSuggestions({input: this.searchBoxInput, event});\n this.clicked.emit({item: suggestion, event});\n }\n populateValueRecentSearch(recentSearch: ISearchQuery, event: MouseEvent) {\n event.stopPropagation();\n event.preventDefault();\n const value = recentSearch['match'];\n this.searchBoxInput = value;\n this.suggestionsDisplay = false;\n this.onChange(this.searchBoxInput);\n // need to do this to show more search options for selected suggestion - just in case user reopens search input\n this.getSuggestions({input: this.searchBoxInput, event});\n this.focusInput();\n this.showSuggestions();\n }\n\n fetchModelImageUrlFromSuggestion(suggestion: T) {\n const modelName = suggestion[\n 'source' as unknown as keyof T\n ] as unknown as string;\n let url: string | undefined;\n this.config.models.forEach(model => {\n if (model.name === modelName && model.imageUrl) {\n url = model.imageUrl;\n }\n });\n return url;\n }\n\n boldString(str: T[keyof T] | string, substr: string) {\n const strRegExp = new RegExp(`(${substr})`, 'gi');\n const stringToMakeBold: string = str as unknown as string;\n return stringToMakeBold.replace(strRegExp, `<b>$1</b>`);\n }\n\n hideSuggestions() {\n this.suggestionsDisplay = false;\n this.onTouched();\n }\n\n showSuggestions() {\n this.suggestionsDisplay = true;\n this.getRecentSearches();\n }\n\n focusInput() {\n if (isPlatformBrowser(this.platformId)) {\n this.searchInputElement.nativeElement.focus();\n }\n }\n\n setCategory(category: string) {\n this.category = category;\n this.categoryDisplay = false;\n if (this.searchBoxInput) {\n this.hitSearchApi();\n this.focusInput();\n this.showSuggestions();\n }\n }\n\n showCategory() {\n this.categoryDisplay = !this.categoryDisplay;\n }\n\n hideCategory() {\n this.categoryDisplay = false;\n }\n\n resetInput() {\n this.searchBoxInput = '';\n this.suggestions = [];\n this.suggestionsDisplay = true;\n this.focusInput();\n // ngModelChange doesn't detect change in value when populated from outside, hence calling manually\n this.onChange(this.searchBoxInput);\n this.getRecentSearches();\n }\n ngOnDestroy() {\n this.searchRequest$.unsubscribe();\n }\n\n _categoryToSourceName(category: string) {\n if (category === ALL_LABEL) {\n return [];\n } else {\n return [category];\n }\n }\n getModelFromModelName(name: string) {\n return this.config.models.find(item => item.name === name) as IModel;\n }\n getModelsWithSuggestions() {\n const modelsWithSuggestions: {model: IModel; items: T[]}[] = [];\n const sources: string[] = [];\n this.suggestions.forEach(suggestion => {\n if (sources.indexOf(suggestion['source']) >= 0) {\n modelsWithSuggestions.every(modelWithSuggestions => {\n if (modelWithSuggestions.model.name === suggestion['source']) {\n modelWithSuggestions.items.push(suggestion);\n return false;\n }\n return true;\n });\n } else {\n const model = this.getModelFromModelName(suggestion['source']);\n modelsWithSuggestions.push({model, items: [suggestion]});\n sources.push(suggestion['source']);\n }\n });\n return modelsWithSuggestions;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {HttpClientModule} from '@angular/common/http';\nimport {NgModule} from '@angular/core';\nimport {FlexLayoutModule} from '@angular/flex-layout';\nimport {FormsModule} from '@angular/forms';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {MatIconModule} from '@angular/material/icon';\nimport {MatInputModule} from '@angular/material/input';\nimport {MatSelectModule} from '@angular/material/select';\n\nimport {SearchComponent} from './search/search.component';\n\n@NgModule({\n declarations: [SearchComponent],\n imports: [\n CommonModule,\n FormsModule,\n HttpClientModule,\n MatSelectModule,\n MatFormFieldModule,\n MatIconModule,\n MatInputModule,\n FlexLayoutModule,\n ],\n exports: [SearchComponent],\n})\nexport class SearchLibModule {}\n","import {IDefaultReturnType, IModel} from './types';\nexport class Configuration<T = IDefaultReturnType> {\n /** property to be displayed in the results */\n displayPropertyName: keyof T;\n /** list of model configuration to be render and categorize search results */\n models: IModel[];\n /** max number of results (based on limitByType option) */\n limit?: number;\n /** apply limit on individual models, or on overall results */\n limitByType?: boolean;\n /** apply a particular ordering on results */\n order?: string[];\n /** offset for results in case limit is used */\n offset?: number;\n /** save the search query in recent history */\n saveInRecents?: boolean;\n /** a placeholder to display in the search box */\n placeholder?: string;\n /** a function to generate placeholder, overrides the placeholder property */\n placeholderFunction?: (input: string, category: string) => string;\n /** categorize results on the basis of models provided */\n categorizeResults?: boolean;\n /** hides the recent search list */\n hideRecentSearch?: boolean;\n /** hide the category selection button */\n hideCategorizeButton?: boolean;\n /** save value in recent search only on enter or change in category, if false, also saved on typing */\n saveInRecentsOnlyOnEnter?: boolean;\n /** search only on enter key or when category is changed */\n searchOnlyOnEnter?: boolean;\n noResultMessage?: string;\n searchIconClass?: string;\n crossIconClass?: string;\n dropDownButtonIconClass?: string;\n recentSearchIconClass?: string;\n\n constructor(d: Configuration<T>) {\n checkForError(d);\n this.displayPropertyName = d.displayPropertyName;\n this.models = d.models;\n\n /* IRequestParameters - will be given default values before call is made in case undefined/null,\n otherwise there ! is used on which sonar gives code smell */\n this.limit = d.limit;\n this.limitByType = d.limitByType;\n this.order = d.order;\n this.offset = d.offset;\n this.saveInRecents = d.saveInRecents;\n\n const displayTexts = setDisplayText(d);\n this.noResultMessage = displayTexts.noResultMessage;\n this.placeholder = displayTexts.placeholder;\n this.placeholderFunction = displayTexts.placeholderFunction;\n\n const searchConfig = setSearchConfig(d);\n this.categorizeResults = searchConfig.categorizeResults;\n this.hideRecentSearch = searchConfig.hideRecentSearch;\n this.hideCategorizeButton = searchConfig.hideCategorizeButton;\n this.saveInRecentsOnlyOnEnter = searchConfig.saveInRecentsOnlyOnEnter;\n this.searchOnlyOnEnter = searchConfig.searchOnlyOnEnter;\n\n const classes = setIconClasses(d);\n this.searchIconClass = classes.searchIconClass;\n this.crossIconClass = classes.crossIconClass;\n this.dropDownButtonIconClass = classes.dropDownButtonIconClass;\n this.recentSearchIconClass = classes.recentSearchIconClass;\n }\n}\nfunction checkForError<T>(d: Configuration<T>) {\n if (\n d.categorizeResults === false &&\n (d.hideCategorizeButton === false || d.hideCategorizeButton === undefined)\n ) {\n throw new Error(\n 'You must provide hideCategorizeButton:true as categorizeResults is false',\n );\n }\n if (d.saveInRecents === false && d.saveInRecentsOnlyOnEnter === true) {\n throw new Error(\n 'You must provide saveInRecents:true for saveInRecentsOnlyOnEnter:true',\n );\n }\n}\nfunction setDisplayText<T>(d: Configuration<T>) {\n return {\n placeholder: d.placeholder ?? 'Search',\n noResultMessage: d.noResultMessage ?? 'No result found',\n placeholderFunction: d.placeholderFunction,\n };\n}\nfunction setSearchConfig<T>(d: Configuration<T>) {\n return {\n categorizeResults: d.categorizeResults ?? true,\n hideRecentSearch: d.hideRecentSearch ?? false,\n hideCategorizeButton: d.hideCategorizeButton ?? false,\n saveInRecentsOnlyOnEnter: d.saveInRecentsOnlyOnEnter ?? false,\n searchOnlyOnEnter: d.searchOnlyOnEnter ?? false,\n };\n}\nfunction setIconClasses<T>(d: Configuration<T>) {\n return {\n searchIconClass: d.searchIconClass ?? 'icomoon Search',\n crossIconClass: d.crossIconClass ?? 'icomoon close',\n dropDownButtonIconClass: d.dropDownButtonIconClass ?? 'icomoon arrow_down',\n recentSearchIconClass: d.recentSearchIconClass ?? 'icomoon Search',\n };\n}\n","/*\n * Public API Surface of my-lib\n */\n\nexport * from './lib/search-lib.module';\nexport * from './lib/search/search.component';\nexport * from './lib/lib-configuration';\nexport * from './lib/types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAkCA;MACa,oBAAoB,GAC/B,IAAI,cAAc,CAA8B,sBAAsB,EAAE;AAiB1E;MACa,aAAa,GAAG,GAAG;MACnB,k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E,MAAA,CAAC,CAAC,iBAAiB,mCAAI,IAAI;QAC9C,gBAAgB,EAAE,MAAA,CAAC,CAAC,gBAAgB,mCAAI,KAAK;QAC7C,oBAAoB,EAAE,MAAA,CAAC,CAAC,oBAAoB,mCAAI,KAAK;QACrD,wBAAwB,EAAE,MAAA,CAAC,CAAC,wBAAwB,mCAAI,KAAK;QAC7D,iBAAiB,EAAE,MAAA,CAAC,CAAC,iBAAiB,mCAAI,KAAK;KAChD,CAAC;AACJ,CAAC;AACD,SAAS,cAAc,CAAI,CAAmB;;IAC5C,OAAO;QACL,eAAe,EAAE,MAAA,CAAC,CAAC,eAAe,mCAAI,gBAAgB;QACtD,cAAc,EAAE,MAAA,CAAC,CAAC,cAAc,mCAAI,eAAe;QACnD,uBAAuB,EAAE,MAAA,CAAC,CAAC,uBAAuB,mCAAI,oBAAoB;QAC1E,qBAAqB,EAAE,MAAA,CAAC,CAAC,qBAAqB,mCAAI,gBAAgB;KACnE,CAAC;AACJ;;AC1GA;;;;ACAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"sourceloop-search-client.js","sources":["../../src/lib/types.ts","../../src/lib/search/search.component.ts","../../src/lib/search-lib.module.ts","../../src/lib/lib-configuration.ts","../../src/public-api.ts","../../src/sourceloop-search-client.ts"],"sourcesContent":["import {InjectionToken} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nexport interface ISearchQuery {\n match: string;\n limit: number | null;\n order: string | null;\n limitByType: boolean | null;\n offset: number | null;\n sources: string[] | null;\n}\nexport interface IModel {\n name: string;\n displayName: string;\n imageUrl?: string;\n icon?: string;\n}\nexport interface IReturnType {\n rank: number;\n source: string;\n}\nexport interface IDefaultReturnType extends IReturnType {\n name: string;\n description: string;\n}\n\nexport interface ISearchService<T extends IReturnType> {\n searchApiRequest(\n requestParameters: ISearchQuery,\n saveInRecents: boolean,\n ): Observable<T[]>;\n recentSearchApiRequest?(): Observable<ISearchQuery[]>;\n}\n\n// cant use T extends IReturnType here\nexport const SEARCH_SERVICE_TOKEN: InjectionToken<ISearchService<IReturnType>> =\n new InjectionToken<ISearchService<IReturnType>>('Search_Service_Token');\n\nexport type RecentSearchEvent = {\n event?: Event;\n keyword: string;\n category: string;\n};\n\nexport type ItemClickedEvent<T> = {\n event: MouseEvent;\n item: T;\n};\n\nexport type TypeEvent = {\n event?: Event;\n input: string;\n};\n// IRequestParameters default values\nexport const DEFAULT_LIMIT = 20;\nexport const DEFAULT_LIMIT_TYPE = false;\nexport const DEFAULT_ORDER = [];\nexport const DEBOUNCE_TIME = 1000;\nexport const DEFAULT_OFFSET = 0;\nexport const DEFAULT_SAVE_IN_RECENTS = true;\n","import {\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n PLATFORM_ID,\n TemplateRef,\n ViewChild,\n} from '@angular/core';\nimport {Configuration} from '../lib-configuration';\nimport {Subject} from 'rxjs';\nimport {debounceTime, tap} from 'rxjs/operators';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n ISearchService,\n ISearchQuery,\n SEARCH_SERVICE_TOKEN,\n DEBOUNCE_TIME,\n DEFAULT_LIMIT,\n DEFAULT_LIMIT_TYPE,\n DEFAULT_OFFSET,\n DEFAULT_SAVE_IN_RECENTS,\n DEFAULT_ORDER,\n IReturnType,\n RecentSearchEvent,\n TypeEvent,\n ItemClickedEvent,\n IModel,\n} from '../types';\nimport {isPlatformBrowser} from '@angular/common';\n\nconst ALL_LABEL = 'All';\n@Component({\n selector: 'sourceloop-search',\n templateUrl: './search.component.html',\n styleUrls: ['./search.component.scss'],\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: SearchComponent,\n multi: true,\n },\n ],\n})\nexport class SearchComponent<T extends IReturnType>\n implements OnInit, OnDestroy, ControlValueAccessor\n{\n searchBoxInput = '';\n suggestionsDisplay = false;\n categoryDisplay = false;\n searching = false;\n suggestions: T[] = [];\n recentSearches: ISearchQuery[] = [];\n category: string = ALL_LABEL;\n searchRequest$ = new Subject<{input: string; event: Event}>();\n\n private _config!: Configuration<T>;\n public get config(): Configuration<T> {\n return this._config;\n }\n @Input()\n public set config(value: Configuration<T>) {\n this._config = value;\n\n if (value && value.models) {\n value.models.unshift({\n name: ALL_LABEL,\n displayName: ALL_LABEL,\n });\n } else if (value && !value.models) {\n value.models = [\n {\n name: ALL_LABEL,\n displayName: ALL_LABEL,\n },\n ];\n } else {\n // do nothing\n }\n }\n\n @Input() titleTemplate?: TemplateRef<any>;\n @Input() subtitleTemplate?: TemplateRef<any>;\n // emitted when user clicks one of the suggested results (including recent search sugestions)\n @Output() clicked = new EventEmitter<ItemClickedEvent<T>>();\n @Output() searched = new EventEmitter<RecentSearchEvent>();\n /* emitted when user makes search request (including recent search requests & requests made on change in category from dropdown)\n In case of recent search Array of recent Search request result is emitted */\n\n onChange!: (value: string | undefined) => void;\n onTouched!: () => void;\n disabled = false;\n\n @ViewChild('searchInput') public searchInputElement!: ElementRef;\n\n constructor(\n @Inject(SEARCH_SERVICE_TOKEN)\n private readonly searchService: ISearchService<T>,\n // tslint:disable-next-line:ban-types\n @Inject(PLATFORM_ID) private readonly platformId: Object,\n private readonly cdr: ChangeDetectorRef,\n ) {}\n\n ngOnInit(): void {\n this.searchRequest$\n .pipe(\n tap(v => (this.suggestions = [])),\n debounceTime(DEBOUNCE_TIME),\n )\n .subscribe((value: TypeEvent) => {\n this.searched.emit({\n event: value.event,\n keyword: value.input,\n category: this.category,\n });\n this.getSuggestions(value);\n this.cdr.markForCheck();\n });\n }\n\n // ControlValueAccessor Implementation\n writeValue(value: string): void {\n this.searchBoxInput = value;\n }\n // When the value in the UI is changed, this method will invoke a callback function\n registerOnChange(fn: (value: string | undefined) => void): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n setDisabledState?(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n getSuggestions(eventValue: TypeEvent) {\n eventValue.input = eventValue.input.trim();\n if (!eventValue.input.length) {\n return;\n }\n const order = this.config.order ?? DEFAULT_ORDER;\n let orderString = '';\n order.forEach(preference => (orderString = `${orderString}${preference} `));\n\n let saveInRecents = this.config.saveInRecents ?? DEFAULT_SAVE_IN_RECENTS;\n if (this.config.saveInRecents && this.config.saveInRecentsOnlyOnEnter) {\n if (\n !eventValue.event ||\n (eventValue.event instanceof KeyboardEvent &&\n eventValue.event.key === 'Enter')\n ) {\n saveInRecents = true; // save in recents only on enter or change in category\n } else {\n // do not save in recent search on typing\n saveInRecents = false;\n }\n }\n /* need to put default value here and not in contructor\n because sonar was giving code smell with definite assertion as all these parameters are optional */\n const requestParameters: ISearchQuery = {\n match: eventValue.input,\n sources: this._categoryToSourceName(this.category),\n limit: this.config.limit ?? DEFAULT_LIMIT,\n limitByType: this.config.limitByType ?? DEFAULT_LIMIT_TYPE,\n order: orderString,\n offset: this.config.offset ?? DEFAULT_OFFSET,\n };\n\n this.searching = true;\n this.cdr.markForCheck();\n this.searchService\n .searchApiRequest(requestParameters, saveInRecents)\n .subscribe(\n (value: T[]) => {\n this.suggestions = value;\n this.searching = false;\n this.cdr.markForCheck();\n },\n (_error: Error) => {\n this.suggestions = [];\n this.searching = false;\n this.cdr.markForCheck();\n },\n );\n }\n getRecentSearches() {\n if (\n !this.config.hideRecentSearch &&\n this.searchService.recentSearchApiRequest\n ) {\n this.searchService.recentSearchApiRequest().subscribe(\n (value: ISearchQuery[]) => {\n this.recentSearches = value;\n this.cdr.markForCheck();\n },\n (_error: Error) => {\n this.recentSearches = [];\n this.cdr.markForCheck();\n },\n );\n }\n }\n\n // event can be KeyBoardEvent or Event of type 'change' fired on change in value of drop down for category\n hitSearchApi(event?: Event) {\n // this will happen only in case user searches something and then erases it, we need to update recent search\n if (!this.searchBoxInput) {\n this.suggestions = [];\n this.getRecentSearches();\n return;\n }\n\n // no debounce time needed in case of searchOnlyOnEnter\n if (this.config.searchOnlyOnEnter) {\n if (!event || (event instanceof KeyboardEvent && event.key === 'Enter')) {\n this.getSuggestions({input: this.searchBoxInput, event});\n }\n return;\n }\n\n // no debounce time needed in case of change in category\n if (!event) {\n this.getSuggestions({input: this.searchBoxInput, event});\n return;\n }\n\n this.searchRequest$.next({\n input: this.searchBoxInput,\n event,\n });\n }\n\n populateValue(suggestion: T, event: MouseEvent) {\n const value = suggestion[\n this.config.displayPropertyName\n ] as unknown as string; // converted to string to assign value to searchBoxInput\n this.searchBoxInput = value;\n this.suggestionsDisplay = false;\n // ngModelChange doesn't detect change in value when populated from outside, hence calling manually\n this.onChange(this.searchBoxInput);\n // need to do this to show more search options for selected suggestion - just in case user reopens search input\n this.getSuggestions({input: this.searchBoxInput, event});\n this.clicked.emit({item: suggestion, event});\n }\n populateValueRecentSearch(recentSearch: ISearchQuery, event: MouseEvent) {\n event.stopPropagation();\n event.preventDefault();\n const value = recentSearch['match'];\n this.searchBoxInput = value;\n this.suggestionsDisplay = false;\n this.onChange(this.searchBoxInput);\n // need to do this to show more search options for selected suggestion - just in case user reopens search input\n this.getSuggestions({input: this.searchBoxInput, event});\n this.focusInput();\n this.showSuggestions();\n }\n\n fetchModelImageUrlFromSuggestion(suggestion: T) {\n const modelName = suggestion[\n 'source' as unknown as keyof T\n ] as unknown as string;\n let url: string | undefined;\n this.config.models.forEach(model => {\n if (model.name === modelName && model.imageUrl) {\n url = model.imageUrl;\n }\n });\n return url;\n }\n\n boldString(str: T[keyof T] | string, substr: string) {\n const strRegExp = new RegExp(`(${substr})`, 'gi');\n const stringToMakeBold: string = str as unknown as string;\n return stringToMakeBold.replace(strRegExp, `<b>$1</b>`);\n }\n\n hideSuggestions() {\n this.suggestionsDisplay = false;\n this.onTouched();\n }\n\n showSuggestions() {\n this.suggestionsDisplay = true;\n this.getRecentSearches();\n }\n\n focusInput() {\n if (isPlatformBrowser(this.platformId)) {\n this.searchInputElement.nativeElement.focus();\n }\n }\n\n setCategory(category: string) {\n this.category = category;\n this.categoryDisplay = false;\n if (this.searchBoxInput) {\n this.hitSearchApi();\n this.focusInput();\n this.showSuggestions();\n }\n }\n\n showCategory() {\n this.categoryDisplay = !this.categoryDisplay;\n }\n\n hideCategory() {\n this.categoryDisplay = false;\n }\n\n resetInput() {\n this.searchBoxInput = '';\n this.suggestions = [];\n this.suggestionsDisplay = true;\n this.focusInput();\n // ngModelChange doesn't detect change in value when populated from outside, hence calling manually\n this.onChange(this.searchBoxInput);\n this.getRecentSearches();\n }\n ngOnDestroy() {\n this.searchRequest$.unsubscribe();\n }\n\n _categoryToSourceName(category: string) {\n if (category === ALL_LABEL) {\n return [];\n } else {\n return [category];\n }\n }\n getModelFromModelName(name: string) {\n return this.config.models.find(item => item.name === name) as IModel;\n }\n getModelsWithSuggestions() {\n const modelsWithSuggestions: {model: IModel; items: T[]}[] = [];\n const sources: string[] = [];\n this.suggestions.forEach(suggestion => {\n if (sources.indexOf(suggestion['source']) >= 0) {\n modelsWithSuggestions.every(modelWithSuggestions => {\n if (modelWithSuggestions.model.name === suggestion['source']) {\n modelWithSuggestions.items.push(suggestion);\n return false;\n }\n return true;\n });\n } else {\n const model = this.getModelFromModelName(suggestion['source']);\n modelsWithSuggestions.push({model, items: [suggestion]});\n sources.push(suggestion['source']);\n }\n });\n return modelsWithSuggestions;\n }\n}\n","import {CommonModule} from '@angular/common';\nimport {HttpClientModule} from '@angular/common/http';\nimport {NgModule} from '@angular/core';\nimport {FlexLayoutModule} from '@angular/flex-layout';\nimport {FormsModule} from '@angular/forms';\nimport {MatFormFieldModule} from '@angular/material/form-field';\nimport {MatIconModule} from '@angular/material/icon';\nimport {MatInputModule} from '@angular/material/input';\nimport {MatSelectModule} from '@angular/material/select';\n\nimport {SearchComponent} from './search/search.component';\n\n@NgModule({\n declarations: [SearchComponent],\n imports: [\n CommonModule,\n FormsModule,\n HttpClientModule,\n MatSelectModule,\n MatFormFieldModule,\n MatIconModule,\n MatInputModule,\n FlexLayoutModule,\n ],\n exports: [SearchComponent],\n})\nexport class SearchLibModule {}\n","import {IDefaultReturnType, IModel} from './types';\nexport class Configuration<T = IDefaultReturnType> {\n /** property to be displayed in the results */\n displayPropertyName: keyof T;\n /** list of model configuration to be render and categorize search results */\n models: IModel[];\n /** max number of results (based on limitByType option) */\n limit?: number;\n /** apply limit on individual models, or on overall results */\n limitByType?: boolean;\n /** apply a particular ordering on results */\n order?: string[];\n /** offset for results in case limit is used */\n offset?: number;\n /** save the search query in recent history */\n saveInRecents?: boolean;\n /** a placeholder to display in the search box */\n placeholder?: string;\n /** a function to generate placeholder, overrides the placeholder property */\n placeholderFunction?: (input: string, category: string) => string;\n /** categorize results on the basis of models provided */\n categorizeResults?: boolean;\n /** hides the recent search list */\n hideRecentSearch?: boolean;\n /** hide the category selection button */\n hideCategorizeButton?: boolean;\n /** save value in recent search only on enter or change in category, if false, also saved on typing */\n saveInRecentsOnlyOnEnter?: boolean;\n /** search only on enter key or when category is changed */\n searchOnlyOnEnter?: boolean;\n noResultMessage?: string;\n searchIconClass?: string;\n crossIconClass?: string;\n dropDownButtonIconClass?: string;\n recentSearchIconClass?: string;\n\n constructor(d: Configuration<T>) {\n checkForError(d);\n this.displayPropertyName = d.displayPropertyName;\n this.models = d.models;\n\n /* IRequestParameters - will be given default values before call is made in case undefined/null,\n otherwise there ! is used on which sonar gives code smell */\n this.limit = d.limit;\n this.limitByType = d.limitByType;\n this.order = d.order;\n this.offset = d.offset;\n this.saveInRecents = d.saveInRecents;\n\n const displayTexts = setDisplayText(d);\n this.noResultMessage = displayTexts.noResultMessage;\n this.placeholder = displayTexts.placeholder;\n this.placeholderFunction = displayTexts.placeholderFunction;\n\n const searchConfig = setSearchConfig(d);\n this.categorizeResults = searchConfig.categorizeResults;\n this.hideRecentSearch = searchConfig.hideRecentSearch;\n this.hideCategorizeButton = searchConfig.hideCategorizeButton;\n this.saveInRecentsOnlyOnEnter = searchConfig.saveInRecentsOnlyOnEnter;\n this.searchOnlyOnEnter = searchConfig.searchOnlyOnEnter;\n\n const classes = setIconClasses(d);\n this.searchIconClass = classes.searchIconClass;\n this.crossIconClass = classes.crossIconClass;\n this.dropDownButtonIconClass = classes.dropDownButtonIconClass;\n this.recentSearchIconClass = classes.recentSearchIconClass;\n }\n}\nfunction checkForError<T>(d: Configuration<T>) {\n if (\n d.categorizeResults === false &&\n (d.hideCategorizeButton === false || d.hideCategorizeButton === undefined)\n ) {\n throw new Error(\n 'You must provide hideCategorizeButton:true as categorizeResults is false',\n );\n }\n if (d.saveInRecents === false && d.saveInRecentsOnlyOnEnter === true) {\n throw new Error(\n 'You must provide saveInRecents:true for saveInRecentsOnlyOnEnter:true',\n );\n }\n}\nfunction setDisplayText<T>(d: Configuration<T>) {\n return {\n placeholder: d.placeholder ?? 'Search',\n noResultMessage: d.noResultMessage ?? 'No result found',\n placeholderFunction: d.placeholderFunction,\n };\n}\nfunction setSearchConfig<T>(d: Configuration<T>) {\n return {\n categorizeResults: d.categorizeResults ?? true,\n hideRecentSearch: d.hideRecentSearch ?? false,\n hideCategorizeButton: d.hideCategorizeButton ?? false,\n saveInRecentsOnlyOnEnter: d.saveInRecentsOnlyOnEnter ?? false,\n searchOnlyOnEnter: d.searchOnlyOnEnter ?? false,\n };\n}\nfunction setIconClasses<T>(d: Configuration<T>) {\n return {\n searchIconClass: d.searchIconClass ?? 'icomoon Search',\n crossIconClass: d.crossIconClass ?? 'icomoon close',\n dropDownButtonIconClass: d.dropDownButtonIconClass ?? 'icomoon arrow_down',\n recentSearchIconClass: d.recentSearchIconClass ?? 'icomoon Search',\n };\n}\n","/*\n * Public API Surface of my-lib\n */\n\nexport * from './lib/search-lib.module';\nexport * from './lib/search/search.component';\nexport * from './lib/lib-configuration';\nexport * from './lib/types';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAkCA;MACa,oBAAoB,GAC/B,IAAI,cAAc,CAA8B,sBAAsB,EAAE;AAiB1E;AACO,MAAM,aAAa,GAAG,GAAG;AACzB,MAAM,kBAAkB,GAAG,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AI,KAAK;AAC7D,QAAA,iBAAiB,EAAE,CAAA,EAAA,GAAA,CAAC,CAAC,iBAAiB,mCAAI,KAAK;KAChD,CAAC;AACJ,CAAC;AACD,SAAS,cAAc,CAAI,CAAmB,EAAA;;IAC5C,OAAO;AACL,QAAA,eAAe,EAAE,CAAA,EAAA,GAAA,CAAC,CAAC,eAAe,mCAAI,gBAAgB;AACtD,QAAA,cAAc,EAAE,CAAA,EAAA,GAAA,CAAC,CAAC,cAAc,mCAAI,eAAe;AACnD,QAAA,uBAAuB,EAAE,CAAA,EAAA,GAAA,CAAC,CAAC,uBAAuB,mCAAI,oBAAoB;AAC1E,QAAA,qBAAqB,EAAE,CAAA,EAAA,GAAA,CAAC,CAAC,qBAAqB,mCAAI,gBAAgB;KACnE,CAAC;AACJ;;AC1GA;;AAEG;;ACFH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sourceloop/search-client",
|
|
3
|
-
"version": "4.3.
|
|
4
|
-
"description": "A global search component for search microservice",
|
|
3
|
+
"version": "4.3.2",
|
|
4
|
+
"description": "A global search component for search microservice.",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@angular/animations": "~12.1.5",
|
|
7
7
|
"@angular/cdk": ">=10.2.0 <13.0.0",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"access": "public",
|
|
34
34
|
"directory": "dist"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "44fbc48b60d3e6471771e12bbafbe73a854b1959",
|
|
37
37
|
"main": "bundles/sourceloop-search-client.umd.js",
|
|
38
38
|
"module": "fesm2015/sourceloop-search-client.js",
|
|
39
39
|
"es2015": "fesm2015/sourceloop-search-client.js",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","version":4,"metadata":{"SearchLibModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":12,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"SearchComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":15,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClientModule","line":17,"character":4},{"__symbolic":"reference","module":"@angular/material/select","name":"MatSelectModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":21,"character":4},{"__symbolic":"reference","module":"@angular/flex-layout","name":"FlexLayoutModule","line":22,"character":4}],"exports":[{"__symbolic":"reference","name":"SearchComponent"}]}]}],"members":{}},"SearchComponent":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":37,"character":1},"arguments":[{"selector":"sourceloop-search","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":43,"character":15},"useExisting":{"__symbolic":"reference","name":"SearchComponent"},"multi":true}],"template":"<div fxLayout fxLayoutAlign=\"start center\" class=\"toolbar-search\">\n <mat-form-field appearance=\"outline\" class=\"toolbar-search-input\">\n <input\n matInput\n autocomplete=\"off\"\n type=\"text\"\n [placeholder]=\"\n config.placeholderFunction\n ? config.placeholderFunction(searchInput.value, category)\n : config.placeholder || 'Search'\n \"\n #searchInput\n name=\"searchInput\"\n (focus)=\"showSuggestions()\"\n (blur)=\"hideSuggestions()\"\n [(ngModel)]=\"searchBoxInput\"\n (keyup)=\"hitSearchApi($event)\"\n placeholder=\"Search\"\n (ngModelChange)=\"onChange(this.searchBoxInput)\"\n [disabled]=\"disabled\"\n />\n <mat-icon matPrefix [className]=\"config.searchIconClass\"></mat-icon>\n <mat-icon\n *ngIf=\"searchBoxInput\"\n matSuffix\n [className]=\"config.crossIconClass\"\n (click)=\"resetInput()\"\n ></mat-icon>\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\" class=\"toolbar-search-select\">\n <mat-icon matSuffix [className]=\"config.dropDownButtonIconClass\"></mat-icon>\n <mat-select\n [value]=\"category\"\n (selectionChange)=\"setCategory($event.value)\"\n panelClass=\"search-select\"\n >\n <mat-option [value]=\"model.name\" *ngFor=\"let model of config.models\">\n {{ model.displayName }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n</div>\n\n<div class=\"search-container\">\n <div\n *ngIf=\"suggestionsDisplay && (recentSearches.length || suggestions.length)\"\n class=\"search-popup\"\n >\n <ng-container *ngIf=\"searchBoxInput\">\n <span *ngIf=\"suggestions.length === 0\" class=\"search-message\">\n <ng-container *ngIf=\"searching\"> searching... </ng-container>\n <ng-container *ngIf=\"!searching\">\n {{ config.noResultMessage }}\n </ng-container>\n </span>\n <ng-container *ngIf=\"config.categorizeResults && suggestions.length\">\n <div\n class=\"search-result\"\n *ngFor=\"let modelWithSuggestions of getModelsWithSuggestions()\"\n >\n <h3 class=\"suggestions-heading\">\n <img\n *ngIf=\"modelWithSuggestions.model.imageUrl\"\n [src]=\"modelWithSuggestions.model.imageUrl\"\n [alt]=\"modelWithSuggestions.model.displayName\"\n />\n {{ modelWithSuggestions.model.displayName }} ({{\n modelWithSuggestions.items.length\n }})\n </h3>\n <ul>\n <li\n *ngFor=\"let suggestion of modelWithSuggestions.items\"\n (mousedown)=\"populateValue(suggestion, $event)\"\n class=\"suggestions\"\n >\n <ng-container *ngIf=\"subtitleTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n subtitleTemplate;\n context: {$implicit: suggestion}\n \"\n >\n </ng-container>\n </ng-container>\n <p\n *ngIf=\"!titleTemplate\"\n [innerHTML]=\"\n boldString(\n suggestion[config.displayPropertyName],\n searchBoxInput\n )\n \"\n style=\"display: inline\"\n ></p>\n <ng-container *ngIf=\"titleTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n titleTemplate;\n context: {$implicit: suggestion}\n \"\n >\n </ng-container>\n </ng-container>\n </li>\n </ul>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!config.categorizeResults\">\n <div class=\"search-result\">\n <ul>\n <li\n *ngFor=\"let suggestion of suggestions\"\n (mousedown)=\"populateValue(suggestion, $event)\"\n >\n <!--Need to call fetchModelImageUrlFromSuggestion as each suggestion can come from different model-->\n <img\n *ngIf=\"\n !titleTemplate && fetchModelImageUrlFromSuggestion(suggestion)\n \"\n class=\"suggestions-categorize-false\"\n [src]=\"fetchModelImageUrlFromSuggestion(suggestion)\"\n style=\"margin-right: 5px\"\n alt=\"Img\"\n />\n <ng-container *ngIf=\"subtitleTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n subtitleTemplate;\n context: {$implicit: suggestion}\n \"\n >\n </ng-container>\n </ng-container>\n <p\n *ngIf=\"!titleTemplate\"\n [innerHTML]=\"\n boldString(\n suggestion[config.displayPropertyName],\n searchBoxInput\n )\n \"\n style=\"display: inline\"\n ></p>\n <ng-container *ngIf=\"titleTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n titleTemplate;\n context: {$implicit: suggestion}\n \"\n >\n </ng-container>\n </ng-container>\n </li>\n </ul>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!config.hideRecentSearch && recentSearches.length > 0\">\n <div class=\"recent-searches\">\n <h3 class=\"suggestions-heading\">Recent Searches</h3>\n <ul>\n <li\n *ngFor=\"let recentSearch of recentSearches\"\n class=\"suggestions\"\n (mousedown)=\"populateValueRecentSearch(recentSearch, $event)\"\n >\n <mat-icon\n matPrefix\n [className]=\"config.recentSearchIconClass\"\n ></mat-icon>\n\n <span> {{ recentSearch.match }}</span>\n </li>\n </ul>\n </div>\n </ng-container>\n </div>\n</div>\n","styles":[":host ::ng-deep .mat-form-field-wrapper{padding:0}:host ::ng-deep .mat-form-field-wrapper .mat-form-field-prefix{margin-right:12px}.toolbar-search-input{width:86%}.toolbar-search-input ::ng-deep input{margin:0}.toolbar-search-input ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent}.toolbar-search-input ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none;border-radius:0}.icomoon.Search,.icomoon.close{height:1rem;width:1rem;font-size:1rem;color:#33333380;padding-bottom:4px}.icomoon.close{cursor:pointer}.toolbar-search-select{width:calc(100% - 86%)}.toolbar-search-select ::ng-deep .mat-select-arrow{opacity:0}.toolbar-search-select ::ng-deep .mat-select-arrow-wrapper{display:inline-block;width:1px}.toolbar-search-select ::ng-deep .mat-select-value-text{font-size:9px}.toolbar-search-select ::ng-deep .mat-form-field-suffix .mat-icon{width:12px;font-size:14px}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent;border-radius:0}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-infix{-webkit-padding-before:.7em!important}.toolbar-search{width:515px;background-color:#f7f7f7;border-radius:0 0 4px 4px}.toolbar-search ::ng-deep .mat-form-field-appearance-outline .mat-form-field-flex{height:39px;align-items:center!important}.toolbar-search ::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0}.toolbar-search ::ng-deep .mat-form-field-infix{height:auto!important}.search-container{position:relative;width:515px}.search-container .search-popup{padding:0 15px 15px;margin:0;max-height:80vh;overflow-x:hidden;overflow-y:auto;position:absolute;top:100%;left:0px;right:0px;z-index:9999;background-color:#fff;box-shadow:0 5px 4px #0003;border-radius:0 0 4px 4px}.search-container .search-popup hr{border:0;border-top:1px solid #ebebeb;margin:0;position:-webkit-sticky;position:sticky;top:0;padding:0 0 15px;z-index:1}.search-container .search-popup .search-message{display:inline-block;width:100%;text-align:center;font-size:16px;padding-top:12px}.search-container .search-popup .search-item-info{color:#91263b;text-align:center;font-size:12px;margin-bottom:15px;padding-top:12px}.search-container .search-popup ul{padding:0;margin:0}.search-container .search-popup ul li{list-style:none;font-size:1rem;font-weight:400;line-height:1.5;color:#333}.search-container .search-popup ul li.suggestions{font-size:15px;line-height:36px;padding:0 15px 0 44px;align-items:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.search-container .search-popup ul li.suggestions:hover{background-color:#fee8e8}.search-container .search-popup ul li.suggestions svg{margin-right:5px}.search-container .search-popup ul li.suggestions-categorize-false:hover{background-color:#fee8e8}.search-container .search-popup .search-result{padding:10px 0 0;margin:0 -15px}.search-container .search-popup .search-result.no-categorize-result ul{width:100%;padding:0;margin:0 0 10px}.search-container .search-popup .search-result.no-categorize-result ul li{font-size:15px;line-height:36px;padding:0 15px 0 31px;display:flex;align-items:center;cursor:pointer}.search-container .search-popup .search-result.no-categorize-result ul li:hover{background-color:#fee8e8}.search-container .search-popup .search-result.no-categorize-result ul li img{width:18px;margin-right:9px}.search-container .search-popup .suggestions-heading{color:#9c9c9c;font-size:14px;font-weight:normal;margin:0 0 10px 17px;display:flex;align-items:center;position:relative}.search-container .search-popup .suggestions-heading .show-more{position:absolute;right:20px;color:#d1d1d1;font-size:12px;cursor:pointer;text-decoration:none}.search-container .search-popup .suggestions-heading .show-more :hover{text-decoration:underline}.search-container .search-popup .suggestions-heading img{width:18px;margin-right:9px}.search-container .search-popup .recent-searches{padding:10px 0 0;margin:0 -15px}.search-container .search-popup .recent-searches ul{display:inline-block;width:100%}.search-container .search-popup .recent-searches ul li.suggestions{display:flex}.search-container .search-popup .recent-searches ul li.suggestions span{width:100%;overflow:hidden;text-overflow:ellipsis}.search-container .search-popup .recent-searches .suggestions{display:flex}.search-container .search-popup .recent-searches .suggestions-heading{margin-left:30px}.search-container .search-popup .recent-searches li.suggestions{padding-left:31px}::ng-deep .search-select.mat-select-panel{margin-top:30px;margin-left:10px}::ng-deep .search-select .mat-option-text{display:contents!important}::ng-deep .toolbar-search .mat-form-field-infix{font-size:14px}::ng-deep .toolbar-search input{line-height:14px}::ng-deep .toolbar-search .mat-form-field-outline:first-child .mat-form-field-outline-start,::ng-deep .toolbar-search .mat-form-field-outline:first-child .mat-form-field-outline-end{background-color:#f1f3f4}::ng-deep .toolbar-search:hover .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-width:1px!important;border-color:#a53159!important}::ng-deep .toolbar-search:hover .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border:1px solid #a53159!important;border-left-style:none!important;border-right-style:none!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-radius:0;border-color:transparent!important;background-color:#a53159!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#a53159!important;background-color:#a53159!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-select{color:#fff!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .icomoon.arrow_down{color:#fff}::ng-deep .toolbar-search:focus-within .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-width:2px!important;border-color:#90003b!important}::ng-deep .toolbar-search:focus-within .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border:2px solid #90003b!important;border-left-style:none!important;border-right-style:none!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-radius:0;border-color:transparent!important;background-color:#90003b!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#90003b!important;background-color:#90003b!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-select{color:#fff!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .icomoon.arrow_down{color:#fff}::ng-deep .toolbar-search .mat-select-arrow{opacity:0}\n"]}]}],"members":{"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":65,"character":3}}]}],"titleTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":86,"character":3}}]}],"subtitleTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":87,"character":3}}]}],"clicked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":89,"character":3}}]}],"searched":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":90,"character":3}}]}],"searchInputElement":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":98,"character":3},"arguments":["searchInput"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":101,"character":5},"arguments":[{"__symbolic":"reference","name":"SEARCH_SERVICE_TOKEN"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":104,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":104,"character":12}]}],null],"parameters":[{"__symbolic":"reference","name":"ISearchService"},{"__symbolic":"reference","name":"Object"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":105,"character":26}]}],"ngOnInit":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"getSuggestions":[{"__symbolic":"method"}],"getRecentSearches":[{"__symbolic":"method"}],"hitSearchApi":[{"__symbolic":"method"}],"populateValue":[{"__symbolic":"method"}],"populateValueRecentSearch":[{"__symbolic":"method"}],"fetchModelImageUrlFromSuggestion":[{"__symbolic":"method"}],"boldString":[{"__symbolic":"method"}],"hideSuggestions":[{"__symbolic":"method"}],"showSuggestions":[{"__symbolic":"method"}],"focusInput":[{"__symbolic":"method"}],"setCategory":[{"__symbolic":"method"}],"showCategory":[{"__symbolic":"method"}],"hideCategory":[{"__symbolic":"method"}],"resetInput":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_categoryToSourceName":[{"__symbolic":"method"}],"getModelFromModelName":[{"__symbolic":"method"}],"getModelsWithSuggestions":[{"__symbolic":"method"}]}},"Configuration":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Configuration"}]}]}},"ISearchQuery":{"__symbolic":"interface"},"IModel":{"__symbolic":"interface"},"IReturnType":{"__symbolic":"interface"},"IDefaultReturnType":{"__symbolic":"interface"},"ISearchService":{"__symbolic":"interface"},"SEARCH_SERVICE_TOKEN":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":36,"character":6},"arguments":["Search_Service_Token"]},"RecentSearchEvent":{"__symbolic":"interface"},"ItemClickedEvent":{"__symbolic":"interface"},"TypeEvent":{"__symbolic":"interface"},"DEFAULT_LIMIT":20,"DEFAULT_ORDER":[],"DEBOUNCE_TIME":1000,"DEFAULT_SAVE_IN_RECENTS":true},"origins":{"SearchLibModule":"./lib/search-lib.module","SearchComponent":"./lib/search/search.component","Configuration":"./lib/lib-configuration","ISearchQuery":"./lib/types","IModel":"./lib/types","IReturnType":"./lib/types","IDefaultReturnType":"./lib/types","ISearchService":"./lib/types","SEARCH_SERVICE_TOKEN":"./lib/types","RecentSearchEvent":"./lib/types","ItemClickedEvent":"./lib/types","TypeEvent":"./lib/types","DEFAULT_LIMIT":"./lib/types","DEFAULT_LIMIT_TYPE":"./lib/types","DEFAULT_ORDER":"./lib/types","DEBOUNCE_TIME":"./lib/types","DEFAULT_OFFSET":"./lib/types","DEFAULT_SAVE_IN_RECENTS":"./lib/types"},"importAs":"@sourceloop/search-client"}
|
|
1
|
+
{"__symbolic":"module","version":4,"metadata":{"SearchLibModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":12,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"SearchComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":15,"character":4},{"__symbolic":"reference","module":"@angular/forms","name":"FormsModule","line":16,"character":4},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClientModule","line":17,"character":4},{"__symbolic":"reference","module":"@angular/material/select","name":"MatSelectModule","line":18,"character":4},{"__symbolic":"reference","module":"@angular/material/form-field","name":"MatFormFieldModule","line":19,"character":4},{"__symbolic":"reference","module":"@angular/material/icon","name":"MatIconModule","line":20,"character":4},{"__symbolic":"reference","module":"@angular/material/input","name":"MatInputModule","line":21,"character":4},{"__symbolic":"reference","module":"@angular/flex-layout","name":"FlexLayoutModule","line":22,"character":4}],"exports":[{"__symbolic":"reference","name":"SearchComponent"}]}]}],"members":{}},"SearchComponent":{"__symbolic":"class","arity":1,"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":37,"character":1},"arguments":[{"selector":"sourceloop-search","providers":[{"provide":{"__symbolic":"reference","module":"@angular/forms","name":"NG_VALUE_ACCESSOR","line":43,"character":15},"useExisting":{"__symbolic":"reference","name":"SearchComponent"},"multi":true}],"template":"<div fxLayout fxLayoutAlign=\"start center\" class=\"toolbar-search\">\n <mat-form-field appearance=\"outline\" class=\"toolbar-search-input\">\n <input\n matInput\n autocomplete=\"off\"\n type=\"text\"\n [placeholder]=\"\n config.placeholderFunction\n ? config.placeholderFunction(searchInput.value, category)\n : config.placeholder || 'Search'\n \"\n #searchInput\n name=\"searchInput\"\n (focus)=\"showSuggestions()\"\n (blur)=\"hideSuggestions()\"\n [(ngModel)]=\"searchBoxInput\"\n (keyup)=\"hitSearchApi($event)\"\n placeholder=\"Search\"\n (ngModelChange)=\"onChange(this.searchBoxInput)\"\n [disabled]=\"disabled\"\n />\n <mat-icon matPrefix [className]=\"config.searchIconClass\"></mat-icon>\n <mat-icon\n *ngIf=\"searchBoxInput\"\n matSuffix\n [className]=\"config.crossIconClass\"\n (click)=\"resetInput()\"\n ></mat-icon>\n </mat-form-field>\n\n <mat-form-field appearance=\"outline\" class=\"toolbar-search-select\">\n <mat-icon matSuffix [className]=\"config.dropDownButtonIconClass\"></mat-icon>\n <mat-select\n [value]=\"category\"\n (selectionChange)=\"setCategory($event.value)\"\n panelClass=\"search-select\"\n >\n <mat-option [value]=\"model.name\" *ngFor=\"let model of config.models\">\n {{ model.displayName }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n</div>\n\n<div class=\"search-container\">\n <div\n *ngIf=\"suggestionsDisplay && (recentSearches.length || suggestions.length)\"\n class=\"search-popup\"\n >\n <ng-container *ngIf=\"searchBoxInput\">\n <span *ngIf=\"suggestions.length === 0\" class=\"search-message\">\n <ng-container *ngIf=\"searching\"> searching... </ng-container>\n <ng-container *ngIf=\"!searching\">\n {{ config.noResultMessage }}\n </ng-container>\n </span>\n <ng-container *ngIf=\"config.categorizeResults && suggestions.length\">\n <div\n class=\"search-result\"\n *ngFor=\"let modelWithSuggestions of getModelsWithSuggestions()\"\n >\n <h3 class=\"suggestions-heading\">\n <img\n *ngIf=\"modelWithSuggestions.model.imageUrl\"\n [src]=\"modelWithSuggestions.model.imageUrl\"\n [alt]=\"modelWithSuggestions.model.displayName\"\n />\n {{ modelWithSuggestions.model.displayName }} ({{\n modelWithSuggestions.items.length\n }})\n </h3>\n <ul>\n <li\n *ngFor=\"let suggestion of modelWithSuggestions.items\"\n (mousedown)=\"populateValue(suggestion, $event)\"\n class=\"suggestions\"\n >\n <ng-container *ngIf=\"subtitleTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n subtitleTemplate;\n context: {$implicit: suggestion}\n \"\n >\n </ng-container>\n </ng-container>\n <p\n *ngIf=\"!titleTemplate\"\n [innerHTML]=\"\n boldString(\n suggestion[config.displayPropertyName],\n searchBoxInput\n )\n \"\n style=\"display: inline\"\n ></p>\n <ng-container *ngIf=\"titleTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n titleTemplate;\n context: {$implicit: suggestion}\n \"\n >\n </ng-container>\n </ng-container>\n </li>\n </ul>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!config.categorizeResults\">\n <div class=\"search-result\">\n <ul>\n <li\n *ngFor=\"let suggestion of suggestions\"\n (mousedown)=\"populateValue(suggestion, $event)\"\n >\n <!--Need to call fetchModelImageUrlFromSuggestion as each suggestion can come from different model-->\n <img\n *ngIf=\"\n !titleTemplate && fetchModelImageUrlFromSuggestion(suggestion)\n \"\n class=\"suggestions-categorize-false\"\n [src]=\"fetchModelImageUrlFromSuggestion(suggestion)\"\n style=\"margin-right: 5px\"\n alt=\"Img\"\n />\n <ng-container *ngIf=\"subtitleTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n subtitleTemplate;\n context: {$implicit: suggestion}\n \"\n >\n </ng-container>\n </ng-container>\n <p\n *ngIf=\"!titleTemplate\"\n [innerHTML]=\"\n boldString(\n suggestion[config.displayPropertyName],\n searchBoxInput\n )\n \"\n style=\"display: inline\"\n ></p>\n <ng-container *ngIf=\"titleTemplate\">\n <ng-container\n *ngTemplateOutlet=\"\n titleTemplate;\n context: {$implicit: suggestion}\n \"\n >\n </ng-container>\n </ng-container>\n </li>\n </ul>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"!config.hideRecentSearch && recentSearches.length > 0\">\n <div class=\"recent-searches\">\n <h3 class=\"suggestions-heading\">Recent Searches</h3>\n <ul>\n <li\n *ngFor=\"let recentSearch of recentSearches\"\n class=\"suggestions\"\n (mousedown)=\"populateValueRecentSearch(recentSearch, $event)\"\n >\n <mat-icon\n matPrefix\n [className]=\"config.recentSearchIconClass\"\n ></mat-icon>\n\n <span> {{ recentSearch.match }}</span>\n </li>\n </ul>\n </div>\n </ng-container>\n </div>\n</div>\n","styles":[":host ::ng-deep .mat-form-field-wrapper{padding:0}:host ::ng-deep .mat-form-field-wrapper .mat-form-field-prefix{margin-right:12px}.toolbar-search-input{width:86%}.toolbar-search-input ::ng-deep input{margin:0}.toolbar-search-input ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent}.toolbar-search-input ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none;border-radius:0}.icomoon.Search,.icomoon.close{height:1rem;width:1rem;font-size:1rem;color:#33333380;padding-bottom:4px}.icomoon.close{cursor:pointer}.toolbar-search-select{width:calc(100% - 86%)}.toolbar-search-select ::ng-deep .mat-select-arrow{opacity:0}.toolbar-search-select ::ng-deep .mat-select-arrow-wrapper{display:inline-block;width:1px}.toolbar-search-select ::ng-deep .mat-select-value-text{font-size:9px}.toolbar-search-select ::ng-deep .mat-form-field-suffix .mat-icon{width:12px;font-size:14px}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-start{border-color:transparent;border-radius:0}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-outline:first-child .mat-form-field-outline-end{border:none}.toolbar-search-select ::ng-deep .mat-form-field-flex .mat-form-field-infix{-webkit-padding-before:.7em!important}.toolbar-search{width:515px;background-color:#f7f7f7;border-radius:0 0 4px 4px}.toolbar-search ::ng-deep .mat-form-field-appearance-outline .mat-form-field-flex{height:39px;align-items:center!important}.toolbar-search ::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0}.toolbar-search ::ng-deep .mat-form-field-infix{height:auto!important}.search-container{position:relative;width:515px}.search-container .search-popup{padding:0 15px 15px;margin:0;max-height:80vh;overflow-x:hidden;overflow-y:auto;position:absolute;top:100%;left:0px;right:0px;z-index:9999;background-color:#fff;box-shadow:0 5px 4px #0003;border-radius:0 0 4px 4px}.search-container .search-popup hr{border:0;border-top:1px solid #ebebeb;margin:0;position:sticky;top:0;padding:0 0 15px;z-index:1}.search-container .search-popup .search-message{display:inline-block;width:100%;text-align:center;font-size:16px;padding-top:12px}.search-container .search-popup .search-item-info{color:#91263b;text-align:center;font-size:12px;margin-bottom:15px;padding-top:12px}.search-container .search-popup ul{padding:0;margin:0}.search-container .search-popup ul li{list-style:none;font-size:1rem;font-weight:400;line-height:1.5;color:#333}.search-container .search-popup ul li.suggestions{font-size:15px;line-height:36px;padding:0 15px 0 44px;align-items:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.search-container .search-popup ul li.suggestions:hover{background-color:#fee8e8}.search-container .search-popup ul li.suggestions svg{margin-right:5px}.search-container .search-popup ul li.suggestions-categorize-false:hover{background-color:#fee8e8}.search-container .search-popup .search-result{padding:10px 0 0;margin:0 -15px}.search-container .search-popup .search-result.no-categorize-result ul{width:100%;padding:0;margin:0 0 10px}.search-container .search-popup .search-result.no-categorize-result ul li{font-size:15px;line-height:36px;padding:0 15px 0 31px;display:flex;align-items:center;cursor:pointer}.search-container .search-popup .search-result.no-categorize-result ul li:hover{background-color:#fee8e8}.search-container .search-popup .search-result.no-categorize-result ul li img{width:18px;margin-right:9px}.search-container .search-popup .suggestions-heading{color:#9c9c9c;font-size:14px;font-weight:normal;margin:0 0 10px 17px;display:flex;align-items:center;position:relative}.search-container .search-popup .suggestions-heading .show-more{position:absolute;right:20px;color:#d1d1d1;font-size:12px;cursor:pointer;text-decoration:none}.search-container .search-popup .suggestions-heading .show-more :hover{text-decoration:underline}.search-container .search-popup .suggestions-heading img{width:18px;margin-right:9px}.search-container .search-popup .recent-searches{padding:10px 0 0;margin:0 -15px}.search-container .search-popup .recent-searches ul{display:inline-block;width:100%}.search-container .search-popup .recent-searches ul li.suggestions{display:flex}.search-container .search-popup .recent-searches ul li.suggestions span{width:100%;overflow:hidden;text-overflow:ellipsis}.search-container .search-popup .recent-searches .suggestions{display:flex}.search-container .search-popup .recent-searches .suggestions-heading{margin-left:30px}.search-container .search-popup .recent-searches li.suggestions{padding-left:31px}::ng-deep .search-select.mat-select-panel{margin-top:30px;margin-left:10px}::ng-deep .search-select .mat-option-text{display:contents!important}::ng-deep .toolbar-search .mat-form-field-infix{font-size:14px}::ng-deep .toolbar-search input{line-height:14px}::ng-deep .toolbar-search .mat-form-field-outline:first-child .mat-form-field-outline-start,::ng-deep .toolbar-search .mat-form-field-outline:first-child .mat-form-field-outline-end{background-color:#f1f3f4}::ng-deep .toolbar-search:hover .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-width:1px!important;border-color:#a53159!important}::ng-deep .toolbar-search:hover .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border:1px solid #a53159!important;border-left-style:none!important;border-right-style:none!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-radius:0;border-color:transparent!important;background-color:#a53159!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#a53159!important;background-color:#a53159!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-select{color:#fff!important}::ng-deep .toolbar-search:hover .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .icomoon.arrow_down{color:#fff}::ng-deep .toolbar-search:focus-within .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-width:2px!important;border-color:#90003b!important}::ng-deep .toolbar-search:focus-within .toolbar-search-input.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border:2px solid #90003b!important;border-left-style:none!important;border-right-style:none!important;border-top-right-radius:0!important;border-bottom-right-radius:0!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-start{border-radius:0;border-color:transparent!important;background-color:#90003b!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#90003b!important;background-color:#90003b!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .mat-select{color:#fff!important}::ng-deep .toolbar-search:focus-within .toolbar-search-select.mat-form-field:not(.mat-form-field-disabled) .icomoon.arrow_down{color:#fff}::ng-deep .toolbar-search .mat-select-arrow{opacity:0}\n"]}]}],"members":{"config":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":65,"character":3}}]}],"titleTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":86,"character":3}}]}],"subtitleTemplate":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":87,"character":3}}]}],"clicked":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":89,"character":3}}]}],"searched":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":90,"character":3}}]}],"searchInputElement":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":98,"character":3},"arguments":["searchInput"]}]}],"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":101,"character":5},"arguments":[{"__symbolic":"reference","name":"SEARCH_SERVICE_TOKEN"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":104,"character":5},"arguments":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":104,"character":12}]}],null],"parameters":[{"__symbolic":"reference","name":"ISearchService"},{"__symbolic":"reference","name":"Object"},{"__symbolic":"reference","module":"@angular/core","name":"ChangeDetectorRef","line":105,"character":26}]}],"ngOnInit":[{"__symbolic":"method"}],"writeValue":[{"__symbolic":"method"}],"registerOnChange":[{"__symbolic":"method"}],"registerOnTouched":[{"__symbolic":"method"}],"setDisabledState":[{"__symbolic":"method"}],"getSuggestions":[{"__symbolic":"method"}],"getRecentSearches":[{"__symbolic":"method"}],"hitSearchApi":[{"__symbolic":"method"}],"populateValue":[{"__symbolic":"method"}],"populateValueRecentSearch":[{"__symbolic":"method"}],"fetchModelImageUrlFromSuggestion":[{"__symbolic":"method"}],"boldString":[{"__symbolic":"method"}],"hideSuggestions":[{"__symbolic":"method"}],"showSuggestions":[{"__symbolic":"method"}],"focusInput":[{"__symbolic":"method"}],"setCategory":[{"__symbolic":"method"}],"showCategory":[{"__symbolic":"method"}],"hideCategory":[{"__symbolic":"method"}],"resetInput":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}],"_categoryToSourceName":[{"__symbolic":"method"}],"getModelFromModelName":[{"__symbolic":"method"}],"getModelsWithSuggestions":[{"__symbolic":"method"}]}},"Configuration":{"__symbolic":"class","arity":1,"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"Configuration"}]}]}},"ISearchQuery":{"__symbolic":"interface"},"IModel":{"__symbolic":"interface"},"IReturnType":{"__symbolic":"interface"},"IDefaultReturnType":{"__symbolic":"interface"},"ISearchService":{"__symbolic":"interface"},"SEARCH_SERVICE_TOKEN":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":36,"character":6},"arguments":["Search_Service_Token"]},"RecentSearchEvent":{"__symbolic":"interface"},"ItemClickedEvent":{"__symbolic":"interface"},"TypeEvent":{"__symbolic":"interface"},"DEFAULT_LIMIT":20,"DEFAULT_ORDER":[],"DEBOUNCE_TIME":1000,"DEFAULT_SAVE_IN_RECENTS":true},"origins":{"SearchLibModule":"./lib/search-lib.module","SearchComponent":"./lib/search/search.component","Configuration":"./lib/lib-configuration","ISearchQuery":"./lib/types","IModel":"./lib/types","IReturnType":"./lib/types","IDefaultReturnType":"./lib/types","ISearchService":"./lib/types","SEARCH_SERVICE_TOKEN":"./lib/types","RecentSearchEvent":"./lib/types","ItemClickedEvent":"./lib/types","TypeEvent":"./lib/types","DEFAULT_LIMIT":"./lib/types","DEFAULT_LIMIT_TYPE":"./lib/types","DEFAULT_ORDER":"./lib/types","DEBOUNCE_TIME":"./lib/types","DEFAULT_OFFSET":"./lib/types","DEFAULT_SAVE_IN_RECENTS":"./lib/types"},"importAs":"@sourceloop/search-client"}
|