@canvas-components/pivot-table 0.1.7 → 0.1.9
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.cjs +565 -121
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +35 -2
- package/dist/index.d.ts +35 -2
- package/dist/index.js +565 -121
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
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 {
|
|
@@ -557,6 +572,11 @@ interface PivotLayoutSnapshot {
|
|
|
557
572
|
start: number;
|
|
558
573
|
end: number;
|
|
559
574
|
};
|
|
575
|
+
/** 固定在表体底部的末尾汇总行范围。 */
|
|
576
|
+
frozenBottomRowRange: {
|
|
577
|
+
start: number;
|
|
578
|
+
end: number;
|
|
579
|
+
} | null;
|
|
560
580
|
visibleColumnRange: {
|
|
561
581
|
start: number;
|
|
562
582
|
end: number;
|
|
@@ -778,6 +798,8 @@ declare class PivotTable<RecordType = Record<string, unknown>> {
|
|
|
778
798
|
private suppressNextClick;
|
|
779
799
|
private scrollbarDrag;
|
|
780
800
|
private cellSelectionDrag;
|
|
801
|
+
private textSelectionDrag;
|
|
802
|
+
private headerTextSelectionDrag;
|
|
781
803
|
private rowHeaderSelectionDrag;
|
|
782
804
|
constructor(container: HTMLElement, options: PivotTableOptions<RecordType>);
|
|
783
805
|
/** 挂载 PivotTable。 */
|
|
@@ -873,8 +895,7 @@ declare class PivotTable<RecordType = Record<string, unknown>> {
|
|
|
873
895
|
private readonly handlePointerMove;
|
|
874
896
|
private readonly handlePointerLeave;
|
|
875
897
|
private readonly handleClick;
|
|
876
|
-
private readonly
|
|
877
|
-
private readonly handleCopy;
|
|
898
|
+
private readonly handleKeyDown;
|
|
878
899
|
private readonly handleWheel;
|
|
879
900
|
private startWheelScrollSmoothing;
|
|
880
901
|
private stopWheelScrollSmoothing;
|
|
@@ -884,6 +905,16 @@ declare class PivotTable<RecordType = Record<string, unknown>> {
|
|
|
884
905
|
private readonly handlePointerDown;
|
|
885
906
|
private readonly handlePointerUp;
|
|
886
907
|
private updateCellSelectionDrag;
|
|
908
|
+
private updateTextSelectionDrag;
|
|
909
|
+
private updateHeaderTextSelectionDrag;
|
|
910
|
+
private createTextSelectionFragments;
|
|
911
|
+
private createHeaderTextFragments;
|
|
912
|
+
private resolveBodyText;
|
|
913
|
+
private createBodyTextFragments;
|
|
914
|
+
private resolveTextFragmentIndex;
|
|
915
|
+
private resolveBodyFragmentIndex;
|
|
916
|
+
private resolveBodyTextOriginX;
|
|
917
|
+
private measurePivotText;
|
|
887
918
|
private updateRowHeaderSelectionDrag;
|
|
888
919
|
private selectValueColumn;
|
|
889
920
|
private beginScrollbarInteraction;
|
|
@@ -898,6 +929,8 @@ declare class PivotTable<RecordType = Record<string, unknown>> {
|
|
|
898
929
|
private resolveResizeHit;
|
|
899
930
|
private resolveScrollbarHit;
|
|
900
931
|
private createSelectionTsv;
|
|
932
|
+
/** 复制表格选区文本;同步复制失败时回退到异步实现。 */
|
|
933
|
+
private copyPivotText;
|
|
901
934
|
private scheduleRender;
|
|
902
935
|
private render;
|
|
903
936
|
}
|
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 {
|
|
@@ -557,6 +572,11 @@ interface PivotLayoutSnapshot {
|
|
|
557
572
|
start: number;
|
|
558
573
|
end: number;
|
|
559
574
|
};
|
|
575
|
+
/** 固定在表体底部的末尾汇总行范围。 */
|
|
576
|
+
frozenBottomRowRange: {
|
|
577
|
+
start: number;
|
|
578
|
+
end: number;
|
|
579
|
+
} | null;
|
|
560
580
|
visibleColumnRange: {
|
|
561
581
|
start: number;
|
|
562
582
|
end: number;
|
|
@@ -778,6 +798,8 @@ declare class PivotTable<RecordType = Record<string, unknown>> {
|
|
|
778
798
|
private suppressNextClick;
|
|
779
799
|
private scrollbarDrag;
|
|
780
800
|
private cellSelectionDrag;
|
|
801
|
+
private textSelectionDrag;
|
|
802
|
+
private headerTextSelectionDrag;
|
|
781
803
|
private rowHeaderSelectionDrag;
|
|
782
804
|
constructor(container: HTMLElement, options: PivotTableOptions<RecordType>);
|
|
783
805
|
/** 挂载 PivotTable。 */
|
|
@@ -873,8 +895,7 @@ declare class PivotTable<RecordType = Record<string, unknown>> {
|
|
|
873
895
|
private readonly handlePointerMove;
|
|
874
896
|
private readonly handlePointerLeave;
|
|
875
897
|
private readonly handleClick;
|
|
876
|
-
private readonly
|
|
877
|
-
private readonly handleCopy;
|
|
898
|
+
private readonly handleKeyDown;
|
|
878
899
|
private readonly handleWheel;
|
|
879
900
|
private startWheelScrollSmoothing;
|
|
880
901
|
private stopWheelScrollSmoothing;
|
|
@@ -884,6 +905,16 @@ declare class PivotTable<RecordType = Record<string, unknown>> {
|
|
|
884
905
|
private readonly handlePointerDown;
|
|
885
906
|
private readonly handlePointerUp;
|
|
886
907
|
private updateCellSelectionDrag;
|
|
908
|
+
private updateTextSelectionDrag;
|
|
909
|
+
private updateHeaderTextSelectionDrag;
|
|
910
|
+
private createTextSelectionFragments;
|
|
911
|
+
private createHeaderTextFragments;
|
|
912
|
+
private resolveBodyText;
|
|
913
|
+
private createBodyTextFragments;
|
|
914
|
+
private resolveTextFragmentIndex;
|
|
915
|
+
private resolveBodyFragmentIndex;
|
|
916
|
+
private resolveBodyTextOriginX;
|
|
917
|
+
private measurePivotText;
|
|
887
918
|
private updateRowHeaderSelectionDrag;
|
|
888
919
|
private selectValueColumn;
|
|
889
920
|
private beginScrollbarInteraction;
|
|
@@ -898,6 +929,8 @@ declare class PivotTable<RecordType = Record<string, unknown>> {
|
|
|
898
929
|
private resolveResizeHit;
|
|
899
930
|
private resolveScrollbarHit;
|
|
900
931
|
private createSelectionTsv;
|
|
932
|
+
/** 复制表格选区文本;同步复制失败时回退到异步实现。 */
|
|
933
|
+
private copyPivotText;
|
|
901
934
|
private scheduleRender;
|
|
902
935
|
private render;
|
|
903
936
|
}
|