@rangertechnologies/ngnxt
Version:
This library was used for creating dymanic UI based on the input JSON/data
73 lines (72 loc) • 3.27 kB
TypeScript
import { OnInit, OnDestroy, OnChanges, EventEmitter, ElementRef, SimpleChanges, WritableSignal, TrackByFunction } from "@angular/core";
import { Subscription } from "rxjs";
import { StorageService } from "../../services/storage/storage.service";
import { ChangeService } from "../../services/change/change.service";
import { DataService } from "../../services/data/data.service";
import { CountryService } from "../../services/country/country.service";
import * as i0 from "@angular/core";
export declare class NxtSearchBox implements OnInit, OnChanges, OnDestroy {
private storageService;
private changeService;
private dataService;
private countryService;
private elementRef;
placeHolderText: string;
question: any;
apiMeta: any;
id: string;
readOnly: boolean;
mode: 'view' | 'edit' | 'print';
from: any;
value: any;
onlyView: boolean;
rowData: any;
searchValueChange: EventEmitter<any>;
searchWrapper: ElementRef;
SearchItem: any;
finalResults: WritableSignal<any[]>;
searchKeyWord: string;
newResult: any;
showResult: boolean;
noResult: boolean;
showSuggestion: boolean;
isLoading: boolean;
viewFilterName: string;
isSingleFieldChange: boolean;
valueObj: any;
inputFocused: boolean;
lastSearchLength: number;
filterName: string;
private destroy$;
private searchSubject;
subscription: Subscription;
trackByFn: TrackByFunction<any>;
constructor(storageService: StorageService, changeService: ChangeService, dataService: DataService, countryService: CountryService, elementRef: ElementRef);
ngOnInit(): void;
ngOnChanges(changes: SimpleChanges): void;
ngOnDestroy(): void;
onDocumentClick(event: Event): void;
onEscapeKey(event: KeyboardEvent): void;
private parseApiMeta;
private resetComponentState;
private hideSuggestions;
onInputFocus(): void;
onInputBlur(): void;
clearList(): void;
getSourceDataLocal(event: any): void;
private performSearch;
private searchFromApi;
private searchFromStaticData;
private processSearchResults;
private getNestedValue;
private getCombinedValuesFromColumns;
getValues(element: any, columns: any): any;
getKeys(obj: any): string[];
clickItem(event: any): void;
inputValue(event: any, ques: any): void;
highlightText(text: string, searchTerm: string): string;
private sanitizeHtml;
removeValueEmit(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NxtSearchBox, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<NxtSearchBox, "nxt-search-box", never, { "placeHolderText": { "alias": "placeHolderText"; "required": false; }; "question": { "alias": "question"; "required": false; }; "apiMeta": { "alias": "apiMeta"; "required": false; }; "id": { "alias": "id"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "from": { "alias": "from"; "required": false; }; "value": { "alias": "value"; "required": false; }; "onlyView": { "alias": "onlyView"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; }, { "searchValueChange": "searchValueChange"; }, never, never, true, never>;
}