@visactor/vtable-sheet 1.25.1-alpha.0 → 1.26.0

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.
@@ -444,5 +444,4 @@ class WorkSheet {
444
444
  }
445
445
  }
446
446
 
447
- exports.WorkSheet = WorkSheet;
448
- //# sourceMappingURL=WorkSheet.js.map
447
+ exports.WorkSheet = WorkSheet;
@@ -72,4 +72,5 @@ class VTableSheetEventBus {
72
72
  }
73
73
  }
74
74
 
75
- exports.VTableSheetEventBus = VTableSheetEventBus;
75
+ exports.VTableSheetEventBus = VTableSheetEventBus;
76
+ //# sourceMappingURL=vtable-sheet-event-bus.js.map
package/cjs/index.d.ts CHANGED
@@ -2,5 +2,5 @@ import VTableSheet from './components/vtable-sheet';
2
2
  import type { ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions } from './ts-types';
3
3
  import * as TYPES from './ts-types';
4
4
  import * as VTable from './vtable';
5
- export declare const version = "1.25.1-alpha.0";
5
+ export declare const version = "1.26.0";
6
6
  export { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions };
package/cjs/index.js CHANGED
@@ -47,4 +47,4 @@ exports.VTable = VTable;
47
47
 
48
48
  const style_manager_1 = require("./styles/style-manager");
49
49
 
