@antv/s2-vue 2.0.0-next.2 → 2.0.0-next.4
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.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/esm/index.d.ts +648 -451
- package/esm/index.js +31 -49
- package/esm/index.js.map +1 -1
- package/lib/index.js +31 -49
- package/lib/index.js.map +1 -1
- package/package.json +11 -11
package/lib/index.js
CHANGED
|
@@ -89,7 +89,6 @@ const SHEET_COMPONENT_DEFAULT_OPTIONS = {
|
|
|
89
89
|
autoAdjustBoundary: "body",
|
|
90
90
|
operation: {
|
|
91
91
|
hiddenColumns: true,
|
|
92
|
-
trend: false,
|
|
93
92
|
sort: true
|
|
94
93
|
}
|
|
95
94
|
},
|
|
@@ -2420,11 +2419,12 @@ const useEvents = (s2Ref, emit) => {
|
|
|
2420
2419
|
useCellEvent(s2Ref, emit, s2.S2Event.ROW_CELL_MOUSE_DOWN, "rowCellMouseDown");
|
|
2421
2420
|
useCellEvent(s2Ref, emit, s2.S2Event.ROW_CELL_MOUSE_UP, "rowCellMouseUp");
|
|
2422
2421
|
useCellEvent(s2Ref, emit, s2.S2Event.ROW_CELL_MOUSE_MOVE, "rowCellMouseMove");
|
|
2422
|
+
useS2Event(s2Ref, emit, s2.S2Event.ROW_CELL_COLLAPSED, "rowCellCollapsed");
|
|
2423
2423
|
useS2Event(
|
|
2424
2424
|
s2Ref,
|
|
2425
2425
|
emit,
|
|
2426
|
-
s2.S2Event.
|
|
2427
|
-
"
|
|
2426
|
+
s2.S2Event.ROW_CELL_ALL_COLLAPSED,
|
|
2427
|
+
"rowCellAllCollapsed"
|
|
2428
2428
|
);
|
|
2429
2429
|
useS2Event(s2Ref, emit, s2.S2Event.ROW_CELL_SCROLL, "rowCellScroll");
|
|
2430
2430
|
useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_HOVER, "colCellHover");
|
|
@@ -2444,6 +2444,8 @@ const useEvents = (s2Ref, emit) => {
|
|
|
2444
2444
|
useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_MOUSE_DOWN, "colCellMouseDown");
|
|
2445
2445
|
useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_MOUSE_UP, "colCellMouseUp");
|
|
2446
2446
|
useCellEvent(s2Ref, emit, s2.S2Event.COL_CELL_MOUSE_MOVE, "colCellMouseMove");
|
|
2447
|
+
useS2Event(s2Ref, emit, s2.S2Event.COL_CELL_EXPANDED, "colCellExpanded");
|
|
2448
|
+
useS2Event(s2Ref, emit, s2.S2Event.COL_CELL_HIDDEN, "colCellHidden");
|
|
2447
2449
|
useCellEvent(s2Ref, emit, s2.S2Event.DATA_CELL_HOVER, "dataCellHover");
|
|
2448
2450
|
useCellEvent(s2Ref, emit, s2.S2Event.DATA_CELL_CLICK, "dataCellClick");
|
|
2449
2451
|
useCellEvent(
|
|
@@ -2471,12 +2473,6 @@ const useEvents = (s2Ref, emit) => {
|
|
|
2471
2473
|
s2.S2Event.DATA_CELL_MOUSE_MOVE,
|
|
2472
2474
|
"dataCellMouseMove"
|
|
2473
2475
|
);
|
|
2474
|
-
useS2Event(
|
|
2475
|
-
s2Ref,
|
|
2476
|
-
emit,
|
|
2477
|
-
s2.S2Event.DATA_CELL_TREND_ICON_CLICK,
|
|
2478
|
-
"dataCellTrendIconClick"
|
|
2479
|
-
);
|
|
2480
2476
|
useS2Event(
|
|
2481
2477
|
s2Ref,
|
|
2482
2478
|
emit,
|
|
@@ -2565,20 +2561,6 @@ const useEvents = (s2Ref, emit) => {
|
|
|
2565
2561
|
);
|
|
2566
2562
|
useS2Event(s2Ref, emit, s2.S2Event.LAYOUT_PAGINATION, "layoutPagination");
|
|
2567
2563
|
useS2Event(s2Ref, emit, s2.S2Event.LAYOUT_CELL_SCROLL, "layoutCellScroll");
|
|
2568
|
-
useS2Event(
|
|
2569
|
-
s2Ref,
|
|
2570
|
-
emit,
|
|
2571
|
-
s2.S2Event.LAYOUT_AFTER_COLLAPSE_ROWS,
|
|
2572
|
-
"layoutAfterCollapseRows"
|
|
2573
|
-
);
|
|
2574
|
-
useS2Event(
|
|
2575
|
-
s2Ref,
|
|
2576
|
-
emit,
|
|
2577
|
-
s2.S2Event.LAYOUT_TREE_ROWS_COLLAPSE_ALL,
|
|
2578
|
-
"collapseRowsAll"
|
|
2579
|
-
);
|
|
2580
|
-
useS2Event(s2Ref, emit, s2.S2Event.LAYOUT_COLS_EXPANDED, "layoutColsExpanded");
|
|
2581
|
-
useS2Event(s2Ref, emit, s2.S2Event.LAYOUT_COLS_HIDDEN, "layoutColsHidden");
|
|
2582
2564
|
useS2Event(s2Ref, emit, s2.S2Event.LAYOUT_BEFORE_RENDER, "beforeRender");
|
|
2583
2565
|
useS2Event(s2Ref, emit, s2.S2Event.LAYOUT_AFTER_RENDER, "afterRender");
|
|
2584
2566
|
useS2Event(s2Ref, emit, s2.S2Event.LAYOUT_DESTROY, "destroy");
|
|
@@ -2661,6 +2643,12 @@ const useEvents = (s2Ref, emit) => {
|
|
|
2661
2643
|
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_RESET, "reset");
|
|
2662
2644
|
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_LINK_FIELD_JUMP, "linkFieldJump");
|
|
2663
2645
|
useS2Event(s2Ref, emit, s2.S2Event.GLOBAL_SCROLL, "scroll");
|
|
2646
|
+
useS2Event(
|
|
2647
|
+
s2Ref,
|
|
2648
|
+
emit,
|
|
2649
|
+
s2.S2Event.LAYOUT_AFTER_REAL_DATA_CELL_RENDER,
|
|
2650
|
+
"layoutAfterRealDataCellRender"
|
|
2651
|
+
);
|
|
2664
2652
|
useS2Event(
|
|
2665
2653
|
s2Ref,
|
|
2666
2654
|
emit,
|
|
@@ -2749,25 +2737,21 @@ const useSheetUpdate = (s2Ref, props) => {
|
|
|
2749
2737
|
};
|
|
2750
2738
|
const useResize = (s2Ref, props, dom) => {
|
|
2751
2739
|
const unobserve = vue.ref();
|
|
2752
|
-
vue.watch(
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
});
|
|
2768
|
-
},
|
|
2769
|
-
{ deep: true }
|
|
2770
|
-
);
|
|
2740
|
+
vue.watch([s2Ref, () => props.adaptive], ([s22, adaptive], _, onCleanup) => {
|
|
2741
|
+
if (!s22) {
|
|
2742
|
+
return;
|
|
2743
|
+
}
|
|
2744
|
+
unobserve.value = createResizeObserver({
|
|
2745
|
+
s2: s22,
|
|
2746
|
+
adaptive,
|
|
2747
|
+
wrapper: dom.wrapperRef.value,
|
|
2748
|
+
container: dom.containerRef.value
|
|
2749
|
+
});
|
|
2750
|
+
onCleanup(() => {
|
|
2751
|
+
var _a;
|
|
2752
|
+
(_a = unobserve.value) == null ? void 0 : _a.call(unobserve);
|
|
2753
|
+
});
|
|
2754
|
+
});
|
|
2771
2755
|
};
|
|
2772
2756
|
function useSpreadSheet(props, emit) {
|
|
2773
2757
|
const {
|
|
@@ -2885,7 +2869,8 @@ const initBaseSheetEmits = () => {
|
|
|
2885
2869
|
"rowCellMouseDown",
|
|
2886
2870
|
"rowCellMouseUp",
|
|
2887
2871
|
"rowCellMouseMove",
|
|
2888
|
-
"
|
|
2872
|
+
"rowCellCollapsed",
|
|
2873
|
+
"rowCellAllCollapsed",
|
|
2889
2874
|
"rowCellScroll",
|
|
2890
2875
|
"colCellHover",
|
|
2891
2876
|
"colCellClick",
|
|
@@ -2894,6 +2879,8 @@ const initBaseSheetEmits = () => {
|
|
|
2894
2879
|
"colCellMouseDown",
|
|
2895
2880
|
"colCellMouseUp",
|
|
2896
2881
|
"colCellMouseMove",
|
|
2882
|
+
"colCellExpanded",
|
|
2883
|
+
"colCellHidden",
|
|
2897
2884
|
"dataCellHover",
|
|
2898
2885
|
"dataCellClick",
|
|
2899
2886
|
"dataCellDoubleClick",
|
|
@@ -2901,7 +2888,6 @@ const initBaseSheetEmits = () => {
|
|
|
2901
2888
|
"dataCellMouseDown",
|
|
2902
2889
|
"dataCellMouseUp",
|
|
2903
2890
|
"dataCellMouseMove",
|
|
2904
|
-
"dataCellTrendIconClick",
|
|
2905
2891
|
"dataCellBrushSelection",
|
|
2906
2892
|
"dataCellSelectMove",
|
|
2907
2893
|
"cornerCellHover",
|
|
@@ -2925,11 +2911,6 @@ const initBaseSheetEmits = () => {
|
|
|
2925
2911
|
"layoutAfterHeaderLayout",
|
|
2926
2912
|
"layoutPagination",
|
|
2927
2913
|
"layoutCellScroll",
|
|
2928
|
-
"layoutCollapseRows",
|
|
2929
|
-
"layoutAfterCollapseRows",
|
|
2930
|
-
"collapseRowsAll",
|
|
2931
|
-
"layoutColsExpanded",
|
|
2932
|
-
"layoutColsHidden",
|
|
2933
2914
|
"beforeRender",
|
|
2934
2915
|
"afterRender",
|
|
2935
2916
|
"mounted",
|
|
@@ -2961,6 +2942,7 @@ const initBaseSheetEmits = () => {
|
|
|
2961
2942
|
"doubleClick",
|
|
2962
2943
|
"scroll",
|
|
2963
2944
|
"hover",
|
|
2945
|
+
"layoutAfterRealDataCellRender",
|
|
2964
2946
|
"rowCellBrushSelection",
|
|
2965
2947
|
"colCellBrushSelection"
|
|
2966
2948
|
];
|