@ishibashi0112/spreadsheet-grid 1.0.2 → 1.2.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 +277 -81
- package/README.md +1 -1
- package/dist/ColumnFilterPopover-BEZ0T7Qo.cjs +1 -0
- package/dist/ColumnFilterPopover-CnocXZZn.js +1056 -0
- package/dist/GridShell.d.ts +1 -1
- package/dist/common.d.ts +3 -1
- package/dist/editors/DateCellEditor.d.ts +3 -1
- package/dist/editors/NumberCellEditor.d.ts +3 -1
- package/dist/editors/SelectCellEditor.d.ts +3 -1
- package/dist/editors/useTopAlignedInput.d.ts +2 -0
- package/dist/features/pinnedRows.d.ts +2 -0
- package/dist/features/types.d.ts +22 -4
- package/dist/hooks/useCellContextMenuController.d.ts +1 -1
- package/dist/hooks/useGridHistoryController.d.ts +1 -0
- package/dist/hooks/useGridViewportSync.d.ts +1 -1
- package/dist/hooks/usePortalTokens.d.ts +6 -1
- package/dist/index.cjs +7 -7
- package/dist/index.js +3626 -3218
- package/dist/lite/CheckboxCell-BBzjMEcs.cjs +1 -0
- package/dist/lite/CheckboxCell-DAGCJJkg.js +40 -0
- package/dist/lite/ColumnFilterPopover-BUCdIETo.cjs +1 -0
- package/dist/lite/ColumnFilterPopover-ulqfKfmD.js +1056 -0
- package/dist/lite/columnMenu-B_8gLraV.js +396 -0
- package/dist/lite/columnMenu-CBAvHYIy.cjs +1 -0
- package/dist/lite/contextMenu-B6cpSlFr.js +168 -0
- package/dist/lite/contextMenu-VLz_wVlY.cjs +1 -0
- package/dist/lite/createSpreadsheetGrid-BrOy7MJY.cjs +7 -0
- package/dist/lite/createSpreadsheetGrid-D-A1zUTb.js +4766 -0
- package/dist/lite/createSpreadsheetGrid.cjs +1 -1
- package/dist/lite/createSpreadsheetGrid.js +1 -1
- package/dist/lite/features/columnMenu.cjs +1 -1
- package/dist/lite/features/columnMenu.js +1 -1
- package/dist/lite/features/contextMenu.cjs +1 -1
- package/dist/lite/features/contextMenu.js +1 -1
- package/dist/lite/features/fillHandle.cjs +1 -1
- package/dist/lite/features/fillHandle.js +1 -1
- package/dist/lite/features/filtering.cjs +1 -1
- package/dist/lite/features/filtering.js +1 -1
- package/dist/lite/features/grouping.cjs +1 -1
- package/dist/lite/features/grouping.js +1 -1
- package/dist/lite/features/labelRow.cjs +1 -1
- package/dist/lite/features/labelRow.js +1 -1
- package/dist/lite/features/pinnedRows.cjs +1 -0
- package/dist/lite/features/pinnedRows.js +2 -0
- package/dist/lite/features/rowDrag.cjs +1 -1
- package/dist/lite/features/rowDrag.js +1 -1
- package/dist/lite/features/standard.cjs +1 -1
- package/dist/lite/features/standard.js +3 -3
- package/dist/lite/features/toolPanel.cjs +1 -1
- package/dist/lite/features/toolPanel.js +1 -1
- package/dist/lite/features/totalRow.cjs +1 -1
- package/dist/lite/features/totalRow.js +1 -1
- package/dist/lite/fillHandle-CHJESnrk.cjs +1 -0
- package/dist/lite/fillHandle-CzA_uxgV.js +326 -0
- package/dist/lite/{filtering-D7E6KUld.js → filtering-CC_aBJ_K.js} +131 -131
- package/dist/lite/filtering-CGAgUfF0.cjs +1 -0
- package/dist/lite/grouping-DKYPOjCk.cjs +1 -0
- package/dist/lite/{grouping-B6mO2bSd.js → grouping-u4J8Rl0V.js} +36 -34
- package/dist/lite/{labelRow-C9mLsqiB.js → labelRow-l9spGw-3.js} +20 -21
- package/dist/lite/labelRow-rhK34_qd.cjs +1 -0
- package/dist/lite/{lazyPopups-D0tOufrR.cjs → lazyPopups-B0DhlAYW.cjs} +1 -1
- package/dist/lite/{lazyPopups-CoX4Zxvb.js → lazyPopups-C7Y7Kx8w.js} +1 -1
- package/dist/lite/pinnedRows-BtvLVkLa.js +143 -0
- package/dist/lite/pinnedRows-CBgirKjW.cjs +1 -0
- package/dist/lite/rowDrag-D17wXvSj.cjs +1 -0
- package/dist/lite/rowDrag-WVJUKKL8.js +157 -0
- package/dist/lite/{toolPanel-DcQrkZzk.js → toolPanel-DXG3w8Zp.js} +1 -1
- package/dist/lite/{toolPanel-BkdryfVw.cjs → toolPanel-H94h6g2U.cjs} +1 -1
- package/dist/lite/toolPanelViews-C4qswcP_.cjs +1 -0
- package/dist/lite/toolPanelViews-DwUa6rm1.js +689 -0
- package/dist/lite/{totalRow-BWxSeHGg.js → totalRow-Btq5XqtJ.js} +12 -10
- package/dist/lite/totalRow-CPe9CVv6.cjs +1 -0
- package/dist/lite/usePortalTokens-CUAiwfmK.cjs +1 -0
- package/dist/lite/usePortalTokens-hsX2T3ep.js +32 -0
- package/dist/lite.cjs +1 -1
- package/dist/lite.d.ts +1 -0
- package/dist/lite.js +22 -20
- package/dist/style.css +1 -1
- package/dist/style.layer.css +1 -1
- package/dist/themes/astryx.css +3 -1
- package/dist/themes/heroui.css +3 -1
- package/dist/themes/mantine.css +3 -1
- package/dist/themes/shadcn.css +3 -1
- package/dist/toolPanelViews-CKKThiAQ.cjs +1 -0
- package/dist/toolPanelViews-DCpqVIEd.js +689 -0
- package/dist/useGridLocaleText-BV4EomZe.cjs +1 -0
- package/dist/useGridLocaleText-Drud4qg0.js +49 -0
- package/dist/{usePopupLocaleText-u-9PpBon.js → usePopupLocaleText-DJN10Asc.js} +1 -1
- package/dist/{usePopupLocaleText-BAn7AGEy.cjs → usePopupLocaleText-lEFHqTvJ.cjs} +1 -1
- package/dist/{useVirtualizerCore-BubgiDzY.js → useVirtualizerCore-C1k6Aw8p.js} +1 -1
- package/dist/{useVirtualizerCore-DTzCVMhF.cjs → useVirtualizerCore-Cif7t8mS.cjs} +1 -1
- package/dist/view/CellContextMenuPopover.d.ts +2 -1
- package/dist/view/DefaultGridTopBar.d.ts +2 -1
- package/dist/view/FillHandleLayer.d.ts +1 -1
- package/dist/view/GridBodyGroupRow.d.ts +2 -1
- package/dist/view/GridBodyLabelRow.d.ts +2 -1
- package/dist/view/GridBodyLayer.d.ts +2 -1
- package/dist/view/GridPinnedRows.d.ts +29 -0
- package/dist/view/GridTotalRow.d.ts +2 -1
- package/package.json +2 -2
- package/skills/spreadsheet-grid/SKILL.md +5 -1
- package/dist/ColumnFilterPopover-BEeU4H00.cjs +0 -1
- package/dist/ColumnFilterPopover-CTJGE2vR.js +0 -1054
- package/dist/lite/ColumnFilterPopover-B0Ry9U-4.cjs +0 -1
- package/dist/lite/ColumnFilterPopover-D87ZPNhR.js +0 -1054
- package/dist/lite/columnMenu-C8LMgSDh.cjs +0 -1
- package/dist/lite/columnMenu-DImtqeXz.js +0 -351
- package/dist/lite/contextMenu-B6c_gXfn.cjs +0 -1
- package/dist/lite/contextMenu-C2IbM5fN.js +0 -137
- package/dist/lite/createSpreadsheetGrid-DfL9QD8j.cjs +0 -7
- package/dist/lite/createSpreadsheetGrid-Vysclx0F.js +0 -4614
- package/dist/lite/fillHandle-C7rhbEAc.js +0 -321
- package/dist/lite/fillHandle-DufUH_57.cjs +0 -1
- package/dist/lite/filtering-cR2EpvA4.cjs +0 -1
- package/dist/lite/grouping-wPCuEmD1.cjs +0 -1
- package/dist/lite/labelRow-D434smUt.cjs +0 -1
- package/dist/lite/rowDrag-BDYMGwvB.js +0 -140
- package/dist/lite/rowDrag-E2YahPwG.cjs +0 -1
- package/dist/lite/toolPanelViews-B-QP_ZDZ.cjs +0 -1
- package/dist/lite/toolPanelViews-Dllz41nc.js +0 -669
- package/dist/lite/totalRow-D4nvpUwD.cjs +0 -1
- package/dist/lite/usePortalTokens-BVnykmkk.cjs +0 -1
- package/dist/lite/usePortalTokens-mFOziRD2.js +0 -19
- package/dist/toolPanelViews-DwlD9m4j.js +0 -669
- package/dist/toolPanelViews-Qnzjs5wF.cjs +0 -1
- package/dist/useGridLocaleText-B4ZVUbqa.js +0 -36
- package/dist/useGridLocaleText-D74sCoAT.cjs +0 -1
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, onServerSideLoadError, onServerSideWriteError, columns: columnsProp, onRowsChange, onColumnsChange, rowKeyGetter, isRowExportable, createRow, createOverflowColumn, rowHeight: rowHeightProp, autoHeight, estimateRowHeight, verticalAlign, headerHeight: headerHeightProp, density, theme, motion, animateRows, showCopyRange, hoverHighlight, highlightChanges, showSaveStatus, rowDragMotion, columnDragMotion, find, onFindChange, rowHeaderWidth, height, maxHeight, readOnly, dimReadOnlyCells, canEditCell: canEditCellProp, enableUndoRedo, enableClearOnDelete, editorEnterMove, imeDirectInput, undoHistoryLimit, onUndoRedoStateChange, enableRangeSelection, enableRowSelection, rowSelectionMode, enableSelectAllRows: enableSelectAllRowsProp, rowSelection: rowSelectionProp, selectedRowKeys: selectedRowKeysProp, onRowSelectionChange, enableGlobalFilter, 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, fillHandle, enableRowDrag, isRowDraggable, onRowMove, enableContextMenu, getContextMenuItems, onContextMenuOpen, scrollHint, ref, onStateChange, initialState, onFiltersChange, onSortChange, onScroll, }: SpreadsheetGridProps<T>, features: GridShellFeatures): import("react").JSX.Element;
|
|
3
|
+
export declare function useGridShell<T extends object>({ rows: rowsProp, dataSource, serverSideRefreshToken, 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, 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, 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
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { numberFormatter } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/valueFormatters';
|
|
2
|
+
export { numberParser } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/valueParsers';
|
|
2
3
|
export { restoreColumnsFromState } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/gridState';
|
|
3
4
|
export { preloadGridPopups } from './view/lazyPopups.js';
|
|
4
|
-
export type { SpreadsheetGridProps, GridColumn, GridColumnPinned, GridColumnEditor, EditorCommitDirection, EditorEnterMove, CellEditorContext, GridSelectEditorOption, GridValidationMode, CellValidationContext, CellValidationResult, GridInvalidCell, EditorCommitResult, GridRowKey, GridAggFuncName, GridAggFuncParams, GridAggFunc, GridGroupRow, GridSelectFilterOption, GetFilterOptionsParams, GetFilterOptionsResult, ColumnFilterTypeOption, ColumnFilterUiType, CellRenderContext, HeaderRenderContext, CellStyleContext, CanEditCellContext, GridConditionalFormat, RowStyleContext, DetailRowOptions, GridClassNames, GridSlotProps, GridFrameworkTypes, ReactGridTypes, DetailRowRenderContext, CellDetailContext, LabelRowOptions, LabelRowRenderContext, GridLabelRow, LabelRowSortMode, TotalRowOptions, TotalRowCellContext, TotalRowCellKind, FillHandleOptions, GridFillValueParams, GridFillDirection, GridFillKind, RowDragContext, RowMoveParams, 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, 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, GridValidationMode, CellValidationContext, CellValidationResult, GridInvalidCell, EditorCommitResult, GridRowKey, GridAggFuncName, GridAggFuncParams, GridAggFunc, GridGroupRow, GridSelectFilterOption, GetFilterOptionsParams, GetFilterOptionsResult, ColumnFilterTypeOption, ColumnFilterUiType, CellRenderContext, HeaderRenderContext, 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
6
|
export type { NumberFormatterOptions } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/valueFormatters';
|
|
7
|
+
export type { NumberParserOptions } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/valueParsers';
|
|
@@ -7,6 +7,8 @@ type DateCellEditorProps = {
|
|
|
7
7
|
onCancel: () => void;
|
|
8
8
|
align?: 'left' | 'center' | 'right';
|
|
9
9
|
enterMove?: EditorEnterMove;
|
|
10
|
+
cellHeight?: number;
|
|
11
|
+
alignTop?: boolean;
|
|
10
12
|
};
|
|
11
|
-
export declare function DateCellEditor({ ariaLabel, initialValue, initialText, onCommit, onCancel, align, enterMove, }: DateCellEditorProps): import("react").JSX.Element;
|
|
13
|
+
export declare function DateCellEditor({ ariaLabel, initialValue, initialText, onCommit, onCancel, align, enterMove, cellHeight, alignTop, }: DateCellEditorProps): import("react").JSX.Element;
|
|
12
14
|
export default DateCellEditor;
|
|
@@ -9,6 +9,8 @@ type NumberCellEditorProps = {
|
|
|
9
9
|
onCancel: () => void;
|
|
10
10
|
align?: 'left' | 'center' | 'right';
|
|
11
11
|
enterMove?: EditorEnterMove;
|
|
12
|
+
cellHeight?: number;
|
|
13
|
+
alignTop?: boolean;
|
|
12
14
|
};
|
|
13
|
-
export declare function NumberCellEditor({ ariaLabel, initialValue, min, max, step, onCommit, onCancel, align, enterMove, }: NumberCellEditorProps): import("react").JSX.Element;
|
|
15
|
+
export declare function NumberCellEditor({ ariaLabel, initialValue, min, max, step, onCommit, onCancel, align, enterMove, cellHeight, alignTop, }: NumberCellEditorProps): import("react").JSX.Element;
|
|
14
16
|
export default NumberCellEditor;
|
|
@@ -11,6 +11,8 @@ type SelectCellEditorProps = {
|
|
|
11
11
|
popoverSlot?: GridResolvedSlot;
|
|
12
12
|
enterMove?: EditorEnterMove;
|
|
13
13
|
initialText?: string;
|
|
14
|
+
cellHeight?: number;
|
|
15
|
+
alignTop?: boolean;
|
|
14
16
|
};
|
|
15
|
-
export declare function SelectCellEditor({ ariaLabel, options, value, onCommit, onCancel, align, themeClassName, popoverSlot, enterMove, initialText, }: SelectCellEditorProps): import("react").JSX.Element;
|
|
17
|
+
export declare function SelectCellEditor({ ariaLabel, options, value, onCommit, onCancel, align, themeClassName, popoverSlot, enterMove, initialText, cellHeight, alignTop, }: SelectCellEditorProps): import("react").JSX.Element;
|
|
16
18
|
export default SelectCellEditor;
|
package/dist/features/types.d.ts
CHANGED
|
@@ -13,10 +13,11 @@ import type { ResolvedGridLocaleText } from '@ishibashi0112/spreadsheet-grid-cor
|
|
|
13
13
|
import type { GridUiAction } from '@ishibashi0112/spreadsheet-grid-core/internal/model/gridActions';
|
|
14
14
|
import type { ColumnPane, GridPaneLayout } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/geometry';
|
|
15
15
|
import type { DetailRowExtra, RowMetrics } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/verticalGeometry';
|
|
16
|
-
import type { CellCoord, ColumnFilterValue, GridColumn, GridContextMenuItem, GridContextMenuParams, GridResolvedSlots, GridSelection, GridSelectionAggregates, GridLocaleText, GridUiState, GlobalFilterStatus, RowModel, SpreadsheetGridProps } from '../model/gridTypes.js';
|
|
16
|
+
import type { CellCoord, ColumnFilterValue, GridColumn, GridContextMenuItem, GridContextMenuParams, GridResolvedSlots, GridSelection, GridSelectionAggregates, GridLocaleText, GridUiState, GlobalFilterStatus, GridGlobalFilterMatch, GridRowKey, RowModel, SpreadsheetGridProps } from '../model/gridTypes.js';
|
|
17
17
|
import type { GridFindBar } from '../view/GridFindBar.js';
|
|
18
18
|
import type { GridScrollHint } from '../view/GridScrollHint.js';
|
|
19
19
|
import type { GridTotalRow } from '../view/GridTotalRow.js';
|
|
20
|
+
import type { GridPinnedRows } from '../view/GridPinnedRows.js';
|
|
20
21
|
import type { GridBodyLabelRow } from '../view/GridBodyLabelRow.js';
|
|
21
22
|
import type { GridBodyGroupRow } from '../view/GridBodyGroupRow.js';
|
|
22
23
|
import type { GridStickyLabelLayer } from '../view/GridStickyLabelLayer.js';
|
|
@@ -51,6 +52,7 @@ export type FillHandleFeatureArgs<T> = {
|
|
|
51
52
|
scrollContainerRef: FillHandleControllerArgs<T>['scrollContainerRef'];
|
|
52
53
|
gridRootRef: FillHandleControllerArgs<T>['gridRootRef'];
|
|
53
54
|
footerHeight: number;
|
|
55
|
+
stickyTopHeight: number;
|
|
54
56
|
handleRowsChange: FillHandleControllerArgs<T>['applyRowsChange'];
|
|
55
57
|
amendRowsChange: FillHandleControllerArgs<T>['amendRowsChange'];
|
|
56
58
|
applyServerSideCellEdits: FillHandleControllerArgs<T>['applyServerSideCellEdits'];
|
|
@@ -79,6 +81,7 @@ export type FilterOrderFeatureArgs<T> = {
|
|
|
79
81
|
visibleColumns: GridColumn<T>[];
|
|
80
82
|
effectiveColumns: GridColumn<T>[];
|
|
81
83
|
globalFilterText: string;
|
|
84
|
+
globalFilterMatch?: GridGlobalFilterMatch | undefined;
|
|
82
85
|
globalFilterUrgent?: boolean | undefined;
|
|
83
86
|
globalFilterEnabled: boolean;
|
|
84
87
|
columnFilterEnabled: boolean;
|
|
@@ -153,6 +156,9 @@ export type RowDragFeatureArgs<T> = Omit<UseRowDragControllerArgs, 'getRowDragLa
|
|
|
153
156
|
rowModel: RowModel<T>;
|
|
154
157
|
visibleColumns: GridColumn<T>[];
|
|
155
158
|
isRowDraggable: SpreadsheetGridProps<T>['isRowDraggable'];
|
|
159
|
+
canDropRow: SpreadsheetGridProps<T>['canDropRow'];
|
|
160
|
+
rows: readonly T[];
|
|
161
|
+
resolveRowKey: (row: T, index: number) => GridRowKey;
|
|
156
162
|
hasRowKeys: boolean;
|
|
157
163
|
localeTexts: ResolvedGridLocaleText;
|
|
158
164
|
};
|
|
@@ -176,10 +182,13 @@ export type ToolPanelFeatureResult = UseToolPanelControllerResult & {
|
|
|
176
182
|
};
|
|
177
183
|
export type CellContextMenuFeatureArgs = {
|
|
178
184
|
gridRootRef: RefObject<HTMLDivElement | null>;
|
|
185
|
+
localeTexts: ResolvedGridLocaleText;
|
|
179
186
|
};
|
|
180
187
|
export type CellContextMenuFeatureResult<T> = {
|
|
181
188
|
isContextMenuOpen: boolean;
|
|
182
|
-
openContextMenu: (params: GridContextMenuParams<T>, items: GridContextMenuItem[]
|
|
189
|
+
openContextMenu: (params: GridContextMenuParams<T>, items: GridContextMenuItem[], options?: {
|
|
190
|
+
focus?: 'panel' | 'firstItem';
|
|
191
|
+
}) => void;
|
|
183
192
|
renderContextMenuPopover: (slots: GridResolvedSlots, themeClassName: string | undefined) => ReactNode;
|
|
184
193
|
};
|
|
185
194
|
export type BodyContextMenuInput<T> = {
|
|
@@ -189,6 +198,11 @@ export type BodyContextMenuInput<T> = {
|
|
|
189
198
|
selection: GridSelection;
|
|
190
199
|
activeCell: CellCoord | null;
|
|
191
200
|
};
|
|
201
|
+
export type CellContextMenuInput<T> = Omit<BodyContextMenuInput<T>, 'event'> & {
|
|
202
|
+
cell: CellCoord;
|
|
203
|
+
clientX: number;
|
|
204
|
+
clientY: number;
|
|
205
|
+
};
|
|
192
206
|
export type ConditionalFormatCellResolvers = {
|
|
193
207
|
resolveDataBar: typeof resolveDataBar;
|
|
194
208
|
resolveColorScaleBackground: typeof resolveColorScaleBackground;
|
|
@@ -237,6 +251,9 @@ export type ReactGridFeatures = {
|
|
|
237
251
|
resolveTotalRowCaption: typeof resolveTotalRowCaption;
|
|
238
252
|
resolveTotalRowLabelColumnKey: typeof resolveTotalRowLabelColumnKey;
|
|
239
253
|
} | undefined;
|
|
254
|
+
pinnedRows?: FeatureLocaleDefaults & {
|
|
255
|
+
PinnedRows: typeof GridPinnedRows;
|
|
256
|
+
} | undefined;
|
|
240
257
|
conditionalFormat?: NonNullable<GridCoreFeatures['conditionalFormat']> & ConditionalFormatCellResolvers & {
|
|
241
258
|
resolveChipSpec: typeof resolveChipSpec;
|
|
242
259
|
GridChip: typeof GridChip;
|
|
@@ -257,10 +274,11 @@ export type ReactGridFeatures = {
|
|
|
257
274
|
useToolPanel: (args: ToolPanelFeatureArgs) => ToolPanelFeatureResult;
|
|
258
275
|
useToolPanelViews: (options: UseLazyModuleOptions) => ToolPanelViews | null;
|
|
259
276
|
} | undefined;
|
|
260
|
-
contextMenu?: {
|
|
277
|
+
contextMenu?: (FeatureLocaleDefaults & {
|
|
261
278
|
useCellContextMenu: <T>(args: CellContextMenuFeatureArgs) => CellContextMenuFeatureResult<T>;
|
|
262
279
|
buildBodyContextMenuParams: <T>(input: BodyContextMenuInput<T>) => GridContextMenuParams<T> | null;
|
|
263
|
-
|
|
280
|
+
buildCellContextMenuParams: <T>(input: CellContextMenuInput<T>) => GridContextMenuParams<T> | null;
|
|
281
|
+
}) | undefined;
|
|
264
282
|
scrollHint?: FeatureLocaleDefaults & {
|
|
265
283
|
resolveScrollHintOptions: typeof resolveScrollHintOptions;
|
|
266
284
|
ScrollHint: typeof GridScrollHint;
|
|
@@ -11,7 +11,7 @@ export declare const useCellContextMenuController: <T>({ gridRootRef, }: UseCell
|
|
|
11
11
|
current: HTMLDivElement | null;
|
|
12
12
|
};
|
|
13
13
|
isContextMenuOpen: boolean;
|
|
14
|
-
openContextMenu: (params: import("@ishibashi0112/spreadsheet-grid-core/internal/model/gridTypes.unbound").GridContextMenuParams<T>, items: import("@ishibashi0112/spreadsheet-grid-core/internal/model/gridTypes.unbound").GridContextMenuItem[]) => void;
|
|
14
|
+
openContextMenu: (params: import("@ishibashi0112/spreadsheet-grid-core/internal/model/gridTypes.unbound").GridContextMenuParams<T>, items: import("@ishibashi0112/spreadsheet-grid-core/internal/model/gridTypes.unbound").GridContextMenuItem[], options?: import("@ishibashi0112/spreadsheet-grid-core/internal/controllers/contextMenuController").ContextMenuOpenOptions) => void;
|
|
15
15
|
closeContextMenu: () => void;
|
|
16
16
|
};
|
|
17
17
|
export default useCellContextMenuController;
|
|
@@ -2,6 +2,7 @@ import { type HistoryControllerArgs } from '@ishibashi0112/spreadsheet-grid-core
|
|
|
2
2
|
export declare const useGridHistoryController: <T>(args: HistoryControllerArgs<T>) => {
|
|
3
3
|
handleRowsChange: ((nextRows: T[]) => void) | undefined;
|
|
4
4
|
amendRowsChange: ((nextRows: T[]) => void) | undefined;
|
|
5
|
+
applyRows: ((next: T[] | ((prev: T[]) => T[]), options?: import("@ishibashi0112/spreadsheet-grid-core/internal/controllers/historyController").HistoryApplyRowsOptions) => void) | undefined;
|
|
5
6
|
undo: () => void;
|
|
6
7
|
redo: () => void;
|
|
7
8
|
canUndo: () => boolean;
|
|
@@ -4,5 +4,5 @@ type UseGridViewportSyncArgs<T> = Omit<ViewportSyncArgs<T>, 'scrollElement'> & {
|
|
|
4
4
|
scrollRef: RefObject<HTMLDivElement | null>;
|
|
5
5
|
onScrollTopAnchored: (scrollTop: number) => void;
|
|
6
6
|
};
|
|
7
|
-
export declare const useGridViewportSync: <T>({ scrollRef, onScrollTopAnchored, ...args }: UseGridViewportSyncArgs<T>) => void;
|
|
7
|
+
export declare const useGridViewportSync: <T>({ scrollRef, onScrollTopAnchored, ...args }: UseGridViewportSyncArgs<T>) => () => void;
|
|
8
8
|
export default useGridViewportSync;
|
|
@@ -1,3 +1,8 @@
|
|
|
1
1
|
import { type RefObject } from 'react';
|
|
2
2
|
export declare const PortalTokenSourceContext: import("react").Context<RefObject<HTMLElement | null> | null>;
|
|
3
|
-
export declare
|
|
3
|
+
export declare const PopupContainerContext: import("react").Context<(() => HTMLElement | null) | null>;
|
|
4
|
+
export declare function usePopupContainer(active: boolean): HTMLElement | null;
|
|
5
|
+
export declare function usePortalTokens(portalRef: RefObject<HTMLElement | null>, active: boolean, modifierClassName: string | undefined, options?: {
|
|
6
|
+
origin?: boolean | undefined;
|
|
7
|
+
layout?: unknown;
|
|
8
|
+
}): void;
|