@antv/s2-vue 2.0.0-next.3 → 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 +30 -47
- package/esm/index.js.map +1 -1
- package/lib/index.js +30 -47
- package/lib/index.js.map +1 -1
- package/package.json +11 -11
package/esm/index.js
CHANGED
|
@@ -87,7 +87,6 @@ const SHEET_COMPONENT_DEFAULT_OPTIONS = {
|
|
|
87
87
|
autoAdjustBoundary: "body",
|
|
88
88
|
operation: {
|
|
89
89
|
hiddenColumns: true,
|
|
90
|
-
trend: false,
|
|
91
90
|
sort: true
|
|
92
91
|
}
|
|
93
92
|
},
|
|
@@ -2418,11 +2417,12 @@ const useEvents = (s2Ref, emit) => {
|
|
|
2418
2417
|
useCellEvent(s2Ref, emit, S2Event.ROW_CELL_MOUSE_DOWN, "rowCellMouseDown");
|
|
2419
2418
|
useCellEvent(s2Ref, emit, S2Event.ROW_CELL_MOUSE_UP, "rowCellMouseUp");
|
|
2420
2419
|
useCellEvent(s2Ref, emit, S2Event.ROW_CELL_MOUSE_MOVE, "rowCellMouseMove");
|
|
2420
|
+
useS2Event(s2Ref, emit, S2Event.ROW_CELL_COLLAPSED, "rowCellCollapsed");
|
|
2421
2421
|
useS2Event(
|
|
2422
2422
|
s2Ref,
|
|
2423
2423
|
emit,
|
|
2424
|
-
S2Event.
|
|
2425
|
-
"
|
|
2424
|
+
S2Event.ROW_CELL_ALL_COLLAPSED,
|
|
2425
|
+
"rowCellAllCollapsed"
|
|
2426
2426
|
);
|
|
2427
2427
|
useS2Event(s2Ref, emit, S2Event.ROW_CELL_SCROLL, "rowCellScroll");
|
|
2428
2428
|
useCellEvent(s2Ref, emit, S2Event.COL_CELL_HOVER, "colCellHover");
|
|
@@ -2442,6 +2442,8 @@ const useEvents = (s2Ref, emit) => {
|
|
|
2442
2442
|
useCellEvent(s2Ref, emit, S2Event.COL_CELL_MOUSE_DOWN, "colCellMouseDown");
|
|
2443
2443
|
useCellEvent(s2Ref, emit, S2Event.COL_CELL_MOUSE_UP, "colCellMouseUp");
|
|
2444
2444
|
useCellEvent(s2Ref, emit, S2Event.COL_CELL_MOUSE_MOVE, "colCellMouseMove");
|
|
2445
|
+
useS2Event(s2Ref, emit, S2Event.COL_CELL_EXPANDED, "colCellExpanded");
|
|
2446
|
+
useS2Event(s2Ref, emit, S2Event.COL_CELL_HIDDEN, "colCellHidden");
|
|
2445
2447
|
useCellEvent(s2Ref, emit, S2Event.DATA_CELL_HOVER, "dataCellHover");
|
|
2446
2448
|
useCellEvent(s2Ref, emit, S2Event.DATA_CELL_CLICK, "dataCellClick");
|
|
2447
2449
|
useCellEvent(
|
|
@@ -2469,12 +2471,6 @@ const useEvents = (s2Ref, emit) => {
|
|
|
2469
2471
|
S2Event.DATA_CELL_MOUSE_MOVE,
|
|
2470
2472
|
"dataCellMouseMove"
|
|
2471
2473
|
);
|
|
2472
|
-
useS2Event(
|
|
2473
|
-
s2Ref,
|
|
2474
|
-
emit,
|
|
2475
|
-
S2Event.DATA_CELL_TREND_ICON_CLICK,
|
|
2476
|
-
"dataCellTrendIconClick"
|
|
2477
|
-
);
|
|
2478
2474
|
useS2Event(
|
|
2479
2475
|
s2Ref,
|
|
2480
2476
|
emit,
|
|
@@ -2563,20 +2559,6 @@ const useEvents = (s2Ref, emit) => {
|
|
|
2563
2559
|
);
|
|
2564
2560
|
useS2Event(s2Ref, emit, S2Event.LAYOUT_PAGINATION, "layoutPagination");
|
|
2565
2561
|
useS2Event(s2Ref, emit, S2Event.LAYOUT_CELL_SCROLL, "layoutCellScroll");
|
|
2566
|
-
useS2Event(
|
|
2567
|
-
s2Ref,
|
|
2568
|
-
emit,
|
|
2569
|
-
S2Event.LAYOUT_AFTER_COLLAPSE_ROWS,
|
|
2570
|
-
"layoutAfterCollapseRows"
|
|
2571
|
-
);
|
|
2572
|
-
useS2Event(
|
|
2573
|
-
s2Ref,
|
|
2574
|
-
emit,
|
|
2575
|
-
S2Event.LAYOUT_TREE_ROWS_COLLAPSE_ALL,
|
|
2576
|
-
"collapseRowsAll"
|
|
2577
|
-
);
|
|
2578
|
-
useS2Event(s2Ref, emit, S2Event.LAYOUT_COLS_EXPANDED, "layoutColsExpanded");
|
|
2579
|
-
useS2Event(s2Ref, emit, S2Event.LAYOUT_COLS_HIDDEN, "layoutColsHidden");
|
|
2580
2562
|
useS2Event(s2Ref, emit, S2Event.LAYOUT_BEFORE_RENDER, "beforeRender");
|
|
2581
2563
|
useS2Event(s2Ref, emit, S2Event.LAYOUT_AFTER_RENDER, "afterRender");
|
|
2582
2564
|
useS2Event(s2Ref, emit, S2Event.LAYOUT_DESTROY, "destroy");
|
|
@@ -2659,6 +2641,12 @@ const useEvents = (s2Ref, emit) => {
|
|
|
2659
2641
|
useS2Event(s2Ref, emit, S2Event.GLOBAL_RESET, "reset");
|
|
2660
2642
|
useS2Event(s2Ref, emit, S2Event.GLOBAL_LINK_FIELD_JUMP, "linkFieldJump");
|
|
2661
2643
|
useS2Event(s2Ref, emit, S2Event.GLOBAL_SCROLL, "scroll");
|
|
2644
|
+
useS2Event(
|
|
2645
|
+
s2Ref,
|
|
2646
|
+
emit,
|
|
2647
|
+
S2Event.LAYOUT_AFTER_REAL_DATA_CELL_RENDER,
|
|
2648
|
+
"layoutAfterRealDataCellRender"
|
|
2649
|
+
);
|
|
2662
2650
|
useS2Event(
|
|
2663
2651
|
s2Ref,
|
|
2664
2652
|
emit,
|
|
@@ -2747,24 +2735,21 @@ const useSheetUpdate = (s2Ref, props) => {
|
|
|
2747
2735
|
};
|
|
2748
2736
|
const useResize = (s2Ref, props, dom) => {
|
|
2749
2737
|
const unobserve = ref();
|
|
2750
|
-
watch(
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
if (!s2) {
|
|
2754
|
-
return;
|
|
2755
|
-
}
|
|
2756
|
-
unobserve.value = createResizeObserver({
|
|
2757
|
-
s2,
|
|
2758
|
-
adaptive,
|
|
2759
|
-
wrapper: dom.wrapperRef.value,
|
|
2760
|
-
container: dom.containerRef.value
|
|
2761
|
-
});
|
|
2762
|
-
onCleanup(() => {
|
|
2763
|
-
var _a;
|
|
2764
|
-
(_a = unobserve.value) == null ? void 0 : _a.call(unobserve);
|
|
2765
|
-
});
|
|
2738
|
+
watch([s2Ref, () => props.adaptive], ([s2, adaptive], _, onCleanup) => {
|
|
2739
|
+
if (!s2) {
|
|
2740
|
+
return;
|
|
2766
2741
|
}
|
|
2767
|
-
|
|
2742
|
+
unobserve.value = createResizeObserver({
|
|
2743
|
+
s2,
|
|
2744
|
+
adaptive,
|
|
2745
|
+
wrapper: dom.wrapperRef.value,
|
|
2746
|
+
container: dom.containerRef.value
|
|
2747
|
+
});
|
|
2748
|
+
onCleanup(() => {
|
|
2749
|
+
var _a;
|
|
2750
|
+
(_a = unobserve.value) == null ? void 0 : _a.call(unobserve);
|
|
2751
|
+
});
|
|
2752
|
+
});
|
|
2768
2753
|
};
|
|
2769
2754
|
function useSpreadSheet(props, emit) {
|
|
2770
2755
|
const {
|
|
@@ -2882,7 +2867,8 @@ const initBaseSheetEmits = () => {
|
|
|
2882
2867
|
"rowCellMouseDown",
|
|
2883
2868
|
"rowCellMouseUp",
|
|
2884
2869
|
"rowCellMouseMove",
|
|
2885
|
-
"
|
|
2870
|
+
"rowCellCollapsed",
|
|
2871
|
+
"rowCellAllCollapsed",
|
|
2886
2872
|
"rowCellScroll",
|
|
2887
2873
|
"colCellHover",
|
|
2888
2874
|
"colCellClick",
|
|
@@ -2891,6 +2877,8 @@ const initBaseSheetEmits = () => {
|
|
|
2891
2877
|
"colCellMouseDown",
|
|
2892
2878
|
"colCellMouseUp",
|
|
2893
2879
|
"colCellMouseMove",
|
|
2880
|
+
"colCellExpanded",
|
|
2881
|
+
"colCellHidden",
|
|
2894
2882
|
"dataCellHover",
|
|
2895
2883
|
"dataCellClick",
|
|
2896
2884
|
"dataCellDoubleClick",
|
|
@@ -2898,7 +2886,6 @@ const initBaseSheetEmits = () => {
|
|
|
2898
2886
|
"dataCellMouseDown",
|
|
2899
2887
|
"dataCellMouseUp",
|
|
2900
2888
|
"dataCellMouseMove",
|
|
2901
|
-
"dataCellTrendIconClick",
|
|
2902
2889
|
"dataCellBrushSelection",
|
|
2903
2890
|
"dataCellSelectMove",
|
|
2904
2891
|
"cornerCellHover",
|
|
@@ -2922,11 +2909,6 @@ const initBaseSheetEmits = () => {
|
|
|
2922
2909
|
"layoutAfterHeaderLayout",
|
|
2923
2910
|
"layoutPagination",
|
|
2924
2911
|
"layoutCellScroll",
|
|
2925
|
-
"layoutCollapseRows",
|
|
2926
|
-
"layoutAfterCollapseRows",
|
|
2927
|
-
"collapseRowsAll",
|
|
2928
|
-
"layoutColsExpanded",
|
|
2929
|
-
"layoutColsHidden",
|
|
2930
2912
|
"beforeRender",
|
|
2931
2913
|
"afterRender",
|
|
2932
2914
|
"mounted",
|
|
@@ -2958,6 +2940,7 @@ const initBaseSheetEmits = () => {
|
|
|
2958
2940
|
"doubleClick",
|
|
2959
2941
|
"scroll",
|
|
2960
2942
|
"hover",
|
|
2943
|
+
"layoutAfterRealDataCellRender",
|
|
2961
2944
|
"rowCellBrushSelection",
|
|
2962
2945
|
"colCellBrushSelection"
|
|
2963
2946
|
];
|