import { OnInit, OnDestroy, EventEmitter } from '@angular/core'; import { FormControl } from '@angular/forms'; import { GlcodeService, ApiVisa, GlcodeContainerModel } from 'blg-akaun-ts-lib'; import { Observable, ReplaySubject, Subject } from 'rxjs'; export declare class ErpSelectGlcodeDropDownComponent implements OnInit, OnDestroy { private glcodeService; apiVisa: ApiVisa; glcode: FormControl; coaGuid: string; label: string; glcodeSelected: EventEmitter; glcodeChange: EventEmitter; serverSideFiltering: FormControl; serverSideSearching: boolean; filteredOptions$: ReplaySubject; glcodeList: GlcodeContainerModel[]; selectedGlcode: GlcodeContainerModel; protected _onDestroy: Subject; constructor(glcodeService: GlcodeService); ngOnInit(): void; /** * Server-side GL code typeahead. * * Replaces the raw SELECT that went through SubQueryService: * * SELECT hdr.guid FROM bl_fi_mst_glcode AS hdr * WHERE hdr.status != 'DELETED' * AND hdr.chart_of_acc_guid = '' * AND (hdr.gl_code_1 ILIKE '%%' OR hdr.name ILIKE '%%') * ORDER BY hdr.gl_code_1 * * GET glcode/query -> GlcodeUow.getByCriteria -> generateWhereClauseByCriteria * honours every part of it as criteria: `search_word` (bound, ILIKE), * `chart_of_acc_guid`, and a default of `status != 'DELETED'` when no status is * given. orderBy/order reproduce `ORDER BY hdr.gl_code_1` (that UoW defaults to * DESC, so `order` must be sent explicitly). * * Behaviour notes: * - `search_word` also ILIKEs gl_code_2..4, descr and txn_type, so the typeahead * matches a little more than the old gl_code_1/name pair. * - One request now instead of one subquery plus one getByGuid per hit, and the * container comes back from the same query rather than a follow-up fetch. */ search(searchText: string): Observable; onSelect(guid: string): void; onPatchValue(guid: string): void; ngOnDestroy(): void; }