@ishibashi0112/spreadsheet-grid-core 1.0.1 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/dist/controllers/autoHeightMeasurer.cjs +1 -1
  2. package/dist/controllers/autoHeightMeasurer.js +4 -2
  3. package/dist/controllers/clipboardController.cjs +1 -2
  4. package/dist/controllers/clipboardController.d.ts +3 -0
  5. package/dist/controllers/clipboardController.js +78 -59
  6. package/dist/controllers/columnAutosizeRunner.cjs +1 -1
  7. package/dist/controllers/columnAutosizeRunner.d.ts +3 -1
  8. package/dist/controllers/columnAutosizeRunner.js +12 -10
  9. package/dist/controllers/columnHeaderDragController.cjs +1 -1
  10. package/dist/controllers/columnHeaderDragController.js +146 -140
  11. package/dist/controllers/columnMenuController.cjs +1 -1
  12. package/dist/controllers/columnMenuController.js +71 -69
  13. package/dist/controllers/contextMenuController.cjs +1 -1
  14. package/dist/controllers/contextMenuController.d.ts +4 -1
  15. package/dist/controllers/contextMenuController.js +55 -38
  16. package/dist/controllers/editController.cjs +1 -1
  17. package/dist/controllers/editController.js +78 -78
  18. package/dist/controllers/escapeClaimController.cjs +1 -1
  19. package/dist/controllers/escapeClaimController.d.ts +1 -0
  20. package/dist/controllers/escapeClaimController.js +11 -5
  21. package/dist/controllers/fillHandleController.cjs +1 -1
  22. package/dist/controllers/fillHandleController.d.ts +1 -0
  23. package/dist/controllers/fillHandleController.js +148 -147
  24. package/dist/controllers/filterPopoverController.cjs +1 -1
  25. package/dist/controllers/filterPopoverController.js +81 -77
  26. package/dist/controllers/findController.cjs +1 -1
  27. package/dist/controllers/findController.d.ts +1 -0
  28. package/dist/controllers/findController.js +36 -29
  29. package/dist/controllers/historyController.cjs +1 -1
  30. package/dist/controllers/historyController.d.ts +6 -0
  31. package/dist/controllers/historyController.js +79 -37
  32. package/dist/controllers/keyboardController.cjs +1 -1
  33. package/dist/controllers/keyboardController.d.ts +1 -0
  34. package/dist/controllers/keyboardController.js +116 -116
  35. package/dist/controllers/pointerInteractionsController.cjs +1 -1
  36. package/dist/controllers/pointerInteractionsController.d.ts +1 -0
  37. package/dist/controllers/pointerInteractionsController.js +142 -142
  38. package/dist/controllers/popoverSupport.cjs +1 -1
  39. package/dist/controllers/popoverSupport.d.ts +1 -0
  40. package/dist/controllers/popoverSupport.js +17 -7
  41. package/dist/controllers/rowDragController.cjs +1 -1
  42. package/dist/controllers/rowDragController.d.ts +1 -0
  43. package/dist/controllers/rowDragController.js +151 -149
  44. package/dist/controllers/rowEnterController.cjs +1 -1
  45. package/dist/controllers/rowEnterController.d.ts +1 -0
  46. package/dist/controllers/rowEnterController.js +47 -42
  47. package/dist/controllers/toolPanelController.cjs +1 -1
  48. package/dist/controllers/toolPanelController.js +26 -14
  49. package/dist/controllers/tooltipController.cjs +1 -1
  50. package/dist/controllers/tooltipController.js +85 -66
  51. package/dist/controllers/viewportSyncController.cjs +1 -1
  52. package/dist/controllers/viewportSyncController.d.ts +4 -1
  53. package/dist/controllers/viewportSyncController.js +89 -30
  54. package/dist/engine/exportCommands.cjs +1 -1
  55. package/dist/engine/exportCommands.js +16 -9
  56. package/dist/engine/filterPopoverCommands.cjs +1 -1
  57. package/dist/engine/filterPopoverCommands.d.ts +2 -0
  58. package/dist/engine/filterPopoverCommands.js +15 -15
  59. package/dist/engine/fullFeatures.cjs +1 -1
  60. package/dist/engine/fullFeatures.js +17 -17
  61. package/dist/engine/gridApi.cjs +3 -3
  62. package/dist/engine/gridApi.d.ts +7 -2
  63. package/dist/engine/gridApi.js +16 -16
  64. package/dist/engine/rowSelectionCommands.cjs +1 -1
  65. package/dist/engine/rowSelectionCommands.d.ts +1 -0
  66. package/dist/engine/rowSelectionCommands.js +21 -12
  67. package/dist/index.cjs +1 -1
  68. package/dist/index.d.ts +3 -1
  69. package/dist/index.js +7 -6
  70. package/dist/locales/en.cjs +1 -1
  71. package/dist/locales/en.js +10 -4
  72. package/dist/logic/autoScrollGeometry.cjs +1 -1
  73. package/dist/logic/autoScrollGeometry.d.ts +2 -0
  74. package/dist/logic/autoScrollGeometry.js +3 -3
  75. package/dist/logic/columnAutosize.cjs +1 -1
  76. package/dist/logic/columnAutosize.d.ts +8 -2
  77. package/dist/logic/columnAutosize.js +102 -87
  78. package/dist/logic/detailRow.cjs +1 -1
  79. package/dist/logic/detailRow.d.ts +4 -0
  80. package/dist/logic/detailRow.js +18 -15
  81. package/dist/logic/editorValues.cjs +1 -1
  82. package/dist/logic/editorValues.d.ts +1 -0
  83. package/dist/logic/editorValues.js +37 -34
  84. package/dist/logic/exportCsv.cjs +3 -3
  85. package/dist/logic/exportCsv.d.ts +3 -1
  86. package/dist/logic/exportCsv.js +22 -20
  87. package/dist/logic/exportData.cjs +1 -1
  88. package/dist/logic/exportData.d.ts +3 -1
  89. package/dist/logic/exportData.js +40 -36
  90. package/dist/logic/filterSummary.cjs +1 -1
  91. package/dist/logic/filterSummary.js +9 -2
  92. package/dist/logic/filtering.cjs +1 -1
  93. package/dist/logic/filtering.d.ts +2 -1
  94. package/dist/logic/filtering.js +16 -3
  95. package/dist/logic/find.cjs +1 -1
  96. package/dist/logic/find.d.ts +4 -3
  97. package/dist/logic/find.js +27 -13
  98. package/dist/logic/gridAsk.cjs +2 -2
  99. package/dist/logic/gridAsk.d.ts +7 -7
  100. package/dist/logic/gridAsk.js +140 -122
  101. package/dist/logic/gridAskLocaleText.cjs +1 -1
  102. package/dist/logic/gridAskLocaleText.d.ts +2 -0
  103. package/dist/logic/gridAskLocaleText.js +1 -0
  104. package/dist/logic/gridState.d.ts +2 -2
  105. package/dist/logic/groupExport.cjs +1 -1
  106. package/dist/logic/groupExport.js +28 -27
  107. package/dist/logic/grouping.cjs +1 -1
  108. package/dist/logic/grouping.d.ts +1 -0
  109. package/dist/logic/grouping.js +52 -41
  110. package/dist/logic/historyRebase.cjs +1 -0
  111. package/dist/logic/historyRebase.d.ts +5 -0
  112. package/dist/logic/historyRebase.js +36 -0
  113. package/dist/logic/localeText.cjs +1 -1
  114. package/dist/logic/localeText.d.ts +2 -0
  115. package/dist/logic/localeText.js +1 -0
  116. package/dist/logic/localeTextFeatures.cjs +1 -1
  117. package/dist/logic/localeTextFeatures.d.ts +4 -0
  118. package/dist/logic/localeTextFeatures.js +10 -7
  119. package/dist/logic/localeTextFilters.cjs +1 -1
  120. package/dist/logic/localeTextFilters.d.ts +1 -0
  121. package/dist/logic/localeTextFilters.js +1 -0
  122. package/dist/logic/localeTextPopups.cjs +1 -1
  123. package/dist/logic/localeTextPopups.d.ts +1 -0
  124. package/dist/logic/localeTextPopups.js +3 -2
  125. package/dist/logic/numberFilterCondition.cjs +1 -1
  126. package/dist/logic/numberFilterCondition.d.ts +1 -1
  127. package/dist/logic/numberFilterCondition.js +5 -5
  128. package/dist/logic/scrollTargets.cjs +1 -1
  129. package/dist/logic/scrollTargets.js +2 -2
  130. package/dist/logic/selectEditorState.cjs +1 -1
  131. package/dist/logic/selectEditorState.d.ts +1 -0
  132. package/dist/logic/selectEditorState.js +8 -1
  133. package/dist/logic/selectLabels.cjs +1 -0
  134. package/dist/logic/selectLabels.d.ts +3 -0
  135. package/dist/logic/selectLabels.js +41 -0
  136. package/dist/logic/valueFormatters.d.ts +5 -5
  137. package/dist/logic/valueParsers.cjs +1 -0
  138. package/dist/logic/valueParsers.d.ts +14 -0
  139. package/dist/logic/valueParsers.js +23 -0
  140. package/dist/logic/verticalGeometry.cjs +1 -1
  141. package/dist/logic/verticalGeometry.d.ts +1 -0
  142. package/dist/logic/verticalGeometry.js +12 -8
  143. package/dist/model/gridActions.cjs +1 -1
  144. package/dist/model/gridActions.d.ts +2 -1
  145. package/dist/model/gridActions.js +3 -2
  146. package/dist/model/gridReducer.cjs +1 -1
  147. package/dist/model/gridReducer.js +145 -62
  148. package/dist/model/gridTypes.core.d.ts +492 -315
  149. package/dist/utils/clipboard.cjs +4 -6
  150. package/dist/utils/clipboard.d.ts +15 -2
  151. package/dist/utils/clipboard.js +103 -48
  152. package/dist/utils/popupContainer.cjs +1 -0
  153. package/dist/utils/popupContainer.d.ts +8 -0
  154. package/dist/utils/popupContainer.js +60 -0
  155. 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,8 +240,12 @@ 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
+ /** 固定行(`pinnedTopRows` / `pinnedBottomRows`)のセルのときだけ `'top'` / `'bottom'`(本体の行では無い)。 */
245
+ pinned?: GridPinnedRowPosition | undefined;
244
246
  };
247
+ /** 固定行の帯。`'top'` は `pinnedTopRows`、`'bottom'` は `pinnedBottomRows`。 */
248
+ export type GridPinnedRowPosition = 'top' | 'bottom';
245
249
  export type CellDetailContext = {
246
250
  expanded: boolean;
247
251
  expandable: boolean;
@@ -273,17 +277,17 @@ export type DetailRowOptions<T, F extends GridFrameworkTypes = GridFrameworkType
273
277
  *
274
278
  * @defaultValue `200`
275
279
  */
276
- height?: number;
280
+ height?: number | undefined;
277
281
  /**
278
282
  * 行ごとの展開可否。`false` の行はトグルが描画されず、命令的 API / `ctx.detail.toggle()`
279
283
  * からの展開も no-op。
280
284
  *
281
285
  * @defaultValue 全行展開可
282
286
  */
283
- isExpandable?: (row: T, ctx: {
287
+ isExpandable?: ((row: T, ctx: {
284
288
  rowKey: GridRowKey;
285
289
  sourceRowIndex: number;
286
- }) => boolean;
290
+ }) => boolean) | undefined;
287
291
  /**
288
292
  * 専用トグル列(幅 28px・タイトル無し、行ヘッダーの右隣 = 先頭列。左固定列があるときは左固定側)
289
293
  * を自動挿入する。`false` にすると列は挿入されず、任意の列の `renderCell` から
@@ -291,12 +295,12 @@ export type DetailRowOptions<T, F extends GridFrameworkTypes = GridFrameworkType
291
295
  *
292
296
  * @defaultValue `true`
293
297
  */
294
- showToggleColumn?: boolean;
298
+ showToggleColumn?: boolean | undefined;
295
299
  /**
296
300
  * カード要素へ追加する class(または `{ className, style }`。`classNames.detailCard`
297
301
  * に加えて付与)。
298
302
  */
299
- className?: GridSlotProps<F>;
303
+ className?: GridSlotProps<F> | undefined;
300
304
  };
301
305
  export type LabelRowSortMode = 'section' | 'follow' | 'hide';
302
306
  export type GridLabelRow<T> = {
@@ -334,15 +338,15 @@ export type LabelRowOptions<T, F extends GridFrameworkTypes = GridFrameworkTypes
334
338
  * `ctx = { row, rowKey, rowIndex, sourceRowIndex, label, sectionRowCount }`(`sectionRowCount`
335
339
  * はフィルター後のセクション内データ行数。serverSide では `undefined`)。
336
340
  */
337
- render?: (ctx: LabelRowRenderContext<L>) => F['node'];
341
+ render?: ((ctx: LabelRowRenderContext<L>) => F['node']) | undefined;
338
342
  /**
339
343
  * ラベル行の高さ(px)。行ごとに変えるときは関数。
340
344
  *
341
345
  * @defaultValue `rowHeight`
342
346
  */
343
- height?: number | ((row: L) => number);
347
+ height?: number | ((row: L) => number) | undefined;
344
348
  /** 行要素へ追加する class(または `{ className, style }`)。`classNames.labelRow` に加えて付与。 */
345
- className?: GridSlotProps<F> | ((row: L) => GridSlotProps<F> | undefined);
349
+ className?: GridSlotProps<F> | ((row: L) => GridSlotProps<F> | undefined) | undefined;
346
350
  /**
347
351
  * 縦スクロール中、現在セクションのラベル行を列ヘッダー直下に固定する。
348
352
  * 次のラベル行が到達すると押し上げられて交代する(clientSide のみ)。キーボード操作 / `scrollToRow`
@@ -350,26 +354,26 @@ export type LabelRowOptions<T, F extends GridFrameworkTypes = GridFrameworkTypes
350
354
  *
351
355
  * @defaultValue `false`
352
356
  */
353
- sticky?: boolean;
357
+ sticky?: boolean | undefined;
354
358
  /**
355
359
  * ソート / フィルター適用時の扱い(下記)。
356
360
  *
357
361
  * @defaultValue `'section'`
358
362
  */
359
- sortMode?: LabelRowSortMode;
363
+ sortMode?: LabelRowSortMode | undefined;
360
364
  /**
361
365
  * フィルターで中身が 0 件になったセクションのラベル行を残す。
362
366
  *
363
367
  * @defaultValue `false`
364
368
  */
365
- keepEmptySections?: boolean;
369
+ keepEmptySections?: boolean | undefined;
366
370
  /**
367
371
  * エクスポート(`includeLabelRows: true`)時の出力値。文字列は先頭列(他列は空)、
368
372
  * 配列は列順にそのまま。
369
373
  *
370
374
  * @defaultValue `getLabel` を先頭列へ
371
375
  */
372
- exportText?: (row: L) => string | ReadonlyArray<string | number | null | undefined>;
376
+ exportText?: ((row: L) => string | ReadonlyArray<string | number | null | undefined>) | undefined;
373
377
  };
374
378
  export type TotalRowCellKind = GridAggFuncName | 'custom' | 'value';
375
379
  export type TotalRowCellContext<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
@@ -392,26 +396,26 @@ export type TotalRowOptions<T, F extends GridFrameworkTypes = GridFrameworkTypes
392
396
  *
393
397
  * @defaultValue `localeText` の `totalRowLabel`(`'合計'`)
394
398
  */
395
- label?: string;
399
+ label?: string | undefined;
396
400
  /**
397
401
  * 列 key → 表示する値。指定した列は計算せずこの値を出す(`aggFunc` より優先。serverSide
398
402
  * はこれだけ)。
399
403
  */
400
- values?: Readonly<Record<string, unknown>>;
404
+ values?: Readonly<Record<string, unknown>> | undefined;
401
405
  /**
402
406
  * 値のあるセルの中身を差し替える。`ctx = { column, value, kind, text, caption }`(`kind` は
403
407
  * `'sum' | 'avg' | 'min' | 'max' | 'count' | 'custom' | 'value'`、`text` は既定の表示文字列、
404
408
  * `caption` は種類の見出し)。
405
409
  */
406
- renderCell?: (ctx: TotalRowCellContext<T, F>) => F['node'];
410
+ renderCell?: ((ctx: TotalRowCellContext<T, F>) => F['node']) | undefined;
407
411
  /**
408
412
  * 合計行の高さ(px)。
409
413
  *
410
414
  * @defaultValue `rowHeight`
411
415
  */
412
- height?: number;
416
+ height?: number | undefined;
413
417
  /** 行要素へ追加する class(または `{ className, style }`)。`classNames.totalRow` に加えて付与。 */
414
- className?: GridSlotProps<F>;
418
+ className?: GridSlotProps<F> | undefined;
415
419
  };
416
420
  export type GridFillDirection = 'down' | 'up' | 'right' | 'left';
417
421
  export type GridFillKind = 'series' | 'copy';
@@ -449,7 +453,7 @@ export type FillHandleOptions<T, F extends GridFrameworkTypes = GridFrameworkTyp
449
453
  * ドラッグ中のツールチップ(いちばん遠いセルの値)でも呼ぶため、副作用の無い関数にする。返した値も
450
454
  * `validate` を通り、reject なら書かない。
451
455
  */
452
- getFillValue?: (params: GridFillValueParams<T, F>) => unknown;
456
+ getFillValue?: ((params: GridFillValueParams<T, F>) => unknown) | undefined;
453
457
  };
454
458
  export type RowDragContext = {
455
459
  rowKey: GridRowKey;
@@ -473,6 +477,8 @@ export type CellStyleContext<T, F extends GridFrameworkTypes = GridFrameworkType
473
477
  isSelected: boolean;
474
478
  isEditing: boolean;
475
479
  readOnly: boolean;
480
+ /** 固定行(`pinnedTopRows` / `pinnedBottomRows`)のセルのときだけ `'top'` / `'bottom'`。 */
481
+ pinned?: GridPinnedRowPosition | undefined;
476
482
  };
477
483
  /**
478
484
  * `canEditCell` の第 5 引数。`sourceRowIndex` は元 `rows` の index(serverSide では view index と同値)、
@@ -488,6 +494,8 @@ export type RowStyleContext<T> = {
488
494
  sourceRowIndex: number;
489
495
  rowKey: GridRowKey;
490
496
  isSelected: boolean;
497
+ /** 固定行(`pinnedTopRows` / `pinnedBottomRows`)のときだけ `'top'` / `'bottom'`。 */
498
+ pinned?: GridPinnedRowPosition | undefined;
491
499
  };
