@ishibashi0112/spreadsheet-grid 1.8.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/API_REFERENCE.md +219 -30
- package/README.md +2 -2
- package/dist/CellEditorLayer.d.ts +3 -1
- package/dist/GridShell.d.ts +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/editors/DateCellEditor.d.ts +2 -1
- package/dist/editors/NumberCellEditor.d.ts +2 -1
- package/dist/editors/SearchSelectCellEditor.d.ts +2 -1
- package/dist/editors/SelectCellEditor.d.ts +2 -1
- package/dist/editors/TextCellEditor.d.ts +2 -1
- package/dist/features/excelShortcuts.d.ts +2 -0
- package/dist/features/newRow.d.ts +2 -0
- package/dist/features/treeData.d.ts +2 -0
- package/dist/features/types.d.ts +10 -0
- package/dist/hooks/useGridClipboardController.d.ts +1 -0
- package/dist/hooks/useGridStore.d.ts +1 -1
- package/dist/index.cjs +11 -9
- package/dist/index.js +3424 -2949
- package/dist/lite/CopyRangeOverlay-BrCXRBtd.js +23 -0
- package/dist/lite/CopyRangeOverlay-CJGp8xo5.cjs +1 -0
- package/dist/lite/createSpreadsheetGrid-BWZbBB_j.js +5065 -0
- package/dist/lite/createSpreadsheetGrid-fhnxS5bQ.cjs +11 -0
- package/dist/lite/createSpreadsheetGrid.cjs +1 -1
- package/dist/lite/createSpreadsheetGrid.js +1 -1
- package/dist/lite/features/excelShortcuts.cjs +1 -0
- package/dist/lite/features/excelShortcuts.js +5 -0
- package/dist/lite/features/motionExtras.cjs +1 -1
- package/dist/lite/features/motionExtras.js +1 -1
- package/dist/lite/features/newRow.cjs +1 -0
- package/dist/lite/features/newRow.js +11 -0
- package/dist/lite/features/pinnedRows.cjs +1 -1
- package/dist/lite/features/pinnedRows.js +1 -1
- package/dist/lite/features/rowDrag.cjs +1 -1
- package/dist/lite/features/rowDrag.js +1 -1
- package/dist/lite/features/selectSearch.cjs +1 -1
- package/dist/lite/features/selectSearch.js +1 -1
- package/dist/lite/features/treeData.cjs +1 -0
- package/dist/lite/features/treeData.js +2 -0
- package/dist/lite/motionExtras-CZvGdgRi.js +26 -0
- package/dist/lite/motionExtras-Cz6DeWVG.cjs +1 -0
- package/dist/lite/{pinnedRows-BtvLVkLa.js → pinnedRows-C0z2lLC4.js} +1 -0
- package/dist/lite/pinnedRows-CrwRr7W0.cjs +1 -0
- package/dist/lite/{rowDrag-Bb1xlVXa.cjs → rowDrag--lPuW0-D.cjs} +1 -1
- package/dist/lite/{rowDrag-Dvg4JlGR.js → rowDrag-DVqgwSaj.js} +2 -1
- package/dist/lite/selectSearch-CMNy2EOi.cjs +1 -0
- package/dist/lite/{selectSearch-B1OSCMbw.js → selectSearch-DmFm5bXg.js} +51 -38
- package/dist/lite/treeData-2RQEs57C.js +64 -0
- package/dist/lite/treeData-X3RTdPnL.cjs +1 -0
- package/dist/lite.cjs +1 -1
- package/dist/lite.d.ts +3 -0
- package/dist/lite.js +19 -16
- package/dist/model/gridTypes.d.ts +2 -0
- package/dist/style.css +1 -1
- package/dist/style.layer.css +1 -1
- package/dist/themes/astryx.css +3 -0
- package/dist/themes/heroui.css +3 -0
- package/dist/themes/mantine.css +3 -0
- package/dist/themes/shadcn.css +3 -0
- package/dist/view/GridBodyLayer.d.ts +12 -1
- package/dist/view/GridTreeCell.d.ts +16 -0
- package/package.json +2 -2
- package/skills/spreadsheet-grid/SKILL.md +6 -2
- package/dist/lite/createSpreadsheetGrid-Dk8_KZ1L.js +0 -4657
- package/dist/lite/createSpreadsheetGrid-wGOM8DxG.cjs +0 -9
- package/dist/lite/motionExtras-aDs-d_Qv.cjs +0 -1
- package/dist/lite/motionExtras-pdhFC4q1.js +0 -46
- package/dist/lite/pinnedRows-CBgirKjW.cjs +0 -1
- package/dist/lite/selectSearch-BIeA4Xhg.cjs +0 -1
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ More runnable examples (server-side row model, Astryx) are in [`examples/`](http
|
|
|
52
52
|
|
|
53
53
|
## Smaller bundles: `/lite` (0.54.0+)
|
|
54
54
|
|
|
55
|
-
`SpreadsheetGrid` includes every feature (about
|
|
55
|
+
`SpreadsheetGrid` includes every feature (about 194KB gzip of initial JS). The `/lite` entry builds a grid with only the features you pass; the rest is left out of your bundle (about 104KB with no features, about 129KB with the `standardFeatures` preset).
|
|
56
56
|
|
|
57
57
|
```tsx
|
|
58
58
|
import { createSpreadsheetGrid, standardFeatures, serverSideFeature } from '@ishibashi0112/spreadsheet-grid/lite'
|
|
@@ -133,7 +133,7 @@ Astryx / Mantine / HeroUI v3 / shadcn/ui の中で使うときは、`style.css`
|
|
|
133
133
|
|
|
134
134
|
### バンドルを小さくする: `/lite`(0.54.0 から)
|
|
135
135
|
|
|
136
|
-
`SpreadsheetGrid` は全機能入りです(初期読み込みの JS が約
|
|
136
|
+
`SpreadsheetGrid` は全機能入りです(初期読み込みの JS が約 194KB gzip)。`/lite` の入口では、渡した機能だけを入れたグリッドを作れます。渡さなかった機能はバンドルに入りません(機能なしで約 104KB、プリセット `standardFeatures` で約 129KB)。
|
|
137
137
|
|
|
138
138
|
```tsx
|
|
139
139
|
import { createSpreadsheetGrid, standardFeatures, serverSideFeature } from '@ishibashi0112/spreadsheet-grid/lite'
|
|
@@ -30,6 +30,7 @@ type CellEditorLayerProps<T> = {
|
|
|
30
30
|
slots?: GridResolvedSlots;
|
|
31
31
|
onCommit: (value: unknown, direction?: EditorCommitDirection, option?: GridSelectEditorOption, forwardText?: string) => EditorCommitResult | void;
|
|
32
32
|
onCancel: () => void;
|
|
33
|
+
onCommitToSelection?: ((value: unknown) => EditorCommitResult | void) | undefined;
|
|
33
34
|
SearchSelectEditor?: typeof SearchSelectCellEditor | undefined;
|
|
34
35
|
onRegisterFlush?: ((flush: (() => void) | null) => void) | undefined;
|
|
35
36
|
onRegisterLateCommit?: ((receiver: LateEditCommitReceiver) => () => void) | undefined;
|
|
@@ -37,6 +38,7 @@ type CellEditorLayerProps<T> = {
|
|
|
37
38
|
enterMove?: EditorEnterMove;
|
|
38
39
|
domId?: string;
|
|
39
40
|
alignTop?: boolean;
|
|
41
|
+
leadingInset?: string | undefined;
|
|
40
42
|
};
|
|
41
|
-
export declare function CellEditorLayer<T>({ rect, headerHeight, leadingWidth, baseOffset, initialValue, editor, editorSession, themeClassName, slots, onCommit, onCancel, onRegisterFlush, onRegisterLateCommit, SearchSelectEditor, align, enterMove, domId, alignTop, }: CellEditorLayerProps<T>): import("react").JSX.Element | null;
|
|
43
|
+
export declare function CellEditorLayer<T>({ rect, headerHeight, leadingWidth, baseOffset, initialValue, editor, editorSession, themeClassName, slots, onCommit, onCancel, onCommitToSelection, onRegisterFlush, onRegisterLateCommit, SearchSelectEditor, align, enterMove, domId, alignTop, leadingInset, }: CellEditorLayerProps<T>): import("react").JSX.Element | null;
|
|
42
44
|
export default CellEditorLayer;
|
package/dist/GridShell.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { SpreadsheetGridProps } from './model/gridTypes.js';
|
|
2
2
|
import type { GridShellFeatures } from './features/types.js';
|
|
3
|
-
export declare function useGridShell<T extends object>({ rows: rowsProp, dataSource, serverSideRefreshToken, serverSideRefetch, onServerSideLoadError, onServerSideWriteError, columns: columnsProp, onRowsChange, onColumnsChange, rowKeyGetter, isRowExportable, createRow, createOverflowColumn, onPasteSkipped, pasteFillsSelection, rowHeight: rowHeightProp, autoHeight, estimateRowHeight, verticalAlign, headerHeight: headerHeightProp, density, theme, motion, popupContainer, animateRows, showCopyRange, hoverHighlight, highlightChanges, showSaveStatus, rowDragMotion, columnDragMotion, find, onFindChange, rowHeaderWidth, height, maxHeight, readOnly, dimReadOnlyCells, canEditCell: canEditCellProp, enableUndoRedo, enableClearOnDelete, editorEnterMove, imeDirectInput, undoHistoryLimit, onUndoRedoStateChange, trackChanges, onChangesChange, enableRangeSelection, enableRowSelection, rowSelectionMode, enableSelectAllRows: enableSelectAllRowsProp, rowSelection: rowSelectionProp, selectedRowKeys: selectedRowKeysProp, onRowSelectionChange, enableGlobalFilter, globalFilterMatch, enableColumnFilter, renderFilterDateInput, getFilterOptions, enableSorting, manualFiltering, manualSorting, enableColumnResize, autoSizeColumns, showCellOverflowTooltip, showValidationMarks, enableRowHover, enableColumnHeaderHover, hoveredRowIndex: hoveredRowIndexProp, onHoveredRowChange, onCellClick, onCellDoubleClick, onActiveCellChange, enableColumnMenu, noMatchingRowsText, noRowsText, ariaLabel, showTopBar, showBottomBar, showTopBarSummary, showTopBarFilter, globalFilterPlaceholder, globalFilterIcon, localeText, showTopBarCounts, showBottomBarCounts, showSelectionAggregates, showFilterChipBar, renderTopBar, renderBottomBar, className, style, classNames, getRowClassName, detailRow, onExpandedDetailRowKeysChange, labelRow, totalRow, pinnedTopRows, pinnedBottomRows, pinnedBottomRowsPlacement, columnGroups: columnGroupsProp, columnGroupHeaderHeight: columnGroupHeaderHeightProp, onColumnGroupOpenChange, fillHandle, enableRowDrag, isRowDraggable, onRowMove, canDropRow, enableContextMenu, getContextMenuItems, onContextMenuOpen, scrollHint, ref, onStateChange, initialState, includeGroupingInState, activeCellFollows, onFiltersChange, onSortChange, onScroll, }: SpreadsheetGridProps<T>, features: GridShellFeatures): import("react").JSX.Element;
|
|
3
|
+
export declare function useGridShell<T extends object>({ rows: rowsProp, dataSource, serverSideRefreshToken, serverSideRefetch, onServerSideLoadError, onServerSideWriteError, columns: columnsProp, onRowsChange, onColumnsChange, rowKeyGetter, isRowExportable, createRow, createOverflowColumn, onPasteSkipped, pasteFillsSelection, excelShortcuts, newRow, rowHeight: rowHeightProp, autoHeight, estimateRowHeight, verticalAlign, headerHeight: headerHeightProp, density, theme, motion, popupContainer, animateRows, showCopyRange, hoverHighlight, highlightChanges, showSaveStatus, rowDragMotion, columnDragMotion, find, onFindChange, rowHeaderWidth, height, maxHeight, readOnly, dimReadOnlyCells, canEditCell: canEditCellProp, enableUndoRedo, enableClearOnDelete, editorEnterMove, imeDirectInput, undoHistoryLimit, onUndoRedoStateChange, trackChanges, onChangesChange, enableRangeSelection, enableRowSelection, rowSelectionMode, enableSelectAllRows: enableSelectAllRowsProp, rowSelection: rowSelectionProp, selectedRowKeys: selectedRowKeysProp, onRowSelectionChange, enableGlobalFilter, globalFilterMatch, enableColumnFilter, renderFilterDateInput, getFilterOptions, enableSorting, manualFiltering, manualSorting, enableColumnResize, autoSizeColumns, showCellOverflowTooltip, showValidationMarks, enableRowHover, enableColumnHeaderHover, hoveredRowIndex: hoveredRowIndexProp, onHoveredRowChange, onCellClick, onCellDoubleClick, onActiveCellChange, enableColumnMenu, noMatchingRowsText, noRowsText, ariaLabel, showTopBar, showBottomBar, showTopBarSummary, showTopBarFilter, globalFilterPlaceholder, globalFilterIcon, localeText, showTopBarCounts, showBottomBarCounts, showSelectionAggregates, showFilterChipBar, renderTopBar, renderBottomBar, className, style, classNames, getRowClassName, detailRow, onExpandedDetailRowKeysChange, labelRow, totalRow, pinnedTopRows, pinnedBottomRows, pinnedBottomRowsPlacement, columnGroups: columnGroupsProp, columnGroupHeaderHeight: columnGroupHeaderHeightProp, onColumnGroupOpenChange, treeData, onTreeRowOpenChange, fillHandle, enableRowDrag, isRowDraggable, onRowMove, canDropRow, enableContextMenu, getContextMenuItems, onContextMenuOpen, scrollHint, ref, onStateChange, initialState, includeGroupingInState, activeCellFollows, onFiltersChange, onSortChange, onScroll, }: SpreadsheetGridProps<T>, features: GridShellFeatures): import("react").JSX.Element;
|
package/dist/common.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export { numberFormatter } from '@ishibashi0112/spreadsheet-grid-core/internal/l
|
|
|
2
2
|
export { numberParser } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/valueParsers';
|
|
3
3
|
export { restoreColumnsFromState } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/gridState';
|
|
4
4
|
export { preloadGridPopups } from './view/lazyPopups.js';
|
|
5
|
-
export type { SpreadsheetGridProps, GridColumn, GridColumnPinned, GridColumnEditor, EditorCommitDirection, EditorEnterMove, CellEditorContext, GridSelectEditorOption, GridSelectLoadOptionsParams, GridSelectFillRowContext, GridValidationMode, CellValidationContext, CellValidationResult, GridInvalidCell, EditorCommitResult, GridChanges, GridChangedRow, GridChangesSummary, GridChangesSavedTarget, GridRowKey, GridAggFuncName, GridAggFuncParams, GridAggFunc, GridGroupRow, GridSelectFilterOption, GetFilterOptionsParams, GetFilterOptionsResult, ColumnFilterTypeOption, ColumnFilterUiType, CellRenderContext, HeaderRenderContext, GridColumnGroup, GridColumnGroupCollapsible, ColumnGroupHeaderRenderContext, ColumnGroupOpenChangeParams, GridExportColumnGroup, CellStyleContext, CanEditCellContext, GridConditionalFormat, RowStyleContext, DetailRowOptions, GridClassNames, GridSlotProps, GridFrameworkTypes, ReactGridTypes, DetailRowRenderContext, CellDetailContext, LabelRowOptions, LabelRowRenderContext, GridLabelRow, LabelRowSortMode, TotalRowOptions, TotalRowCellContext, TotalRowCellKind, FillHandleOptions, GridFillValueParams, GridFillDirection, GridFillKind, RowDragContext, RowMoveParams, RowDropParams, GridCellRef, GridCellEventParams, GridCellDoubleClickParams, CellValueFormatter, CellValueFormatterParams, SpreadsheetGridSlotContext, SpreadsheetGridDerivedSummary, SpreadsheetGridSelectionStats, GridLocaleText, GridLocaleTextTemplate, GridVerticalAlign, GridTextEditorEnterKey, GlobalFilterStatus, GridSelectionAggregates, CellCoord, CellRange, GridSelection, GridSortState, GridSortEntry, GridSortDirection, ColumnFilterValue, GridFilterState, SetColumnFilterValue, NumberColumnFilterValue, NumberSetColumnFilterValue, ParsedNumberFilter, TextSetColumnFilterValue, ParsedTextFilter, DateSetColumnFilterValue, ParsedDateFilter, DateFilterPreset, DateFilterPresetOption, CustomDateFilterPreset, DateFilterPresetRange, FilterDateInputContext, TextColumnFilterValue, DateColumnFilterValue, SelectColumnFilterValue, CustomColumnFilterValue, ServerSideDataSource, ServerSideQuery, ServerSideGetRowsParams, ServerSideGetRowsResult, ServerSideLoadErrorParams, ServerSideCellChange, ServerSideRowUpdate, ServerSideUpdateRowsParams, ServerSideUpdateRowsResult, ServerSideWriteErrorParams, RowModel, SpreadsheetGridHandle, RowSelectionModel, RowSelectionMode, ScrollAlign, GridScrollPosition, GridScrollEventParams, CsvExportScope, CsvExportOptions, GridExportOptions, GridExportCell, GridExportData, GridState, GridStatePatch, GridColumnState, GridDensity, GridTheme, UndoRedoState, GridMotion, GridPopupContainer, GridGlobalFilterMatch, GridPasteSkippedCell, GridPasteSkippedParams, GridApplyRowsOptions, GridPinnedRowPosition, FindOptions, FindChangeParams, GridDataBarFormat, GridColorScaleFormat, GridChipTone, GridChipSpec, GridChipMap, AutoSizeColumnsMode, GridContextMenuTarget, GridContextMenuParams, GridContextMenuItem, GridContextMenuActionItem, GridContextMenuLabelItem, GridContextMenuSeparatorItem, GridContextMenuCustomItem, ScrollHintOptions, ScrollHintTrigger, ScrollHintRenderArgs, } from './model/gridTypes.js';
|
|
5
|
+
export type { SpreadsheetGridProps, GridColumn, GridColumnPinned, GridColumnEditor, EditorCommitDirection, EditorEnterMove, CellEditorContext, GridSelectEditorOption, GridSelectLoadOptionsParams, GridSelectFillRowContext, GridValidationMode, CellValidationContext, CellValidationResult, GridInvalidCell, EditorCommitResult, GridChanges, GridChangedRow, GridChangesSummary, GridChangesSavedTarget, GridAddedRow, GridRemovedRow, GridTrackChangesOptions, GridTreeDataOptions, GridTreeRow, CellTreeContext, CellTreeState, TreeRowOpenChangeParams, GridRevealRowOptions, GridRowKey, GridAggFuncName, GridAggFuncParams, GridAggFunc, GridGroupRow, GridSelectFilterOption, GetFilterOptionsParams, GetFilterOptionsResult, ColumnFilterTypeOption, ColumnFilterUiType, CellRenderContext, HeaderRenderContext, GridColumnGroup, GridColumnGroupCollapsible, ColumnGroupHeaderRenderContext, ColumnGroupOpenChangeParams, GridExportColumnGroup, CellStyleContext, CanEditCellContext, GridConditionalFormat, RowStyleContext, DetailRowOptions, GridClassNames, GridSlotProps, GridFrameworkTypes, ReactGridTypes, DetailRowRenderContext, CellDetailContext, LabelRowOptions, LabelRowRenderContext, GridLabelRow, LabelRowSortMode, TotalRowOptions, TotalRowCellContext, TotalRowCellKind, FillHandleOptions, GridFillValueParams, GridFillDirection, GridFillKind, RowDragContext, RowMoveParams, RowDropParams, GridCellRef, GridCellEventParams, GridCellDoubleClickParams, CellValueFormatter, CellValueFormatterParams, SpreadsheetGridSlotContext, SpreadsheetGridDerivedSummary, SpreadsheetGridSelectionStats, GridLocaleText, GridLocaleTextTemplate, GridVerticalAlign, GridTextEditorEnterKey, GlobalFilterStatus, GridSelectionAggregates, CellCoord, CellRange, GridSelection, GridSortState, GridSortEntry, GridSortDirection, ColumnFilterValue, GridFilterState, SetColumnFilterValue, NumberColumnFilterValue, NumberSetColumnFilterValue, ParsedNumberFilter, TextSetColumnFilterValue, ParsedTextFilter, DateSetColumnFilterValue, ParsedDateFilter, DateFilterPreset, DateFilterPresetOption, CustomDateFilterPreset, DateFilterPresetRange, FilterDateInputContext, TextColumnFilterValue, DateColumnFilterValue, SelectColumnFilterValue, CustomColumnFilterValue, ServerSideDataSource, ServerSideQuery, ServerSideGetRowsParams, ServerSideGetRowsResult, ServerSideLoadErrorParams, ServerSideCellChange, ServerSideRowUpdate, ServerSideUpdateRowsParams, ServerSideUpdateRowsResult, ServerSideWriteErrorParams, RowModel, SpreadsheetGridHandle, RowSelectionModel, RowSelectionMode, ScrollAlign, GridScrollPosition, GridScrollEventParams, CsvExportScope, CsvExportOptions, GridExportOptions, GridExportCell, GridExportData, GridState, GridStatePatch, GridColumnState, GridDensity, GridTheme, UndoRedoState, GridMotion, GridPopupContainer, GridGlobalFilterMatch, GridPasteSkippedCell, GridPasteSkippedParams, GridExcelShortcutsOptions, GridNewRowOptions, GridApplyRowsOptions, GridPinnedRowPosition, FindOptions, FindChangeParams, GridDataBarFormat, GridColorScaleFormat, GridChipTone, GridChipSpec, GridChipMap, AutoSizeColumnsMode, GridContextMenuTarget, GridContextMenuParams, GridContextMenuItem, GridContextMenuActionItem, GridContextMenuLabelItem, GridContextMenuSeparatorItem, GridContextMenuCustomItem, ScrollHintOptions, ScrollHintTrigger, ScrollHintRenderArgs, } from './model/gridTypes.js';
|
|
6
6
|
export type { NumberFormatterOptions } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/valueFormatters';
|
|
7
7
|
export type { NumberParserOptions } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/valueParsers';
|
|
@@ -5,11 +5,12 @@ type DateCellEditorProps = {
|
|
|
5
5
|
initialText?: string;
|
|
6
6
|
onCommit: (value: unknown, direction?: EditorCommitDirection) => EditorCommitResult | void;
|
|
7
7
|
onCancel: () => void;
|
|
8
|
+
onCommitToSelection?: ((value: unknown) => EditorCommitResult | void) | undefined;
|
|
8
9
|
onRegisterFlush?: ((flush: (() => void) | null) => void) | undefined;
|
|
9
10
|
align?: 'left' | 'center' | 'right';
|
|
10
11
|
enterMove?: EditorEnterMove;
|
|
11
12
|
cellHeight?: number;
|
|
12
13
|
alignTop?: boolean;
|
|
13
14
|
};
|
|
14
|
-
export declare function DateCellEditor({ ariaLabel, initialValue, initialText, onCommit, onCancel, onRegisterFlush, align, enterMove, cellHeight, alignTop, }: DateCellEditorProps): import("react").JSX.Element;
|
|
15
|
+
export declare function DateCellEditor({ ariaLabel, initialValue, initialText, onCommit, onCancel, onCommitToSelection, onRegisterFlush, align, enterMove, cellHeight, alignTop, }: DateCellEditorProps): import("react").JSX.Element;
|
|
15
16
|
export default DateCellEditor;
|
|
@@ -7,11 +7,12 @@ type NumberCellEditorProps = {
|
|
|
7
7
|
step?: number;
|
|
8
8
|
onCommit: (value: unknown, direction?: EditorCommitDirection) => EditorCommitResult | void;
|
|
9
9
|
onCancel: () => void;
|
|
10
|
+
onCommitToSelection?: ((value: unknown) => EditorCommitResult | void) | undefined;
|
|
10
11
|
onRegisterFlush?: ((flush: (() => void) | null) => void) | undefined;
|
|
11
12
|
align?: 'left' | 'center' | 'right';
|
|
12
13
|
enterMove?: EditorEnterMove;
|
|
13
14
|
cellHeight?: number;
|
|
14
15
|
alignTop?: boolean;
|
|
15
16
|
};
|
|
16
|
-
export declare function NumberCellEditor({ ariaLabel, initialValue, min, max, step, onCommit, onCancel, onRegisterFlush, align, enterMove, cellHeight, alignTop, }: NumberCellEditorProps): import("react").JSX.Element;
|
|
17
|
+
export declare function NumberCellEditor({ ariaLabel, initialValue, min, max, step, onCommit, onCancel, onCommitToSelection, onRegisterFlush, align, enterMove, cellHeight, alignTop, }: NumberCellEditorProps): import("react").JSX.Element;
|
|
17
18
|
export default NumberCellEditor;
|
|
@@ -9,6 +9,7 @@ export type SearchSelectCellEditorProps = {
|
|
|
9
9
|
load?: SearchSelectLoad | undefined;
|
|
10
10
|
onCommit: (value: unknown, direction?: EditorCommitDirection, option?: GridSelectEditorOption, forwardText?: string) => EditorCommitResult | void;
|
|
11
11
|
onCancel: () => void;
|
|
12
|
+
onCommitToSelection?: ((value: unknown) => EditorCommitResult | void) | undefined;
|
|
12
13
|
onRegisterFlush?: ((flush: (() => void) | null) => void) | undefined;
|
|
13
14
|
align?: 'left' | 'center' | 'right' | undefined;
|
|
14
15
|
themeClassName?: string | undefined;
|
|
@@ -20,5 +21,5 @@ export type SearchSelectCellEditorProps = {
|
|
|
20
21
|
cellHeight?: number | undefined;
|
|
21
22
|
alignTop?: boolean | undefined;
|
|
22
23
|
};
|
|
23
|
-
export declare function SearchSelectCellEditor({ ariaLabel, options, value, displayText, allowFreeText, load, onCommit, onCancel, onRegisterFlush, align, themeClassName, popoverSlot, enterMove, initialText, cellTop, cellLeft, cellHeight, alignTop, }: SearchSelectCellEditorProps): import("react").JSX.Element;
|
|
24
|
+
export declare function SearchSelectCellEditor({ ariaLabel, options, value, displayText, allowFreeText, load, onCommit, onCancel, onCommitToSelection, onRegisterFlush, align, themeClassName, popoverSlot, enterMove, initialText, cellTop, cellLeft, cellHeight, alignTop, }: SearchSelectCellEditorProps): import("react").JSX.Element;
|
|
24
25
|
export default SearchSelectCellEditor;
|
|
@@ -6,6 +6,7 @@ type SelectCellEditorProps = {
|
|
|
6
6
|
value: unknown;
|
|
7
7
|
onCommit: (value: unknown, direction?: EditorCommitDirection, option?: GridSelectEditorOption) => EditorCommitResult | void;
|
|
8
8
|
onCancel: () => void;
|
|
9
|
+
onCommitToSelection?: ((value: unknown) => EditorCommitResult | void) | undefined;
|
|
9
10
|
onRegisterFlush?: ((flush: (() => void) | null) => void) | undefined;
|
|
10
11
|
align?: 'left' | 'center' | 'right';
|
|
11
12
|
themeClassName?: string;
|
|
@@ -17,5 +18,5 @@ type SelectCellEditorProps = {
|
|
|
17
18
|
cellHeight?: number;
|
|
18
19
|
alignTop?: boolean;
|
|
19
20
|
};
|
|
20
|
-
export declare function SelectCellEditor({ ariaLabel, options, value, onCommit, onCancel, onRegisterFlush, align, themeClassName, popoverSlot, enterMove, initialText, cellHeight, alignTop, cellTop, cellLeft, }: SelectCellEditorProps): import("react").JSX.Element;
|
|
21
|
+
export declare function SelectCellEditor({ ariaLabel, options, value, onCommit, onCancel, onCommitToSelection, onRegisterFlush, align, themeClassName, popoverSlot, enterMove, initialText, cellHeight, alignTop, cellTop, cellLeft, }: SelectCellEditorProps): import("react").JSX.Element;
|
|
21
22
|
export default SelectCellEditor;
|
|
@@ -4,6 +4,7 @@ type TextCellEditorProps = {
|
|
|
4
4
|
initialValue: string;
|
|
5
5
|
onCommit: (value: unknown, direction?: EditorCommitDirection) => EditorCommitResult | void;
|
|
6
6
|
onCancel: () => void;
|
|
7
|
+
onCommitToSelection?: ((value: unknown) => EditorCommitResult | void) | undefined;
|
|
7
8
|
onRegisterFlush?: ((flush: (() => void) | null) => void) | undefined;
|
|
8
9
|
align?: 'left' | 'center' | 'right';
|
|
9
10
|
enterMove?: EditorEnterMove;
|
|
@@ -14,5 +15,5 @@ type TextCellEditorProps = {
|
|
|
14
15
|
lineBreak?: string;
|
|
15
16
|
alignTop?: boolean;
|
|
16
17
|
};
|
|
17
|
-
export declare function TextCellEditor({ ariaLabel, initialValue, onCommit, onCancel, onRegisterFlush, align, enterMove, multiline, enterKey, cellHeight, wordBreak, lineBreak, alignTop, }: TextCellEditorProps): import("react").JSX.Element;
|
|
18
|
+
export declare function TextCellEditor({ ariaLabel, initialValue, onCommit, onCancel, onCommitToSelection, onRegisterFlush, align, enterMove, multiline, enterKey, cellHeight, wordBreak, lineBreak, alignTop, }: TextCellEditorProps): import("react").JSX.Element;
|
|
18
19
|
export default TextCellEditor;
|
package/dist/features/types.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import type { DateRolloverStore } from '@ishibashi0112/spreadsheet-grid-core/int
|
|
|
12
12
|
import type { RowOrder } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/filtering';
|
|
13
13
|
import type { buildRevertMenuItems, describeUnsavedCell, formatUnsavedSummary } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/changeTracking';
|
|
14
14
|
import type { ResolvedGridLocaleText } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText';
|
|
15
|
+
import type { resolveNewRowPlaceholder } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/newRow';
|
|
15
16
|
import type { GridUiAction } from '@ishibashi0112/spreadsheet-grid-core/internal/model/gridActions';
|
|
16
17
|
import type { ColumnPane, GridPaneLayout } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/geometry';
|
|
17
18
|
import type { DetailRowExtra, RowMetrics } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/verticalGeometry';
|
|
@@ -22,6 +23,7 @@ import type { GridTotalRow } from '../view/GridTotalRow.js';
|
|
|
22
23
|
import type { GridPinnedRows } from '../view/GridPinnedRows.js';
|
|
23
24
|
import type { GridColumnGroupHeader } from '../view/GridColumnGroupHeader.js';
|
|
24
25
|
import type { SearchSelectCellEditor } from '../editors/SearchSelectCellEditor.js';
|
|
26
|
+
import type { GridTreeAggregateValue, GridTreeCellPrefix } from '../view/GridTreeCell.js';
|
|
25
27
|
import type { GridBodyLabelRow } from '../view/GridBodyLabelRow.js';
|
|
26
28
|
import type { GridBodyGroupRow } from '../view/GridBodyGroupRow.js';
|
|
27
29
|
import type { GridStickyLabelLayer } from '../view/GridStickyLabelLayer.js';
|
|
@@ -282,6 +284,14 @@ export type ReactGridFeatures = {
|
|
|
282
284
|
formatUnsavedSummary: typeof formatUnsavedSummary;
|
|
283
285
|
buildRevertMenuItems: typeof buildRevertMenuItems;
|
|
284
286
|
} | undefined;
|
|
287
|
+
excelShortcuts?: NonNullable<GridCoreFeatures['excelShortcuts']> | undefined;
|
|
288
|
+
newRow?: NonNullable<GridCoreFeatures['newRow']> & FeatureLocaleDefaults & {
|
|
289
|
+
resolveNewRowPlaceholder: typeof resolveNewRowPlaceholder;
|
|
290
|
+
} | undefined;
|
|
291
|
+
treeData?: NonNullable<GridCoreFeatures['treeData']> & FeatureLocaleDefaults & {
|
|
292
|
+
TreeCellPrefix: typeof GridTreeCellPrefix;
|
|
293
|
+
TreeAggregateValue: typeof GridTreeAggregateValue;
|
|
294
|
+
} | undefined;
|
|
285
295
|
conditionalFormat?: NonNullable<GridCoreFeatures['conditionalFormat']> & ConditionalFormatCellResolvers & {
|
|
286
296
|
resolveChipSpec: typeof resolveChipSpec;
|
|
287
297
|
GridChip: typeof GridChip;
|
|
@@ -3,6 +3,7 @@ import { type ClipboardControllerArgs } from '@ishibashi0112/spreadsheet-grid-co
|
|
|
3
3
|
export declare const useGridClipboardController: <T extends object>(args: ClipboardControllerArgs<T>) => {
|
|
4
4
|
isWholeGridSelected: boolean;
|
|
5
5
|
handleCopy: () => Promise<void>;
|
|
6
|
+
handleCut: () => Promise<void>;
|
|
6
7
|
handlePaste: (event: ClipboardEvent<HTMLDivElement>) => void;
|
|
7
8
|
};
|
|
8
9
|
export default useGridClipboardController;
|
|
@@ -2,6 +2,6 @@ import { type GridStore, type GridViewState, type Updater } from '@ishibashi0112
|
|
|
2
2
|
import type { GridUiState } from '../model/gridTypes.js';
|
|
3
3
|
export declare function useGridStore(store: GridStore): [GridUiState, GridStore['dispatch']];
|
|
4
4
|
export type GridViewStateSetters = {
|
|
5
|
-
[K in Exclude<keyof GridViewState, 'maxBodyPx'> as `set${Capitalize<K>}`]-?: (next: Updater<Exclude<GridViewState[K], undefined>>) => void;
|
|
5
|
+
[K in Exclude<keyof GridViewState, 'maxBodyPx' | 'newRowDraft'> as `set${Capitalize<K>}`]-?: (next: Updater<Exclude<GridViewState[K], undefined>>) => void;
|
|
6
6
|
};
|
|
7
7
|
export declare function useGridViewState(store: GridStore): [GridViewState, GridViewStateSetters];
|