50
- exports.version = "1.25.1-alpha.0", (0, style_manager_1.importStyles)();
50
+ exports.version = "1.26.0", (0, style_manager_1.importStyles)();
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAoD;AAW3C,sBAXF,sBAAW,CAWE;AATpB,kDAAoC;AASd,sBAAK;AAR3B,iDAAmC;AAQN,wBAAM;AAPnC,0DAAsD;AACzC,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,IAAA,4BAAY,GAAE,CAAC","file":"index.js","sourcesContent":["import VTableSheet from './components/vtable-sheet';\nimport type { ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport * as VTable from './vtable';\nimport { importStyles } from './styles/style-manager';\nexport const version = \"1.25.1-alpha.0\";\n// 导入样式\nimportStyles();\n/**\n * @namespace VTableSheet\n */\nexport { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions };\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6EAAoD;AAW3C,sBAXF,sBAAW,CAWE;AATpB,kDAAoC;AASd,sBAAK;AAR3B,iDAAmC;AAQN,wBAAM;AAPnC,0DAAsD;AACzC,QAAA,OAAO,GAAG,QAAQ,CAAC;AAEhC,IAAA,4BAAY,GAAE,CAAC","file":"index.js","sourcesContent":["import VTableSheet from './components/vtable-sheet';\nimport type { ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport * as VTable from './vtable';\nimport { importStyles } from './styles/style-manager';\nexport const version = \"1.26.0\";\n// 导入样式\nimportStyles();\n/**\n * @namespace VTableSheet\n */\nexport { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions };\n"]}
@@ -9,7 +9,7 @@ const env_1 = require("../tools/env");
9
9
  function importStyle() {
10
10
  if ("node" === env_1.Env.mode) return;
11
11
  const styleElement = document.createElement("style");
12
- styleElement.id = "vtable-sheet-formula-bar-styleSheet", styleElement.textContent = "\n /* 公式栏样式 */\n.vtable-sheet-formula-bar {\n height: 30px;\n padding: 0;\n border-bottom: 1px solid #e0e0e0;\n display: flex;\n align-items: center;\n background-color: #fff;\n position: relative;\n z-index: 10;\n box-shadow: 0 1px 2px rgba(0,0,0,0.05);\n flex-grow: 1; /* 占据剩余宽度 */\n height: 100%; /* 确保高度填满父容器 */\n \n}\n\n/* 单元格地址显示 */\n.vtable-sheet-cell-address {\n width: 60px;\n padding: 0 10px;\n display: flex;\n align-items: center;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,\n Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n color: #333;\n height: 100%;\n border: 1px solid #e0e0e0;\n font-size: 13px;\n}\n\n/* fx图标 */\n.vtable-sheet-formula-icon {\n font-weight: normal;\n font-style: italic;\n margin: 0 8px;\n font-size: 14px;\n color: #666;\n font-family: 'Roboto Mono', monospace;\n width: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* 公式输入框 */\n.vtable-sheet-formula-input {\n flex: 1;\n padding: 0 8px;\n border: none;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,\n Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n outline: none;\n font-size: 13px;\n height: 100%;\n color: #333;\n background-color: transparent;\n}\n\n.vtable-sheet-formula-input:focus {\n outline: none;\n}\n\n/* 公式操作按钮容器 */\n.vtable-sheet-formula-actions {\n flex: 0;\n display: flex;\n align-items: right;\n height: 100%;\n width: 100px;\n padding: 0 4px;\n border-left: 1px solid #e0e0e0;\n}\n\n/* 公式操作按钮 */\n.vtable-sheet-formula-button {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n font-size: 12px;\n color: #666;\n margin: 0 2px;\n padding: 0;\n border-radius: 2px;\n transition: all 0.2s;\n}\n\n/* 取消按钮 */\n.vtable-sheet-formula-cancel:hover {\n color: #d93025;\n background-color: #f8f8f8;\n}\n\n/* 确认按钮 */\n.vtable-sheet-formula-confirm:hover {\n color: #1e8e3e;\n background-color: #f8f8f8;\n}\n\n/* 其他按钮样式 - 当有更多功能时使用 */\n.vtable-sheet-formula-more {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n font-size: 16px;\n color: #666;\n margin: 0 2px;\n padding: 0;\n}\n\n.vtable-sheet-formula-more:hover {\n color: #1a73e8;\n}\n\n/* 取消之前不需要的工具栏样式 */\n.vtable-sheet-toolbar,\n.vtable-sheet-toolbar-group {\n display: none;\n} \n",
12
+ styleElement.id = "vtable-sheet-formula-bar-styleSheet", styleElement.textContent = "\n /* 公式栏样式 */\n.vtable-sheet-formula-bar {\n height: 30px;\n padding: 0;\n border-bottom: 1px solid #e0e0e0;\n display: flex;\n align-items: center;\n background-color: #fff;\n position: relative;\n z-index: 10;\n box-shadow: 0 1px 2px rgba(0,0,0,0.05);\n flex-grow: 1; /* 占据剩余宽度 */\n height: 100%; /* 确保高度填满父容器 */\n \n}\n\n/* 单元格地址显示 */\n.vtable-sheet-cell-address {\n width: 60px;\n padding: 0 10px;\n display: flex;\n align-items: center;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,\n Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n color: #333;\n height: 100%;\n border: 1px solid #e0e0e0;\n font-size: 13px;\n}\n\n/* fx图标 */\n.vtable-sheet-formula-icon {\n font-weight: normal;\n font-style: italic;\n margin: 0 8px;\n font-size: 14px;\n color: #666;\n font-family: monospace;\n width: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* 公式输入框 */\n.vtable-sheet-formula-input {\n flex: 1;\n padding: 0 8px;\n border: none;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,\n Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n outline: none;\n font-size: 13px;\n height: 100%;\n color: #333;\n background-color: transparent;\n}\n\n.vtable-sheet-formula-input:focus {\n outline: none;\n}\n\n/* 公式操作按钮容器 */\n.vtable-sheet-formula-actions {\n flex: 0;\n display: flex;\n align-items: right;\n height: 100%;\n width: 100px;\n padding: 0 4px;\n border-left: 1px solid #e0e0e0;\n}\n\n/* 公式操作按钮 */\n.vtable-sheet-formula-button {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n font-size: 12px;\n color: #666;\n margin: 0 2px;\n padding: 0;\n border-radius: 2px;\n transition: all 0.2s;\n}\n\n/* 取消按钮 */\n.vtable-sheet-formula-cancel:hover {\n color: #d93025;\n background-color: #f8f8f8;\n}\n\n/* 确认按钮 */\n.vtable-sheet-formula-confirm:hover {\n color: #1e8e3e;\n background-color: #f8f8f8;\n}\n\n/* 其他按钮样式 - 当有更多功能时使用 */\n.vtable-sheet-formula-more {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n font-size: 16px;\n color: #666;\n margin: 0 2px;\n padding: 0;\n}\n\n.vtable-sheet-formula-more:hover {\n color: #1a73e8;\n}\n\n/* 取消之前不需要的工具栏样式 */\n.vtable-sheet-toolbar,\n.vtable-sheet-toolbar-group {\n display: none;\n} \n",
13
13
  document.head.appendChild(styleElement);
14
14
  }
