caplink-saas-ui-shared-component-library 1.107.0 → 1.108.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.
@@ -16,6 +16,7 @@ export declare function paste(event: ClipboardEventType, params: {
16
16
  isStaticRows: boolean;
17
17
  maxColumns: number;
18
18
  enableCyclicRepeat?: boolean;
19
+ visibleRowIndices?: ReadonlySet<number>;
19
20
  }): PasteOperationResult;
20
21
  /**
21
22
  * Copies a single cell to clipboard
@@ -1,2 +1,6 @@
1
1
  import { CopyOperationConfig, CopyOperationResult } from '../types';
2
+ /**
3
+ * Handles copying multiple cell ranges to clipboard
4
+ * Formats data as tab-separated values (TSV) compatible with Excel/Sheets
5
+ */
2
6
  export declare function copyRange(config: CopyOperationConfig): CopyOperationResult;
@@ -2,5 +2,6 @@ import { PasteOperationConfig, PasteOperationResult } from '../types';
2
2
  /**
3
3
  * Handles pasting data by overlaying it on the matrix
4
4
  * This may expand the matrix if needed (unless staticRows is true)
5
+ * Rows hidden by filters (not in visibleRowIndices) are skipped and keep their values
5
6
  */
6
7
  export declare function pasteWithOverlay(config: PasteOperationConfig): PasteOperationResult;
@@ -4,6 +4,7 @@ import type * as Matrix from '../../../model/matrix';
4
4
  * Selects the appropriate paste strategy
5
5
  * @param parsedData - The clipboard data to paste
6
6
  * @param selectedRanges - Currently selected cell ranges
7
+ * @param visibleRowIndices - Rows visible under the active filters (all rows when omitted)
7
8
  * @returns The strategy to use for pasting
8
9
  */
9
- export declare function selectPasteStrategy(parsedData: ParsedClipboardData, selectedRanges: Matrix.PointRange[]): PasteStrategy;
10
+ export declare function selectPasteStrategy(parsedData: ParsedClipboardData, selectedRanges: Matrix.PointRange[], visibleRowIndices?: ReadonlySet<number>): PasteStrategy;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Returns the row indices between startRow and endRow (inclusive) that are visible.
3
+ * When visibleRowIndices is not provided, every row is considered visible.
4
+ */
5
+ export declare function getRowIndicesInRange(startRow: number, endRow: number, visibleRowIndices?: ReadonlySet<number>): number[];
6
+ /**
7
+ * Returns the matrix rows that should receive pasted data, starting at startRow and
8
+ * skipping rows hidden by filters. Rows past the end of the matrix are new (and therefore
9
+ * never hidden); they are only used when the spreadsheet is allowed to grow.
10
+ */
11
+ export declare function getPasteTargetRows(params: {
12
+ startRow: number;
13
+ count: number;
14
+ matrixLength: number;
15
+ isStaticRows: boolean;
16
+ visibleRowIndices?: ReadonlySet<number>;
17
+ }): number[];
@@ -30,6 +30,8 @@ export interface PasteOperationConfig {
30
30
  maxColumns: number;
31
31
  /** Enable cyclic repetition when pasting (default: true) */
32
32
  enableCyclicRepeat?: boolean;
33
+ /** When set, rows not in this set (hidden by filters) are skipped and never receive pasted data */
34
+ visibleRowIndices?: ReadonlySet<number>;
33
35
  }
34
36
  /**
35
37
  * Result of a paste operation