import { EventEmitter, OnInit, OnDestroy } from '@angular/core'; import { SubSink } from 'subsink2'; import { Subject } from 'rxjs'; import { Pagination, bl_fi_generic_doc_hdr_RowClass, LocationService } from 'blg-akaun-ts-lib'; import { PaginationComponent } from '../../utilities/pagination/pagination.component'; import { SearchEvent } from '../../models/query.model'; export declare class LineContainerKoByComponent implements OnInit, OnDestroy { private locationService; localState: any; hdr: bl_fi_generic_doc_hdr_RowClass; searchModel: any; advSearchId: string; service: any; serverDocTypeDoc2: string; itemType: string; additionalColDef: any; addLineItem: EventEmitter; protected subs: SubSink; gridApi: any; SQLGuids: string[]; searchCriteria: any[]; /** * Maps advanced-search form fields onto the criteria the generic-document line * endpoints accept. Override per applet when a search model names its fields * differently. * * `contains` says who supplies the ILIKE wildcards, and it is not decorative: * GenericDocumentUow.generateWhereConditionByCriteria is inconsistent about it * in the same method. `doc_reference_like` and friends are emitted as * ILIKE '%' || :doc_reference_like || '%' * but these three are emitted as * ILIKE :server_doc_1_like * with no wildcards at all. Sending a bare value to the latter would turn what * used to be `hdr.server_doc_1 ILIKE '%v%'` into an exact match, so the pattern * is built here. */ searchFieldCriteriaMap: { [formField: string]: { columnName: string; contains?: boolean; }; }; pagination: Pagination; snapshot: any; totalCount: number; totalRecords$: Subject; emptyGrid: boolean; criteriaList: { columnName: string; operator: string; value: string; }[]; enableListing: any; showCondition: string; paginationComp: PaginationComponent; defaultColDef: { filter: string; floatingFilter: boolean; floatingFilterComponentParams: { suppressFilterButton: boolean; }; minWidth: number; flex: number; sortable: boolean; resizable: boolean; suppressCsvExport: boolean; }; columnsDefs: ({ headerName: string; field: string; cellStyle: () => { 'text-align': string; }; maxWidth: number; valueFormatter?: undefined; type?: undefined; valueGetter?: undefined; } | { headerName: string; field: string; cellStyle: () => { 'text-align': string; }; maxWidth?: undefined; valueFormatter?: undefined; type?: undefined; valueGetter?: undefined; } | { headerName: string; field: string; cellStyle: () => { 'text-align': string; }; maxWidth: number; valueFormatter: (params: any) => string; type?: undefined; valueGetter?: undefined; } | { headerName: string; field: string; type: string; maxWidth: number; valueFormatter: (params: any) => string; cellStyle?: undefined; valueGetter?: undefined; } | { headerName: string; field: string; type: string; maxWidth: number; cellStyle?: undefined; valueFormatter?: undefined; valueGetter?: undefined; } | { headerName: string; type: string; maxWidth: number; valueGetter: (params: any) => any; field?: undefined; cellStyle?: undefined; valueFormatter?: undefined; })[]; constructor(locationService: LocationService); ngOnInit(): void; onGridReady(params: any): void; clear(): void; setGridData(criteria?: any): void; setTotalRecordCount(totalCount: number): void; /** * Handles a search emitted by . * * Replaces the SubQueryService round-trip: the search bar's raw SELECT used to * be posted to /subquery, and the resolved line guids were paged through the * `line_guids` criterion. The listing now sends criteria straight to * getGenericDocHdrLineLinkByCriteria, so the grid pages server-side normally * instead of slicing a client-side guid list. * * The search bar is set to `returnFormOnSubject`, so it emits the raw form on * `searchV2` rather than SQL on `search` -- the same pair * already offers. That keeps the mapping from form field to column here, in the * listing that knows its own endpoint, and means the applet-supplied * `searchModel` needs no callbacks of any kind: a plain SearchModelV2 works. * * Keyword search maps to `line_search_word`, which * GenericDocumentUow.generateWhereConditionByCriteria (the where-clause builder * behind the hdr-line-link query this listing calls) applies as a bound ILIKE * over hdr.server_doc_1, line.item_code and line.item_name -- the columns this * grid shows. */ onSearch(e: SearchEvent): void; /** * Maps the emitted search form onto criteria, or returns null when a field the * user filled in has no mapping - in which case the listing is deliberately * left as it is rather than reloaded with no filter, because showing every row * to someone who asked for a filtered one is the more dangerous failure. * * `searchFieldCriteriaMap` is the field -> criterion mapping. It defaults to * the fields the generic-document line search models use, and is an @Input so * an applet whose model names its fields differently can override it without a * library change. */ private buildSearchCriteria; onRowClicked(item: any): void; ngOnDestroy(): void; }