@antv/s2-vue 1.2.0-alpha.1 → 1.2.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/esm/index.d.ts +36 -17
- package/package.json +2 -2
package/esm/index.d.ts
CHANGED
|
@@ -143,7 +143,7 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
|
|
|
143
143
|
protected abstract getTextPosition(): Point;
|
|
144
144
|
getStyle<K extends keyof S2Theme = keyof CellThemes>(name?: K): DefaultCellTheme | S2Theme[K];
|
|
145
145
|
protected getResizeAreaStyle(): ResizeArea;
|
|
146
|
-
protected shouldDrawResizeAreaByType(type: keyof
|
|
146
|
+
protected shouldDrawResizeAreaByType(type: keyof ResizeInteractionOptions, cell: S2CellType): boolean | ((cell: S2CellType<ViewMeta_2>) => boolean) | ResizeType | ((resizeInfo: ResizeInfo_2) => boolean);
|
|
147
147
|
protected getCellArea(): {
|
|
148
148
|
x: number;
|
|
149
149
|
y: number;
|
|
@@ -310,6 +310,8 @@ declare abstract class BaseFacet {
|
|
|
310
310
|
get scrollBarSize(): number;
|
|
311
311
|
protected preCellIndexes: PanelIndexes;
|
|
312
312
|
constructor(cfg: SpreadSheetFacetCfg);
|
|
313
|
+
protected getCellCustomWidth(node: Node_2_2, width: CellCustomWidth): number;
|
|
314
|
+
protected getCellDraggedWidth(node: Node_2_2): number;
|
|
313
315
|
hideScrollBar: () => void;
|
|
314
316
|
delayHideScrollBar: DebouncedFunc<() => void>;
|
|
315
317
|
delayHideScrollbarOnMobile: () => void;
|
|
@@ -454,14 +456,13 @@ declare abstract class BaseFacet {
|
|
|
454
456
|
cols: number[];
|
|
455
457
|
rows: any[];
|
|
456
458
|
};
|
|
457
|
-
|
|
459
|
+
updatePanelScrollGroup(): void;
|
|
458
460
|
/**
|
|
459
461
|
* When scroll behavior happened, only render one time in a period,
|
|
460
462
|
* but render immediately in initiate
|
|
461
463
|
* @protected
|
|
462
464
|
*/
|
|
463
465
|
protected dynamicRenderCell(): void;
|
|
464
|
-
private putMergedCellsGroupToFront;
|
|
465
466
|
private emitScrollEvent;
|
|
466
467
|
protected onAfterScroll: DebouncedFunc<() => void>;
|
|
467
468
|
protected saveInitColumnLeafNodes(columnNodes?: Node_2_2[]): void;
|
|
@@ -1070,6 +1071,8 @@ declare interface CellCfg {
|
|
|
1070
1071
|
};
|
|
1071
1072
|
}
|
|
1072
1073
|
|
|
1074
|
+
declare type CellCustomWidth = number | ((node: Node_2_2) => number);
|
|
1075
|
+
|
|
1073
1076
|
declare interface CellDataParams {
|
|
1074
1077
|
query: DataType_2;
|
|
1075
1078
|
isTotals?: boolean;
|
|
@@ -1161,6 +1164,7 @@ declare class ColCell extends HeaderCell {
|
|
|
1161
1164
|
}
|
|
1162
1165
|
|
|
1163
1166
|
declare interface ColCfg {
|
|
1167
|
+
width?: CellCustomWidth;
|
|
1164
1168
|
height?: number;
|
|
1165
1169
|
widthByFieldValue?: Record<string, number>;
|
|
1166
1170
|
heightByField?: Record<string, number>;
|
|
@@ -1655,10 +1659,10 @@ declare interface GridAnalysisCellTheme {
|
|
|
1655
1659
|
}
|
|
1656
1660
|
|
|
1657
1661
|
declare class GridGroup extends Group {
|
|
1658
|
-
|
|
1662
|
+
protected s2: SpreadSheet_2;
|
|
1659
1663
|
constructor(cfg: any);
|
|
1660
|
-
|
|
1661
|
-
|
|
1664
|
+
protected gridGroup: IGroup;
|
|
1665
|
+
protected gridInfo: GridInfo;
|
|
1662
1666
|
updateGrid: (gridInfo: GridInfo, id?: string) => void;
|
|
1663
1667
|
}
|
|
1664
1668
|
|
|
@@ -1822,10 +1826,11 @@ declare interface InteractionOptions {
|
|
|
1822
1826
|
hoverFocus?: boolean | HoverFocusOptions;
|
|
1823
1827
|
enableCopy?: boolean;
|
|
1824
1828
|
copyWithFormat?: boolean;
|
|
1829
|
+
copyWithHeader?: boolean;
|
|
1825
1830
|
autoResetSheetStyle?: boolean;
|
|
1826
1831
|
hiddenColumnFields?: string[];
|
|
1827
1832
|
scrollSpeedRatio?: ScrollSpeedRatio;
|
|
1828
|
-
resize?: boolean |
|
|
1833
|
+
resize?: boolean | ResizeInteractionOptions;
|
|
1829
1834
|
brushSelection?: boolean;
|
|
1830
1835
|
multiSelection?: boolean;
|
|
1831
1836
|
rangeSelection?: boolean;
|
|
@@ -2183,6 +2188,12 @@ declare type PanelIndexes = {
|
|
|
2183
2188
|
};
|
|
2184
2189
|
|
|
2185
2190
|
declare class PanelScrollGroup extends GridGroup {
|
|
2191
|
+
protected mergedCellsGroup: IGroup;
|
|
2192
|
+
constructor(cfg: any);
|
|
2193
|
+
protected initMergedCellsGroup(): void;
|
|
2194
|
+
updateMergedCells(): void;
|
|
2195
|
+
addMergeCell(mergeCell: MergedCell): void;
|
|
2196
|
+
update(gridInfo: GridInfo): void;
|
|
2186
2197
|
}
|
|
2187
2198
|
|
|
2188
2199
|
declare interface PartDrillDown {
|
|
@@ -2515,18 +2526,11 @@ declare interface RequiredPropOption<T = any> {
|
|
|
2515
2526
|
required: true;
|
|
2516
2527
|
}
|
|
2517
2528
|
|
|
2518
|
-
declare interface ResizeActiveOptions {
|
|
2519
|
-
rowCellVertical?: boolean;
|
|
2520
|
-
cornerCellHorizontal?: boolean;
|
|
2521
|
-
colCellHorizontal?: boolean;
|
|
2522
|
-
colCellVertical?: boolean;
|
|
2523
|
-
rowResizeType?: ResizeType;
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
2529
|
declare interface ResizeArea {
|
|
2527
2530
|
size?: number;
|
|
2528
2531
|
background?: string;
|
|
2529
2532
|
guideLineColor?: string;
|
|
2533
|
+
guideLineDisableColor?: string;
|
|
2530
2534
|
guideLineDash?: number[];
|
|
2531
2535
|
backgroundOpacity?: number;
|
|
2532
2536
|
interactionState?: InteractionState;
|
|
@@ -2563,6 +2567,22 @@ declare interface ResizeInfo_2 {
|
|
|
2563
2567
|
isResizeArea?: boolean;
|
|
2564
2568
|
/** 字段id */
|
|
2565
2569
|
id?: string;
|
|
2570
|
+
/** 当前拖拽热区对应的节点信息 */
|
|
2571
|
+
meta: Node_2_2 | ViewMeta_2;
|
|
2572
|
+
/** 拖拽后的宽度 */
|
|
2573
|
+
resizedWidth?: number;
|
|
2574
|
+
/** 拖拽后的高度 */
|
|
2575
|
+
resizedHeight?: number;
|
|
2576
|
+
}
|
|
2577
|
+
|
|
2578
|
+
declare interface ResizeInteractionOptions {
|
|
2579
|
+
rowCellVertical?: boolean;
|
|
2580
|
+
cornerCellHorizontal?: boolean;
|
|
2581
|
+
colCellHorizontal?: boolean;
|
|
2582
|
+
colCellVertical?: boolean;
|
|
2583
|
+
rowResizeType?: ResizeType;
|
|
2584
|
+
disable?: (resizeInfo: ResizeInfo_2) => boolean;
|
|
2585
|
+
visible?: (cell: S2CellType) => boolean;
|
|
2566
2586
|
}
|
|
2567
2587
|
|
|
2568
2588
|
declare interface ResizeParams_2 {
|
|
@@ -2676,7 +2696,7 @@ declare type RowCellCollapseTreeRowsType = {
|
|
|
2676
2696
|
};
|
|
2677
2697
|
|
|
2678
2698
|
declare interface RowCfg {
|
|
2679
|
-
width?:
|
|
2699
|
+
width?: CellCustomWidth;
|
|
2680
2700
|
widthByField?: Record<string, number>;
|
|
2681
2701
|
heightByField?: Record<string, number>;
|
|
2682
2702
|
treeRowsWidth?: number;
|
|
@@ -3821,7 +3841,6 @@ declare abstract class SpreadSheet_2 extends EE {
|
|
|
3821
3841
|
backgroundGroup: IGroup;
|
|
3822
3842
|
panelGroup: IGroup;
|
|
3823
3843
|
panelScrollGroup: PanelScrollGroup;
|
|
3824
|
-
mergedCellsGroup: IGroup;
|
|
3825
3844
|
frozenRowGroup: FrozenGroup_2;
|
|
3826
3845
|
frozenColGroup: FrozenGroup_2;
|
|
3827
3846
|
frozenTrailingRowGroup: FrozenGroup_2;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@antv/s2-vue",
|
|
4
|
-
"version": "1.2.0
|
|
4
|
+
"version": "1.2.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"unpkg": "dist/index.min.js",
|
|
7
7
|
"module": "esm/index.js",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"lodash": "^4.17.21"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@antv/s2": "
|
|
69
|
+
"@antv/s2": "*",
|
|
70
70
|
"@antv/s2-shared": "*",
|
|
71
71
|
"@testing-library/vue": "^6.5.1",
|
|
72
72
|
"@vue/tsconfig": "^0.1.3",
|