@ishibashi0112/spreadsheet-grid 1.7.0 → 1.9.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 +158 -19
- package/README.md +2 -2
- package/dist/CellEditorLayer.d.ts +2 -1
- package/dist/GridShell.d.ts +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/features/changeTracking.d.ts +2 -0
- package/dist/features/treeData.d.ts +2 -0
- package/dist/features/types.d.ts +13 -1
- package/dist/hooks/useGridBarContext.d.ts +4 -3
- package/dist/index.cjs +9 -6
- package/dist/index.js +3073 -2709
- package/dist/lite/createSpreadsheetGrid-B8ove8hh.js +4857 -0
- package/dist/lite/createSpreadsheetGrid-M3WJSRoB.cjs +9 -0
- package/dist/lite/createSpreadsheetGrid.cjs +1 -1
- package/dist/lite/createSpreadsheetGrid.js +1 -1
- package/dist/lite/features/changeTracking.cjs +1 -0
- package/dist/lite/features/changeTracking.js +13 -0
- package/dist/lite/features/pinnedRows.cjs +1 -1
- package/dist/lite/features/pinnedRows.js +1 -1
- package/dist/lite/features/treeData.cjs +1 -0
- package/dist/lite/features/treeData.js +2 -0
- package/dist/lite/{pinnedRows-BtvLVkLa.js → pinnedRows-C0z2lLC4.js} +1 -0
- package/dist/lite/pinnedRows-CrwRr7W0.cjs +1 -0
- 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 +2 -0
- package/dist/lite.js +16 -14
- 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 +5 -1
- package/dist/themes/shadcn.css +3 -0
- package/dist/view/DefaultGridBottomBar.d.ts +2 -1
- package/dist/view/GridBodyLayer.d.ts +14 -2
- package/dist/view/GridTreeCell.d.ts +16 -0
- package/package.json +2 -2
- package/skills/spreadsheet-grid/SKILL.md +4 -2
- package/dist/lite/createSpreadsheetGrid-B4_L9K--.cjs +0 -6
- package/dist/lite/createSpreadsheetGrid-BlYZzGf-.js +0 -4547
- package/dist/lite/pinnedRows-CBgirKjW.cjs +0 -1
package/dist/features/types.d.ts
CHANGED
|
@@ -10,17 +10,19 @@ import type { buildColumnGroupTree, columnHeaderSpanRows, createColumnChooserDro
|
|
|
10
10
|
import type { ColumnAutosizeRunnerArgs } from '@ishibashi0112/spreadsheet-grid-core/internal/controllers/columnAutosizeRunner';
|
|
11
11
|
import type { DateRolloverStore } from '@ishibashi0112/spreadsheet-grid-core/internal/controllers/dateRolloverStore';
|
|
12
12
|
import type { RowOrder } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/filtering';
|
|
13
|
+
import type { buildRevertMenuItems, describeUnsavedCell, formatUnsavedSummary } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/changeTracking';
|
|
13
14
|
import type { ResolvedGridLocaleText } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText';
|
|
14
15
|
import type { GridUiAction } from '@ishibashi0112/spreadsheet-grid-core/internal/model/gridActions';
|
|
15
16
|
import type { ColumnPane, GridPaneLayout } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/geometry';
|
|
16
17
|
import type { DetailRowExtra, RowMetrics } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/verticalGeometry';
|
|
17
|
-
import type { CellCoord, ColumnFilterValue, GridColumn, GridContextMenuItem, GridContextMenuParams, GridResolvedSlots, GridSelection, GridSelectionAggregates, GridLocaleText, GridUiState, GlobalFilterStatus, GridGlobalFilterMatch, GridRowKey, RowModel, SpreadsheetGridProps } from '../model/gridTypes.js';
|
|
18
|
+
import type { CellCoord, ColumnFilterValue, GridColumn, GridContextMenuItem, GridContextMenuParams, GridContextMenuTarget, GridResolvedSlots, GridSelection, GridSelectionAggregates, GridLocaleText, GridUiState, GlobalFilterStatus, GridGlobalFilterMatch, GridRowKey, RowModel, SpreadsheetGridProps } from '../model/gridTypes.js';
|
|
18
19
|
import type { GridFindBar } from '../view/GridFindBar.js';
|
|
19
20
|
import type { GridScrollHint } from '../view/GridScrollHint.js';
|
|
20
21
|
import type { GridTotalRow } from '../view/GridTotalRow.js';
|
|
21
22
|
import type { GridPinnedRows } from '../view/GridPinnedRows.js';
|
|
22
23
|
import type { GridColumnGroupHeader } from '../view/GridColumnGroupHeader.js';
|
|
23
24
|
import type { SearchSelectCellEditor } from '../editors/SearchSelectCellEditor.js';
|
|
25
|
+
import type { GridTreeAggregateValue, GridTreeCellPrefix } from '../view/GridTreeCell.js';
|
|
24
26
|
import type { GridBodyLabelRow } from '../view/GridBodyLabelRow.js';
|
|
25
27
|
import type { GridBodyGroupRow } from '../view/GridBodyGroupRow.js';
|
|
26
28
|
import type { GridStickyLabelLayer } from '../view/GridStickyLabelLayer.js';
|
|
@@ -203,6 +205,7 @@ export type BodyContextMenuInput<T> = {
|
|
|
203
205
|
orderedColumns: GridColumn<T>[];
|
|
204
206
|
selection: GridSelection;
|
|
205
207
|
activeCell: CellCoord | null;
|
|
208
|
+
resolveRevertItems?: ((target: GridContextMenuTarget<T>, isTargetSelected: boolean) => GridContextMenuItem[]) | undefined;
|
|
206
209
|
};
|
|
207
210
|
export type CellContextMenuInput<T> = Omit<BodyContextMenuInput<T>, 'event'> & {
|
|
208
211
|
cell: CellCoord;
|
|
@@ -275,6 +278,15 @@ export type ReactGridFeatures = {
|
|
|
275
278
|
selectSearch?: FeatureLocaleDefaults & {
|
|
276
279
|
SearchSelectCellEditor: typeof SearchSelectCellEditor;
|
|
277
280
|
} | undefined;
|
|
281
|
+
changeTracking?: NonNullable<GridCoreFeatures['changeTracking']> & FeatureLocaleDefaults & {
|
|
282
|
+
describeUnsavedCell: typeof describeUnsavedCell;
|
|
283
|
+
formatUnsavedSummary: typeof formatUnsavedSummary;
|
|
284
|
+
buildRevertMenuItems: typeof buildRevertMenuItems;
|
|
285
|
+
} | undefined;
|
|
286
|
+
treeData?: NonNullable<GridCoreFeatures['treeData']> & FeatureLocaleDefaults & {
|
|
287
|
+
TreeCellPrefix: typeof GridTreeCellPrefix;
|
|
288
|
+
TreeAggregateValue: typeof GridTreeAggregateValue;
|
|
289
|
+
} | undefined;
|
|
278
290
|
conditionalFormat?: NonNullable<GridCoreFeatures['conditionalFormat']> & ConditionalFormatCellResolvers & {
|
|
279
291
|
resolveChipSpec: typeof resolveChipSpec;
|
|
280
292
|
GridChip: typeof GridChip;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { GlobalFilterStatus, GridColumn, GridSelectionAggregates, GridUiState, SpreadsheetGridSlotContext } from '../model/gridTypes.js';
|
|
1
|
+
import type { GlobalFilterStatus, GridChangesSummary, GridColumn, GridSelectionAggregates, GridUiState, SpreadsheetGridSlotContext } from '../model/gridTypes.js';
|
|
2
2
|
import type { ResolvedGridLocaleText } from '@ishibashi0112/spreadsheet-grid-core/internal/logic/localeText';
|
|
3
|
-
type GridSlotContextBase<T> = Omit<SpreadsheetGridSlotContext<T>, 'setGlobalFilterText' | 'derivedSummary' | 'filteredRows' | 'globalFilterStatus' | 'globalFilterProgress' | 'selectionAggregates'>;
|
|
3
|
+
type GridSlotContextBase<T> = Omit<SpreadsheetGridSlotContext<T>, 'setGlobalFilterText' | 'derivedSummary' | 'filteredRows' | 'globalFilterStatus' | 'globalFilterProgress' | 'selectionAggregates' | 'unsavedChanges'>;
|
|
4
4
|
type UseGridBarContextArgs<T> = {
|
|
5
5
|
rows: T[];
|
|
6
6
|
localeTexts: ResolvedGridLocaleText;
|
|
@@ -16,10 +16,11 @@ type UseGridBarContextArgs<T> = {
|
|
|
16
16
|
globalFilterStatus: GlobalFilterStatus;
|
|
17
17
|
globalFilterProgress: number;
|
|
18
18
|
selectionAggregates?: GridSelectionAggregates | null;
|
|
19
|
+
unsavedChanges?: GridChangesSummary | null;
|
|
19
20
|
filtersApplied?: boolean;
|
|
20
21
|
columnTitles?: ReadonlyMap<string, string> | null;
|
|
21
22
|
};
|
|
22
|
-
export declare const useGridBarContext: <T>({ rows, localeTexts, viewRowCount, totalRowCount, getFilteredRows, columns, visibleColumns, orderedColumns, labelViewIndexes, uiState, setGlobalFilterText, globalFilterStatus, globalFilterProgress, selectionAggregates, filtersApplied, columnTitles, }: UseGridBarContextArgs<T>) => {
|
|
23
|
+
export declare const useGridBarContext: <T>({ rows, localeTexts, viewRowCount, totalRowCount, getFilteredRows, columns, visibleColumns, orderedColumns, labelViewIndexes, uiState, setGlobalFilterText, globalFilterStatus, globalFilterProgress, selectionAggregates, unsavedChanges, filtersApplied, columnTitles, }: UseGridBarContextArgs<T>) => {
|
|
23
24
|
slotContextBase: GridSlotContextBase<T>;
|
|
24
25
|
derivedSummary: import("@ishibashi0112/spreadsheet-grid-core").SpreadsheetGridDerivedSummary;
|
|
25
26
|
slotContext: SpreadsheetGridSlotContext<T>;
|