@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/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,24 +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
|
-
if (!s22) {
|
|
2756
|
-
return;
|
|
2757
|
-
}
|
|
2758
|
-
unobserve.value = createResizeObserver({
|
|
2759
|
-
s2: s22,
|
|
2760
|
-
adaptive,
|
|
2761
|
-
wrapper: dom.wrapperRef.value,
|
|
2762
|
-
container: dom.containerRef.value
|
|
2763
|
-
});
|
|
2764
|
-
onCleanup(() => {
|
|
2765
|
-
var _a;
|
|
2766
|
-
(_a = unobserve.value) == null ? void 0 : _a.call(unobserve);
|
|
2767
|
-
});
|
|
2740
|
+
vue.watch([s2Ref, () => props.adaptive], ([s22, adaptive], _, onCleanup) => {
|
|
2741
|
+
if (!s22) {
|
|
2742
|
+
return;
|
|
2768
2743
|
}
|
|
2769
|
-
|
|
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
|
+
});
|
|
2770
2755
|
};
|
|
2771
2756
|
function useSpreadSheet(props, emit) {
|
|
2772
2757
|
const {
|
|
@@ -2884,7 +2869,8 @@ const initBaseSheetEmits = () => {
|
|
|
2884
2869
|
"rowCellMouseDown",
|
|
2885
2870
|
"rowCellMouseUp",
|
|
2886
2871
|
"rowCellMouseMove",
|
|
2887
|
-
"
|
|
2872
|
+
"rowCellCollapsed",
|
|
2873
|
+
"rowCellAllCollapsed",
|
|
2888
2874
|
"rowCellScroll",
|
|
2889
2875
|
"colCellHover",
|
|
2890
2876
|
"colCellClick",
|
|
@@ -2893,6 +2879,8 @@ const initBaseSheetEmits = () => {
|
|
|
2893
2879
|
"colCellMouseDown",
|
|
2894
2880
|
"colCellMouseUp",
|
|
2895
2881
|
"colCellMouseMove",
|
|
2882
|
+
"colCellExpanded",
|
|
2883
|
+
"colCellHidden",
|
|
2896
2884
|
"dataCellHover",
|
|
2897
2885
|
"dataCellClick",
|
|
2898
2886
|
"dataCellDoubleClick",
|
|
@@ -2900,7 +2888,6 @@ const initBaseSheetEmits = () => {
|
|
|
2900
2888
|
"dataCellMouseDown",
|
|
2901
2889
|
"dataCellMouseUp",
|
|
2902
2890
|
"dataCellMouseMove",
|
|
2903
|
-
"dataCellTrendIconClick",
|
|
2904
2891
|
"dataCellBrushSelection",
|
|
2905
2892
|
"dataCellSelectMove",
|
|
2906
2893
|
"cornerCellHover",
|
|
@@ -2924,11 +2911,6 @@ const initBaseSheetEmits = () => {
|
|
|
2924
2911
|
"layoutAfterHeaderLayout",
|
|
2925
2912
|
"layoutPagination",
|
|
2926
2913
|
"layoutCellScroll",
|
|
2927
|
-
"layoutCollapseRows",
|
|
2928
|
-
"layoutAfterCollapseRows",
|
|
2929
|
-
"collapseRowsAll",
|
|
2930
|
-
"layoutColsExpanded",
|
|
2931
|
-
"layoutColsHidden",
|
|
2932
2914
|
"beforeRender",
|
|
2933
2915
|
"afterRender",
|
|
2934
2916
|
"mounted",
|
|
@@ -2960,6 +2942,7 @@ const initBaseSheetEmits = () => {
|
|
|
2960
2942
|
"doubleClick",
|
|
2961
2943
|
"scroll",
|
|
2962
2944
|
"hover",
|
|
2945
|
+
"layoutAfterRealDataCellRender",
|
|
2963
2946
|
"rowCellBrushSelection",
|
|
2964
2947
|
"colCellBrushSelection"
|
|
2965
2948
|
];
|