@scvzerng/element-ui-ag-grid-vue2 0.0.20 → 0.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/ElementPlusAgGrid.es.js +8771 -9179
  2. package/dist/ElementPlusAgGrid.umd.js +24 -24
  3. package/dist/style.css +1 -1
  4. package/dist/types/Grid.vue.d.ts +708 -705
  5. package/dist/types/ag-grid/options/ag-grid-menu-options.d.ts +1 -1
  6. package/dist/types/ag-grid-vue/components/AgGridVue.vue.d.ts +29 -29
  7. package/dist/types/ag-grid-vue/components/utils.d.ts +1 -1
  8. package/dist/types/index.d.ts +5 -5
  9. package/dist/types/render/CellRenderer.vue.d.ts +1 -1
  10. package/dist/types/renders.d.ts +1 -1
  11. package/dist/types/toolbar/features/use-columns-setting.d.ts +1 -1
  12. package/dist/types/use-footer.d.ts +7 -6
  13. package/dist/types/use-grid-state.d.ts +2 -2
  14. package/dist/types/use-grid.d.ts +155 -115
  15. package/dist/types/use-proxy.d.ts +10 -11
  16. package/package.json +3 -1
  17. package/dist/types/GridDataCache.d.ts +0 -52
  18. package/dist/types/GridDataSource.d.ts +0 -39
  19. package/dist/types/PageGetRowsParams.d.ts +0 -32
  20. package/dist/types/ag-grid/options/ag-grid-options-clean.d.ts +0 -2
  21. package/dist/types/ag-grid/options/ag-grid-options.d.ts +0 -10
  22. package/dist/types/clientSideRowModel/abstractClientSideNodeManager.d.ts +0 -50
  23. package/dist/types/clientSideRowModel/changedRowNodes.d.ts +0 -12
  24. package/dist/types/clientSideRowModel/clientSideNodeManager.d.ts +0 -5
  25. package/dist/types/clientSideRowModel/clientSideRowModel.d.ts +0 -129
  26. package/dist/types/clientSideRowModel/clientSideRowModelApi.d.ts +0 -12
  27. package/dist/types/clientSideRowModel/clientSideRowModelModule.d.ts +0 -9
  28. package/dist/types/clientSideRowModel/filterStage.d.ts +0 -14
  29. package/dist/types/clientSideRowModel/sortStage.d.ts +0 -10
  30. package/dist/types/model/row/ActualRow.d.ts +0 -79
  31. package/dist/types/model/row/CellValue.d.ts +0 -37
  32. package/dist/types/model/row/EditableRow.d.ts +0 -53
  33. package/dist/types/model/row/GridRow.d.ts +0 -36
  34. package/dist/types/model/row/ProjectionRow.d.ts +0 -50
  35. package/dist/types/model/row/SpanInfo.d.ts +0 -25
  36. package/dist/types/selection/baseSelectionService.d.ts +0 -45
  37. package/dist/types/selection/checkboxSelectionComponent.d.ts +0 -24
  38. package/dist/types/selection/rowRangeSelectionContext.d.ts +0 -54
  39. package/dist/types/selection/rowSelectionApi.d.ts +0 -18
  40. package/dist/types/selection/rowSelectionModule.d.ts +0 -9
  41. package/dist/types/selection/selectAllFeature.d.ts +0 -28
  42. package/dist/types/selection/selectionColService.d.ts +0 -38
  43. package/dist/types/selection/selectionService.d.ts +0 -73
  44. package/dist/types/selection/utils.d.ts +0 -12
  45. package/dist/types/tokens.d.ts +0 -22
  46. package/dist/types/use-grid-scroll.d.ts +0 -10
  47. package/dist/types/use-sort.d.ts +0 -4
  48. package/dist/types/utils/GridUtils.d.ts +0 -4
  49. package/dist/types/version.d.ts +0 -1
  50. /package/dist/{favicon.ico → public/favicon.ico} +0 -0
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@scvzerng/element-ui-ag-grid-vue2",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "scripts": {
7
7
  "dev": "vite",
8
8
  "build": "vite build && vue-tsc --declaration --emitDeclarationOnly",