492
500
  export type CellRenderState = {
493
501
  isActive: boolean;
@@ -500,7 +508,7 @@ export type HeaderRenderContext<T, F extends GridFrameworkTypes = GridFrameworkT
500
508
  width: number;
501
509
  column: GridColumn<T, F>;
502
510
  filterValue?: unknown;
503
- isFiltered?: boolean;
511
+ isFiltered?: boolean | undefined;
504
512
  };
505
513
  export type GridColumnPinned = 'left' | 'right';
506
514
  export type CellValueFormatterParams<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
@@ -515,17 +523,25 @@ export type GridTextEditorEnterKey = 'commit' | 'newline';
515
523
  export type GridSelectEditorOption = GridSelectFilterOption;
516
524
  export type GridColumnEditor<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
517
525
  type: 'text';
518
- multiline?: boolean;
519
- enterKey?: GridTextEditorEnterKey;
526
+ multiline?: boolean | undefined;
527
+ enterKey?: GridTextEditorEnterKey | undefined;
520
528
  } | {
521
529
  type: 'number';
522
- min?: number;
523
- max?: number;
524
- step?: number;
525
- integer?: boolean;
530
+ min?: number | undefined;
531
+ max?: number | undefined;
532
+ step?: number | undefined;
533
+ integer?: boolean | undefined;
526
534
  } | {
527
535
  type: 'select';
528
536
  options: GridSelectEditorOption[] | ((row: T) => GridSelectEditorOption[]);
537
+ /**
538
+ * クリップボードとのやり取りの文字(1.1.0 から)。`'value'`(既定)は値のまま。`'label'` はコピー / CSV / TSV /
539
+ * `getExportData` の `text` を候補の label にし、貼り付けた文字が label ならその value へ読み替える(value はそのまま、
540
+ * どちらでもない文字は生のまま)。列の `formatClipboardValue` / `parseClipboardValue` があればそちらが勝つ。
541
+ *
542
+ * @defaultValue `'value'`
543
+ */
544
+ clipboard?: 'value' | 'label' | undefined;
529
545
  } | {
530
546
  type: 'date';
531
547
  } | {
@@ -545,7 +561,7 @@ export type CellEditorContext<T, F extends GridFrameworkTypes = GridFrameworkTyp
545
561
  column: GridColumn<T, F>;
546
562
  value: unknown;
547
563
  initialText: string;
548
- align?: 'left' | 'center' | 'right';
564
+ align?: 'left' | 'center' | 'right' | undefined;
549
565
  commit: (value: unknown, direction?: EditorCommitDirection) => EditorCommitResult;
550
566
  cancel: () => void;
551
567
  };
@@ -564,6 +580,43 @@ export type GridInvalidCell = {
564
580
  columnKey: string;
565
581
  message: string;
566
582
  };
