import React from 'react'; import type { ArrayField } from '@formily/core'; import type { GridApi, IRowNode, SelectionChangedEvent } from 'ag-grid-community'; import type { ArrayTableProps, ObservableColumnSource } from './interface'; /** 标准删除控件在行内的字段路径与静态约束。@author nokecy */ export type RemovalAction = { path: string[]; schemas: any[]; column: ObservableColumnSource; }; /** 收集标准删除入口,保留列级显隐约束,不把其他业务按钮当成删除。@author nokecy */ export declare function collectRemovalActions(sources: ObservableColumnSource[]): RemovalAction[]; /** * 与行内删除共用字段的运行时权限;未挂载的普通行采用静态规则。 * 含动态权限且尚未求值的行保持不可删除,避免绕过业务禁用条件。@author nokecy */ export declare function findRemovalAction(field: ArrayField, index: number, actions: RemovalAction[]): RemovalAction | undefined; /** * 把选择时的稳定行标识转换为当前表单索引;确认前全部复核,倒序删除保持数组地址正确。 * 返回 false 表示所选行已删除或变为不可删除,整个批次不执行。@author nokecy */ export declare function removeSelectedRows(field: ArrayField, ids: string[], actions: RemovalAction[], getId: (row: any) => string, onRemove?: (index: number) => void, event?: React.MouseEvent): boolean; /** 公共明细表格的勾选及批量删除,沿用业务行权限、行标识与删除通知。@author nokecy */ export declare function useArrayTableBatchRemove(field: ArrayField, sources: ObservableColumnSource[], props: ArrayTableProps, apiRef: React.MutableRefObject, getId: (row: any) => string): { rowSelection: "multiple" | "single" | import("ag-grid-community/dist/types/src/entities/gridOptions").SingleRowSelectionOptions | import("ag-grid-community/dist/types/src/entities/gridOptions").MultiRowSelectionOptions | { isRowSelectable: (node: IRowNode) => boolean; headerCheckbox?: boolean | undefined; selectAll?: "filtered" | undefined; mode: "singleRow" | "multiRow"; checkboxes: boolean; enableClickSelection: boolean; } | undefined; selectionColumnDef: import("ag-grid-community").SelectionColumnDef | undefined; onSelectionChanged: (event: SelectionChangedEvent) => void; toolbar: React.JSX.Element; };