@antv/s2-vue 1.1.0 → 1.2.1

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.
@@ -1 +1 @@
1
- .antv-s2-tooltip-operator{color:#000000a6;font-size:12px;line-height:32px;background:#f9f9f9;padding:0 12px;border:0;cursor:pointer}.antv-s2-tooltip-operator .ant-dropdown-trigger,.antv-s2-tooltip-operator-dropdown{padding:0 6px 0 0}.antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu{font-size:12px;line-height:32px;color:#000000a6;border:0;margin:0 -12px}.antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu .ant-menu-item{height:30px}.antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu .ant-menu-item:not(:last-child){margin:0}.antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu .ant-menu-submenu>.ant-menu-submenu-title{height:30px}.antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu .ant-menu-submenu>.ant-menu-submenu-title .ant-menu-submenu-arrow{color:#000000a6}.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-item,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-item,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-item,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-item{font-size:12px;line-height:32px;padding:0 12px;color:#000000a6;border:0;margin:0}.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu .ant-menu-submenu-title,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu .ant-menu-submenu-title,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title{padding:0 12px;font-size:12px;line-height:32px;color:#000000a6;margin:0}.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title .ant-dropdown-menu-title-content,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title .ant-dropdown-menu-title-content,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title .ant-dropdown-menu-title-content,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title .ant-dropdown-menu-title-content,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu .ant-menu-submenu-title .ant-dropdown-menu-title-content,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu .ant-menu-submenu-title .ant-dropdown-menu-title-content,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title .ant-dropdown-menu-title-content,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title .ant-dropdown-menu-title-content,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title .ant-menu-title-content,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title .ant-menu-title-content,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title .ant-menu-title-content,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title .ant-menu-title-content,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu .ant-menu-submenu-title .ant-menu-title-content,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu .ant-menu-submenu-title .ant-menu-title-content,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title .ant-menu-title-content,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title .ant-menu-title-content{margin-right:12px}.antv-s2-tooltip-operator-submenu-popup .ant-dropdown-menu-item,.antv-s2-tooltip-operator-submenu-popup .ant-menu-item{font-size:12px;line-height:32px;padding:0 12px;color:#000000a6}.antv-s2-tooltip-operator-submenu-popup .ant-menu-vertical .ant-menu-item{margin:0;height:30px;line-height:32px}.antv-s2-tooltip-operator-submenu-popup .ant-menu-vertical .ant-menu-item:not(:last-child){margin:0}.antv-s2-tooltip-operator-icon{vertical-align:middle;margin-right:4px}.antv-s2-tooltip-operator-icon svg{width:12px;height:12px}.antv-s2-tooltip-container{position:fixed;user-select:text;min-width:200px;max-width:640px;max-height:100vh;overflow:auto;z-index:1024;display:inline-block;background:rgba(255,255,255,.96);border-radius:2px;box-shadow:0 1px 4px #0003;font-size:12px;font-family:Roboto,PingFang SC,Chinese Quote,BlinkMacSystemFont,Segoe UI,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif}.antv-s2-tooltip-container-hide{opacity:0;visibility:hidden;pointer-events:none}.antv-s2-tooltip-container-hide *{transition:none}.antv-s2-tooltip-container-show{opacity:1;visibility:visible;pointer-events:all}.antv-s2-tooltip-tips,.antv-s2-tooltip-name{padding:12px;line-height:16px;overflow-wrap:break-word;color:#000000d9}.antv-s2-tooltip-tips{padding:4px 12px;color:#00000073}.antv-s2-tooltip-infos{padding:4px 12px;line-height:20px;color:#00000073;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;display:-webkit-box;-webkit-box-orient:vertical;overflow-wrap:break-word;background:rgba(249,249,249,.96);border-radius:0 0 2px 2px;background-color:#f9f9f9}.antv-s2-tooltip-summary{line-height:20px;color:#000000a6;overflow:hidden;padding:12px}.antv-s2-tooltip-summary-item{display:flex}.antv-s2-tooltip-summary-key{margin-right:20px}.antv-s2-tooltip-summary-val{flex:1;text-align:right;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.antv-s2-tooltip-interpretation{color:#000000a6;overflow:hidden;padding:12px}.antv-s2-tooltip-interpretation+.antv-s2-tooltip-head-info-list{border-top:1px solid #e9e9e9}.antv-s2-tooltip-interpretation .antv-s2-tooltip-interpretation-head{margin-bottom:12px}.antv-s2-tooltip-interpretation .antv-s2-tooltip-interpretation-head .antv-s2-tooltip-interpretation-icon{width:14px;height:14px}.antv-s2-tooltip-interpretation .antv-s2-tooltip-interpretation-head .antv-s2-tooltip-interpretation-name{color:#000}.antv-s2-tooltip-head-info-list{color:#a2a2a2;padding:12px 12px 4px;line-height:20px}.antv-s2-tooltip-bold,.antv-s2-tooltip-selected{font-weight:700}.antv-s2-tooltip-selected{margin-right:5px}.antv-s2-tooltip-highlight{color:#000000d9}.antv-s2-tooltip-detail-list{padding:2px 12px 8px}.antv-s2-tooltip-detail-list .antv-s2-tooltip-detail-item{color:#000000a6;overflow:hidden;margin:4px 0;display:flex;justify-content:space-around;align-items:center}.antv-s2-tooltip-detail-list .antv-s2-tooltip-detail-item-key{margin-right:20px}.antv-s2-tooltip-detail-list .antv-s2-tooltip-detail-item-val{flex:1;text-align:right;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ant-dropdown-menu-item.operation-item{font-size:12px}.antv-s2-spin.ant-spin-nested-loading,.antv-s2-spin>.ant-spin-container{height:100%}.antv-s2-wrapper{padding:0;margin:0;display:flex;flex-direction:column;height:100%}.antv-s2-container{overflow:auto;flex:1 1 auto}.antv-s2-container canvas{display:block}.antv-s2-pagination{display:flex;align-items:center;z-index:1024}.antv-s2-pagination-count{margin-left:12px;text-overflow:ellipsis;white-space:nowrap;max-width:64px}.s2-drill-down[data-v-6eb1ccd0]{width:260px;min-height:20px;position:relative}.s2-drill-down-header[data-v-6eb1ccd0]{display:flex;height:32px;font-size:14px;padding:0 16px;margin-top:16px}.s2-drill-down-header button[data-v-6eb1ccd0]{position:absolute;right:0;top:-4px;font-size:12px;color:#1890ff;letter-spacing:-.2px;line-height:20px}.s2-drill-down-search[data-v-6eb1ccd0]{height:24px;width:228px!important;margin:0 16px;border:1px solid rgba(0,0,0,.15);border-radius:2px;background-color:#fff}.s2-drill-down-search input[data-v-6eb1ccd0],.s2-drill-down-search span[data-v-6eb1ccd0]{font-size:12px}.s2-drill-down-menu[data-v-6eb1ccd0]{max-height:314px;overflow-y:auto;overflow-x:hidden}.s2-drill-down-menu-item[data-v-6eb1ccd0]{height:32px!important;line-height:32px!important;font-size:12px;opacity:.65}.s2-drill-down-menu-item span[data-v-6eb1ccd0]:last-child{line-height:32px}.s2-drill-down-menu-item svg[data-v-6eb1ccd0]{margin-right:8px}.s2-drill-down-empty[data-v-6eb1ccd0]{padding:18px 18px 0;font-size:12px}
1
+ .antv-s2-tooltip-operator{color:#000000a6;font-size:12px;line-height:32px;background:#f9f9f9;padding:0 12px;border:0;cursor:pointer}.antv-s2-tooltip-operator .ant-dropdown-trigger,.antv-s2-tooltip-operator-dropdown{padding:0 6px 0 0}.antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu{font-size:12px;line-height:32px;color:#000000a6;border:0;margin:0 -12px}.antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu .ant-menu-item{height:30px}.antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu .ant-menu-item:not(:last-child){margin:0}.antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu .ant-menu-submenu>.ant-menu-submenu-title{height:30px}.antv-s2-tooltip-operator-menus.ant-menu-vertical.ant-menu .ant-menu-submenu>.ant-menu-submenu-title .ant-menu-submenu-arrow{color:#000000a6}.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-item,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-item,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-item,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-item{font-size:12px;line-height:32px;padding:0 12px;color:#000000a6;border:0;margin:0}.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu .ant-menu-submenu-title,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu .ant-menu-submenu-title,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title{padding:0 12px;font-size:12px;line-height:32px;color:#000000a6;margin:0}.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title .ant-dropdown-menu-title-content,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title .ant-dropdown-menu-title-content,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title .ant-dropdown-menu-title-content,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title .ant-dropdown-menu-title-content,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu .ant-menu-submenu-title .ant-dropdown-menu-title-content,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu .ant-menu-submenu-title .ant-dropdown-menu-title-content,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title .ant-dropdown-menu-title-content,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title .ant-dropdown-menu-title-content,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title .ant-menu-title-content,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu .ant-menu-submenu-title .ant-menu-title-content,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title .ant-menu-title-content,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-dropdown-menu-submenu-vertical .ant-menu-submenu-title .ant-menu-title-content,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu .ant-menu-submenu-title .ant-menu-title-content,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu .ant-menu-submenu-title .ant-menu-title-content,.antv-s2-tooltip-operator-menus.ant-dropdown-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title .ant-menu-title-content,.antv-s2-tooltip-operator-menus.ant-menu-vertical .ant-menu-submenu-vertical .ant-menu-submenu-title .ant-menu-title-content{margin-right:12px}.antv-s2-tooltip-operator-submenu-popup .ant-dropdown-menu-item,.antv-s2-tooltip-operator-submenu-popup .ant-menu-item{font-size:12px;line-height:32px;padding:0 12px;color:#000000a6}.antv-s2-tooltip-operator-submenu-popup .ant-menu-vertical .ant-menu-item{margin:0;height:30px;line-height:32px}.antv-s2-tooltip-operator-submenu-popup .ant-menu-vertical .ant-menu-item:not(:last-child){margin:0}.antv-s2-tooltip-operator-icon{vertical-align:middle;margin-right:4px}.antv-s2-tooltip-operator-icon svg{width:12px;height:12px}.antv-s2-tooltip-container{position:fixed;user-select:text;min-width:200px;max-width:640px;max-height:100vh;overflow:auto;z-index:1024;display:inline-block;background:rgba(255,255,255,.96);border-radius:2px;box-shadow:0 1px 4px #0003;font-size:12px;font-family:Roboto,PingFang SC,Chinese Quote,BlinkMacSystemFont,Segoe UI,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif}.antv-s2-tooltip-container-hide{opacity:0;visibility:hidden;pointer-events:none}.antv-s2-tooltip-container-hide *{transition:none}.antv-s2-tooltip-container-show{opacity:1;visibility:visible;pointer-events:all}.antv-s2-tooltip-tips,.antv-s2-tooltip-name{padding:12px;line-height:16px;overflow-wrap:break-word;color:#000000d9}.antv-s2-tooltip-description{padding:0 12px 12px;line-height:16px;overflow-wrap:break-word;color:#000000a6}.antv-s2-tooltip-tips{padding:4px 12px;color:#00000073}.antv-s2-tooltip-infos{padding:4px 12px;line-height:20px;color:#00000073;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;display:-webkit-box;-webkit-box-orient:vertical;overflow-wrap:break-word;background:rgba(249,249,249,.96);border-radius:0 0 2px 2px;background-color:#f9f9f9}.antv-s2-tooltip-summary{line-height:20px;color:#000000a6;overflow:hidden;padding:12px}.antv-s2-tooltip-summary-item{display:flex}.antv-s2-tooltip-summary-key{margin-right:20px}.antv-s2-tooltip-summary-val{flex:1;text-align:right;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.antv-s2-tooltip-interpretation{color:#000000a6;overflow:hidden;padding:12px}.antv-s2-tooltip-interpretation+.antv-s2-tooltip-head-info-list{border-top:1px solid #e9e9e9}.antv-s2-tooltip-interpretation .antv-s2-tooltip-interpretation-head{margin-bottom:12px}.antv-s2-tooltip-interpretation .antv-s2-tooltip-interpretation-head .antv-s2-tooltip-interpretation-icon{width:14px;height:14px}.antv-s2-tooltip-interpretation .antv-s2-tooltip-interpretation-head .antv-s2-tooltip-interpretation-name{color:#000}.antv-s2-tooltip-head-info-list{color:#a2a2a2;padding:12px 12px 4px;line-height:20px}.antv-s2-tooltip-bold,.antv-s2-tooltip-selected{font-weight:700}.antv-s2-tooltip-selected{margin-right:5px}.antv-s2-tooltip-highlight{color:#000000d9}.antv-s2-tooltip-detail-list{padding:2px 12px 8px}.antv-s2-tooltip-detail-list .antv-s2-tooltip-detail-item{color:#000000a6;overflow:hidden;margin:4px 0;display:flex;justify-content:space-around;align-items:center}.antv-s2-tooltip-detail-list .antv-s2-tooltip-detail-item-key{margin-right:20px}.antv-s2-tooltip-detail-list .antv-s2-tooltip-detail-item-val{flex:1;text-align:right;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.ant-dropdown-menu-item.operation-item{font-size:12px}.antv-s2-spin.ant-spin-nested-loading,.antv-s2-spin>.ant-spin-container{height:100%}.antv-s2-wrapper{padding:0;margin:0;display:flex;flex-direction:column;height:100%}.antv-s2-container{overflow:auto;flex:1 1 auto}.antv-s2-container canvas{display:block}.antv-s2-pagination{display:flex;align-items:center;z-index:1024}.antv-s2-pagination-count{margin-left:12px;text-overflow:ellipsis;white-space:nowrap;max-width:64px}.s2-drill-down[data-v-6eb1ccd0]{width:260px;min-height:20px;position:relative}.s2-drill-down-header[data-v-6eb1ccd0]{display:flex;height:32px;font-size:14px;padding:0 16px;margin-top:16px}.s2-drill-down-header button[data-v-6eb1ccd0]{position:absolute;right:0;top:-4px;font-size:12px;color:#1890ff;letter-spacing:-.2px;line-height:20px}.s2-drill-down-search[data-v-6eb1ccd0]{height:24px;width:228px!important;margin:0 16px;border:1px solid rgba(0,0,0,.15);border-radius:2px;background-color:#fff}.s2-drill-down-search input[data-v-6eb1ccd0],.s2-drill-down-search span[data-v-6eb1ccd0]{font-size:12px}.s2-drill-down-menu[data-v-6eb1ccd0]{max-height:314px;overflow-y:auto;overflow-x:hidden}.s2-drill-down-menu-item[data-v-6eb1ccd0]{height:32px!important;line-height:32px!important;font-size:12px;opacity:.65}.s2-drill-down-menu-item span[data-v-6eb1ccd0]:last-child{line-height:32px}.s2-drill-down-menu-item svg[data-v-6eb1ccd0]{margin-right:8px}.s2-drill-down-empty[data-v-6eb1ccd0]{padding:18px 18px 0;font-size:12px}
package/esm/index.d.ts CHANGED
@@ -18,6 +18,7 @@ import EE from '@antv/event-emitter';
18
18
  import { Event as Event_2 } from '@antv/g-canvas';
19
19
  import { ExtractPropTypes } from 'vue';
20
20
  import type { GEvent } from '@antv/s2';
21
+ import { GM } from '@antv/g-gesture';
21
22
  import { Group } from '@antv/g-canvas';
22
23
  import { HiddenColumnsInfo } from '@antv/s2';
23
24
  import type { IElement } from '@antv/g-canvas';
@@ -67,6 +68,12 @@ declare interface Background {
67
68
  color?: string;
68
69
  }
69
70
 
71
+ declare interface BarTheme {
72
+ intervalPadding?: number;
73
+ fill?: string;
74
+ opacity?: number;
75
+ }
76
+
70
77
  declare abstract class BaseBBox implements BBox {
71
78
  protected spreadsheet: SpreadSheet_2;
72
79
  protected facet: BaseFacet;
@@ -136,7 +143,7 @@ declare abstract class BaseCell<T extends SimpleBBox> extends Group {
136
143
  protected abstract getTextPosition(): Point;
137
144
  getStyle<K extends keyof S2Theme = keyof CellThemes>(name?: K): DefaultCellTheme | S2Theme[K];
138
145
  protected getResizeAreaStyle(): ResizeArea;
139
- protected shouldDrawResizeAreaByType(type: keyof ResizeActiveOptions): boolean | ResizeType;
146
+ protected shouldDrawResizeAreaByType(type: keyof ResizeInteractionOptions, cell: S2CellType): boolean | ((cell: S2CellType<ViewMeta_2>) => boolean) | ResizeType | ((resizeInfo: ResizeInfo_2) => boolean);
140
147
  protected getCellArea(): {
141
148
  x: number;
142
149
  y: number;
@@ -268,6 +275,9 @@ declare interface BaseDrillDownComponentProps<DataSet = BaseDataSet> {
268
275
  declare abstract class BaseEvent {
269
276
  spreadsheet: SpreadSheet_2;
270
277
  constructor(spreadsheet: SpreadSheet_2);
278
+ getCellAppendInfo<T extends Record<string, any> = CellAppendInfo>(eventTarget: Event_2['target']): T;
279
+ isLinkFieldText: (eventTarget: Event_2['target']) => boolean;
280
+ reset(): void;
271
281
  abstract bindEvents(): void;
272
282
  }
273
283
 
@@ -300,6 +310,8 @@ declare abstract class BaseFacet {
300
310
  get scrollBarSize(): number;
301
311
  protected preCellIndexes: PanelIndexes;
302
312
  constructor(cfg: SpreadSheetFacetCfg);
313
+ protected getCellCustomWidth(node: Node_2_2, width: CellCustomWidth): number;
314
+ protected getCellDraggedWidth(node: Node_2_2): number;
303
315
  hideScrollBar: () => void;
304
316
  delayHideScrollBar: DebouncedFunc<() => void>;
305
317
  delayHideScrollbarOnMobile: () => void;
@@ -444,7 +456,7 @@ declare abstract class BaseFacet {
444
456
  cols: number[];
445
457
  rows: any[];
446
458
  };
447
- drawGrid(): void;
459
+ updatePanelScrollGroup(): void;
448
460
  /**
449
461
  * When scroll behavior happened, only render one time in a period,
450
462
  * but render immediately in initiate
@@ -1002,7 +1014,7 @@ declare interface BaseTooltipConfig<T = TooltipContentType> {
1002
1014
  renderTooltip?: (spreadsheet: SpreadSheet_2) => BaseTooltip;
1003
1015
  adjustPosition?: (positionInfo: TooltipPositionInfo) => TooltipPosition;
1004
1016
  getContainer?: () => HTMLElement;
1005
- className?: string;
1017
+ className?: string | string[];
1006
1018
  style?: CSS_2.Properties;
1007
1019
  }
1008
1020
 
@@ -1036,6 +1048,11 @@ declare interface CalcTotals {
1036
1048
 
1037
1049
  declare type CanvasEventHandler = (event: Event_2) => void;
1038
1050
 
1051
+ declare interface CellAppendInfo<T = Node_2_2> extends Partial<ResizeInfo_2> {
1052
+ isLinkFieldText?: boolean;
1053
+ cellData?: T;
1054
+ }
1055
+
1039
1056
  declare enum CellBorderPosition {
1040
1057
  TOP = "TOP",
1041
1058
  BOTTOM = "BOTTOM",
@@ -1051,12 +1068,11 @@ declare interface CellCfg {
1051
1068
  valuesCfg?: {
1052
1069
  originalValueField?: string;
1053
1070
  widthPercent?: number[];
1054
- conditions?: {
1055
- text: Condition;
1056
- };
1057
1071
  };
1058
1072
  }
1059
1073
 
1074
+ declare type CellCustomWidth = number | ((node: Node_2_2) => number);
1075
+
1060
1076
  declare interface CellDataParams {
1061
1077
  query: DataType_2;
1062
1078
  isTotals?: boolean;
@@ -1108,8 +1124,8 @@ declare enum CellTypes {
1108
1124
 
1109
1125
  declare class ColCell extends HeaderCell {
1110
1126
  protected headerConfig: ColHeaderConfig;
1111
- /** 文字区域(含icon)绘制起始坐标 */
1112
- protected textAreaPosition: Point;
1127
+ /** 文字绘制起始坐标 */
1128
+ protected textPosition: Point;
1113
1129
  get cellType(): CellTypes;
1114
1130
  protected initCell(): void;
1115
1131
  protected drawBackgroundShape(): void;
@@ -1129,20 +1145,26 @@ declare class ColCell extends HeaderCell {
1129
1145
  y: number;
1130
1146
  };
1131
1147
  protected drawVerticalResizeArea(): void;
1132
- private drawResizeArea;
1148
+ protected drawResizeArea(): void;
1133
1149
  protected drawHorizontalBorder(): void;
1134
1150
  protected drawVerticalBorder(dir: CellBorderPosition): void;
1135
1151
  protected drawBorders(): void;
1136
1152
  protected hasHiddenColumnCell(): boolean;
1137
- private getExpandIconTheme;
1138
- private addExpandColumnSplitLine;
1139
- private addExpandColumnIconShapes;
1140
- private addExpandColumnIcon;
1141
- private getExpandColumnIconConfig;
1142
- private isLastColumn;
1153
+ protected getExpandIconTheme(): IconTheme;
1154
+ protected addExpandColumnSplitLine(): void;
1155
+ protected addExpandColumnIconShapes(): void;
1156
+ protected addExpandColumnIcon(): void;
1157
+ protected getExpandColumnIconConfig(): {
1158
+ x: number;
1159
+ y: number;
1160
+ width: number;
1161
+ height: number;
1162
+ };
1163
+ protected isLastColumn(): boolean;
1143
1164
  }
1144
1165
 
1145
1166
  declare interface ColCfg {
1167
+ width?: CellCustomWidth;
1146
1168
  height?: number;
1147
1169
  widthByFieldValue?: Record<string, number>;
1148
1170
  heightByField?: Record<string, number>;
@@ -1188,7 +1210,7 @@ declare type CollapsedRowsType_2 = {
1188
1210
  * One field can hold a condition
1189
1211
  */
1190
1212
  declare interface Condition {
1191
- field: string | RegExp;
1213
+ field?: string | RegExp;
1192
1214
  mapping: MappingFunction;
1193
1215
  }
1194
1216
 
@@ -1217,19 +1239,19 @@ declare class CornerCell extends HeaderCell {
1217
1239
  /**
1218
1240
  * 绘制折叠展开的icon
1219
1241
  */
1220
- private drawTreeIcon;
1221
- private drawBackgroundShape;
1242
+ protected drawTreeIcon(): void;
1243
+ protected drawBackgroundShape(): void;
1222
1244
  /**
1223
1245
  * Render cell horizontalBorder border
1224
- * @private
1246
+ * @protected
1225
1247
  */
1226
1248
  protected drawBorderShape(): void;
1227
- private isLastRowCornerCell;
1228
- private getResizeAreaEffect;
1229
- private drawResizeArea;
1230
- private showTreeIcon;
1249
+ protected isLastRowCornerCell(): boolean;
1250
+ protected getResizeAreaEffect(): ResizeAreaEffect.Field | ResizeAreaEffect.Tree | ResizeAreaEffect.Series;
1251
+ protected drawResizeArea(): void;
1252
+ protected showTreeIcon(): boolean;
1231
1253
  protected getIconPosition(): Point;
1232
- private getTreeIconWidth;
1254
+ protected getTreeIconWidth(): number;
1233
1255
  protected getTextStyle(): TextTheme;
1234
1256
  protected getMaxTextWidth(): number;
1235
1257
  protected getTextPosition(): Point;
@@ -1333,7 +1355,7 @@ declare class DataCell_2 extends BaseCell<ViewMeta_2> {
1333
1355
  protected drawConditionIconShapes(): void;
1334
1356
  /**
1335
1357
  * Draw interval condition shape
1336
- * @private
1358
+ * @protected
1337
1359
  */
1338
1360
  protected drawConditionIntervalShape(): void;
1339
1361
  getBackgroundColor(): {
@@ -1352,10 +1374,10 @@ declare class DataCell_2 extends BaseCell<ViewMeta_2> {
1352
1374
  * Draw interactive color
1353
1375
  */
1354
1376
  protected drawInteractiveBgShape(): void;
1355
- private changeRowColSelectState;
1377
+ protected changeRowColSelectState(indexType: ViewMetaIndexType): void;
1356
1378
  /**
1357
1379
  * Render cell border controlled by verticalBorder & horizontalBorder
1358
- * @private
1380
+ * @protected
1359
1381
  */
1360
1382
  protected drawBorderShape(): void;
1361
1383
  /**
@@ -1575,7 +1597,7 @@ declare interface FormatResult {
1575
1597
  value: DataItem;
1576
1598
  }
1577
1599
 
1578
- declare type Formatter = (v: unknown, data?: Data_2 | Data_2[]) => string;
1600
+ declare type Formatter = (v: unknown, data?: Data_2 | Data_2[], meta?: Node_2_2 | ViewMeta_2) => string;
1579
1601
 
1580
1602
  declare class Frame extends Group {
1581
1603
  cfg: FrameConfig;
@@ -1637,10 +1659,10 @@ declare interface GridAnalysisCellTheme {
1637
1659
  }
1638
1660
 
1639
1661
  declare class GridGroup extends Group {
1640
- private s2;
1662
+ protected s2: SpreadSheet_2;
1641
1663
  constructor(cfg: any);
1642
- private gridGroup;
1643
- private gridInfo;
1664
+ protected gridGroup: IGroup;
1665
+ protected gridInfo: GridInfo;
1644
1666
  updateGrid: (gridInfo: GridInfo, id?: string) => void;
1645
1667
  }
1646
1668
 
@@ -1804,10 +1826,11 @@ declare interface InteractionOptions {
1804
1826
  hoverFocus?: boolean | HoverFocusOptions;
1805
1827
  enableCopy?: boolean;
1806
1828
  copyWithFormat?: boolean;
1829
+ copyWithHeader?: boolean;
1807
1830
  autoResetSheetStyle?: boolean;
1808
1831
  hiddenColumnFields?: string[];
1809
1832
  scrollSpeedRatio?: ScrollSpeedRatio;
1810
- resize?: boolean | ResizeActiveOptions;
1833
+ resize?: boolean | ResizeInteractionOptions;
1811
1834
  brushSelection?: boolean;
1812
1835
  multiSelection?: boolean;
1813
1836
  rangeSelection?: boolean;
@@ -1949,8 +1972,7 @@ declare type Margin = Padding;
1949
1972
  */
1950
1973
  declare class MergedCell extends DataCell_2 {
1951
1974
  cells: S2CellType[];
1952
- isPartiallyVisible: boolean;
1953
- constructor(spreadsheet: SpreadSheet_2, cells: S2CellType[], meta?: ViewMeta_2, isPartiallyVisible?: boolean);
1975
+ constructor(spreadsheet: SpreadSheet_2, cells: S2CellType[], meta?: ViewMeta_2);
1954
1976
  handleRestOptions(...[cells]: [S2CellType[]]): void;
1955
1977
  get cellType(): CellTypes;
1956
1978
  update(): void;
@@ -1985,12 +2007,14 @@ declare type MiniChartData = BaseChartData | BulletValue;
1985
2007
 
1986
2008
  declare interface MiniChartTheme {
1987
2009
  line?: LineTheme;
2010
+ bar?: BarTheme;
1988
2011
  bullet?: BulletTheme;
1989
2012
  }
1990
2013
 
1991
2014
  /** mini 图类型 */
1992
2015
  declare enum MiniChartTypes {
1993
2016
  Line = "line",
2017
+ Bar = "bar",
1994
2018
  Bullet = "bullet"
1995
2019
  }
1996
2020
 
@@ -2164,6 +2188,12 @@ declare type PanelIndexes = {
2164
2188
  };
2165
2189
 
2166
2190
  declare class PanelScrollGroup extends GridGroup {
2191
+ protected mergedCellsGroup: IGroup;
2192
+ constructor(cfg: any);
2193
+ protected initMergedCellsGroup(): void;
2194
+ updateMergedCells(): void;
2195
+ addMergeCell(mergeCell: MergedCell): void;
2196
+ update(gridInfo: GridInfo): void;
2167
2197
  }
2168
2198
 
2169
2199
  declare interface PartDrillDown {
@@ -2496,18 +2526,11 @@ declare interface RequiredPropOption<T = any> {
2496
2526
  required: true;
2497
2527
  }
2498
2528
 
2499
- declare interface ResizeActiveOptions {
2500
- rowCellVertical?: boolean;
2501
- cornerCellHorizontal?: boolean;
2502
- colCellHorizontal?: boolean;
2503
- colCellVertical?: boolean;
2504
- rowResizeType?: ResizeType;
2505
- }
2506
-
2507
2529
  declare interface ResizeArea {
2508
2530
  size?: number;
2509
2531
  background?: string;
2510
2532
  guideLineColor?: string;
2533
+ guideLineDisableColor?: string;
2511
2534
  guideLineDash?: number[];
2512
2535
  backgroundOpacity?: number;
2513
2536
  interactionState?: InteractionState;
@@ -2544,11 +2567,27 @@ declare interface ResizeInfo_2 {
2544
2567
  isResizeArea?: boolean;
2545
2568
  /** 字段id */
2546
2569
  id?: string;
2570
+ /** 当前拖拽热区对应的节点信息 */
2571
+ meta: Node_2_2 | ViewMeta_2;
2572
+ /** 拖拽后的宽度 */
2573
+ resizedWidth?: number;
2574
+ /** 拖拽后的高度 */
2575
+ resizedHeight?: number;
2576
+ }
2577
+
2578
+ declare interface ResizeInteractionOptions {
2579
+ rowCellVertical?: boolean;
2580
+ cornerCellHorizontal?: boolean;
2581
+ colCellHorizontal?: boolean;
2582
+ colCellVertical?: boolean;
2583
+ rowResizeType?: ResizeType;
2584
+ disable?: (resizeInfo: ResizeInfo_2) => boolean;
2585
+ visible?: (cell: S2CellType) => boolean;
2547
2586
  }
2548
2587
 
2549
2588
  declare interface ResizeParams_2 {
2550
- resizeInfo?: ResizeInfo_2;
2551
- style?: Style;
2589
+ info: ResizeInfo_2;
2590
+ style: Style;
2552
2591
  }
2553
2592
 
2554
2593
  declare enum ResizeType {
@@ -2566,6 +2605,7 @@ declare class RootInteraction {
2566
2605
  constructor(spreadsheet: SpreadSheet_2);
2567
2606
  destroy(): void;
2568
2607
  reset(): void;
2608
+ private onTriggerInteractionsResetEffect;
2569
2609
  setState(interactionStateInfo: InteractionStateInfo): void;
2570
2610
  getState(): InteractionStateInfo;
2571
2611
  setInteractedCells(cell: S2CellType): void;
@@ -2614,15 +2654,15 @@ declare class RootInteraction {
2614
2654
 
2615
2655
  declare class RowCell extends HeaderCell {
2616
2656
  protected headerConfig: RowHeaderConfig;
2617
- private gm;
2657
+ protected gm: GM;
2618
2658
  get cellType(): CellTypes;
2619
2659
  destroy(): void;
2620
2660
  protected initCell(): void;
2621
2661
  protected drawBackgroundShape(): void;
2622
2662
  protected drawInteractiveBgShape(): void;
2623
- private showTreeIcon;
2624
- private showTreeLeafNodeAlignDot;
2625
- private getParentTreeIconCfg;
2663
+ protected showTreeIcon(): boolean;
2664
+ protected showTreeLeafNodeAlignDot(): boolean;
2665
+ protected getParentTreeIconCfg(): any;
2626
2666
  protected drawTreeIcon(): void;
2627
2667
  protected drawTreeLeafNodeAlignDot(): void;
2628
2668
  protected drawTextShape(): void;
@@ -2639,9 +2679,14 @@ declare class RowCell extends HeaderCell {
2639
2679
  y: any;
2640
2680
  };
2641
2681
  protected getMaxTextWidth(): number;
2642
- private getTextArea;
2682
+ protected getTextArea(): {
2683
+ x: number;
2684
+ width: number;
2685
+ y: number;
2686
+ height: number;
2687
+ };
2643
2688
  protected getTextPosition(): Point;
2644
- private getIconYPosition;
2689
+ protected getIconYPosition(): number;
2645
2690
  }
2646
2691
 
2647
2692
  declare type RowCellCollapseTreeRowsType = {
@@ -2651,9 +2696,12 @@ declare type RowCellCollapseTreeRowsType = {
2651
2696
  };
2652
2697
 
2653
2698
  declare interface RowCfg {
2654
- width?: number;
2699
+ width?: CellCustomWidth;
2655
2700
  widthByField?: Record<string, number>;
2656
2701
  heightByField?: Record<string, number>;
2702
+ /**
2703
+ * @deprecated (已废弃, 请使用 style.treeRowsWidth 代替) tree row width(拖拽产生的,无需主动设置)
2704
+ */
2657
2705
  treeRowsWidth?: number;
2658
2706
  }
2659
2707
 
@@ -3869,13 +3917,8 @@ declare abstract class SpreadSheet_2 extends EE {
3869
3917
  setOptions(options: Partial<S2Options_2>): void;
3870
3918
  render(reloadData?: boolean, options?: S2RenderOptions_2): void;
3871
3919
  destroy(): void;
3872
- /**
3873
- * Update theme config, if the {@param type} is exists, re-use it,
3874
- * otherwise create new one {@see theme}
3875
- * @param type string
3876
- * @param theme
3877
- */
3878
3920
  setThemeCfg(themeCfg?: ThemeCfg_2): void;
3921
+ setTheme(theme: S2Theme): void;
3879
3922
  /**
3880
3923
  * Update pagination config which store in {@see options}
3881
3924
  * @param pagination
@@ -4286,6 +4329,7 @@ declare type TooltipData = {
4286
4329
  interpretation?: TooltipInterpretationOptions;
4287
4330
  colIndex?: number;
4288
4331
  rowIndex?: number;
4332
+ description?: string;
4289
4333
  };
4290
4334
 
4291
4335
  declare type TooltipDataItem = Record<string, any>;
@@ -4432,4 +4476,6 @@ declare interface ViewMeta_2 {
4432
4476
  [key: string]: unknown;
4433
4477
  }
4434
4478
 
4479
+ declare type ViewMetaIndexType = keyof Pick<ViewMeta_2, 'colIndex' | 'rowIndex'>;
4480
+
4435
4481
  export { }