@xcelsior/ui-spreadsheets 1.0.3 → 1.0.4
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/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +6 -0
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +233 -120
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +233 -120
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ColumnHeaderActions.tsx +3 -2
- package/src/components/CommentModals.tsx +13 -3
- package/src/components/Spreadsheet.stories.tsx +0 -1
- package/src/components/Spreadsheet.tsx +239 -131
- package/src/components/SpreadsheetCell.tsx +11 -15
- package/src/hooks/useSpreadsheetComments.ts +56 -54
- package/src/hooks/useSpreadsheetFiltering.ts +38 -4
- package/src/hooks/useSpreadsheetHighlighting.ts +27 -4
- package/src/types.ts +4 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @xcelsior/ui-spreadsheets@1.0.
|
|
2
|
+
> @xcelsior/ui-spreadsheets@1.0.4 build /home/circleci/repo/packages/ui/ui-spreadsheets
|
|
3
3
|
> tsup && tsc --noEmit
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mCJS[39m Build start
|
|
12
12
|
[34mESM[39m Build start
|
|
13
|
-
[32mCJS[39m [1mdist/index.js [22m[
|
|
14
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
15
|
-
[32mCJS[39m ⚡️ Build success in
|
|
16
|
-
[32mESM[39m [1mdist/index.mjs [22m[
|
|
17
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[
|
|
18
|
-
[32mESM[39m ⚡️ Build success in
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m154.78 KB[39m
|
|
14
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m4.61 MB[39m
|
|
15
|
+
[32mCJS[39m ⚡️ Build success in 477ms
|
|
16
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m143.85 KB[39m
|
|
17
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m4.61 MB[39m
|
|
18
|
+
[32mESM[39m ⚡️ Build success in 479ms
|
|
19
19
|
[34mDTS[39m Build start
|
|
20
|
-
[32mDTS[39m ⚡️ Build success in
|
|
21
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m22.
|
|
22
|
-
[32mDTS[39m [1mdist/index.d.mts [22m[32m22.
|
|
20
|
+
[32mDTS[39m ⚡️ Build success in 4317ms
|
|
21
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m22.21 KB[39m
|
|
22
|
+
[32mDTS[39m [1mdist/index.d.mts [22m[32m22.21 KB[39m
|
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -253,8 +253,8 @@ interface SpreadsheetProps<T = any> {
|
|
|
253
253
|
onRowDoubleClick?: (row: T, rowIndex: number) => void;
|
|
254
254
|
/** Callback when a row is cloned/duplicated */
|
|
255
255
|
onRowClone?: (row: T, rowId: string | number) => void;
|
|
256
|
-
/** Callback when a
|
|
257
|
-
|
|
256
|
+
/** Callback when a cell comment is added */
|
|
257
|
+
onAddCellComment?: (rowId: string | number, columnId: string, comment: string) => void;
|
|
258
258
|
/** Callback when row highlight is toggled */
|
|
259
259
|
onRowHighlight?: (rowId: string | number, color: string | null) => void;
|
|
260
260
|
/** Whether to show the toolbar */
|
|
@@ -291,8 +291,8 @@ interface SpreadsheetProps<T = any> {
|
|
|
291
291
|
emptyMessage?: string;
|
|
292
292
|
/** Row highlights (externally controlled) */
|
|
293
293
|
rowHighlights?: CellHighlight[];
|
|
294
|
-
/**
|
|
295
|
-
|
|
294
|
+
/** Cell comments (externally controlled) */
|
|
295
|
+
cellComments?: CellComment[];
|
|
296
296
|
/** Custom row actions to display in the index column */
|
|
297
297
|
rowActions?: RowAction<T>[];
|
|
298
298
|
/**
|
|
@@ -554,7 +554,7 @@ interface SpreadsheetColumnGroupHeaderProps {
|
|
|
554
554
|
* />
|
|
555
555
|
* ```
|
|
556
556
|
*/
|
|
557
|
-
declare function Spreadsheet<T extends Record<string, any>>({ data, columns, columnGroups, getRowId, onCellEdit, onSelectionChange, onSortChange, onFilterChange, onRowClick, onRowDoubleClick, onRowClone,
|
|
557
|
+
declare function Spreadsheet<T extends Record<string, any>>({ data, columns, columnGroups, getRowId, onCellEdit, onSelectionChange, onSortChange, onFilterChange, onRowClick, onRowDoubleClick, onRowClone, onAddCellComment, onRowHighlight, showToolbar, showPagination, showRowIndex, enableRowSelection, enableCellEditing, enableComments, enableHighlighting, enableUndoRedo, defaultPageSize, pageSizeOptions, defaultZoom, autoSave, compactMode, isLoading, className, emptyMessage, rowHighlights: externalRowHighlights, cellComments: externalCellComments, rowActions, serverSide, totalItems, currentPage: controlledCurrentPage, pageSize: controlledPageSize, onPageChange, sortConfig: controlledSortConfig, filters: controlledFilters, }: SpreadsheetProps<T>): react_jsx_runtime.JSX.Element;
|
|
558
558
|
declare namespace Spreadsheet {
|
|
559
559
|
var displayName: string;
|
|
560
560
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -253,8 +253,8 @@ interface SpreadsheetProps<T = any> {
|
|
|
253
253
|
onRowDoubleClick?: (row: T, rowIndex: number) => void;
|
|
254
254
|
/** Callback when a row is cloned/duplicated */
|
|
255
255
|
onRowClone?: (row: T, rowId: string | number) => void;
|
|
256
|
-
/** Callback when a
|
|
257
|
-
|
|
256
|
+
/** Callback when a cell comment is added */
|
|
257
|
+
onAddCellComment?: (rowId: string | number, columnId: string, comment: string) => void;
|
|
258
258
|
/** Callback when row highlight is toggled */
|
|
259
259
|
onRowHighlight?: (rowId: string | number, color: string | null) => void;
|
|
260
260
|
/** Whether to show the toolbar */
|
|
@@ -291,8 +291,8 @@ interface SpreadsheetProps<T = any> {
|
|
|
291
291
|
emptyMessage?: string;
|
|
292
292
|
/** Row highlights (externally controlled) */
|
|
293
293
|
rowHighlights?: CellHighlight[];
|
|
294
|
-
/**
|
|
295
|
-
|
|
294
|
+
/** Cell comments (externally controlled) */
|
|
295
|
+
cellComments?: CellComment[];
|
|
296
296
|
/** Custom row actions to display in the index column */
|
|
297
297
|
rowActions?: RowAction<T>[];
|
|
298
298
|
/**
|
|
@@ -554,7 +554,7 @@ interface SpreadsheetColumnGroupHeaderProps {
|
|
|
554
554
|
* />
|
|
555
555
|
* ```
|
|
556
556
|
*/
|
|
557
|
-
declare function Spreadsheet<T extends Record<string, any>>({ data, columns, columnGroups, getRowId, onCellEdit, onSelectionChange, onSortChange, onFilterChange, onRowClick, onRowDoubleClick, onRowClone,
|
|
557
|
+
declare function Spreadsheet<T extends Record<string, any>>({ data, columns, columnGroups, getRowId, onCellEdit, onSelectionChange, onSortChange, onFilterChange, onRowClick, onRowDoubleClick, onRowClone, onAddCellComment, onRowHighlight, showToolbar, showPagination, showRowIndex, enableRowSelection, enableCellEditing, enableComments, enableHighlighting, enableUndoRedo, defaultPageSize, pageSizeOptions, defaultZoom, autoSave, compactMode, isLoading, className, emptyMessage, rowHighlights: externalRowHighlights, cellComments: externalCellComments, rowActions, serverSide, totalItems, currentPage: controlledCurrentPage, pageSize: controlledPageSize, onPageChange, sortConfig: controlledSortConfig, filters: controlledFilters, }: SpreadsheetProps<T>): react_jsx_runtime.JSX.Element;
|
|
558
558
|
declare namespace Spreadsheet {
|
|
559
559
|
var displayName: string;
|
|
560
560
|
}
|