15
15
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/styles/formula-bar.ts"],"names":[],"mappings":";;;AAAA,sCAAmC;AAEnC,SAAgB,WAAW;IACzB,IAAI,SAAG,CAAC,IAAI,KAAK,MAAM,EAAE;QACvB,OAAO;KACR;IACD,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,GAAG,qCAAqC,CAAC;IACxD,YAAY,CAAC,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiI5B,CAAC;IAEA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;AAC1C,CAAC;AA1ID,kCA0IC","file":"formula-bar.js","sourcesContent":["import { Env } from '../tools/env';\n\nexport function importStyle() {\n if (Env.mode === 'node') {\n return;\n }\n const styleElement = document.createElement('style');\n styleElement.id = 'vtable-sheet-formula-bar-styleSheet';\n styleElement.textContent = `\n /* 公式栏样式 */\n.vtable-sheet-formula-bar {\n height: 30px;\n padding: 0;\n border-bottom: 1px solid #e0e0e0;\n display: flex;\n align-items: center;\n background-color: #fff;\n position: relative;\n z-index: 10;\n box-shadow: 0 1px 2px rgba(0,0,0,0.05);\n flex-grow: 1; /* 占据剩余宽度 */\n height: 100%; /* 确保高度填满父容器 */\n \n}\n\n/* 单元格地址显示 */\n.vtable-sheet-cell-address {\n width: 60px;\n padding: 0 10px;\n display: flex;\n align-items: center;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,\n Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n color: #333;\n height: 100%;\n border: 1px solid #e0e0e0;\n font-size: 13px;\n}\n\n/* fx图标 */\n.vtable-sheet-formula-icon {\n font-weight: normal;\n font-style: italic;\n margin: 0 8px;\n font-size: 14px;\n color: #666;\n font-family: 'Roboto Mono', monospace;\n width: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* 公式输入框 */\n.vtable-sheet-formula-input {\n flex: 1;\n padding: 0 8px;\n border: none;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,\n Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n outline: none;\n font-size: 13px;\n height: 100%;\n color: #333;\n background-color: transparent;\n}\n\n.vtable-sheet-formula-input:focus {\n outline: none;\n}\n\n/* 公式操作按钮容器 */\n.vtable-sheet-formula-actions {\n flex: 0;\n display: flex;\n align-items: right;\n height: 100%;\n width: 100px;\n padding: 0 4px;\n border-left: 1px solid #e0e0e0;\n}\n\n/* 公式操作按钮 */\n.vtable-sheet-formula-button {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n font-size: 12px;\n color: #666;\n margin: 0 2px;\n padding: 0;\n border-radius: 2px;\n transition: all 0.2s;\n}\n\n/* 取消按钮 */\n.vtable-sheet-formula-cancel:hover {\n color: #d93025;\n background-color: #f8f8f8;\n}\n\n/* 确认按钮 */\n.vtable-sheet-formula-confirm:hover {\n color: #1e8e3e;\n background-color: #f8f8f8;\n}\n\n/* 其他按钮样式 - 当有更多功能时使用 */\n.vtable-sheet-formula-more {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n font-size: 16px;\n color: #666;\n margin: 0 2px;\n padding: 0;\n}\n\n.vtable-sheet-formula-more:hover {\n color: #1a73e8;\n}\n\n/* 取消之前不需要的工具栏样式 */\n.vtable-sheet-toolbar,\n.vtable-sheet-toolbar-group {\n display: none;\n} \n`;\n\n document.head.appendChild(styleElement);\n}\n"]}
1
+ {"version":3,"sources":["../src/styles/formula-bar.ts"],"names":[],"mappings":";;;AAAA,sCAAmC;AAEnC,SAAgB,WAAW;IACzB,IAAI,SAAG,CAAC,IAAI,KAAK,MAAM,EAAE;QACvB,OAAO;KACR;IACD,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,GAAG,qCAAqC,CAAC;IACxD,YAAY,CAAC,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiI5B,CAAC;IAEA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;AAC1C,CAAC;AA1ID,kCA0IC","file":"formula-bar.js","sourcesContent":["import { Env } from '../tools/env';\n\nexport function importStyle() {\n if (Env.mode === 'node') {\n return;\n }\n const styleElement = document.createElement('style');\n styleElement.id = 'vtable-sheet-formula-bar-styleSheet';\n styleElement.textContent = `\n /* 公式栏样式 */\n.vtable-sheet-formula-bar {\n height: 30px;\n padding: 0;\n border-bottom: 1px solid #e0e0e0;\n display: flex;\n align-items: center;\n background-color: #fff;\n position: relative;\n z-index: 10;\n box-shadow: 0 1px 2px rgba(0,0,0,0.05);\n flex-grow: 1; /* 占据剩余宽度 */\n height: 100%; /* 确保高度填满父容器 */\n \n}\n\n/* 单元格地址显示 */\n.vtable-sheet-cell-address {\n width: 60px;\n padding: 0 10px;\n display: flex;\n align-items: center;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,\n Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n color: #333;\n height: 100%;\n border: 1px solid #e0e0e0;\n font-size: 13px;\n}\n\n/* fx图标 */\n.vtable-sheet-formula-icon {\n font-weight: normal;\n font-style: italic;\n margin: 0 8px;\n font-size: 14px;\n color: #666;\n font-family: monospace;\n width: 20px;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* 公式输入框 */\n.vtable-sheet-formula-input {\n flex: 1;\n padding: 0 8px;\n border: none;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,\n Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\n outline: none;\n font-size: 13px;\n height: 100%;\n color: #333;\n background-color: transparent;\n}\n\n.vtable-sheet-formula-input:focus {\n outline: none;\n}\n\n/* 公式操作按钮容器 */\n.vtable-sheet-formula-actions {\n flex: 0;\n display: flex;\n align-items: right;\n height: 100%;\n width: 100px;\n padding: 0 4px;\n border-left: 1px solid #e0e0e0;\n}\n\n/* 公式操作按钮 */\n.vtable-sheet-formula-button {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n font-size: 12px;\n color: #666;\n margin: 0 2px;\n padding: 0;\n border-radius: 2px;\n transition: all 0.2s;\n}\n\n/* 取消按钮 */\n.vtable-sheet-formula-cancel:hover {\n color: #d93025;\n background-color: #f8f8f8;\n}\n\n/* 确认按钮 */\n.vtable-sheet-formula-confirm:hover {\n color: #1e8e3e;\n background-color: #f8f8f8;\n}\n\n/* 其他按钮样式 - 当有更多功能时使用 */\n.vtable-sheet-formula-more {\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n background: none;\n border: none;\n cursor: pointer;\n font-size: 16px;\n color: #666;\n margin: 0 2px;\n padding: 0;\n}\n\n.vtable-sheet-formula-more:hover {\n color: #1a73e8;\n}\n\n/* 取消之前不需要的工具栏样式 */\n.vtable-sheet-toolbar,\n.vtable-sheet-toolbar-group {\n display: none;\n} \n`;\n\n document.head.appendChild(styleElement);\n}\n"]}
@@ -18123,9 +18123,10 @@
18123
18123
  }), context.highPerformanceRestore(), context.setTransformForCurrent();
