@antv/s2-vue 2.0.0-next.5 → 2.0.0-next.7

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
@@ -1,8 +1,8 @@
1
1
  .antv-s2-tooltip-operator {
2
- color: rgba(0, 0, 0, 0.65);
2
+ color: var(--antv-s2-font, rgba(0, 0, 0, 0.65));
3
+ background: var(--antv-s2-tooltip-operator-background, #f9f9f9);
3
4
  font-size: 12px;
4
5
  line-height: 32px;
5
- background: #f9f9f9;
6
6
  padding: 0 12px;
7
7
  border: 0;
8
8
  cursor: pointer;
@@ -14,7 +14,7 @@
14
14
  .antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu {
15
15
  font-size: 12px;
16
16
  line-height: 32px;
17
- color: rgba(0, 0, 0, 0.65);
17
+ color: var(--antv-s2-font, rgba(0, 0, 0, 0.65));
18
18
  border: 0;
19
19
  margin: 0 -12px;
20
20
  }
@@ -28,7 +28,7 @@
28
28
  height: 30px;
29
29
  }
30
30
  .antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu .ant-menu-submenu > .ant-menu-submenu-title .ant-menu-submenu-arrow {
31
- color: rgba(0, 0, 0, 0.65);
31
+ color: var(--antv-s2-font, rgba(0, 0, 0, 0.65));
32
32
  }
33
33
  .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-item,
34
34
  .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-item,
@@ -44,7 +44,7 @@
44
44
  .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-item:not(.ant-menu-item-active),
45
45
  .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-item:not(.ant-menu-item-active),
46
46
  .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-item:not(.ant-menu-item-active) {
47
- color: rgba(0, 0, 0, 0.65);
47
+ color: var(--antv-s2-font, rgba(0, 0, 0, 0.65));
48
48
  }
49
49
  .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title,
50
50
  .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title,
@@ -67,7 +67,7 @@
67
67
  .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu .ant-menu-submenu-title:not(.ant-menu-item-active),
68
68
  .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title:not(.ant-menu-item-active),
69
69
  .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title:not(.ant-menu-item-active) {
70
- color: rgba(0, 0, 0, 0.65);
70
+ color: var(--antv-s2-font, rgba(0, 0, 0, 0.65));
71
71
  }
72
72
  .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title .ant-dropdown-menu-title-content,
73
73
  .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title .ant-dropdown-menu-title-content,
@@ -95,7 +95,7 @@
95
95
  }
96
96
  .antv-s2-tooltip-operator-submenu-popup .ant-dropdown-menu-item:not(.ant-menu-item-active),
97
97
  .antv-s2-tooltip-operator-submenu-popup .ant-menu-item:not(.ant-menu-item-active) {
98
- color: rgba(0, 0, 0, 0.65);
98
+ color: var(--antv-s2-font, rgba(0, 0, 0, 0.65));
99
99
  }
