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