18124
18124
  } else {
18125
18125
  const {
18126
- backgroundCornerRadius: backgroundCornerRadius
18126
+ backgroundCornerRadius: backgroundCornerRadius,
18127
+ backgroundOpacity = 1
18127
18128
  } = graphic.attribute;
18128
- context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = background, backgroundCornerRadius ? (createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, !0), context.fill()) : context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
18129
+ context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.globalAlpha = backgroundOpacity, context.fillStyle = background, backgroundCornerRadius ? (createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, !0), context.fill()) : context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
18129
18130
  }
18130
18131
  shouldReCalBounds && boundsAllocate.free(b), restore();
18131
18132
  }
@@ -35571,7 +35572,31 @@
35571
35572
  return graphicCreator.symbol(style);
35572
35573
  }
35573
35574
  _renderHandlerText(value, position) {
35574
- var _a, _b, _c;
35575
+ return graphicCreator.text(this._getHandlerTextAttributes(value, position));
35576
+ }
35577
+ _getHandlerPosition(isStart) {
35578
+ return this.attribute.range && isStart ? "start" : "end";
35579
+ }
35580
+ _getHandlerTextStyle(value, position) {
35581
+ const {
35582
+ align: align,
35583
+ handlerSize = 14,
35584
+ handlerText = {},
35585
+ railHeight: railHeight,
35586
+ railWidth: railWidth,
35587
+ slidable: slidable
35588
+ } = this.attribute;
35589
+ return isFunction$4(handlerText.style) ? handlerText.style(value, position, {
35590
+ layout: this.attribute.layout,
35591
+ align: align,
35592
+ railWidth: railWidth,
35593
+ railHeight: railHeight,
35594
+ handlerSize: handlerSize,
35595
+ slidable: slidable
35596
+ }) : handlerText.style;
35597
+ }
35598
+ _getHandlerTextAttributes(value, position) {
35599
+ var _a, _b;
35575
35600
  const {
35576
35601
  align: align,
35577
35602
  handlerSize = 14,
@@ -35583,13 +35608,13 @@
35583
35608
  isHorizontal = this._isHorizontal,
35584
35609
  pos = this.calculatePosByValue(value, position),
35585
35610
  textSpace = null !== (_a = handlerText.space) && void 0 !== _a ? _a : 4,
35611
+ handlerTextStyle = this._getHandlerTextStyle(value, position),
35586
35612
  textStyle = {
35587
35613
  text: handlerText.formatter ? handlerText.formatter(value) : value.toFixed(null !== (_b = handlerText.precision) && void 0 !== _b ? _b : 0),
35588
- lineHeight: null === (_c = handlerText.style) || void 0 === _c ? void 0 : _c.lineHeight,
35614
+ lineHeight: null == handlerTextStyle ? void 0 : handlerTextStyle.lineHeight,
35589
35615
  cursor: !1 === slidable ? "default" : getDefaultCursor(isHorizontal)
35590
35616
  };
35591
- isHorizontal ? "top" === align ? (textStyle.textBaseline = "bottom", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight - handlerSize) / 2 - textSpace) : (textStyle.textBaseline = "top", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight + handlerSize) / 2 + textSpace) : "left" === align ? (textStyle.textBaseline = "middle", textStyle.textAlign = "end", textStyle.x = (railWidth - handlerSize) / 2 - textSpace, textStyle.y = pos) : (textStyle.textBaseline = "middle", textStyle.textAlign = "start", textStyle.x = (railWidth + handlerSize) / 2 + textSpace, textStyle.y = pos);
35592
- return graphicCreator.text(Object.assign(Object.assign({}, textStyle), handlerText.style));
35617
+ return isHorizontal ? "top" === align ? (textStyle.textBaseline = "bottom", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight - handlerSize) / 2 - textSpace) : (textStyle.textBaseline = "top", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight + handlerSize) / 2 + textSpace) : "left" === align ? (textStyle.textBaseline = "middle", textStyle.textAlign = "end", textStyle.x = (railWidth - handlerSize) / 2 - textSpace, textStyle.y = pos) : (textStyle.textBaseline = "middle", textStyle.textAlign = "start", textStyle.x = (railWidth + handlerSize) / 2 + textSpace, textStyle.y = pos), Object.assign(Object.assign({}, textStyle), handlerTextStyle);
35593
35618
  }