583
+ /** `applyRows` のオプション。 */
584
+ export type GridApplyRowsOptions = {
585
+ /**
586
+ * `false` で「元に戻す」の履歴に積まず、今の履歴も消さない(株価のような外からのライブの更新)。元に戻す / やり直すは、
587
+ * その後の外からの更新を残したまま、グリッドでの編集だけを取り消す / やり直す(行は `rowKeyGetter` で対応づける)。既定 `true`。
588
+ */
589
+ undoable?: boolean | undefined;
590
+ };
591
+ /**
592
+ * 貼り付けで書かなかったセル(`onPasteSkipped`)。`reason` は `'readOnly'`(編集できないセル = 列の `editable` /
593
+ * `canEditCell`)か `'invalid'`(`validationMode: 'reject'` の列で検査に通らなかった値)。
594
+ */
595
+ export type GridPasteSkippedCell<T> = {
596
+ /** 貼り付け先の行(表の末尾に足した行を含む)。 */
597
+ row: T;
598
+ /** 行のキー(`rowKeyGetter`。無ければ `rows` の index)。 */
599
+ rowKey: GridRowKey;
600
+ /** ビュー行 index(フィルター / ソート後の位置。末尾に足した行は足した後の位置)。 */
601
+ rowIndex: number;
602
+ /** 列の key。 */
603
+ columnKey: string;
604
+ /** 表示列の index(合成列を含む画面の並び)。 */
605
+ colIndex: number;
606
+ /** 貼り付けた文字(そのセルの 1 つぶん)。 */
607
+ text: string;
608
+ /** 書かなかったわけ。 */
609
+ reason: 'readOnly' | 'invalid';
610
+ /** `'invalid'` のとき、列のパーサが読んだ値(`'readOnly'` では読まないので `undefined`)。 */
611
+ value?: unknown;
612
+ /** `'invalid'` のときの検査のメッセージ。 */
613
+ message?: string | undefined;
614
+ };
615
+ /** `onPasteSkipped` の引数。 */
616
+ export type GridPasteSkippedParams<T> = {
617
+ /** 書かなかったセル(貼り付けた文字の順。行ごとに左から)。 */
618
+ cells: GridPasteSkippedCell<T>[];
619
+ };
567
620
  export type EditorCommitResult = {
568
621
  status: 'committed';
569
622
  } | {
@@ -598,7 +651,7 @@ export type GridGroupRow = {
598
651
  */
599
652
  export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
600
653
  /** 型推論用の内部マーカーです(実行時には存在しません)。指定しないでください。 */
601
- readonly __framework?: F;
654
+ readonly __framework?: F | undefined;
602
655
  /** 列の一意キー。 */
603
656
  key: string;
604
657
  /**
@@ -606,32 +659,32 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
606
659
  * フィルターパネル / CSV ヘッダー等の列名表示も同じフォールバック)。
607
660
  * ボタン専用列などで見出しを空にしたい場合は空白 1 文字(`' '`)等を指定する。
608
661
  */
609
- title?: string;
662
+ title?: string | undefined;
610
663
  /** 列幅(px)。 */
611
664
  width: number;
612
665
  /**
613
666
  * リサイズ時の下限幅(未指定時の手動リサイズの下限は 60px。`0` を指定すると 0 まで縮められる)。
614
667
  * flex 配分時の下限クランプにも使用(flex 列で未指定なら内部既定 50px)。
615
668
  */
616
- minWidth?: number;
669
+ minWidth?: number | undefined;
617
670
  /**
618
671
  * 上限幅。**未指定なら上限なし**(autoSize は内容にぴったり合わせ、
619
672
  * 手動リサイズも自由に広げられます。既定の上限は設けません)。指定すると autoSize / 手動リサイズ /
620
673
  * flex 配分の上限クランプに使われます。
621
674
  */
622
- maxWidth?: number;
675
+ maxWidth?: number | undefined;
623
676
  /**
624
677
  * 折り返し時(= `autoHeight` 列)の CSS `word-break`。`'auto-phrase'` は Chromium(Chrome / Edge)で
625
678
  * BudouX による文節折り返し(Firefox / 一部 Safari 未対応)。**nowrap(非 `autoHeight`)
626
679
  * 列では折り返し自体が起きないため効果なし**。既定(未指定)はブラウザ標準=禁則つき文字折り返し。
627
680
  * 詳細は「日本語テキストの折り返し」節。
628
681
  */
629
- wordBreak?: 'normal' | 'break-all' | 'keep-all' | 'break-word' | 'auto-phrase';
682
+ wordBreak?: 'normal' | 'break-all' | 'keep-all' | 'break-word' | 'auto-phrase' | undefined;
630
683
  /**
631
684
  * 折り返し時の CSS `line-break`(禁則処理の強さ)。`'strict'` で禁則を厳格化。`wordBreak` 同様、
632
685
  * 折り返す列でのみ効果あり。
633
686
  */
634
- lineBreak?: 'auto' | 'loose' | 'normal' | 'strict' | 'anywhere';
687
+ lineBreak?: 'auto' | 'loose' | 'normal' | 'strict' | 'anywhere' | undefined;
635
688
  /**
636
689
  * center 列(非 pinned)の伸縮比。余り幅(コンテナ幅 − 行ヘッダー − pinned 合計 − `width`
637
690
  * 固定列の合計)を flex 比で配分し `minWidth`/`maxWidth` でクランプ。配分した幅は整数
@@ -641,7 +694,7 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
641
694
  * の列では `width` は使わない(最小の幅にもならず、余り幅が無いと既定の下限 50px まで縮む)。
642
695
  * 縮ませたくない幅は `minWidth` で書く。詳細は下記「flex と autoSize」節。
643
696
  */
644
- flex?: number;
697
+ flex?: number | undefined;
645
698
  /**
646
699
  * この列の手動リサイズ可否。`false` でヘッダーのリサイズハンドルを非表示。
647
700
  * リサイズハンドルの**ダブルクリック**でその列を内容幅へ autoSize(`false`
@@ -649,7 +702,7 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
649
702
  *
650
703
  * @defaultValue グリッドの `enableColumnResize` を継承
651
704
  */
652
- resizable?: boolean;
705
+ resizable?: boolean | undefined;
653
706
  /**
654
707
  * `true` で autoSize の対象外(列メニュー / 境界ダブルクリック /
655
708
  * すべての列の自動調整すべてでスキップ)。consumer 指定の `width` を維持(固定幅優先)。
@@ -657,48 +710,50 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
657
710
  *
658
711
  * @defaultValue `false`
659
712
  */
660
- suppressAutoSize?: boolean;
713
+ suppressAutoSize?: boolean | undefined;
661
714
  /**
662
715
  * autoSize の幅見積もり。指定列は「セル内容の content 幅(px・セルの padding/border を除く)」
663
716
  * をこの関数から得て、**全行の最大 + セル枠**で確定します(テキスト/候補/実 DOM 計測を使わず、
664
717
  * React mount もしません)。テキスト長が実描画幅と相関しない renderCell
665
718
  * カスタムUI列(横並びバッジ等)向けの opt-in。返す値は `renderCell` の実描画幅と一致させること。
666
719
  */
667
- estimateCellWidth?: (row: T, column: GridColumn<T, F>) => number;
720
+ estimateCellWidth?: ((row: T, column: GridColumn<T, F>) => number) | undefined;
668
721
  /**
669
722
  * この列が auto-height 行の高さを駆動(グリッドの `autoHeight` 有効時のみ)。**autoSize
670
723
  * の対象外**(折り返し前提のため。下記「flex と autoSize」の制約を参照)。
671
724
  */
672
- autoHeight?: boolean;
725
+ autoHeight?: boolean | undefined;
673
726
  /**
674
727
  * auto-height で伸びた行での、この列の中身の縦の揃え(グリッドの `verticalAlign` より優先)。
675
728
  * 書かなければグリッドの指定、それも無ければ `autoHeight` の列は上、ほかの列は真ん中。
676
729
  */
677
- verticalAlign?: GridVerticalAlign;
730
+ verticalAlign?: GridVerticalAlign | undefined;
678
731
  /**
679
732
  * 列の表示/非表示。非表示にしても、その列に載った列フィルター / ソートは行の絞り込み /
680
733
  * 並べ替えに効き続ける(クイックフィルター = グローバル検索は可視列のみが対象)。
681
734
  */
682
- visible?: boolean;
735
+ visible?: boolean | undefined;
683
736
  /**
684
737
  * この列の編集可否。**未指定の列は編集可**で、`false` または `readOnly: true`
685
738
  * で編集不可になる(グリッド全体は `readOnly`、セル単位は `canEditCell`)。
686
739
  *
687
740
  * @defaultValue `true`(未指定 = 編集可)
688
741
  */
689
- editable?: boolean;
742
+ editable?: boolean | undefined;
690
743
  /** この列を読み取り専用にする。 */
691
- readOnly?: boolean;
744
+ readOnly?: boolean | undefined;
692
745
  /**
693
746
  * 列固定の方向。固定列(行番号の列を含む)の合計が広すぎて中央に 120px を残せない間は、
694
747
  * 右の固定列の内側から、次に左の固定列の内側から順に、
695
748
  * 表示の上だけ固定を外して中央でスクロールさせる(`columns` の `pinned` は変えず、
696
749
  * 広くなれば固定に戻る。スマホの幅で右の固定列が左の固定列に重なり、中央が見えなかったため。1.0.1
697
- * から)。
750
+ * から)。列の合計幅が表の幅より狭いときは、
751
+ * 右の固定列は表の右端ではなく中央の列のすぐ右に付く(右端に置きたいときは中央の列のどれかに
752
+ * `flex` を付けて余りの幅を埋める)。
698
753
  *
699
754
  * @defaultValue undefined = 中央スクロール
700
755
  */
701
- pinned?: GridColumnPinned;
756
+ pinned?: GridColumnPinned | undefined;
702
757
  /**
703
758
  * `true` でこの列を行グルーピングの対象にする(複数指定時は `columns` 配列の出現順が階層順)。
704
759
  * 有効時はグループ元列が表示から外れ、先頭に自動グループ列(ツリー表示)が注入される。**clientSide
@@ -707,7 +762,7 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
707
762
  * が要る。`rowGroup` を書いた列だけでなく、集計のある列と最後のデータ列を除くすべての列に出る)。
708
763
  * 詳細は「行グルーピング + 集計」節。
709
764
  */
710
- rowGroup?: boolean;
765
+ rowGroup?: boolean | undefined;
711
766
  /**
712
767
  * グルーピング時と合計行(`totalRow`)のこの列の集計。
713
768
  * 組み込みは数値と数値の文字列だけを数える集計(空値・空白だけの文字列・`true` /
@@ -715,7 +770,17 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
715
770
  * 関数でカスタム集計可(返り値がグループ行 / 合計行に表示)。`rowGroup` 列も `totalRow`
716
771
  * もないときは無視。
717
772
  */
718
- aggFunc?: GridAggFuncName | GridAggFunc<T, F>;
773
+ aggFunc?: GridAggFuncName | GridAggFunc<T, F> | undefined;
774
+ /**
775
+ * 行グルーピングのグループ行の見出しの文字(1.1.0 から)。`'value'` は値の文字(1.0 までと同じ)、
776
+ * `'formatted'` は列の `valueFormatter`(セルと同じ表示名。無ければ値の文字)、
777
+ * 関数はその返り値(`row` はそのグループの最初の行)。空白のグループは「(空白)」のまま。
778
+ * エクスポートの小計の行の見出しはコピーと同じ規則(`formatClipboardValue`)。
779
+ * 詳細は「値と表示名が別の列」節。
780
+ *
781
+ * @defaultValue `'value'`
782
+ */
783
+ groupLabel?: 'value' | 'formatted' | CellValueFormatter<T, F> | undefined;
719
784
  /**
720
785
  * 値アクセサ。`setValue` の無い列へ書き込むと値は `row[key]` へ入り、表示(`getValue`)
721
786
  * は変わらない。計算列は `editable: false` にするか `setValue` を渡す(開発時は、
@@ -723,15 +788,15 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
723
788
  *
724
789
  * @defaultValue `row[key]`
725
790
  */
726
- getValue?: (row: T) => unknown;
791
+ getValue?: ((row: T) => unknown) | undefined;
727
792
  /** 値ライター(新しい行を返す)。 */
728
- setValue?: (row: T, value: unknown) => T;
793
+ setValue?: ((row: T, value: unknown) => T) | undefined;
729
794
  /**
730
795
  * カスタムセル描画。
731
796
  *
732
797
  * @defaultValue プレーン `<span>`
733
798
  */
734
- renderCell?: (ctx: CellRenderContext<T, F>) => F['node'];
799
+ renderCell?: ((ctx: CellRenderContext<T, F>) => F['node']) | undefined;
735
800
  /**
736
801
  * セルへ付与する追加 class(条件付きスタイル)。`GridSlotProps` = `string | { className?, style? }`
737
802
  * で、StyleX の `stylex.props(...)` をそのまま返せる(`style` はセルへインライン付与。座標 /
@@ -740,7 +805,7 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
740
805
  * 行基準のデータと突き合わせ可能。「補助型」節参照)。基底 `.ssg-body-cell` は未レイヤー・特異度
741
806
  * (0,1,0)。確実な上書きは `.ssg-body-cell.my-class` の連結を推奨。
742
807
  */
743
- cellClassName?: GridSlotProps<F> | ((ctx: CellStyleContext<T, F>) => GridSlotProps<F> | undefined);
808
+ cellClassName?: GridSlotProps<F> | ((ctx: CellStyleContext<T, F>) => GridSlotProps<F> | undefined) | undefined;
744
809
  /**
745
810
  * セルのメモ(FarPoint SPREAD のセルメモ / Excel のメモ相当)。文字列を返したセルの右上に印(10px
746
811
  * の三角。色はトークン `--ssg-note-indicator`)を出し、
@@ -751,7 +816,7 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
751
816
  * 描画中のセルだけ評価する(`cellClassName` 関数と同じコスト階級)。CSV / TSV / クリップボード /
752
817
  * `getExportData` には含めない。詳細は「セルのメモ(`cellNote`)」節。
753
818
  */
754
- cellNote?: (ctx: CellStyleContext<T, F>) => string | null | undefined;
819
+ cellNote?: ((ctx: CellStyleContext<T, F>) => string | null | undefined) | undefined;
755
820
  /**
756
821
  * **条件付き書式**。既定セルの描画に、値の「量」/「向き」/「状態」を重ねる。`dataBar`(背景の帯。
757
822
  * `min` / `max` 省略時はビュー行 = フィルター / ソート適用後の数値から自動集計、負の値は 0
@@ -763,13 +828,13 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
763
828
  * エクスポート / コピー / ソート / フィルターには影響しない。色はトークン `--ssg-cf-*`。
764
829
  * 詳細は「条件付き書式(`conditionalFormat`)」節。
765
830
  */
766
- conditionalFormat?: GridConditionalFormat<T, F>;
831
+ conditionalFormat?: GridConditionalFormat<T, F> | undefined;
767
832
  /**
768
833
  * セル内容の水平寄せ(UI 表示のみ・元の値は不変)。セル表示と編集 input に反映。
769
834
  *
770
835
  * @defaultValue `'left'`
771
836
  */
772
- align?: 'left' | 'center' | 'right';
837
+ align?: 'left' | 'center' | 'right' | undefined;
773
838
  /**
774
839
  * 列見出しの水平寄せ(書かなければ `align` に合わせる。見出しだけ変えたい列に書く)。`'right'`
775
840
  * は並びを鏡写しにする(並べ替えの矢印とフィルターの印をラベルの左、ホバーで出る grip と ⋮ も左)。
@@ -778,21 +843,23 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
778
843
  *
779
844
  * @defaultValue `align` と同じ
780
845
  */
781
- headerAlign?: 'left' | 'center' | 'right';
846
+ headerAlign?: 'left' | 'center' | 'right' | undefined;
782
847
  /**
783
848
  * セル表示値の整形(UI 表示のみ)。`renderCell` 未指定の既定セルが返り値を表示。組み込み
784
- * `numberFormatter` 等を渡せる。元の値/編集/コピー/ソート/フィルターには影響しない。
849
+ * `numberFormatter` 等を渡せる。
850
+ * 元の値/編集/コピー/ソート/フィルターには影響しない(全体フィルターは `globalFilterMatch`、
851
+ * グループ行の見出しは `groupLabel: 'formatted'` で使える。1.1.0 から)。
785
852
  * グループ行の集計値と合計行の値の整形にも使い、そのときは元の行が無いので `row` は
786
853
  * `undefined`(型は `T | undefined`。`row` を読むときは `row?.x` と書く)。
787
854
  */
788
- valueFormatter?: CellValueFormatter<T, F>;
855
+ valueFormatter?: CellValueFormatter<T, F> | undefined;
789
856
  /**
790
857
  * カスタムヘッダー描画。中に置いたボタン / 入力欄 / リンク等(`button` / `input` / `select` /
791
858
  * `textarea` / `a[href]` / `label` / `contenteditable` / `role="button"` 等)
792
859
  * を押したときは列の範囲選択を始めない(既定動作も止めないため入力欄にフォーカスが入る)。
793
860
  * それ以外の部分を押すと従来どおり列を選択する。
794
861
  */
795
- renderHeader?: (ctx: HeaderRenderContext<T, F>) => F['node'];
862
+ renderHeader?: ((ctx: HeaderRenderContext<T, F>) => F['node']) | undefined;
796
863
  /**
797
864
  * フィルター UI の種別。`'auto'` は列の値から `numberSet` / `textSet` / `dateSet` を自動判定する
798
865
  * opt-in(下記「filterType: 'auto'(自動判定)」節)。`'numberSet'` / `'textSet'` / `'dateSet'`
@@ -806,13 +873,13 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
806
873
  * 今月 / 過去 30 日。**相対のまま保存され評価のたびに解決**)で、Set 部分は年 / 月 / 日の 3
807
874
  * 階層ツリー(親は 3 状態チェック)になる。
808
875
  */
809
- filterType?: ColumnFilterTypeOption;
876
+ filterType?: ColumnFilterTypeOption | undefined;
810
877
  /**
811
878
  * select / set / numberSet / textSet / dateSet の候補(readonly / `as const` 配列も可)。
812
879
  *
813
880
  * @defaultValue rows から自動収集
814
881
  */
815
- filterOptions?: readonly GridSelectFilterOption[];
882
+ filterOptions?: readonly GridSelectFilterOption[] | undefined;
816
883
  /**
817
884
  * dateSet の相対プリセットチップの構成。`false` / `[]` でチップ行を非表示(オプトアウト)。
818
885
  * 配列はビルトイン ID(`'today'` / `'thisMonth'` / `'last30days'`)の再利用とカスタム定義
@@ -821,7 +888,7 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
821
888
  *
822
889
  * @defaultValue ビルトイン 3 種
823
890
  */
824
- dateFilterPresets?: false | readonly DateFilterPresetOption[];
891
+ dateFilterPresets?: false | readonly DateFilterPresetOption[] | undefined;
825
892
  /**
826
893
  * カスタムフィルター述語。`filterValue` は入力した値そのものではなく、
827
894
  * その列のフィルターの記述子(`ColumnFilterValue`)。`filterType: 'custom'` なら
@@ -830,7 +897,7 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
830
897
  * `filterType: 'custom'` のフィルター画面は文字の入力欄 1 つ(text と同じ画面で、
831
898
  * 文言も「部分一致で絞り込み」のまま)で、`filterFn` が無ければ部分一致で絞る。
832
899
  */
833
- filterFn?: (row: T, filterValue: unknown) => boolean;
900
+ filterFn?: ((row: T, filterValue: unknown) => boolean) | undefined;
834
901
  /**
835
902
  * セルエディタ種別(判別共用体)。
836
903
  * `{ type: 'text' | 'number' | 'select' | 'date' | 'checkbox' | 'custom', ... }`。
@@ -838,7 +905,7 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
838
905
  *
839
906
  * @defaultValue text 相当
840
907
  */
841
- editor?: GridColumnEditor<T, F>;
908
+ editor?: GridColumnEditor<T, F> | undefined;
842
909
  /**
843
910
  * セル値の検証。`true`=有効 / `false`=無効(既定メッセージ)/
844
911
  * `string`・`{ message }`=無効+メッセージ。**純粋・軽量であること**(描画中の可視セルごとに毎レンダー評価。
@@ -846,23 +913,28 @@ export type GridColumn<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
846
913
  * `validate` の後(`validate` の NG はそのメッセージ、通した値だけ組み込みの検査)。
847
914
  * 詳細は「バリデーション」節。
848
915
  */
849
- validate?: (ctx: CellValidationContext<T, F>) => CellValidationResult;
916
+ validate?: ((ctx: CellValidationContext<T, F>) => CellValidationResult) | undefined;
850
917
  /**
851
918
  * 検証 NG 時の動作。`'mark'`=値は入るがセルに invalid 表示 / `'reject'`=書き込み自体を拒否。
852
919
  *
853
920
  * @defaultValue `'mark'`
854
921
  */
855
- validationMode?: GridValidationMode;
922
+ validationMode?: GridValidationMode | undefined;
856
923
  /**
857
924
  * 「文字列 → セル値」のパーサ(貼り付け / クリア / エディタ commit
858
925
  * で共通)。**明示指定が常に優先**。未指定で `editor` が number / date / checkbox
859
- * のときは種別の既定パーサが自動供給されます(「セルエディタ」節の表参照)。
926
+ * のときは種別の既定パーサが自動供給されます(「セルエディタ」節の表参照)。number
927
+ * の既定と同じ読み方に通貨記号などを足すときは組み込みの `numberParser({ strip })`(1.1.0 から。
928
+ * 「貼り付けで読めない値」節)。
860
929
  *
861
930
  * @defaultValue editor 既定パーサ
862
931
  */
863
- parseClipboardValue?: (raw: string, row: T) => unknown;
864
- /** コピー時のフォーマッタ。 */
865
- formatClipboardValue?: (value: unknown, row: T) => string;
932
+ parseClipboardValue?: ((raw: string, row: T) => unknown) | undefined;
933
+ /**
934
+ * コピー時のフォーマッタ(CSV / TSV と `getExportData` の `text` も同じ)。未指定で select
935
+ * エディタの `clipboard: 'label'` の列は候補の label(1.1.0 から)。
936
+ */
937
+ formatClipboardValue?: ((value: unknown, row: T) => string) | undefined;
866
938
  };
867
939
  export type ColumnResizeDragState = {
868
940
  type: 'columnResize';
@@ -992,7 +1064,7 @@ export type GridLocaleText = {
992
1064
  globalFilterLabel: string;
993
1065
  /** 上部バーの検索欄の × の読み上げの名前。既定 `フィルターをクリア`、英語 `Clear filter`。 */
994
1066
  clearGlobalFilter: string;
995
- /** 上部バーの絞り込みの要約(押せるとき)の読み上げの名前とツールチップ。既定 `フィルター管理パネルを開閉`、英語 `Show or hide the filter panel`。 */
1067
+ /** 上部バーの絞り込みの要約(押せるとき)のツールチップと、読み上げの名前の後半(前半は見えている要約。1.0.2 から。1.0.1 まではこの文だけが名前)。既定 `フィルター管理パネルを開閉`、英語 `Show or hide the filter panel`。 */
996
1068
  toggleFilterPanel: string;
997
1069
  /** 「クリア」のボタン / ツールチップ。既定 `クリア`、英語 `Clear`。 */
998
1070
  clear: string;
@@ -1109,7 +1181,7 @@ export type GridLocaleText = {
1109
1181
  menuPinLeft: string;
1110
1182
  /** 固定の小メニューの右。既定 `右に固定`、英語 `Pin right`。 */
1111
1183
  menuPinRight: string;
1112
- /** `onColumnsChange` が無いときの固定のツールチップ。既定 `onColumnsChange 未指定のため固定状態を変更できません`、英語 `Pinning needs onColumnsChange.`。 */
1184
+ /** `onColumnsChange` が無いときの固定のツールチップ。既定 `この表では列の固定を変えられません`、英語 `Pinning can't be changed in this grid.`。 */
1113
1185
  menuPinUnavailable: string;
1114
1186
  /** 列メニューの幅の自動調整。既定 `この列の幅を自動調整`、英語 `Autosize this column`。 */
1115
1187
  menuAutosize: string;
@@ -1121,7 +1193,7 @@ export type GridLocaleText = {
1121
1193
  menuResetColumns: string;
1122
1194
  /** 列のリセットのツールチップ(列メニューとツールパネル)。既定 `すべての列の幅・固定・表示・並び順・グループ化を初期状態に戻します`、英語 `Restores the width, pinning, visibility, order and grouping of all columns.`。 */
1123
1195
  resetColumnsHint: string;
1124
- /** `onColumnsChange` が無いときの列のリセットのツールチップ。既定 `onColumnsChange 未指定のため列をリセットできません`、英語 `Resetting columns needs onColumnsChange.`。 */
1196
+ /** `onColumnsChange` が無いときの列のリセットのツールチップ。既定 `この表では列をリセットできません`、英語 `Columns can't be reset in this grid.`。 */
1125
1197
  menuResetUnavailable: string;
1126
1198
  /** ツールパネルのタブ。既定 `フィルター`、英語 `Filters`。 */
1127
1199
  toolPanelFilters: string;
@@ -1129,6 +1201,8 @@ export type GridLocaleText = {
1129
1201
  toolPanelSort: string;
1130
1202
  /** ツールパネルのタブ。既定 `列`、英語 `Columns`。 */
1131
1203
  toolPanelColumns: string;
1204
+ /** ツールパネル(ダイアログ)の読み上げの名前(1.1.0 から)。既定 `ツールパネル`、英語 `Tool panel`。 */
1205
+ toolPanelLabel: string;
1132
1206
  /** 列のタブの見出し。既定 `左固定`、英語 `Pinned left`。 */
1133
1207
  columnsPinnedLeft: string;
1134
1208
  /** 列のタブの見出し。既定 `固定なし`、英語 `Not pinned`。 */
@@ -1143,7 +1217,7 @@ export type GridLocaleText = {
1143
1217
  columnsDragToReorder: string;
1144
1218
  /** 列のタブのつまみのツールチップ(固定の区分があるとき)。既定 `ドラッグして並べ替え(同じセクション内のみ)`、英語 `Drag to reorder (within the same section)`。 */
1145
1219
  columnsDragWithinSection: string;
1146
- /** `onColumnsChange` が無いときのつまみのツールチップ。既定 `onColumnsChange 未指定のため並べ替えできません`、英語 `Reordering needs onColumnsChange.`。 */
1220
+ /** `onColumnsChange` が無いときのつまみのツールチップ。既定 `この表では列を並べ替えられません`、英語 `Columns can't be reordered in this grid.`。 */
1147
1221
  columnsReorderUnavailable: string;
1148
1222
  /** 列のタブで検索している間のつまみのツールチップ。既定 `検索中は並べ替えできません`、英語 `Columns can't be reordered while searching.`。 */
1149
1223
  columnsReorderWhileSearching: string;
@@ -1159,7 +1233,7 @@ export type GridLocaleText = {
1159
1233
  columnsNoMatches: string;
1160
1234
  /** 列のタブのリセットのボタン。既定 `すべての列を初期状態に戻す`、英語 `Reset all columns`。 */
1161
1235
  columnsReset: string;
1162
- /** `onColumnsChange` が無いときの列のタブのツールチップ。既定 `onColumnsChange 未指定のため表示/非表示・リセットを変更できません`、英語 `Showing, hiding and resetting columns needs onColumnsChange.`。 */
1236
+ /** `onColumnsChange` が無いときの列のタブのツールチップ。既定 `この表では列の表示/非表示とリセットは使えません`、英語 `Showing, hiding and resetting columns isn't available in this grid.`。 */
1163
1237
  columnsUnavailable: string;
1164
1238
  /** フィルターのタブの検索欄の文字の行。既定 `グローバルフィルター`、英語 `Global filter`。 */
1165
1239
  globalFilterTitle: string;
@@ -1215,7 +1289,7 @@ export type GridLocaleText = {
1215
1289
  filterEditUnderGroup: string;
1216
1290
  /** フィルターのチップのツールチップ。既定 `この列へジャンプして編集`、英語 `Go to this column to edit`。 */
1217
1291
  filterJump: string;
1218
- /** フィルターのチップの読み上げの名前。既定 `{column} のフィルターを編集`、英語 `Edit the filter on {column}`。 */
1292
+ /** フィルターのチップの読み上げの名前の後半(前半は見えている列名と条件。1.0.2 から。1.0.1 まではこの文だけが名前)と、フィルターの管理の ✎ の読み上げの名前。既定 `{column} のフィルターを編集`、英語 `Edit the filter on {column}`。 */
1219
1293
  filterEditFor: GridLocaleTextTemplate<{
1220
1294
  column: string;
1221
1295
  }>;
@@ -1229,10 +1303,14 @@ export type GridLocaleText = {
1229
1303
  filterNone: string;
1230
1304
  /** `custom` のフィルターの要約(値が文字でないとき)。既定 `カスタム条件`、英語 `Custom filter`。 */
1231
1305
  filterCustom: string;
1232
- /** 値の選択の要約(除外)。既定 `{count} 件を除外`、英語は数で変わる(関数)。 */
1306
+ /** 値の選択の要約(除外。3 件以上か 0 件。`filterExcludedValues` を変えずにこのキーだけを変えた表では 1〜2 件も)。既定 `{count} 件を除外`、英語は数で変わる(関数)。 */
1233
1307
  filterExcluded: GridLocaleTextTemplate<{
1234
1308
  count: number;
1235
1309
  }>;
1310
+ /** 値の選択の要約(除外。1〜2 件は値を並べる)。既定 `{values} を除外`、英語 `Excluding {values}`。 */
1311
+ filterExcludedValues: GridLocaleTextTemplate<{
1312
+ values: string;
1313
+ }>;
1236
1314
  /** 値の選択の要約(3 件以上)。既定 `{count} 件を選択`、英語 `{count} selected`。 */
1237
1315
  filterSelected: GridLocaleTextTemplate<{
1238
1316
  count: number;
@@ -1520,6 +1598,8 @@ export type GridLocaleText = {
1520
1598
  min: number;
1521
1599
  max: number;
1522
1600
  }>;
1601
+ /** date エディタで文字から打ち始めた入力が日付として読めないとき。既定 `日付で入力してください(例: 2026/3/15)`、英語 `Enter a date (e.g. 2026-03-15)`。 */
1602
+ enterDate: string;
1523
1603
  /** serverSide の保存に失敗したセルの下に出るチップ(`showSaveStatus`)。既定 `保存に失敗しました。値を戻しました`、英語 `Couldn't save. The value was restored.`。 */
1524
1604
  saveFailedCell: string;
1525
1605
  /** serverSide の読み込みに失敗したときのバー。既定 `行の取得に失敗しました({count} ブロック)`、英語は数で変わる(関数)。 */
@@ -1534,6 +1614,14 @@ export type GridLocaleText = {
1534
1614
  }>;
1535
1615
  /** 同上の × の読み上げの名前。既定 `保存エラー通知を閉じる`、英語 `Dismiss the save error`。 */
1536
1616
  dismissSaveError: string;
1617
+ /** 上の固定行の行見出しの読み上げの名前(`pinnedTopRows`)。既定 `上に固定 {row}`、英語 `Pinned to top {row}`。 */
1618
+ pinnedTopRow: GridLocaleTextTemplate<{
1619
+ row: number;
1620
+ }>;
1621
+ /** 下の固定行の行見出しの読み上げの名前(`pinnedBottomRows`)。既定 `下に固定 {row}`、英語 `Pinned to bottom {row}`。 */
1622
+ pinnedBottomRow: GridLocaleTextTemplate<{
1623
+ row: number;
1624
+ }>;
1537
1625
  /** 合計行の左端の文字(`totalRow.label` を渡せばそちら)。既定 `合計`、英語 `Total`。 */
1538
1626
  totalRowLabel: string;
1539
1627
  /** 合計行 / グループ行の集計の種類。既定 `平均`、英語 `Avg`。 */
@@ -1593,7 +1681,7 @@ export type SpreadsheetGridSlotContext<T, F extends GridFrameworkTypes = GridFra
1593
1681
  derivedSummary: SpreadsheetGridDerivedSummary;
1594
1682
  globalFilterStatus: GlobalFilterStatus;
1595
1683
  globalFilterProgress: number;
1596
- selectionAggregates?: GridSelectionAggregates | null;
1684
+ selectionAggregates?: GridSelectionAggregates | null | undefined;
1597
1685
  };
1598
1686
  export type GridContextMenuTarget<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
1599
1687
  type: 'cell';
@@ -1645,26 +1733,26 @@ export type GridContextMenuParams<T, F extends GridFrameworkTypes = GridFramewor
1645
1733
  isTargetSelected: boolean;
1646
1734
  };
1647
1735
  export type GridContextMenuActionItem<F extends GridFrameworkTypes = GridFrameworkTypes> = {
1648
- kind?: 'action';
1649
- id?: string;
1736
+ kind?: 'action' | undefined;
1737
+ id?: string | undefined;
1650
1738
  label: F['node'];
1651
- icon?: F['node'];
1652
- disabled?: boolean;
1653
- danger?: boolean;
1739
+ icon?: F['node'] | undefined;
1740
+ disabled?: boolean | undefined;
1741
+ danger?: boolean | undefined;
1654
1742
  onSelect: () => void;
1655
1743
  };
1656
1744
  export type GridContextMenuLabelItem<F extends GridFrameworkTypes = GridFrameworkTypes> = {
1657
1745
  kind: 'label';
1658
- id?: string;
1746
+ id?: string | undefined;
1659
1747
  label: F['node'];
1660
1748
  };
1661
1749
  export type GridContextMenuSeparatorItem = {
1662
1750
  kind: 'separator';
1663
- id?: string;
1751
+ id?: string | undefined;
1664
1752
  };
1665
1753
  export type GridContextMenuCustomItem<F extends GridFrameworkTypes = GridFrameworkTypes> = {
1666
1754
  kind: 'custom';
1667
- id?: string;
1755
+ id?: string | undefined;
1668
1756
  render: (ctx: {
1669
1757
  close: () => void;
1670
1758
  }) => F['node'];
@@ -1702,12 +1790,12 @@ export type GridCellDoubleClickParams<T, F extends GridFrameworkTypes = GridFram
1702
1790
  preventDefault: () => void;
1703
1791
  };
1704
1792
  export type GridSlotProps<F extends GridFrameworkTypes = GridFrameworkTypes> = string | {
1705
- className?: string;
1706
- style?: F['style'];
1793
+ className?: string | undefined;
1794
+ style?: F['style'] | undefined;
1707
1795
  };
1708
1796
  export type GridResolvedSlot<F extends GridFrameworkTypes = GridFrameworkTypes> = {
1709
- className?: string;
1710
- style?: F['style'];
1797
+ className?: string | undefined;
1798
+ style?: F['style'] | undefined;
1711
1799
  };
1712
1800
  export type GridResolvedSlots<F extends GridFrameworkTypes = GridFrameworkTypes> = Partial<Record<keyof GridClassNames<F>, GridResolvedSlot<F>>>;
1713
1801
  /**
@@ -1718,117 +1806,117 @@ export type GridResolvedSlots<F extends GridFrameworkTypes = GridFrameworkTypes>
1718
1806
  */
1719
1807
  export type GridClassNames<F extends GridFrameworkTypes = GridFrameworkTypes> = {
1720
1808
  /** 付与先: ルート要素 `.ssg-root`(`className` / `style` prop と同じ要素) */
1721
- root?: GridSlotProps<F>;
1809
+ root?: GridSlotProps<F> | undefined;
1722
1810
  /**
1723
1811
  * `toolbar` / `statusBar`: 付与先: 既定トップバー `.ssg-bar--top` / 既定ボトムバー
1724
1812
  * `.ssg-bar--bottom`(`renderTopBar` / `renderBottomBar` 指定時は対象外)
1725
1813
  */
1726
- toolbar?: GridSlotProps<F>;
1814
+ toolbar?: GridSlotProps<F> | undefined;
1727
1815
  /**
1728
1816
  * `toolbar` / `statusBar`: 付与先: 既定トップバー `.ssg-bar--top` / 既定ボトムバー
1729
1817
  * `.ssg-bar--bottom`(`renderTopBar` / `renderBottomBar` 指定時は対象外)
1730
1818
  */
1731
- statusBar?: GridSlotProps<F>;
1819
+ statusBar?: GridSlotProps<F> | undefined;
1732
1820
  /**
1733
1821
  * `headerRow` / `headerCell`: 付与先: ヘッダー行 /
1734
1822
  * 列ヘッダーセル(コーナー・行ヘッダーセルは含まない)
1735
1823
  */
1736
- headerRow?: GridSlotProps<F>;
1824
+ headerRow?: GridSlotProps<F> | undefined;
1737
1825
  /**
1738
1826
  * `headerRow` / `headerCell`: 付与先: ヘッダー行 /
1739
1827
  * 列ヘッダーセル(コーナー・行ヘッダーセルは含まない)
1740
1828
  */
1741
- headerCell?: GridSlotProps<F>;
1829
+ headerCell?: GridSlotProps<F> | undefined;
1742
1830
  /** `bodyRow` / `bodyCell`: 付与先: 本体行(データ / スケルトン / グループ行)/ データセル */
1743
- bodyRow?: GridSlotProps<F>;
1831
+ bodyRow?: GridSlotProps<F> | undefined;
1744
1832
  /** `bodyRow` / `bodyCell`: 付与先: 本体行(データ / スケルトン / グループ行)/ データセル */
1745
- bodyCell?: GridSlotProps<F>;
1833
+ bodyCell?: GridSlotProps<F> | undefined;
1746
1834
  /**
1747
1835
  * `rowHeaderCell` / `cornerCell`: 付与先: 行ヘッダー「#」セルとコーナーセル(`rowHeaderCell`
1748
1836
  * は両方、`cornerCell` はコーナーのみ)
1749
1837
  */
1750
- rowHeaderCell?: GridSlotProps<F>;
1838
+ rowHeaderCell?: GridSlotProps<F> | undefined;
1751
1839
  /** 付与先: ヘッダーのアイコンボタン `.ssg-icon-btn` */
1752
- iconButton?: GridSlotProps<F>;
1840
+ iconButton?: GridSlotProps<F> | undefined;
1753
1841
  /**
1754
1842
  * `rowHeaderCell` / `cornerCell`: 付与先: 行ヘッダー「#」セルとコーナーセル(`rowHeaderCell`
1755
1843
  * は両方、`cornerCell` はコーナーのみ)
1756
1844
  */
1757
- cornerCell?: GridSlotProps<F>;
1845
+ cornerCell?: GridSlotProps<F> | undefined;
1758
1846
  /**
1759
1847
  * `groupRow` / `groupCell`: 付与先: グループ行 / グループ行のセル(`bodyRow` / `bodyCell`
1760
1848
  * に加えて付与)
1761
1849
  */
1762
- groupRow?: GridSlotProps<F>;
1850
+ groupRow?: GridSlotProps<F> | undefined;
1763
1851
  /**
1764
1852
  * `groupRow` / `groupCell`: 付与先: グループ行 / グループ行のセル(`bodyRow` / `bodyCell`
1765
1853
  * に加えて付与)
1766
1854
  */
1767
- groupCell?: GridSlotProps<F>;
1855
+ groupCell?: GridSlotProps<F> | undefined;
1768
1856
  /**
1769
1857
  * `detailBand` / `detailCard`: 付与先: 展開行の帯 / カード(`detailRow.className` に加えて付与)
1770
1858
  */
1771
- detailBand?: GridSlotProps<F>;
1859
+ detailBand?: GridSlotProps<F> | undefined;
1772
1860
  /**
1773
1861
  * `detailBand` / `detailCard`: 付与先: 展開行の帯 / カード(`detailRow.className` に加えて付与)
1774
1862
  */
1775
- detailCard?: GridSlotProps<F>;
1863
+ detailCard?: GridSlotProps<F> | undefined;
1776
1864
  /**
1777
1865
  * `labelRow` / `labelRowContent`: 付与先: ラベル行(見出し / 区切り行)の行要素
1778
1866
  * `.ssg-body-row[data-ssg-label-row]`(`bodyRow` / `labelRow.className` に加えて付与。
1779
1867
  * 縦固定の複製にも付く)/ 中身の器 `.ssg-label-row-content`
1780
1868
  */
1781
- labelRow?: GridSlotProps<F>;
1869
+ labelRow?: GridSlotProps<F> | undefined;
1782
1870
  /**
1783
1871
  * `labelRow` / `labelRowContent`: 付与先: ラベル行(見出し / 区切り行)の行要素
1784
1872
  * `.ssg-body-row[data-ssg-label-row]`(`bodyRow` / `labelRow.className` に加えて付与。
1785
1873
  * 縦固定の複製にも付く)/ 中身の器 `.ssg-label-row-content`
1786
1874
  */
1787
- labelRowContent?: GridSlotProps<F>;
1875
+ labelRowContent?: GridSlotProps<F> | undefined;
1788
1876
  /**
1789
1877
  * `totalRow` / `totalCell`: 付与先: 合計行の行要素 `.ssg-total-row`(3 ペイン分。
1790
1878
  * `totalRow.className` に加えて付与)/ 合計行のセル `.ssg-total-cell`(`bodyCell` に加えて付与)
1791
1879
  */
1792
- totalRow?: GridSlotProps<F>;
1880
+ totalRow?: GridSlotProps<F> | undefined;
1793
1881
  /**
1794
1882
  * `totalRow` / `totalCell`: 付与先: 合計行の行要素 `.ssg-total-row`(3 ペイン分。
1795
1883
  * `totalRow.className` に加えて付与)/ 合計行のセル `.ssg-total-cell`(`bodyCell` に加えて付与)
1796
1884
  */
1797
- totalCell?: GridSlotProps<F>;
1885
+ totalCell?: GridSlotProps<F> | undefined;
1798
1886
  /**
1799
1887
  * 付与先: ポータル系パネルの root(列メニュー / フィルター / コンテキストメニュー / select
1800
- * エディタ候補 / ツールパネル。`document.body` 直下)
1888
+ * エディタ候補 / ツールパネル。表の外 = `popupContainer`)
1801
1889
  */
1802
- popover?: GridSlotProps<F>;
1890
+ popover?: GridSlotProps<F> | undefined;
1803
1891
  /** 付与先: メニュー項目 `.ssg-menu-item`(列メニュー / コンテキストメニュー) */
1804
- menuItem?: GridSlotProps<F>;
1892
+ menuItem?: GridSlotProps<F> | undefined;
1805
1893
  /**
1806
- * 付与先: カスタムツールチップ `.ssg-tooltip`(body 直下のシングルトン。
1894
+ * 付与先: カスタムツールチップ `.ssg-tooltip`(表の外のシングルトン。
1807
1895
  * 複数グリッド同居時は最後に更新したグリッドの値)
1808
1896
  */
1809
- tooltip?: GridSlotProps<F>;
1897
+ tooltip?: GridSlotProps<F> | undefined;
1810
1898
  /** 付与先: 列 / 行ドラッグのゴースト `[data-grid-drag-ghost]` */
1811
- dragGhost?: GridSlotProps<F>;
1899
+ dragGhost?: GridSlotProps<F> | undefined;
1812
1900
  /** 付与先: 行選択 / checkbox 列のチェックボックス glyph `.ssg-row-checkbox` */
1813
- checkbox?: GridSlotProps<F>;
1901
+ checkbox?: GridSlotProps<F> | undefined;
1814
1902
  /** 付与先: セルエディタの枠 `.ssg-cell-editor` */
1815
- cellEditor?: GridSlotProps<F>;
1903
+ cellEditor?: GridSlotProps<F> | undefined;
1816
1904
  /** 付与先: 0 行時の空状態 `.ssg-empty-state` */
1817
- emptyState?: GridSlotProps<F>;
1905
+ emptyState?: GridSlotProps<F> | undefined;
1818
1906
  /** 付与先: フィルターチップバー `.ssg-filter-chip-bar` */
1819
- filterChipBar?: GridSlotProps<F>;
1907
+ filterChipBar?: GridSlotProps<F> | undefined;
1820
1908
  /** 付与先: SSRM のエラーバー `.ssg-ssrm-error-bar` */
1821
- errorBar?: GridSlotProps<F>;
1909
+ errorBar?: GridSlotProps<F> | undefined;
1822
1910
  /** 付与先: スクロール位置インジケーター `.ssg-scroll-hint` */
1823
- scrollHint?: GridSlotProps<F>;
1911
+ scrollHint?: GridSlotProps<F> | undefined;
1824
1912
  /** `activeCellOverlay` / `selectionOverlay`: 付与先: アクティブセル枠 / 範囲選択の塗り */
1825
- activeCellOverlay?: GridSlotProps<F>;
1913
+ activeCellOverlay?: GridSlotProps<F> | undefined;
1826
1914
  /** `activeCellOverlay` / `selectionOverlay`: 付与先: アクティブセル枠 / 範囲選択の塗り */
1827
- selectionOverlay?: GridSlotProps<F>;
1915
+ selectionOverlay?: GridSlotProps<F> | undefined;
1828
1916
  /** 付与先: コピー範囲の動く点線 `.ssg-copy-range-overlay` */
1829
- copyRangeOverlay?: GridSlotProps<F>;
1917
+ copyRangeOverlay?: GridSlotProps<F> | undefined;
1830
1918
  /** 付与先: セル内検索バー `.ssg-find-bar` */
1831
- findBar?: GridSlotProps<F>;
1919
+ findBar?: GridSlotProps<F> | undefined;
1832
1920
  };
1833
1921
  export type ScrollAlign = 'auto' | 'start' | 'center' | 'end';
1834
1922
  export type GridScrollPosition = {
@@ -1850,20 +1938,22 @@ export type GridScrollEventParams = {
1850
1938
  */
1851
1939
  export type CsvExportScope = 'view' | 'raw' | 'rendered' | 'selection';
1852
1940
  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;
1941
+ scope?: CsvExportScope | undefined;
1942
+ includeHeaders?: boolean | undefined;
1943
+ delimiter?: string | undefined;
1944
+ bom?: boolean | undefined;
1945
+ escapeFormulas?: boolean | undefined;
1946
+ includeLabelRows?: boolean | undefined;
1947
+ includeTotalRow?: boolean | undefined;
1948
+ includePinnedRows?: boolean | undefined;
1949
+ includeGroupRows?: boolean | undefined;
1861
1950
  };
1862
1951
  export type GridExportOptions = {
1863
- scope?: CsvExportScope;
1864
- includeLabelRows?: boolean;
1865
- includeTotalRow?: boolean;
1866
- includeGroupRows?: boolean;
1952
+ scope?: CsvExportScope | undefined;
1953
+ includeLabelRows?: boolean | undefined;
1954
+ includeTotalRow?: boolean | undefined;
1955
+ includePinnedRows?: boolean | undefined;
1956
+ includeGroupRows?: boolean | undefined;
1867
1957
  };
1868
1958
  export type GridExportCell = {
1869
1959
  value: unknown;
@@ -1875,30 +1965,30 @@ export type GridExportData = {
1875
1965
  title: string;
1876
1966
  }[];
1877
1967
  rows: GridExportCell[][];
1878
- rowKinds?: Array<'data' | 'label' | 'total' | 'group'>;
1968
+ rowKinds?: Array<'data' | 'label' | 'total' | 'group' | 'pinned'> | undefined;
1879
1969
  };
1880
1970
  export type GridColumnState = {
1881
1971
  key: string;
1882
- visible?: boolean;
1883
- pinned?: GridColumnPinned;
1972
+ visible?: boolean | undefined;
1973
+ pinned?: GridColumnPinned | undefined;
1884
1974
  };
1885
1975
  export type GridState = {
1886
1976
  version: number;
1887
1977
  columnWidths: Record<string, number>;
1888
1978
  filters: GridFilterState;
1889
1979
  sort: GridSortState;
1890
- columns?: GridColumnState[];
1980
+ columns?: GridColumnState[] | undefined;
1891
1981
  };
1892
1982
  /**
1893
1983
  * `applyState` に渡す状態。`getState()` の値をそのまま渡せる。渡したスライスだけを変え、省略した(`undefined` の)
1894
1984
  * スライスは今のまま残す(`filters` も `globalText` / `columnFilters` の片方だけ渡せる)。
1895
1985
  */
1896
1986
  export type GridStatePatch = {
1897
- version?: number;
1898
- columnWidths?: Record<string, number>;
1899
- filters?: Partial<GridFilterState>;
1900
- sort?: GridSortState;
1901
- columns?: GridColumnState[];
1987
+ version?: number | undefined;
1988
+ columnWidths?: Record<string, number> | undefined;
1989
+ filters?: Partial<GridFilterState> | undefined;
1990
+ sort?: GridSortState | undefined;
1991
+ columns?: GridColumnState[] | undefined;
1902
1992
  };
1903
1993
  /**
1904
1994
  * 命令的 API です(`ref` prop で受け取るハンドル)。状態は props で controlled のまま、props で表現しづらい
@@ -1916,11 +2006,14 @@ export type SpreadsheetGridHandle<T> = {
1916
2006
  * の表では、`'start'` と上へ動かす `'auto'` は行を固定した見出しの下に置く。
1917
2007
  */
1918
2008
  scrollToRow: (viewRowIndex: number, options?: {
1919
- align?: ScrollAlign;
2009
+ align?: ScrollAlign | undefined;
1920
2010
  }) => void;
1921
- /** 指定セルを縦横とも可視域へ。固定列(左右ピン)は常に可視のため横スクロールしない。 */
2011
+ /**
2012
+ * 指定セルを縦横とも可視域へ。固定列(左右ピン)は常に可視のため横スクロールしない。`'auto'` では、
2013
+ * 見える幅より広い列は左端に合わせる。
2014
+ */
1922
2015
  scrollToCell: (viewRowIndex: number, colIndex: number, options?: {
1923
- align?: ScrollAlign;
2016
+ align?: ScrollAlign | undefined;
1924
2017
  }) => void;
1925
2018
  /**
1926
2019
  * `scrollToTop()` / `scrollToBottom()`: 先頭 / 末尾へ。行高を実測するモード(auto-height 列 /
@@ -1951,10 +2044,10 @@ export type SpreadsheetGridHandle<T> = {
1951
2044
  * は途中フレームの `onScroll` が `source:'user'` になり得る)。
1952
2045
  */
1953
2046
  setScrollPosition: (position: {
1954
- top?: number;
1955
- left?: number;
2047
+ top?: number | undefined;
2048
+ left?: number | undefined;
1956
2049
  }, options?: {
1957
- behavior?: 'auto' | 'smooth';
2050
+ behavior?: 'auto' | 'smooth' | undefined;
1958
2051
  }) => void;
1959
2052
  /**
1960
2053
  * 現在のアクティブセル `{ row, col }`(なければ `null`)。`selectCell` / `setActiveCell` /
@@ -1970,7 +2063,7 @@ export type SpreadsheetGridHandle<T> = {
1970
2063
  * フォーカスは移さない(続けてキー操作や入力を受けたいときは `focus()` も呼ぶ)。
1971
2064
  */
1972
2065
  setActiveCell: (cell: CellCoord | null, options?: {
1973
- scrollIntoView?: boolean;
2066
+ scrollIntoView?: boolean | undefined;
1974
2067
  }) => void;
1975
2068
  /** 現在の選択状態(`GridSelection`)。 */
1976
2069
  getSelection: () => GridSelection;
@@ -1980,7 +2073,7 @@ export type SpreadsheetGridHandle<T> = {
1980
2073
  * も呼ぶ)。
1981
2074
  */
1982
2075
  selectCell: (viewRowIndex: number, colIndex: number, options?: {
1983
- scrollIntoView?: boolean;
2076
+ scrollIntoView?: boolean | undefined;
1984
2077
  }) => void;
1985
2078
  /**
1986
2079
  * セル範囲選択(ドラッグ相当)。アンカーは `range.start`。`range.start` がラベル行のときは、
@@ -1988,7 +2081,7 @@ export type SpreadsheetGridHandle<T> = {
1988
2081
  * 範囲がラベル行だけのときは、寄せたデータ行の同じ列の範囲にする。
1989
2082
  */
1990
2083
  selectRange: (range: CellRange, options?: {
1991
- scrollIntoView?: boolean;
2084
+ scrollIntoView?: boolean | undefined;
1992
2085
  }) => void;
1993
2086
  /** 選択解除。 */
1994
2087
  clearSelection: () => void;
@@ -2106,12 +2199,17 @@ export type SpreadsheetGridHandle<T> = {
2106
2199
  /**
2107
2200
  * 外からの変更(行の削除ボタン / 一括更新など)を「元に戻す」の履歴に積んでから `onRowsChange`
2108
2201
  * へ渡す(`Ctrl/Cmd+Z` / `undo()` で戻せる)。`rows` を外から直接差し替えると履歴は消えるので、
2109
- * 元に戻せるようにしたい変更はこれで渡す。履歴が無効(`enableUndoRedo={false}` / `readOnly`)
2110
- * なら積まずに `onRowsChange` へ渡す。`onRowsChange` が無いとき・serverSide
2111
- * では何もしない(開発時に警告)。渡すのは次の行の配列で、関数(`setRows((prev) => …)` の形)
2112
- * は受けない(今の `rows` から次の配列を作って渡す)。
2113
- */
2114
- applyRows: (nextRows: T[]) => void;
2202
+ * 元に戻せるようにしたい変更はこれで渡す。`nextRows` は次の行の配列か、関数(`(prev) => next`。
2203
+ * `prev` は最後に渡した行で、続けて呼んでも重なる。1.1.0 から)。`undoable: false`(1.1.0 から)
2204
+ * は履歴に積まず、今の履歴も消さない(株価のような外からのライブの更新)。そのときの元に戻す /
2205
+ * やり直すは、外からの更新を残したままグリッドでの編集だけを取り消す / やり直す(行は
2206
+ * `rowKeyGetter` で対応づける。無いときは位置なので、行を足す / 消す更新では `rowKeyGetter`
2207
+ * を書く。`rowKeyGetter` が無い表で行の数が変わったときと、行キーが重なっているときは、1.0
2208
+ * と同じく編集の前の行をそのまま戻す = 外からの更新も戻る)。履歴が無効(`enableUndoRedo={false}` /
2209
+ * `readOnly`)なら積まずに `onRowsChange` へ渡す。`onRowsChange` が無いとき・serverSide
2210
+ * では何もしない(開発時に警告)。
2211
+ */
2212
+ applyRows: (nextRows: T[] | ((prev: T[]) => T[]), options?: GridApplyRowsOptions | undefined) => void;
2115
2213
  /**
2116
2214
  * 指定グループを開閉する(`collapsed: true` = 折りたたみ)。`groupKey` は `getGroupRows()`
2117
2215
  * の記述子から取得。同一イベント内の連続呼び出しも正しく積み重なる。
@@ -2196,15 +2294,15 @@ export type GridTheme = 'light' | 'dark' | 'auto' | 'class';
2196
2294
  /** データバー(値の大きさを背景の帯で示す)。`conditionalFormat.dataBar` の設定。 */
2197
2295
  export type GridDataBarFormat = {
2198
2296
  /** 帯の下限。省略時はビュー行(フィルター / ソート適用後。SSRM はロード済み範囲)の数値の最小値。 */
2199
- min?: number;
2297
+ min?: number | undefined;
2200
2298
  /** 帯の上限。省略時はビュー行の数値の最大値。 */
2201
- max?: number;
2299
+ max?: number | undefined;
2202
2300
  /** 帯の色(CSS 色)。省略時はトークン `--ssg-cf-bar`。 */
2203
- color?: string;
2301
+ color?: string | undefined;
2204
2302
  /** 負の値の帯の色(CSS 色)。省略時はトークン `--ssg-cf-bar-negative`。 */
2205
- negativeColor?: string;
2303
+ negativeColor?: string | undefined;
2206
2304
  /** `false` で値の文字を出さず帯だけにする(既定 `true`)。 */
2207
- showValue?: boolean;
2305
+ showValue?: boolean | undefined;
2208
2306
  };
2209
2307
  /** カラースケール(値に応じてセル背景を段階的に染める)。`conditionalFormat.colorScale` の設定。 */
2210
2308
  export type GridColorScaleFormat = {
@@ -2212,49 +2310,49 @@ export type GridColorScaleFormat = {
2212
2310
  * `'sequential'`(既定): 1 色相の淡 → 濃(量)。`'diverging'`: `mid` を中立色に、負側 / 正側を別の色相で
2213
2311
  * 濃くする(基準からの向き)。
2214
2312
  */
2215
- type?: 'sequential' | 'diverging';
2313
+ type?: 'sequential' | 'diverging' | undefined;
2216
2314
  /** 下限。省略時はビュー行の数値の最小値。 */
2217
- min?: number;
2315
+ min?: number | undefined;
2218
2316
  /** `'diverging'` の中立点。省略時は `min < 0 < max` なら `0`、それ以外は `(min + max) / 2`。 */
2219
- mid?: number;
2317
+ mid?: number | undefined;
2220
2318
  /** 上限。省略時はビュー行の数値の最大値。 */
2221
- max?: number;
2319
+ max?: number | undefined;
2222
2320
  /**
2223
2321
  * 色の段(CSS 色)。`'sequential'` は `[淡, 濃]`、`'diverging'` は `[負側, 中立, 正側]`。省略時はトークン
2224
2322
  * (`--ssg-cf-seq-min` / `--ssg-cf-seq-max`、`--ssg-cf-div-negative` / `--ssg-cf-div-mid` / `--ssg-cf-div-positive`)。
2225
2323
  */
2226
- colors?: readonly string[];
2324
+ colors?: readonly string[] | undefined;
2227
2325
  };
2228
2326
  /** 状態チップの色味。アイコンとラベルを伴う(色だけで意味を運ばない)。 */
2229
2327
  export type GridChipTone = 'neutral' | 'info' | 'good' | 'warning' | 'critical';
2230
2328
  /** 状態チップ 1 つの指定。 */
2231
2329
  export type GridChipSpec = {
2232
2330
  /** 色味(既定 `'neutral'`)。 */
2233
- tone?: GridChipTone;
2331
+ tone?: GridChipTone | undefined;
2234
2332
  /** ラベル。省略時はセルの表示文字列(`valueFormatter` 適用後)。 */
2235
- label?: string;
2333
+ label?: string | undefined;
2236
2334
  /** `false` でアイコンを出さない(既定 `true`)。 */
2237
- icon?: boolean;
2335
+ icon?: boolean | undefined;
2238
2336
  /** 任意の色(CSS 色)。`tone` の色より優先。 */
2239
- color?: string;
2337
+ color?: string | undefined;
2240
2338
  };
2241
2339
  /** 値(`String(value)`)→ チップのマップ。値は色味の文字列か `GridChipSpec`。載っていない値はチップにしない。 */
2242
2340
  export type GridChipMap = Readonly<Record<string, GridChipTone | GridChipSpec>>;
2243
2341
  /** 条件付き書式(`GridColumn.conditionalFormat`)。複数を同時に指定できる(帯 + 背景色など)。 */
2244
2342
  export type GridConditionalFormat<T, F extends GridFrameworkTypes = GridFrameworkTypes> = {
2245
2343
  /** データバー。 */
2246
- dataBar?: GridDataBarFormat;
2344
+ dataBar?: GridDataBarFormat | undefined;
2247
2345
  /** カラースケール。 */
2248
- colorScale?: GridColorScaleFormat;
2346
+ colorScale?: GridColorScaleFormat | undefined;
2249
2347
  /**
2250
2348
  * 状態チップ。値 → チップのマップか、セルのコンテキスト(`cellClassName` の関数版と同じ)から
2251
2349
  * チップを返す関数(`null` / `undefined` でチップにしない)。
2252
2350
  */
2253
- chips?: GridChipMap | ((ctx: CellStyleContext<T, F>) => GridChipTone | GridChipSpec | null | undefined);
2351
+ chips?: GridChipMap | ((ctx: CellStyleContext<T, F>) => GridChipTone | GridChipSpec | null | undefined) | undefined;
2254
2352
  };
2255
2353
  export type FindOptions = {
2256
- shortcut?: boolean;
2257
- caseSensitive?: boolean;
2354
+ shortcut?: boolean | undefined;
2355
+ caseSensitive?: boolean | undefined;
2258
2356
  };
2259
2357
  export type FindChangeParams = {
2260
2358
  query: string;
@@ -2263,6 +2361,18 @@ export type FindChangeParams = {
2263
2361
  open: boolean;
2264
2362
  };
2265
2363
  export type GridMotion = 'auto' | 'on' | 'off';
2364
+ /**
2365
+ * ポップアップを描く場所(`popupContainer`)。`'auto'` はグリッドを囲むダイアログ(`<dialog>` / `popover` /
2366
+ * `aria-modal="true"` / `role="dialog"` / `role="alertdialog"`)の中、無ければ `document.body`。`'body'` はいつも
2367
+ * `document.body`。要素ならその中。関数はグリッドの要素を受け取って描く場所を返す(`null` / `undefined` なら
2368
+ * `document.body`。ポップアップを描くたびに呼ぶ)。
2369
+ */
2370
+ export type GridPopupContainer = 'auto' | 'body' | HTMLElement | ((gridElement: HTMLElement) => HTMLElement | null | undefined);
2371
+ /**
2372
+ * グローバルフィルターが照らし合わせる文字(`globalFilterMatch`)。`'value'` はセルの値の文字(1.0 までと同じ)、
2373
+ * `'display'` は画面の文字(列の `valueFormatter` の結果。無い列は値の文字)、`'both'` はどちらか。
2374
+ */
2375
+ export type GridGlobalFilterMatch = 'value' | 'display' | 'both';
2266
2376
  export type AutoSizeColumnsMode = 'onMount' | 'onDataChange' | false;
2267
2377
  export type ScrollHintTrigger = 'scroll' | 'hover' | 'always';
2268
2378
  export type ScrollHintRenderArgs<T> = {
@@ -2281,20 +2391,20 @@ export type ScrollHintOptions<T = unknown, F extends GridFrameworkTypes = GridFr
2281
2391
  *
2282
2392
  * @defaultValue `true`
2283
2393
  */
2284
- bubble?: boolean;
2394
+ bubble?: boolean | undefined;
2285
2395
  /**
2286
2396
  * ルーラー + ジャンプ先プレビューの表示。
2287
2397
  *
2288
2398
  * @defaultValue `true`
2289
2399
  */
2290
- ruler?: boolean;
2400
+ ruler?: boolean | undefined;
2291
2401
  /**
2292
2402
  * カスタム縦スクロールバー(専用ガター・常時表示)。`false`
2293
2403
  * でネイティブバーのまま(バブル等は疑似サム位置に表示)。
2294
2404
  *
2295
2405
  * @defaultValue `true`
2296
2406
  */
2297
- scrollbar?: boolean;
2407
+ scrollbar?: boolean | undefined;
2298
2408
  /**
2299
2409
  * バブル / ルーラーの表示トリガー(スクロールバー自体は常時表示)。`'scroll'` =
2300
2410
  * スクロール中のみ(停止約 1 秒でフェードアウト)/ `'hover'` = グリッドホバー中 + スクロール中 /
@@ -2302,7 +2412,7 @@ export type ScrollHintOptions<T = unknown, F extends GridFrameworkTypes = GridFr
2302
2412
  *
2303
2413
  * @defaultValue `'scroll'`
2304
2414
  */
2305
- trigger?: ScrollHintTrigger;
2415
+ trigger?: ScrollHintTrigger | undefined;
2306
2416
  /**
2307
2417
  * **データ量ゲート**。表示行数(フィルター / グルーピング適用後のビュー行数。SSRM
2308
2418
  * はサーバー総行数)がこの値未満のあいだ、scrollHint 全体(カスタムスクロールバー含む)を自動 OFF
@@ -2310,14 +2420,14 @@ export type ScrollHintOptions<T = unknown, F extends GridFrameworkTypes = GridFr
2310
2420
  *
2311
2421
  * @defaultValue `0`
2312
2422
  */
2313
- minRows?: number;
2423
+ minRows?: number | undefined;
2314
2424
  /** 行番号に添えて表示する列 key(= 行オブジェクトのフィールド名)。 */
2315
- hintColumn?: string;
2425
+ hintColumn?: string | undefined;
2316
2426
  /**
2317
2427
  * 表示内容の完全カスタム(`hintColumn` より優先)。`null` / `undefined`
2318
2428
  * を返すと行番号のみの既定表示。
2319
2429
  */
2320
- renderHint?: (args: ScrollHintRenderArgs<T>) => F['node'];
2430
+ renderHint?: ((args: ScrollHintRenderArgs<T>) => F['node']) | undefined;
2321
2431
  };
2322
2432
  /**
2323
2433
  * `SpreadsheetGrid` の props です(React 版では `ref` prop が加わります)。
@@ -2332,7 +2442,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2332
2442
  * を渡して呼ばれる。保存タイミングの signal(例: localStorage 自動保存)。発火規約は「状態の保存 /
2333
2443
  * 復元」節を参照。
2334
2444
  */
2335
- onStateChange?: (state: GridState) => void;
2445
+ onStateChange?: ((state: GridState) => void) | undefined;
2336
2446
  /**
2337
2447
  * 状態(列幅 / フィルター / ソート)の初期値。**最初の 1 回(マウント時)だけ**使い、
2338
2448
  * 後から変えても今の状態は変わらない(変えるときは `applyState`)。最初の描画・サーバーの描画(SSR)
@@ -2345,52 +2455,54 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2345
2455
  * 今の `columns` に無い列の幅 / フィルター / ソートは捨てる(開発時に警告)。URL
2346
2456
  * のクエリや保存した状態から戻すときに使う。
2347
2457
  */
2348
- initialState?: Omit<GridStatePatch, 'columns'>;
2458
+ initialState?: Omit<GridStatePatch, 'columns'> | undefined;
2349
2459
  /**
2350
2460
  * フィルター状態(`globalText` + `columnFilters`)が**実際に変化したとき**だけ、
2351
2461
  * そのスライスの複製を渡して呼ばれる。`onStateChange` は列幅 / 列メタでも呼ばれるため、記述子から
2352
2462
  * WHERE を組み立てるなどフィルターだけを追いたい用途向け。規約は `onStateChange`
2353
2463
  * と同じ(初回非発火 / 同値非発火 / `applyState` でも発火)。
2354
2464
  */
2355
- onFiltersChange?: (filters: GridFilterState) => void;
2465
+ onFiltersChange?: ((filters: GridFilterState) => void) | undefined;
2356
2466
  /**
2357
2467
  * ソート状態が**実際に変化したとき**だけ、その複製を渡して呼ばれる(ORDER BY の組み立てなど)。
2358
2468
  * 規約は `onFiltersChange` と同じ。
2359
2469
  */
2360
- onSortChange?: (sort: GridSortState) => void;
2470
+ onSortChange?: ((sort: GridSortState) => void) | undefined;
2361
2471
  /**
2362
2472
  * スクロール位置の変化通知(rAF で 1 フレーム 1 回に間引き・縦横どちらの変化でも発火)。`params` は
2363
2473
  * `{ top, left, source }`(px)。`source: 'api'` は `setScrollPosition` / `scrollTo*` 系由来、
2364
- * `'user'` はそれ以外。2 グリッドの双方向スクロール同期は `source === 'user'`
2474
+ * `'user'` はそれ以外(ホイール / ドラッグ / キーボードのほか、
2475
+ * 絞り込みや行の高さの測り直しで表が縮み、ブラウザが位置を詰めた分も `'user'` で届く)。2
2476
+ * グリッドの双方向スクロール同期は `source === 'user'`
2365
2477
  * のときだけ相手へ反映することでループを止められる。インライン関数可(latest-ref 経由)。
2366
2478
  */
2367
- onScroll?: (params: GridScrollEventParams) => void;
2479
+ onScroll?: ((params: GridScrollEventParams) => void) | undefined;
2368
2480
  /**
2369
2481
  * clientSide モードの行データ。readonly 配列も受け付ける(グリッドは入力配列を破壊的に変更しない。
2370
2482
  * 編集結果は `onRowsChange` が新配列で返す)。`dataSource` を指定した場合は無視され serverSide
2371
2483
  * モードになる(両者は排他)。
2372
2484
  */
2373
- rows?: readonly T[];
2485
+ rows?: readonly T[] | undefined;
2374
2486
  /**
2375
2487
  * serverSide(SSRM)モードのデータ供給口。指定すると可視窓近傍のブロックだけを `getRows`
2376
2488
  * で都度取得し、`rows` 系の clientSide パイプラインをバイパスする。`updateRows`(任意)
2377
2489
  * を持たせるとセル編集の書き戻し(楽観更新つき)が有効になる(「セル編集の書き戻し」節)。
2378
2490
  */
2379
- dataSource?: ServerSideDataSource<T>;
2491
+ dataSource?: ServerSideDataSource<T> | undefined;
2380
2492
  /**
2381
2493
  * serverSide のソフトリフレッシュ用トークン。値を増やすと、クエリ(フィルター/ソート/グローバル)
2382
2494
  * を変えずにキャッシュを破棄して現在の可視レンジをサーバから取り直す。スクロール位置は保持し、
2383
2495
  * 件数は到着ブロックの `totalRowCount` で追従する(clientSide では無視)。
2384
2496
  * 命令的に呼びたい場合は同挙動のハンドル `refreshServerSide()` を使う。
2385
2497
  */
2386
- serverSideRefreshToken?: number;
2498
+ serverSideRefreshToken?: number | undefined;
2387
2499
  /**
2388
2500
  * serverSide の `getRows` が reject したときの通知(abort は正常キャンセルのため通知しない)。
2389
2501
  * `params` は失敗した要求の view 空間レンジ `{ startIndex, endIndex }`。
2390
2502
  * グリッド内蔵のエラーバー(再試行 UI)とは独立に呼ばれる(利用側トースト / ログ用)。
2391
2503
  * インライン関数可(latest-ref 経由で読む)。
2392
2504
  */
2393
- onServerSideLoadError?: (error: unknown, params: ServerSideLoadErrorParams) => void;
2505
+ onServerSideLoadError?: ((error: unknown, params: ServerSideLoadErrorParams) => void) | undefined;
2394
2506
  /**
2395
2507
  * serverSide の `dataSource.updateRows` が reject したときの通知。
2396
2508
  * グリッド側は楽観更新をロールバック済みで、`params.updates` に失敗して元に戻した行更新(`rowKey`
@@ -2400,25 +2512,29 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2400
2512
  * グリッド内蔵の保存失敗バーとは独立に呼ばれる。インライン関数可(latest-ref 経由で読む)。
2401
2513
  * 詳細は「セル編集の書き戻し」節。
2402
2514
  */
2403
- onServerSideWriteError?: (error: unknown, params: ServerSideWriteErrorParams<T>) => void;
2515
+ onServerSideWriteError?: ((error: unknown, params: ServerSideWriteErrorParams<T>) => void) | undefined;
2404
2516
  /** 列定義の配列。readonly 配列も受け付ける。 */
2405
2517
  columns: readonly GridColumn<T, F>[];
2406
2518
  /** 行が変化したとき呼ばれる(rows を controlled にする)。 */
2407
- onRowsChange?: (nextRows: T[]) => void;
2519
+ onRowsChange?: ((nextRows: T[]) => void) | undefined;
2408
2520
  /**
2409
2521
  * 列が変化したとき呼ばれる。列メニューの固定切替はこれが指定されている場合のみ反映。
2410
2522
  * 列の並べ替え(ヘッダーのドラッグ / 列パネル)と `applyState` で渡る `nextColumns` は、
2411
2523
  * 配列順が固定列ごと(左固定 → 中央 → 右固定)に並べ直される(画面上の列順は変わらない。例:
2412
2524
  * 右固定列の後ろに宣言した列があると、右固定列が配列の末尾へ移る)。
2413
- * 列メニューの固定切替は配列順を変えず `pinned` だけを更新する。
2525
+ * 列メニューの固定切替は配列順を変えず `pinned` だけを更新する。指定が無いと、列メニューの固定 /
2526
+ * リセットと、ツールパネルの「列」タブの表示 /
2527
+ * 非表示・並べ替え・リセットは押せない(今の状態は見える)。
2528
+ * 押せない理由のツールチップは利用者向けの文(「この表では列の固定を変えられません」など。1.0.2
2529
+ * から。1.0.1 までは「onColumnsChange 未指定のため…」)。
2414
2530
  */
2415
- onColumnsChange?: (nextColumns: GridColumn<T, F>[]) => void;
2531
+ onColumnsChange?: ((nextColumns: GridColumn<T, F>[]) => void) | undefined;
2416
2532
  /**
2417
2533
  * 安定した行キーを返す。
2418
2534
  *
2419
2535
  * @defaultValue index ベース
2420
2536
  */
2421
- rowKeyGetter?: (row: T, index: number) => GridRowKey;
2537
+ rowKeyGetter?: ((row: T, index: number) => GridRowKey) | undefined;
2422
2538
  /**
2423
2539
  * コピー(`Ctrl/Cmd+C` の TSV)/ `exportCsv` / `getExportData` の対象行フィルタ。`false`
2424
2540
  * の行は出力から**行ごと**除く(行単位のみ。全体選択かの判定と貼り付けには影響しない)。
@@ -2428,10 +2544,10 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2428
2544
  *
2429
2545
  * @defaultValue 全行 true
2430
2546
  */
2431
- isRowExportable?: (row: T, ctx: {
2547
+ isRowExportable?: ((row: T, ctx: {
2432
2548
  viewRowIndex: number;
2433
2549
  rowKey: GridRowKey;
2434
- }) => boolean;
2550
+ }) => boolean) | undefined;
2435
2551
  /**
2436
2552
  * 貼り付けが表の末尾より下へはみ出したとき、
2437
2553
  * 足りない行を作る新規行ファクトリ(はみ出した行数だけ呼ぶ)。
@@ -2439,19 +2555,30 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2439
2555
  * ボタンなどで行を足すときは、利用側が `rows` に行を足す(グリッドは `createRow` を呼ばない。
2440
2556
  * serverSide では使わない)。
2441
2557
  */
2442
- createRow?: () => T;
2558
+ createRow?: (() => T) | undefined;
2443
2559
  /**
2444
2560
  * 貼り付けが右端の列よりはみ出したとき、足りない列を作る列ファクトリ(`onColumnsChange`
2445
2561
  * と一緒に使う)。
2446
2562
  */
2447
- createOverflowColumn?: (columnIndex: number) => GridColumn<T, F>;
2563
+ createOverflowColumn?: ((columnIndex: number) => GridColumn<T, F>) | undefined;
2564
+ /**
2565
+ * 貼り付けで書かなかったセルの通知(1.1.0 から)。1 回の貼り付けで 1 回、
2566
+ * 書かなかったセルがあるときだけ呼ぶ(書いたセルは書く)。`params.cells` の各セルは `row` /
2567
+ * `rowKey` / `rowIndex`(ビュー行)/ `columnKey` / `colIndex` / `text`(貼り付けた文字)/
2568
+ * `reason`(`'readOnly'` = 編集できないセル(列の `editable` / `canEditCell`)、`'invalid'` =
2569
+ * `validationMode: 'reject'` の列で検査に通らない値)/ `value`(`'invalid'` のときパーサが読んだ値)
2570
+ * / `message`(`'invalid'` のときの検査のメッセージ)。`validationMode: 'mark'`(既定)
2571
+ * の列は書いて印を付けるので入らない。表の外(`createRow` / `createOverflowColumn`
2572
+ * が無くて足せない行 / 列)・ラベル行・グループ行は数えない。詳細は「貼り付けで読めない値」節。
2573
+ */
2574
+ onPasteSkipped?: ((params: GridPasteSkippedParams<T>) => void) | undefined;
2448
2575
  /**
2449
2576
  * uniform 行の行高(px)。未指定時は density プリセット(compact: `28` / comfortable: `44`)
2450
2577
  * から解決。明示指定が常に優先。
2451
2578
  *
2452
2579
  * @defaultValue density 依存(standard: `36`)
2453
2580
  */
2454
- rowHeight?: number;
2581
+ rowHeight?: number | undefined;
2455
2582
  /**
2456
2583
  * auto-height 行(可変行高)を有効化する**大本のスイッチ**。これに加えて**少なくとも1列に
2457
2584
  * `column.autoHeight: true`** が必要(その列が折り返して行高を駆動)。両方 true かつ**行数 ≤ 50,
@@ -2459,27 +2586,27 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2459
2586
  *
2460
2587
  * @defaultValue `false`
2461
2588
  */
2462
- autoHeight?: boolean;
2589
+ autoHeight?: boolean | undefined;
2463
2590
  /**
2464
2591
  * auto-height で伸びた行(基準の `rowHeight` より高い行)での、セルの中身の縦の揃え。書かなければ
2465
2592
  * `autoHeight` の列は上(折り返した文章の 1 行目)、ほかの列は真ん中。`'top'` で全部の列を上に、
2466
2593
  * `'center'` で全部の列を真ん中にそろえる(列ごとの指定は `GridColumn.verticalAlign` が優先)。1
2467
2594
  * 行の行と、auto-height を使わないグリッドではどれも真ん中。詳細は「auto-height 行」節。
2468
2595
  */
2469
- verticalAlign?: GridVerticalAlign;
2596
+ verticalAlign?: GridVerticalAlign | undefined;
2470
2597
  /**
2471
2598
  * 未測定行の推定行高(px)。
2472
2599
  *
2473
2600
  * @defaultValue `rowHeight`
2474
2601
  */
2475
- estimateRowHeight?: number;
2602
+ estimateRowHeight?: number | undefined;
2476
2603
  /**
2477
2604
  * ヘッダー行の高さ(px)。未指定時は density プリセット(compact: `32` / comfortable: `48`)
2478
2605
  * から解決。明示指定が常に優先。
2479
2606
  *
2480
2607
  * @defaultValue density 依存(standard: `40`)
2481
2608
  */
2482
- headerHeight?: number;
2609
+ headerHeight?: number | undefined;
2483
2610
  /**
2484
2611
  * 密度プリセット。rowHeight / headerHeight の既定値と寸法トークン(セル横 padding / バー padding /
2485
2612
  * アイコンボタン寸法 / セル文字の相対拡縮)を一括切替。`'standard'` は従来と同値。
@@ -2487,20 +2614,21 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2487
2614
  *
2488
2615
  * @defaultValue `'standard'`
2489
2616
  */
2490
- density?: GridDensity;
2617
+ density?: GridDensity | undefined;
2491
2618
  /**
2492
2619
  * カラーテーマ。`'dark'` でダークプリセット(`.ssg-theme-dark` のトークン一括上書き。Mantine dark
2493
2620
  * 系パレット)をグリッド本体・全ポータル(popover / menu / panel)
2494
2621
  * ・ドラッグゴースト・ツールチップへ適用。`'auto'` は `prefers-color-scheme` へ追従。`'class'`
2495
2622
  * は祖先の `class="dark"` か `data-theme="dark"` を CSS で見てダークにする(Tailwind / next-themes
2496
2623
  * / shadcn/ui / HeroUI のようなクラスによるダーク向け。サーバーの描画から正しい色になる。
2497
- * ポップアップ類は `document.body` の直下に出るので、`dark` のクラス / 属性は `<html>` か
2498
- * `<body>` に付ける)。Mantine のようにほかの方法でダークを決めるものは、利用側の解決値を
2499
- * `'light' | 'dark'` で渡す。個別の色調整はトークン(`--ssg-*`)の上書きで可能。
2624
+ * ポップアップ類は表の外(既定は `document.body` の直下。`popupContainer`)に出るので、`dark`
2625
+ * のクラス / 属性は `<html>` か `<body>` に付ける)。Mantine
2626
+ * のようにほかの方法でダークを決めるものは、利用側の解決値を `'light' | 'dark'` で渡す。
2627
+ * 個別の色調整はトークン(`--ssg-*`)の上書きで可能。
2500
2628
  *
2501
2629
  * @defaultValue `'light'`
2502
2630
  */
2503
- theme?: GridTheme;
2631
+ theme?: GridTheme | undefined;
2504
2632
  /**
2505
2633
  * モーション(アニメーション / トランジション)の有効化。`'auto'` は OS /
2506
2634
  * ブラウザの「視差効果を減らす」(`prefers-reduced-motion: reduce`)が有効なら `'off'`、それ以外は
@@ -2512,7 +2640,19 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2512
2640
  *
2513
2641
  * @defaultValue `'auto'`
2514
2642
  */
2515
- motion?: GridMotion;
2643
+ motion?: GridMotion | undefined;
2644
+ /**
2645
+ * ポップアップ(列メニュー / 列フィルター / 右クリックメニュー / select の候補 / ツールパネル /
2646
+ * フィルハンドルのメニュー / ツールチップ / ドラッグのゴースト)を描く場所(1.1.0 から)。`'auto'`
2647
+ * はグリッドを囲むダイアログ(`<dialog>` / `popover` / `aria-modal="true"` / `role="dialog"` /
2648
+ * `role="alertdialog"`)の中、無ければ `document.body`。`'body'` はいつも `document.body`(1.0
2649
+ * までと同じ)。要素ならその中、関数はグリッドの要素を受け取って描く場所を返す(`null` /
2650
+ * `undefined` なら `document.body`。ポップアップを開いている間の描画ごとに呼ぶ。
2651
+ * 閉じている間は呼ばない)。詳細は「ダイアログの中のグリッド」節。
2652
+ *
2653
+ * @defaultValue `'auto'`
2654
+ */
2655
+ popupContainer?: GridPopupContainer | undefined;
2516
2656
  /**
2517
2657
  * 行の並び替えアニメ。ソート / フィルター / グループ開閉 / `rows` の差し替えで、
2518
2658
  * 描画中の行が新しい位置へ滑り(`--ssg-motion-base`)、
@@ -2522,7 +2662,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2522
2662
  *
2523
2663
  * @defaultValue `true`
2524
2664
  */
2525
- animateRows?: boolean;
2665
+ animateRows?: boolean | undefined;
2526
2666
  /**
2527
2667
  * `Ctrl/Cmd+C` のあと、コピー元の範囲に Excel と同じ「動く点線」
2528
2668
  * を残す(`.ssg-copy-range-overlay`。`motion` が `'off'` なら静的な点線)。`Esc` と編集開始で消え、
@@ -2531,7 +2671,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2531
2671
  *
2532
2672
  * @defaultValue `true`
2533
2673
  */
2534
- showCopyRange?: boolean;
2674
+ showCopyRange?: boolean | undefined;
2535
2675
  /**
2536
2676
  * ホバーの強調範囲。`'row'` はポインタの行だけ(従来)。`'cross'` はその行に加えて、
2537
2677
  * ポインタの列(列ヘッダー + 同じ列の他セルに薄い帯 `.ssg-col-hover-overlay`)
@@ -2541,7 +2681,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2541
2681
  *
2542
2682
  * @defaultValue `'row'`
2543
2683
  */
2544
- hoverHighlight?: 'row' | 'cross';
2684
+ hoverHighlight?: 'row' | 'cross' | undefined;
2545
2685
  /**
2546
2686
  * `rows` が変わったとき、値が変わったセルを一瞬アクセント色で光らせ(`.ssg-body-cell--changed`、
2547
2687
  * `--ssg-motion-slow`)、数値の既定セルは旧値から新値へカウントアップする(`--ssg-motion-base`。
@@ -2554,7 +2694,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2554
2694
  *
2555
2695
  * @defaultValue `false`
2556
2696
  */
2557
- highlightChanges?: boolean;
2697
+ highlightChanges?: boolean | undefined;
2558
2698
  /**
2559
2699
  * serverSide の書き戻し(`dataSource.updateRows`)で、確定したセルに保存状態の印を出す。
2560
2700
  * 保存中は斜線 + 小さなスピナー(`[data-ssg-save="pending"]`)、成功は ✓ バッジを 1.3 秒(`"ok"`)、
@@ -2566,7 +2706,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2566
2706
  *
2567
2707
  * @defaultValue `true`
2568
2708
  */
2569
- showSaveStatus?: boolean;
2709
+ showSaveStatus?: boolean | undefined;
2570
2710
  /**
2571
2711
  * 行ドラッグ並べ替え(`enableRowDrag`)の表示方式。`'ghost'` は従来(ゴースト + ガイド線、
2572
2712
  * ドロップ後に新しい位置へスライド)。`'live'` は掴んだ行がポインタに追従し、
@@ -2577,7 +2717,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2577
2717
  *
2578
2718
  * @defaultValue `'ghost'`
2579
2719
  */
2580
- rowDragMotion?: 'ghost' | 'live';
2720
+ rowDragMotion?: 'ghost' | 'live' | undefined;
2581
2721
  /**
2582
2722
  * 列ヘッダーのドラッグ並べ替え(`onColumnsChange` 指定時)の表示方式。`'ghost'` は従来(ゴースト +
2583
2723
  * 縦線、ドロップ後に新しい位置へスライド)。`'live'` は同じペイン内では掴んだ列(ヘッダー +
@@ -2591,7 +2731,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2591
2731
  *
2592
2732
  * @defaultValue `'ghost'`
2593
2733
  */
2594
- columnDragMotion?: 'ghost' | 'live';
2734
+ columnDragMotion?: 'ghost' | 'live' | undefined;
2595
2735
  /**
2596
2736
  * **セル内検索**。`true` でグリッド右上の検索バー(`.ssg-find-bar`)と
2597
2737
  * `Ctrl/Cmd+F`(グリッドにフォーカスがあるときだけ横取り)が有効になる。表示文字列(`valueFormatter`
@@ -2604,19 +2744,19 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2604
2744
  *
2605
2745
  * @defaultValue `false`
2606
2746
  */
2607
- find?: boolean | FindOptions;
2747
+ find?: boolean | FindOptions | undefined;
2608
2748
  /**
2609
2749
  * セル内検索の状態(`{ query, matchCount, currentIndex, open }`)が変わったときの通知。
2610
2750
  * `currentIndex` は 0 始まり(ヒットなしは `null`)。ツールバーに「3 / 12」を出す等に使う。
2611
2751
  */
2612
- onFindChange?: (params: FindChangeParams) => void;
2752
+ onFindChange?: ((params: FindChangeParams) => void) | undefined;
2613
2753
  /**
2614
2754
  * 行番号列の幅(px)。行番号列は左固定列が無くても左に固定され、横にスクロールしても流れない(Excel
2615
2755
  * の行見出しと同じ。0.63.0 から)。
2616
2756
  *
2617
2757
  * @defaultValue `56`
2618
2758
  */
2619
- rowHeaderWidth?: number;
2759
+ rowHeaderWidth?: number | undefined;
2620
2760
  /**
2621
2761
  * グリッドの明示高さ。**値の種類で何の高さかが変わる**。① `%` を含む文字列(`'100%'` / `'50%'` /
2622
2762
  * `'calc(100% - 40px)'`):
@@ -2628,7 +2768,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2628
2768
  * 未指定: スクロール領域は内容の高さで `maxHeight` によりクリップ。ルートへの
2629
2769
  * `style={{ height }}` だけではスクロール領域は決まらないため、高さはこの prop で指定する。
2630
2770
  */
2631
- height?: number | string;
2771
+ height?: number | string | undefined;
2632
2772
  /**
2633
2773
  * **スクロール領域**の高さ上限(バーは含まない。`height` の種類に関わらず同じ)。
2634
2774
  * `height`・`maxHeight` が**共に未指定のときのみ**既定の 480px が効く(従来挙動)。数値の
@@ -2637,7 +2777,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2637
2777
  *
2638
2778
  * @defaultValue `—`(既定 480px)
2639
2779
  */
2640
- maxHeight?: number | string;
2780
+ maxHeight?: number | string | undefined;
2641
2781
  /**
2642
2782
  * グリッド全体の編集を無効化。編集中に `true` へ切り替わった場合、
2643
2783
  * その編集は確定時に書き込まれず終了する(`canEditCell` も確定時に再評価)。`renderCell` の
@@ -2647,14 +2787,14 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2647
2787
  *
2648
2788
  * @defaultValue `false`
2649
2789
  */
2650
- readOnly?: boolean;
2790
+ readOnly?: boolean | undefined;
2651
2791
  /**
2652
2792
  * readonly セルの組み込み淡色表示(背景 + 文字色)を有効化。`false` でもセマンティッククラス
2653
2793
  * `.ssg-body-cell--readonly` は常時付与され、利用側 CSS のフックに使える。
2654
2794
  *
2655
2795
  * @defaultValue `false`
2656
2796
  */
2657
- dimReadOnlyCells?: boolean;
2797
+ dimReadOnlyCells?: boolean | undefined;
2658
2798
  /**
2659
2799
  * セル単位の編集可否ゲート。`rowIndex` は**ビュー行 index**(フィルター / ソート後の表示位置)で、
2660
2800
  * 表示(読み取り専用の見た目)・編集開始・確定・貼り付け・Delete クリア・IME
@@ -2664,7 +2804,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2664
2804
  * 貼り付けで末尾に追加される行は、追加後の位置と元 `rows` の index で呼ばれる。※ v0.48 以前は
2665
2805
  * clientSide の貼り付けと Delete クリアだけ元 `rows` の index が渡っていた。
2666
2806
  */
2667
- canEditCell?: (rowIndex: number, colIndex: number, row: T, column: GridColumn<T, F>, ctx: CanEditCellContext) => boolean;
2807
+ canEditCell?: ((rowIndex: number, colIndex: number, row: T, column: GridColumn<T, F>, ctx: CanEditCellContext) => boolean) | undefined;
2668
2808
  /**
2669
2809
  * グリッド編集(セル編集 / ペースト / `renderCell` の `setValue`)の取り消し/やり直し。`Ctrl/Cmd+Z`
2670
2810
  * = undo、`Ctrl/Cmd+Shift+Z` / `Ctrl/Cmd+Y` = redo(ハンドルの `undo()` / `redo()` でも可)。
@@ -2678,7 +2818,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2678
2818
  *
2679
2819
  * @defaultValue `true`
2680
2820
  */
2681
- enableUndoRedo?: boolean;
2821
+ enableUndoRedo?: boolean | undefined;
2682
2822
  /**
2683
2823
  * `Delete` / `Backspace` キーによる選択セル(なければアクティブセル)の値クリア。`false`
2684
2824
  * でキーは何もしない(素通し)。ペースト・エディタでの上書き・undo/redo
@@ -2686,7 +2826,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2686
2826
  *
2687
2827
  * @defaultValue `true`
2688
2828
  */
2689
- enableClearOnDelete?: boolean;
2829
+ enableClearOnDelete?: boolean | undefined;
2690
2830
  /**
2691
2831
  * 組み込みエディタ(text / number / select / date)の `Enter`
2692
2832
  * 確定後にアクティブセルをどこへ移すか(`'down'` | `'up'` | `'right'` | `'left'` | `'none'`。Excel
@@ -2698,7 +2838,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2698
2838
  *
2699
2839
  * @defaultValue `'down'`
2700
2840
  */
2701
- editorEnterMove?: EditorEnterMove;
2841
+ editorEnterMove?: EditorEnterMove | undefined;
2702
2842
  /**
2703
2843
  * **IME オンのままの直接入力**(Excel / SPREAD と同じ)。`true` で、
2704
2844
  * 編集していないあいだグリッドのフォーカスをアクティブセル上の透明な入力欄(入力受け)に置き、IME
@@ -2716,26 +2856,26 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2716
2856
  *
2717
2857
  * @defaultValue `false`
2718
2858
  */
2719
- imeDirectInput?: boolean;
2859
+ imeDirectInput?: boolean | undefined;
2720
2860
  /**
2721
2861
  * 保持する undo ステップ数の上限。超過分は古い順に破棄。
2722
2862
  *
2723
2863
  * @defaultValue `100`
2724
2864
  */
2725
- undoHistoryLimit?: number;
2865
+ undoHistoryLimit?: number | undefined;
2726
2866
  /**
2727
2867
  * undo / redo 可能状態が**変化したとき**に呼ばれる(ツールバーの undo/redo ボタンの disabled
2728
2868
  * 表示などリアクティブな UI 用)。初回マウントでは発火せず、同値では再発火しない。
2729
2869
  * 毎レンダーのインライン関数でも問題ない。引数の型 `UndoRedoState`(`{ canUndo, canRedo }`)
2730
2870
  * はパッケージから import できる。
2731
2871
  */
2732
- onUndoRedoStateChange?: (state: UndoRedoState) => void;
2872
+ onUndoRedoStateChange?: ((state: UndoRedoState) => void) | undefined;
2733
2873
  /**
2734
2874
  * 複数セル範囲選択。
2735
2875
  *
2736
2876
  * @defaultValue `true`
2737
2877
  */
2738
- enableRangeSelection?: boolean;
2878
+ enableRangeSelection?: boolean | undefined;
2739
2879
  /**
2740
2880
  * チェックボックス行選択の有効化(マスタースイッチ)。`true` で行ヘッダ(行NO)
2741
2881
  * ガターが行選択のヒット領域になり、Excel 風のガター起点セル範囲選択は
@@ -2744,34 +2884,38 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2744
2884
  *
2745
2885
  * @defaultValue `false`
2746
2886
  */
2747
- enableRowSelection?: boolean;
2887
+ enableRowSelection?: boolean | undefined;
2748
2888
  /**
2749
2889
  * 単一/複数の選択モード。single は常に 1 行。multiple はクリックでトグル、
2750
2890
  * shift+クリック/ガタードラッグで範囲選択。
2751
2891
  *
2752
2892
  * @defaultValue `'multiple'`
2753
2893
  */
2754
- rowSelectionMode?: RowSelectionMode;
2894
+ rowSelectionMode?: RowSelectionMode | undefined;
2755
2895
  /**
2756
2896
  * ヘッダ左上コーナーの全選択チェック(tri-state: none/some/all)の有効化。clientSide
2757
2897
  * のフィルターで行が隠れている間は、見えている行だけを選ぶ / 外す(印も見えている行だけで決める)。
2758
2898
  *
2759
2899
  * @defaultValue `enableRowSelection && multiple`
2760
2900
  */
2761
- enableSelectAllRows?: boolean;
2901
+ enableSelectAllRows?: boolean | undefined;
2762
2902
  /**
2763
2903
  * **controlled** の行選択記述子。`{ type:'include', rowKeys }`=これらを選択 /
2764
2904
  * `{ type:'exclude', rowKeys }`=全選択のうち除外。全選択をキー列挙せず表現できる。指定時は
2765
2905
  * controlled(内部 state を使わない)。
2766
2906
  */
2767
- rowSelection?: RowSelectionModel;
2907
+ rowSelection?: RowSelectionModel | undefined;
2768
2908
  /**
2769
2909
  * controlled 簡易版(`{ type:'include', rowKeys }` の糖衣)。`rowSelection` と併用時は
2770
2910
  * `rowSelection` を優先。全選択(exclude)は表現不可。
2771
2911
  */
2772
- selectedRowKeys?: GridRowKey[];
2773
- /** 行選択変化の通知(controlled/uncontrolled いずれでも発火)。 */
2774
- onRowSelectionChange?: (model: RowSelectionModel) => void;
2912
+ selectedRowKeys?: GridRowKey[] | undefined;
2913
+ /**
2914
+ * 行選択変化の通知(controlled/uncontrolled いずれでも発火)。通知の中でハンドルの
2915
+ * `getSelectedRowKeys()` / `getSelectedRowData()` / `getSelectedRowCount()` などを呼ぶと、
2916
+ * 新しい選択を返す。
2917
+ */
2918
+ onRowSelectionChange?: ((model: RowSelectionModel) => void) | undefined;
2775
2919
  /**
2776
2920
  * グローバルフィルター**機能**の有効化。`false` で機能が無効になり、
2777
2921
  * 既定トップバーのフィルター入力欄も出ない(summary は `showTopBarSummary` に従う。
@@ -2779,13 +2923,24 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2779
2923
  *
2780
2924
  * @defaultValue `true`
2781
2925
  */
2782
- enableGlobalFilter?: boolean;
2926
+ enableGlobalFilter?: boolean | undefined;
2927
+ /**
2928
+ * グローバルフィルターが照らし合わせる文字(1.1.0 から)。`'value'` はセルの値の文字(1.0
2929
+ * までと同じ)、`'display'` は画面の文字(列の `valueFormatter` の結果。無い列は値の文字)、`'both'`
2930
+ * はどちらか(値と表示名が別の列で、コードでも表示名でも探せる)。状態チップの
2931
+ * `label`・`renderCell` の中身は見ない。clientSide だけ(serverSide
2932
+ * ではグローバルフィルターの文字をサーバーへ渡すだけ。`manualFiltering` でも絞り込まない)。
2933
+ * 詳細は「値と表示名が別の列」節。
2934
+ *
2935
+ * @defaultValue `'value'`
2936
+ */
2937
+ globalFilterMatch?: GridGlobalFilterMatch | undefined;
2783
2938
  /**
2784
2939
  * 列ごとのフィルター。
2785
2940
  *
2786
2941
  * @defaultValue `true`
2787
2942
  */
2788
- enableColumnFilter?: boolean;
2943
+ enableColumnFilter?: boolean | undefined;
2789
2944
  /**
2790
2945
  * dateSet フィルター条件の日付入力を利用側コンポーネント(Mantine `DatePickerInput` 等)
2791
2946
  * へ差し替えるスロット。既定は内製フィールド(自由入力 + ドリルアップカレンダー。下記「dateSet
@@ -2793,7 +2948,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2793
2948
  *
2794
2949
  * @defaultValue 内製の日付フィールド
2795
2950
  */
2796
- renderFilterDateInput?: (ctx: FilterDateInputContext) => F['node'];
2951
+ renderFilterDateInput?: ((ctx: FilterDateInputContext) => F['node']) | undefined;
2797
2952
  /**
2798
2953
  * set / select / 複合(numberSet / textSet / dateSet)列の候補を**非同期に供給**する(DB の DISTINCT
2799
2954
  * など)。popover を開くたびに
@@ -2803,7 +2958,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2803
2958
  * `column.filterOptions`(静的)> `getFilterOptions` > rows 自動収集。非同期候補の列は反転(exclude)
2804
2959
  * 可。clientSide / serverSide 両対応。詳細は「ソートとフィルター」ガイド。
2805
2960
  */
2806
- getFilterOptions?: (params: GetFilterOptionsParams<T, F>) => Promise<GetFilterOptionsResult>;
2961
+ getFilterOptions?: ((params: GetFilterOptionsParams<T, F>) => Promise<GetFilterOptionsResult>) | undefined;
2807
2962
  /**
2808
2963
  * ソート機能の有効化。ソートは列メニュー(⋮)の「昇順 / 降順で並び替え」と「並び替えを管理…」
2809
2964
  * パネルから行う(ヘッダー本体のクリックは列範囲選択。`Shift` を押しながら見出しを押すと、
@@ -2814,7 +2969,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2814
2969
  *
2815
2970
  * @defaultValue `true`
2816
2971
  */
2817
- enableSorting?: boolean;
2972
+ enableSorting?: boolean | undefined;
2818
2973
  /**
2819
2974
  * 列 / グローバルフィルターの**絞り込みをグリッドで行わない**(手動フィルターモード)。フィルター
2820
2975
  * UI(popover / チップバー / フィルター管理 / フィルター中の印)と状態(`GridState.filters` /
@@ -2824,7 +2979,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2824
2979
  *
2825
2980
  * @defaultValue `false`
2826
2981
  */
2827
- manualFiltering?: boolean;
2982
+ manualFiltering?: boolean | undefined;
2828
2983
  /**
2829
2984
  * ソートの**並べ替えをグリッドで行わない**(手動ソートモード)。ソート UI と状態(`GridState.sort` /
2830
2985
  * `onStateChange`)は従来どおり動き、`rows` は渡した順のまま。再マウントなしで切り替え可(`false`
@@ -2833,14 +2988,14 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2833
2988
  *
2834
2989
  * @defaultValue `false`
2835
2990
  */
2836
- manualSorting?: boolean;
2991
+ manualSorting?: boolean | undefined;
2837
2992
  /**
2838
2993
  * 列幅の手動リサイズ可否のグリッド既定。各列 `resizable`
2839
2994
  * 未指定時に継承(`column.resizable ?? enableColumnResize`)。
2840
2995
  *
2841
2996
  * @defaultValue `true`
2842
2997
  */
2843
- enableColumnResize?: boolean;
2998
+ enableColumnResize?: boolean | undefined;
2844
2999
  /**
2845
3000
  * データ投入時に全列幅を内容へ自動フィット。`'onMount'`=初回にデータが載った一度きり /
2846
3001
  * `'onDataChange'`=`rows`(参照)が変わるたび(= データ差し替えのたび。手動リサイズは上書き) /
@@ -2852,7 +3007,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2852
3007
  *
2853
3008
  * @defaultValue `false`
2854
3009
  */
2855
- autoSizeColumns?: AutoSizeColumnsMode;
3010
+ autoSizeColumns?: AutoSizeColumnsMode | undefined;
2856
3011
  /**
2857
3012
  * セル内容が省略(…)される列で、ホバー時に全文ツールチップを表示。
2858
3013
  * 対象は既定テキストセルのみ(`renderCell` 列 / `autoHeight` 折り返し列は対象外)。表示はホバー時に
@@ -2861,7 +3016,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2861
3016
  *
2862
3017
  * @defaultValue `false`
2863
3018
  */
2864
- showCellOverflowTooltip?: boolean;
3019
+ showCellOverflowTooltip?: boolean | undefined;
2865
3020
  /**
2866
3021
  * invalid マーク(背景 + 右上マーカー + メッセージのツールチップ + セルの `aria-invalid` /
2867
3022
  * `aria-description`)の表示可否。`false` で非表示 + 可視セルの検査(`validate` と number の `min`
@@ -2871,28 +3026,28 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2871
3026
  *
2872
3027
  * @defaultValue `true`
2873
3028
  */
2874
- showValidationMarks?: boolean;
3029
+ showValidationMarks?: boolean | undefined;
2875
3030
  /**
2876
3031
  * 行ホバー時に行全体を薄くハイライト。
2877
3032
  *
2878
3033
  * @defaultValue `true`
2879
3034
  */
2880
- enableRowHover?: boolean;
3035
+ enableRowHover?: boolean | undefined;
2881
3036
  /**
2882
3037
  * 行ホバーの controlled 値(ビュー行 index / `null` = ホバーなし)。指定時は内部 state
2883
3038
  * を使わずこの値でハイライトし、pointer 由来の変化は `onHoveredRowChange` で通知のみ(optionally
2884
3039
  * controlled)。`enableRowHover: false` のときは無視(ハイライトも通知もしない)。一時的な UI
2885
3040
  * 状態のため `GridState` / ハンドルには載らない。
2886
3041
  */
2887
- hoveredRowIndex?: number | null;
3042
+ hoveredRowIndex?: number | null | undefined;
2888
3043
  /**
2889
3044
  * 行ホバーが変わったときの通知(uncontrolled でも呼ばれる)。`viewRowIndex` はフィルター /
2890
3045
  * ソート適用後のビュー行 index。同値では発火しない(pointerenter
2891
3046
  * は同一行内のセル跨ぎでも来るため)。用途: 複数グリッド間のホバー同期など。
2892
3047
  */
2893
- onHoveredRowChange?: (viewRowIndex: number | null, ctx: {
3048
+ onHoveredRowChange?: ((viewRowIndex: number | null, ctx: {
2894
3049
  source: 'pointer';
2895
- }) => void;
3050
+ }) => void) | undefined;
2896
3051
  /**
2897
3052
  * データセル(データ行 × 利用側の列)のクリックで呼ばれる。左ボタンのみで、
2898
3053
  * 押した位置と離した位置が同じセルのときだけ呼ばれる(範囲選択のドラッグはクリック扱いにしない)。
@@ -2903,14 +3058,14 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2903
3058
  * の未ロード行 / 合成列(展開トグル・行ドラッグハンドル)では呼ばれない。インライン関数可。
2904
3059
  * 詳細は「セル操作の通知」節。
2905
3060
  */
2906
- onCellClick?: (params: GridCellEventParams<T, F>) => void;
3061
+ onCellClick?: ((params: GridCellEventParams<T, F>) => void) | undefined;
2907
3062
  /**
2908
3063
  * データセルのダブルクリック(タッチのダブルタップ含む)で、既定の動作(編集可能セルなら編集開始)
2909
3064
  * の前に呼ばれる。読み取り専用セルでも呼ばれる。`params.preventDefault()`
2910
3065
  * で既定の動作を止められる(`params.event.preventDefault()` では止まらない)。対象のセルは
2911
3066
  * `onCellClick` と同じ。インライン関数可。
2912
3067
  */
2913
- onCellDoubleClick?: (params: GridCellDoubleClickParams<T, F>) => void;
3068
+ onCellDoubleClick?: ((params: GridCellDoubleClickParams<T, F>) => void) | undefined;
2914
3069
  /**
2915
3070
  * アクティブセルが変わったときに呼ばれる(クリック / キー操作 / `setActiveCell`
2916
3071
  * など由来を問わない)。アクティブセルが無くなった / データセル以外(グループ行 / ラベル行 /
@@ -2919,19 +3074,19 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2919
3074
  * ソートなどでその位置の行が変われば呼ばれる。初回マウントでは呼ばれない。
2920
3075
  * 通知はペイント後(クリックでは `onCellClick` より先)。インライン関数可。
2921
3076
  */
2922
- onActiveCellChange?: (cell: GridCellRef<T, F> | null) => void;
3077
+ onActiveCellChange?: ((cell: GridCellRef<T, F> | null) => void) | undefined;
2923
3078
  /**
2924
3079
  * 列ヘッダーのホバー時にヘッダーセルを薄くハイライト。
2925
3080
  *
2926
3081
  * @defaultValue `true`
2927
3082
  */
2928
- enableColumnHeaderHover?: boolean;
3083
+ enableColumnHeaderHover?: boolean | undefined;
2929
3084
  /**
2930
3085
  * 列メニュー(⋮ + ヘッダー右クリック)。
2931
3086
  *
2932
3087
  * @defaultValue `true`
2933
3088
  */
2934
- enableColumnMenu?: boolean;
3089
+ enableColumnMenu?: boolean | undefined;
2935
3090
  /**
2936
3091
  * フィルター結果 0 行時のオーバーレイ文言。serverSide(`dataSource`)では列 /
2937
3092
  * グローバルフィルターが掛かった状態で 0 件のときにこちら、掛かっていなければ `noRowsText`
@@ -2939,25 +3094,25 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2939
3094
  *
2940
3095
  * @defaultValue `localeText` の `noMatchingRows`(`'一致する行がありません'`)
2941
3096
  */
2942
- noMatchingRowsText?: string;
3097
+ noMatchingRowsText?: string | undefined;
2943
3098
  /**
2944
3099
  * rows が 0 件のときの文言。
2945
3100
  *
2946
3101
  * @defaultValue `localeText` の `noRows`(`'表示する行がありません'`)
2947
3102
  */
2948
- noRowsText?: string;
3103
+ noRowsText?: string | undefined;
2949
3104
  /**
2950
3105
  * 表(`role="grid"` の要素)のアクセシブル名。スクリーンリーダーが表を読み上げるときの名前で、1
2951
3106
  * 画面に複数のグリッドを置くときは付けておくと区別できる(「アクセシビリティ」節)。
2952
3107
  */
2953
- ariaLabel?: string;
3108
+ ariaLabel?: string | undefined;
2954
3109
  /**
2955
3110
  * 上部バー(ツールバー)の表示有無。`false` で `renderTopBar` / `enableGlobalFilter`
2956
3111
  * に関わらず一切描画しない(表示のマスタースイッチ。矛盾指定時は `renderTopBar` より優先)。
2957
3112
  *
2958
3113
  * @defaultValue `true`
2959
3114
  */
2960
- showTopBar?: boolean;
3115
+ showTopBar?: boolean | undefined;
2961
3116
  /**
2962
3117
  * 既定トップバーの summary chips(件数/フィルター/ソート)の表示有無。`renderTopBar`
2963
3118
  * 未指定時のみ有効。これと `showTopBarFilter`
@@ -2965,27 +3120,27 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2965
3120
  *
2966
3121
  * @defaultValue `true`
2967
3122
  */
2968
- showTopBarSummary?: boolean;
3123
+ showTopBarSummary?: boolean | undefined;
2969
3124
  /**
2970
3125
  * 既定トップバーの Rows / Columns 件数 chips の表示有無。`showTopBarSummary=true`(かつ
2971
3126
  * `renderTopBar` 未指定)のときのみ有効。Filter / Sort chips は対象外。
2972
3127
  *
2973
3128
  * @defaultValue `true`
2974
3129
  */
2975
- showTopBarCounts?: boolean;
3130
+ showTopBarCounts?: boolean | undefined;
2976
3131
  /**
2977
3132
  * 既定トップバーのグローバルフィルター入力欄の表示有無。`renderTopBar` 未指定時のみ有効。
2978
3133
  * `enableGlobalFilter=false` のときは本値に関わらず非表示。
2979
3134
  *
2980
3135
  * @defaultValue `true`
2981
3136
  */
2982
- showTopBarFilter?: boolean;
3137
+ showTopBarFilter?: boolean | undefined;
2983
3138
  /**
2984
3139
  * 既定トップバーのグローバルフィルター入力の placeholder。`renderTopBar` 未指定時のみ有効。
2985
3140
  *
2986
3141
  * @defaultValue `localeText` の `globalFilterPlaceholder`(`'グローバルフィルター'`)
2987
3142
  */
2988
- globalFilterPlaceholder?: string;
3143
+ globalFilterPlaceholder?: string | undefined;
2989
3144
  /**
2990
3145
  * 既定トップバーのグローバルフィルター入力の左アイコン。`renderTopBar` 未指定時のみ有効。
2991
3146
  * `undefined`=組み込みの検索(虫眼鏡)アイコン / `null`(など falsy)=アイコン無し / 任意
@@ -2993,7 +3148,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
2993
3148
  *
2994
3149
  * @defaultValue 組み込み検索アイコン
2995
3150
  */
2996
- globalFilterIcon?: F['node'];
3151
+ globalFilterIcon?: F['node'] | undefined;
2997
3152
  /**
2998
3153
  * グリッドが自分で出す文言(バー・メニュー・列フィルター・ツールパネル・検索・読み上げの名前・検証のメッセージなど)。
2999
3154
  * 変えたいキーだけを渡す(`{ noRows: 'データがありません' }`)。`{name}` の所は値に置き換わる。
@@ -3002,21 +3157,21 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
3002
3157
  *
3003
3158
  * @defaultValue 日本語
3004
3159
  */
3005
- localeText?: Partial<GridLocaleText>;
3160
+ localeText?: Partial<GridLocaleText> | undefined;
3006
3161
  /**
3007
3162
  * 下部バー(ステータスバー)の表示有無。`false` で `renderBottomBar`
3008
3163
  * に関わらず一切描画しない(表示のマスタースイッチ。矛盾指定時は `renderBottomBar` より優先)。
3009
3164
  *
3010
3165
  * @defaultValue `true`
3011
3166
  */
3012
- showBottomBar?: boolean;
3167
+ showBottomBar?: boolean | undefined;
3013
3168
  /**
3014
3169
  * 既定ボトムバーの Rows / Columns 件数 chips(左側)の表示有無。`renderBottomBar`
3015
3170
  * 未指定時のみ有効。右側の Active / Selection / 選択統計 / Cols は対象外。
3016
3171
  *
3017
3172
  * @defaultValue `true`
3018
3173
  */
3019
- showBottomBarCounts?: boolean;
3174
+ showBottomBarCounts?: boolean | undefined;
3020
3175
  /**
3021
3176
  * 2 セル以上を選んだとき、選択範囲の集計(平均 / データの個数 / 合計)を既定ボトムバーの右側(Active
3022
3177
  * / Selection の隣の空き)に出す。数えるのは表示中のデータ行 ×
@@ -3029,7 +3184,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
3029
3184
  *
3030
3185
  * @defaultValue `true`
3031
3186
  */
3032
- showSelectionAggregates?: boolean;
3187
+ showSelectionAggregates?: boolean | undefined;
3033
3188
  /**
3034
3189
  * フィルターチップバー(適用中の列フィルターをトップバー直下にチップで常時表示)
3035
3190
  * の表示有無(opt-in)。有効フィルター 0 件時はバーごと非表示(空バーは出さない)。`showTopBar`
@@ -3038,7 +3193,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
3038
3193
  *
3039
3194
  * @defaultValue `false`
3040
3195
  */
3041
- showFilterChipBar?: boolean;
3196
+ showFilterChipBar?: boolean | undefined;
3042
3197
  /**
3043
3198
  * 上部バーの差し替え。未指定時は内蔵トップバー(summary chips + フィルター入力。内訳は
3044
3199
  * `showTopBarSummary` / `showTopBarFilter` で制御。フィルター入力は `enableGlobalFilter=true`
@@ -3046,21 +3201,21 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
3046
3201
  *
3047
3202
  * @defaultValue 内蔵トップバー
3048
3203
  */
3049
- renderTopBar?: (context: SpreadsheetGridSlotContext<T, F>) => F['node'];
3204
+ renderTopBar?: ((context: SpreadsheetGridSlotContext<T, F>) => F['node']) | undefined;
3050
3205
  /**
3051
3206
  * 下部バーの差し替え。未指定時は内蔵ステータスバー。`showBottomBar=false`
3052
3207
  * 時は本指定に関わらず描画されない。
3053
3208
  *
3054
3209
  * @defaultValue 内蔵ボトムバー
3055
3210
  */
3056
- renderBottomBar?: (context: SpreadsheetGridSlotContext<T, F>) => F['node'];
3211
+ renderBottomBar?: ((context: SpreadsheetGridSlotContext<T, F>) => F['node']) | undefined;
3057
3212
  /** ルート要素の class。 */
3058
- className?: string;
3213
+ className?: string | undefined;
3059
3214
  /**
3060
3215
  * ルート要素(`.ssg-root`)のインライン style。`classNames.root` の style とマージされ、
3061
3216
  * こちらが後勝ち。
3062
3217
  */
3063
- style?: F['style'];
3218
+ style?: F['style'] | undefined;
3064
3219
  /**
3065
3220
  * パーツ別の追加スロット。各値は `GridSlotProps`(`string | { className?, style? }`)で、StyleX の
3066
3221
  * `stylex.props(...)` の戻り値をそのまま渡せる。全 25
@@ -3073,17 +3228,19 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
3073
3228
  * レイヤー順の宣言(`@layer theme, base, ssg-base, components, utilities;`)にするか、`!`
3074
3229
  * を付ける。
3075
3230
  */
3076
- classNames?: GridClassNames<F>;
3231
+ classNames?: GridClassNames<F> | undefined;
3077
3232
  /**
3078
3233
  * 行ごとの追加 class(または `{ className, style }`)。行コンテナ + 行ヘッダー「#」セル +
3079
3234
  * 各データセルに付与され、Tailwind / StyleX での行ハイライトに使える。`style`
3080
3235
  * はインラインで付与され、座標 / 寸法はグリッドが後勝ち(返した style は内容比較で memo される)。
3081
- * 第 3 引数 `ctx` は `{ row, rowIndex, sourceRowIndex, rowKey, isSelected }`(「補助型」節参照)。
3082
- * 既存の 2 引数関数もそのまま動く(後方互換)。グループ行は対象外。class と style
3236
+ * 第 3 引数 `ctx` は `{ row, rowIndex, sourceRowIndex, rowKey, isSelected, pinned? }`(「補助型」
3237
+ * 節参照)。固定行(`pinnedTopRows` / `pinnedBottomRows`)にも呼ばれ、そのときは `ctx.pinned` が
3238
+ * `'top'` / `'bottom'`(`rowIndex` / `sourceRowIndex` は固定行の中の位置)。既存の 2
3239
+ * 引数関数もそのまま動く(後方互換)。グループ行は対象外。class と style
3083
3240
  * は行と各セルの両方に付くので、`opacity` / `filter` のように重なる指定は style で返さず、class
3084
3241
  * を返して `.ssg-body-row.<class>` で行だけに当てる(style の `opacity: 0.5` は 0.25 になる)。
3085
3242
  */
3086
- getRowClassName?: (row: T, rowIndex: number, ctx: RowStyleContext<T>) => GridSlotProps<F> | undefined;
3243
+ getRowClassName?: ((row: T, rowIndex: number, ctx: RowStyleContext<T>) => GridSlotProps<F> | undefined) | undefined;
3087
3244
  /**
3088
3245
  * **展開行(Master/Detail)**。マスター行の直下に、行順(view index)を変えずに全幅の帯を差し込み、
3089
3246
  * その中(カード)へ `render` の返す任意の React 要素(自前のサブグリッド / フォーム / 集計パネル等)
@@ -3093,12 +3250,12 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
3093
3250
  *
3094
3251
  * @defaultValue —(無効)
3095
3252
  */
3096
- detailRow?: DetailRowOptions<T, F>;
3253
+ detailRow?: DetailRowOptions<T, F> | undefined;
3097
3254
  /**
3098
3255
  * 展開中の展開行のマスター行キー集合が**変化したとき**に呼ばれる(開閉の永続化・外部同期用)。
3099
3256
  * 初回マウントでは発火しない。インライン関数可(latest-ref 経由)。
3100
3257
  */
3101
- onExpandedDetailRowKeysChange?: (keys: GridRowKey[]) => void;
3258
+ onExpandedDetailRowKeysChange?: ((keys: GridRowKey[]) => void) | undefined;
3102
3259
  /**
3103
3260
  * **ラベル行(見出し / 区切り行)**。`rows` の中で `isLabelRow(row)` が true
3104
3261
  * の行を「行数に数えない見出し」として、3 ペインを跨ぐ全幅の帯で描画する(中身は `render` で任意の
@@ -3111,7 +3268,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
3111
3268
  *
3112
3269
  * @defaultValue —(無効)
3113
3270
  */
3114
- labelRow?: LabelRowOptions<T, F, L>;
3271
+ labelRow?: LabelRowOptions<T, F, L> | undefined;
3115
3272
  /**
3116
3273
  * **合計行**。表の下端に合計行を固定表示する(縦スクロールしても動かず、
3117
3274
  * 横スクロールと左右の固定列には付いていく)。列ごとの集計は
@@ -3125,7 +3282,26 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
3125
3282
  *
3126
3283
  * @defaultValue —(無効)
3127
3284
  */
3128
- totalRow?: boolean | TotalRowOptions<T, F>;
3285
+ totalRow?: boolean | TotalRowOptions<T, F> | undefined;
3286
+ /**
3287
+ * **固定行(上)**。列見出しのすぐ下に固定して表示する行(縦スクロールしても動かず、
3288
+ * 横スクロールと左右の固定列には付いていく)。目標値・前年の実績・平均のような比べる行を、
3289
+ * 本体の行とは別の配列で渡す(`rows` には入れない)。セルは列の `valueFormatter` /
3290
+ * `renderCell`(`ctx.pinned` が `'top'`)/ `cellClassName` / 条件付き書式で描く。表示専用(選択 /
3291
+ * 編集 / 貼り付け / コピー / キー操作 / セル内検索(`find`)の対象外。並べ替え /
3292
+ * フィルターも効かない)。行の高さは `rowHeight`。エクスポートは `includePinnedRows: true`
3293
+ * のときだけ。詳細は「固定行」節。
3294
+ *
3295
+ * @defaultValue —(無効)
3296
+ */
3297
+ pinnedTopRows?: T[] | undefined;
3298
+ /**
3299
+ * **固定行(下)**。表の下端(合計行(`totalRow`)があればそのすぐ上)に固定して表示する行。ほかは
3300
+ * `pinnedTopRows` と同じ(`ctx.pinned` は `'bottom'`)。
3301
+ *
3302
+ * @defaultValue —(無効)
3303
+ */
3304
+ pinnedBottomRows?: T[] | undefined;
3129
3305
  /**
3130
3306
  * **フィルハンドル**。選択範囲(無ければアクティブセル)の右下に小さな四角を出し、
3131
3307
  * 引いた先のセルを**連続データ**(1, 2, 3 … / 日付 / 曜日・月の名前 / `P-001` のような末尾の数)
@@ -3139,7 +3315,7 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
3139
3315
  *
3140
3316
  * @defaultValue —(無効)
3141
3317
  */
3142
- fillHandle?: boolean | FillHandleOptions<T, F>;
3318
+ fillHandle?: boolean | FillHandleOptions<T, F> | undefined;
3143
3319
  /**
3144
3320
  * **行ドラッグ並び替え**。先頭にドラッグハンドル列(幅 28px・タイトル無しの合成列。
3145
3321
  * 左固定列があれば左固定側)を挿入し、ハンドル(⋮⋮)を掴んで行を上下へ動かせる。確定時は
@@ -3150,20 +3326,20 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
3150
3326
  *
3151
3327
  * @defaultValue `false`
3152
3328
  */
3153
- enableRowDrag?: boolean;
3329
+ enableRowDrag?: boolean | undefined;
3154
3330
  /**
3155
3331
  * 行ごとのドラッグ可否。`false` の行にはハンドルを描画しない。
3156
3332
  * `ctx = { rowKey, sourceRowIndex }`。
3157
3333
  *
3158
3334
  * @defaultValue 全行可
3159
3335
  */
3160
- isRowDraggable?: (row: T, ctx: RowDragContext) => boolean;
3336
+ isRowDraggable?: ((row: T, ctx: RowDragContext) => boolean) | undefined;
3161
3337
  /**
3162
3338
  * 行移動の確定後(`onRowsChange` の直後)に呼ばれる。
3163
3339
  * `params = { rowKey, fromIndex, toIndex, rows }`(index は元 `rows` 配列基準、`rows` は
3164
3340
  * `onRowsChange` と同じ新配列参照)。ハンドルの `moveRow()` による移動でも呼ばれる。
3165
3341
  */
3166
- onRowMove?: (params: RowMoveParams<T>) => void;
3342
+ onRowMove?: ((params: RowMoveParams<T>) => void) | undefined;
3167
3343
  /**
3168
3344
  * コンテキストメニュー機能の有効化(マスタースイッチ)。他機能の `enable*` と同じく**既定 OFF**。
3169
3345
  * `false` のあいだは `getContextMenuItems` を渡しても発火せず、
@@ -3172,18 +3348,19 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
3172
3348
  *
3173
3349
  * @defaultValue `false`
3174
3350
  */
3175
- enableContextMenu?: boolean;
3351
+ enableContextMenu?: boolean | undefined;
3176
3352
  /**
3177
- * セル/行の**完全カスタム**コンテキストメニュー。右クリック時のみ呼ばれ、
3353
+ * セル/行の**完全カスタム**コンテキストメニュー。右クリックと、アクティブセルでの `Shift+F10` /
3354
+ * メニューキー(1.1.0)のときだけ呼ばれ(1 回の操作で 1 回)、
3178
3355
  * 返した項目でメニューを描画する(ライブラリは固定の既定項目を持たない)。opt-in は
3179
3356
  * `enableContextMenu={true}` かつ本コールバックの指定の両方。**未指定、または `[]`
3180
3357
  * を返したときはブラウザ標準の右クリックメニューへフォールスルー**(空パネルは出さない)。SSRM
3181
3358
  * 未ロード行では開かない。ヘッダー右クリックは列メニュー(`enableColumnMenu`)が担当し、
3182
3359
  * 本メニューはボディ(セル / 行NO ガター)専用。詳細は「コンテキストメニュー」節を参照。
3183
3360
  */
3184
- getContextMenuItems?: (params: GridContextMenuParams<T, F>) => GridContextMenuItem<F>[];
3361
+ getContextMenuItems?: ((params: GridContextMenuParams<T, F>) => GridContextMenuItem<F>[]) | undefined;
3185
3362
  /** */
3186
- onContextMenuOpen?: (params: GridContextMenuParams<T, F>) => void;
3363
+ onContextMenuOpen?: ((params: GridContextMenuParams<T, F>) => void) | undefined;
3187
3364
  /**
3188
3365
  * **スクロール位置インジケーター**。スクロール中にスクロールバー脇へ行番号バブル(「行 N /
3189
3366
  * 総行数」+ 任意の列値)と行目盛りルーラーを表示し、スクロールバー帯のホバーで「行 N へ」
@@ -3196,5 +3373,5 @@ export type SpreadsheetGridProps<T, F extends GridFrameworkTypes = GridFramework
3196
3373
  *
3197
3374
  * @defaultValue —(無効)
3198
3375
  */
3199
- scrollHint?: boolean | ScrollHintOptions<T, F>;
3376
+ scrollHint?: boolean | ScrollHintOptions<T, F> | undefined;
3200
3377
  };