9
+ "typecheck": "vue-tsc --noEmit --declaration",
9
10
  "lint:oxlint": "oxlint . --fix -D correctness --ignore-path .gitignore",
10
11
  "lint": "run-s lint:*",
11
12
  "format": "prettier --write src/"
@@ -31,6 +32,7 @@
31
32
  "md5": "2.3.0"
32
33
  },
33
34
  "dependencies": {
35
+ "@scvzerng/ag-grid-core": "workspace:*",
34
36
  "@scvzerng/vue2-context-menu": "1.5.3",
35
37
  "ag-grid-community": "34.1.1"
36
38
  },
@@ -1,52 +0,0 @@
1
- import { GridApi } from 'ag-grid-community';
2
- import { RowIdMapper } from './index';
3
- import { ActualRow } from './model/row/ActualRow';
4
- import { GridRow } from './model/row/GridRow';
5
- import { EditableRow } from './model/row/EditableRow';
6
- /**
7
- * 表格数据源
8
- */
9
- export declare class GridDataCache<T> {
10
- /**
11
- * 原始数据行
12
- * @private
13
- */
14
- private rows;
15
- /**
16
- * 第几页
17
- */
18
- pageNum: number;
19
- /**
20
- * 每页数量
21
- */
22
- pageSize: number;
23
- /**
24
- * 数据是否已经全部加载完毕
25
- */
26
- isFinished: boolean;
27
- /**
28
- * 草稿数据 用于存储进入编辑模式时尚未提交的数据
29
- * 比如编辑中的变更数据和新插入的临时数据
30
- * @private
31
- */
32
- private readonly idMapper;
33
- gridApi: GridApi<GridRow<T>>;
34
- constructor(idMapper: RowIdMapper<T>);
35
- createRow(data: T): ActualRow<T>;
36
- setRows(rows: (ActualRow<T> | EditableRow<T>)[]): this;
37
- replace(row: ActualRow<T> | EditableRow<T>): void;
38
- remove(row: (ActualRow<T> | EditableRow<T>)[]): void;
39
- getRows(): (ActualRow<T> | EditableRow<T>)[];
40
- appendRows(rows: ActualRow<T>[]): void;
41
- /**
42
- * 插入数据
43
- * @param rows
44
- * @param index
45
- */
46
- insertRows(rows: (ActualRow<T> | EditableRow<T>)[], index?: number): void;
47
- /**
48
- * 删除数据
49
- * @param rows
50
- */
51
- deleteRows(rows: GridRow<T>[] | string[]): void;
52
- }
@@ -1,39 +0,0 @@
1
- import type { GridApi, IDatasource, IGetRowsParams, SortDirection, SortModelItem } from 'ag-grid-community';
2
- import type { GridDataCache } from './GridDataCache';
3
- import { ProjectionRow } from './model/row/ProjectionRow';
4
- export type DataGetter<T> = T[] | ((params: PageFetchParams) => Promise<T[]>) | ((params: PageFetchParams) => T[]);
5
- export type PageFetchParams = {
6
- pageNum: number;
7
- pageSize: number;
8
- } & FetchParams;
9
- export type FetchParams = {
10
- startRow: number;
11
- endRow: number;
12
- sorts: SortModelItem[];
13
- params: any;
14
- };
15
- export type SortModel = {
16
- field: string;
17
- direction: SortDirection;
18
- };
19
- export declare class GridDataSource<T> implements IDatasource {
20
- /**
21
- * 是否正在加载中
22
- * @private
23
- */
24
- private loading;
25
- private readonly dataGetter;
26
- private cache;
27
- private _api?;
28
- private loadingDelay;
29
- constructor(dataGetter: DataGetter<T>, cache: GridDataCache<T>);
30
- set api(value: GridApi<ProjectionRow<T>>);
31
- get api(): GridApi<ProjectionRow<T>>;
32
- destroy(): void;
33
- loadData(): void;
34
- private getSorts;
35
- getRows(params: IGetRowsParams & {
36
- pageNum: number;
37
- pageSize: number;
38
- }): void;
39
- }
@@ -1,32 +0,0 @@
1
- import type { GridDataCache } from './GridDataCache';
2
- import type { IGetRowsParams, SortModelItem } from 'ag-grid-community';
3
- export declare class ServerGetRowsParamsRequest<T> implements IGetRowsParams {
4
- context: any;
5
- /**
6
- * 结束行
7
- */
8
- endRow: number;
9
- /**
10
- * 过滤条件
11
- */
12
- filterModel: any;
13
- /**
14
- * 排序条件
15
- */
16
- sortModel: SortModelItem[];
17
- /**
18
- * 起始行
19
- */
20
- startRow: number;
21
- /**
22
- * 数据源
23
- */
24
- dataCache: GridDataCache<T>;
25
- pageNum: number;
26
- pageSize: number;
27
- constructor(pageNum: number, pageSize: number, dataCache: GridDataCache<T>, sortModel?: SortModelItem[]);
28
- static from<T>(pageNum: number, pageSize: number | undefined, dataCache: GridDataCache<T>): ServerGetRowsParamsRequest<T>;
29
- static nextPage<T>(dataCache: GridDataCache<T>): ServerGetRowsParamsRequest<T>;
30
- failCallback(): void;
31
- successCallback(rowsThisBlock: T[]): void;
32
- }
@@ -1,2 +0,0 @@
1
- import { GridOptions } from 'ag-grid-community';
2
- export declare const CLEAN_AG_GRID_OPTIONS: GridOptions;
@@ -1,10 +0,0 @@
1
- import type { GridOptions, GetContextMenuItemsParams, RowSelectionOptions } from 'ag-grid-community';
2
- import { ContextMenuItem } from '../../index';
3
- /**
4
- * 受限的ag-grid-options 用于暴露对外的ag-grid 选项 因为使用的社区版 需要把部分企业版的选项去掉
5
- * 同时对于部分自定义模块替换商业模块的功能支持不是很足和实现不一致也需要覆盖和修改其类型
6
- */
7
- export type RestrictedAgGridOptions<TData> = Pick<GridOptions, 'onSelectionChanged' | 'getRowStyle' | 'getRowClass' | 'rowClass' | 'rowStyle' | 'rowClassRules' | 'onCellMouseOver' | 'onRowSelected' | 'onCellMouseOut'> & {
8
- getContextMenuItems?: (e: GetContextMenuItemsParams) => ContextMenuItem<TData>[];
9
- rowSelection?: RowSelectionOptions<TData>;
10
- };
@@ -1,50 +0,0 @@
1
- import { BeanStub, RowNode, IClientSideNodeManager, ClientSideNodeManagerUpdateRowDataResult } from 'ag-grid-community';
2
- import type { GetRowIdFunc, RowDataTransaction, IChangedRowNodes, RefreshModelParams } from 'ag-grid-community';
3
- /**
4
- * This is the type of any row in allLeafChildren and childrenAfterGroup of the ClientSideNodeManager rootNode.
5
- * ClientSideNodeManager is allowed to update the sourceRowIndex property of the nodes.
6
- */
7
- interface ClientSideNodeManagerRowNode<TData> extends RowNode<TData> {
8
- sourceRowIndex: number;
9
- }
10
- /**
11
- * This is the type of the root RowNode of the ClientSideNodeManager
12
- * ClientSideNodeManager is allowed to update the allLeafChildren and childrenAfterGroup properties of the root node.
13
- */
14
- interface ClientSideNodeManagerRootNode<TData> extends RowNode<TData> {
15
- sibling: ClientSideNodeManagerRootNode<TData>;
16
- allLeafChildren: ClientSideNodeManagerRowNode<TData>[] | null;
17
- childrenAfterGroup: ClientSideNodeManagerRowNode<TData>[] | null;
18
- }
19
- export declare namespace AbstractClientSideNodeManager {
20
- type RowNode<TData> = ClientSideNodeManagerRowNode<TData>;
21
- type RootNode<TData> = ClientSideNodeManagerRootNode<TData>;
22
- }
23
- export declare abstract class AbstractClientSideNodeManager<TData = any> extends BeanStub implements IClientSideNodeManager<TData> {
24
- private nextId;
25
- protected allNodesMap: {
26
- [id: string]: RowNode<TData>;
27
- };
28
- rootNode: AbstractClientSideNodeManager.RootNode<TData> | null;
29
- getRowNode(id: string): RowNode | undefined;
30
- extractRowData(): TData[] | null | undefined;
31
- activate(rootNode: ClientSideNodeManagerRootNode<TData>): void;
32
- deactivate(): void;
33
- destroy(): void;
34
- setNewRowData(rowData: TData[]): void;
35
- private updateRootSiblingArrays;
36
- protected loadNewRowData(rowData: TData[]): void;
37
- setImmutableRowData(params: RefreshModelParams<TData>, rowData: TData[]): void;
38
- /** Called when a node needs to be deleted */
39
- protected rowNodeDeleted(node: RowNode<TData>): void;
40
- updateRowData(rowDataTran: RowDataTransaction<TData>, changedRowNodes: IChangedRowNodes<TData>): ClientSideNodeManagerUpdateRowDataResult<TData>;
41
- protected executeAdd(rowDataTran: RowDataTransaction, result: ClientSideNodeManagerUpdateRowDataResult<TData>): void;
42
- protected executeRemove(getRowIdFunc: GetRowIdFunc<TData> | undefined, rowDataTran: RowDataTransaction, { changedRowNodes, rowNodeTransaction }: ClientSideNodeManagerUpdateRowDataResult<TData>, nodesToUnselect: RowNode<TData>[]): void;
43
- protected executeUpdate(getRowIdFunc: GetRowIdFunc<TData> | undefined, rowDataTran: RowDataTransaction, { changedRowNodes, rowNodeTransaction }: ClientSideNodeManagerUpdateRowDataResult<TData>, nodesToUnselect: RowNode<TData>[]): void;
44
- protected dispatchRowDataUpdateStartedEvent(rowData?: TData[] | null): void;
45
- protected deselectNodes(nodesToUnselect: RowNode<TData>[]): void;
46
- private sanitizeAddIndex;
47
- protected createRowNode(data: TData, sourceRowIndex: number): RowNode<TData>;
48
- protected lookupRowNode(getRowIdFunc: ((data: any) => string) | undefined, data: TData): RowNode<TData> | null;
49
- }
50
- export {};
@@ -1,12 +0,0 @@
1
- import type { RowNode, IRowNode } from 'ag-grid-community';
2
- export declare class ChangedRowNodes<TData = any> {
3
- readonly removals: Set<RowNode<TData>>;
4
- readonly updates: Set<RowNode<TData>>;
5
- readonly adds: Set<RowNode<TData>>;
6
- /** Marks a row as removed. Order of operations is: remove, update, add */
7
- remove(node: IRowNode<TData>): void;
8
- /** Marks a row as updated. Order of operations is: remove, update, add */
9
- update(node: IRowNode<TData>): void;
10
- /** Marks a row as added. Order of operation is: remove, update, add */
11
- add(node: IRowNode<TData>): void;
12
- }
@@ -1,5 +0,0 @@
1
- import type { NamedBean } from 'ag-grid-community';
2
- import { AbstractClientSideNodeManager } from './abstractClientSideNodeManager';
3
- export declare class ClientSideNodeManager<TData> extends AbstractClientSideNodeManager<TData> implements NamedBean {
4
- beanName: "csrmNodeSvc";
5
- }
@@ -1,129 +0,0 @@
1
- import { BeanStub, RowNode, IClientSideRowModel, RefreshModelParams, ChangedPath } from 'ag-grid-community';
2
- import type { NamedBean, BeanCollection, RowBounds, RowModelType, RowDataTransaction, RowNodeTransaction } from 'ag-grid-community';
3
- export declare class ClientSideRowModel extends BeanStub implements IClientSideRowModel, NamedBean {
4
- beanName: "rowModel";
5
- private colModel;
6
- private valueCache?;
7
- private filterStage?;
8
- private sortStage?;
9
- private flattenStage?;
10
- private groupStage?;
11
- private aggStage?;
12
- private pivotStage?;
13
- private filterAggStage?;
14
- wireBeans(beans: BeanCollection): void;
15
- rootNode: RowNode | null;
16
- private rowsToDisplay;
17
- private nodeManager;
18
- private rowDataTransactionBatch;
19
- /** Keep track if row data was updated. Important with suppressModelUpdateAfterUpdateTransaction and refreshModel api is called */
20
- private rowDataUpdatedPending;
21
- private applyAsyncTransactionsTimeout;
22
- /** Has the start method been called */
23
- private started;
24
- /**
25
- * This is to prevent refresh model being called when it's already being called.
26
- * E.g. the group stage can trigger initial state filter model to be applied. This fires onFilterChanged,
27
- * which then triggers the listener here that calls refresh model again but at the filter stage
28
- * (which is about to be run by the original call).
29
- */
30
- private isRefreshingModel;
31
- private rowNodesCountReady;
32
- private rowCountReady;
33
- private orderedStages;
34
- postConstruct(): void;
35
- private getNewNodeManager;
36
- private addPropertyListeners;
37
- start(): void;
38
- private setInitialData;
39
- ensureRowHeightsValid(startPixel: number, endPixel: number, startLimitIndex: number, endLimitIndex: number): boolean;
40
- private onPropChange;
41
- private setRowTopAndRowIndex;
42
- private clearRowTopAndRowIndex;
43
- isLastRowIndexKnown(): boolean;
44
- getRowCount(): number;
45
- /**
46
- * Returns the number of rows with level === 1
47
- */
48
- getTopLevelRowCount(): number;
49
- /**
50
- * Get the row display index by the top level index
51
- * top level index is the index of rows with level === 1
52
- */
53
- getTopLevelRowDisplayedIndex(topLevelIndex: number): number;
54
- /**
55
- * The opposite of `getTopLevelRowDisplayedIndex`
56
- */
57
- getTopLevelIndexFromDisplayedIndex(displayedIndex: number): number;
58
- getRowBounds(index: number): RowBounds | null;
59
- onRowGroupOpened(): void;
60
- private onFilterChanged;
61
- private onSortChanged;
62
- getType(): RowModelType;
63
- private onValueChanged;
64
- private createChangePath;
65
- private isSuppressModelUpdateAfterUpdateTransaction;
66
- refreshModel(params: RefreshModelParams): void;
67
- isEmpty(): boolean;
68
- isRowsToRender(): boolean;
69
- getNodesInRangeForSelection(firstInRange: RowNode, lastInRange: RowNode): RowNode[];
70
- getTopLevelNodes(): RowNode[] | null;
71
- getRow(index: number): RowNode;
72
- isRowPresent(rowNode: RowNode): boolean;
73
- getRowIndexAtPixel(pixelToMatch: number): number;
74
- private isRowInPixel;
75
- forEachLeafNode(callback: (node: RowNode, index: number) => void): void;
76
- forEachNode(callback: (node: RowNode, index: number) => void, includeFooterNodes?: boolean): void;
77
- forEachDisplayedNode(callback: (rowNode: RowNode<any>, index: number) => void): void;
78
- forEachNodeAfterFilter(callback: (node: RowNode, index: number) => void, includeFooterNodes?: boolean): void;
79
- forEachNodeAfterFilterAndSort(callback: (node: RowNode, index: number) => void, includeFooterNodes?: boolean): void;
80
- forEachPivotNode(callback: (node: RowNode, index: number) => void, includeFooterNodes?: boolean, afterSort?: boolean): void;
81
- /**
82
- * Iterate through each node and all of its children
83
- * @param callback the function to execute for each node
84
- * @param includeFooterNodes whether to also iterate over footer nodes
85
- * @param nodes the nodes to start iterating over
86
- * @param getChildren a function to determine the recursion strategy
87
- * @param startIndex the index to start from
88
- * @returns the index ended at
89
- */
90
- private depthFirstSearchRowNodes;
91
- doAggregate(changedPath?: ChangedPath): void;
92
- private doFilterAggregates;
93
- private doSort;
94
- private doRowGrouping;
95
- private doFilter;
96
- private doPivot;
97
- getRowNode(id: string): RowNode | undefined;
98
- batchUpdateRowData(rowDataTransaction: RowDataTransaction, callback?: (res: RowNodeTransaction) => void): void;
99
- flushAsyncTransactions(): void;
100
- private executeBatchUpdateRowData;
101
- /**
102
- * Used to apply transaction changes.
103
- * Called by gridApi & rowDragFeature
104
- */
105
- updateRowData(rowDataTran: RowDataTransaction): RowNodeTransaction | null;
106
- /**
107
- * Common to:
108
- * - executeBatchUpdateRowData (batch transactions)
109
- * - updateRowData (single transaction)
110
- * - setImmutableRowData (generated transaction)
111
- *
112
- * @param rowNodeTrans - the transactions to apply
113
- * @param orderChanged - whether the order of the rows has changed, either via generated transaction or user provided addIndex
114
- */
115
- private commitTransactions;
116
- private doRowsToDisplay;
117
- onRowHeightChanged(): void;
118
- resetRowHeights(): void;
119
- private resetRowHeightsForAllRowNodes;
120
- private onGridStylesChanges;
121
- private onGridReady;
122
- isRowDataLoaded(): boolean;
123
- destroy(): void;
124
- private onRowHeightChanged_debounced;
125
- /**
126
- * @deprecated v33.1
127
- */
128
- onRowHeightChangedDebounced(): void;
129
- }
@@ -1,12 +0,0 @@
1
- import type { BeanCollection, ClientSideRowModelStep, IRowNode, RowDataTransaction, RowNodeTransaction } from 'ag-grid-community';
2
- export declare function onGroupExpandedOrCollapsed(beans: BeanCollection): void;
3
- export declare function refreshClientSideRowModel(beans: BeanCollection, step?: ClientSideRowModelStep): void;
4
- export declare function isRowDataEmpty(beans: BeanCollection): boolean;
5
- export declare function forEachLeafNode<TData = any>(beans: BeanCollection, callback: (rowNode: IRowNode<TData>) => void): void;
6
- export declare function forEachNodeAfterFilter<TData = any>(beans: BeanCollection, callback: (rowNode: IRowNode<TData>, index: number) => void): void;
7
- export declare function forEachNodeAfterFilterAndSort<TData = any>(beans: BeanCollection, callback: (rowNode: IRowNode<TData>, index: number) => void): void;
8
- export declare function resetRowHeights(beans: BeanCollection): void;
9
- export declare function applyTransaction<TData = any>(beans: BeanCollection, rowDataTransaction: RowDataTransaction<TData>): RowNodeTransaction<TData> | null | undefined;
10
- export declare function applyTransactionAsync<TData = any>(beans: BeanCollection, rowDataTransaction: RowDataTransaction<TData>, callback?: (res: RowNodeTransaction<TData>) => void): void;
11
- export declare function flushAsyncTransactions(beans: BeanCollection): void;
12
- export declare function getBestCostNodeSelection<TData = any>(beans: BeanCollection): IRowNode<TData>[] | undefined;
@@ -1,9 +0,0 @@
1
- import type { _ClientSideRowModelGridApi, _ModuleWithApi, _ModuleWithoutApi } from 'ag-grid-community';
2
- /**
3
- * @feature Client-Side Row Model
4
- */
5
- export declare const ClientSideRowModelModule: _ModuleWithoutApi;
6
- /**
7
- * @feature Client-Side Row Model
8
- */
9
- export declare const ClientSideRowModelApiModule: _ModuleWithApi<_ClientSideRowModelGridApi<any>>;
@@ -1,14 +0,0 @@
1
- import type { NamedBean, BeanCollection, GridOptions, RowNode, IRowNodeStage, StageExecuteParams, ClientSideRowModelStage } from 'ag-grid-community';
2
- import { BeanStub } from 'ag-grid-community';
3
- export declare function updateRowNodeAfterFilter(rowNode: RowNode): void;
4
- export declare class FilterStage extends BeanStub implements IRowNodeStage, NamedBean {
5
- beanName: "filterStage";
6
- refreshProps: Set<keyof GridOptions<any>>;
7
- step: ClientSideRowModelStage;
8
- private filterManager?;
9
- wireBeans(beans: BeanCollection): void;
10
- execute(params: StageExecuteParams): void;
11
- private filter;
12
- private filterNodes;
13
- private doingTreeDataFiltering;
14
- }
@@ -1,10 +0,0 @@
1
- import { BeanStub } from 'ag-grid-community';
2
- import type { NamedBean, GridOptions, RowNode, ClientSideRowModelStage, IRowNodeStage, StageExecuteParams } from 'ag-grid-community';
3
- export declare function updateRowNodeAfterSort(rowNode: RowNode): void;
4
- export declare class SortStage extends BeanStub implements NamedBean, IRowNodeStage {
5
- beanName: "sortStage";
6
- refreshProps: Set<keyof GridOptions<any>>;
7
- step: ClientSideRowModelStage;
8
- execute(params: StageExecuteParams): void;
9
- private sort;
10
- }
@@ -1,79 +0,0 @@
1
- import { CellValue } from './CellValue';
2
- import { Column, GridApi, IRowNode } from 'ag-grid-community';
3
- import { RowSpans } from './SpanInfo';
4
- import { ProjectionRow } from './ProjectionRow';
5
- import { GridRow } from './GridRow';
6
- import { EditableRow } from './EditableRow';
7
- import { RowIdMapper } from '../../index';
8
- import { GridDataCache } from '../../GridDataCache';
9
- /**
10
- * 实际行
11
- */
12
- export declare class ActualRow<T> implements GridRow<T> {
13
- /**
14
- * 唯一编号
15
- */
16
- id: string;
17
- /**
18
- * 数据
19
- */
20
- data: T;
21
- /**
22
- * 可以进行路径访问的单元格映射
23
- */
24
- pathCells: Map<string, CellValue | CellValue[]>;
25
- /**
26
- * 签名
27
- */
28
- signature: string;
29
- /**
30
- * 每行的最后一个单元格
31
- */
32
- leafCells: CellValue[];
33
- /**
34
- * 合并行信息
35
- */
36
- spanCache: RowSpans;
37
- gridApi: GridApi<GridRow<T>>;
38
- idMapper: RowIdMapper<T>;
39
- dataCache: GridDataCache<T>;
40
- /**
41
- * 当前数据在列表中的索引
42
- */
43
- index?: number;
44
- constructor(data: T, gridApi: GridApi<GridRow<T>>, idMapper: RowIdMapper<T>, dataCache: GridDataCache<T>, index?: number);
45
- delete(): void;
46
- redraw(): void;
47
- getDataIndex(): number;
48
- getRowSpans(): RowSpans;
49
- getSignature(): string;
50
- startEditing(redraw?: boolean): EditableRow<T>;
51
- /**
52
- * 设置数据当前在集合的位置
53
- * 在设置表格数据时每次自行更新不可外部手动调用
54
- * @param index
55
- */
56
- __setIndex(index: number): void;
57
- /**
58
- * 更新数据
59
- * @param id
60
- * @param data
61
- */
62
- update(id: string, data: T): void;
63
- isProjection(): this is ProjectionRow<T>;
64
- isTransient(): this is EditableRow<T>;
65
- getId(): string;
66
- isEditing(): this is EditableRow<T>;
67
- getData(): T;
68
- scrollIntoView(): void;
69
- buildSpan(): void;
70
- /**
71
- * 把嵌套的数组结构扁平化以便表格渲染对应的行数
72
- */
73
- flat(): ProjectionRow<T>[];
74
- private getLeafCells;
75
- getCell(column: Column, nestingIndexes: number[]): CellValue | undefined;
76
- getValue(column: Column, nestingIndexes: number[]): any;
77
- setData(data: T): void;
78
- match(rowNode: IRowNode<GridRow<T>>): boolean;
79
- }
@@ -1,37 +0,0 @@
1
- import { Column } from 'ag-grid-community';
2
- export declare class CellValue {
3
- id: string;
4
- /**
5
- * 值从哪个字段提取的
6
- */
7
- field: string;
8
- /**
9
- * 属性值
10
- */
11
- value: any;
12
- index?: number;
13
- /**
14
- * 复杂标的值对象,只有在提取的值不是一个单元格可渲染的简单值时才会存在 否则应该为空
15
- */
16
- properties: Map<string, CellValue | CellValue[]>;
17
- parent?: CellValue;
18
- /**
19
- * 合并单元格行数
20
- */
21
- spanRow: number;
22
- path: string;
23
- constructor(id: string, field: string, value: any, index?: number, parent?: CellValue);
24
- getRoot(): CellValue | undefined;
25
- pretreatmentValue(field: string, parent: CellValue, column: Column): CellValue | CellValue[];
26
- /**
27
- * 只要子路径包含数组元素就需要合并行
28
- * @private
29
- */
30
- private isNeedSpan;
31
- get(field: string): CellValue | CellValue[] | undefined;
32
- calcSpan(): number;
33
- private setRowSpan;
34
- getPath(): string;
35
- getReadPath(): string;
36
- isArrayElement(): boolean;
37
- }
@@ -1,53 +0,0 @@
1
- import { ActualRow } from './ActualRow';
2
- import { UnwrapNestedRefs } from 'vue';
3
- import { GridRow } from './GridRow';
4
- import { Column, IRowNode } from 'ag-grid-community';
5
- import { RowIdMapper } from '../../index';
6
- import { ProjectionRow } from './ProjectionRow';
7
- /**
8
- * 可编辑行
9
- */
10
- export declare class EditableRow<T = any> implements GridRow<T> {
11
- private actualRow;
12
- private draft?;
13
- private transient;
14
- private readonly idMapper;
15
- constructor(actualRow: ActualRow<T>, idMapper: RowIdMapper<T>, transient?: boolean);
16
- delete(): void;
17
- redraw(): void;
18
- getDataIndex(): number;
19
- getSignature(): string;
20
- getValue(column: Column, nestingIndexes: number[]): string | boolean | number;
21
- getData(): T;
22
- isProjection(): this is ProjectionRow<T>;
23
- isTransient(): this is EditableRow<T>;
24
- getCell(column: Column, nestingIndexes: number[]): import("./CellValue").CellValue | undefined;
25
- __setIndex(index: number): void;
26
- /**
27
- * 结束编辑
28
- */
29
- stopEditing(redraw?: boolean): ActualRow<T>;
30
- /**
31
- * 编辑中
32
- */
33
- isEditing(): this is EditableRow<T>;
34
- /**
35
- * 获取编辑草稿信息
36
- */
37
- getDraft(): UnwrapNestedRefs<T> | undefined;
38
- getId(): string;
39
- flat(): ProjectionRow<T>[];
40
- /**
41
- * 持久化数据 让数据从瞬态转为持久态
42
- *
43
- * 不改变当前的编辑状态
44
- *
45
- * @param persistentCallback
46
- */
47
- persistent(persistentCallback: (row: T) => Promise<T>): Promise<this>;
48
- scrollIntoView(): void;
49
- getRowSpans(): import("./SpanInfo").RowSpans;
50
- setData(data: T): void;
51
- buildSpan(): void;
52
- match(rowNode: IRowNode<GridRow<T>>): boolean;
53
- }
@@ -1,36 +0,0 @@
1
- import { Column, IRowNode } from 'ag-grid-community';
2
- import { ActualRow } from './ActualRow';
3
- import { ProjectionRow } from './ProjectionRow';
4
- import { EditableRow } from './EditableRow';
5
- import { CellValue } from './CellValue';
6
- import { RowSpans } from './SpanInfo';
7
- export interface GridRow<T> {
8
- getValue(column: Column, nestingIndexes?: number[]): string | boolean | number;
9
- isEditing(): this is EditableRow<T>;
10
- getData(): T;
11
- getId(): string;
12
- isTransient(): this is EditableRow<T>;
13
- isProjection(): this is ProjectionRow<T>;
14
- getCell(column: Column, nestingIndexes?: number[]): CellValue | undefined;
15
- getSignature(): string;
16
- getRowSpans(): RowSpans;
17
- setData(data: T): void;
18
- /**
19
- * 构建行span信息
20
- */
21
- buildSpan(): void;
22
- /**
23
- * 滚动行到可视区域
24
- */
25
- scrollIntoView(): void;
26
- /**
27
- * 是否匹配
28
- * @param rowNode
29
- */
30
- match(rowNode: IRowNode<GridRow<T>>): boolean;
31
- getDataIndex(): number;
32
- redraw(): void;
33
- delete(): void;
34
- }
35
- export declare const isGridRow: <T>(row: any) => row is GridRow<T>;
36
- export declare const isActualRow: <T extends object>(row: any) => row is ActualRow<T>;