35594
35619
  _renderTooltip() {
35595
35620
  var _a;
@@ -35717,31 +35742,19 @@
35717
35742
  }
35718
35743
  }
35719
35744
  _updateHandler(handler, position, value) {
35720
- var _a;
35721
35745
  const isHorizontal = this._isHorizontal;
35722
35746
  handler.setAttribute(isHorizontal ? "x" : "y", position);
35723
35747
  const updateHandlerText = handler.name === SLIDER_ELEMENT_NAME.startHandler ? this._startHandlerText : this._endHandlerText;
35724
35748
  if (updateHandlerText) {
35725
- const {
35726
- handlerText = {}
35727
- } = this.attribute;
35728
- updateHandlerText.setAttributes({
35729
- text: handlerText.formatter ? handlerText.formatter(value) : value.toFixed(null !== (_a = handlerText.precision) && void 0 !== _a ? _a : 0),
35730
- [isHorizontal ? "x" : "y"]: position
35731
- });
35749
+ const handlerPosition = this._getHandlerPosition(handler.name === SLIDER_ELEMENT_NAME.startHandler);
35750
+ updateHandlerText.setAttributes(this._getHandlerTextAttributes(value, handlerPosition));
35732
35751
  }
35733
35752
  handler.name === SLIDER_ELEMENT_NAME.startHandler ? (this._currentValue.startValue = value, this._currentValue.startPos = position) : (this._currentValue.endValue = value, this._currentValue.endPos = position);
35734
35753
  }