100
100
  .antv-s2-tooltip-operator-submenu-popup .ant-menu-vertical .ant-menu-item {
101
101
  margin: 0;
@@ -112,6 +112,7 @@
112
112
  .antv-s2-tooltip-operator-icon svg {
113
113
  width: 12px;
114
114
  height: 12px;
115
+ fill: var(--antv-s2-font);
115
116
  }
116
117
  @media only screen and (max-device-width: 480px) {
117
118
  .antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu {
@@ -144,7 +145,7 @@
144
145
  .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu .ant-menu-submenu-title:not(.ant-menu-item-active),
145
146
  .antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title:not(.ant-menu-item-active),
146
147
  .antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title:not(.ant-menu-item-active) {
147
- color: rgba(0, 0, 0, 0.65);
148
+ color: var(--antv-s2-font, rgba(0, 0, 0, 0.65));
148
149
  }
149
150
  .antv-s2-tooltip-operator-submenu-popup .ant-dropdown-menu-item,
150
151
  .antv-s2-tooltip-operator-submenu-popup .ant-menu-item {
@@ -152,7 +153,7 @@
152
153
  }
153
154
  .antv-s2-tooltip-operator-submenu-popup .ant-dropdown-menu-item:not(.ant-menu-item-active),
154
155
  .antv-s2-tooltip-operator-submenu-popup .ant-menu-item:not(.ant-menu-item-active) {
155
- color: rgba(0, 0, 0, 0.65);
156
+ color: var(--antv-s2-font, rgba(0, 0, 0, 0.65));
156
157
  }
157
158
  .antv-s2-tooltip-operator-icon svg {
158
159
  width: 12px;
@@ -168,7 +169,7 @@
168
169
  overflow: auto;
169
170
  z-index: 1024;
170
171
  display: inline-block;
171
- background: rgba(255, 255, 255, 0.96);
172
+ background: var(--antv-s2-tooltip-background, rgba(255, 255, 255, 0.95));
172
173
  border-radius: 2px;
173
174
  box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.2);
174
175
  font-size: 12px;
@@ -192,22 +193,22 @@
192
193
  padding: 12px;
193
194
  line-height: 16px;
194
195
  overflow-wrap: break-word;
195
- color: rgba(0, 0, 0, 0.85);
196
+ color: var(--antv-s2-font-85, rgba(0, 0, 0, 0.85));
196
197
  }
197
198
  .antv-s2-tooltip-description {
198
199
  padding: 0 12px 12px;
199
200
  line-height: 16px;
200
201
  overflow-wrap: break-word;
201
- color: rgba(0, 0, 0, 0.45);
202
+ color: var(--antv-s2-font-45, rgba(0, 0, 0, 0.45));
202
203
  }
203
204
  .antv-s2-tooltip-tips {
204
205
  padding: 4px 12px;
205
- color: rgba(0, 0, 0, 0.45);
206
+ color: var(--antv-s2-font-45, rgba(0, 0, 0, 0.45));
206
207
  }
207
208
  .antv-s2-tooltip-infos {
208
209
  padding: 4px 12px;
209
210
  line-height: 20px;
210
- color: rgba(0, 0, 0, 0.45);
211
+ color: var(--antv-s2-font-45, rgba(0, 0, 0, 0.45));
211
212
  overflow: hidden;
212
213
  text-overflow: ellipsis;
213
214
  -webkit-line-clamp: 2;
@@ -220,7 +221,7 @@
220
221
  }
221
222
  .antv-s2-tooltip-summary {
222
223
  line-height: 20px;
223
- color: rgba(0, 0, 0, 0.65);
224
+ color: var(--antv-s2-font-65, rgba(0, 0, 0, 0.65));
224
225
  overflow: hidden;
225
226
  padding: 12px;
226
227
  }
@@ -243,7 +244,7 @@
243
244
  padding: 12px;
244
245
  }
245
246
  .antv-s2-tooltip-interpretation + .antv-s2-tooltip-head-info-list {
246
- border-top: 1px solid #e9e9e9;
247
+ border-top: 1px solid var(--antv-s2-border, #e9e9e9);
247
248
  }
248
249
  .antv-s2-tooltip-interpretation .antv-s2-tooltip-interpretation-head {
249
250
  margin-bottom: 12px;
@@ -253,10 +254,10 @@
253
254
  height: 14px;
254
255
  }
255
256
  .antv-s2-tooltip-interpretation .antv-s2-tooltip-interpretation-head .antv-s2-tooltip-interpretation-name {
256
- color: #000;
257
+ color: var(--antv-s2-font, #000);
257
258
  }
258
259
  .antv-s2-tooltip-head-info-list {
259
- color: #a2a2a2;
260
+ color: var(--antv-s2-font-65, #a2a2a2);
260
261
  padding: 12px 12px 4px;
261
262
  line-height: 24px;
262
263
  word-break: break-word;
@@ -269,13 +270,13 @@
269
270
  margin-right: 5px;
270
271
  }
271
272
  .antv-s2-tooltip-highlight {
272
- color: rgba(0, 0, 0, 0.85);
273
+ color: var(--antv-s2-font-85, rgba(0, 0, 0, 0.85));
273
274
  }
274
275
  .antv-s2-tooltip-detail-list {
275
276
  padding: 2px 12px 8px;
276
277
  }
277
278
  .antv-s2-tooltip-detail-list .antv-s2-tooltip-detail-item {
278
- color: rgba(0, 0, 0, 0.65);
279
+ color: var(--antv-s2-font-65, rgba(0, 0, 0, 0.65));
279
280
  overflow: hidden;
280
281
  margin: 4px 0;
281
282
  display: flex;
@@ -362,6 +363,12 @@
362
363
  overflow-y: auto;
363
364
  overflow-x: hidden;
364
365
  }
366
+ .antv-s2-drill-down-menu.ant-menu[data-v-8dd920ec] {
367
+ background: var(--antv-s2-tooltip-background, #fff);
368
+ }
369
+ .antv-s2-drill-down-menu.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected[data-v-8dd920ec] {
370
+ background-color: var(--antv-s2-block-background, #e6f7ff);
371
+ }
365
372
  .antv-s2-drill-down-menu-item[data-v-8dd920ec] {
366
373
  height: 32px !important;
367
374
  line-height: 32px !important;
package/lib/index.js CHANGED
@@ -93,7 +93,7 @@ const Locale = {
93
93
  };
94
94
  const SHEET_COMPONENT_DEFAULT_OPTIONS = {
95
95
  tooltip: {
96
- showTooltip: true,
96
+ enable: true,
97
97
  autoAdjustBoundary: "body",
98
98
  operation: {
99
99
  hiddenColumns: true,
@@ -1725,10 +1725,10 @@ const buildDrillDownOptions = (options, partDrillDown, callback) => {
1725
1725
  if (!isEmpty(partDrillDown)) {
1726
1726
  const drillDownActionIcon = {
1727
1727
  belongsCell: "rowCell",
1728
- iconNames: ["DrillDownIcon"],
1728
+ icons: ["DrillDownIcon"],
1729
1729
  defaultHide: true,
1730
1730
  displayCondition: partDrillDown.displayCondition || defaultPartDrillDownDisplayCondition,
1731
- action: (actionIconProps) => {
1731
+ onClick: (actionIconProps) => {
1732
1732
  const { iconName, meta, event } = actionIconProps;
1733
1733
  if (iconName === "DrillDownIcon") {
1734
1734
  meta.spreadsheet.store.set("drillDownNode", meta);
@@ -2065,7 +2065,7 @@ const _sfc_main$7 = vue.defineComponent({
2065
2065
  name: "TooltipOperator",
2066
2066
  props: [
2067
2067
  "menus",
2068
- "onlyMenu",
2068
+ "onlyShowOperator",
2069
2069
  "onClick",
2070
2070
  "cell"
2071
2071
  ],
@@ -2094,7 +2094,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
2094
2094
  return vue.openBlock(), vue.createElementBlock("div", {
2095
2095
  class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator`)
2096
2096
  }, [
2097
- _ctx.onlyMenu ? (vue.openBlock(), vue.createBlock(_component_Menu, {
2097
+ _ctx.onlyShowOperator ? (vue.openBlock(), vue.createBlock(_component_Menu, {
2098
2098
  key: 0,
2099
2099
  class: vue.normalizeClass(`${_ctx.TOOLTIP_PREFIX_CLS}-operator-menus`),
2100
2100
  onClick: _ctx.onMenuClick
@@ -2161,10 +2161,12 @@ const _sfc_main$6 = vue.defineComponent({
2161
2161
  "content"
2162
2162
  ],
2163
2163
  setup(props) {
2164
- const { operator, onlyMenu } = s2.getTooltipDefaultOptions(props.options);
2164
+ const { operator, onlyShowOperator } = s2.getTooltipDefaultOptions(
2165
+ props.options
2166
+ );
2165
2167
  return {
2166
2168
  operator,
2167
- onlyMenu
2169
+ onlyShowOperator
2168
2170
  };
2169
2171
  },
2170
2172
  components: {
@@ -2185,16 +2187,16 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
2185
2187
  const _component_TooltipHeadInfo = vue.resolveComponent("TooltipHeadInfo");
2186
2188
  const _component_TooltipDetail = vue.resolveComponent("TooltipDetail");
2187
2189
  const _component_TooltipInfos = vue.resolveComponent("TooltipInfos");
2188
- return _ctx.onlyMenu ? (vue.openBlock(), vue.createBlock(_component_TooltipOperator, {
2190
+ return _ctx.onlyShowOperator ? (vue.openBlock(), vue.createBlock(_component_TooltipOperator, {
2189
2191
  key: 0,
2190
2192
  menus: ((_a = _ctx.operator) == null ? void 0 : _a.menus) || [],
2191
- onlyMenu: true,
2193
+ onlyShowOperator: true,
2192
2194
  cell: _ctx.cell,
2193
2195
  onClick: (_b = _ctx.operator) == null ? void 0 : _b.onClick
2194
2196
  }, null, 8, ["menus", "cell", "onClick"])) : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
2195
2197
  vue.createVNode(_component_TooltipOperator, {
2196
2198
  menus: ((_c = _ctx.operator) == null ? void 0 : _c.menus) || [],
2197
- onlyMenu: false,
2199
+ onlyShowOperator: false,
2198
2200
  cell: _ctx.cell,
2199
2201
  onClick: (_d = _ctx.operator) == null ? void 0 : _d.onClick
2200
2202
  }, null, 8, ["menus", "cell", "onClick"]),
@@ -2386,7 +2388,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
2386
2388
  const S2Pagination = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["render", _sfc_render$5]]);
2387
2389
  const RENDER_TOOLTIP_OPTION = {
2388
2390
  tooltip: {
2389
- renderTooltip: (spreadsheet) => new CustomTooltip(spreadsheet)
2391
+ render: (spreadsheet) => new CustomTooltip(spreadsheet)
2390
2392
  }
2391
2393
  };
2392
2394
  const getSheetComponentOptions = (...options) => getBaseSheetComponentOptions(RENDER_TOOLTIP_OPTION, ...options);
@@ -2710,7 +2712,7 @@ const useSheetUpdate = (s2Ref, props) => {
2710
2712
  (dataCfg, prevDataCfg) => {
2711
2713
  var _a, _b, _c, _d, _e, _f;
2712
2714
  if (((_b = (_a = prevDataCfg == null ? void 0 : prevDataCfg.fields) == null ? void 0 : _a.columns) == null ? void 0 : _b.length) !== ((_d = (_c = dataCfg == null ? void 0 : dataCfg.fields) == null ? void 0 : _c.columns) == null ? void 0 : _d.length)) {
2713
- (_e = s2Ref.value) == null ? void 0 : _e.clearColumnLeafNodes();
2715
+ (_e = s2Ref.value) == null ? void 0 : _e.facet.clearInitColLeafNodes();
2714
2716
  }
2715
2717
  updateFlag.rerender = true;
2716
2718
  updateFlag.reloadData = true;