@ishibashi0112/spreadsheet-grid-core 1.0.0 → 1.0.2
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/dist/controllers/autoHeightMeasurer.cjs +1 -1
- package/dist/controllers/autoHeightMeasurer.js +4 -2
- package/dist/controllers/clipboardController.cjs +1 -2
- package/dist/controllers/clipboardController.d.ts +2 -1
- package/dist/controllers/clipboardController.js +79 -63
- package/dist/controllers/columnAutosizeRunner.cjs +1 -1
- package/dist/controllers/columnAutosizeRunner.d.ts +4 -1
- package/dist/controllers/columnAutosizeRunner.js +60 -33
- package/dist/controllers/columnHeaderDragController.cjs +1 -1
- package/dist/controllers/columnHeaderDragController.d.ts +4 -0
- package/dist/controllers/columnHeaderDragController.js +205 -184
- package/dist/controllers/columnMenuController.cjs +1 -1
- package/dist/controllers/columnMenuController.js +1 -1
- package/dist/controllers/dateRolloverStore.cjs +1 -1
- package/dist/controllers/dateRolloverStore.js +1 -1
- package/dist/controllers/editController.cjs +1 -1
- package/dist/controllers/editController.js +90 -74
- package/dist/controllers/escapeClaimController.cjs +1 -0
- package/dist/controllers/escapeClaimController.d.ts +19 -0
- package/dist/controllers/escapeClaimController.js +36 -0
- package/dist/controllers/fillHandleController.cjs +1 -1
- package/dist/controllers/fillHandleController.js +77 -74
- package/dist/controllers/filterPopoverController.cjs +1 -1
- package/dist/controllers/filterPopoverController.js +81 -77
- package/dist/controllers/findController.cjs +1 -1
- package/dist/controllers/findController.d.ts +2 -0
- package/dist/controllers/findController.js +103 -75
- package/dist/controllers/globalFilteredOrder.cjs +1 -1
- package/dist/controllers/globalFilteredOrder.js +52 -21
- package/dist/controllers/keyboardController.cjs +1 -1
- package/dist/controllers/keyboardController.js +137 -140
- package/dist/controllers/pointerInteractionsController.cjs +1 -1
- package/dist/controllers/pointerInteractionsController.js +159 -144
- package/dist/controllers/popoverSupport.cjs +1 -1
- package/dist/controllers/popoverSupport.js +14 -6
- package/dist/controllers/rowDragController.cjs +1 -1
- package/dist/controllers/rowDragController.d.ts +1 -0
- package/dist/controllers/rowDragController.js +131 -128
- package/dist/controllers/rowEnterController.cjs +1 -1
- package/dist/controllers/rowEnterController.d.ts +1 -0
- package/dist/controllers/rowEnterController.js +47 -42
- package/dist/controllers/scrollSyncController.cjs +1 -1
- package/dist/controllers/scrollSyncController.d.ts +1 -1
- package/dist/controllers/scrollSyncController.js +7 -4
- package/dist/controllers/selectOptionsCollector.cjs +1 -1
- package/dist/controllers/selectOptionsCollector.d.ts +5 -2
- package/dist/controllers/selectOptionsCollector.js +39 -27
- package/dist/controllers/toolPanelController.cjs +1 -1
- package/dist/controllers/toolPanelController.d.ts +6 -0
- package/dist/controllers/toolPanelController.js +69 -59
- package/dist/controllers/tooltipController.cjs +1 -1
- package/dist/controllers/tooltipController.d.ts +2 -0
- package/dist/controllers/tooltipController.js +86 -39
- package/dist/controllers/viewportSyncController.cjs +1 -1
- package/dist/controllers/viewportSyncController.d.ts +5 -0
- package/dist/controllers/viewportSyncController.js +40 -9
- package/dist/engine/columnCommands.cjs +1 -1
- package/dist/engine/columnCommands.js +2 -1
- package/dist/engine/columnLayout.cjs +1 -1
- package/dist/engine/columnLayout.d.ts +2 -0
- package/dist/engine/columnLayout.js +51 -18
- package/dist/engine/filterPopoverCommands.cjs +1 -1
- package/dist/engine/filterPopoverCommands.d.ts +2 -0
- package/dist/engine/filterPopoverCommands.js +15 -15
- package/dist/engine/fullFeatures.cjs +1 -1
- package/dist/engine/fullFeatures.js +17 -17
- package/dist/engine/gridApi.cjs +3 -3
- package/dist/engine/gridApi.d.ts +2 -1
- package/dist/engine/gridApi.js +19 -19
- package/dist/engine/rowPipeline.cjs +1 -1
- package/dist/engine/rowPipeline.js +46 -46
- package/dist/engine/rowSelectionCommands.cjs +1 -1
- package/dist/engine/rowSelectionCommands.d.ts +9 -1
- package/dist/engine/rowSelectionCommands.js +45 -25
- package/dist/locales/en.cjs +1 -1
- package/dist/locales/en.js +8 -5
- package/dist/logic/autoScrollGeometry.cjs +1 -1
- package/dist/logic/autoScrollGeometry.d.ts +5 -1
- package/dist/logic/autoScrollGeometry.js +6 -6
- package/dist/logic/clearCells.cjs +1 -1
- package/dist/logic/clearCells.js +13 -13
- package/dist/logic/columnAutosize.cjs +1 -1
- package/dist/logic/columnAutosize.d.ts +8 -2
- package/dist/logic/columnAutosize.js +102 -87
- package/dist/logic/columnReset.cjs +1 -1
- package/dist/logic/columnReset.d.ts +1 -0
- package/dist/logic/columnReset.js +21 -19
- package/dist/logic/detailRow.cjs +1 -1
- package/dist/logic/detailRow.d.ts +4 -0
- package/dist/logic/detailRow.js +18 -15
- package/dist/logic/editorValues.cjs +1 -1
- package/dist/logic/editorValues.d.ts +1 -0
- package/dist/logic/editorValues.js +49 -23
- package/dist/logic/elementScale.cjs +1 -0
- package/dist/logic/elementScale.d.ts +8 -0
- package/dist/logic/elementScale.js +14 -0
- package/dist/logic/filterSummary.cjs +1 -1
- package/dist/logic/filterSummary.js +9 -2
- package/dist/logic/filtering.cjs +1 -1
- package/dist/logic/filtering.js +14 -11
- package/dist/logic/find.cjs +1 -1
- package/dist/logic/find.d.ts +4 -3
- package/dist/logic/find.js +27 -13
- package/dist/logic/focusCycle.cjs +1 -0
- package/dist/logic/focusCycle.d.ts +1 -0
- package/dist/logic/focusCycle.js +15 -0
- package/dist/logic/gridAsk.cjs +2 -2
- package/dist/logic/gridAsk.d.ts +7 -7
- package/dist/logic/gridAsk.js +140 -122
- package/dist/logic/gridAskLocaleText.cjs +1 -1
- package/dist/logic/gridAskLocaleText.d.ts +2 -0
- package/dist/logic/gridAskLocaleText.js +1 -0
- package/dist/logic/gridState.d.ts +2 -2
- package/dist/logic/labelRows.cjs +1 -1
- package/dist/logic/labelRows.d.ts +2 -0
- package/dist/logic/labelRows.js +8 -4
- package/dist/logic/localeText.cjs +1 -1
- package/dist/logic/localeText.d.ts +2 -0
- package/dist/logic/localeText.js +2 -1
- package/dist/logic/localeTextFeatures.cjs +1 -1
- package/dist/logic/localeTextFeatures.js +2 -2
- package/dist/logic/localeTextFilters.cjs +1 -1
- package/dist/logic/localeTextFilters.d.ts +1 -0
- package/dist/logic/localeTextFilters.js +1 -0
- package/dist/logic/localeTextPopups.cjs +1 -1
- package/dist/logic/localeTextPopups.js +2 -2
- package/dist/logic/numberFilterCondition.cjs +1 -1
- package/dist/logic/numberFilterCondition.d.ts +1 -1
- package/dist/logic/numberFilterCondition.js +5 -5
- package/dist/logic/rowSelection.cjs +1 -1
- package/dist/logic/rowSelection.d.ts +4 -0
- package/dist/logic/rowSelection.js +31 -8
- package/dist/logic/scrollTargets.cjs +1 -1
- package/dist/logic/scrollTargets.js +2 -2
- package/dist/logic/selectEditorState.cjs +1 -1
- package/dist/logic/selectEditorState.d.ts +1 -0
- package/dist/logic/selectEditorState.js +8 -1
- package/dist/logic/selectOptions.cjs +1 -1
- package/dist/logic/selectOptions.d.ts +2 -2
- package/dist/logic/selectOptions.js +16 -12
- package/dist/logic/selectionOverlayGeometry.cjs +1 -1
- package/dist/logic/selectionOverlayGeometry.js +12 -12
- package/dist/logic/sorting.cjs +1 -1
- package/dist/logic/sorting.d.ts +1 -0
- package/dist/logic/sorting.js +24 -12
- package/dist/logic/valueFormatters.d.ts +5 -5
- package/dist/logic/verticalGeometry.cjs +1 -1
- package/dist/logic/verticalGeometry.d.ts +1 -0
- package/dist/logic/verticalGeometry.js +12 -8
- package/dist/model/gridActions.cjs +1 -1
- package/dist/model/gridActions.d.ts +2 -1
- package/dist/model/gridActions.js +3 -2
- package/dist/model/gridReducer.cjs +1 -1
- package/dist/model/gridReducer.js +145 -62
- package/dist/model/gridTypes.core.d.ts +365 -318
- package/dist/utils/clipboard.cjs +3 -5
- package/dist/utils/clipboard.d.ts +1 -0
- package/dist/utils/clipboard.js +25 -22
- package/package.json +1 -1
|
@@ -8,13 +8,13 @@ export type RowModel<T> = {
|
|
|
8
8
|
getRow: (viewIndex: number) => T;
|
|
9
9
|
getSourceIndex: (viewIndex: number) => number;
|
|
10
10
|
getRowKey: (viewIndex: number) => GridRowKey;
|
|
11
|
-
getGroupRow?: (viewIndex: number) => GridGroupRow | undefined;
|
|
12
|
-
getLabelRow?: (viewIndex: number) => GridLabelRow<T> | undefined;
|
|
11
|
+
getGroupRow?: ((viewIndex: number) => GridGroupRow | undefined) | undefined;
|
|
12
|
+
getLabelRow?: ((viewIndex: number) => GridLabelRow<T> | undefined) | undefined;
|
|
13
13
|
};
|
|
14
14
|
export type ServerSideQuery = {
|
|
15
|
-
globalText?: string;
|
|
16
|
-
columnFilters?: Record<string, ColumnFilterValue
|
|
17
|
-
sort?: GridSortState;
|
|
15
|
+
globalText?: string | undefined;
|
|
16
|
+
columnFilters?: Record<string, ColumnFilterValue> | undefined;
|
|
17
|
+
sort?: GridSortState | undefined;
|
|
18
18
|
};
|
|
19
19
|
export type ServerSideGetRowsParams = {
|
|
20
20
|
startIndex: number;
|
|
@@ -28,10 +28,10 @@ export type ServerSideGetRowsResult<T> = {
|
|
|
28
28
|
};
|
|
29
29
|
export type ServerSideDataSource<T> = {
|
|
30
30
|
getRows: (params: ServerSideGetRowsParams) => Promise<ServerSideGetRowsResult<T>>;
|
|
31
|
-
updateRows?: (params: ServerSideUpdateRowsParams<T>) => Promise<ServerSideUpdateRowsResult<T> | void
|
|
32
|
-
initialRowCount?: number;
|
|
33
|
-
blockSize?: number;
|
|
34
|
-
maxCachedBlocks?: number;
|
|
31
|
+
updateRows?: ((params: ServerSideUpdateRowsParams<T>) => Promise<ServerSideUpdateRowsResult<T> | void>) | undefined;
|
|
32
|
+
initialRowCount?: number | undefined;
|
|
33
|
+
blockSize?: number | undefined;
|
|
34
|
+
maxCachedBlocks?: number | undefined;
|
|
35
35
|
};
|
|
36
36
|
export type ServerSideCellChange = {
|
|
37
37
|
columnKey: string;
|
|
@@ -49,7 +49,7 @@ export type ServerSideUpdateRowsParams<T> = {
|
|
|
49
49
|
updates: ServerSideRowUpdate<T>[];
|
|
50
50
|
};
|
|
51
51
|
export type ServerSideUpdateRowsResult<T> = {
|
|
52
|
-
rows?: T[];
|
|
52
|
+
rows?: T[] | undefined;
|
|
53
53
|
};
|
|
54
54
|
export type ServerSideLoadErrorParams = {
|
|
55
55
|
startIndex: number;
|
|
@@ -118,13 +118,13 @@ export type GetFilterOptionsParams<T, F extends GridFrameworkTypes = GridFramewo
|
|
|
118
118
|
};
|
|
119
119
|
export type GetFilterOptionsResult = {
|
|
120
120
|
options: GridSelectFilterOption[];
|
|
121
|
-
truncated?: boolean;
|
|
121
|
+
truncated?: boolean | undefined;
|
|
122
122
|
};
|
|
123
123
|
export type ColumnFilterUiType = 'text' | 'textSet' | 'number' | 'numberSet' | 'date' | 'dateSet' | 'select' | 'set' | 'custom';
|
|
124
124
|
export type ColumnFilterTypeOption = ColumnFilterUiType | 'auto';
|
|
125
125
|
export type SetColumnFilterValue = {
|
|
126
126
|
kind: 'set';
|
|
127
|
-
mode?: 'include' | 'exclude';
|
|
127
|
+
mode?: 'include' | 'exclude' | undefined;
|
|
128
128
|
values: string[];
|
|
129
129
|
};
|
|
130
130
|
export type ParsedNumberFilter = {
|
|
@@ -157,7 +157,7 @@ export type NumberSetColumnFilterValue = {
|
|
|
157
157
|
kind: 'numberSet';
|
|
158
158
|
condition: ParsedNumberFilter | null;
|
|
159
159
|
set: {
|
|
160
|
-
mode?: 'include' | 'exclude';
|
|
160
|
+
mode?: 'include' | 'exclude' | undefined;
|
|
161
161
|
values: string[];
|
|
162
162
|
} | null;
|
|
163
163
|
};
|
|
@@ -173,14 +173,14 @@ export type TextSetColumnFilterValue = {
|
|
|
173
173
|
kind: 'textSet';
|
|
174
174
|
condition: ParsedTextFilter | null;
|
|
175
175
|
set: {
|
|
176
|
-
mode?: 'include' | 'exclude';
|
|
176
|
+
mode?: 'include' | 'exclude' | undefined;
|
|
177
177
|
values: string[];
|
|
178
178
|
} | null;
|
|
179
179
|
};
|
|
180
180
|
export type DateFilterPreset = 'today' | 'thisMonth' | 'last30days';
|
|
181
181
|
export type DateFilterPresetRange = {
|
|
182
|
-
from?: string | Date;
|
|
183
|
-
to?: string | Date;
|
|
182
|
+
from?: string | Date | undefined;
|
|
183
|
+
to?: string | Date | undefined;
|
|
184
184
|
};
|
|
185
185
|
export type CustomDateFilterPreset = {
|
|
186
186
|
id: string;
|
|
@@ -214,7 +214,7 @@ export type DateSetColumnFilterValue = {
|
|
|
214
214
|
kind: 'dateSet';
|
|
215
215
|
condition: ParsedDateFilter | null;
|
|
216
216
|
set: {
|
|
217
|
-
mode?: 'include' | 'exclude';
|
|
217
|
+
mode?: 'include' | 'exclude' | undefined;
|
|
218
218
|
values: string[];
|
|
219
219
|
} | null;
|
|
220
220
|
};
|
|
@@ -240,7 +240,7 @@ export type CellRenderContext<T, F extends GridFrameworkTypes = GridFrameworkTyp
|
|
|
240
240
|
isEditing: boolean;
|
|
241
241
|
readOnly: boolean;
|
|
242
242
|
setValue: (value: unknown) => void;
|
|
243
|
-
detail?: CellDetailContext;
|
|
243
|
+
detail?: CellDetailContext | undefined;
|
|
244
244
|
};
|
|
245
245
|
export type CellDetailContext = {
|
|
246
246
|
expanded: boolean;
|
|
@@ -273,17 +273,17 @@ export type DetailRowOptions<T, F extends GridFrameworkTypes = GridFrameworkType
|
|
|
273
273
|
*
|
|
274
274
|
* @defaultValue `200`
|
|
275
275
|
*/
|
|
276
|
-
height?: number;
|
|
276
|
+
height?: number | undefined;
|
|
277
277
|
/**
|
|
278
278
|
* 行ごとの展開可否。`false` の行はトグルが描画されず、命令的 API / `ctx.detail.toggle()`
|
|
279
279
|
* からの展開も no-op。
|
|
280
280
|
*
|
|
281
281
|
* @defaultValue 全行展開可
|
|
282
282
|
*/
|
|
283
|
-
isExpandable?: (row: T, ctx: {
|
|
283
|
+
isExpandable?: ((row: T, ctx: {
|
|
284
284
|
rowKey: GridRowKey;
|
|
285
285
|
sourceRowIndex: number;
|
|
286
|
-
}) => boolean;
|
|
286
|
+
}) => boolean) | undefined;
|
|
287
287
|
/**
|
|
288
288
|
* 専用トグル列(幅 28px・タイトル無し、行ヘッダーの右隣 = 先頭列。左固定列があるときは左固定側)
|
|
289
289
|
* を自動挿入する。`false` にすると列は挿入されず、任意の列の `renderCell` から
|
|
@@ -291,12 +291,12 @@ export type DetailRowOptions<T, F extends GridFrameworkTypes = GridFrameworkType
|
|
|
291
291
|
*
|
|
292
292
|
* @defaultValue `true`
|
|
293
293
|
*/
|
|
294
|
-
showToggleColumn?: boolean;
|
|
294
|
+
showToggleColumn?: boolean | undefined;
|
|
295
295
|
/**
|
|
296
296
|
* カード要素へ追加する class(または `{ className, style }`。`classNames.detailCard`
|
|
297
297
|
* に加えて付与)。
|
|
298
298
|
*/
|
|
299
|
-
className?: GridSlotProps<F
|
|
299
|
+
className?: GridSlotProps<F> | undefined;
|
|
300
300
|
};
|
|
301
301
|
export type LabelRowSortMode = 'section' | 'follow' | 'hide';
|
|
302
302
|
export type GridLabelRow<T> = {
|
|
@@ -334,15 +334,15 @@ export type LabelRowOptions<T, F extends GridFrameworkTypes = GridFrameworkTypes
|
|
|
334
334
|
* `ctx = { row, rowKey, rowIndex, sourceRowIndex, label, sectionRowCount }`(`sectionRowCount`
|
|
335
335
|
* はフィルター後のセクション内データ行数。serverSide では `undefined`)。
|
|
336
336
|
*/
|
|
337
|
-
render?: (ctx: LabelRowRenderContext<L>) => F['node'];
|
|
337
|
+
render?: ((ctx: LabelRowRenderContext<L>) => F['node']) | undefined;
|
|
338
338
|
/**
|
|
339
339
|
* ラベル行の高さ(px)。行ごとに変えるときは関数。
|
|
340
340
|
*
|
|
341
341
|
* @defaultValue `rowHeight`
|
|
342
342
|
*/
|
|
343
|
-
height?: number | ((row: L) => number);
|
|
343
|
+
height?: number | ((row: L) => number) | undefined;
|
|
344
344
|
/** 行要素へ追加する class(または `{ className, style }`)。`classNames.labelRow` に加えて付与。 */
|
|
345
|
-
className?: GridSlotProps<F> | ((row: L) => GridSlotProps<F> | undefined);
|
|
345
|
+
className?: GridSlotProps<F> | ((row: L) => GridSlotProps<F> | undefined) | undefined;
|
|
346
346
|
/**
|
|
347
347
|
* 縦スクロール中、現在セクションのラベル行を列ヘッダー直下に固定する。
|
|
348
348
|
* 次のラベル行が到達すると押し上げられて交代する(clientSide のみ)。キーボード操作 / `scrollToRow`
|
|
@@ -350,26 +350,26 @@ export type LabelRowOptions<T, F extends GridFrameworkTypes = GridFrameworkTypes
|
|
|
350
350
|
*
|
|
351
351
|
* @defaultValue `false`
|
|
352
352
|
*/
|
|
353
|
-
sticky?: boolean;
|
|
353
|
+
sticky?: boolean | undefined;
|
|
354
354
|
/**
|
|
355
355
|
* ソート / フィルター適用時の扱い(下記)。
|
|
356
356
|
*
|
|
357
357
|
* @defaultValue `'section'`
|
|
358
358
|
*/
|
|
359
|
-
sortMode?: LabelRowSortMode;
|
|
359
|
+
sortMode?: LabelRowSortMode | undefined;
|
|
360
360
|
/**
|
|
361
361
|
* フィルターで中身が 0 件になったセクションのラベル行を残す。
|
|
362
362
|
*
|
|
363
363
|
* @defaultValue `false`
|
|
364
364
|
*/
|
|
365
|
-
keepEmptySections?: boolean;
|
|
365
|
+
keepEmptySections?: boolean | undefined;
|
|
366
366
|
/**
|
|
367
367
|
* エクスポート(`includeLabelRows: true`)時の出力値。文字列は先頭列(他列は空)、
|
|
368
368
|
* 配列は列順にそのまま。
|
|
369
369
|
*
|
|
370
370
|
* @defaultValue `getLabel` を先頭列へ
|
|
371
371
|
*/
|
|
372
|
-
exportText?: (row: L) => string | ReadonlyArray<string | number | null | undefined
|
|
372
|
+
exportText?: ((row: L) => string | ReadonlyArray<string | number | null | undefined>) | undefined;
|
|
373
373
|
};
|
|
374
374
|
export type TotalRowCellKind = GridAggFuncName | 'custom' | 'value';
|
|
375
375
|
export type TotalRowCellContext<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
@@ -392,26 +392,26 @@ export type TotalRowOptions<T, F extends GridFrameworkTypes = GridFrameworkTypes
|
|
|
392
392
|
*
|
|
393
393
|
* @defaultValue `localeText` の `totalRowLabel`(`'合計'`)
|
|
394
394
|
*/
|
|
395
|
-
label?: string;
|
|
395
|
+
label?: string | undefined;
|
|
396
396
|
/**
|
|
397
397
|
* 列 key → 表示する値。指定した列は計算せずこの値を出す(`aggFunc` より優先。serverSide
|
|
398
398
|
* はこれだけ)。
|
|
399
399
|
*/
|
|
400
|
-
values?: Readonly<Record<string, unknown
|
|
400
|
+
values?: Readonly<Record<string, unknown>> | undefined;
|
|
401
401
|
/**
|
|
402
402
|
* 値のあるセルの中身を差し替える。`ctx = { column, value, kind, text, caption }`(`kind` は
|
|
403
403
|
* `'sum' | 'avg' | 'min' | 'max' | 'count' | 'custom' | 'value'`、`text` は既定の表示文字列、
|
|
404
404
|
* `caption` は種類の見出し)。
|
|
405
405
|
*/
|
|
406
|
-
renderCell?: (ctx: TotalRowCellContext<T, F>) => F['node'];
|
|
406
|
+
renderCell?: ((ctx: TotalRowCellContext<T, F>) => F['node']) | undefined;
|
|
407
407
|
/**
|
|
408
408
|
* 合計行の高さ(px)。
|
|
409
409
|
*
|
|
410
410
|
* @defaultValue `rowHeight`
|
|
411
411
|
*/
|
|
412
|
-
height?: number;
|
|
412
|
+
height?: number | undefined;
|
|
413
413
|
/** 行要素へ追加する class(または `{ className, style }`)。`classNames.totalRow` に加えて付与。 */
|
|
414
|
-
className?: GridSlotProps<F
|
|
414
|
+
className?: GridSlotProps<F> | undefined;
|
|
415
415
|
};
|
|
416
416
|
export type GridFillDirection = 'down' | 'up' | 'right' | 'left';
|
|
417
417
|
export type GridFillKind = 'series' | 'copy';
|
|
@@ -449,7 +449,7 @@ export type FillHandleOptions<T, F extends GridFrameworkTypes = GridFrameworkTyp
|
|
|
449
449
|
* ドラッグ中のツールチップ(いちばん遠いセルの値)でも呼ぶため、副作用の無い関数にする。返した値も
|
|
450
450
|
* `validate` を通り、reject なら書かない。
|
|
451
451
|
*/
|
|
452
|
-
getFillValue?: (params: GridFillValueParams<T, F>) => unknown;
|
|
452
|
+
getFillValue?: ((params: GridFillValueParams<T, F>) => unknown) | undefined;
|
|
453
453
|
};
|
|
454
454
|
export type RowDragContext = {
|
|
455
455
|
rowKey: GridRowKey;
|
|
@@ -500,7 +500,7 @@ export type HeaderRenderContext<T, F extends GridFrameworkTypes = GridFrameworkT
|
|
|
500
500
|
width: number;
|
|
501
501
|
column: GridColumn<T, F>;
|
|
502
502
|
filterValue?: unknown;
|
|
503
|
-
isFiltered?: boolean;
|
|
503
|
+
isFiltered?: boolean | undefined;
|
|
504
504
|
};
|
|
505
505
|
export type GridColumnPinned = 'left' | 'right';
|
|
506
506
|
export type CellValueFormatterParams<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
@@ -515,14 +515,14 @@ export type GridTextEditorEnterKey = 'commit' | 'newline';
|
|
|
515
515
|
export type GridSelectEditorOption = GridSelectFilterOption;
|
|
516
516
|
export type GridColumnEditor<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
517
517
|
type: 'text';
|
|
518
|
-
multiline?: boolean;
|
|
519
|
-
enterKey?: GridTextEditorEnterKey;
|
|
518
|
+
multiline?: boolean | undefined;
|
|
519
|
+
enterKey?: GridTextEditorEnterKey | undefined;
|
|
520
520
|
} | {
|
|
521
521
|
type: 'number';
|
|
522
|
-
min?: number;
|
|
523
|
-
max?: number;
|
|
524
|
-
step?: number;
|
|
525
|
-
integer?: boolean;
|
|
522
|
+
min?: number | undefined;
|
|
523
|
+
max?: number | undefined;
|
|
524
|
+
step?: number | undefined;
|
|
525
|
+
integer?: boolean | undefined;
|
|
526
526
|
} | {
|
|
527
527
|
type: 'select';
|
|
528
528
|
options: GridSelectEditorOption[] | ((row: T) => GridSelectEditorOption[]);
|
|
@@ -545,7 +545,7 @@ export type CellEditorContext<T, F extends GridFrameworkTypes = GridFrameworkTyp
|
|
|
545
545
|
column: GridColumn<T, F>;
|
|
546
546
|
value: unknown;
|
|
547
547
|
initialText: string;
|
|
548
|
-
align?: 'left' | 'center' | 'right';
|
|
548
|
+
align?: 'left' | 'center' | 'right' | undefined;
|
|
549
549
|
commit: (value: unknown, direction?: EditorCommitDirection) => EditorCommitResult;
|
|
550
550
|
cancel: () => void;
|
|
551
551
|
};
|
|
@@ -598,7 +598,7 @@ export type GridGroupRow = {
|
|
|
598
598
|
*/
|
|
599
599
|
export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
600
600
|
/** 型推論用の内部マーカーです(実行時には存在しません)。指定しないでください。 */
|
|
601
|
-
readonly __framework?: F;
|
|
601
|
+
readonly __framework?: F | undefined;
|
|
602
602
|
/** 列の一意キー。 */
|
|
603
603
|
key: string;
|
|
604
604
|
/**
|
|
@@ -606,41 +606,42 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
|
606
606
|
* フィルターパネル / CSV ヘッダー等の列名表示も同じフォールバック)。
|
|
607
607
|
* ボタン専用列などで見出しを空にしたい場合は空白 1 文字(`' '`)等を指定する。
|
|
608
608
|
*/
|
|
609
|
-
title?: string;
|
|
609
|
+
title?: string | undefined;
|
|
610
610
|
/** 列幅(px)。 */
|
|
611
611
|
width: number;
|
|
612
612
|
/**
|
|
613
613
|
* リサイズ時の下限幅(未指定時の手動リサイズの下限は 60px。`0` を指定すると 0 まで縮められる)。
|
|
614
614
|
* flex 配分時の下限クランプにも使用(flex 列で未指定なら内部既定 50px)。
|
|
615
615
|
*/
|
|
616
|
-
minWidth?: number;
|
|
616
|
+
minWidth?: number | undefined;
|
|
617
617
|
/**
|
|
618
618
|
* 上限幅。**未指定なら上限なし**(autoSize は内容にぴったり合わせ、
|
|
619
619
|
* 手動リサイズも自由に広げられます。既定の上限は設けません)。指定すると autoSize / 手動リサイズ /
|
|
620
620
|
* flex 配分の上限クランプに使われます。
|
|
621
621
|
*/
|
|
622
|
-
maxWidth?: number;
|
|
622
|
+
maxWidth?: number | undefined;
|
|
623
623
|
/**
|
|
624
624
|
* 折り返し時(= `autoHeight` 列)の CSS `word-break`。`'auto-phrase'` は Chromium(Chrome / Edge)で
|
|
625
625
|
* BudouX による文節折り返し(Firefox / 一部 Safari 未対応)。**nowrap(非 `autoHeight`)
|
|
626
626
|
* 列では折り返し自体が起きないため効果なし**。既定(未指定)はブラウザ標準=禁則つき文字折り返し。
|
|
627
627
|
* 詳細は「日本語テキストの折り返し」節。
|
|
628
628
|
*/
|
|
629
|
-
wordBreak?: 'normal' | 'break-all' | 'keep-all' | 'break-word' | 'auto-phrase';
|
|
629
|
+
wordBreak?: 'normal' | 'break-all' | 'keep-all' | 'break-word' | 'auto-phrase' | undefined;
|
|
630
630
|
/**
|
|
631
631
|
* 折り返し時の CSS `line-break`(禁則処理の強さ)。`'strict'` で禁則を厳格化。`wordBreak` 同様、
|
|
632
632
|
* 折り返す列でのみ効果あり。
|
|
633
633
|
*/
|
|
634
|
-
lineBreak?: 'auto' | 'loose' | 'normal' | 'strict' | 'anywhere';
|
|
634
|
+
lineBreak?: 'auto' | 'loose' | 'normal' | 'strict' | 'anywhere' | undefined;
|
|
635
635
|
/**
|
|
636
636
|
* center 列(非 pinned)の伸縮比。余り幅(コンテナ幅 − 行ヘッダー − pinned 合計 − `width`
|
|
637
637
|
* 固定列の合計)を flex 比で配分し `minWidth`/`maxWidth` でクランプ。配分した幅は整数
|
|
638
638
|
* px(端数は切り捨てて次の列へ回すため、合計が利用可能幅をはみ出さない)。
|
|
639
639
|
* コンテナ追従でリアクティブに伸縮。手動リサイズで固定 px へ変化(その列の `flex` / `pinned` /
|
|
640
|
-
* `width` 指定が変わるか列のリセットまで固定 → 以後 flex 復帰)。pinned
|
|
641
|
-
*
|
|
640
|
+
* `width` 指定が変わるか列のリセットまで固定 → 以後 flex 復帰)。pinned 列では無視。`flex`
|
|
641
|
+
* の列では `width` は使わない(最小の幅にもならず、余り幅が無いと既定の下限 50px まで縮む)。
|
|
642
|
+
* 縮ませたくない幅は `minWidth` で書く。詳細は下記「flex と autoSize」節。
|
|
642
643
|
*/
|
|
643
|
-
flex?: number;
|
|
644
|
+
flex?: number | undefined;
|
|
644
645
|
/**
|
|
645
646
|
* この列の手動リサイズ可否。`false` でヘッダーのリサイズハンドルを非表示。
|
|
646
647
|
* リサイズハンドルの**ダブルクリック**でその列を内容幅へ autoSize(`false`
|
|
@@ -648,7 +649,7 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
|
648
649
|
*
|
|
649
650
|
* @defaultValue グリッドの `enableColumnResize` を継承
|
|
650
651
|
*/
|
|
651
|
-
resizable?: boolean;
|
|
652
|
+
resizable?: boolean | undefined;
|
|
652
653
|
/**
|
|
653
654
|
* `true` で autoSize の対象外(列メニュー / 境界ダブルクリック /
|
|
654
655
|
* すべての列の自動調整すべてでスキップ)。consumer 指定の `width` を維持(固定幅優先)。
|
|
@@ -656,52 +657,59 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
|
656
657
|
*
|
|
657
658
|
* @defaultValue `false`
|
|
658
659
|
*/
|
|
659
|
-
suppressAutoSize?: boolean;
|
|
660
|
+
suppressAutoSize?: boolean | undefined;
|
|
660
661
|
/**
|
|
661
662
|
* autoSize の幅見積もり。指定列は「セル内容の content 幅(px・セルの padding/border を除く)」
|
|
662
663
|
* をこの関数から得て、**全行の最大 + セル枠**で確定します(テキスト/候補/実 DOM 計測を使わず、
|
|
663
664
|
* React mount もしません)。テキスト長が実描画幅と相関しない renderCell
|
|
664
665
|
* カスタムUI列(横並びバッジ等)向けの opt-in。返す値は `renderCell` の実描画幅と一致させること。
|
|
665
666
|
*/
|
|
666
|
-
estimateCellWidth?: (row: T, column: GridColumn<T, F>) => number;
|
|
667
|
+
estimateCellWidth?: ((row: T, column: GridColumn<T, F>) => number) | undefined;
|
|
667
668
|
/**
|
|
668
669
|
* この列が auto-height 行の高さを駆動(グリッドの `autoHeight` 有効時のみ)。**autoSize
|
|
669
670
|
* の対象外**(折り返し前提のため。下記「flex と autoSize」の制約を参照)。
|
|
670
671
|
*/
|
|
671
|
-
autoHeight?: boolean;
|
|
672
|
+
autoHeight?: boolean | undefined;
|
|
672
673
|
/**
|
|
673
674
|
* auto-height で伸びた行での、この列の中身の縦の揃え(グリッドの `verticalAlign` より優先)。
|
|
674
675
|
* 書かなければグリッドの指定、それも無ければ `autoHeight` の列は上、ほかの列は真ん中。
|
|
675
676
|
*/
|
|
676
|
-
verticalAlign?: GridVerticalAlign;
|
|
677
|
+
verticalAlign?: GridVerticalAlign | undefined;
|
|
677
678
|
/**
|
|
678
679
|
* 列の表示/非表示。非表示にしても、その列に載った列フィルター / ソートは行の絞り込み /
|
|
679
680
|
* 並べ替えに効き続ける(クイックフィルター = グローバル検索は可視列のみが対象)。
|
|
680
681
|
*/
|
|
681
|
-
visible?: boolean;
|
|
682
|
+
visible?: boolean | undefined;
|
|
682
683
|
/**
|
|
683
684
|
* この列の編集可否。**未指定の列は編集可**で、`false` または `readOnly: true`
|
|
684
685
|
* で編集不可になる(グリッド全体は `readOnly`、セル単位は `canEditCell`)。
|
|
685
686
|
*
|
|
686
687
|
* @defaultValue `true`(未指定 = 編集可)
|
|
687
688
|
*/
|
|
688
|
-
editable?: boolean;
|
|
689
|
+
editable?: boolean | undefined;
|
|
689
690
|
/** この列を読み取り専用にする。 */
|
|
690
|
-
readOnly?: boolean;
|
|
691
|
+
readOnly?: boolean | undefined;
|
|
691
692
|
/**
|
|
692
|
-
*
|
|
693
|
+
* 列固定の方向。固定列(行番号の列を含む)の合計が広すぎて中央に 120px を残せない間は、
|
|
694
|
+
* 右の固定列の内側から、次に左の固定列の内側から順に、
|
|
695
|
+
* 表示の上だけ固定を外して中央でスクロールさせる(`columns` の `pinned` は変えず、
|
|
696
|
+
* 広くなれば固定に戻る。スマホの幅で右の固定列が左の固定列に重なり、中央が見えなかったため。1.0.1
|
|
697
|
+
* から)。列の合計幅が表の幅より狭いときは、
|
|
698
|
+
* 右の固定列は表の右端ではなく中央の列のすぐ右に付く(右端に置きたいときは中央の列のどれかに
|
|
699
|
+
* `flex` を付けて余りの幅を埋める)。
|
|
693
700
|
*
|
|
694
701
|
* @defaultValue undefined = 中央スクロール
|
|
695
702
|
*/
|
|
696
|
-
pinned?: GridColumnPinned;
|
|
703
|
+
pinned?: GridColumnPinned | undefined;
|
|
697
704
|
/**
|
|
698
705
|
* `true` でこの列を行グルーピングの対象にする(複数指定時は `columns` 配列の出現順が階層順)。
|
|
699
706
|
* 有効時はグループ元列が表示から外れ、先頭に自動グループ列(ツリー表示)が注入される。**clientSide
|
|
700
707
|
* 限定**(serverSide では無視 + 開発時警告)。列のどれかに `rowGroup` を書いている(`false` を含む)
|
|
701
708
|
* 表では、列メニューに「この列でグループ化」/「グループ化を外す」が出る(`onColumnsChange`
|
|
702
|
-
*
|
|
709
|
+
* が要る。`rowGroup` を書いた列だけでなく、集計のある列と最後のデータ列を除くすべての列に出る)。
|
|
710
|
+
* 詳細は「行グルーピング + 集計」節。
|
|
703
711
|
*/
|
|
704
|
-
rowGroup?: boolean;
|
|
712
|
+
rowGroup?: boolean | undefined;
|
|
705
713
|
/**
|
|
706
714
|
* グルーピング時と合計行(`totalRow`)のこの列の集計。
|
|
707
715
|
* 組み込みは数値と数値の文字列だけを数える集計(空値・空白だけの文字列・`true` /
|
|
@@ -709,7 +717,7 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
|
709
717
|
* 関数でカスタム集計可(返り値がグループ行 / 合計行に表示)。`rowGroup` 列も `totalRow`
|
|
710
718
|
* もないときは無視。
|
|
711
719
|
*/
|
|
712
|
-
aggFunc?: GridAggFuncName | GridAggFunc<T, F
|
|
720
|
+
aggFunc?: GridAggFuncName | GridAggFunc<T, F> | undefined;
|
|
713
721
|
/**
|
|
714
722
|
* 値アクセサ。`setValue` の無い列へ書き込むと値は `row[key]` へ入り、表示(`getValue`)
|
|
715
723
|
* は変わらない。計算列は `editable: false` にするか `setValue` を渡す(開発時は、
|
|
@@ -717,15 +725,15 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
|
717
725
|
*
|
|
718
726
|
* @defaultValue `row[key]`
|
|
719
727
|
*/
|
|
720
|
-
getValue?: (row: T) => unknown;
|
|
728
|
+
getValue?: ((row: T) => unknown) | undefined;
|
|
721
729
|
/** 値ライター(新しい行を返す)。 */
|
|
722
|
-
setValue?: (row: T, value: unknown) => T;
|
|
730
|
+
setValue?: ((row: T, value: unknown) => T) | undefined;
|
|
723
731
|
/**
|
|
724
732
|
* カスタムセル描画。
|
|
725
733
|
*
|
|
726
734
|
* @defaultValue プレーン `<span>`
|
|
727
735
|
*/
|
|
728
|
-
renderCell?: (ctx: CellRenderContext<T, F>) => F['node'];
|
|
736
|
+
renderCell?: ((ctx: CellRenderContext<T, F>) => F['node']) | undefined;
|
|
729
737
|
/**
|
|
730
738
|
* セルへ付与する追加 class(条件付きスタイル)。`GridSlotProps` = `string | { className?, style? }`
|
|
731
739
|
* で、StyleX の `stylex.props(...)` をそのまま返せる(`style` はセルへインライン付与。座標 /
|
|
@@ -734,7 +742,7 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
|
734
742
|
* 行基準のデータと突き合わせ可能。「補助型」節参照)。基底 `.ssg-body-cell` は未レイヤー・特異度
|
|
735
743
|
* (0,1,0)。確実な上書きは `.ssg-body-cell.my-class` の連結を推奨。
|
|
736
744
|
*/
|
|
737
|
-
cellClassName?: GridSlotProps<F> | ((ctx: CellStyleContext<T, F>) => GridSlotProps<F> | undefined);
|
|
745
|
+
cellClassName?: GridSlotProps<F> | ((ctx: CellStyleContext<T, F>) => GridSlotProps<F> | undefined) | undefined;
|
|
738
746
|
/**
|
|
739
747
|
* セルのメモ(FarPoint SPREAD のセルメモ / Excel のメモ相当)。文字列を返したセルの右上に印(10px
|
|
740
748
|
* の三角。色はトークン `--ssg-note-indicator`)を出し、
|
|
@@ -745,7 +753,7 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
|
745
753
|
* 描画中のセルだけ評価する(`cellClassName` 関数と同じコスト階級)。CSV / TSV / クリップボード /
|
|
746
754
|
* `getExportData` には含めない。詳細は「セルのメモ(`cellNote`)」節。
|
|
747
755
|
*/
|
|
748
|
-
cellNote?: (ctx: CellStyleContext<T, F>) => string | null | undefined;
|
|
756
|
+
cellNote?: ((ctx: CellStyleContext<T, F>) => string | null | undefined) | undefined;
|
|
749
757
|
/**
|
|
750
758
|
* **条件付き書式**。既定セルの描画に、値の「量」/「向き」/「状態」を重ねる。`dataBar`(背景の帯。
|
|
751
759
|
* `min` / `max` 省略時はビュー行 = フィルター / ソート適用後の数値から自動集計、負の値は 0
|
|
@@ -757,13 +765,13 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
|
757
765
|
* エクスポート / コピー / ソート / フィルターには影響しない。色はトークン `--ssg-cf-*`。
|
|
758
766
|
* 詳細は「条件付き書式(`conditionalFormat`)」節。
|
|
759
767
|
*/
|
|
760
|
-
conditionalFormat?: GridConditionalFormat<T, F
|
|
768
|
+
conditionalFormat?: GridConditionalFormat<T, F> | undefined;
|
|
761
769
|
/**
|
|
762
770
|
* セル内容の水平寄せ(UI 表示のみ・元の値は不変)。セル表示と編集 input に反映。
|
|
763
771
|
*
|
|
764
772
|
* @defaultValue `'left'`
|
|
765
773
|
*/
|
|
766
|
-
align?: 'left' | 'center' | 'right';
|
|
774
|
+
align?: 'left' | 'center' | 'right' | undefined;
|
|
767
775
|
/**
|
|
768
776
|
* 列見出しの水平寄せ(書かなければ `align` に合わせる。見出しだけ変えたい列に書く)。`'right'`
|
|
769
777
|
* は並びを鏡写しにする(並べ替えの矢印とフィルターの印をラベルの左、ホバーで出る grip と ⋮ も左)。
|
|
@@ -772,40 +780,41 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
|
772
780
|
*
|
|
773
781
|
* @defaultValue `align` と同じ
|
|
774
782
|
*/
|
|
775
|
-
headerAlign?: 'left' | 'center' | 'right';
|
|
783
|
+
headerAlign?: 'left' | 'center' | 'right' | undefined;
|
|
776
784
|
/**
|
|
777
785
|
* セル表示値の整形(UI 表示のみ)。`renderCell` 未指定の既定セルが返り値を表示。組み込み
|
|
778
786
|
* `numberFormatter` 等を渡せる。元の値/編集/コピー/ソート/フィルターには影響しない。
|
|
779
787
|
* グループ行の集計値と合計行の値の整形にも使い、そのときは元の行が無いので `row` は
|
|
780
788
|
* `undefined`(型は `T | undefined`。`row` を読むときは `row?.x` と書く)。
|
|
781
789
|
*/
|
|
782
|
-
valueFormatter?: CellValueFormatter<T, F
|
|
790
|
+
valueFormatter?: CellValueFormatter<T, F> | undefined;
|
|
783
791
|
/**
|
|
784
792
|
* カスタムヘッダー描画。中に置いたボタン / 入力欄 / リンク等(`button` / `input` / `select` /
|
|
785
793
|
* `textarea` / `a[href]` / `label` / `contenteditable` / `role="button"` 等)
|
|
786
794
|
* を押したときは列の範囲選択を始めない(既定動作も止めないため入力欄にフォーカスが入る)。
|
|
787
795
|
* それ以外の部分を押すと従来どおり列を選択する。
|
|
788
796
|
*/
|
|
789
|
-
renderHeader?: (ctx: HeaderRenderContext<T, F>) => F['node'];
|
|
797
|
+
renderHeader?: ((ctx: HeaderRenderContext<T, F>) => F['node']) | undefined;
|
|
790
798
|
/**
|
|
791
799
|
* フィルター UI の種別。`'auto'` は列の値から `numberSet` / `textSet` / `dateSet` を自動判定する
|
|
792
800
|
* opt-in(下記「filterType: 'auto'(自動判定)」節)。`'numberSet'` / `'textSet'` / `'dateSet'`
|
|
793
801
|
* は条件(演算子 + 値)と Set 一覧を 1 つの popover に縦に並べて **AND
|
|
794
802
|
* 結合**する複合フィルター(条件を適用すると Set 候補が連動して絞られる。
|
|
795
|
-
* 候補外になった値の選択は破棄せず保持)。numberSet
|
|
796
|
-
*
|
|
797
|
-
*
|
|
798
|
-
*
|
|
799
|
-
*
|
|
800
|
-
*
|
|
803
|
+
* 候補外になった値の選択は破棄せず保持)。numberSet の一覧は数の順(数でない値はその後ろ、
|
|
804
|
+
* 空白は最後。`filterOptions` / `getFilterOptions` で渡した候補は渡した順)。numberSet の演算子は
|
|
805
|
+
* 以上 / より大きい / 以下 / 未満 / に等しい / に等しくない / 範囲 / 空白 / 空白でない、textSet
|
|
806
|
+
* は を含む / に等しい / で始まる / で終わる / 空白 / 空白でない(判定は大文字小文字無視)。dateSet
|
|
807
|
+
* は 範囲 / 以降 / 以前 / に等しい / に等しくない / 空白 / 空白でない + 相対プリセット(今日 /
|
|
808
|
+
* 今月 / 過去 30 日。**相対のまま保存され評価のたびに解決**)で、Set 部分は年 / 月 / 日の 3
|
|
809
|
+
* 階層ツリー(親は 3 状態チェック)になる。
|
|
801
810
|
*/
|
|
802
|
-
filterType?: ColumnFilterTypeOption;
|
|
811
|
+
filterType?: ColumnFilterTypeOption | undefined;
|
|
803
812
|
/**
|
|
804
813
|
* select / set / numberSet / textSet / dateSet の候補(readonly / `as const` 配列も可)。
|
|
805
814
|
*
|
|
806
815
|
* @defaultValue rows から自動収集
|
|
807
816
|
*/
|
|
808
|
-
filterOptions?: readonly GridSelectFilterOption[];
|
|
817
|
+
filterOptions?: readonly GridSelectFilterOption[] | undefined;
|
|
809
818
|
/**
|
|
810
819
|
* dateSet の相対プリセットチップの構成。`false` / `[]` でチップ行を非表示(オプトアウト)。
|
|
811
820
|
* 配列はビルトイン ID(`'today'` / `'thisMonth'` / `'last30days'`)の再利用とカスタム定義
|
|
@@ -814,9 +823,16 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
|
814
823
|
*
|
|
815
824
|
* @defaultValue ビルトイン 3 種
|
|
816
825
|
*/
|
|
817
|
-
dateFilterPresets?: false | readonly DateFilterPresetOption[];
|
|
818
|
-
/**
|
|
819
|
-
|
|
826
|
+
dateFilterPresets?: false | readonly DateFilterPresetOption[] | undefined;
|
|
827
|
+
/**
|
|
828
|
+
* カスタムフィルター述語。`filterValue` は入力した値そのものではなく、
|
|
829
|
+
* その列のフィルターの記述子(`ColumnFilterValue`)。`filterType: 'custom'` なら
|
|
830
|
+
* `{ kind: 'custom', value: 入力した文字列 }`、ほかの種別ならその種別の形(「列フィルターの wire
|
|
831
|
+
* format」と同じ)。指定するとどの `filterType` でも組み込みの判定より優先する。
|
|
832
|
+
* `filterType: 'custom'` のフィルター画面は文字の入力欄 1 つ(text と同じ画面で、
|
|
833
|
+
* 文言も「部分一致で絞り込み」のまま)で、`filterFn` が無ければ部分一致で絞る。
|
|
834
|
+
*/
|
|
835
|
+
filterFn?: ((row: T, filterValue: unknown) => boolean) | undefined;
|
|
820
836
|
/**
|
|
821
837
|
* セルエディタ種別(判別共用体)。
|
|
822
838
|
* `{ type: 'text' | 'number' | 'select' | 'date' | 'checkbox' | 'custom', ... }`。
|
|
@@ -824,7 +840,7 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
|
824
840
|
*
|
|
825
841
|
* @defaultValue text 相当
|
|
826
842
|
*/
|
|
827
|
-
editor?: GridColumnEditor<T, F
|
|
843
|
+
editor?: GridColumnEditor<T, F> | undefined;
|
|
828
844
|
/**
|
|
829
845
|
* セル値の検証。`true`=有効 / `false`=無効(既定メッセージ)/
|
|
830
846
|
* `string`・`{ message }`=無効+メッセージ。**純粋・軽量であること**(描画中の可視セルごとに毎レンダー評価。
|
|
@@ -832,13 +848,13 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
|
832
848
|
* `validate` の後(`validate` の NG はそのメッセージ、通した値だけ組み込みの検査)。
|
|
833
849
|
* 詳細は「バリデーション」節。
|
|
834
850
|
*/
|
|
835
|
-
validate?: (ctx: CellValidationContext<T, F>) => CellValidationResult;
|
|
851
|
+
validate?: ((ctx: CellValidationContext<T, F>) => CellValidationResult) | undefined;
|
|
836
852
|
/**
|
|
837
853
|
* 検証 NG 時の動作。`'mark'`=値は入るがセルに invalid 表示 / `'reject'`=書き込み自体を拒否。
|
|
838
854
|
*
|
|
839
855
|
* @defaultValue `'mark'`
|
|
840
856
|
*/
|
|
841
|
-
validationMode?: GridValidationMode;
|
|
857
|
+
validationMode?: GridValidationMode | undefined;
|
|
842
858
|
/**
|
|
843
859
|
* 「文字列 → セル値」のパーサ(貼り付け / クリア / エディタ commit
|
|
844
860
|
* で共通)。**明示指定が常に優先**。未指定で `editor` が number / date / checkbox
|
|
@@ -846,9 +862,9 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
|
846
862
|
*
|
|
847
863
|
* @defaultValue editor 既定パーサ
|
|
848
864
|
*/
|
|
849
|
-
parseClipboardValue?: (raw: string, row: T) => unknown;
|
|
865
|
+
parseClipboardValue?: ((raw: string, row: T) => unknown) | undefined;
|
|
850
866
|
/** コピー時のフォーマッタ。 */
|
|
851
|
-
formatClipboardValue?: (value: unknown, row: T) => string;
|
|
867
|
+
formatClipboardValue?: ((value: unknown, row: T) => string) | undefined;
|
|
852
868
|
};
|
|
853
869
|
export type ColumnResizeDragState = {
|
|
854
870
|
type: 'columnResize';
|
|
@@ -978,7 +994,7 @@ export type GridLocaleText = {
|
|
|
978
994
|
globalFilterLabel: string;
|
|
979
995
|
/** 上部バーの検索欄の × の読み上げの名前。既定 `フィルターをクリア`、英語 `Clear filter`。 */
|
|
980
996
|
clearGlobalFilter: string;
|
|
981
|
-
/** 上部バーの絞り込みの要約(押せるとき)
|
|
997
|
+
/** 上部バーの絞り込みの要約(押せるとき)のツールチップと、読み上げの名前の後半(前半は見えている要約。1.0.2 から。1.0.1 まではこの文だけが名前)。既定 `フィルター管理パネルを開閉`、英語 `Show or hide the filter panel`。 */
|
|
982
998
|
toggleFilterPanel: string;
|
|
983
999
|
/** 「クリア」のボタン / ツールチップ。既定 `クリア`、英語 `Clear`。 */
|
|
984
1000
|
clear: string;
|
|
@@ -1095,7 +1111,7 @@ export type GridLocaleText = {
|
|
|
1095
1111
|
menuPinLeft: string;
|
|
1096
1112
|
/** 固定の小メニューの右。既定 `右に固定`、英語 `Pin right`。 */
|
|
1097
1113
|
menuPinRight: string;
|
|
1098
|
-
/** `onColumnsChange` が無いときの固定のツールチップ。既定
|
|
1114
|
+
/** `onColumnsChange` が無いときの固定のツールチップ。既定 `この表では列の固定を変えられません`、英語 `Pinning can't be changed in this grid.`。 */
|
|
1099
1115
|
menuPinUnavailable: string;
|
|
1100
1116
|
/** 列メニューの幅の自動調整。既定 `この列の幅を自動調整`、英語 `Autosize this column`。 */
|
|
1101
1117
|
menuAutosize: string;
|
|
@@ -1105,9 +1121,9 @@ export type GridLocaleText = {
|
|
|
1105
1121
|
menuColumns: string;
|
|
1106
1122
|
/** 列メニューの列のリセット。既定 `列のリセット`、英語 `Reset columns`。 */
|
|
1107
1123
|
menuResetColumns: string;
|
|
1108
|
-
/** 列のリセットのツールチップ(列メニューとツールパネル)。既定
|
|
1124
|
+
/** 列のリセットのツールチップ(列メニューとツールパネル)。既定 `すべての列の幅・固定・表示・並び順・グループ化を初期状態に戻します`、英語 `Restores the width, pinning, visibility, order and grouping of all columns.`。 */
|
|
1109
1125
|
resetColumnsHint: string;
|
|
1110
|
-
/** `onColumnsChange` が無いときの列のリセットのツールチップ。既定 `
|
|
1126
|
+
/** `onColumnsChange` が無いときの列のリセットのツールチップ。既定 `この表では列をリセットできません`、英語 `Columns can't be reset in this grid.`。 */
|
|
1111
1127
|
menuResetUnavailable: string;
|
|
1112
1128
|
/** ツールパネルのタブ。既定 `フィルター`、英語 `Filters`。 */
|
|
1113
1129
|
toolPanelFilters: string;
|
|
@@ -1129,7 +1145,7 @@ export type GridLocaleText = {
|
|
|
1129
1145
|
columnsDragToReorder: string;
|
|
1130
1146
|
/** 列のタブのつまみのツールチップ(固定の区分があるとき)。既定 `ドラッグして並べ替え(同じセクション内のみ)`、英語 `Drag to reorder (within the same section)`。 */
|
|
1131
1147
|
columnsDragWithinSection: string;
|
|
1132
|
-
/** `onColumnsChange` が無いときのつまみのツールチップ。既定 `
|
|
1148
|
+
/** `onColumnsChange` が無いときのつまみのツールチップ。既定 `この表では列を並べ替えられません`、英語 `Columns can't be reordered in this grid.`。 */
|
|
1133
1149
|
columnsReorderUnavailable: string;
|
|
1134
1150
|
/** 列のタブで検索している間のつまみのツールチップ。既定 `検索中は並べ替えできません`、英語 `Columns can't be reordered while searching.`。 */
|
|
1135
1151
|
columnsReorderWhileSearching: string;
|
|
@@ -1145,7 +1161,7 @@ export type GridLocaleText = {
|
|
|
1145
1161
|
columnsNoMatches: string;
|
|
1146
1162
|
/** 列のタブのリセットのボタン。既定 `すべての列を初期状態に戻す`、英語 `Reset all columns`。 */
|
|
1147
1163
|
columnsReset: string;
|
|
1148
|
-
/** `onColumnsChange` が無いときの列のタブのツールチップ。既定
|
|
1164
|
+
/** `onColumnsChange` が無いときの列のタブのツールチップ。既定 `この表では列の表示/非表示とリセットは使えません`、英語 `Showing, hiding and resetting columns isn't available in this grid.`。 */
|
|
1149
1165
|
columnsUnavailable: string;
|
|
1150
1166
|
/** フィルターのタブの検索欄の文字の行。既定 `グローバルフィルター`、英語 `Global filter`。 */
|
|
1151
1167
|
globalFilterTitle: string;
|
|
@@ -1201,7 +1217,7 @@ export type GridLocaleText = {
|
|
|
1201
1217
|
filterEditUnderGroup: string;
|
|
1202
1218
|
/** フィルターのチップのツールチップ。既定 `この列へジャンプして編集`、英語 `Go to this column to edit`。 */
|
|
1203
1219
|
filterJump: string;
|
|
1204
|
-
/**
|
|
1220
|
+
/** フィルターのチップの読み上げの名前の後半(前半は見えている列名と条件。1.0.2 から。1.0.1 まではこの文だけが名前)と、フィルターの管理の ✎ の読み上げの名前。既定 `{column} のフィルターを編集`、英語 `Edit the filter on {column}`。 */
|
|
1205
1221
|
filterEditFor: GridLocaleTextTemplate<{
|
|
1206
1222
|
column: string;
|
|
1207
1223
|
}>;
|
|
@@ -1215,10 +1231,14 @@ export type GridLocaleText = {
|
|
|
1215
1231
|
filterNone: string;
|
|
1216
1232
|
/** `custom` のフィルターの要約(値が文字でないとき)。既定 `カスタム条件`、英語 `Custom filter`。 */
|
|
1217
1233
|
filterCustom: string;
|
|
1218
|
-
/** 値の選択の要約(
|
|
1234
|
+
/** 値の選択の要約(除外。3 件以上か 0 件。`filterExcludedValues` を変えずにこのキーだけを変えた表では 1〜2 件も)。既定 `{count} 件を除外`、英語は数で変わる(関数)。 */
|
|
1219
1235
|
filterExcluded: GridLocaleTextTemplate<{
|
|
1220
1236
|
count: number;
|
|
1221
1237
|
}>;
|
|
1238
|
+
/** 値の選択の要約(除外。1〜2 件は値を並べる)。既定 `{values} を除外`、英語 `Excluding {values}`。 */
|
|
1239
|
+
filterExcludedValues: GridLocaleTextTemplate<{
|
|
1240
|
+
values: string;
|
|
1241
|
+
}>;
|
|
1222
1242
|
/** 値の選択の要約(3 件以上)。既定 `{count} 件を選択`、英語 `{count} selected`。 */
|
|
1223
1243
|
filterSelected: GridLocaleTextTemplate<{
|
|
1224
1244
|
count: number;
|
|
@@ -1506,6 +1526,8 @@ export type GridLocaleText = {
|
|
|
1506
1526
|
min: number;
|
|
1507
1527
|
max: number;
|
|
1508
1528
|
}>;
|
|
1529
|
+
/** date エディタで文字から打ち始めた入力が日付として読めないとき。既定 `日付で入力してください(例: 2026/3/15)`、英語 `Enter a date (e.g. 2026-03-15)`。 */
|
|
1530
|
+
enterDate: string;
|
|
1509
1531
|
/** serverSide の保存に失敗したセルの下に出るチップ(`showSaveStatus`)。既定 `保存に失敗しました。値を戻しました`、英語 `Couldn't save. The value was restored.`。 */
|
|
1510
1532
|
saveFailedCell: string;
|
|
1511
1533
|
/** serverSide の読み込みに失敗したときのバー。既定 `行の取得に失敗しました({count} ブロック)`、英語は数で変わる(関数)。 */
|
|
@@ -1579,7 +1601,7 @@ export type SpreadsheetGridSlotContext<T, F extends GridFrameworkTypes = GridFra
|
|
|
1579
1601
|
derivedSummary: SpreadsheetGridDerivedSummary;
|
|
1580
1602
|
globalFilterStatus: GlobalFilterStatus;
|
|
1581
1603
|
globalFilterProgress: number;
|
|
1582
|
-
selectionAggregates?: GridSelectionAggregates | null;
|
|
1604
|
+
selectionAggregates?: GridSelectionAggregates | null | undefined;
|
|
1583
1605
|
};
|
|
1584
1606
|
export type GridContextMenuTarget<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
1585
1607
|
type: 'cell';
|
|
@@ -1631,26 +1653,26 @@ export type GridContextMenuParams<T, F extends GridFrameworkTypes = GridFramewor
|
|
|
1631
1653
|
isTargetSelected: boolean;
|
|
1632
1654
|
};
|
|
1633
1655
|
export type GridContextMenuActionItem<F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
1634
|
-
kind?: 'action';
|
|
1635
|
-
id?: string;
|
|
1656
|
+
kind?: 'action' | undefined;
|
|
1657
|
+
id?: string | undefined;
|
|
1636
1658
|
label: F['node'];
|
|
1637
|
-
icon?: F['node'];
|
|
1638
|
-
disabled?: boolean;
|
|
1639
|
-
danger?: boolean;
|
|
1659
|
+
icon?: F['node'] | undefined;
|
|
1660
|
+
disabled?: boolean | undefined;
|
|
1661
|
+
danger?: boolean | undefined;
|
|
1640
1662
|
onSelect: () => void;
|
|
1641
1663
|
};
|
|
1642
1664
|
export type GridContextMenuLabelItem<F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
1643
1665
|
kind: 'label';
|
|
1644
|
-
id?: string;
|
|
1666
|
+
id?: string | undefined;
|
|
1645
1667
|
label: F['node'];
|
|
1646
1668
|
};
|
|
1647
1669
|
export type GridContextMenuSeparatorItem = {
|
|
1648
1670
|
kind: 'separator';
|
|
1649
|
-
id?: string;
|
|
1671
|
+
id?: string | undefined;
|
|
1650
1672
|
};
|
|
1651
1673
|
export type GridContextMenuCustomItem<F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
1652
1674
|
kind: 'custom';
|
|
1653
|
-
id?: string;
|
|
1675
|
+
id?: string | undefined;
|
|
1654
1676
|
render: (ctx: {
|
|
1655
1677
|
close: () => void;
|
|
1656
1678
|
}) => F['node'];
|
|
@@ -1688,12 +1710,12 @@ export type GridCellDoubleClickParams<T, F extends GridFrameworkTypes = GridFram
|
|
|
1688
1710
|
preventDefault: () => void;
|
|
1689
1711
|
};
|
|
1690
1712
|
export type GridSlotProps<F extends GridFrameworkTypes = GridFrameworkTypes> = string | {
|
|
1691
|
-
className?: string;
|
|
1692
|
-
style?: F['style'];
|
|
1713
|
+
className?: string | undefined;
|
|
1714
|
+
style?: F['style'] | undefined;
|
|
1693
1715
|
};
|
|
1694
1716
|
export type GridResolvedSlot<F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
1695
|
-
className?: string;
|
|
1696
|
-
style?: F['style'];
|
|
1717
|
+
className?: string | undefined;
|
|
1718
|
+
style?: F['style'] | undefined;
|
|
1697
1719
|
};
|
|
1698
1720
|
export type GridResolvedSlots<F extends GridFrameworkTypes = GridFrameworkTypes> = Partial<Record<keyof GridClassNames<F>, GridResolvedSlot<F>>>;
|
|
1699
1721
|
/**
|
|
@@ -1704,117 +1726,117 @@ export type GridResolvedSlots<F extends GridFrameworkTypes = GridFrameworkTypes>
|
|
|
1704
1726
|
*/
|
|
1705
1727
|
export type GridClassNames<F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
1706
1728
|
/** 付与先: ルート要素 `.ssg-root`(`className` / `style` prop と同じ要素) */
|
|
1707
|
-
root?: GridSlotProps<F
|
|
1729
|
+
root?: GridSlotProps<F> | undefined;
|
|
1708
1730
|
/**
|
|
1709
1731
|
* `toolbar` / `statusBar`: 付与先: 既定トップバー `.ssg-bar--top` / 既定ボトムバー
|
|
1710
1732
|
* `.ssg-bar--bottom`(`renderTopBar` / `renderBottomBar` 指定時は対象外)
|
|
1711
1733
|
*/
|
|
1712
|
-
toolbar?: GridSlotProps<F
|
|
1734
|
+
toolbar?: GridSlotProps<F> | undefined;
|
|
1713
1735
|
/**
|
|
1714
1736
|
* `toolbar` / `statusBar`: 付与先: 既定トップバー `.ssg-bar--top` / 既定ボトムバー
|
|
1715
1737
|
* `.ssg-bar--bottom`(`renderTopBar` / `renderBottomBar` 指定時は対象外)
|
|
1716
1738
|
*/
|
|
1717
|
-
statusBar?: GridSlotProps<F
|
|
1739
|
+
statusBar?: GridSlotProps<F> | undefined;
|
|
1718
1740
|
/**
|
|
1719
1741
|
* `headerRow` / `headerCell`: 付与先: ヘッダー行 /
|
|
1720
1742
|
* 列ヘッダーセル(コーナー・行ヘッダーセルは含まない)
|
|
1721
1743
|
*/
|
|
1722
|
-
headerRow?: GridSlotProps<F
|
|
1744
|
+
headerRow?: GridSlotProps<F> | undefined;
|
|
1723
1745
|
/**
|
|
1724
1746
|
* `headerRow` / `headerCell`: 付与先: ヘッダー行 /
|
|
1725
1747
|
* 列ヘッダーセル(コーナー・行ヘッダーセルは含まない)
|
|
1726
1748
|
*/
|
|
1727
|
-
headerCell?: GridSlotProps<F
|
|
1749
|
+
headerCell?: GridSlotProps<F> | undefined;
|
|
1728
1750
|
/** `bodyRow` / `bodyCell`: 付与先: 本体行(データ / スケルトン / グループ行)/ データセル */
|
|
1729
|
-
bodyRow?: GridSlotProps<F
|
|
1751
|
+
bodyRow?: GridSlotProps<F> | undefined;
|
|
1730
1752
|
/** `bodyRow` / `bodyCell`: 付与先: 本体行(データ / スケルトン / グループ行)/ データセル */
|
|
1731
|
-
bodyCell?: GridSlotProps<F
|
|
1753
|
+
bodyCell?: GridSlotProps<F> | undefined;
|
|
1732
1754
|
/**
|
|
1733
1755
|
* `rowHeaderCell` / `cornerCell`: 付与先: 行ヘッダー「#」セルとコーナーセル(`rowHeaderCell`
|
|
1734
1756
|
* は両方、`cornerCell` はコーナーのみ)
|
|
1735
1757
|
*/
|
|
1736
|
-
rowHeaderCell?: GridSlotProps<F
|
|
1758
|
+
rowHeaderCell?: GridSlotProps<F> | undefined;
|
|
1737
1759
|
/** 付与先: ヘッダーのアイコンボタン `.ssg-icon-btn` */
|
|
1738
|
-
iconButton?: GridSlotProps<F
|
|
1760
|
+
iconButton?: GridSlotProps<F> | undefined;
|
|
1739
1761
|
/**
|
|
1740
1762
|
* `rowHeaderCell` / `cornerCell`: 付与先: 行ヘッダー「#」セルとコーナーセル(`rowHeaderCell`
|
|
1741
1763
|
* は両方、`cornerCell` はコーナーのみ)
|
|
1742
1764
|
*/
|
|
1743
|
-
cornerCell?: GridSlotProps<F
|
|
1765
|
+
cornerCell?: GridSlotProps<F> | undefined;
|
|
1744
1766
|
/**
|
|
1745
1767
|
* `groupRow` / `groupCell`: 付与先: グループ行 / グループ行のセル(`bodyRow` / `bodyCell`
|
|
1746
1768
|
* に加えて付与)
|
|
1747
1769
|
*/
|
|
1748
|
-
groupRow?: GridSlotProps<F
|
|
1770
|
+
groupRow?: GridSlotProps<F> | undefined;
|
|
1749
1771
|
/**
|
|
1750
1772
|
* `groupRow` / `groupCell`: 付与先: グループ行 / グループ行のセル(`bodyRow` / `bodyCell`
|
|
1751
1773
|
* に加えて付与)
|
|
1752
1774
|
*/
|
|
1753
|
-
groupCell?: GridSlotProps<F
|
|
1775
|
+
groupCell?: GridSlotProps<F> | undefined;
|
|
1754
1776
|
/**
|
|
1755
1777
|
* `detailBand` / `detailCard`: 付与先: 展開行の帯 / カード(`detailRow.className` に加えて付与)
|
|
1756
1778
|
*/
|
|
1757
|
-
detailBand?: GridSlotProps<F
|
|
1779
|
+
detailBand?: GridSlotProps<F> | undefined;
|
|
1758
1780
|
/**
|
|
1759
1781
|
* `detailBand` / `detailCard`: 付与先: 展開行の帯 / カード(`detailRow.className` に加えて付与)
|
|
1760
1782
|
*/
|
|
1761
|
-
detailCard?: GridSlotProps<F
|
|
1783
|
+
detailCard?: GridSlotProps<F> | undefined;
|
|
1762
1784
|
/**
|
|
1763
1785
|
* `labelRow` / `labelRowContent`: 付与先: ラベル行(見出し / 区切り行)の行要素
|
|
1764
1786
|
* `.ssg-body-row[data-ssg-label-row]`(`bodyRow` / `labelRow.className` に加えて付与。
|
|
1765
1787
|
* 縦固定の複製にも付く)/ 中身の器 `.ssg-label-row-content`
|
|
1766
1788
|
*/
|
|
1767
|
-
labelRow?: GridSlotProps<F
|
|
1789
|
+
labelRow?: GridSlotProps<F> | undefined;
|
|
1768
1790
|
/**
|
|
1769
1791
|
* `labelRow` / `labelRowContent`: 付与先: ラベル行(見出し / 区切り行)の行要素
|
|
1770
1792
|
* `.ssg-body-row[data-ssg-label-row]`(`bodyRow` / `labelRow.className` に加えて付与。
|
|
1771
1793
|
* 縦固定の複製にも付く)/ 中身の器 `.ssg-label-row-content`
|
|
1772
1794
|
*/
|
|
1773
|
-
labelRowContent?: GridSlotProps<F
|
|
1795
|
+
labelRowContent?: GridSlotProps<F> | undefined;
|
|
1774
1796
|
/**
|
|
1775
1797
|
* `totalRow` / `totalCell`: 付与先: 合計行の行要素 `.ssg-total-row`(3 ペイン分。
|
|
1776
1798
|
* `totalRow.className` に加えて付与)/ 合計行のセル `.ssg-total-cell`(`bodyCell` に加えて付与)
|
|
1777
1799
|
*/
|
|
1778
|
-
totalRow?: GridSlotProps<F
|
|
1800
|
+
totalRow?: GridSlotProps<F> | undefined;
|
|
1779
1801
|
/**
|
|
1780
1802
|
* `totalRow` / `totalCell`: 付与先: 合計行の行要素 `.ssg-total-row`(3 ペイン分。
|
|
1781
1803
|
* `totalRow.className` に加えて付与)/ 合計行のセル `.ssg-total-cell`(`bodyCell` に加えて付与)
|
|
1782
1804
|
*/
|
|
1783
|
-
totalCell?: GridSlotProps<F
|
|
1805
|
+
totalCell?: GridSlotProps<F> | undefined;
|
|
1784
1806
|
/**
|
|
1785
1807
|
* 付与先: ポータル系パネルの root(列メニュー / フィルター / コンテキストメニュー / select
|
|
1786
1808
|
* エディタ候補 / ツールパネル。`document.body` 直下)
|
|
1787
1809
|
*/
|
|
1788
|
-
popover?: GridSlotProps<F
|
|
1810
|
+
popover?: GridSlotProps<F> | undefined;
|
|
1789
1811
|
/** 付与先: メニュー項目 `.ssg-menu-item`(列メニュー / コンテキストメニュー) */
|
|
1790
|
-
menuItem?: GridSlotProps<F
|
|
1812
|
+
menuItem?: GridSlotProps<F> | undefined;
|
|
1791
1813
|
/**
|
|
1792
1814
|
* 付与先: カスタムツールチップ `.ssg-tooltip`(body 直下のシングルトン。
|
|
1793
1815
|
* 複数グリッド同居時は最後に更新したグリッドの値)
|
|
1794
1816
|
*/
|
|
1795
|
-
tooltip?: GridSlotProps<F
|
|
1817
|
+
tooltip?: GridSlotProps<F> | undefined;
|
|
1796
1818
|
/** 付与先: 列 / 行ドラッグのゴースト `[data-grid-drag-ghost]` */
|
|
1797
|
-
dragGhost?: GridSlotProps<F
|
|
1819
|
+
dragGhost?: GridSlotProps<F> | undefined;
|
|
1798
1820
|
/** 付与先: 行選択 / checkbox 列のチェックボックス glyph `.ssg-row-checkbox` */
|
|
1799
|
-
checkbox?: GridSlotProps<F
|
|
1821
|
+
checkbox?: GridSlotProps<F> | undefined;
|
|
1800
1822
|
/** 付与先: セルエディタの枠 `.ssg-cell-editor` */
|
|
1801
|
-
cellEditor?: GridSlotProps<F
|
|
1823
|
+
cellEditor?: GridSlotProps<F> | undefined;
|
|
1802
1824
|
/** 付与先: 0 行時の空状態 `.ssg-empty-state` */
|
|
1803
|
-
emptyState?: GridSlotProps<F
|
|
1825
|
+
emptyState?: GridSlotProps<F> | undefined;
|
|
1804
1826
|
/** 付与先: フィルターチップバー `.ssg-filter-chip-bar` */
|
|
1805
|
-
filterChipBar?: GridSlotProps<F
|
|
1827
|
+
filterChipBar?: GridSlotProps<F> | undefined;
|
|
1806
1828
|
/** 付与先: SSRM のエラーバー `.ssg-ssrm-error-bar` */
|
|
1807
|
-
errorBar?: GridSlotProps<F
|
|
1829
|
+
errorBar?: GridSlotProps<F> | undefined;
|
|
1808
1830
|
/** 付与先: スクロール位置インジケーター `.ssg-scroll-hint` */
|
|
1809
|
-
scrollHint?: GridSlotProps<F
|
|
1831
|
+
scrollHint?: GridSlotProps<F> | undefined;
|
|
1810
1832
|
/** `activeCellOverlay` / `selectionOverlay`: 付与先: アクティブセル枠 / 範囲選択の塗り */
|
|
1811
|
-
activeCellOverlay?: GridSlotProps<F
|
|
1833
|
+
activeCellOverlay?: GridSlotProps<F> | undefined;
|
|
1812
1834
|
/** `activeCellOverlay` / `selectionOverlay`: 付与先: アクティブセル枠 / 範囲選択の塗り */
|
|
1813
|
-
selectionOverlay?: GridSlotProps<F
|
|
1835
|
+
selectionOverlay?: GridSlotProps<F> | undefined;
|
|
1814
1836
|
/** 付与先: コピー範囲の動く点線 `.ssg-copy-range-overlay` */
|
|
1815
|
-
copyRangeOverlay?: GridSlotProps<F
|
|
1837
|
+
copyRangeOverlay?: GridSlotProps<F> | undefined;
|
|
1816
1838
|
/** 付与先: セル内検索バー `.ssg-find-bar` */
|
|
1817
|
-
findBar?: GridSlotProps<F
|
|
1839
|
+
findBar?: GridSlotProps<F> | undefined;
|
|
1818
1840
|
};
|
|
1819
1841
|
export type ScrollAlign = 'auto' | 'start' | 'center' | 'end';
|
|
1820
1842
|
export type GridScrollPosition = {
|
|
@@ -1836,20 +1858,20 @@ export type GridScrollEventParams = {
|
|
|
1836
1858
|
*/
|
|
1837
1859
|
export type CsvExportScope = 'view' | 'raw' | 'rendered' | 'selection';
|
|
1838
1860
|
export type CsvExportOptions = {
|
|
1839
|
-
scope?: CsvExportScope;
|
|
1840
|
-
includeHeaders?: boolean;
|
|
1841
|
-
delimiter?: string;
|
|
1842
|
-
bom?: boolean;
|
|
1843
|
-
escapeFormulas?: boolean;
|
|
1844
|
-
includeLabelRows?: boolean;
|
|
1845
|
-
includeTotalRow?: boolean;
|
|
1846
|
-
includeGroupRows?: boolean;
|
|
1861
|
+
scope?: CsvExportScope | undefined;
|
|
1862
|
+
includeHeaders?: boolean | undefined;
|
|
1863
|
+
delimiter?: string | undefined;
|
|
1864
|
+
bom?: boolean | undefined;
|
|
1865
|
+
escapeFormulas?: boolean | undefined;
|
|
1866
|
+
includeLabelRows?: boolean | undefined;
|
|
1867
|
+
includeTotalRow?: boolean | undefined;
|
|
1868
|
+
includeGroupRows?: boolean | undefined;
|
|
1847
1869
|
};
|
|
1848
1870
|
export type GridExportOptions = {
|
|
1849
|
-
scope?: CsvExportScope;
|
|
1850
|
-
includeLabelRows?: boolean;
|
|
1851
|
-
includeTotalRow?: boolean;
|
|
1852
|
-
includeGroupRows?: boolean;
|
|
1871
|
+
scope?: CsvExportScope | undefined;
|
|
1872
|
+
includeLabelRows?: boolean | undefined;
|
|
1873
|
+
includeTotalRow?: boolean | undefined;
|
|
1874
|
+
includeGroupRows?: boolean | undefined;
|
|
1853
1875
|
};
|
|
1854
1876
|
export type GridExportCell = {
|
|
1855
1877
|
value: unknown;
|
|
@@ -1861,30 +1883,30 @@ export type GridExportData = {
|
|
|
1861
1883
|
title: string;
|
|
1862
1884
|
}[];
|
|
1863
1885
|
rows: GridExportCell[][];
|
|
1864
|
-
rowKinds?: Array<'data' | 'label' | 'total' | 'group'
|
|
1886
|
+
rowKinds?: Array<'data' | 'label' | 'total' | 'group'> | undefined;
|
|
1865
1887
|
};
|
|
1866
1888
|
export type GridColumnState = {
|
|
1867
1889
|
key: string;
|
|
1868
|
-
visible?: boolean;
|
|
1869
|
-
pinned?: GridColumnPinned;
|
|
1890
|
+
visible?: boolean | undefined;
|
|
1891
|
+
pinned?: GridColumnPinned | undefined;
|
|
1870
1892
|
};
|
|
1871
1893
|
export type GridState = {
|
|
1872
1894
|
version: number;
|
|
1873
1895
|
columnWidths: Record<string, number>;
|
|
1874
1896
|
filters: GridFilterState;
|
|
1875
1897
|
sort: GridSortState;
|
|
1876
|
-
columns?: GridColumnState[];
|
|
1898
|
+
columns?: GridColumnState[] | undefined;
|
|
1877
1899
|
};
|
|
1878
1900
|
/**
|
|
1879
1901
|
* `applyState` に渡す状態。`getState()` の値をそのまま渡せる。渡したスライスだけを変え、省略した(`undefined` の)
|
|
1880
1902
|
* スライスは今のまま残す(`filters` も `globalText` / `columnFilters` の片方だけ渡せる)。
|
|
1881
1903
|
*/
|
|
1882
1904
|
export type GridStatePatch = {
|
|
1883
|
-
version?: number;
|
|
1884
|
-
columnWidths?: Record<string, number
|
|
1885
|
-
filters?: Partial<GridFilterState
|
|
1886
|
-
sort?: GridSortState;
|
|
1887
|
-
columns?: GridColumnState[];
|
|
1905
|
+
version?: number | undefined;
|
|
1906
|
+
columnWidths?: Record<string, number> | undefined;
|
|
1907
|
+
filters?: Partial<GridFilterState> | undefined;
|
|
1908
|
+
sort?: GridSortState | undefined;
|
|
1909
|
+
columns?: GridColumnState[] | undefined;
|
|
1888
1910
|
};
|
|
1889
1911
|
/**
|
|
1890
1912
|
* 命令的 API です(`ref` prop で受け取るハンドル)。状態は props で controlled のまま、props で表現しづらい
|
|
@@ -1902,11 +1924,14 @@ export type SpreadsheetGridHandle<T> = {
|
|
|
1902
1924
|
* の表では、`'start'` と上へ動かす `'auto'` は行を固定した見出しの下に置く。
|
|
1903
1925
|
*/
|
|
1904
1926
|
scrollToRow: (viewRowIndex: number, options?: {
|
|
1905
|
-
align?: ScrollAlign;
|
|
1927
|
+
align?: ScrollAlign | undefined;
|
|
1906
1928
|
}) => void;
|
|
1907
|
-
/**
|
|
1929
|
+
/**
|
|
1930
|
+
* 指定セルを縦横とも可視域へ。固定列(左右ピン)は常に可視のため横スクロールしない。`'auto'` では、
|
|
1931
|
+
* 見える幅より広い列は左端に合わせる。
|
|
1932
|
+
*/
|
|
1908
1933
|
scrollToCell: (viewRowIndex: number, colIndex: number, options?: {
|
|
1909
|
-
align?: ScrollAlign;
|
|
1934
|
+
align?: ScrollAlign | undefined;
|
|
1910
1935
|
}) => void;
|
|
1911
1936
|
/**
|
|
1912
1937
|
* `scrollToTop()` / `scrollToBottom()`: 先頭 / 末尾へ。行高を実測するモード(auto-height 列 /
|
|
@@ -1937,10 +1962,10 @@ export type SpreadsheetGridHandle<T> = {
|
|
|
1937
1962
|
* は途中フレームの `onScroll` が `source:'user'` になり得る)。
|
|
1938
1963
|
*/
|
|
1939
1964
|
setScrollPosition: (position: {
|
|
1940
|
-
top?: number;
|
|
1941
|
-
left?: number;
|
|
1965
|
+
top?: number | undefined;
|
|
1966
|
+
left?: number | undefined;
|
|
1942
1967
|
}, options?: {
|
|
1943
|
-
behavior?: 'auto' | 'smooth';
|
|
1968
|
+
behavior?: 'auto' | 'smooth' | undefined;
|
|
1944
1969
|
}) => void;
|
|
1945
1970
|
/**
|
|
1946
1971
|
* 現在のアクティブセル `{ row, col }`(なければ `null`)。`selectCell` / `setActiveCell` /
|
|
@@ -1953,18 +1978,20 @@ export type SpreadsheetGridHandle<T> = {
|
|
|
1953
1978
|
* で可視化も行う(固定列のセルでも縦方向へスクロールする)。中央ペイン(固定でない列)のセルは、
|
|
1954
1979
|
* 指定が無くてもアクティブセルの位置が変わると見える位置までスクロールされる(クリック /
|
|
1955
1980
|
* キー操作と同じ動き)。ラベル行(`labelRow`)を指したときは、下のデータ行(無ければ上)へ寄せる。
|
|
1981
|
+
* フォーカスは移さない(続けてキー操作や入力を受けたいときは `focus()` も呼ぶ)。
|
|
1956
1982
|
*/
|
|
1957
1983
|
setActiveCell: (cell: CellCoord | null, options?: {
|
|
1958
|
-
scrollIntoView?: boolean;
|
|
1984
|
+
scrollIntoView?: boolean | undefined;
|
|
1959
1985
|
}) => void;
|
|
1960
1986
|
/** 現在の選択状態(`GridSelection`)。 */
|
|
1961
1987
|
getSelection: () => GridSelection;
|
|
1962
1988
|
/**
|
|
1963
1989
|
* 単一セル選択(クリック相当)。スクロールの扱いと、ラベル行を指したときの扱いは `setActiveCell`
|
|
1964
|
-
*
|
|
1990
|
+
* と同じ。クリックと違ってフォーカスは移さない(続けてキー操作や入力を受けたいときは `focus()`
|
|
1991
|
+
* も呼ぶ)。
|
|
1965
1992
|
*/
|
|
1966
1993
|
selectCell: (viewRowIndex: number, colIndex: number, options?: {
|
|
1967
|
-
scrollIntoView?: boolean;
|
|
1994
|
+
scrollIntoView?: boolean | undefined;
|
|
1968
1995
|
}) => void;
|
|
1969
1996
|
/**
|
|
1970
1997
|
* セル範囲選択(ドラッグ相当)。アンカーは `range.start`。`range.start` がラベル行のときは、
|
|
@@ -1972,7 +1999,7 @@ export type SpreadsheetGridHandle<T> = {
|
|
|
1972
1999
|
* 範囲がラベル行だけのときは、寄せたデータ行の同じ列の範囲にする。
|
|
1973
2000
|
*/
|
|
1974
2001
|
selectRange: (range: CellRange, options?: {
|
|
1975
|
-
scrollIntoView?: boolean;
|
|
2002
|
+
scrollIntoView?: boolean | undefined;
|
|
1976
2003
|
}) => void;
|
|
1977
2004
|
/** 選択解除。 */
|
|
1978
2005
|
clearSelection: () => void;
|
|
@@ -2180,15 +2207,15 @@ export type GridTheme = 'light' | 'dark' | 'auto' | 'class';
|
|
|
2180
2207
|
/** データバー(値の大きさを背景の帯で示す)。`conditionalFormat.dataBar` の設定。 */
|
|
2181
2208
|
export type GridDataBarFormat = {
|
|
2182
2209
|
/** 帯の下限。省略時はビュー行(フィルター / ソート適用後。SSRM はロード済み範囲)の数値の最小値。 */
|
|
2183
|
-
min?: number;
|
|
2210
|
+
min?: number | undefined;
|
|
2184
2211
|
/** 帯の上限。省略時はビュー行の数値の最大値。 */
|
|
2185
|
-
max?: number;
|
|
2212
|
+
max?: number | undefined;
|
|
2186
2213
|
/** 帯の色(CSS 色)。省略時はトークン `--ssg-cf-bar`。 */
|
|
2187
|
-
color?: string;
|
|
2214
|
+
color?: string | undefined;
|
|
2188
2215
|
/** 負の値の帯の色(CSS 色)。省略時はトークン `--ssg-cf-bar-negative`。 */
|
|
2189
|
-
negativeColor?: string;
|
|
2216
|
+
negativeColor?: string | undefined;
|
|
2190
2217
|
/** `false` で値の文字を出さず帯だけにする(既定 `true`)。 */
|
|
2191
|
-
showValue?: boolean;
|
|
2218
|
+
showValue?: boolean | undefined;
|
|
2192
2219
|
};
|
|
2193
2220
|
/** カラースケール(値に応じてセル背景を段階的に染める)。`conditionalFormat.colorScale` の設定。 */
|
|
2194
2221
|
export type GridColorScaleFormat = {
|
|
@@ -2196,49 +2223,49 @@ export type GridColorScaleFormat = {
|
|
|
2196
2223
|
* `'sequential'`(既定): 1 色相の淡 → 濃(量)。`'diverging'`: `mid` を中立色に、負側 / 正側を別の色相で
|
|
2197
2224
|
* 濃くする(基準からの向き)。
|
|
2198
2225
|
*/
|
|
2199
|
-
type?: 'sequential' | 'diverging';
|
|
2226
|
+
type?: 'sequential' | 'diverging' | undefined;
|
|
2200
2227
|
/** 下限。省略時はビュー行の数値の最小値。 */
|
|
2201
|
-
min?: number;
|
|
2228
|
+
min?: number | undefined;
|
|
2202
2229
|
/** `'diverging'` の中立点。省略時は `min < 0 < max` なら `0`、それ以外は `(min + max) / 2`。 */
|
|
2203
|
-
mid?: number;
|
|
2230
|
+
mid?: number | undefined;
|
|
2204
2231
|
/** 上限。省略時はビュー行の数値の最大値。 */
|
|
2205
|
-
max?: number;
|
|
2232
|
+
max?: number | undefined;
|
|
2206
2233
|
/**
|
|
2207
2234
|
* 色の段(CSS 色)。`'sequential'` は `[淡, 濃]`、`'diverging'` は `[負側, 中立, 正側]`。省略時はトークン
|
|
2208
2235
|
* (`--ssg-cf-seq-min` / `--ssg-cf-seq-max`、`--ssg-cf-div-negative` / `--ssg-cf-div-mid` / `--ssg-cf-div-positive`)。
|
|
2209
2236
|
*/
|
|
2210
|
-
colors?: readonly string[];
|
|
2237
|
+
colors?: readonly string[] | undefined;
|
|
2211
2238
|
};
|
|
2212
2239
|
/** 状態チップの色味。アイコンとラベルを伴う(色だけで意味を運ばない)。 */
|
|
2213
2240
|
export type GridChipTone = 'neutral' | 'info' | 'good' | 'warning' | 'critical';
|
|
2214
2241
|
/** 状態チップ 1 つの指定。 */
|
|
2215
2242
|
export type GridChipSpec = {
|
|
2216
2243
|
/** 色味(既定 `'neutral'`)。 */
|
|
2217
|
-
tone?: GridChipTone;
|
|
2244
|
+
tone?: GridChipTone | undefined;
|
|
2218
2245
|
/** ラベル。省略時はセルの表示文字列(`valueFormatter` 適用後)。 */
|
|
2219
|
-
label?: string;
|
|
2246
|
+
label?: string | undefined;
|
|
2220
2247
|
/** `false` でアイコンを出さない(既定 `true`)。 */
|
|
2221
|
-
icon?: boolean;
|
|
2248
|
+
icon?: boolean | undefined;
|
|
2222
2249
|
/** 任意の色(CSS 色)。`tone` の色より優先。 */
|
|
2223
|
-
color?: string;
|
|
2250
|
+
color?: string | undefined;
|
|
2224
2251
|
};
|
|
2225
2252
|
/** 値(`String(value)`)→ チップのマップ。値は色味の文字列か `GridChipSpec`。載っていない値はチップにしない。 */
|
|
2226
2253
|
export type GridChipMap = Readonly<Record<string, GridChipTone | GridChipSpec>>;
|
|
2227
2254
|
/** 条件付き書式(`GridColumn.conditionalFormat`)。複数を同時に指定できる(帯 + 背景色など)。 */
|
|
2228
2255
|
export type GridConditionalFormat<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
|
|
2229
2256
|
/** データバー。 */
|
|
2230
|
-
dataBar?: GridDataBarFormat;
|
|
2257
|
+
dataBar?: GridDataBarFormat | undefined;
|
|
2231
2258
|
/** カラースケール。 */
|
|
2232
|
-
colorScale?: GridColorScaleFormat;
|
|
2259
|
+
colorScale?: GridColorScaleFormat | undefined;
|
|
2233
2260
|
/**
|
|
2234
2261
|
* 状態チップ。値 → チップのマップか、セルのコンテキスト(`cellClassName` の関数版と同じ)から
|
|
2235
2262
|
* チップを返す関数(`null` / `undefined` でチップにしない)。
|
|
2236
2263
|
*/
|
|
2237
|
-
chips?: GridChipMap | ((ctx: CellStyleContext<T, F>) => GridChipTone | GridChipSpec | null | undefined);
|
|
2264
|
+
chips?: GridChipMap | ((ctx: CellStyleContext<T, F>) => GridChipTone | GridChipSpec | null | undefined) | undefined;
|
|
2238
2265
|
};
|
|
2239
2266
|
export type FindOptions = {
|
|
2240
|
-
shortcut?: boolean;
|
|
2241
|
-
caseSensitive?: boolean;
|
|
2267
|
+
shortcut?: boolean | undefined;
|
|
2268
|
+
caseSensitive?: boolean | undefined;
|
|
2242
2269
|
};
|
|
2243
2270
|
export type FindChangeParams = {
|
|
2244
2271
|
query: string;
|
|
@@ -2265,20 +2292,20 @@ export type ScrollHintOptions<T = unknown, F extends GridFrameworkTypes = GridFr
|
|
|
2265
2292
|
*
|
|
2266
2293
|
* @defaultValue `true`
|
|
2267
2294
|
*/
|
|
2268
|
-
bubble?: boolean;
|
|
2295
|
+
bubble?: boolean | undefined;
|
|
2269
2296
|
/**
|
|
2270
2297
|
* ルーラー + ジャンプ先プレビューの表示。
|
|
2271
2298
|
*
|
|
2272
2299
|
* @defaultValue `true`
|
|
2273
2300
|
*/
|
|
2274
|
-
ruler?: boolean;
|
|
2301
|
+
ruler?: boolean | undefined;
|
|
2275
2302
|
/**
|
|
2276
2303
|
* カスタム縦スクロールバー(専用ガター・常時表示)。`false`
|
|
2277
2304
|
* でネイティブバーのまま(バブル等は疑似サム位置に表示)。
|
|
2278
2305
|
*
|
|
2279
2306
|
* @defaultValue `true`
|
|
2280
2307
|
*/
|
|
2281
|
-
scrollbar?: boolean;
|
|
2308
|
+
scrollbar?: boolean | undefined;
|
|
2282
2309
|
/**
|
|
2283
2310
|
* バブル / ルーラーの表示トリガー(スクロールバー自体は常時表示)。`'scroll'` =
|
|
2284
2311
|
* スクロール中のみ(停止約 1 秒でフェードアウト)/ `'hover'` = グリッドホバー中 + スクロール中 /
|
|
@@ -2286,7 +2313,7 @@ export type ScrollHintOptions<T = unknown, F extends GridFrameworkTypes = GridFr
|
|
|
2286
2313
|
*
|
|
2287
2314
|
* @defaultValue `'scroll'`
|
|
2288
2315
|
*/
|
|
2289
|
-
trigger?: ScrollHintTrigger;
|
|
2316
|
+
trigger?: ScrollHintTrigger | undefined;
|
|
2290
2317
|
/**
|
|
2291
2318
|
* **データ量ゲート**。表示行数(フィルター / グルーピング適用後のビュー行数。SSRM
|
|
2292
2319
|
* はサーバー総行数)がこの値未満のあいだ、scrollHint 全体(カスタムスクロールバー含む)を自動 OFF
|
|
@@ -2294,14 +2321,14 @@ export type ScrollHintOptions<T = unknown, F extends GridFrameworkTypes = GridFr
|
|
|
2294
2321
|
*
|
|
2295
2322
|
* @defaultValue `0`
|
|
2296
2323
|
*/
|
|
2297
|
-
minRows?: number;
|
|
2324
|
+
minRows?: number | undefined;
|
|
2298
2325
|
/** 行番号に添えて表示する列 key(= 行オブジェクトのフィールド名)。 */
|
|
2299
|
-
hintColumn?: string;
|
|
2326
|
+
hintColumn?: string | undefined;
|
|
2300
2327
|
/**
|
|
2301
2328
|
* 表示内容の完全カスタム(`hintColumn` より優先)。`null` / `undefined`
|
|
2302
2329
|
* を返すと行番号のみの既定表示。
|
|
2303
2330
|
*/
|
|
2304
|
-
renderHint?: (args: ScrollHintRenderArgs<T>) => F['node'];
|
|
2331
|
+
renderHint?: ((args: ScrollHintRenderArgs<T>) => F['node']) | undefined;
|
|
2305
2332
|
};
|
|
2306
2333
|
/**
|
|
2307
2334
|
* `SpreadsheetGrid` の props です(React 版では `ref` prop が加わります)。
|
|
@@ -2316,7 +2343,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2316
2343
|
* を渡して呼ばれる。保存タイミングの signal(例: localStorage 自動保存)。発火規約は「状態の保存 /
|
|
2317
2344
|
* 復元」節を参照。
|
|
2318
2345
|
*/
|
|
2319
|
-
onStateChange?: (state: GridState) => void;
|
|
2346
|
+
onStateChange?: ((state: GridState) => void) | undefined;
|
|
2320
2347
|
/**
|
|
2321
2348
|
* 状態(列幅 / フィルター / ソート)の初期値。**最初の 1 回(マウント時)だけ**使い、
|
|
2322
2349
|
* 後から変えても今の状態は変わらない(変えるときは `applyState`)。最初の描画・サーバーの描画(SSR)
|
|
@@ -2329,52 +2356,54 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2329
2356
|
* 今の `columns` に無い列の幅 / フィルター / ソートは捨てる(開発時に警告)。URL
|
|
2330
2357
|
* のクエリや保存した状態から戻すときに使う。
|
|
2331
2358
|
*/
|
|
2332
|
-
initialState?: Omit<GridStatePatch, 'columns'
|
|
2359
|
+
initialState?: Omit<GridStatePatch, 'columns'> | undefined;
|
|
2333
2360
|
/**
|
|
2334
2361
|
* フィルター状態(`globalText` + `columnFilters`)が**実際に変化したとき**だけ、
|
|
2335
2362
|
* そのスライスの複製を渡して呼ばれる。`onStateChange` は列幅 / 列メタでも呼ばれるため、記述子から
|
|
2336
2363
|
* WHERE を組み立てるなどフィルターだけを追いたい用途向け。規約は `onStateChange`
|
|
2337
2364
|
* と同じ(初回非発火 / 同値非発火 / `applyState` でも発火)。
|
|
2338
2365
|
*/
|
|
2339
|
-
onFiltersChange?: (filters: GridFilterState) => void;
|
|
2366
|
+
onFiltersChange?: ((filters: GridFilterState) => void) | undefined;
|
|
2340
2367
|
/**
|
|
2341
2368
|
* ソート状態が**実際に変化したとき**だけ、その複製を渡して呼ばれる(ORDER BY の組み立てなど)。
|
|
2342
2369
|
* 規約は `onFiltersChange` と同じ。
|
|
2343
2370
|
*/
|
|
2344
|
-
onSortChange?: (sort: GridSortState) => void;
|
|
2371
|
+
onSortChange?: ((sort: GridSortState) => void) | undefined;
|
|
2345
2372
|
/**
|
|
2346
2373
|
* スクロール位置の変化通知(rAF で 1 フレーム 1 回に間引き・縦横どちらの変化でも発火)。`params` は
|
|
2347
2374
|
* `{ top, left, source }`(px)。`source: 'api'` は `setScrollPosition` / `scrollTo*` 系由来、
|
|
2348
|
-
* `'user'`
|
|
2375
|
+
* `'user'` はそれ以外(ホイール / ドラッグ / キーボードのほか、
|
|
2376
|
+
* 絞り込みや行の高さの測り直しで表が縮み、ブラウザが位置を詰めた分も `'user'` で届く)。2
|
|
2377
|
+
* グリッドの双方向スクロール同期は `source === 'user'`
|
|
2349
2378
|
* のときだけ相手へ反映することでループを止められる。インライン関数可(latest-ref 経由)。
|
|
2350
2379
|
*/
|
|
2351
|
-
onScroll?: (params: GridScrollEventParams) => void;
|
|
2380
|
+
onScroll?: ((params: GridScrollEventParams) => void) | undefined;
|
|
2352
2381
|
/**
|
|
2353
2382
|
* clientSide モードの行データ。readonly 配列も受け付ける(グリッドは入力配列を破壊的に変更しない。
|
|
2354
2383
|
* 編集結果は `onRowsChange` が新配列で返す)。`dataSource` を指定した場合は無視され serverSide
|
|
2355
2384
|
* モードになる(両者は排他)。
|
|
2356
2385
|
*/
|
|
2357
|
-
rows?: readonly T[];
|
|
2386
|
+
rows?: readonly T[] | undefined;
|
|
2358
2387
|
/**
|
|
2359
2388
|
* serverSide(SSRM)モードのデータ供給口。指定すると可視窓近傍のブロックだけを `getRows`
|
|
2360
2389
|
* で都度取得し、`rows` 系の clientSide パイプラインをバイパスする。`updateRows`(任意)
|
|
2361
2390
|
* を持たせるとセル編集の書き戻し(楽観更新つき)が有効になる(「セル編集の書き戻し」節)。
|
|
2362
2391
|
*/
|
|
2363
|
-
dataSource?: ServerSideDataSource<T
|
|
2392
|
+
dataSource?: ServerSideDataSource<T> | undefined;
|
|
2364
2393
|
/**
|
|
2365
2394
|
* serverSide のソフトリフレッシュ用トークン。値を増やすと、クエリ(フィルター/ソート/グローバル)
|
|
2366
2395
|
* を変えずにキャッシュを破棄して現在の可視レンジをサーバから取り直す。スクロール位置は保持し、
|
|
2367
2396
|
* 件数は到着ブロックの `totalRowCount` で追従する(clientSide では無視)。
|
|
2368
2397
|
* 命令的に呼びたい場合は同挙動のハンドル `refreshServerSide()` を使う。
|
|
2369
2398
|
*/
|
|
2370
|
-
serverSideRefreshToken?: number;
|
|
2399
|
+
serverSideRefreshToken?: number | undefined;
|
|
2371
2400
|
/**
|
|
2372
2401
|
* serverSide の `getRows` が reject したときの通知(abort は正常キャンセルのため通知しない)。
|
|
2373
2402
|
* `params` は失敗した要求の view 空間レンジ `{ startIndex, endIndex }`。
|
|
2374
2403
|
* グリッド内蔵のエラーバー(再試行 UI)とは独立に呼ばれる(利用側トースト / ログ用)。
|
|
2375
2404
|
* インライン関数可(latest-ref 経由で読む)。
|
|
2376
2405
|
*/
|
|
2377
|
-
onServerSideLoadError?: (error: unknown, params: ServerSideLoadErrorParams) => void;
|
|
2406
|
+
onServerSideLoadError?: ((error: unknown, params: ServerSideLoadErrorParams) => void) | undefined;
|
|
2378
2407
|
/**
|
|
2379
2408
|
* serverSide の `dataSource.updateRows` が reject したときの通知。
|
|
2380
2409
|
* グリッド側は楽観更新をロールバック済みで、`params.updates` に失敗して元に戻した行更新(`rowKey`
|
|
@@ -2384,25 +2413,29 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2384
2413
|
* グリッド内蔵の保存失敗バーとは独立に呼ばれる。インライン関数可(latest-ref 経由で読む)。
|
|
2385
2414
|
* 詳細は「セル編集の書き戻し」節。
|
|
2386
2415
|
*/
|
|
2387
|
-
onServerSideWriteError?: (error: unknown, params: ServerSideWriteErrorParams<T>) => void;
|
|
2416
|
+
onServerSideWriteError?: ((error: unknown, params: ServerSideWriteErrorParams<T>) => void) | undefined;
|
|
2388
2417
|
/** 列定義の配列。readonly 配列も受け付ける。 */
|
|
2389
2418
|
columns: readonly GridColumn<T, F>[];
|
|
2390
2419
|
/** 行が変化したとき呼ばれる(rows を controlled にする)。 */
|
|
2391
|
-
onRowsChange?: (nextRows: T[]) => void;
|
|
2420
|
+
onRowsChange?: ((nextRows: T[]) => void) | undefined;
|
|
2392
2421
|
/**
|
|
2393
2422
|
* 列が変化したとき呼ばれる。列メニューの固定切替はこれが指定されている場合のみ反映。
|
|
2394
2423
|
* 列の並べ替え(ヘッダーのドラッグ / 列パネル)と `applyState` で渡る `nextColumns` は、
|
|
2395
2424
|
* 配列順が固定列ごと(左固定 → 中央 → 右固定)に並べ直される(画面上の列順は変わらない。例:
|
|
2396
2425
|
* 右固定列の後ろに宣言した列があると、右固定列が配列の末尾へ移る)。
|
|
2397
|
-
* 列メニューの固定切替は配列順を変えず `pinned`
|
|
2426
|
+
* 列メニューの固定切替は配列順を変えず `pinned` だけを更新する。指定が無いと、列メニューの固定 /
|
|
2427
|
+
* リセットと、ツールパネルの「列」タブの表示 /
|
|
2428
|
+
* 非表示・並べ替え・リセットは押せない(今の状態は見える)。
|
|
2429
|
+
* 押せない理由のツールチップは利用者向けの文(「この表では列の固定を変えられません」など。1.0.2
|
|
2430
|
+
* から。1.0.1 までは「onColumnsChange 未指定のため…」)。
|
|
2398
2431
|
*/
|
|
2399
|
-
onColumnsChange?: (nextColumns: GridColumn<T, F>[]) => void;
|
|
2432
|
+
onColumnsChange?: ((nextColumns: GridColumn<T, F>[]) => void) | undefined;
|
|
2400
2433
|
/**
|
|
2401
2434
|
* 安定した行キーを返す。
|
|
2402
2435
|
*
|
|
2403
2436
|
* @defaultValue index ベース
|
|
2404
2437
|
*/
|
|
2405
|
-
rowKeyGetter?: (row: T, index: number) => GridRowKey;
|
|
2438
|
+
rowKeyGetter?: ((row: T, index: number) => GridRowKey) | undefined;
|
|
2406
2439
|
/**
|
|
2407
2440
|
* コピー(`Ctrl/Cmd+C` の TSV)/ `exportCsv` / `getExportData` の対象行フィルタ。`false`
|
|
2408
2441
|
* の行は出力から**行ごと**除く(行単位のみ。全体選択かの判定と貼り付けには影響しない)。
|
|
@@ -2412,10 +2445,10 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2412
2445
|
*
|
|
2413
2446
|
* @defaultValue 全行 true
|
|
2414
2447
|
*/
|
|
2415
|
-
isRowExportable?: (row: T, ctx: {
|
|
2448
|
+
isRowExportable?: ((row: T, ctx: {
|
|
2416
2449
|
viewRowIndex: number;
|
|
2417
2450
|
rowKey: GridRowKey;
|
|
2418
|
-
}) => boolean;
|
|
2451
|
+
}) => boolean) | undefined;
|
|
2419
2452
|
/**
|
|
2420
2453
|
* 貼り付けが表の末尾より下へはみ出したとき、
|
|
2421
2454
|
* 足りない行を作る新規行ファクトリ(はみ出した行数だけ呼ぶ)。
|
|
@@ -2423,19 +2456,19 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2423
2456
|
* ボタンなどで行を足すときは、利用側が `rows` に行を足す(グリッドは `createRow` を呼ばない。
|
|
2424
2457
|
* serverSide では使わない)。
|
|
2425
2458
|
*/
|
|
2426
|
-
createRow?: () => T;
|
|
2459
|
+
createRow?: (() => T) | undefined;
|
|
2427
2460
|
/**
|
|
2428
2461
|
* 貼り付けが右端の列よりはみ出したとき、足りない列を作る列ファクトリ(`onColumnsChange`
|
|
2429
2462
|
* と一緒に使う)。
|
|
2430
2463
|
*/
|
|
2431
|
-
createOverflowColumn?: (columnIndex: number) => GridColumn<T, F
|
|
2464
|
+
createOverflowColumn?: ((columnIndex: number) => GridColumn<T, F>) | undefined;
|
|
2432
2465
|
/**
|
|
2433
2466
|
* uniform 行の行高(px)。未指定時は density プリセット(compact: `28` / comfortable: `44`)
|
|
2434
2467
|
* から解決。明示指定が常に優先。
|
|
2435
2468
|
*
|
|
2436
2469
|
* @defaultValue density 依存(standard: `36`)
|
|
2437
2470
|
*/
|
|
2438
|
-
rowHeight?: number;
|
|
2471
|
+
rowHeight?: number | undefined;
|
|
2439
2472
|
/**
|
|
2440
2473
|
* auto-height 行(可変行高)を有効化する**大本のスイッチ**。これに加えて**少なくとも1列に
|
|
2441
2474
|
* `column.autoHeight: true`** が必要(その列が折り返して行高を駆動)。両方 true かつ**行数 ≤ 50,
|
|
@@ -2443,27 +2476,27 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2443
2476
|
*
|
|
2444
2477
|
* @defaultValue `false`
|
|
2445
2478
|
*/
|
|
2446
|
-
autoHeight?: boolean;
|
|
2479
|
+
autoHeight?: boolean | undefined;
|
|
2447
2480
|
/**
|
|
2448
2481
|
* auto-height で伸びた行(基準の `rowHeight` より高い行)での、セルの中身の縦の揃え。書かなければ
|
|
2449
2482
|
* `autoHeight` の列は上(折り返した文章の 1 行目)、ほかの列は真ん中。`'top'` で全部の列を上に、
|
|
2450
2483
|
* `'center'` で全部の列を真ん中にそろえる(列ごとの指定は `GridColumn.verticalAlign` が優先)。1
|
|
2451
2484
|
* 行の行と、auto-height を使わないグリッドではどれも真ん中。詳細は「auto-height 行」節。
|
|
2452
2485
|
*/
|
|
2453
|
-
verticalAlign?: GridVerticalAlign;
|
|
2486
|
+
verticalAlign?: GridVerticalAlign | undefined;
|
|
2454
2487
|
/**
|
|
2455
2488
|
* 未測定行の推定行高(px)。
|
|
2456
2489
|
*
|
|
2457
2490
|
* @defaultValue `rowHeight`
|
|
2458
2491
|
*/
|
|
2459
|
-
estimateRowHeight?: number;
|
|
2492
|
+
estimateRowHeight?: number | undefined;
|
|
2460
2493
|
/**
|
|
2461
2494
|
* ヘッダー行の高さ(px)。未指定時は density プリセット(compact: `32` / comfortable: `48`)
|
|
2462
2495
|
* から解決。明示指定が常に優先。
|
|
2463
2496
|
*
|
|
2464
2497
|
* @defaultValue density 依存(standard: `40`)
|
|
2465
2498
|
*/
|
|
2466
|
-
headerHeight?: number;
|
|
2499
|
+
headerHeight?: number | undefined;
|
|
2467
2500
|
/**
|
|
2468
2501
|
* 密度プリセット。rowHeight / headerHeight の既定値と寸法トークン(セル横 padding / バー padding /
|
|
2469
2502
|
* アイコンボタン寸法 / セル文字の相対拡縮)を一括切替。`'standard'` は従来と同値。
|
|
@@ -2471,7 +2504,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2471
2504
|
*
|
|
2472
2505
|
* @defaultValue `'standard'`
|
|
2473
2506
|
*/
|
|
2474
|
-
density?: GridDensity;
|
|
2507
|
+
density?: GridDensity | undefined;
|
|
2475
2508
|
/**
|
|
2476
2509
|
* カラーテーマ。`'dark'` でダークプリセット(`.ssg-theme-dark` のトークン一括上書き。Mantine dark
|
|
2477
2510
|
* 系パレット)をグリッド本体・全ポータル(popover / menu / panel)
|
|
@@ -2484,7 +2517,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2484
2517
|
*
|
|
2485
2518
|
* @defaultValue `'light'`
|
|
2486
2519
|
*/
|
|
2487
|
-
theme?: GridTheme;
|
|
2520
|
+
theme?: GridTheme | undefined;
|
|
2488
2521
|
/**
|
|
2489
2522
|
* モーション(アニメーション / トランジション)の有効化。`'auto'` は OS /
|
|
2490
2523
|
* ブラウザの「視差効果を減らす」(`prefers-reduced-motion: reduce`)が有効なら `'off'`、それ以外は
|
|
@@ -2496,7 +2529,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2496
2529
|
*
|
|
2497
2530
|
* @defaultValue `'auto'`
|
|
2498
2531
|
*/
|
|
2499
|
-
motion?: GridMotion;
|
|
2532
|
+
motion?: GridMotion | undefined;
|
|
2500
2533
|
/**
|
|
2501
2534
|
* 行の並び替えアニメ。ソート / フィルター / グループ開閉 / `rows` の差し替えで、
|
|
2502
2535
|
* 描画中の行が新しい位置へ滑り(`--ssg-motion-base`)、
|
|
@@ -2506,7 +2539,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2506
2539
|
*
|
|
2507
2540
|
* @defaultValue `true`
|
|
2508
2541
|
*/
|
|
2509
|
-
animateRows?: boolean;
|
|
2542
|
+
animateRows?: boolean | undefined;
|
|
2510
2543
|
/**
|
|
2511
2544
|
* `Ctrl/Cmd+C` のあと、コピー元の範囲に Excel と同じ「動く点線」
|
|
2512
2545
|
* を残す(`.ssg-copy-range-overlay`。`motion` が `'off'` なら静的な点線)。`Esc` と編集開始で消え、
|
|
@@ -2515,7 +2548,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2515
2548
|
*
|
|
2516
2549
|
* @defaultValue `true`
|
|
2517
2550
|
*/
|
|
2518
|
-
showCopyRange?: boolean;
|
|
2551
|
+
showCopyRange?: boolean | undefined;
|
|
2519
2552
|
/**
|
|
2520
2553
|
* ホバーの強調範囲。`'row'` はポインタの行だけ(従来)。`'cross'` はその行に加えて、
|
|
2521
2554
|
* ポインタの列(列ヘッダー + 同じ列の他セルに薄い帯 `.ssg-col-hover-overlay`)
|
|
@@ -2525,18 +2558,20 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2525
2558
|
*
|
|
2526
2559
|
* @defaultValue `'row'`
|
|
2527
2560
|
*/
|
|
2528
|
-
hoverHighlight?: 'row' | 'cross';
|
|
2561
|
+
hoverHighlight?: 'row' | 'cross' | undefined;
|
|
2529
2562
|
/**
|
|
2530
2563
|
* `rows` が変わったとき、値が変わったセルを一瞬アクセント色で光らせ(`.ssg-body-cell--changed`、
|
|
2531
2564
|
* `--ssg-motion-slow`)、数値の既定セルは旧値から新値へカウントアップする(`--ssg-motion-base`。
|
|
2532
2565
|
* 表示は `valueFormatter` で整形)。セル編集 / 貼り付け / クリア / undo・redo / 外部からの `rows`
|
|
2533
2566
|
* 差し替えのすべてが対象。clientSide 専用(SSRM では無効)。描画中のセルだけが対象で、
|
|
2534
2567
|
* 変わったセルが 200 を超えるとフラッシュのみ、2,000 を超える・行の挿入 / 削除 /
|
|
2535
|
-
* 並べ替えを伴う・参照の変わった行が 5,000 を超える(データの読み直し)ときは何もしない。
|
|
2568
|
+
* 並べ替えを伴う・参照の変わった行が 5,000 を超える(データの読み直し)ときは何もしない。1
|
|
2569
|
+
* 秒に何度も `rows` を差し替える画面では主スレッドの負荷が大きい(250ms
|
|
2570
|
+
* ごとに多くのセルが変わる表で付けないときの約 2 倍)ので、付けないことを勧める。
|
|
2536
2571
|
*
|
|
2537
2572
|
* @defaultValue `false`
|
|
2538
2573
|
*/
|
|
2539
|
-
highlightChanges?: boolean;
|
|
2574
|
+
highlightChanges?: boolean | undefined;
|
|
2540
2575
|
/**
|
|
2541
2576
|
* serverSide の書き戻し(`dataSource.updateRows`)で、確定したセルに保存状態の印を出す。
|
|
2542
2577
|
* 保存中は斜線 + 小さなスピナー(`[data-ssg-save="pending"]`)、成功は ✓ バッジを 1.3 秒(`"ok"`)、
|
|
@@ -2548,7 +2583,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2548
2583
|
*
|
|
2549
2584
|
* @defaultValue `true`
|
|
2550
2585
|
*/
|
|
2551
|
-
showSaveStatus?: boolean;
|
|
2586
|
+
showSaveStatus?: boolean | undefined;
|
|
2552
2587
|
/**
|
|
2553
2588
|
* 行ドラッグ並べ替え(`enableRowDrag`)の表示方式。`'ghost'` は従来(ゴースト + ガイド線、
|
|
2554
2589
|
* ドロップ後に新しい位置へスライド)。`'live'` は掴んだ行がポインタに追従し、
|
|
@@ -2559,7 +2594,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2559
2594
|
*
|
|
2560
2595
|
* @defaultValue `'ghost'`
|
|
2561
2596
|
*/
|
|
2562
|
-
rowDragMotion?: 'ghost' | 'live';
|
|
2597
|
+
rowDragMotion?: 'ghost' | 'live' | undefined;
|
|
2563
2598
|
/**
|
|
2564
2599
|
* 列ヘッダーのドラッグ並べ替え(`onColumnsChange` 指定時)の表示方式。`'ghost'` は従来(ゴースト +
|
|
2565
2600
|
* 縦線、ドロップ後に新しい位置へスライド)。`'live'` は同じペイン内では掴んだ列(ヘッダー +
|
|
@@ -2573,7 +2608,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2573
2608
|
*
|
|
2574
2609
|
* @defaultValue `'ghost'`
|
|
2575
2610
|
*/
|
|
2576
|
-
columnDragMotion?: 'ghost' | 'live';
|
|
2611
|
+
columnDragMotion?: 'ghost' | 'live' | undefined;
|
|
2577
2612
|
/**
|
|
2578
2613
|
* **セル内検索**。`true` でグリッド右上の検索バー(`.ssg-find-bar`)と
|
|
2579
2614
|
* `Ctrl/Cmd+F`(グリッドにフォーカスがあるときだけ横取り)が有効になる。表示文字列(`valueFormatter`
|
|
@@ -2586,19 +2621,19 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2586
2621
|
*
|
|
2587
2622
|
* @defaultValue `false`
|
|
2588
2623
|
*/
|
|
2589
|
-
find?: boolean | FindOptions;
|
|
2624
|
+
find?: boolean | FindOptions | undefined;
|
|
2590
2625
|
/**
|
|
2591
2626
|
* セル内検索の状態(`{ query, matchCount, currentIndex, open }`)が変わったときの通知。
|
|
2592
2627
|
* `currentIndex` は 0 始まり(ヒットなしは `null`)。ツールバーに「3 / 12」を出す等に使う。
|
|
2593
2628
|
*/
|
|
2594
|
-
onFindChange?: (params: FindChangeParams) => void;
|
|
2629
|
+
onFindChange?: ((params: FindChangeParams) => void) | undefined;
|
|
2595
2630
|
/**
|
|
2596
2631
|
* 行番号列の幅(px)。行番号列は左固定列が無くても左に固定され、横にスクロールしても流れない(Excel
|
|
2597
2632
|
* の行見出しと同じ。0.63.0 から)。
|
|
2598
2633
|
*
|
|
2599
2634
|
* @defaultValue `56`
|
|
2600
2635
|
*/
|
|
2601
|
-
rowHeaderWidth?: number;
|
|
2636
|
+
rowHeaderWidth?: number | undefined;
|
|
2602
2637
|
/**
|
|
2603
2638
|
* グリッドの明示高さ。**値の種類で何の高さかが変わる**。① `%` を含む文字列(`'100%'` / `'50%'` /
|
|
2604
2639
|
* `'calc(100% - 40px)'`):
|
|
@@ -2610,7 +2645,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2610
2645
|
* 未指定: スクロール領域は内容の高さで `maxHeight` によりクリップ。ルートへの
|
|
2611
2646
|
* `style={{ height }}` だけではスクロール領域は決まらないため、高さはこの prop で指定する。
|
|
2612
2647
|
*/
|
|
2613
|
-
height?: number | string;
|
|
2648
|
+
height?: number | string | undefined;
|
|
2614
2649
|
/**
|
|
2615
2650
|
* **スクロール領域**の高さ上限(バーは含まない。`height` の種類に関わらず同じ)。
|
|
2616
2651
|
* `height`・`maxHeight` が**共に未指定のときのみ**既定の 480px が効く(従来挙動)。数値の
|
|
@@ -2619,7 +2654,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2619
2654
|
*
|
|
2620
2655
|
* @defaultValue `—`(既定 480px)
|
|
2621
2656
|
*/
|
|
2622
|
-
maxHeight?: number | string;
|
|
2657
|
+
maxHeight?: number | string | undefined;
|
|
2623
2658
|
/**
|
|
2624
2659
|
* グリッド全体の編集を無効化。編集中に `true` へ切り替わった場合、
|
|
2625
2660
|
* その編集は確定時に書き込まれず終了する(`canEditCell` も確定時に再評価)。`renderCell` の
|
|
@@ -2629,14 +2664,14 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2629
2664
|
*
|
|
2630
2665
|
* @defaultValue `false`
|
|
2631
2666
|
*/
|
|
2632
|
-
readOnly?: boolean;
|
|
2667
|
+
readOnly?: boolean | undefined;
|
|
2633
2668
|
/**
|
|
2634
2669
|
* readonly セルの組み込み淡色表示(背景 + 文字色)を有効化。`false` でもセマンティッククラス
|
|
2635
2670
|
* `.ssg-body-cell--readonly` は常時付与され、利用側 CSS のフックに使える。
|
|
2636
2671
|
*
|
|
2637
2672
|
* @defaultValue `false`
|
|
2638
2673
|
*/
|
|
2639
|
-
dimReadOnlyCells?: boolean;
|
|
2674
|
+
dimReadOnlyCells?: boolean | undefined;
|
|
2640
2675
|
/**
|
|
2641
2676
|
* セル単位の編集可否ゲート。`rowIndex` は**ビュー行 index**(フィルター / ソート後の表示位置)で、
|
|
2642
2677
|
* 表示(読み取り専用の見た目)・編集開始・確定・貼り付け・Delete クリア・IME
|
|
@@ -2646,7 +2681,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2646
2681
|
* 貼り付けで末尾に追加される行は、追加後の位置と元 `rows` の index で呼ばれる。※ v0.48 以前は
|
|
2647
2682
|
* clientSide の貼り付けと Delete クリアだけ元 `rows` の index が渡っていた。
|
|
2648
2683
|
*/
|
|
2649
|
-
canEditCell?: (rowIndex: number, colIndex: number, row: T, column: GridColumn<T, F>, ctx: CanEditCellContext) => boolean;
|
|
2684
|
+
canEditCell?: ((rowIndex: number, colIndex: number, row: T, column: GridColumn<T, F>, ctx: CanEditCellContext) => boolean) | undefined;
|
|
2650
2685
|
/**
|
|
2651
2686
|
* グリッド編集(セル編集 / ペースト / `renderCell` の `setValue`)の取り消し/やり直し。`Ctrl/Cmd+Z`
|
|
2652
2687
|
* = undo、`Ctrl/Cmd+Shift+Z` / `Ctrl/Cmd+Y` = redo(ハンドルの `undo()` / `redo()` でも可)。
|
|
@@ -2660,7 +2695,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2660
2695
|
*
|
|
2661
2696
|
* @defaultValue `true`
|
|
2662
2697
|
*/
|
|
2663
|
-
enableUndoRedo?: boolean;
|
|
2698
|
+
enableUndoRedo?: boolean | undefined;
|
|
2664
2699
|
/**
|
|
2665
2700
|
* `Delete` / `Backspace` キーによる選択セル(なければアクティブセル)の値クリア。`false`
|
|
2666
2701
|
* でキーは何もしない(素通し)。ペースト・エディタでの上書き・undo/redo
|
|
@@ -2668,7 +2703,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2668
2703
|
*
|
|
2669
2704
|
* @defaultValue `true`
|
|
2670
2705
|
*/
|
|
2671
|
-
enableClearOnDelete?: boolean;
|
|
2706
|
+
enableClearOnDelete?: boolean | undefined;
|
|
2672
2707
|
/**
|
|
2673
2708
|
* 組み込みエディタ(text / number / select / date)の `Enter`
|
|
2674
2709
|
* 確定後にアクティブセルをどこへ移すか(`'down'` | `'up'` | `'right'` | `'left'` | `'none'`。Excel
|
|
@@ -2680,7 +2715,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2680
2715
|
*
|
|
2681
2716
|
* @defaultValue `'down'`
|
|
2682
2717
|
*/
|
|
2683
|
-
editorEnterMove?: EditorEnterMove;
|
|
2718
|
+
editorEnterMove?: EditorEnterMove | undefined;
|
|
2684
2719
|
/**
|
|
2685
2720
|
* **IME オンのままの直接入力**(Excel / SPREAD と同じ)。`true` で、
|
|
2686
2721
|
* 編集していないあいだグリッドのフォーカスをアクティブセル上の透明な入力欄(入力受け)に置き、IME
|
|
@@ -2698,26 +2733,26 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2698
2733
|
*
|
|
2699
2734
|
* @defaultValue `false`
|
|
2700
2735
|
*/
|
|
2701
|
-
imeDirectInput?: boolean;
|
|
2736
|
+
imeDirectInput?: boolean | undefined;
|
|
2702
2737
|
/**
|
|
2703
2738
|
* 保持する undo ステップ数の上限。超過分は古い順に破棄。
|
|
2704
2739
|
*
|
|
2705
2740
|
* @defaultValue `100`
|
|
2706
2741
|
*/
|
|
2707
|
-
undoHistoryLimit?: number;
|
|
2742
|
+
undoHistoryLimit?: number | undefined;
|
|
2708
2743
|
/**
|
|
2709
2744
|
* undo / redo 可能状態が**変化したとき**に呼ばれる(ツールバーの undo/redo ボタンの disabled
|
|
2710
2745
|
* 表示などリアクティブな UI 用)。初回マウントでは発火せず、同値では再発火しない。
|
|
2711
2746
|
* 毎レンダーのインライン関数でも問題ない。引数の型 `UndoRedoState`(`{ canUndo, canRedo }`)
|
|
2712
2747
|
* はパッケージから import できる。
|
|
2713
2748
|
*/
|
|
2714
|
-
onUndoRedoStateChange?: (state: UndoRedoState) => void;
|
|
2749
|
+
onUndoRedoStateChange?: ((state: UndoRedoState) => void) | undefined;
|
|
2715
2750
|
/**
|
|
2716
2751
|
* 複数セル範囲選択。
|
|
2717
2752
|
*
|
|
2718
2753
|
* @defaultValue `true`
|
|
2719
2754
|
*/
|
|
2720
|
-
enableRangeSelection?: boolean;
|
|
2755
|
+
enableRangeSelection?: boolean | undefined;
|
|
2721
2756
|
/**
|
|
2722
2757
|
* チェックボックス行選択の有効化(マスタースイッチ)。`true` で行ヘッダ(行NO)
|
|
2723
2758
|
* ガターが行選択のヒット領域になり、Excel 風のガター起点セル範囲選択は
|
|
@@ -2726,33 +2761,38 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2726
2761
|
*
|
|
2727
2762
|
* @defaultValue `false`
|
|
2728
2763
|
*/
|
|
2729
|
-
enableRowSelection?: boolean;
|
|
2764
|
+
enableRowSelection?: boolean | undefined;
|
|
2730
2765
|
/**
|
|
2731
2766
|
* 単一/複数の選択モード。single は常に 1 行。multiple はクリックでトグル、
|
|
2732
2767
|
* shift+クリック/ガタードラッグで範囲選択。
|
|
2733
2768
|
*
|
|
2734
2769
|
* @defaultValue `'multiple'`
|
|
2735
2770
|
*/
|
|
2736
|
-
rowSelectionMode?: RowSelectionMode;
|
|
2771
|
+
rowSelectionMode?: RowSelectionMode | undefined;
|
|
2737
2772
|
/**
|
|
2738
|
-
* ヘッダ左上コーナーの全選択チェック(tri-state: none/some/all)の有効化。
|
|
2773
|
+
* ヘッダ左上コーナーの全選択チェック(tri-state: none/some/all)の有効化。clientSide
|
|
2774
|
+
* のフィルターで行が隠れている間は、見えている行だけを選ぶ / 外す(印も見えている行だけで決める)。
|
|
2739
2775
|
*
|
|
2740
2776
|
* @defaultValue `enableRowSelection && multiple`
|
|
2741
2777
|
*/
|
|
2742
|
-
enableSelectAllRows?: boolean;
|
|
2778
|
+
enableSelectAllRows?: boolean | undefined;
|
|
2743
2779
|
/**
|
|
2744
2780
|
* **controlled** の行選択記述子。`{ type:'include', rowKeys }`=これらを選択 /
|
|
2745
2781
|
* `{ type:'exclude', rowKeys }`=全選択のうち除外。全選択をキー列挙せず表現できる。指定時は
|
|
2746
2782
|
* controlled(内部 state を使わない)。
|
|
2747
2783
|
*/
|
|
2748
|
-
rowSelection?: RowSelectionModel;
|
|
2784
|
+
rowSelection?: RowSelectionModel | undefined;
|
|
2749
2785
|
/**
|
|
2750
2786
|
* controlled 簡易版(`{ type:'include', rowKeys }` の糖衣)。`rowSelection` と併用時は
|
|
2751
2787
|
* `rowSelection` を優先。全選択(exclude)は表現不可。
|
|
2752
2788
|
*/
|
|
2753
|
-
selectedRowKeys?: GridRowKey[];
|
|
2754
|
-
/**
|
|
2755
|
-
|
|
2789
|
+
selectedRowKeys?: GridRowKey[] | undefined;
|
|
2790
|
+
/**
|
|
2791
|
+
* 行選択変化の通知(controlled/uncontrolled いずれでも発火)。通知の中でハンドルの
|
|
2792
|
+
* `getSelectedRowKeys()` / `getSelectedRowData()` / `getSelectedRowCount()` などを呼ぶと、
|
|
2793
|
+
* 新しい選択を返す。
|
|
2794
|
+
*/
|
|
2795
|
+
onRowSelectionChange?: ((model: RowSelectionModel) => void) | undefined;
|
|
2756
2796
|
/**
|
|
2757
2797
|
* グローバルフィルター**機能**の有効化。`false` で機能が無効になり、
|
|
2758
2798
|
* 既定トップバーのフィルター入力欄も出ない(summary は `showTopBarSummary` に従う。
|
|
@@ -2760,13 +2800,13 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2760
2800
|
*
|
|
2761
2801
|
* @defaultValue `true`
|
|
2762
2802
|
*/
|
|
2763
|
-
enableGlobalFilter?: boolean;
|
|
2803
|
+
enableGlobalFilter?: boolean | undefined;
|
|
2764
2804
|
/**
|
|
2765
2805
|
* 列ごとのフィルター。
|
|
2766
2806
|
*
|
|
2767
2807
|
* @defaultValue `true`
|
|
2768
2808
|
*/
|
|
2769
|
-
enableColumnFilter?: boolean;
|
|
2809
|
+
enableColumnFilter?: boolean | undefined;
|
|
2770
2810
|
/**
|
|
2771
2811
|
* dateSet フィルター条件の日付入力を利用側コンポーネント(Mantine `DatePickerInput` 等)
|
|
2772
2812
|
* へ差し替えるスロット。既定は内製フィールド(自由入力 + ドリルアップカレンダー。下記「dateSet
|
|
@@ -2774,7 +2814,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2774
2814
|
*
|
|
2775
2815
|
* @defaultValue 内製の日付フィールド
|
|
2776
2816
|
*/
|
|
2777
|
-
renderFilterDateInput?: (ctx: FilterDateInputContext) => F['node'];
|
|
2817
|
+
renderFilterDateInput?: ((ctx: FilterDateInputContext) => F['node']) | undefined;
|
|
2778
2818
|
/**
|
|
2779
2819
|
* set / select / 複合(numberSet / textSet / dateSet)列の候補を**非同期に供給**する(DB の DISTINCT
|
|
2780
2820
|
* など)。popover を開くたびに
|
|
@@ -2784,7 +2824,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2784
2824
|
* `column.filterOptions`(静的)> `getFilterOptions` > rows 自動収集。非同期候補の列は反転(exclude)
|
|
2785
2825
|
* 可。clientSide / serverSide 両対応。詳細は「ソートとフィルター」ガイド。
|
|
2786
2826
|
*/
|
|
2787
|
-
getFilterOptions?: (params: GetFilterOptionsParams<T, F>) => Promise<GetFilterOptionsResult
|
|
2827
|
+
getFilterOptions?: ((params: GetFilterOptionsParams<T, F>) => Promise<GetFilterOptionsResult>) | undefined;
|
|
2788
2828
|
/**
|
|
2789
2829
|
* ソート機能の有効化。ソートは列メニュー(⋮)の「昇順 / 降順で並び替え」と「並び替えを管理…」
|
|
2790
2830
|
* パネルから行う(ヘッダー本体のクリックは列範囲選択。`Shift` を押しながら見出しを押すと、
|
|
@@ -2795,7 +2835,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2795
2835
|
*
|
|
2796
2836
|
* @defaultValue `true`
|
|
2797
2837
|
*/
|
|
2798
|
-
enableSorting?: boolean;
|
|
2838
|
+
enableSorting?: boolean | undefined;
|
|
2799
2839
|
/**
|
|
2800
2840
|
* 列 / グローバルフィルターの**絞り込みをグリッドで行わない**(手動フィルターモード)。フィルター
|
|
2801
2841
|
* UI(popover / チップバー / フィルター管理 / フィルター中の印)と状態(`GridState.filters` /
|
|
@@ -2805,7 +2845,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2805
2845
|
*
|
|
2806
2846
|
* @defaultValue `false`
|
|
2807
2847
|
*/
|
|
2808
|
-
manualFiltering?: boolean;
|
|
2848
|
+
manualFiltering?: boolean | undefined;
|
|
2809
2849
|
/**
|
|
2810
2850
|
* ソートの**並べ替えをグリッドで行わない**(手動ソートモード)。ソート UI と状態(`GridState.sort` /
|
|
2811
2851
|
* `onStateChange`)は従来どおり動き、`rows` は渡した順のまま。再マウントなしで切り替え可(`false`
|
|
@@ -2814,24 +2854,26 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2814
2854
|
*
|
|
2815
2855
|
* @defaultValue `false`
|
|
2816
2856
|
*/
|
|
2817
|
-
manualSorting?: boolean;
|
|
2857
|
+
manualSorting?: boolean | undefined;
|
|
2818
2858
|
/**
|
|
2819
2859
|
* 列幅の手動リサイズ可否のグリッド既定。各列 `resizable`
|
|
2820
2860
|
* 未指定時に継承(`column.resizable ?? enableColumnResize`)。
|
|
2821
2861
|
*
|
|
2822
2862
|
* @defaultValue `true`
|
|
2823
2863
|
*/
|
|
2824
|
-
enableColumnResize?: boolean;
|
|
2864
|
+
enableColumnResize?: boolean | undefined;
|
|
2825
2865
|
/**
|
|
2826
2866
|
* データ投入時に全列幅を内容へ自動フィット。`'onMount'`=初回にデータが載った一度きり /
|
|
2827
2867
|
* `'onDataChange'`=`rows`(参照)が変わるたび(= データ差し替えのたび。手動リサイズは上書き) /
|
|
2828
2868
|
* `false`=無効。計測は列メニュー「すべての列の幅を自動調整」と同一エンジン(`suppressAutoSize` /
|
|
2829
2869
|
* `autoHeight` 列は除外)。フィルター / ソート / 列並べ替えでは再フィットしません。
|
|
2870
|
+
* グリッドが描かれていない間(`display: none` の中。隠したタブなど)は測らずに待ち、
|
|
2871
|
+
* 描かれたときに測ります(1.0.1 から。1.0.0 は幅 0 のまま測って列を縮めていました)。
|
|
2830
2872
|
* serverSide(`dataSource`)では無効。詳細は「flex と autoSize」節。
|
|
2831
2873
|
*
|
|
2832
2874
|
* @defaultValue `false`
|
|
2833
2875
|
*/
|
|
2834
|
-
autoSizeColumns?: AutoSizeColumnsMode;
|
|
2876
|
+
autoSizeColumns?: AutoSizeColumnsMode | undefined;
|
|
2835
2877
|
/**
|
|
2836
2878
|
* セル内容が省略(…)される列で、ホバー時に全文ツールチップを表示。
|
|
2837
2879
|
* 対象は既定テキストセルのみ(`renderCell` 列 / `autoHeight` 折り返し列は対象外)。表示はホバー時に
|
|
@@ -2840,38 +2882,38 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2840
2882
|
*
|
|
2841
2883
|
* @defaultValue `false`
|
|
2842
2884
|
*/
|
|
2843
|
-
showCellOverflowTooltip?: boolean;
|
|
2885
|
+
showCellOverflowTooltip?: boolean | undefined;
|
|
2844
2886
|
/**
|
|
2845
|
-
* invalid マーク(背景 + 右上マーカー +
|
|
2846
|
-
* 可視セルの検査(`validate` と number の `min`
|
|
2847
|
-
* `getInvalidCells()` と `validationMode: 'reject'`
|
|
2848
|
-
*
|
|
2849
|
-
*
|
|
2887
|
+
* invalid マーク(背景 + 右上マーカー + メッセージのツールチップ + セルの `aria-invalid` /
|
|
2888
|
+
* `aria-description`)の表示可否。`false` で非表示 + 可視セルの検査(`validate` と number の `min`
|
|
2889
|
+
* / `max` / `integer`)の評価スキップ。`getInvalidCells()` と `validationMode: 'reject'`
|
|
2890
|
+
* の書き込み拒否には影響しない(独立経路)。「送信時にだけマークを出す」UX は利用側 state で本 prop
|
|
2891
|
+
* を切り替えて実現(「バリデーション」節のレシピ参照)。
|
|
2850
2892
|
*
|
|
2851
2893
|
* @defaultValue `true`
|
|
2852
2894
|
*/
|
|
2853
|
-
showValidationMarks?: boolean;
|
|
2895
|
+
showValidationMarks?: boolean | undefined;
|
|
2854
2896
|
/**
|
|
2855
2897
|
* 行ホバー時に行全体を薄くハイライト。
|
|
2856
2898
|
*
|
|
2857
2899
|
* @defaultValue `true`
|
|
2858
2900
|
*/
|
|
2859
|
-
enableRowHover?: boolean;
|
|
2901
|
+
enableRowHover?: boolean | undefined;
|
|
2860
2902
|
/**
|
|
2861
2903
|
* 行ホバーの controlled 値(ビュー行 index / `null` = ホバーなし)。指定時は内部 state
|
|
2862
2904
|
* を使わずこの値でハイライトし、pointer 由来の変化は `onHoveredRowChange` で通知のみ(optionally
|
|
2863
2905
|
* controlled)。`enableRowHover: false` のときは無視(ハイライトも通知もしない)。一時的な UI
|
|
2864
2906
|
* 状態のため `GridState` / ハンドルには載らない。
|
|
2865
2907
|
*/
|
|
2866
|
-
hoveredRowIndex?: number | null;
|
|
2908
|
+
hoveredRowIndex?: number | null | undefined;
|
|
2867
2909
|
/**
|
|
2868
2910
|
* 行ホバーが変わったときの通知(uncontrolled でも呼ばれる)。`viewRowIndex` はフィルター /
|
|
2869
2911
|
* ソート適用後のビュー行 index。同値では発火しない(pointerenter
|
|
2870
2912
|
* は同一行内のセル跨ぎでも来るため)。用途: 複数グリッド間のホバー同期など。
|
|
2871
2913
|
*/
|
|
2872
|
-
onHoveredRowChange?: (viewRowIndex: number | null, ctx: {
|
|
2914
|
+
onHoveredRowChange?: ((viewRowIndex: number | null, ctx: {
|
|
2873
2915
|
source: 'pointer';
|
|
2874
|
-
}) => void;
|
|
2916
|
+
}) => void) | undefined;
|
|
2875
2917
|
/**
|
|
2876
2918
|
* データセル(データ行 × 利用側の列)のクリックで呼ばれる。左ボタンのみで、
|
|
2877
2919
|
* 押した位置と離した位置が同じセルのときだけ呼ばれる(範囲選択のドラッグはクリック扱いにしない)。
|
|
@@ -2882,14 +2924,14 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2882
2924
|
* の未ロード行 / 合成列(展開トグル・行ドラッグハンドル)では呼ばれない。インライン関数可。
|
|
2883
2925
|
* 詳細は「セル操作の通知」節。
|
|
2884
2926
|
*/
|
|
2885
|
-
onCellClick?: (params: GridCellEventParams<T, F>) => void;
|
|
2927
|
+
onCellClick?: ((params: GridCellEventParams<T, F>) => void) | undefined;
|
|
2886
2928
|
/**
|
|
2887
2929
|
* データセルのダブルクリック(タッチのダブルタップ含む)で、既定の動作(編集可能セルなら編集開始)
|
|
2888
2930
|
* の前に呼ばれる。読み取り専用セルでも呼ばれる。`params.preventDefault()`
|
|
2889
2931
|
* で既定の動作を止められる(`params.event.preventDefault()` では止まらない)。対象のセルは
|
|
2890
2932
|
* `onCellClick` と同じ。インライン関数可。
|
|
2891
2933
|
*/
|
|
2892
|
-
onCellDoubleClick?: (params: GridCellDoubleClickParams<T, F>) => void;
|
|
2934
|
+
onCellDoubleClick?: ((params: GridCellDoubleClickParams<T, F>) => void) | undefined;
|
|
2893
2935
|
/**
|
|
2894
2936
|
* アクティブセルが変わったときに呼ばれる(クリック / キー操作 / `setActiveCell`
|
|
2895
2937
|
* など由来を問わない)。アクティブセルが無くなった / データセル以外(グループ行 / ラベル行 /
|
|
@@ -2898,19 +2940,19 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2898
2940
|
* ソートなどでその位置の行が変われば呼ばれる。初回マウントでは呼ばれない。
|
|
2899
2941
|
* 通知はペイント後(クリックでは `onCellClick` より先)。インライン関数可。
|
|
2900
2942
|
*/
|
|
2901
|
-
onActiveCellChange?: (cell: GridCellRef<T, F> | null) => void;
|
|
2943
|
+
onActiveCellChange?: ((cell: GridCellRef<T, F> | null) => void) | undefined;
|
|
2902
2944
|
/**
|
|
2903
2945
|
* 列ヘッダーのホバー時にヘッダーセルを薄くハイライト。
|
|
2904
2946
|
*
|
|
2905
2947
|
* @defaultValue `true`
|
|
2906
2948
|
*/
|
|
2907
|
-
enableColumnHeaderHover?: boolean;
|
|
2949
|
+
enableColumnHeaderHover?: boolean | undefined;
|
|
2908
2950
|
/**
|
|
2909
2951
|
* 列メニュー(⋮ + ヘッダー右クリック)。
|
|
2910
2952
|
*
|
|
2911
2953
|
* @defaultValue `true`
|
|
2912
2954
|
*/
|
|
2913
|
-
enableColumnMenu?: boolean;
|
|
2955
|
+
enableColumnMenu?: boolean | undefined;
|
|
2914
2956
|
/**
|
|
2915
2957
|
* フィルター結果 0 行時のオーバーレイ文言。serverSide(`dataSource`)では列 /
|
|
2916
2958
|
* グローバルフィルターが掛かった状態で 0 件のときにこちら、掛かっていなければ `noRowsText`
|
|
@@ -2918,25 +2960,25 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2918
2960
|
*
|
|
2919
2961
|
* @defaultValue `localeText` の `noMatchingRows`(`'一致する行がありません'`)
|
|
2920
2962
|
*/
|
|
2921
|
-
noMatchingRowsText?: string;
|
|
2963
|
+
noMatchingRowsText?: string | undefined;
|
|
2922
2964
|
/**
|
|
2923
2965
|
* rows が 0 件のときの文言。
|
|
2924
2966
|
*
|
|
2925
2967
|
* @defaultValue `localeText` の `noRows`(`'表示する行がありません'`)
|
|
2926
2968
|
*/
|
|
2927
|
-
noRowsText?: string;
|
|
2969
|
+
noRowsText?: string | undefined;
|
|
2928
2970
|
/**
|
|
2929
2971
|
* 表(`role="grid"` の要素)のアクセシブル名。スクリーンリーダーが表を読み上げるときの名前で、1
|
|
2930
2972
|
* 画面に複数のグリッドを置くときは付けておくと区別できる(「アクセシビリティ」節)。
|
|
2931
2973
|
*/
|
|
2932
|
-
ariaLabel?: string;
|
|
2974
|
+
ariaLabel?: string | undefined;
|
|
2933
2975
|
/**
|
|
2934
2976
|
* 上部バー(ツールバー)の表示有無。`false` で `renderTopBar` / `enableGlobalFilter`
|
|
2935
2977
|
* に関わらず一切描画しない(表示のマスタースイッチ。矛盾指定時は `renderTopBar` より優先)。
|
|
2936
2978
|
*
|
|
2937
2979
|
* @defaultValue `true`
|
|
2938
2980
|
*/
|
|
2939
|
-
showTopBar?: boolean;
|
|
2981
|
+
showTopBar?: boolean | undefined;
|
|
2940
2982
|
/**
|
|
2941
2983
|
* 既定トップバーの summary chips(件数/フィルター/ソート)の表示有無。`renderTopBar`
|
|
2942
2984
|
* 未指定時のみ有効。これと `showTopBarFilter`
|
|
@@ -2944,27 +2986,27 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2944
2986
|
*
|
|
2945
2987
|
* @defaultValue `true`
|
|
2946
2988
|
*/
|
|
2947
|
-
showTopBarSummary?: boolean;
|
|
2989
|
+
showTopBarSummary?: boolean | undefined;
|
|
2948
2990
|
/**
|
|
2949
2991
|
* 既定トップバーの Rows / Columns 件数 chips の表示有無。`showTopBarSummary=true`(かつ
|
|
2950
2992
|
* `renderTopBar` 未指定)のときのみ有効。Filter / Sort chips は対象外。
|
|
2951
2993
|
*
|
|
2952
2994
|
* @defaultValue `true`
|
|
2953
2995
|
*/
|
|
2954
|
-
showTopBarCounts?: boolean;
|
|
2996
|
+
showTopBarCounts?: boolean | undefined;
|
|
2955
2997
|
/**
|
|
2956
2998
|
* 既定トップバーのグローバルフィルター入力欄の表示有無。`renderTopBar` 未指定時のみ有効。
|
|
2957
2999
|
* `enableGlobalFilter=false` のときは本値に関わらず非表示。
|
|
2958
3000
|
*
|
|
2959
3001
|
* @defaultValue `true`
|
|
2960
3002
|
*/
|
|
2961
|
-
showTopBarFilter?: boolean;
|
|
3003
|
+
showTopBarFilter?: boolean | undefined;
|
|
2962
3004
|
/**
|
|
2963
3005
|
* 既定トップバーのグローバルフィルター入力の placeholder。`renderTopBar` 未指定時のみ有効。
|
|
2964
3006
|
*
|
|
2965
3007
|
* @defaultValue `localeText` の `globalFilterPlaceholder`(`'グローバルフィルター'`)
|
|
2966
3008
|
*/
|
|
2967
|
-
globalFilterPlaceholder?: string;
|
|
3009
|
+
globalFilterPlaceholder?: string | undefined;
|
|
2968
3010
|
/**
|
|
2969
3011
|
* 既定トップバーのグローバルフィルター入力の左アイコン。`renderTopBar` 未指定時のみ有効。
|
|
2970
3012
|
* `undefined`=組み込みの検索(虫眼鏡)アイコン / `null`(など falsy)=アイコン無し / 任意
|
|
@@ -2972,7 +3014,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2972
3014
|
*
|
|
2973
3015
|
* @defaultValue 組み込み検索アイコン
|
|
2974
3016
|
*/
|
|
2975
|
-
globalFilterIcon?: F['node'];
|
|
3017
|
+
globalFilterIcon?: F['node'] | undefined;
|
|
2976
3018
|
/**
|
|
2977
3019
|
* グリッドが自分で出す文言(バー・メニュー・列フィルター・ツールパネル・検索・読み上げの名前・検証のメッセージなど)。
|
|
2978
3020
|
* 変えたいキーだけを渡す(`{ noRows: 'データがありません' }`)。`{name}` の所は値に置き換わる。
|
|
@@ -2981,21 +3023,21 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
2981
3023
|
*
|
|
2982
3024
|
* @defaultValue 日本語
|
|
2983
3025
|
*/
|
|
2984
|
-
localeText?: Partial<GridLocaleText
|
|
3026
|
+
localeText?: Partial<GridLocaleText> | undefined;
|
|
2985
3027
|
/**
|
|
2986
3028
|
* 下部バー(ステータスバー)の表示有無。`false` で `renderBottomBar`
|
|
2987
3029
|
* に関わらず一切描画しない(表示のマスタースイッチ。矛盾指定時は `renderBottomBar` より優先)。
|
|
2988
3030
|
*
|
|
2989
3031
|
* @defaultValue `true`
|
|
2990
3032
|
*/
|
|
2991
|
-
showBottomBar?: boolean;
|
|
3033
|
+
showBottomBar?: boolean | undefined;
|
|
2992
3034
|
/**
|
|
2993
3035
|
* 既定ボトムバーの Rows / Columns 件数 chips(左側)の表示有無。`renderBottomBar`
|
|
2994
3036
|
* 未指定時のみ有効。右側の Active / Selection / 選択統計 / Cols は対象外。
|
|
2995
3037
|
*
|
|
2996
3038
|
* @defaultValue `true`
|
|
2997
3039
|
*/
|
|
2998
|
-
showBottomBarCounts?: boolean;
|
|
3040
|
+
showBottomBarCounts?: boolean | undefined;
|
|
2999
3041
|
/**
|
|
3000
3042
|
* 2 セル以上を選んだとき、選択範囲の集計(平均 / データの個数 / 合計)を既定ボトムバーの右側(Active
|
|
3001
3043
|
* / Selection の隣の空き)に出す。数えるのは表示中のデータ行 ×
|
|
@@ -3003,11 +3045,12 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
3003
3045
|
* 平均は数値と数値の文字列だけ(グループ集計と同じ判定)、データの個数は空でないセル。
|
|
3004
3046
|
* 大きな選択は時間分割で計算し、その間は「集計中…」。SSRM
|
|
3005
3047
|
* では読み込み済みの行だけで計算し「読み込み済みの行のみ」と添える。`false` では計算もせず
|
|
3006
|
-
* `slotContext.selectionAggregates` は `null`(「選択範囲の集計」節)
|
|
3048
|
+
* `slotContext.selectionAggregates` は `null`(「選択範囲の集計」節)。バーに入りきらない項目は、
|
|
3049
|
+
* 途中で切らずに丸ごと出さない(平均 → データの個数 → 合計の順に隠す。1.0.1 から)。
|
|
3007
3050
|
*
|
|
3008
3051
|
* @defaultValue `true`
|
|
3009
3052
|
*/
|
|
3010
|
-
showSelectionAggregates?: boolean;
|
|
3053
|
+
showSelectionAggregates?: boolean | undefined;
|
|
3011
3054
|
/**
|
|
3012
3055
|
* フィルターチップバー(適用中の列フィルターをトップバー直下にチップで常時表示)
|
|
3013
3056
|
* の表示有無(opt-in)。有効フィルター 0 件時はバーごと非表示(空バーは出さない)。`showTopBar`
|
|
@@ -3016,7 +3059,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
3016
3059
|
*
|
|
3017
3060
|
* @defaultValue `false`
|
|
3018
3061
|
*/
|
|
3019
|
-
showFilterChipBar?: boolean;
|
|
3062
|
+
showFilterChipBar?: boolean | undefined;
|
|
3020
3063
|
/**
|
|
3021
3064
|
* 上部バーの差し替え。未指定時は内蔵トップバー(summary chips + フィルター入力。内訳は
|
|
3022
3065
|
* `showTopBarSummary` / `showTopBarFilter` で制御。フィルター入力は `enableGlobalFilter=true`
|
|
@@ -3024,21 +3067,21 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
3024
3067
|
*
|
|
3025
3068
|
* @defaultValue 内蔵トップバー
|
|
3026
3069
|
*/
|
|
3027
|
-
renderTopBar?: (context: SpreadsheetGridSlotContext<T, F>) => F['node'];
|
|
3070
|
+
renderTopBar?: ((context: SpreadsheetGridSlotContext<T, F>) => F['node']) | undefined;
|
|
3028
3071
|
/**
|
|
3029
3072
|
* 下部バーの差し替え。未指定時は内蔵ステータスバー。`showBottomBar=false`
|
|
3030
3073
|
* 時は本指定に関わらず描画されない。
|
|
3031
3074
|
*
|
|
3032
3075
|
* @defaultValue 内蔵ボトムバー
|
|
3033
3076
|
*/
|
|
3034
|
-
renderBottomBar?: (context: SpreadsheetGridSlotContext<T, F>) => F['node'];
|
|
3077
|
+
renderBottomBar?: ((context: SpreadsheetGridSlotContext<T, F>) => F['node']) | undefined;
|
|
3035
3078
|
/** ルート要素の class。 */
|
|
3036
|
-
className?: string;
|
|
3079
|
+
className?: string | undefined;
|
|
3037
3080
|
/**
|
|
3038
3081
|
* ルート要素(`.ssg-root`)のインライン style。`classNames.root` の style とマージされ、
|
|
3039
3082
|
* こちらが後勝ち。
|
|
3040
3083
|
*/
|
|
3041
|
-
style?: F['style'];
|
|
3084
|
+
style?: F['style'] | undefined;
|
|
3042
3085
|
/**
|
|
3043
3086
|
* パーツ別の追加スロット。各値は `GridSlotProps`(`string | { className?, style? }`)で、StyleX の
|
|
3044
3087
|
* `stylex.props(...)` の戻り値をそのまま渡せる。全 25
|
|
@@ -3046,8 +3089,12 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
3046
3089
|
* レンダー毎に新しいオブジェクトを渡してもよい(内容の署名で memo)。基底 class
|
|
3047
3090
|
* は未レイヤー・特異度 (0,1,0)
|
|
3048
3091
|
* のため同特異度のクラスは読み込み順で決まる(確実な上書きは連結セレクタか `style.layer.css`)。
|
|
3092
|
+
* Tailwind CSS v4 のユーティリティはレイヤー(`@layer utilities`)の中にあるので、
|
|
3093
|
+
* 読み込み順に関係なく `style.css`(未レイヤー)に負けて効かない。`style.layer.css` +
|
|
3094
|
+
* レイヤー順の宣言(`@layer theme, base, ssg-base, components, utilities;`)にするか、`!`
|
|
3095
|
+
* を付ける。
|
|
3049
3096
|
*/
|
|
3050
|
-
classNames?: GridClassNames<F
|
|
3097
|
+
classNames?: GridClassNames<F> | undefined;
|
|
3051
3098
|
/**
|
|
3052
3099
|
* 行ごとの追加 class(または `{ className, style }`)。行コンテナ + 行ヘッダー「#」セル +
|
|
3053
3100
|
* 各データセルに付与され、Tailwind / StyleX での行ハイライトに使える。`style`
|
|
@@ -3057,7 +3104,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
3057
3104
|
* は行と各セルの両方に付くので、`opacity` / `filter` のように重なる指定は style で返さず、class
|
|
3058
3105
|
* を返して `.ssg-body-row.<class>` で行だけに当てる(style の `opacity: 0.5` は 0.25 になる)。
|
|
3059
3106
|
*/
|
|
3060
|
-
getRowClassName?: (row: T, rowIndex: number, ctx: RowStyleContext<T>) => GridSlotProps<F> | undefined;
|
|
3107
|
+
getRowClassName?: ((row: T, rowIndex: number, ctx: RowStyleContext<T>) => GridSlotProps<F> | undefined) | undefined;
|
|
3061
3108
|
/**
|
|
3062
3109
|
* **展開行(Master/Detail)**。マスター行の直下に、行順(view index)を変えずに全幅の帯を差し込み、
|
|
3063
3110
|
* その中(カード)へ `render` の返す任意の React 要素(自前のサブグリッド / フォーム / 集計パネル等)
|
|
@@ -3067,12 +3114,12 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
3067
3114
|
*
|
|
3068
3115
|
* @defaultValue —(無効)
|
|
3069
3116
|
*/
|
|
3070
|
-
detailRow?: DetailRowOptions<T, F
|
|
3117
|
+
detailRow?: DetailRowOptions<T, F> | undefined;
|
|
3071
3118
|
/**
|
|
3072
3119
|
* 展開中の展開行のマスター行キー集合が**変化したとき**に呼ばれる(開閉の永続化・外部同期用)。
|
|
3073
3120
|
* 初回マウントでは発火しない。インライン関数可(latest-ref 経由)。
|
|
3074
3121
|
*/
|
|
3075
|
-
onExpandedDetailRowKeysChange?: (keys: GridRowKey[]) => void;
|
|
3122
|
+
onExpandedDetailRowKeysChange?: ((keys: GridRowKey[]) => void) | undefined;
|
|
3076
3123
|
/**
|
|
3077
3124
|
* **ラベル行(見出し / 区切り行)**。`rows` の中で `isLabelRow(row)` が true
|
|
3078
3125
|
* の行を「行数に数えない見出し」として、3 ペインを跨ぐ全幅の帯で描画する(中身は `render` で任意の
|
|
@@ -3085,7 +3132,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
3085
3132
|
*
|
|
3086
3133
|
* @defaultValue —(無効)
|
|
3087
3134
|
*/
|
|
3088
|
-
labelRow?: LabelRowOptions<T, F, L
|
|
3135
|
+
labelRow?: LabelRowOptions<T, F, L> | undefined;
|
|
3089
3136
|
/**
|
|
3090
3137
|
* **合計行**。表の下端に合計行を固定表示する(縦スクロールしても動かず、
|
|
3091
3138
|
* 横スクロールと左右の固定列には付いていく)。列ごとの集計は
|
|
@@ -3099,7 +3146,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
3099
3146
|
*
|
|
3100
3147
|
* @defaultValue —(無効)
|
|
3101
3148
|
*/
|
|
3102
|
-
totalRow?: boolean | TotalRowOptions<T, F
|
|
3149
|
+
totalRow?: boolean | TotalRowOptions<T, F> | undefined;
|
|
3103
3150
|
/**
|
|
3104
3151
|
* **フィルハンドル**。選択範囲(無ければアクティブセル)の右下に小さな四角を出し、
|
|
3105
3152
|
* 引いた先のセルを**連続データ**(1, 2, 3 … / 日付 / 曜日・月の名前 / `P-001` のような末尾の数)
|
|
@@ -3113,7 +3160,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
3113
3160
|
*
|
|
3114
3161
|
* @defaultValue —(無効)
|
|
3115
3162
|
*/
|
|
3116
|
-
fillHandle?: boolean | FillHandleOptions<T, F
|
|
3163
|
+
fillHandle?: boolean | FillHandleOptions<T, F> | undefined;
|
|
3117
3164
|
/**
|
|
3118
3165
|
* **行ドラッグ並び替え**。先頭にドラッグハンドル列(幅 28px・タイトル無しの合成列。
|
|
3119
3166
|
* 左固定列があれば左固定側)を挿入し、ハンドル(⋮⋮)を掴んで行を上下へ動かせる。確定時は
|
|
@@ -3124,20 +3171,20 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
3124
3171
|
*
|
|
3125
3172
|
* @defaultValue `false`
|
|
3126
3173
|
*/
|
|
3127
|
-
enableRowDrag?: boolean;
|
|
3174
|
+
enableRowDrag?: boolean | undefined;
|
|
3128
3175
|
/**
|
|
3129
3176
|
* 行ごとのドラッグ可否。`false` の行にはハンドルを描画しない。
|
|
3130
3177
|
* `ctx = { rowKey, sourceRowIndex }`。
|
|
3131
3178
|
*
|
|
3132
3179
|
* @defaultValue 全行可
|
|
3133
3180
|
*/
|
|
3134
|
-
isRowDraggable?: (row: T, ctx: RowDragContext) => boolean;
|
|
3181
|
+
isRowDraggable?: ((row: T, ctx: RowDragContext) => boolean) | undefined;
|
|
3135
3182
|
/**
|
|
3136
3183
|
* 行移動の確定後(`onRowsChange` の直後)に呼ばれる。
|
|
3137
3184
|
* `params = { rowKey, fromIndex, toIndex, rows }`(index は元 `rows` 配列基準、`rows` は
|
|
3138
3185
|
* `onRowsChange` と同じ新配列参照)。ハンドルの `moveRow()` による移動でも呼ばれる。
|
|
3139
3186
|
*/
|
|
3140
|
-
onRowMove?: (params: RowMoveParams<T>) => void;
|
|
3187
|
+
onRowMove?: ((params: RowMoveParams<T>) => void) | undefined;
|
|
3141
3188
|
/**
|
|
3142
3189
|
* コンテキストメニュー機能の有効化(マスタースイッチ)。他機能の `enable*` と同じく**既定 OFF**。
|
|
3143
3190
|
* `false` のあいだは `getContextMenuItems` を渡しても発火せず、
|
|
@@ -3146,7 +3193,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
3146
3193
|
*
|
|
3147
3194
|
* @defaultValue `false`
|
|
3148
3195
|
*/
|
|
3149
|
-
enableContextMenu?: boolean;
|
|
3196
|
+
enableContextMenu?: boolean | undefined;
|
|
3150
3197
|
/**
|
|
3151
3198
|
* セル/行の**完全カスタム**コンテキストメニュー。右クリック時のみ呼ばれ、
|
|
3152
3199
|
* 返した項目でメニューを描画する(ライブラリは固定の既定項目を持たない)。opt-in は
|
|
@@ -3155,9 +3202,9 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
3155
3202
|
* 未ロード行では開かない。ヘッダー右クリックは列メニュー(`enableColumnMenu`)が担当し、
|
|
3156
3203
|
* 本メニューはボディ(セル / 行NO ガター)専用。詳細は「コンテキストメニュー」節を参照。
|
|
3157
3204
|
*/
|
|
3158
|
-
getContextMenuItems?: (params: GridContextMenuParams<T, F>) => GridContextMenuItem<F>[];
|
|
3205
|
+
getContextMenuItems?: ((params: GridContextMenuParams<T, F>) => GridContextMenuItem<F>[]) | undefined;
|
|
3159
3206
|
/** */
|
|
3160
|
-
onContextMenuOpen?: (params: GridContextMenuParams<T, F>) => void;
|
|
3207
|
+
onContextMenuOpen?: ((params: GridContextMenuParams<T, F>) => void) | undefined;
|
|
3161
3208
|
/**
|
|
3162
3209
|
* **スクロール位置インジケーター**。スクロール中にスクロールバー脇へ行番号バブル(「行 N /
|
|
3163
3210
|
* 総行数」+ 任意の列値)と行目盛りルーラーを表示し、スクロールバー帯のホバーで「行 N へ」
|
|
@@ -3170,5 +3217,5 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
|
|
|
3170
3217
|
*
|
|
3171
3218
|
* @defaultValue —(無効)
|
|
3172
3219
|
*/
|
|
3173
|
-
scrollHint?: boolean | ScrollHintOptions<T, F
|
|
3220
|
+
scrollHint?: boolean | ScrollHintOptions<T, F> | undefined;
|
|
3174
3221
|
};
|