35735
35754
  _updateHandlerText(handlerText, position, value) {
35736
- var _a;
35737
35755
  const isHorizontal = this._isHorizontal,
35738
- {
35739
- handlerText: handlerTextAttr = {}
35740
- } = this.attribute;
35741
- handlerText.setAttributes({
35742
- [isHorizontal ? "x" : "y"]: position,
35743
- text: handlerTextAttr.formatter ? handlerTextAttr.formatter(value) : value.toFixed(null !== (_a = handlerTextAttr.precision) && void 0 !== _a ? _a : 0)
35744
- });
35756
+ handlerPosition = this._getHandlerPosition(handlerText.name === SLIDER_ELEMENT_NAME.startHandlerText);
35757
+ handlerText.setAttributes(this._getHandlerTextAttributes(value, handlerPosition));
35745
35758
  const updateHandler = handlerText.name === SLIDER_ELEMENT_NAME.startHandlerText ? this._startHandler : this._endHandler;
35746
35759
  updateHandler && updateHandler.setAttributes({
35747
35760
  [isHorizontal ? "x" : "y"]: position
@@ -45586,15 +45599,17 @@
45586
45599
  } else if ("sparkline" === type) {
45587
45600
  cellGroup = Factory.getFunction("createSparkLineCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync);
45588
45601
  } else if ("checkbox" === type) {
45589
- const isAggregation = "isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row),
45590
- isSeriesNumber = table.internalProps.layoutMap.isSeriesNumber(col, row);
45591
- if (isAggregation && isSeriesNumber) {
45602
+ if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
45592
45603
  cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
45593
45604
  } else {
45594
45605
  cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !1);
45595
45606
  }
45596
45607
  } else if ("radio" === type) {
45597
- cellGroup = Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range);
45608
+ if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
45609
+ cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
45610
+ } else {
45611
+ cellGroup = Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range);
45612
+ }
45598
45613
  } else if ("switch" === type) {
45599
45614
  cellGroup = Factory.getFunction("createSwitchCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
45600
45615
  } else if ("button" === type) {
@@ -54775,6 +54790,7 @@
54775
54790
  } else if (-1 === cellPos.col || -1 === cellPos.row || -1 !== col && -1 !== row) {
54776
54791
  if (interactionState !== InteractionState.default || table.eventManager.isDraging || table.stateManager.isResizeCol()) {
54777
54792
  if ((interactionState === InteractionState.grabing || table.eventManager.isDraging) && !table.stateManager.isResizeCol()) {
54793
+ if (col >= 0 && row >= 0 && isCellDisableSelect(table, col, row)) return void scenegraph.updateNextFrame();
54778
54794
  let extendSelectRange = !isValid$2(skipBodyMerge) || !skipBodyMerge;
54779
54795
  -1 === cellPos.col && (cellPos.col = col), -1 === cellPos.row && (cellPos.row = row), cellPos.col = col, cellPos.row = row;
54780
54796
  const currentRange = state.select.ranges[state.select.ranges.length - 1];
@@ -55970,8 +55986,11 @@
55970
55986
  updateOptionSetState() {
55971
55987
  this._updateOptionSetState(), this.setHoverState(), this.setSelectState(), this.setFrozenState();
55972
55988
  }
55989
+ endResizeIfResizing() {
55990
+ this.columnResize.resizing && (this.table.scenegraph.component.hideResizeCol(), this.columnResize.resizing = !1), this.rowResize.resizing && (this.table.scenegraph.component.hideResizeRow(), this.rowResize.resizing = !1), this.interactionState === InteractionState.grabing && (this.interactionState = InteractionState.default);
55991
+ }
55973
55992
  _updateOptionSetState() {
55974
- this.interactionState = InteractionState.default, this.hoverIcon = {
55993
+ this.endResizeIfResizing(), this.interactionState = InteractionState.default, this.hoverIcon = {
55975
55994
  col: -1,
55976
55995
  row: -1,
55977
55996
  icon: null
@@ -57100,6 +57119,7 @@
57100
57119
  }
57101
57120
 
57102
57121
  function bindTableGroupListener(eventManager) {
57122
+ var _a, _b, _c;
57103
57123
  const table = eventManager.table,
57104
57124
  stateManager = table.stateManager,
57105
57125
  getEventArgsSet = e => getCellEventArgsSetWithTable(e, table);
@@ -57216,7 +57236,13 @@
57216
57236
  event: e.nativeEvent
57217
57237
  });
57218
57238
  }), table.scenegraph.tableGroup.addEventListener("pointerleave", e => {
57219
- stateManager.isResizeCol() || stateManager.isResizeRow() || stateManager.isMoveCol() || stateManager.isSelecting() || (stateManager.updateInteractionState(InteractionState.default), stateManager.updateCursor()), (table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.horizontalVisible || !table.theme.scrollStyle.horizontalVisible && "focus" === table.theme.scrollStyle.visible) && stateManager.hideHorizontalScrollBar(), (table.theme.scrollStyle.verticalVisible && "focus" === table.theme.scrollStyle.verticalVisible || !table.theme.scrollStyle.verticalVisible && "focus" === table.theme.scrollStyle.visible) && stateManager.hideVerticalScrollBar(), table.hasListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL) && -1 !== table.stateManager.hover.cellPos.col && -1 !== table.stateManager.hover.cellPos.row && table.fireListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, {
57239
+ var _a, _b, _c;
57240
+ stateManager.isResizeCol() || stateManager.isResizeRow() || stateManager.isMoveCol() || stateManager.isSelecting() || (stateManager.updateInteractionState(InteractionState.default), stateManager.updateCursor());
57241
+ const scrollStyle = table.theme.scrollStyle,
57242
+ horizontalVisible = null !== (_a = null == scrollStyle ? void 0 : scrollStyle.horizontalVisible) && void 0 !== _a ? _a : null == scrollStyle ? void 0 : scrollStyle.visible,
57243
+ verticalVisible = null !== (_b = null == scrollStyle ? void 0 : scrollStyle.verticalVisible) && void 0 !== _b ? _b : null == scrollStyle ? void 0 : scrollStyle.visible,
57244
+ barToSide = null !== (_c = null == scrollStyle ? void 0 : scrollStyle.barToSide) && void 0 !== _c && _c;
57245
+ barToSide || "focus" !== horizontalVisible || stateManager.hideHorizontalScrollBar(), barToSide || "focus" !== verticalVisible || stateManager.hideVerticalScrollBar(), table.hasListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL) && -1 !== table.stateManager.hover.cellPos.col && -1 !== table.stateManager.hover.cellPos.row && table.fireListeners(TABLE_EVENT_TYPE.MOUSELEAVE_CELL, {
57220
57246
  col: table.stateManager.hover.cellPos.col,
57221
57247
  row: table.stateManager.hover.cellPos.row,
57222
57248
  cellRange: table.getCellRangeRelativeRect({
@@ -57445,7 +57471,29 @@
57445
57471
  const isHasSelected = !!(null === (_a = stateManager.select.ranges) || void 0 === _a ? void 0 : _a.length);
57446
57472
  (null === (_b = table.options.customConfig) || void 0 === _b ? void 0 : _b.cancelSelectCellHook) ? (null === (_c = table.options.customConfig) || void 0 === _c ? void 0 : _c.cancelSelectCellHook(e)) && eventManager.dealTableSelect() : (null === (_e = null === (_d = table.options.select) || void 0 === _d ? void 0 : _d.blankAreaClickDeselect) || void 0 === _e || _e) && eventManager.dealTableSelect(), stateManager.endSelectCells(!0, isHasSelected), stateManager.updateCursor(), table.scenegraph.updateChartState(null, void 0), table.scenegraph.deactivateChart(-1, -1, !0);
57447
57473
  }
57448
- }), table.scenegraph.stage.addEventListener("pointermove", e => {
57474
+ });
57475
+ const scrollStyle = table.theme.scrollStyle,
57476
+ barToSide = null !== (_a = null == scrollStyle ? void 0 : scrollStyle.barToSide) && void 0 !== _a && _a,
57477
+ horizontalVisible = null !== (_b = null == scrollStyle ? void 0 : scrollStyle.horizontalVisible) && void 0 !== _b ? _b : null == scrollStyle ? void 0 : scrollStyle.visible,
57478
+ verticalVisible = null !== (_c = null == scrollStyle ? void 0 : scrollStyle.verticalVisible) && void 0 !== _c ? _c : null == scrollStyle ? void 0 : scrollStyle.visible,
57479
+ shouldShowScrollOnCanvasHover = barToSide && "focus" === horizontalVisible,
57480
+ shouldShowVScrollOnCanvasHover = barToSide && "focus" === verticalVisible;
57481
+ (shouldShowScrollOnCanvasHover || shouldShowVScrollOnCanvasHover) && (table.scenegraph.stage.addEventListener("pointerenter", e => {
57482
+ var _a, _b, _c;
57483
+ const target = e.target;
57484
+ if (target === table.scenegraph.stage || (null === (_a = null == target ? void 0 : target.isDescendantsOf) || void 0 === _a ? void 0 : _a.call(target, table.scenegraph.stage))) {
57485
+ if (shouldShowScrollOnCanvasHover) {
57486
+ const relativeX = e.x - table.tableX,
57487
+ target = table.options.scrollFrozenCols && (null === (_b = table.getFrozenColsOffset) || void 0 === _b ? void 0 : _b.call(table)) > 0 && relativeX >= 0 && relativeX < table.getFrozenColsWidth() ? "frozen" : table.options.scrollRightFrozenCols && (null === (_c = table.getRightFrozenColsOffset) || void 0 === _c ? void 0 : _c.call(table)) > 0 && relativeX > table.tableNoFrameWidth - table.getRightFrozenColsWidth() ? "rightFrozen" : "body";
57488
+ stateManager.showHorizontalScrollBar(!1, target);
57489
+ }
57490
+ shouldShowVScrollOnCanvasHover && stateManager.showVerticalScrollBar();
57491
+ }
57492
+ }), table.scenegraph.stage.addEventListener("pointerleave", e => {
57493
+ var _a;
57494
+ const relatedTarget = e.relatedTarget;
57495
+ (!relatedTarget || relatedTarget !== table.scenegraph.stage && !(null === (_a = relatedTarget.isDescendantsOf) || void 0 === _a ? void 0 : _a.call(relatedTarget, table.scenegraph.stage))) && (shouldShowScrollOnCanvasHover && stateManager.hideHorizontalScrollBar(), shouldShowVScrollOnCanvasHover && stateManager.hideVerticalScrollBar());
57496
+ })), table.scenegraph.stage.addEventListener("pointermove", e => {
57449
57497
  var _a, _b, _c;
57450
57498
  const eventArgsSet = getCellEventArgsSetWithTable(e, table);
57451
57499
  null !== (_c = null === (_b = null === (_a = e.target) || void 0 === _a ? void 0 : _a.isDescendantsOf) || void 0 === _b ? void 0 : _b.call(_a, table.scenegraph.tableGroup)) && void 0 !== _c && _c && (stateManager.isResizeCol() || eventManager.checkColumnResize(eventArgsSet) ? table.stateManager.select && eventManager.checkCellFillhandle(eventArgsSet) ? stateManager.updateCursor("crosshair") : stateManager.updateCursor("col-resize") : stateManager.isResizeRow() || eventManager.checkRowResize(eventArgsSet) ? table.stateManager.select && eventManager.checkCellFillhandle(eventArgsSet) ? stateManager.updateCursor("crosshair") : stateManager.updateCursor("row-resize") : stateManager.isMoveCol() || stateManager.updateCursor());
@@ -58004,7 +58052,10 @@
58004
58052
  right || left || (x > table.tableNoFrameWidth - table.getRightFrozenColsWidth() && x < table.tableNoFrameWidth || x > 0 && x < table.getFrozenColsWidth() ? (selectX = x, considerFrozenX = !0) : selectX = table.scrollLeft + frozenOffset + x), bottom || top || (y > table.tableNoFrameHeight - table.getBottomFrozenRowsHeight() && y < table.tableNoFrameHeight || y > 0 && y < table.getFrozenRowsHeight() ? (selectY = y, considerFrozenY = !0) : selectY = table.scrollTop + y), table.stateManager.updateInteractionState(InteractionState.grabing);
58005
58053
  const targetCol = table.getTargetColAtConsiderRightFrozen(selectX, considerFrozenX),
58006
58054
  targetRow = table.getTargetRowAtConsiderBottomFrozen(selectY, considerFrozenY);
58007
- !(null === (_c = table.options.select) || void 0 === _c ? void 0 : _c.disableDragSelect) && isValid$2(targetCol) && isValid$2(targetRow) && table.stateManager.updateSelectPos("row" === table.stateManager.select.selectInline ? table.colCount - 1 : targetCol.col, "col" === table.stateManager.select.selectInline ? table.rowCount - 1 : targetRow.row, !1, !1, !1, !1);
58055
+ if (!(null === (_c = table.options.select) || void 0 === _c ? void 0 : _c.disableDragSelect) && isValid$2(targetCol) && isValid$2(targetRow)) {
58056
+ if (isCellDisableSelect(table, targetCol.col, targetRow.row)) return;
58057
+ table.stateManager.updateSelectPos("row" === table.stateManager.select.selectInline ? table.colCount - 1 : targetCol.col, "col" === table.stateManager.select.selectInline ? table.rowCount - 1 : targetRow.row, !1, !1, !1, !1);
58058
+ }
58008
58059
  });
58009
58060
  } else table.eventManager.inertiaScroll.isInertiaScrolling() ? table.eventManager.inertiaScroll.endInertia() : table.eventManager.scrollYSpeed = 0;
58010
58061
  }
@@ -60080,6 +60131,7 @@
60080
60131
  switch (headerType) {
60081
60132
  case "text":
60082
60133
  case "link":
60134
+ default:
60083
60135
  return TextHeaderStyle;
60084
60136
  case "image":
60085
60137
  case "video":
@@ -61126,7 +61178,7 @@
61126
61178
  }
61127
61179
  constructor(container, options = {}) {
61128
61180
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
61129
- if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.25.1-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
61181
+ if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.26.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
61130
61182
  const g = window;
61131
61183
  g[this.id] = this;
61132
61184
  const registry = g.__vtable__ || (g.__vtable__ = {
@@ -62531,9 +62583,13 @@
62531
62583
  }
62532
62584
  getCellType(col, row) {
62533
62585
  let cellType;
62534
- return this.isSeriesNumberInHeader(col, row) ? this.internalProps.layoutMap.getSeriesNumberHeader(col, row).cellType : (cellType = this.isHeader(col, row) ? this.internalProps.layoutMap.getHeader(col, row).headerType : this.internalProps.layoutMap.getBody(col, row).cellType, getProp("cellType", {
62586
+ if (this.isSeriesNumberInHeader(col, row)) {
62587
+ const seriesHeaderCellType = this.internalProps.layoutMap.getSeriesNumberHeader(col, row).cellType;
62588
+ return "radio" === seriesHeaderCellType ? "text" : seriesHeaderCellType;
62589
+ }
62590
+ return cellType = this.isHeader(col, row) ? this.internalProps.layoutMap.getHeader(col, row).headerType : this.internalProps.layoutMap.getBody(col, row).cellType, getProp("cellType", {
62535
62591
  cellType: cellType
62536
- }, col, row, this));
62592
+ }, col, row, this);
62537
62593
  }
62538
62594
  getHeaderField(col, row) {
62539
62595
  return this.internalProps.layoutMap.getHeaderField(col, row);
@@ -66529,7 +66585,7 @@
66529
66585
  setRecords(records, option) {
66530
66586
  var _a, _b, _c, _d, _e;
66531
66587
  let sort;
66532
- clearChartRenderQueue(), null === (_a = this.internalProps.dataSource) || void 0 === _a || _a.release(), this.internalProps.releaseList = null === (_b = this.internalProps.releaseList) || void 0 === _b ? void 0 : _b.filter(item => !item.dataSourceObj), this.internalProps.dataSource = null, Array.isArray(option) || (null == option ? void 0 : option.order) ? sort = option : option ? sort = option.sortState : null === option && (sort = null);
66588
+ this.stateManager.endResizeIfResizing(), clearChartRenderQueue(), null === (_a = this.internalProps.dataSource) || void 0 === _a || _a.release(), this.internalProps.releaseList = null === (_b = this.internalProps.releaseList) || void 0 === _b ? void 0 : _b.filter(item => !item.dataSourceObj), this.internalProps.dataSource = null, Array.isArray(option) || (null == option ? void 0 : option.order) ? sort = option : option ? sort = option.sortState : null === option && (sort = null);
66533
66589
  "undefined" != typeof window && window.performance.now();
66534
66590
  const oldHoverState = {
66535
66591
  col: this.stateManager.hover.cellPos.col,
@@ -95102,7 +95158,7 @@
95102
95158
  margin: 0 8px;
95103
95159
  font-size: 14px;
95104
95160
  color: #666;
95105
- font-family: 'Roboto Mono', monospace;
95161
+ font-family: monospace;
95106
95162
  width: 20px;
95107
95163
  display: flex;
95108
95164
  align-items: center;
@@ -95716,7 +95772,7 @@
95716
95772
  importStyle();
95717
95773
  }
95718
95774
 
95719
- const version = "1.25.1-alpha.0";
95775
+ const version = "1.26.0";
95720
95776
  importStyles();
95721
95777
 
95722
95778
  exports.TYPES = index;