@geomak/ui 7.12.0 → 7.14.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/dist/index.d.cts CHANGED
@@ -444,6 +444,8 @@ interface MenuButtonItem {
444
444
  danger?: boolean;
445
445
  /** Render a divider above this item. */
446
446
  separatorBefore?: boolean;
447
+ /** Nested sub-menu items. When set, this row opens a sub-menu instead of firing `onSelect`. */
448
+ children?: MenuButtonItem[];
447
449
  }
448
450
  interface MenuButtonProps {
449
451
  /** Trigger label. */
@@ -2751,12 +2753,22 @@ interface DataGridProps {
2751
2753
  * `row` index at/after `rows.length` so the consumer can append the row.
2752
2754
  */
2753
2755
  trailingRows?: number;
2756
+ /** Blank, letter-labelled columns rendered after the data columns (spreadsheet slack). Default 0. */
2757
+ trailingCols?: number;
2754
2758
  /** `row` is the index into `rows` (stable across sorting; may equal `rows.length`+ for a blank trailing row). */
2755
2759
  onCellEdit?: (e: {
2756
2760
  row: number;
2757
2761
  column: string;
2758
2762
  value: string;
2759
2763
  }) => void;
2764
+ /** Enable right-click menus: Copy/Cut/Paste on cells, Add/Delete on rows, Add column on headers. Default false. */
2765
+ contextMenu?: boolean;
2766
+ /** Insert a blank row at `index` (from the row right-click menu). */
2767
+ onInsertRow?: (index: number) => void;
2768
+ /** Delete the row at `index` (from the row right-click menu). */
2769
+ onDeleteRow?: (index: number) => void;
2770
+ /** Insert a column at `index` (from the column-header right-click menu). */
2771
+ onInsertColumn?: (index: number) => void;
2760
2772
  className?: string;
2761
2773
  style?: react__default.CSSProperties;
2762
2774
  /** Shown when there are no rows. */
@@ -2773,7 +2785,7 @@ interface DataGridProps {
2773
2785
  * `onCellEdit` on commit. Wrap it with {@link Spreadsheet} for multi-sheet
2774
2786
  * switching, file parsing and export.
2775
2787
  */
2776
- declare function DataGrid({ columns, rows, rowHeight, headerHeight, height, width, editable, sortable, sort: sortProp, onSortChange, virtualize, overscan, rowNumbers, trailingRows, onCellEdit, className, style, emptyState, }: DataGridProps): react_jsx_runtime.JSX.Element;
2788
+ declare function DataGrid({ columns, rows, rowHeight, headerHeight, height, width, editable, sortable, sort: sortProp, onSortChange, virtualize, overscan, rowNumbers, trailingRows, trailingCols, onCellEdit, contextMenu, onInsertRow, onDeleteRow, onInsertColumn, className, style, emptyState, }: DataGridProps): react_jsx_runtime.JSX.Element;
2777
2789
 
2778
2790
  interface Cell {
2779
2791
  value: CellValue;
@@ -2807,6 +2819,8 @@ interface SpreadsheetProps {
2807
2819
  sortable?: boolean;
2808
2820
  /** Blank rows kept below the data (the spreadsheet "slack"). Default 50. */
2809
2821
  emptyRows?: number;
2822
+ /** Blank letter-labelled columns kept to the right of the data. Default 6. */
2823
+ emptyCols?: number;
2810
2824
  /** Show a “+” to add a blank sheet. Defaults to `editable`. */
2811
2825
  allowAddSheet?: boolean;
2812
2826
  /** Overall height. Default 480. */
@@ -2825,7 +2839,7 @@ interface SpreadsheetProps {
2825
2839
  * Exports to multi-sheet `.xlsx`, `.csv` (active sheet, BOM-prefixed) or a
2826
2840
  * paginated table `.pdf` (jsPDF, lazy).
2827
2841
  */
2828
- declare function Spreadsheet({ source, remote, editable, onCellEdit, onChange, export: exportFormats, fileName, virtualize, sortable, emptyRows, allowAddSheet, height, width, className, style, }: SpreadsheetProps): react_jsx_runtime.JSX.Element;
2842
+ declare function Spreadsheet({ source, remote, editable, onCellEdit, onChange, export: exportFormats, fileName, virtualize, sortable, emptyRows, emptyCols, allowAddSheet, height, width, className, style, }: SpreadsheetProps): react_jsx_runtime.JSX.Element;
2829
2843
 
2830
2844
  interface ThemeSwitchProps {
2831
2845
  checked: boolean;
package/dist/index.d.ts CHANGED
@@ -444,6 +444,8 @@ interface MenuButtonItem {
444
444
  danger?: boolean;
445
445
  /** Render a divider above this item. */
446
446
  separatorBefore?: boolean;
447
+ /** Nested sub-menu items. When set, this row opens a sub-menu instead of firing `onSelect`. */
448
+ children?: MenuButtonItem[];
447
449
  }
448
450
  interface MenuButtonProps {
449
451
  /** Trigger label. */
@@ -2751,12 +2753,22 @@ interface DataGridProps {
2751
2753
  * `row` index at/after `rows.length` so the consumer can append the row.
2752
2754
  */
2753
2755
  trailingRows?: number;
2756
+ /** Blank, letter-labelled columns rendered after the data columns (spreadsheet slack). Default 0. */
2757
+ trailingCols?: number;
2754
2758
  /** `row` is the index into `rows` (stable across sorting; may equal `rows.length`+ for a blank trailing row). */
2755
2759
  onCellEdit?: (e: {
2756
2760
  row: number;
2757
2761
  column: string;
2758
2762
  value: string;
2759
2763
  }) => void;
2764
+ /** Enable right-click menus: Copy/Cut/Paste on cells, Add/Delete on rows, Add column on headers. Default false. */
2765
+ contextMenu?: boolean;
2766
+ /** Insert a blank row at `index` (from the row right-click menu). */
2767
+ onInsertRow?: (index: number) => void;
2768
+ /** Delete the row at `index` (from the row right-click menu). */
2769
+ onDeleteRow?: (index: number) => void;
2770
+ /** Insert a column at `index` (from the column-header right-click menu). */
2771
+ onInsertColumn?: (index: number) => void;
2760
2772
  className?: string;
2761
2773
  style?: react__default.CSSProperties;
2762
2774
  /** Shown when there are no rows. */
@@ -2773,7 +2785,7 @@ interface DataGridProps {
2773
2785
  * `onCellEdit` on commit. Wrap it with {@link Spreadsheet} for multi-sheet
2774
2786
  * switching, file parsing and export.
2775
2787
  */
2776
- declare function DataGrid({ columns, rows, rowHeight, headerHeight, height, width, editable, sortable, sort: sortProp, onSortChange, virtualize, overscan, rowNumbers, trailingRows, onCellEdit, className, style, emptyState, }: DataGridProps): react_jsx_runtime.JSX.Element;
2788
+ declare function DataGrid({ columns, rows, rowHeight, headerHeight, height, width, editable, sortable, sort: sortProp, onSortChange, virtualize, overscan, rowNumbers, trailingRows, trailingCols, onCellEdit, contextMenu, onInsertRow, onDeleteRow, onInsertColumn, className, style, emptyState, }: DataGridProps): react_jsx_runtime.JSX.Element;
2777
2789
 
2778
2790
  interface Cell {
2779
2791
  value: CellValue;
@@ -2807,6 +2819,8 @@ interface SpreadsheetProps {
2807
2819
  sortable?: boolean;
2808
2820
  /** Blank rows kept below the data (the spreadsheet "slack"). Default 50. */
2809
2821
  emptyRows?: number;
2822
+ /** Blank letter-labelled columns kept to the right of the data. Default 6. */
2823
+ emptyCols?: number;
2810
2824
  /** Show a “+” to add a blank sheet. Defaults to `editable`. */
2811
2825
  allowAddSheet?: boolean;
2812
2826
  /** Overall height. Default 480. */
@@ -2825,7 +2839,7 @@ interface SpreadsheetProps {
2825
2839
  * Exports to multi-sheet `.xlsx`, `.csv` (active sheet, BOM-prefixed) or a
2826
2840
  * paginated table `.pdf` (jsPDF, lazy).
2827
2841
  */
2828
- declare function Spreadsheet({ source, remote, editable, onCellEdit, onChange, export: exportFormats, fileName, virtualize, sortable, emptyRows, allowAddSheet, height, width, className, style, }: SpreadsheetProps): react_jsx_runtime.JSX.Element;
2842
+ declare function Spreadsheet({ source, remote, editable, onCellEdit, onChange, export: exportFormats, fileName, virtualize, sortable, emptyRows, emptyCols, allowAddSheet, height, width, className, style, }: SpreadsheetProps): react_jsx_runtime.JSX.Element;
2829
2843
 
2830
2844
  interface ThemeSwitchProps {
2831
2845
  checked: boolean;