@canvas-components/pivot-table 0.1.7 → 0.1.8

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
@@ -115,6 +115,21 @@ interface PivotSelectionState {
115
115
  axis: "row" | "column";
116
116
  nodeId: string;
117
117
  } | null;
118
+ textSelection?: PivotTextSelectionState | null;
119
+ }
120
+ /** PivotTable Canvas 文本选区。 */
121
+ interface PivotTextSelectionState {
122
+ fragments: Array<{
123
+ rowIndex: number;
124
+ columnIndex: number;
125
+ text: string;
126
+ region?: "body" | "header";
127
+ key?: string;
128
+ }>;
129
+ anchorFragmentIndex: number;
130
+ focusFragmentIndex: number;
131
+ anchorOffset: number;
132
+ focusOffset: number;
118
133
  }
119
134
  /** PivotTable 矩形选区。 */
120
135
  interface PivotSelectionRange {
@@ -778,6 +793,8 @@ declare class PivotTable<RecordType = Record<string, unknown>> {
778
793
  private suppressNextClick;
779
794
  private scrollbarDrag;
780
795
  private cellSelectionDrag;
796
+ private textSelectionDrag;
797
+ private headerTextSelectionDrag;
781
798
  private rowHeaderSelectionDrag;
782
799
  constructor(container: HTMLElement, options: PivotTableOptions<RecordType>);
783
800
  /** 挂载 PivotTable。 */
@@ -873,8 +890,7 @@ declare class PivotTable<RecordType = Record<string, unknown>> {
873
890
  private readonly handlePointerMove;
874
891
  private readonly handlePointerLeave;
875
892
  private readonly handleClick;
876
- private readonly handleDocumentKeyDown;
877
- private readonly handleCopy;
893
+ private readonly handleKeyDown;
878
894
  private readonly handleWheel;
879
895
  private startWheelScrollSmoothing;
880
896
  private stopWheelScrollSmoothing;
@@ -884,6 +900,16 @@ declare class PivotTable<RecordType = Record<string, unknown>> {
884
900
  private readonly handlePointerDown;
885
901
  private readonly handlePointerUp;
886
902
  private updateCellSelectionDrag;
903
+ private updateTextSelectionDrag;
904
+ private updateHeaderTextSelectionDrag;
905
+ private createTextSelectionFragments;
906
+ private createHeaderTextFragments;
907
+ private resolveBodyText;
908
+ private createBodyTextFragments;
909
+ private resolveTextFragmentIndex;
910
+ private resolveBodyFragmentIndex;
911
+ private resolveBodyTextOriginX;
912
+ private measurePivotText;
887
913
  private updateRowHeaderSelectionDrag;
888
914
  private selectValueColumn;
889
915
  private beginScrollbarInteraction;
@@ -898,6 +924,8 @@ declare class PivotTable<RecordType = Record<string, unknown>> {
898
924
  private resolveResizeHit;
899
925
  private resolveScrollbarHit;
900
926
  private createSelectionTsv;
927
+ /** 复制表格选区文本;同步复制失败时回退到异步实现。 */
928
+ private copyPivotText;
901
929
  private scheduleRender;
902
930
  private render;
903
931
  }
package/dist/index.d.ts CHANGED
@@ -115,6 +115,21 @@ interface PivotSelectionState {
115
115
  axis: "row" | "column";
116
116
  nodeId: string;
117
117
  } | null;
118
+ textSelection?: PivotTextSelectionState | null;
119
+ }
120
+ /** PivotTable Canvas 文本选区。 */
121
+ interface PivotTextSelectionState {
122
+ fragments: Array<{
123
+ rowIndex: number;
124
+ columnIndex: number;
125
+ text: string;
126
+ region?: "body" | "header";
127
+ key?: string;
128
+ }>;
129
+ anchorFragmentIndex: number;
130
+ focusFragmentIndex: number;
131
+ anchorOffset: number;
132
+ focusOffset: number;
118
133
  }
119
134
  /** PivotTable 矩形选区。 */
120
135
  interface PivotSelectionRange {
@@ -778,6 +793,8 @@ declare class PivotTable<RecordType = Record<string, unknown>> {
778
793
  private suppressNextClick;
779
794
  private scrollbarDrag;
780
795
  private cellSelectionDrag;
796
+ private textSelectionDrag;
797
+ private headerTextSelectionDrag;
781
798
  private rowHeaderSelectionDrag;
782
799
  constructor(container: HTMLElement, options: PivotTableOptions<RecordType>);
783
800
  /** 挂载 PivotTable。 */
@@ -873,8 +890,7 @@ declare class PivotTable<RecordType = Record<string, unknown>> {
873
890
  private readonly handlePointerMove;
874
891
  private readonly handlePointerLeave;
875
892
  private readonly handleClick;
876
- private readonly handleDocumentKeyDown;
877
- private readonly handleCopy;
893
+ private readonly handleKeyDown;
878
894
  private readonly handleWheel;
879
895
  private startWheelScrollSmoothing;
880
896
  private stopWheelScrollSmoothing;
@@ -884,6 +900,16 @@ declare class PivotTable<RecordType = Record<string, unknown>> {
884
900
  private readonly handlePointerDown;
885
901
  private readonly handlePointerUp;
886
902
  private updateCellSelectionDrag;
903
+ private updateTextSelectionDrag;
904
+ private updateHeaderTextSelectionDrag;
905
+ private createTextSelectionFragments;
906
+ private createHeaderTextFragments;
907
+ private resolveBodyText;
908
+ private createBodyTextFragments;
909
+ private resolveTextFragmentIndex;
910
+ private resolveBodyFragmentIndex;
911
+ private resolveBodyTextOriginX;
912
+ private measurePivotText;
887
913
  private updateRowHeaderSelectionDrag;
888
914
  private selectValueColumn;
889
915
  private beginScrollbarInteraction;
@@ -898,6 +924,8 @@ declare class PivotTable<RecordType = Record<string, unknown>> {
898
924
  private resolveResizeHit;
899
925
  private resolveScrollbarHit;
900
926
  private createSelectionTsv;
927
+ /** 复制表格选区文本;同步复制失败时回退到异步实现。 */
928
+ private copyPivotText;
901
929
  private scheduleRender;
902
930
  private render;
903
931
  }