@antv/s2-vue 1.2.0 → 1.3.0-alpha.2

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/style.css CHANGED
@@ -260,19 +260,19 @@
260
260
  white-space: nowrap;
261
261
  max-width: 64px;
262
262
  }
263
- .s2-drill-down[data-v-6eb1ccd0] {
263
+ .s2-drill-down[data-v-3a294982] {
264
264
  width: 260px;
265
265
  min-height: 20px;
266
266
  position: relative;
267
267
  }
268
- .s2-drill-down-header[data-v-6eb1ccd0] {
268
+ .s2-drill-down-header[data-v-3a294982] {
269
269
  display: flex;
270
270
  height: 32px;
271
271
  font-size: 14px;
272
272
  padding: 0 16px;
273
273
  margin-top: 16px;
274
274
  }
275
- .s2-drill-down-header button[data-v-6eb1ccd0] {
275
+ .s2-drill-down-header button[data-v-3a294982] {
276
276
  position: absolute;
277
277
  right: 0;
278
278
  top: -4px;
@@ -281,7 +281,7 @@
281
281
  letter-spacing: -0.2px;
282
282
  line-height: 20px;
283
283
  }
284
- .s2-drill-down-search[data-v-6eb1ccd0] {
284
+ .s2-drill-down-search[data-v-3a294982] {
285
285
  height: 24px;
286
286
  width: 228px !important;
287
287
  margin: 0 16px;
@@ -289,28 +289,28 @@
289
289
  border-radius: 2px;
290
290
  background-color: #fff;
291
291
  }
292
- .s2-drill-down-search input[data-v-6eb1ccd0],
293
- .s2-drill-down-search span[data-v-6eb1ccd0] {
292
+ .s2-drill-down-search input[data-v-3a294982],
293
+ .s2-drill-down-search span[data-v-3a294982] {
294
294
  font-size: 12px;
295
295
  }
296
- .s2-drill-down-menu[data-v-6eb1ccd0] {
296
+ .s2-drill-down-menu[data-v-3a294982] {
297
297
  max-height: 314px;
298
298
  overflow-y: auto;
299
299
  overflow-x: hidden;
300
300
  }
301
- .s2-drill-down-menu-item[data-v-6eb1ccd0] {
301
+ .s2-drill-down-menu-item[data-v-3a294982] {
302
302
  height: 32px !important;
303
303
  line-height: 32px !important;
304
304
  font-size: 12px;
305
305
  opacity: 0.65;
306
306
  }
307
- .s2-drill-down-menu-item span[data-v-6eb1ccd0]:last-child {
307
+ .s2-drill-down-menu-item span[data-v-3a294982]:last-child {
308
308
  line-height: 32px;
309
309
  }
310
- .s2-drill-down-menu-item svg[data-v-6eb1ccd0] {
310
+ .s2-drill-down-menu-item svg[data-v-3a294982] {
311
311
  margin-right: 8px;
312
312
  }
313
- .s2-drill-down-empty[data-v-6eb1ccd0] {
313
+ .s2-drill-down-empty[data-v-3a294982] {
314
314
  padding: 18px 18px 0;
315
315
  font-size: 12px;
316
316
  }
package/lib/index.js CHANGED
@@ -1621,17 +1621,20 @@ function size(collection) {
1621
1621
  }
1622
1622
  return baseKeys(collection).length;
1623
1623
  }
1624
- const analyzeAdaptive = (paramsContainer, adaptive) => {
1624
+ const analyzeAdaptive = (defaultContainer, adaptive) => {
1625
1625
  var _a, _b, _c;
1626
- let container = paramsContainer;
1627
- let adaptiveWidth = true;
1628
- let adaptiveHeight = false;
1629
- if (typeof adaptive !== "boolean") {
1630
- container = ((_a = adaptive == null ? void 0 : adaptive.getContainer) == null ? void 0 : _a.call(adaptive)) || paramsContainer;
1631
- adaptiveWidth = (_b = adaptive == null ? void 0 : adaptive.width) != null ? _b : true;
1632
- adaptiveHeight = (_c = adaptive == null ? void 0 : adaptive.height) != null ? _c : true;
1633
- }
1634
- return { container, adaptiveWidth, adaptiveHeight };
1626
+ if (isBoolean(adaptive)) {
1627
+ return {
1628
+ container: defaultContainer,
1629
+ adaptiveWidth: true,
1630
+ adaptiveHeight: false
1631
+ };
1632
+ }
1633
+ return {
1634
+ container: ((_a = adaptive == null ? void 0 : adaptive.getContainer) == null ? void 0 : _a.call(adaptive)) || defaultContainer,
1635
+ adaptiveWidth: (_b = adaptive == null ? void 0 : adaptive.width) != null ? _b : true,
1636
+ adaptiveHeight: (_c = adaptive == null ? void 0 : adaptive.height) != null ? _c : true
1637
+ };
1635
1638
  };
1636
1639
  const createResizeObserver = (params) => {
1637
1640
  let isFirstRender = true;
@@ -2639,19 +2642,23 @@ const initBaseSheetEmits = () => {
2639
2642
  "rowCellHover",
2640
2643
  "rowCellClick",
2641
2644
  "rowCellDoubleClick",
2645
+ "rowCellContextMenu",
2642
2646
  "rowCellMouseDown",
2643
2647
  "rowCellMouseUp",
2644
2648
  "rowCellMouseMove",
2645
2649
  "rowCellCollapseTreeRows",
2650
+ "rowCellScroll",
2646
2651
  "colCellHover",
2647
2652
  "colCellClick",
2648
2653
  "colCellDoubleClick",
2654
+ "colCellContextMenu",
2649
2655
  "colCellMouseDown",
2650
2656
  "colCellMouseUp",
2651
2657
  "colCellMouseMove",
2652
2658
  "dataCellHover",
2653
2659
  "dataCellClick",
2654
2660
  "dataCellDoubleClick",
2661
+ "dataCellContextMenu",
2655
2662
  "dataCellMouseDown",
2656
2663
  "dataCellMouseUp",
2657
2664
  "dataCellMouseMove",
@@ -2661,12 +2668,14 @@ const initBaseSheetEmits = () => {
2661
2668
  "cornerCellHover",
2662
2669
  "cornerCellClick",
2663
2670
  "cornerCellDoubleClick",
2671
+ "cornerCellContextMenu",
2664
2672
  "cornerCellMouseDown",
2665
2673
  "cornerCellMouseUp",
2666
2674
  "cornerCellMouseMove",
2667
2675
  "mergedCellsHover",
2668
2676
  "mergedCellsClick",
2669
2677
  "mergedCellsDoubleClick",
2678
+ "mergedCellsContextMenu",
2670
2679
  "mergedCellsMouseDown",
2671
2680
  "mergedCellsMouseUp",
2672
2681
  "mergedCellsMouseMove",
@@ -2677,6 +2686,7 @@ const initBaseSheetEmits = () => {
2677
2686
  "layoutAfterHeaderLayout",
2678
2687
  "layoutPagination",
2679
2688
  "layoutCellScroll",
2689
+ "layoutCollapseRows",
2680
2690
  "layoutAfterCollapseRows",
2681
2691
  "collapseRowsAll",
2682
2692
  "layoutColsExpanded",
@@ -2698,14 +2708,19 @@ const initBaseSheetEmits = () => {
2698
2708
  "keyBoardUp",
2699
2709
  "copied",
2700
2710
  "actionIconHover",
2701
- "contextMenu",
2702
2711
  "actionIconClick",
2712
+ "contextMenu",
2703
2713
  "mouseHover",
2704
2714
  "mouseUp",
2715
+ "mouseMove",
2716
+ "mouseDown",
2705
2717
  "selected",
2706
2718
  "reset",
2707
2719
  "linkFieldJump",
2708
- "scroll"
2720
+ "click",
2721
+ "doubleClick",
2722
+ "scroll",
2723
+ "hover"
2709
2724
  ];
2710
2725
  return keys2;
2711
2726
  };
@@ -2883,16 +2898,19 @@ const _sfc_main$3 = vue.defineComponent({
2883
2898
  if (getDrillFields) {
2884
2899
  getDrillFields(key);
2885
2900
  }
2886
- if (setDrillFields)
2901
+ if (setDrillFields) {
2887
2902
  setDrillFields(key);
2903
+ }
2888
2904
  };
2889
2905
  const handleClear = (e) => {
2890
2906
  e.stopPropagation();
2891
2907
  selected.value = [];
2892
- if (getDrillFields)
2908
+ if (getDrillFields) {
2893
2909
  getDrillFields([]);
2894
- if (setDrillFields)
2910
+ }
2911
+ if (setDrillFields) {
2895
2912
  setDrillFields([]);
2913
+ }
2896
2914
  };
2897
2915
  return {
2898
2916
  options,
@@ -2973,11 +2991,11 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
2973
2991
  }, 8, ["selectedKeys", "onSelect"])
2974
2992
  ], 2);
2975
2993
  }
2976
- var DrillDown = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-6eb1ccd0"]]);
2994
+ var DrillDown = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render$3], ["__scopeId", "data-v-3a294982"]]);
2977
2995
  const _sfc_main$2 = vue.defineComponent({
2978
2996
  name: "PivotSheet",
2979
2997
  props: initBaseSheetProps(),
2980
- emits: initBaseSheetEmits(),
2998
+ emits: [],
2981
2999
  setup(props, ctx) {
2982
3000
  const s2Ref = useExpose(ctx.expose);
2983
3001
  const { options: pivotOptions } = vue.toRefs(props);