import { BackendUtilityService, CollectionService, ExtensionService, ExtensionUtility, FilterFactory, FilterService, GridEventService, GridService, GridStateService, HeaderGroupingService, PaginationService, ResizerService, SharedService, SlickDataView, SlickEventHandler, SlickGrid, SlickGroupItemMetadataProvider, SortService, TreeDataService, type BackendService, type BackendServiceApi, type BasePaginationComponent, type Column, type ExtensionList, type ExternalResource, type ExternalResourceConstructor, type GridOption, type Metrics, type Pagination, type PaginationMetadata, type RxJsFacade, type Subscription, type TranslaterService } from '@slickgrid-universal/common'; import { SlickFooterComponent } from '@slickgrid-universal/custom-footer-component'; import { SlickEmptyWarningComponent } from '@slickgrid-universal/empty-warning-component'; import { EventPubSubService } from '@slickgrid-universal/event-pub-sub'; import { type SlickerGridInstance } from '../interfaces/slickerGridInstance.interface.js'; import { UniversalContainerService } from '../services/universalContainer.service.js'; export declare class SlickVanillaGridBundle { protected _currentDatasetLength: number; protected _eventPubSubService: EventPubSubService; protected _darkMode: boolean; protected _collectionObservers: Array void; }>; protected _columns?: Column[]; protected _gridOptions: GridOption; protected _gridContainerElm: HTMLElement; protected _gridParentContainerElm: HTMLElement; protected _hideHeaderRowAfterPageLoad: boolean; protected _isAutosizeColsCalled: boolean; protected _isDatasetInitialized: boolean; protected _isDatasetHierarchicalInitialized: boolean; protected _isGridInitialized: boolean; protected _isLocalGrid: boolean; protected _isPaginationInitialized: boolean; protected _eventHandler: SlickEventHandler; protected _extensions: ExtensionList | undefined; protected _paginationOptions: Pagination | undefined; protected _registeredResources: Array; protected _scrollEndCalled: boolean; protected _slickgridInitialized: boolean; protected _slickerGridInstances: SlickerGridInstance | undefined; backendServiceApi: BackendServiceApi | undefined; dataView?: SlickDataView; slickGrid?: SlickGrid; metrics?: Metrics; customDataView: boolean; paginationData?: { gridOptions: GridOption; paginationService: PaginationService; }; totalItems: number; groupItemMetadataProvider?: SlickGroupItemMetadataProvider; resizerService: ResizerService; subscriptions: Subscription[]; showPagination: boolean; extensionUtility: ExtensionUtility; backendUtilityService: BackendUtilityService; collectionService: CollectionService; extensionService: ExtensionService; filterFactory: FilterFactory; filterService: FilterService; gridEventService: GridEventService; gridService: GridService; gridStateService: GridStateService; headerGroupingService: HeaderGroupingService; paginationComponent: BasePaginationComponent | undefined; paginationService: PaginationService; rxjs?: RxJsFacade; sharedService: SharedService; sortService: SortService; translaterService: TranslaterService | undefined; treeDataService: TreeDataService; universalContainerService: UniversalContainerService; slickEmptyWarning: SlickEmptyWarningComponent | undefined; slickFooter: SlickFooterComponent | undefined; get backendService(): BackendService | undefined; get eventHandler(): SlickEventHandler; get columnDefinitions(): Column[]; set columnDefinitions(columns: Column[]); get dataset(): TData[]; set dataset(newDataset: TData[]); get datasetHierarchical(): any[] | undefined; set datasetHierarchical(newHierarchicalDataset: any[] | undefined); set eventPubSubService(pubSub: EventPubSubService); set isDatasetHierarchicalInitialized(isInitialized: boolean); get gridOptions(): GridOption; set gridOptions(options: GridOption); get paginationOptions(): Pagination | undefined; set paginationOptions(newPaginationOptions: Pagination | undefined); get isDatasetInitialized(): boolean; set isDatasetInitialized(isInitialized: boolean); get isGridInitialized(): boolean; get instances(): SlickerGridInstance | undefined; get extensions(): ExtensionList | undefined; get registeredResources(): Array; /** * Slicker Grid Bundle constructor * @param {Object} gridParentContainerElm - div HTML DOM element container * @param {Array} columnDefs - Column Definitions * @param {Object} options - Grid Options * @param {Array} dataset - Dataset * @param {Array} hierarchicalDataset - Hierarchical Dataset * @param {Object} services - Typically only used for Unit Testing when we want to pass Mocked/Stub Services */ constructor(gridParentContainerElm: HTMLElement, columnDefs?: Column[] | undefined, options?: Partial | undefined, dataset?: TData[] | undefined, hierarchicalDataset?: any[] | undefined, services?: { backendUtilityService?: BackendUtilityService; collectionService?: CollectionService; eventPubSubService?: EventPubSubService; extensionService?: ExtensionService; extensionUtility?: ExtensionUtility; filterService?: FilterService; gridEventService?: GridEventService; gridService?: GridService; gridStateService?: GridStateService; headerGroupingService?: HeaderGroupingService; paginationService?: PaginationService; resizerService?: ResizerService; rxjs?: RxJsFacade; sharedService?: SharedService; sortService?: SortService; treeDataService?: TreeDataService; translaterService?: TranslaterService; universalContainerService?: UniversalContainerService; } | undefined); emptyGridContainerElm(): void; /** Dispose of the Component */ dispose(shouldEmptyDomElementContainer?: boolean): void; disposeExternalResources(): void; initialization(gridContainerElm: HTMLElement, eventHandler: SlickEventHandler, inputDataset?: TData[]): void; hasBackendInfiniteScroll(): boolean; mergeGridOptions(gridOptions: GridOption): GridOption; /** * Define our internal Post Process callback, it will execute internally after we get back result from the Process backend call * Currently ONLY available with the GraphQL Backend Service. * The behavior is to refresh the Dataset & Pagination without requiring the user to create his own PostProcess every time */ createBackendApiInternalPostProcessCallback(gridOptions?: GridOption): void; bindDifferentHooks(grid: SlickGrid, gridOptions: GridOption, dataView: SlickDataView): void; bindBackendCallbackFunctions(gridOptions: GridOption): void; protected addBackendInfiniteScrollCallback(): void; bindResizeHook(grid: SlickGrid, options: GridOption): void; executeAfterDataviewCreated(gridOptions: GridOption): void; /** * On a Pagination changed, we will trigger a Grid State changed with the new pagination info * Also if we use Row Selection or the Checkbox Selector with a Backend Service (Odata, GraphQL), we need to reset any selection */ paginationChanged(pagination: PaginationMetadata): void; /** * When dataset changes, we need to refresh the entire grid UI & possibly resize it as well * @param dataset */ refreshGridData(dataset: TData[], totalCount?: number): void; /** * Dynamically change or update the column definitions list. * We will re-render the grid so that the new header and data shows up correctly. * If using translater, we also need to trigger a re-translate of the column headers */ updateColumnDefinitionsList(newColumns: Column[]): void; /** * Show the filter row displayed on first row, we can optionally pass false to hide it. * @param showing */ showHeaderRow(showing?: boolean): boolean; setData(data: TData[], shouldAutosizeColumns?: boolean): void; /** * Check if there's any Pagination Presets defined in the Grid Options, * if there are then load them in the paginationOptions object */ protected setPaginationOptionsWhenPresetDefined(gridOptions: GridOption, paginationOptions: Pagination): Pagination; setDarkMode(dark?: boolean): void; /** * Loop through all column definitions and copy the original optional `width` properties optionally provided by the user. * We will use this when doing a resize by cell content, if user provided a `width` it won't override it. */ protected copyColumnWidthsReference(columns: Column[]): void; protected displayEmptyDataWarning(showWarning?: boolean): void; /** When data changes in the DataView, we'll refresh the metrics and/or display a warning if the dataset is empty */ protected handleOnItemCountChanged(currentPageRowItemCount: number, totalItemCount: number): void; /** Initialize the Pagination Service once */ protected initializePaginationService(paginationOptions: Pagination): void; /** handler for when column definitions changes */ protected columnDefinitionsChanged(columns?: Column[]): void; /** * assignment changes are not triggering on the column definitions, for that * we can use our internal array observer for any changes done via (push, pop, shift, ...) */ protected observeColumnDefinitions(): void; /** * Render (or dispose) the Pagination Component, user can optionally provide False (to not show it) which will in term dispose of the Pagination, * also while disposing we can choose to omit the disposable of the Pagination Service (if we are simply toggling the Pagination, we want to keep the Service alive) * @param {Boolean} showPagination - show (new render) or not (dispose) the Pagination * @param {Boolean} shouldDisposePaginationService - when disposing the Pagination, do we also want to dispose of the Pagination Service? (defaults to True) */ protected renderPagination(showPagination?: boolean): void; /** Load any possible Columns Grid Presets */ protected loadColumnPresetsWhenDatasetInitialized(): void; /** Load any possible Filters Grid Presets */ protected loadFilterPresetsWhenDatasetInitialized(): void; /** * local grid, check if we need to show the Pagination * if so then also check if there's any presets and finally initialize the PaginationService * a local grid with Pagination presets will potentially have a different total of items, we'll need to get it from the DataView and update our total */ protected loadLocalGridPagination(dataset?: TData[]): void; /** Load any Row Selections into the DataView that were presets by the user */ protected loadRowSelectionPresetWhenExists(): void; /** Add a register a new external resource, user could also optional dispose all previous resources before pushing any new resources to the resources array list. */ registerExternalResources(resources: ExternalResource[], disposePreviousResources?: boolean): void; resetExternalResources(): void; /** Pre-Register any Resource that don't require SlickGrid to be instantiated (for example RxJS Resource) */ protected preRegisterResources(): void; /** initialized & auto-enable external registered resources, e.g. if user registers `ExcelExportService` then let's auto-enable `enableExcelExport:true` */ protected autoEnableInitializedResources(resource: ExternalResource | ExternalResourceConstructor): void; protected initializeExternalResources(resources: Array): void; protected registerResources(): void; /** Register the RxJS Resource in all necessary services which uses */ protected registerRxJsResource(resource: RxJsFacade): void; /** * Takes a flat dataset with parent/child relationship, sort it (via its tree structure) and return the sorted flat array * @returns {Array} sort flat parent/child dataset */ protected sortTreeDataset(flatDatasetInput: U[], forceGridRefresh?: boolean): U[]; protected suggestDateParsingWhenHelpful(): void; } //# sourceMappingURL=slick-vanilla-grid-bundle.d.ts.map