rj-grid 0.1.0
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.
- package/LICENSE +201 -0
- package/README.md +92 -0
- package/dist/rj-grid.js +14074 -0
- package/dist/style.css +2050 -0
- package/dist/types/index.d.ts +13 -0
- package/dist/types/src/RjAdvGroup.vue.d.ts +32 -0
- package/dist/types/src/RjAdvancedFilterDialog.vue.d.ts +38 -0
- package/dist/types/src/RjCell.vue.d.ts +82 -0
- package/dist/types/src/RjChartDialog.vue.d.ts +22 -0
- package/dist/types/src/RjColumnMenu.vue.d.ts +109 -0
- package/dist/types/src/RjConfirmDialog.vue.d.ts +23 -0
- package/dist/types/src/RjContextMenu.vue.d.ts +26 -0
- package/dist/types/src/RjEditor.vue.d.ts +28 -0
- package/dist/types/src/RjFilterMenu.vue.d.ts +58 -0
- package/dist/types/src/RjGrid.vue.d.ts +1046 -0
- package/dist/types/src/RjHeader.vue.d.ts +80 -0
- package/dist/types/src/RjImgList.vue.d.ts +29 -0
- package/dist/types/src/RjPager.vue.d.ts +41 -0
- package/dist/types/src/RjQueryBar.vue.d.ts +47 -0
- package/dist/types/src/RjRowFormDialog.vue.d.ts +50 -0
- package/dist/types/src/RjSlotRender.d.ts +56 -0
- package/dist/types/src/RjSparkline.vue.d.ts +43 -0
- package/dist/types/src/RjToolPanel.vue.d.ts +103 -0
- package/dist/types/src/RjViewManager.vue.d.ts +28 -0
- package/dist/types/src/editHistory.d.ts +27 -0
- package/dist/types/src/export.d.ts +24 -0
- package/dist/types/src/expression.d.ts +19 -0
- package/dist/types/src/filtering.d.ts +29 -0
- package/dist/types/src/formula.d.ts +88 -0
- package/dist/types/src/icons.d.ts +35 -0
- package/dist/types/src/locale.d.ts +21 -0
- package/dist/types/src/nlq.d.ts +51 -0
- package/dist/types/src/print.d.ts +37 -0
- package/dist/types/src/query.d.ts +28 -0
- package/dist/types/src/rowForm.d.ts +41 -0
- package/dist/types/src/serverGroups.d.ts +52 -0
- package/dist/types/src/ssrm.d.ts +102 -0
- package/dist/types/src/theme.d.ts +33 -0
- package/dist/types/src/types.d.ts +624 -0
- package/dist/types/src/useColumnState.d.ts +70 -0
- package/dist/types/src/useInteraction.d.ts +150 -0
- package/dist/types/src/useQueryViews.d.ts +16 -0
- package/dist/types/src/useRowModel.d.ts +225 -0
- package/dist/types/src/utils.d.ts +130 -0
- package/package.json +90 -0
|
@@ -0,0 +1,1046 @@
|
|
|
1
|
+
import './styles/rj-grid.scss';
|
|
2
|
+
import type { RjCellParams, RjColumn, RjDataMode, RjExportScopeResolved, RjFilterModel, RjGridState, RjLoadServerParams, RjMenuItem, RjPrintParams, RjRowData, RjServerExportParams, RjSortState, RjTransaction, RjQueryAction, RjQueryFieldDef, RjRowFormConfig, RjSavedView } from './types';
|
|
3
|
+
import { type RjDisplayRow } from './useRowModel';
|
|
4
|
+
import { type RjThemeParams } from './theme';
|
|
5
|
+
import { type RjMessages } from './locale';
|
|
6
|
+
import { type RjNlqResult } from './nlq';
|
|
7
|
+
import type { AdvFilterGroup } from './filtering';
|
|
8
|
+
type RjEventListener = (event: any) => void;
|
|
9
|
+
declare function addEventListener(type: string, cb: RjEventListener): () => void;
|
|
10
|
+
declare function removeEventListener(type: string, cb: RjEventListener): void;
|
|
11
|
+
/** 向总线派发事件;单个监听器抛错不影响其它监听器与表格本身 */
|
|
12
|
+
declare function dispatchEvent(type: string, payload?: any): void;
|
|
13
|
+
/** 打开内置行编辑弹窗:字段由当前叶子列生成,缺省作用于选中行(rowForm=false 时为空操作) */
|
|
14
|
+
declare function openRowForm(rows?: RjRowData[]): void;
|
|
15
|
+
/** 打开内置新增弹窗:空白表单(preset 可预置默认值),字段准入优先走 addColumns 钩子 */
|
|
16
|
+
declare function openRowFormAdd(preset?: RjRowData): void;
|
|
17
|
+
declare function getState(): RjGridState;
|
|
18
|
+
declare function setState(s: RjGridState): void;
|
|
19
|
+
declare function scrollTo(rowIndex: number, colId?: string): void;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
21
|
+
columns: RjColumn<RjRowData>[];
|
|
22
|
+
rows?: RjRowData[] | undefined;
|
|
23
|
+
rowKey?: string | undefined;
|
|
24
|
+
height?: string | number | undefined;
|
|
25
|
+
loading?: boolean | undefined;
|
|
26
|
+
theme?: RjThemeParams | "light" | "dark" | undefined;
|
|
27
|
+
density?: "small" | "medium" | "large" | undefined;
|
|
28
|
+
/** 语言:'zh' | 'en' | 区域标识(内部归一),默认中文 */
|
|
29
|
+
lang?: string | undefined;
|
|
30
|
+
/** 局部文案覆盖(对标 AG Grid localeText):按 key 覆盖内置目录 */
|
|
31
|
+
localeText?: RjMessages | undefined;
|
|
32
|
+
showToolbar?: boolean | undefined;
|
|
33
|
+
quickFilterEnabled?: boolean | undefined;
|
|
34
|
+
/** 表头下方浮动筛选行(每列即时输入) */
|
|
35
|
+
floatingFilters?: boolean | undefined;
|
|
36
|
+
/** 分组页脚行:每个展开分组底部显示聚合汇总 */
|
|
37
|
+
groupFooter?: boolean | undefined;
|
|
38
|
+
/** 服务端权威分组(仅非 client 模式生效):分组定义下推后端,客户端不重建组树 */
|
|
39
|
+
serverSideGrouping?: boolean | undefined;
|
|
40
|
+
/** 分组显示模式:singleColumn=单列聚合(各级合并到一列、缩进显示完整路径);multipleColumns=各级各占一列 */
|
|
41
|
+
groupDisplayType?: "singleColumn" | "multipleColumns" | undefined;
|
|
42
|
+
/** 分组行复选框:选中组=级联选中其下所有数据行,组行本身不计入 selectedRows(AG Grid groupSelectsChildren) */
|
|
43
|
+
groupSelectsChildren?: boolean | undefined;
|
|
44
|
+
toolPanel?: boolean | undefined;
|
|
45
|
+
groupable?: boolean | undefined;
|
|
46
|
+
showGroupPanel?: boolean | undefined;
|
|
47
|
+
chartable?: boolean | undefined;
|
|
48
|
+
exportable?: boolean | undefined;
|
|
49
|
+
colReorder?: boolean | undefined;
|
|
50
|
+
resizable?: boolean | undefined;
|
|
51
|
+
rowSelection?: false | "multiple" | "single" | undefined;
|
|
52
|
+
keepSelectionCrossPage?: boolean | undefined;
|
|
53
|
+
editable?: boolean | undefined;
|
|
54
|
+
rangeSelection?: boolean | undefined;
|
|
55
|
+
clipboard?: boolean | undefined;
|
|
56
|
+
contextMenu?: boolean | ((ctx: any) => RjMenuItem[]) | undefined;
|
|
57
|
+
rowDraggable?: boolean | undefined;
|
|
58
|
+
stateKey?: string | undefined;
|
|
59
|
+
dataMode?: RjDataMode | undefined;
|
|
60
|
+
loadData?: ((p: RjLoadServerParams) => Promise<{
|
|
61
|
+
list?: any[] | undefined;
|
|
62
|
+
rows?: any[] | undefined;
|
|
63
|
+
total: number;
|
|
64
|
+
}>) | undefined;
|
|
65
|
+
pageSize?: number | undefined;
|
|
66
|
+
/** 分页键显示位置(仅服务端分页模式 dataMode='pagination'+loadData 时出现):top 工具条右上(与查询同行,查询后即翻页)/ bottom 底栏功能键块左侧 / both 两处 */
|
|
67
|
+
pagerPosition?: "top" | "bottom" | "both" | undefined;
|
|
68
|
+
/** SSRM:块大小(serverSide 模式) */
|
|
69
|
+
ssrmBlockSize?: number | undefined;
|
|
70
|
+
/** SSRM:缓存中最多保留的已加载块数(0=不限) */
|
|
71
|
+
ssrmMaxBlocksInCache?: number | undefined;
|
|
72
|
+
/** SSRM:视口外额外保留块数 */
|
|
73
|
+
ssrmCacheOverflow?: number | undefined;
|
|
74
|
+
/** SSRM:判断某行是否为可展开的服务端分组 */
|
|
75
|
+
isServerSideGroup?: ((data: any) => boolean) | undefined;
|
|
76
|
+
treeData?: boolean | undefined;
|
|
77
|
+
childrenField?: string | undefined;
|
|
78
|
+
parentField?: string | undefined;
|
|
79
|
+
defaultExpandAll?: boolean | undefined;
|
|
80
|
+
showSummary?: boolean | undefined;
|
|
81
|
+
pinnedTopRows?: RjRowData[] | undefined;
|
|
82
|
+
pinnedBottomRows?: RjRowData[] | undefined;
|
|
83
|
+
fullWidthRow?: ((row: RjRowData) => boolean) | undefined;
|
|
84
|
+
detailHeight?: number | undefined;
|
|
85
|
+
fullWidthHeight?: number | undefined;
|
|
86
|
+
getRowClass?: ((params: {
|
|
87
|
+
row: RjRowData;
|
|
88
|
+
rowIndex: number;
|
|
89
|
+
}) => string) | undefined;
|
|
90
|
+
suppressVirtualCols?: boolean | undefined;
|
|
91
|
+
/** 导出/打印的默认数据范围(缺 auto:有选中就导选中);工具栏菜单里可逐次改选 */
|
|
92
|
+
exportRange?: "auto" | RjExportScopeResolved | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* 后端导出回调(按查询条件出全量数据):传了才在导出菜单里出现「后端导出」项。
|
|
95
|
+
* 组件不直接跟后端打交道,只把生效列 + 当前查询状态 + 分页快照 + 选中 key 透出去。
|
|
96
|
+
*/
|
|
97
|
+
serverExport?: ((params: RjServerExportParams) => void | Promise<void>) | undefined;
|
|
98
|
+
exportFileName?: string | undefined;
|
|
99
|
+
/** 导出取值口径:默认导出「所见即所得」的格式化文本(与屏幕一致、单文件内口径统一);
|
|
100
|
+
* 置 true 则导出原始类型值,让 Excel 里数字仍是数字(对齐 AG Grid useCellValuesForExports) */
|
|
101
|
+
exportRawValues?: boolean | undefined;
|
|
102
|
+
/** 底部状态栏:显示行数/选区/区域聚合(求和/平均/计数/最小/最大) */
|
|
103
|
+
statusBar?: boolean | undefined;
|
|
104
|
+
/** 状态栏参与的聚合项(仅对含数值的选区列生效) */
|
|
105
|
+
statusAggregations?: ("sum" | "avg" | "min" | "max" | "count")[] | undefined;
|
|
106
|
+
/** 无障碍:网格的 aria-label */
|
|
107
|
+
ariaLabel?: string | undefined;
|
|
108
|
+
/** 开启编辑撤销/重做(Ctrl+Z / Ctrl+Y),对标 AG Grid undoRedoCellEditing */
|
|
109
|
+
undoRedoCellEditing?: boolean | undefined;
|
|
110
|
+
/** 撤销历史步数上限,默认 50 */
|
|
111
|
+
undoRedoCellEditingLimit?: number | undefined;
|
|
112
|
+
/** 复制时附带列标题行(对标 copyHeadersToClipboard) */
|
|
113
|
+
copyHeadersToClipboard?: boolean | undefined;
|
|
114
|
+
/** 粘贴前对剪贴板文本的转换钩子(对标 pasteTransformer) */
|
|
115
|
+
pasteTransformer?: ((text: string) => string) | undefined;
|
|
116
|
+
/** 脏格标记:编辑后与初始值不一致的单元格标脏,供保存工作流(对标 AG Grid dirty cells) */
|
|
117
|
+
markDirtyCells?: boolean | undefined;
|
|
118
|
+
/** 鼠标悬停行高亮跟随(斑马纹之上的动态层),默认开启 */
|
|
119
|
+
rowHover?: boolean | undefined;
|
|
120
|
+
/** 图标覆盖(对标 AG Grid gridOptions.icons):按语义名替换界面字形 */
|
|
121
|
+
icons?: Partial<import("./icons").RjIcons> | undefined;
|
|
122
|
+
/** 查询条件栏:开启后网格上方出现可增删的「字段 + 运算符 + 值」条件;client 即时过滤 / 服务端透出给 loadData */
|
|
123
|
+
queryable?: boolean | undefined;
|
|
124
|
+
/** 自定义视图:把「查询字段 + 条件 + 列布局 + 排序/分组」存成可命名快照(依赖 stateKey 落本地) */
|
|
125
|
+
viewable?: boolean | undefined;
|
|
126
|
+
/** 查询字段候选覆盖(不传则由列定义推导);可为枚举列补 options */
|
|
127
|
+
queryFields?: RjQueryFieldDef[] | undefined;
|
|
128
|
+
/** 查询栏「重置」旁的自定义操作按钮(修改/删除…;confirm 走内置确认框) */
|
|
129
|
+
queryActions?: RjQueryAction[] | undefined;
|
|
130
|
+
/** 内置行编辑/新增弹窗:false 关闭 openRowForm/openRowFormAdd 能力;对象可配 title/width/columns 与 addTitle/addColumns */
|
|
131
|
+
rowForm?: boolean | RjRowFormConfig | undefined;
|
|
132
|
+
/** 内置视图(只读,恒排在自建视图前) */
|
|
133
|
+
builtinViews?: RjSavedView[] | undefined;
|
|
134
|
+
}>, {
|
|
135
|
+
rows: () => never[];
|
|
136
|
+
height: string;
|
|
137
|
+
density: string;
|
|
138
|
+
showToolbar: boolean;
|
|
139
|
+
quickFilterEnabled: boolean;
|
|
140
|
+
floatingFilters: boolean;
|
|
141
|
+
groupFooter: boolean;
|
|
142
|
+
serverSideGrouping: boolean;
|
|
143
|
+
groupDisplayType: string;
|
|
144
|
+
groupSelectsChildren: boolean;
|
|
145
|
+
toolPanel: boolean;
|
|
146
|
+
groupable: boolean;
|
|
147
|
+
showGroupPanel: boolean;
|
|
148
|
+
chartable: boolean;
|
|
149
|
+
exportable: boolean;
|
|
150
|
+
colReorder: boolean;
|
|
151
|
+
resizable: boolean;
|
|
152
|
+
rowSelection: boolean;
|
|
153
|
+
editable: boolean;
|
|
154
|
+
rangeSelection: boolean;
|
|
155
|
+
clipboard: boolean;
|
|
156
|
+
contextMenu: boolean;
|
|
157
|
+
rowDraggable: boolean;
|
|
158
|
+
dataMode: string;
|
|
159
|
+
pageSize: number;
|
|
160
|
+
pagerPosition: string;
|
|
161
|
+
ssrmBlockSize: number;
|
|
162
|
+
ssrmMaxBlocksInCache: number;
|
|
163
|
+
ssrmCacheOverflow: number;
|
|
164
|
+
childrenField: string;
|
|
165
|
+
parentField: string;
|
|
166
|
+
defaultExpandAll: boolean;
|
|
167
|
+
showSummary: boolean;
|
|
168
|
+
pinnedTopRows: () => never[];
|
|
169
|
+
pinnedBottomRows: () => never[];
|
|
170
|
+
detailHeight: number;
|
|
171
|
+
fullWidthHeight: number;
|
|
172
|
+
exportRange: string;
|
|
173
|
+
statusBar: boolean;
|
|
174
|
+
statusAggregations: () => string[];
|
|
175
|
+
ariaLabel: string;
|
|
176
|
+
undoRedoCellEditing: boolean;
|
|
177
|
+
undoRedoCellEditingLimit: number;
|
|
178
|
+
copyHeadersToClipboard: boolean;
|
|
179
|
+
markDirtyCells: boolean;
|
|
180
|
+
rowHover: boolean;
|
|
181
|
+
queryable: boolean;
|
|
182
|
+
viewable: boolean;
|
|
183
|
+
queryFields: () => never[];
|
|
184
|
+
queryActions: () => never[];
|
|
185
|
+
rowForm: boolean;
|
|
186
|
+
builtinViews: () => never[];
|
|
187
|
+
}>>, any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
188
|
+
"selection-change": (rows: RjRowData[]) => void;
|
|
189
|
+
"cell-click": (p: RjCellParams, ev: MouseEvent) => void;
|
|
190
|
+
"cell-dblclick": (p: RjCellParams, ev: MouseEvent) => void;
|
|
191
|
+
"cell-value-changed": (p: {
|
|
192
|
+
row: RjRowData;
|
|
193
|
+
colId: string;
|
|
194
|
+
newValue: any;
|
|
195
|
+
oldValue: any;
|
|
196
|
+
}) => void;
|
|
197
|
+
"cells-changed": (ps: any[]) => void;
|
|
198
|
+
"sort-change": (s: RjSortState[]) => void;
|
|
199
|
+
"filter-change": () => void;
|
|
200
|
+
"row-group-change": (f: string[]) => void;
|
|
201
|
+
"pivot-change": (p: any) => void;
|
|
202
|
+
"page-change": (p: {
|
|
203
|
+
page: number;
|
|
204
|
+
pageSize: number;
|
|
205
|
+
}) => void;
|
|
206
|
+
"view-change": (v: RjSavedView) => void;
|
|
207
|
+
"detail-open": (row: RjRowData) => void;
|
|
208
|
+
"row-drag-end": (p: {
|
|
209
|
+
row: RjRowData;
|
|
210
|
+
from: number;
|
|
211
|
+
to: number;
|
|
212
|
+
}) => void;
|
|
213
|
+
"row-form-submit": (p: {
|
|
214
|
+
rows: RjRowData[];
|
|
215
|
+
changes: Record<string, any>;
|
|
216
|
+
mode: "edit" | "add";
|
|
217
|
+
}) => void;
|
|
218
|
+
"row-form-add": (p: {
|
|
219
|
+
row: RjRowData;
|
|
220
|
+
changes: Record<string, any>;
|
|
221
|
+
}) => void;
|
|
222
|
+
ready: (api: any) => void;
|
|
223
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
224
|
+
columns: RjColumn<RjRowData>[];
|
|
225
|
+
rows?: RjRowData[] | undefined;
|
|
226
|
+
rowKey?: string | undefined;
|
|
227
|
+
height?: string | number | undefined;
|
|
228
|
+
loading?: boolean | undefined;
|
|
229
|
+
theme?: RjThemeParams | "light" | "dark" | undefined;
|
|
230
|
+
density?: "small" | "medium" | "large" | undefined;
|
|
231
|
+
/** 语言:'zh' | 'en' | 区域标识(内部归一),默认中文 */
|
|
232
|
+
lang?: string | undefined;
|
|
233
|
+
/** 局部文案覆盖(对标 AG Grid localeText):按 key 覆盖内置目录 */
|
|
234
|
+
localeText?: RjMessages | undefined;
|
|
235
|
+
showToolbar?: boolean | undefined;
|
|
236
|
+
quickFilterEnabled?: boolean | undefined;
|
|
237
|
+
/** 表头下方浮动筛选行(每列即时输入) */
|
|
238
|
+
floatingFilters?: boolean | undefined;
|
|
239
|
+
/** 分组页脚行:每个展开分组底部显示聚合汇总 */
|
|
240
|
+
groupFooter?: boolean | undefined;
|
|
241
|
+
/** 服务端权威分组(仅非 client 模式生效):分组定义下推后端,客户端不重建组树 */
|
|
242
|
+
serverSideGrouping?: boolean | undefined;
|
|
243
|
+
/** 分组显示模式:singleColumn=单列聚合(各级合并到一列、缩进显示完整路径);multipleColumns=各级各占一列 */
|
|
244
|
+
groupDisplayType?: "singleColumn" | "multipleColumns" | undefined;
|
|
245
|
+
/** 分组行复选框:选中组=级联选中其下所有数据行,组行本身不计入 selectedRows(AG Grid groupSelectsChildren) */
|
|
246
|
+
groupSelectsChildren?: boolean | undefined;
|
|
247
|
+
toolPanel?: boolean | undefined;
|
|
248
|
+
groupable?: boolean | undefined;
|
|
249
|
+
showGroupPanel?: boolean | undefined;
|
|
250
|
+
chartable?: boolean | undefined;
|
|
251
|
+
exportable?: boolean | undefined;
|
|
252
|
+
colReorder?: boolean | undefined;
|
|
253
|
+
resizable?: boolean | undefined;
|
|
254
|
+
rowSelection?: false | "multiple" | "single" | undefined;
|
|
255
|
+
keepSelectionCrossPage?: boolean | undefined;
|
|
256
|
+
editable?: boolean | undefined;
|
|
257
|
+
rangeSelection?: boolean | undefined;
|
|
258
|
+
clipboard?: boolean | undefined;
|
|
259
|
+
contextMenu?: boolean | ((ctx: any) => RjMenuItem[]) | undefined;
|
|
260
|
+
rowDraggable?: boolean | undefined;
|
|
261
|
+
stateKey?: string | undefined;
|
|
262
|
+
dataMode?: RjDataMode | undefined;
|
|
263
|
+
loadData?: ((p: RjLoadServerParams) => Promise<{
|
|
264
|
+
list?: any[] | undefined;
|
|
265
|
+
rows?: any[] | undefined;
|
|
266
|
+
total: number;
|
|
267
|
+
}>) | undefined;
|
|
268
|
+
pageSize?: number | undefined;
|
|
269
|
+
/** 分页键显示位置(仅服务端分页模式 dataMode='pagination'+loadData 时出现):top 工具条右上(与查询同行,查询后即翻页)/ bottom 底栏功能键块左侧 / both 两处 */
|
|
270
|
+
pagerPosition?: "top" | "bottom" | "both" | undefined;
|
|
271
|
+
/** SSRM:块大小(serverSide 模式) */
|
|
272
|
+
ssrmBlockSize?: number | undefined;
|
|
273
|
+
/** SSRM:缓存中最多保留的已加载块数(0=不限) */
|
|
274
|
+
ssrmMaxBlocksInCache?: number | undefined;
|
|
275
|
+
/** SSRM:视口外额外保留块数 */
|
|
276
|
+
ssrmCacheOverflow?: number | undefined;
|
|
277
|
+
/** SSRM:判断某行是否为可展开的服务端分组 */
|
|
278
|
+
isServerSideGroup?: ((data: any) => boolean) | undefined;
|
|
279
|
+
treeData?: boolean | undefined;
|
|
280
|
+
childrenField?: string | undefined;
|
|
281
|
+
parentField?: string | undefined;
|
|
282
|
+
defaultExpandAll?: boolean | undefined;
|
|
283
|
+
showSummary?: boolean | undefined;
|
|
284
|
+
pinnedTopRows?: RjRowData[] | undefined;
|
|
285
|
+
pinnedBottomRows?: RjRowData[] | undefined;
|
|
286
|
+
fullWidthRow?: ((row: RjRowData) => boolean) | undefined;
|
|
287
|
+
detailHeight?: number | undefined;
|
|
288
|
+
fullWidthHeight?: number | undefined;
|
|
289
|
+
getRowClass?: ((params: {
|
|
290
|
+
row: RjRowData;
|
|
291
|
+
rowIndex: number;
|
|
292
|
+
}) => string) | undefined;
|
|
293
|
+
suppressVirtualCols?: boolean | undefined;
|
|
294
|
+
/** 导出/打印的默认数据范围(缺 auto:有选中就导选中);工具栏菜单里可逐次改选 */
|
|
295
|
+
exportRange?: "auto" | RjExportScopeResolved | undefined;
|
|
296
|
+
/**
|
|
297
|
+
* 后端导出回调(按查询条件出全量数据):传了才在导出菜单里出现「后端导出」项。
|
|
298
|
+
* 组件不直接跟后端打交道,只把生效列 + 当前查询状态 + 分页快照 + 选中 key 透出去。
|
|
299
|
+
*/
|
|
300
|
+
serverExport?: ((params: RjServerExportParams) => void | Promise<void>) | undefined;
|
|
301
|
+
exportFileName?: string | undefined;
|
|
302
|
+
/** 导出取值口径:默认导出「所见即所得」的格式化文本(与屏幕一致、单文件内口径统一);
|
|
303
|
+
* 置 true 则导出原始类型值,让 Excel 里数字仍是数字(对齐 AG Grid useCellValuesForExports) */
|
|
304
|
+
exportRawValues?: boolean | undefined;
|
|
305
|
+
/** 底部状态栏:显示行数/选区/区域聚合(求和/平均/计数/最小/最大) */
|
|
306
|
+
statusBar?: boolean | undefined;
|
|
307
|
+
/** 状态栏参与的聚合项(仅对含数值的选区列生效) */
|
|
308
|
+
statusAggregations?: ("sum" | "avg" | "min" | "max" | "count")[] | undefined;
|
|
309
|
+
/** 无障碍:网格的 aria-label */
|
|
310
|
+
ariaLabel?: string | undefined;
|
|
311
|
+
/** 开启编辑撤销/重做(Ctrl+Z / Ctrl+Y),对标 AG Grid undoRedoCellEditing */
|
|
312
|
+
undoRedoCellEditing?: boolean | undefined;
|
|
313
|
+
/** 撤销历史步数上限,默认 50 */
|
|
314
|
+
undoRedoCellEditingLimit?: number | undefined;
|
|
315
|
+
/** 复制时附带列标题行(对标 copyHeadersToClipboard) */
|
|
316
|
+
copyHeadersToClipboard?: boolean | undefined;
|
|
317
|
+
/** 粘贴前对剪贴板文本的转换钩子(对标 pasteTransformer) */
|
|
318
|
+
pasteTransformer?: ((text: string) => string) | undefined;
|
|
319
|
+
/** 脏格标记:编辑后与初始值不一致的单元格标脏,供保存工作流(对标 AG Grid dirty cells) */
|
|
320
|
+
markDirtyCells?: boolean | undefined;
|
|
321
|
+
/** 鼠标悬停行高亮跟随(斑马纹之上的动态层),默认开启 */
|
|
322
|
+
rowHover?: boolean | undefined;
|
|
323
|
+
/** 图标覆盖(对标 AG Grid gridOptions.icons):按语义名替换界面字形 */
|
|
324
|
+
icons?: Partial<import("./icons").RjIcons> | undefined;
|
|
325
|
+
/** 查询条件栏:开启后网格上方出现可增删的「字段 + 运算符 + 值」条件;client 即时过滤 / 服务端透出给 loadData */
|
|
326
|
+
queryable?: boolean | undefined;
|
|
327
|
+
/** 自定义视图:把「查询字段 + 条件 + 列布局 + 排序/分组」存成可命名快照(依赖 stateKey 落本地) */
|
|
328
|
+
viewable?: boolean | undefined;
|
|
329
|
+
/** 查询字段候选覆盖(不传则由列定义推导);可为枚举列补 options */
|
|
330
|
+
queryFields?: RjQueryFieldDef[] | undefined;
|
|
331
|
+
/** 查询栏「重置」旁的自定义操作按钮(修改/删除…;confirm 走内置确认框) */
|
|
332
|
+
queryActions?: RjQueryAction[] | undefined;
|
|
333
|
+
/** 内置行编辑/新增弹窗:false 关闭 openRowForm/openRowFormAdd 能力;对象可配 title/width/columns 与 addTitle/addColumns */
|
|
334
|
+
rowForm?: boolean | RjRowFormConfig | undefined;
|
|
335
|
+
/** 内置视图(只读,恒排在自建视图前) */
|
|
336
|
+
builtinViews?: RjSavedView[] | undefined;
|
|
337
|
+
}>, {
|
|
338
|
+
rows: () => never[];
|
|
339
|
+
height: string;
|
|
340
|
+
density: string;
|
|
341
|
+
showToolbar: boolean;
|
|
342
|
+
quickFilterEnabled: boolean;
|
|
343
|
+
floatingFilters: boolean;
|
|
344
|
+
groupFooter: boolean;
|
|
345
|
+
serverSideGrouping: boolean;
|
|
346
|
+
groupDisplayType: string;
|
|
347
|
+
groupSelectsChildren: boolean;
|
|
348
|
+
toolPanel: boolean;
|
|
349
|
+
groupable: boolean;
|
|
350
|
+
showGroupPanel: boolean;
|
|
351
|
+
chartable: boolean;
|
|
352
|
+
exportable: boolean;
|
|
353
|
+
colReorder: boolean;
|
|
354
|
+
resizable: boolean;
|
|
355
|
+
rowSelection: boolean;
|
|
356
|
+
editable: boolean;
|
|
357
|
+
rangeSelection: boolean;
|
|
358
|
+
clipboard: boolean;
|
|
359
|
+
contextMenu: boolean;
|
|
360
|
+
rowDraggable: boolean;
|
|
361
|
+
dataMode: string;
|
|
362
|
+
pageSize: number;
|
|
363
|
+
pagerPosition: string;
|
|
364
|
+
ssrmBlockSize: number;
|
|
365
|
+
ssrmMaxBlocksInCache: number;
|
|
366
|
+
ssrmCacheOverflow: number;
|
|
367
|
+
childrenField: string;
|
|
368
|
+
parentField: string;
|
|
369
|
+
defaultExpandAll: boolean;
|
|
370
|
+
showSummary: boolean;
|
|
371
|
+
pinnedTopRows: () => never[];
|
|
372
|
+
pinnedBottomRows: () => never[];
|
|
373
|
+
detailHeight: number;
|
|
374
|
+
fullWidthHeight: number;
|
|
375
|
+
exportRange: string;
|
|
376
|
+
statusBar: boolean;
|
|
377
|
+
statusAggregations: () => string[];
|
|
378
|
+
ariaLabel: string;
|
|
379
|
+
undoRedoCellEditing: boolean;
|
|
380
|
+
undoRedoCellEditingLimit: number;
|
|
381
|
+
copyHeadersToClipboard: boolean;
|
|
382
|
+
markDirtyCells: boolean;
|
|
383
|
+
rowHover: boolean;
|
|
384
|
+
queryable: boolean;
|
|
385
|
+
viewable: boolean;
|
|
386
|
+
queryFields: () => never[];
|
|
387
|
+
queryActions: () => never[];
|
|
388
|
+
rowForm: boolean;
|
|
389
|
+
builtinViews: () => never[];
|
|
390
|
+
}>>> & Readonly<{
|
|
391
|
+
"onSelection-change"?: ((rows: RjRowData[]) => any) | undefined;
|
|
392
|
+
"onCell-click"?: ((p: RjCellParams, ev: MouseEvent) => any) | undefined;
|
|
393
|
+
"onCell-dblclick"?: ((p: RjCellParams, ev: MouseEvent) => any) | undefined;
|
|
394
|
+
"onCell-value-changed"?: ((p: {
|
|
395
|
+
row: RjRowData;
|
|
396
|
+
colId: string;
|
|
397
|
+
newValue: any;
|
|
398
|
+
oldValue: any;
|
|
399
|
+
}) => any) | undefined;
|
|
400
|
+
"onCells-changed"?: ((ps: any[]) => any) | undefined;
|
|
401
|
+
"onSort-change"?: ((s: RjSortState[]) => any) | undefined;
|
|
402
|
+
"onFilter-change"?: (() => any) | undefined;
|
|
403
|
+
"onRow-group-change"?: ((f: string[]) => any) | undefined;
|
|
404
|
+
"onPivot-change"?: ((p: any) => any) | undefined;
|
|
405
|
+
"onPage-change"?: ((p: {
|
|
406
|
+
page: number;
|
|
407
|
+
pageSize: number;
|
|
408
|
+
}) => any) | undefined;
|
|
409
|
+
"onView-change"?: ((v: RjSavedView) => any) | undefined;
|
|
410
|
+
"onDetail-open"?: ((row: RjRowData) => any) | undefined;
|
|
411
|
+
"onRow-drag-end"?: ((p: {
|
|
412
|
+
row: RjRowData;
|
|
413
|
+
from: number;
|
|
414
|
+
to: number;
|
|
415
|
+
}) => any) | undefined;
|
|
416
|
+
"onRow-form-submit"?: ((p: {
|
|
417
|
+
rows: RjRowData[];
|
|
418
|
+
changes: Record<string, any>;
|
|
419
|
+
mode: "edit" | "add";
|
|
420
|
+
}) => any) | undefined;
|
|
421
|
+
"onRow-form-add"?: ((p: {
|
|
422
|
+
row: RjRowData;
|
|
423
|
+
changes: Record<string, any>;
|
|
424
|
+
}) => any) | undefined;
|
|
425
|
+
onReady?: ((api: any) => any) | undefined;
|
|
426
|
+
}>, {
|
|
427
|
+
density: "small" | "medium" | "large";
|
|
428
|
+
ariaLabel: string;
|
|
429
|
+
editable: boolean;
|
|
430
|
+
height: string | number;
|
|
431
|
+
rows: RjRowData[];
|
|
432
|
+
pageSize: number;
|
|
433
|
+
queryFields: RjQueryFieldDef[];
|
|
434
|
+
showToolbar: boolean;
|
|
435
|
+
quickFilterEnabled: boolean;
|
|
436
|
+
floatingFilters: boolean;
|
|
437
|
+
groupFooter: boolean;
|
|
438
|
+
serverSideGrouping: boolean;
|
|
439
|
+
groupDisplayType: "singleColumn" | "multipleColumns";
|
|
440
|
+
groupSelectsChildren: boolean;
|
|
441
|
+
toolPanel: boolean;
|
|
442
|
+
groupable: boolean;
|
|
443
|
+
showGroupPanel: boolean;
|
|
444
|
+
chartable: boolean;
|
|
445
|
+
exportable: boolean;
|
|
446
|
+
colReorder: boolean;
|
|
447
|
+
resizable: boolean;
|
|
448
|
+
rowSelection: false | "multiple" | "single";
|
|
449
|
+
rangeSelection: boolean;
|
|
450
|
+
clipboard: boolean;
|
|
451
|
+
contextMenu: boolean | ((ctx: any) => RjMenuItem[]);
|
|
452
|
+
rowDraggable: boolean;
|
|
453
|
+
dataMode: RjDataMode;
|
|
454
|
+
pagerPosition: "top" | "bottom" | "both";
|
|
455
|
+
ssrmBlockSize: number;
|
|
456
|
+
ssrmMaxBlocksInCache: number;
|
|
457
|
+
ssrmCacheOverflow: number;
|
|
458
|
+
childrenField: string;
|
|
459
|
+
parentField: string;
|
|
460
|
+
defaultExpandAll: boolean;
|
|
461
|
+
showSummary: boolean;
|
|
462
|
+
pinnedTopRows: RjRowData[];
|
|
463
|
+
pinnedBottomRows: RjRowData[];
|
|
464
|
+
detailHeight: number;
|
|
465
|
+
fullWidthHeight: number;
|
|
466
|
+
exportRange: "auto" | RjExportScopeResolved;
|
|
467
|
+
statusBar: boolean;
|
|
468
|
+
statusAggregations: ("sum" | "avg" | "min" | "max" | "count")[];
|
|
469
|
+
undoRedoCellEditing: boolean;
|
|
470
|
+
undoRedoCellEditingLimit: number;
|
|
471
|
+
copyHeadersToClipboard: boolean;
|
|
472
|
+
markDirtyCells: boolean;
|
|
473
|
+
rowHover: boolean;
|
|
474
|
+
queryable: boolean;
|
|
475
|
+
viewable: boolean;
|
|
476
|
+
queryActions: RjQueryAction[];
|
|
477
|
+
rowForm: boolean | RjRowFormConfig;
|
|
478
|
+
builtinViews: RjSavedView[];
|
|
479
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
|
|
480
|
+
toolbar?(_: {
|
|
481
|
+
api: {
|
|
482
|
+
getDisplayedRowAtIndex: (i: number) => RjRowData;
|
|
483
|
+
getDisplayedRowsCount: () => number;
|
|
484
|
+
/** 当前虚拟可见行区间 [start, end)(对标 AG Grid getVirtualRowRanges) */
|
|
485
|
+
getVisibleRange: () => {
|
|
486
|
+
start: number;
|
|
487
|
+
end: number;
|
|
488
|
+
};
|
|
489
|
+
applyTransaction: (tx: RjTransaction) => void;
|
|
490
|
+
applyTransactionAsync: (tx: RjTransaction) => Promise<void>;
|
|
491
|
+
refreshServerSide: (params?: {
|
|
492
|
+
purge?: boolean | undefined;
|
|
493
|
+
} | undefined) => void;
|
|
494
|
+
purgeServerSideCache: () => void;
|
|
495
|
+
setRowData: (rows: RjRowData[]) => void;
|
|
496
|
+
updateRow: (row: RjRowData) => void;
|
|
497
|
+
getCellValue: (rowIndex: number, field: string) => any;
|
|
498
|
+
setCellValue: (rowIndex: number, field: string, value: any) => void;
|
|
499
|
+
getSelectedRows: () => RjRowData[];
|
|
500
|
+
getSelectedKeys: () => (string | number)[];
|
|
501
|
+
openRowForm: (rows?: RjRowData[] | undefined) => void;
|
|
502
|
+
openRowFormAdd: (preset?: RjRowData | undefined) => void;
|
|
503
|
+
setRowSelection: (row: RjRowData, selected: boolean) => void;
|
|
504
|
+
selectAll: () => void;
|
|
505
|
+
clearSelection: () => void;
|
|
506
|
+
setSort: (sorts: RjSortState[]) => void;
|
|
507
|
+
setFilterModel: (field: string, model: RjFilterModel | null) => void;
|
|
508
|
+
clearAllFilters: () => void;
|
|
509
|
+
setQuickFilter: (text: string) => void;
|
|
510
|
+
setAdvancedFilter: (model: AdvFilterGroup | null) => void;
|
|
511
|
+
getAdvancedFilter: () => {
|
|
512
|
+
operator: "or" | "and";
|
|
513
|
+
items: (any | {
|
|
514
|
+
colId: string;
|
|
515
|
+
condition: {
|
|
516
|
+
op: string;
|
|
517
|
+
value1?: any;
|
|
518
|
+
value2?: any;
|
|
519
|
+
};
|
|
520
|
+
filterType?: string | undefined;
|
|
521
|
+
})[];
|
|
522
|
+
} | null;
|
|
523
|
+
openAdvancedFilter: () => void;
|
|
524
|
+
setRowGroup: (fields: string[]) => void;
|
|
525
|
+
/** NLQ/外部设置「取前 N」显示限量(0=不限量);供重置等场景显式复位 */
|
|
526
|
+
setRowLimit: (n: number) => void;
|
|
527
|
+
expandAll: () => void;
|
|
528
|
+
collapseAll: () => void;
|
|
529
|
+
setPivot: (cols: string[], values: string[]) => void;
|
|
530
|
+
scrollTo: typeof scrollTo;
|
|
531
|
+
startEditing: (rowIndex: number, colId: string) => void;
|
|
532
|
+
stopEditing: () => void;
|
|
533
|
+
undoCellEditing: () => void;
|
|
534
|
+
redoCellEditing: () => void;
|
|
535
|
+
canUndo: () => boolean;
|
|
536
|
+
canRedo: () => boolean;
|
|
537
|
+
isDirty: () => boolean;
|
|
538
|
+
isCellDirty: (rowIndex: number, colId: string) => boolean;
|
|
539
|
+
getDirtyCells: () => {
|
|
540
|
+
row: RjRowData;
|
|
541
|
+
colId: string;
|
|
542
|
+
oldValue: any;
|
|
543
|
+
newValue: any;
|
|
544
|
+
}[];
|
|
545
|
+
getDirtyRows: () => RjRowData[];
|
|
546
|
+
clearDirtyCells: () => void;
|
|
547
|
+
recalculate: (_force?: boolean | undefined) => void;
|
|
548
|
+
setCellFormula: (rowIndex: number, colId: string, formula: string) => void;
|
|
549
|
+
getCellFormula: (rowIndex: number, colId: string) => string | undefined;
|
|
550
|
+
hasFormula: () => boolean;
|
|
551
|
+
getCircularRefs: () => {
|
|
552
|
+
row: number;
|
|
553
|
+
colId: string;
|
|
554
|
+
}[];
|
|
555
|
+
exportData: (params?: (RjPrintParams & {
|
|
556
|
+
type?: "csv" | "excel" | "pdf" | undefined;
|
|
557
|
+
}) | undefined) => void;
|
|
558
|
+
exportCurrentAsCsv: () => void;
|
|
559
|
+
print: (params?: RjPrintParams | undefined) => void;
|
|
560
|
+
getPrintHtml: (params?: RjPrintParams | undefined) => string;
|
|
561
|
+
copySelectedToClipboard: () => void;
|
|
562
|
+
getState: typeof getState;
|
|
563
|
+
setState: typeof setState;
|
|
564
|
+
refresh: () => void;
|
|
565
|
+
refreshCells: () => void;
|
|
566
|
+
getRangeSelection: () => {
|
|
567
|
+
start: {
|
|
568
|
+
r: number;
|
|
569
|
+
c: number;
|
|
570
|
+
};
|
|
571
|
+
end: {
|
|
572
|
+
r: number;
|
|
573
|
+
c: number;
|
|
574
|
+
};
|
|
575
|
+
} | null;
|
|
576
|
+
clearRangeSelection: () => void;
|
|
577
|
+
getColumns: () => {
|
|
578
|
+
colId: string;
|
|
579
|
+
field: string | undefined;
|
|
580
|
+
title: string | undefined;
|
|
581
|
+
}[];
|
|
582
|
+
isColumnHidden: (colId: string) => boolean;
|
|
583
|
+
setColumnVisible: (colId: string, visible: boolean) => void;
|
|
584
|
+
setColumnPinned: (colId: string, pinned: "left" | "right" | null) => void;
|
|
585
|
+
setColumnWidth: (colId: string, width: number) => void;
|
|
586
|
+
autoSizeColumn: (colId: string) => void;
|
|
587
|
+
autoSizeAll: () => void;
|
|
588
|
+
sizeColumnsToFit: () => void;
|
|
589
|
+
setTheme: (params: RjThemeParams) => void;
|
|
590
|
+
getTheme: () => {
|
|
591
|
+
preset?: "legacy" | "alpine" | "quartz" | "material" | undefined;
|
|
592
|
+
mode?: "light" | "dark" | "auto" | undefined;
|
|
593
|
+
accentColor?: string | undefined;
|
|
594
|
+
backgroundColor?: string | undefined;
|
|
595
|
+
oddRowBackgroundColor?: string | undefined;
|
|
596
|
+
headerBackgroundColor?: string | undefined;
|
|
597
|
+
borderColor?: string | undefined;
|
|
598
|
+
foregroundColor?: string | undefined;
|
|
599
|
+
secondaryForegroundColor?: string | undefined;
|
|
600
|
+
fontSize?: string | number | undefined;
|
|
601
|
+
radius?: string | number | undefined;
|
|
602
|
+
vars?: Record<string, string> | undefined;
|
|
603
|
+
};
|
|
604
|
+
setLang: (lang: string) => void;
|
|
605
|
+
setLocaleText: (patch: RjMessages) => void;
|
|
606
|
+
parseQuery: (text: string) => RjNlqResult;
|
|
607
|
+
applyQuery: (text: string) => RjNlqResult;
|
|
608
|
+
forEachNode: (fn: (data: RjRowData, index: number, drow: RjDisplayRow) => void) => void;
|
|
609
|
+
addEventListener: typeof addEventListener;
|
|
610
|
+
removeEventListener: typeof removeEventListener;
|
|
611
|
+
dispatchEvent: typeof dispatchEvent;
|
|
612
|
+
};
|
|
613
|
+
}): any;
|
|
614
|
+
"query-actions"?(_: {
|
|
615
|
+
api: {
|
|
616
|
+
getDisplayedRowAtIndex: (i: number) => RjRowData;
|
|
617
|
+
getDisplayedRowsCount: () => number;
|
|
618
|
+
/** 当前虚拟可见行区间 [start, end)(对标 AG Grid getVirtualRowRanges) */
|
|
619
|
+
getVisibleRange: () => {
|
|
620
|
+
start: number;
|
|
621
|
+
end: number;
|
|
622
|
+
};
|
|
623
|
+
applyTransaction: (tx: RjTransaction) => void;
|
|
624
|
+
applyTransactionAsync: (tx: RjTransaction) => Promise<void>;
|
|
625
|
+
refreshServerSide: (params?: {
|
|
626
|
+
purge?: boolean | undefined;
|
|
627
|
+
} | undefined) => void;
|
|
628
|
+
purgeServerSideCache: () => void;
|
|
629
|
+
setRowData: (rows: RjRowData[]) => void;
|
|
630
|
+
updateRow: (row: RjRowData) => void;
|
|
631
|
+
getCellValue: (rowIndex: number, field: string) => any;
|
|
632
|
+
setCellValue: (rowIndex: number, field: string, value: any) => void;
|
|
633
|
+
getSelectedRows: () => RjRowData[];
|
|
634
|
+
getSelectedKeys: () => (string | number)[];
|
|
635
|
+
openRowForm: (rows?: RjRowData[] | undefined) => void;
|
|
636
|
+
openRowFormAdd: (preset?: RjRowData | undefined) => void;
|
|
637
|
+
setRowSelection: (row: RjRowData, selected: boolean) => void;
|
|
638
|
+
selectAll: () => void;
|
|
639
|
+
clearSelection: () => void;
|
|
640
|
+
setSort: (sorts: RjSortState[]) => void;
|
|
641
|
+
setFilterModel: (field: string, model: RjFilterModel | null) => void;
|
|
642
|
+
clearAllFilters: () => void;
|
|
643
|
+
setQuickFilter: (text: string) => void;
|
|
644
|
+
setAdvancedFilter: (model: AdvFilterGroup | null) => void;
|
|
645
|
+
getAdvancedFilter: () => {
|
|
646
|
+
operator: "or" | "and";
|
|
647
|
+
items: (any | {
|
|
648
|
+
colId: string;
|
|
649
|
+
condition: {
|
|
650
|
+
op: string;
|
|
651
|
+
value1?: any;
|
|
652
|
+
value2?: any;
|
|
653
|
+
};
|
|
654
|
+
filterType?: string | undefined;
|
|
655
|
+
})[];
|
|
656
|
+
} | null;
|
|
657
|
+
openAdvancedFilter: () => void;
|
|
658
|
+
setRowGroup: (fields: string[]) => void;
|
|
659
|
+
/** NLQ/外部设置「取前 N」显示限量(0=不限量);供重置等场景显式复位 */
|
|
660
|
+
setRowLimit: (n: number) => void;
|
|
661
|
+
expandAll: () => void;
|
|
662
|
+
collapseAll: () => void;
|
|
663
|
+
setPivot: (cols: string[], values: string[]) => void;
|
|
664
|
+
scrollTo: typeof scrollTo;
|
|
665
|
+
startEditing: (rowIndex: number, colId: string) => void;
|
|
666
|
+
stopEditing: () => void;
|
|
667
|
+
undoCellEditing: () => void;
|
|
668
|
+
redoCellEditing: () => void;
|
|
669
|
+
canUndo: () => boolean;
|
|
670
|
+
canRedo: () => boolean;
|
|
671
|
+
isDirty: () => boolean;
|
|
672
|
+
isCellDirty: (rowIndex: number, colId: string) => boolean;
|
|
673
|
+
getDirtyCells: () => {
|
|
674
|
+
row: RjRowData;
|
|
675
|
+
colId: string;
|
|
676
|
+
oldValue: any;
|
|
677
|
+
newValue: any;
|
|
678
|
+
}[];
|
|
679
|
+
getDirtyRows: () => RjRowData[];
|
|
680
|
+
clearDirtyCells: () => void;
|
|
681
|
+
recalculate: (_force?: boolean | undefined) => void;
|
|
682
|
+
setCellFormula: (rowIndex: number, colId: string, formula: string) => void;
|
|
683
|
+
getCellFormula: (rowIndex: number, colId: string) => string | undefined;
|
|
684
|
+
hasFormula: () => boolean;
|
|
685
|
+
getCircularRefs: () => {
|
|
686
|
+
row: number;
|
|
687
|
+
colId: string;
|
|
688
|
+
}[];
|
|
689
|
+
exportData: (params?: (RjPrintParams & {
|
|
690
|
+
type?: "csv" | "excel" | "pdf" | undefined;
|
|
691
|
+
}) | undefined) => void;
|
|
692
|
+
exportCurrentAsCsv: () => void;
|
|
693
|
+
print: (params?: RjPrintParams | undefined) => void;
|
|
694
|
+
getPrintHtml: (params?: RjPrintParams | undefined) => string;
|
|
695
|
+
copySelectedToClipboard: () => void;
|
|
696
|
+
getState: typeof getState;
|
|
697
|
+
setState: typeof setState;
|
|
698
|
+
refresh: () => void;
|
|
699
|
+
refreshCells: () => void;
|
|
700
|
+
getRangeSelection: () => {
|
|
701
|
+
start: {
|
|
702
|
+
r: number;
|
|
703
|
+
c: number;
|
|
704
|
+
};
|
|
705
|
+
end: {
|
|
706
|
+
r: number;
|
|
707
|
+
c: number;
|
|
708
|
+
};
|
|
709
|
+
} | null;
|
|
710
|
+
clearRangeSelection: () => void;
|
|
711
|
+
getColumns: () => {
|
|
712
|
+
colId: string;
|
|
713
|
+
field: string | undefined;
|
|
714
|
+
title: string | undefined;
|
|
715
|
+
}[];
|
|
716
|
+
isColumnHidden: (colId: string) => boolean;
|
|
717
|
+
setColumnVisible: (colId: string, visible: boolean) => void;
|
|
718
|
+
setColumnPinned: (colId: string, pinned: "left" | "right" | null) => void;
|
|
719
|
+
setColumnWidth: (colId: string, width: number) => void;
|
|
720
|
+
autoSizeColumn: (colId: string) => void;
|
|
721
|
+
autoSizeAll: () => void;
|
|
722
|
+
sizeColumnsToFit: () => void;
|
|
723
|
+
setTheme: (params: RjThemeParams) => void;
|
|
724
|
+
getTheme: () => {
|
|
725
|
+
preset?: "legacy" | "alpine" | "quartz" | "material" | undefined;
|
|
726
|
+
mode?: "light" | "dark" | "auto" | undefined;
|
|
727
|
+
accentColor?: string | undefined;
|
|
728
|
+
backgroundColor?: string | undefined;
|
|
729
|
+
oddRowBackgroundColor?: string | undefined;
|
|
730
|
+
headerBackgroundColor?: string | undefined;
|
|
731
|
+
borderColor?: string | undefined;
|
|
732
|
+
foregroundColor?: string | undefined;
|
|
733
|
+
secondaryForegroundColor?: string | undefined;
|
|
734
|
+
fontSize?: string | number | undefined;
|
|
735
|
+
radius?: string | number | undefined;
|
|
736
|
+
vars?: Record<string, string> | undefined;
|
|
737
|
+
};
|
|
738
|
+
setLang: (lang: string) => void;
|
|
739
|
+
setLocaleText: (patch: RjMessages) => void;
|
|
740
|
+
parseQuery: (text: string) => RjNlqResult;
|
|
741
|
+
applyQuery: (text: string) => RjNlqResult;
|
|
742
|
+
forEachNode: (fn: (data: RjRowData, index: number, drow: RjDisplayRow) => void) => void;
|
|
743
|
+
addEventListener: typeof addEventListener;
|
|
744
|
+
removeEventListener: typeof removeEventListener;
|
|
745
|
+
dispatchEvent: typeof dispatchEvent;
|
|
746
|
+
};
|
|
747
|
+
rows: RjRowData[];
|
|
748
|
+
openRowForm: typeof openRowForm;
|
|
749
|
+
openRowFormAdd: typeof openRowFormAdd;
|
|
750
|
+
}): any;
|
|
751
|
+
"row-detail"?(_: {
|
|
752
|
+
row: RjRowData;
|
|
753
|
+
api: {
|
|
754
|
+
getDisplayedRowAtIndex: (i: number) => RjRowData;
|
|
755
|
+
getDisplayedRowsCount: () => number;
|
|
756
|
+
/** 当前虚拟可见行区间 [start, end)(对标 AG Grid getVirtualRowRanges) */
|
|
757
|
+
getVisibleRange: () => {
|
|
758
|
+
start: number;
|
|
759
|
+
end: number;
|
|
760
|
+
};
|
|
761
|
+
applyTransaction: (tx: RjTransaction) => void;
|
|
762
|
+
applyTransactionAsync: (tx: RjTransaction) => Promise<void>;
|
|
763
|
+
refreshServerSide: (params?: {
|
|
764
|
+
purge?: boolean | undefined;
|
|
765
|
+
} | undefined) => void;
|
|
766
|
+
purgeServerSideCache: () => void;
|
|
767
|
+
setRowData: (rows: RjRowData[]) => void;
|
|
768
|
+
updateRow: (row: RjRowData) => void;
|
|
769
|
+
getCellValue: (rowIndex: number, field: string) => any;
|
|
770
|
+
setCellValue: (rowIndex: number, field: string, value: any) => void;
|
|
771
|
+
getSelectedRows: () => RjRowData[];
|
|
772
|
+
getSelectedKeys: () => (string | number)[];
|
|
773
|
+
openRowForm: (rows?: RjRowData[] | undefined) => void;
|
|
774
|
+
openRowFormAdd: (preset?: RjRowData | undefined) => void;
|
|
775
|
+
setRowSelection: (row: RjRowData, selected: boolean) => void;
|
|
776
|
+
selectAll: () => void;
|
|
777
|
+
clearSelection: () => void;
|
|
778
|
+
setSort: (sorts: RjSortState[]) => void;
|
|
779
|
+
setFilterModel: (field: string, model: RjFilterModel | null) => void;
|
|
780
|
+
clearAllFilters: () => void;
|
|
781
|
+
setQuickFilter: (text: string) => void;
|
|
782
|
+
setAdvancedFilter: (model: AdvFilterGroup | null) => void;
|
|
783
|
+
getAdvancedFilter: () => {
|
|
784
|
+
operator: "or" | "and";
|
|
785
|
+
items: (any | {
|
|
786
|
+
colId: string;
|
|
787
|
+
condition: {
|
|
788
|
+
op: string;
|
|
789
|
+
value1?: any;
|
|
790
|
+
value2?: any;
|
|
791
|
+
};
|
|
792
|
+
filterType?: string | undefined;
|
|
793
|
+
})[];
|
|
794
|
+
} | null;
|
|
795
|
+
openAdvancedFilter: () => void;
|
|
796
|
+
setRowGroup: (fields: string[]) => void;
|
|
797
|
+
/** NLQ/外部设置「取前 N」显示限量(0=不限量);供重置等场景显式复位 */
|
|
798
|
+
setRowLimit: (n: number) => void;
|
|
799
|
+
expandAll: () => void;
|
|
800
|
+
collapseAll: () => void;
|
|
801
|
+
setPivot: (cols: string[], values: string[]) => void;
|
|
802
|
+
scrollTo: typeof scrollTo;
|
|
803
|
+
startEditing: (rowIndex: number, colId: string) => void;
|
|
804
|
+
stopEditing: () => void;
|
|
805
|
+
undoCellEditing: () => void;
|
|
806
|
+
redoCellEditing: () => void;
|
|
807
|
+
canUndo: () => boolean;
|
|
808
|
+
canRedo: () => boolean;
|
|
809
|
+
isDirty: () => boolean;
|
|
810
|
+
isCellDirty: (rowIndex: number, colId: string) => boolean;
|
|
811
|
+
getDirtyCells: () => {
|
|
812
|
+
row: RjRowData;
|
|
813
|
+
colId: string;
|
|
814
|
+
oldValue: any;
|
|
815
|
+
newValue: any;
|
|
816
|
+
}[];
|
|
817
|
+
getDirtyRows: () => RjRowData[];
|
|
818
|
+
clearDirtyCells: () => void;
|
|
819
|
+
recalculate: (_force?: boolean | undefined) => void;
|
|
820
|
+
setCellFormula: (rowIndex: number, colId: string, formula: string) => void;
|
|
821
|
+
getCellFormula: (rowIndex: number, colId: string) => string | undefined;
|
|
822
|
+
hasFormula: () => boolean;
|
|
823
|
+
getCircularRefs: () => {
|
|
824
|
+
row: number;
|
|
825
|
+
colId: string;
|
|
826
|
+
}[];
|
|
827
|
+
exportData: (params?: (RjPrintParams & {
|
|
828
|
+
type?: "csv" | "excel" | "pdf" | undefined;
|
|
829
|
+
}) | undefined) => void;
|
|
830
|
+
exportCurrentAsCsv: () => void;
|
|
831
|
+
print: (params?: RjPrintParams | undefined) => void;
|
|
832
|
+
getPrintHtml: (params?: RjPrintParams | undefined) => string;
|
|
833
|
+
copySelectedToClipboard: () => void;
|
|
834
|
+
getState: typeof getState;
|
|
835
|
+
setState: typeof setState;
|
|
836
|
+
refresh: () => void;
|
|
837
|
+
refreshCells: () => void;
|
|
838
|
+
getRangeSelection: () => {
|
|
839
|
+
start: {
|
|
840
|
+
r: number;
|
|
841
|
+
c: number;
|
|
842
|
+
};
|
|
843
|
+
end: {
|
|
844
|
+
r: number;
|
|
845
|
+
c: number;
|
|
846
|
+
};
|
|
847
|
+
} | null;
|
|
848
|
+
clearRangeSelection: () => void;
|
|
849
|
+
getColumns: () => {
|
|
850
|
+
colId: string;
|
|
851
|
+
field: string | undefined;
|
|
852
|
+
title: string | undefined;
|
|
853
|
+
}[];
|
|
854
|
+
isColumnHidden: (colId: string) => boolean;
|
|
855
|
+
setColumnVisible: (colId: string, visible: boolean) => void;
|
|
856
|
+
setColumnPinned: (colId: string, pinned: "left" | "right" | null) => void;
|
|
857
|
+
setColumnWidth: (colId: string, width: number) => void;
|
|
858
|
+
autoSizeColumn: (colId: string) => void;
|
|
859
|
+
autoSizeAll: () => void;
|
|
860
|
+
sizeColumnsToFit: () => void;
|
|
861
|
+
setTheme: (params: RjThemeParams) => void;
|
|
862
|
+
getTheme: () => {
|
|
863
|
+
preset?: "legacy" | "alpine" | "quartz" | "material" | undefined;
|
|
864
|
+
mode?: "light" | "dark" | "auto" | undefined;
|
|
865
|
+
accentColor?: string | undefined;
|
|
866
|
+
backgroundColor?: string | undefined;
|
|
867
|
+
oddRowBackgroundColor?: string | undefined;
|
|
868
|
+
headerBackgroundColor?: string | undefined;
|
|
869
|
+
borderColor?: string | undefined;
|
|
870
|
+
foregroundColor?: string | undefined;
|
|
871
|
+
secondaryForegroundColor?: string | undefined;
|
|
872
|
+
fontSize?: string | number | undefined;
|
|
873
|
+
radius?: string | number | undefined;
|
|
874
|
+
vars?: Record<string, string> | undefined;
|
|
875
|
+
};
|
|
876
|
+
setLang: (lang: string) => void;
|
|
877
|
+
setLocaleText: (patch: RjMessages) => void;
|
|
878
|
+
parseQuery: (text: string) => RjNlqResult;
|
|
879
|
+
applyQuery: (text: string) => RjNlqResult;
|
|
880
|
+
forEachNode: (fn: (data: RjRowData, index: number, drow: RjDisplayRow) => void) => void;
|
|
881
|
+
addEventListener: typeof addEventListener;
|
|
882
|
+
removeEventListener: typeof removeEventListener;
|
|
883
|
+
dispatchEvent: typeof dispatchEvent;
|
|
884
|
+
};
|
|
885
|
+
}): any;
|
|
886
|
+
"full-row"?(_: {
|
|
887
|
+
row: RjRowData;
|
|
888
|
+
api: {
|
|
889
|
+
getDisplayedRowAtIndex: (i: number) => RjRowData;
|
|
890
|
+
getDisplayedRowsCount: () => number;
|
|
891
|
+
/** 当前虚拟可见行区间 [start, end)(对标 AG Grid getVirtualRowRanges) */
|
|
892
|
+
getVisibleRange: () => {
|
|
893
|
+
start: number;
|
|
894
|
+
end: number;
|
|
895
|
+
};
|
|
896
|
+
applyTransaction: (tx: RjTransaction) => void;
|
|
897
|
+
applyTransactionAsync: (tx: RjTransaction) => Promise<void>;
|
|
898
|
+
refreshServerSide: (params?: {
|
|
899
|
+
purge?: boolean | undefined;
|
|
900
|
+
} | undefined) => void;
|
|
901
|
+
purgeServerSideCache: () => void;
|
|
902
|
+
setRowData: (rows: RjRowData[]) => void;
|
|
903
|
+
updateRow: (row: RjRowData) => void;
|
|
904
|
+
getCellValue: (rowIndex: number, field: string) => any;
|
|
905
|
+
setCellValue: (rowIndex: number, field: string, value: any) => void;
|
|
906
|
+
getSelectedRows: () => RjRowData[];
|
|
907
|
+
getSelectedKeys: () => (string | number)[];
|
|
908
|
+
openRowForm: (rows?: RjRowData[] | undefined) => void;
|
|
909
|
+
openRowFormAdd: (preset?: RjRowData | undefined) => void;
|
|
910
|
+
setRowSelection: (row: RjRowData, selected: boolean) => void;
|
|
911
|
+
selectAll: () => void;
|
|
912
|
+
clearSelection: () => void;
|
|
913
|
+
setSort: (sorts: RjSortState[]) => void;
|
|
914
|
+
setFilterModel: (field: string, model: RjFilterModel | null) => void;
|
|
915
|
+
clearAllFilters: () => void;
|
|
916
|
+
setQuickFilter: (text: string) => void;
|
|
917
|
+
setAdvancedFilter: (model: AdvFilterGroup | null) => void;
|
|
918
|
+
getAdvancedFilter: () => {
|
|
919
|
+
operator: "or" | "and";
|
|
920
|
+
items: (any | {
|
|
921
|
+
colId: string;
|
|
922
|
+
condition: {
|
|
923
|
+
op: string;
|
|
924
|
+
value1?: any;
|
|
925
|
+
value2?: any;
|
|
926
|
+
};
|
|
927
|
+
filterType?: string | undefined;
|
|
928
|
+
})[];
|
|
929
|
+
} | null;
|
|
930
|
+
openAdvancedFilter: () => void;
|
|
931
|
+
setRowGroup: (fields: string[]) => void;
|
|
932
|
+
/** NLQ/外部设置「取前 N」显示限量(0=不限量);供重置等场景显式复位 */
|
|
933
|
+
setRowLimit: (n: number) => void;
|
|
934
|
+
expandAll: () => void;
|
|
935
|
+
collapseAll: () => void;
|
|
936
|
+
setPivot: (cols: string[], values: string[]) => void;
|
|
937
|
+
scrollTo: typeof scrollTo;
|
|
938
|
+
startEditing: (rowIndex: number, colId: string) => void;
|
|
939
|
+
stopEditing: () => void;
|
|
940
|
+
undoCellEditing: () => void;
|
|
941
|
+
redoCellEditing: () => void;
|
|
942
|
+
canUndo: () => boolean;
|
|
943
|
+
canRedo: () => boolean;
|
|
944
|
+
isDirty: () => boolean;
|
|
945
|
+
isCellDirty: (rowIndex: number, colId: string) => boolean;
|
|
946
|
+
getDirtyCells: () => {
|
|
947
|
+
row: RjRowData;
|
|
948
|
+
colId: string;
|
|
949
|
+
oldValue: any;
|
|
950
|
+
newValue: any;
|
|
951
|
+
}[];
|
|
952
|
+
getDirtyRows: () => RjRowData[];
|
|
953
|
+
clearDirtyCells: () => void;
|
|
954
|
+
recalculate: (_force?: boolean | undefined) => void;
|
|
955
|
+
setCellFormula: (rowIndex: number, colId: string, formula: string) => void;
|
|
956
|
+
getCellFormula: (rowIndex: number, colId: string) => string | undefined;
|
|
957
|
+
hasFormula: () => boolean;
|
|
958
|
+
getCircularRefs: () => {
|
|
959
|
+
row: number;
|
|
960
|
+
colId: string;
|
|
961
|
+
}[];
|
|
962
|
+
exportData: (params?: (RjPrintParams & {
|
|
963
|
+
type?: "csv" | "excel" | "pdf" | undefined;
|
|
964
|
+
}) | undefined) => void;
|
|
965
|
+
exportCurrentAsCsv: () => void;
|
|
966
|
+
print: (params?: RjPrintParams | undefined) => void;
|
|
967
|
+
getPrintHtml: (params?: RjPrintParams | undefined) => string;
|
|
968
|
+
copySelectedToClipboard: () => void;
|
|
969
|
+
getState: typeof getState;
|
|
970
|
+
setState: typeof setState;
|
|
971
|
+
refresh: () => void;
|
|
972
|
+
refreshCells: () => void;
|
|
973
|
+
getRangeSelection: () => {
|
|
974
|
+
start: {
|
|
975
|
+
r: number;
|
|
976
|
+
c: number;
|
|
977
|
+
};
|
|
978
|
+
end: {
|
|
979
|
+
r: number;
|
|
980
|
+
c: number;
|
|
981
|
+
};
|
|
982
|
+
} | null;
|
|
983
|
+
clearRangeSelection: () => void;
|
|
984
|
+
getColumns: () => {
|
|
985
|
+
colId: string;
|
|
986
|
+
field: string | undefined;
|
|
987
|
+
title: string | undefined;
|
|
988
|
+
}[];
|
|
989
|
+
isColumnHidden: (colId: string) => boolean;
|
|
990
|
+
setColumnVisible: (colId: string, visible: boolean) => void;
|
|
991
|
+
setColumnPinned: (colId: string, pinned: "left" | "right" | null) => void;
|
|
992
|
+
setColumnWidth: (colId: string, width: number) => void;
|
|
993
|
+
autoSizeColumn: (colId: string) => void;
|
|
994
|
+
autoSizeAll: () => void;
|
|
995
|
+
sizeColumnsToFit: () => void;
|
|
996
|
+
setTheme: (params: RjThemeParams) => void;
|
|
997
|
+
getTheme: () => {
|
|
998
|
+
preset?: "legacy" | "alpine" | "quartz" | "material" | undefined;
|
|
999
|
+
mode?: "light" | "dark" | "auto" | undefined;
|
|
1000
|
+
accentColor?: string | undefined;
|
|
1001
|
+
backgroundColor?: string | undefined;
|
|
1002
|
+
oddRowBackgroundColor?: string | undefined;
|
|
1003
|
+
headerBackgroundColor?: string | undefined;
|
|
1004
|
+
borderColor?: string | undefined;
|
|
1005
|
+
foregroundColor?: string | undefined;
|
|
1006
|
+
secondaryForegroundColor?: string | undefined;
|
|
1007
|
+
fontSize?: string | number | undefined;
|
|
1008
|
+
radius?: string | number | undefined;
|
|
1009
|
+
vars?: Record<string, string> | undefined;
|
|
1010
|
+
};
|
|
1011
|
+
setLang: (lang: string) => void;
|
|
1012
|
+
setLocaleText: (patch: RjMessages) => void;
|
|
1013
|
+
parseQuery: (text: string) => RjNlqResult;
|
|
1014
|
+
applyQuery: (text: string) => RjNlqResult;
|
|
1015
|
+
forEachNode: (fn: (data: RjRowData, index: number, drow: RjDisplayRow) => void) => void;
|
|
1016
|
+
addEventListener: typeof addEventListener;
|
|
1017
|
+
removeEventListener: typeof removeEventListener;
|
|
1018
|
+
dispatchEvent: typeof dispatchEvent;
|
|
1019
|
+
};
|
|
1020
|
+
}): any;
|
|
1021
|
+
loading?(_: {}): any;
|
|
1022
|
+
empty?(_: {}): any;
|
|
1023
|
+
}>;
|
|
1024
|
+
export default _default;
|
|
1025
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
1026
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
1027
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
1028
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
1029
|
+
} : {
|
|
1030
|
+
type: import('vue').PropType<T[K]>;
|
|
1031
|
+
required: true;
|
|
1032
|
+
};
|
|
1033
|
+
};
|
|
1034
|
+
type __VLS_WithDefaults<P, D> = {
|
|
1035
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
1036
|
+
default: D[K];
|
|
1037
|
+
}> : P[K];
|
|
1038
|
+
};
|
|
1039
|
+
type __VLS_Prettify<T> = {
|
|
1040
|
+
[K in keyof T]: T[K];
|
|
1041
|
+
} & {};
|
|
1042
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
1043
|
+
new (): {
|
|
1044
|
+
$slots: S;
|
|
1045
|
+
};
|
|
1046
|
+
};
|