@visactor/vtable-sheet 1.25.0 → 1.25.1-alpha.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.
- package/cjs/core/table-plugins.js +1 -2
- package/cjs/event/vtable-sheet-event-bus.js +2 -1
- package/cjs/formula/cell-highlight-manager.js +1 -2
- package/cjs/formula/index.js +2 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/styles/formula-bar.js +1 -1
- package/cjs/styles/formula-bar.js.map +1 -1
- package/dist/vtable-sheet.js +68 -33
- package/dist/vtable-sheet.min.js +1 -1
- package/es/core/table-plugins.js +1 -2
- package/es/event/vtable-sheet-event-bus.js +2 -1
- package/es/formula/cell-highlight-manager.js +1 -2
- package/es/formula/index.js +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/styles/formula-bar.js +1 -1
- package/es/styles/formula-bar.js.map +1 -1
- package/package.json +11 -12
|
@@ -264,5 +264,4 @@ function createFormulaDetectionOptions(sheetDefine, options, vtableSheet) {
|
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
exports.getTablePlugins = getTablePlugins, exports.createFormulaDetectionOptions = createFormulaDetectionOptions;
|
|
268
|
-
//# sourceMappingURL=table-plugins.js.map
|
|
267
|
+
exports.getTablePlugins = getTablePlugins, exports.createFormulaDetectionOptions = createFormulaDetectionOptions;
|
package/cjs/formula/index.js
CHANGED
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.
|
|
5
|
+
export declare const version = "1.25.1-alpha.1";
|
|
6
6
|
export { VTableSheet, TYPES, VTable, ISheetDefine, IVTableSheetOptions, IVTableSheetUpdateOptions };
|
package/cjs/index.js
CHANGED
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,
|
|
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.1\";\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:
|
|
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:
|
|
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"]}
|
package/dist/vtable-sheet.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
@@ -61126,7 +61139,17 @@
|
|
|
61126
61139
|
}
|
|
61127
61140
|
constructor(container, options = {}) {
|
|
61128
61141
|
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.
|
|
61142
|
+
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.1", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
|
|
61143
|
+
const g = window;
|
|
61144
|
+
g[this.id] = this;
|
|
61145
|
+
const registry = g.__vtable__ || (g.__vtable__ = {
|
|
61146
|
+
byId: Object.create(null),
|
|
61147
|
+
list: [],
|
|
61148
|
+
last: null
|
|
61149
|
+
});
|
|
61150
|
+
registry.byId[this.id] = this, registry.list.push(this), registry.last = this, g.__vtable_last_id__ = this.id;
|
|
61151
|
+
}
|
|
61152
|
+
if ("node" === Env$1.mode ? (options = container, container = null) : container instanceof HTMLElement || (options = container, container = container.container ? container.container : null), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
61130
61153
|
this.pluginManager = new PluginManager(this, options), this.fireListeners(TABLE_EVENT_TYPE.BEFORE_INIT, {
|
|
61131
61154
|
options: options,
|
|
61132
61155
|
container: container
|
|
@@ -61203,7 +61226,7 @@
|
|
|
61203
61226
|
bottom: 0
|
|
61204
61227
|
}, padding && ("number" == typeof padding ? (this.padding.top = padding, this.padding.left = padding, this.padding.bottom = padding, this.padding.right = padding) : (padding.top && (this.padding.top = padding.top), padding.bottom && (this.padding.bottom = padding.bottom), padding.left && (this.padding.left = padding.left), padding.right && (this.padding.right = padding.right))), (isValid$2(canvasHeight) || isValid$2(canvasWidth)) && (this.canvasSizeSeted = !0), this.tableNoFrameWidth = 0, this.tableNoFrameHeight = 0, this.contentOffsetX = null != translateX ? translateX : 0, this.contentOffsetY = null != translateY ? translateY : 0, this.canvasWidth = isNumber$2(canvasWidth) ? canvasWidth : void 0, this.canvasHeight = isNumber$2(canvasHeight) ? canvasHeight : void 0, this.columnWidthComputeMode = null !== (_d = options.columnWidthComputeMode) && void 0 !== _d ? _d : "normal";
|
|
61205
61228
|
const internalProps = this.internalProps = {};
|
|
61206
|
-
void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.options.canvas ? ("node" !== Env$1.mode && (internalProps.element = this.options.canvas.parentElement, internalProps.element.style.position = "relative"), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d")) : "node" !== Env$1.mode && (internalProps.element = createRootElement(this.padding), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas), internalProps.context = internalProps.canvas.getContext("2d"), (null === (_e = options.customConfig) || void 0 === _e ? void 0 : _e.createReactContainer) && createReactContainer(this)), internalProps.handler = new EventHandler(), isNumber$2(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime), internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount, internalProps.frozenRowCount = frozenRowCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = null === (_f = null != enableCheckboxCascade ? enableCheckboxCascade : null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox) || void 0 === _f || _f, internalProps.enableHeaderCheckboxCascade = enableCheckboxCascade || null == enableHeaderCheckboxCascade || enableHeaderCheckboxCascade, internalProps.columnResizeMode = null !== (_g = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _g ? _g : columnResizeMode, internalProps.canResizeColumn = null == resize ? void 0 : resize.canResizeColumn, internalProps.rowResizeMode = null !== (_h = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _h ? _h : rowResizeMode, internalProps.dragHeaderMode = null !== (_k = null !== (_j = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _j ? _j : dragHeaderMode) && void 0 !== _k ? _k : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.groupBy = null !== (_l = null == groupConfig ? void 0 : groupConfig.groupBy) && void 0 !== _l ? _l : groupBy, internalProps.groupTitleCheckbox = null !== (_m = null == groupConfig ? void 0 : groupConfig.titleCheckbox) && void 0 !== _m ? _m : !!(null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox), internalProps.groupTitleFieldFormat = null !== (_o = null == groupConfig ? void 0 : groupConfig.titleFieldFormat) && void 0 !== _o ? _o : groupTitleFieldFormat, internalProps.groupTitleCustomLayout = null !== (_p = null == groupConfig ? void 0 : groupConfig.titleCustomLayout) && void 0 !== _p ? _p : groupTitleCustomLayout, internalProps.enableTreeStickCell = null !== (_q = null == groupConfig ? void 0 : groupConfig.enableTreeStickCell) && void 0 !== _q ? _q : enableTreeStickCell, internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {};
|
|
61229
|
+
void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1), this.options.canvas ? ("node" !== Env$1.mode && (internalProps.element = this.options.canvas.parentElement, internalProps.element.style.position = "relative"), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d"), internalProps.canvas.__vtable__ = this, internalProps.canvas.__vtable_id__ = this.id, internalProps.element && (internalProps.element.__vtable__ = this, internalProps.element.__vtable_id__ = this.id)) : "node" !== Env$1.mode && (internalProps.element = createRootElement(this.padding), internalProps.focusControl = new FocusInput(this, internalProps.element), internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas), internalProps.context = internalProps.canvas.getContext("2d"), internalProps.canvas.__vtable__ = this, internalProps.canvas.__vtable_id__ = this.id, internalProps.element.__vtable__ = this, internalProps.element.__vtable_id__ = this.id, (null === (_e = options.customConfig) || void 0 === _e ? void 0 : _e.createReactContainer) && createReactContainer(this)), internalProps.handler = new EventHandler(), isNumber$2(this.options.resizeTime) && (internalProps.handler.resizeTime = this.options.resizeTime), internalProps.pixelRatio = pixelRatio, internalProps.frozenColCount = frozenColCount, internalProps.frozenRowCount = frozenRowCount, internalProps.unfreezeAllOnExceedsMaxWidth = null == unfreezeAllOnExceedsMaxWidth || unfreezeAllOnExceedsMaxWidth, internalProps.defaultRowHeight = defaultRowHeight, internalProps.defaultHeaderRowHeight = null != defaultHeaderRowHeight ? defaultHeaderRowHeight : defaultRowHeight, internalProps.defaultColWidth = defaultColWidth, internalProps.defaultHeaderColWidth = null != defaultHeaderColWidth ? defaultHeaderColWidth : defaultColWidth, internalProps.keyboardOptions = keyboardOptions, internalProps.eventOptions = eventOptions, internalProps.rowSeriesNumber = rowSeriesNumber, internalProps.enableCheckboxCascade = null === (_f = null != enableCheckboxCascade ? enableCheckboxCascade : null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox) || void 0 === _f || _f, internalProps.enableHeaderCheckboxCascade = enableCheckboxCascade || null == enableHeaderCheckboxCascade || enableHeaderCheckboxCascade, internalProps.columnResizeMode = null !== (_g = null == resize ? void 0 : resize.columnResizeMode) && void 0 !== _g ? _g : columnResizeMode, internalProps.canResizeColumn = null == resize ? void 0 : resize.canResizeColumn, internalProps.rowResizeMode = null !== (_h = null == resize ? void 0 : resize.rowResizeMode) && void 0 !== _h ? _h : rowResizeMode, internalProps.dragHeaderMode = null !== (_k = null !== (_j = null == dragOrder ? void 0 : dragOrder.dragHeaderMode) && void 0 !== _j ? _j : dragHeaderMode) && void 0 !== _k ? _k : "none", internalProps.renderChartAsync = renderChartAsync, setBatchRenderChartCount(renderChartAsyncBatchCount), internalProps.overscrollBehavior = null != overscrollBehavior ? overscrollBehavior : "auto", internalProps.groupBy = null !== (_l = null == groupConfig ? void 0 : groupConfig.groupBy) && void 0 !== _l ? _l : groupBy, internalProps.groupTitleCheckbox = null !== (_m = null == groupConfig ? void 0 : groupConfig.titleCheckbox) && void 0 !== _m ? _m : !!(null == rowSeriesNumber ? void 0 : rowSeriesNumber.enableTreeCheckbox), internalProps.groupTitleFieldFormat = null !== (_o = null == groupConfig ? void 0 : groupConfig.titleFieldFormat) && void 0 !== _o ? _o : groupTitleFieldFormat, internalProps.groupTitleCustomLayout = null !== (_p = null == groupConfig ? void 0 : groupConfig.titleCustomLayout) && void 0 !== _p ? _p : groupTitleCustomLayout, internalProps.enableTreeStickCell = null !== (_q = null == groupConfig ? void 0 : groupConfig.enableTreeStickCell) && void 0 !== _q ? _q : enableTreeStickCell, internalProps._rowHeightsMap = new NumberRangeMap(this), internalProps._rowRangeHeightsMap = new Map(), internalProps._colRangeWidthsMap = new Map(), internalProps._widthResizedColMap = new Set(), internalProps._heightResizedRowMap = new Set(), this.colWidthsMap = new NumberMap(), this.colContentWidthsMap = new NumberMap(), this.colWidthsLimit = {};
|
|
61207
61230
|
const that = this;
|
|
61208
61231
|
if (internalProps.calcWidthContext = {
|
|
61209
61232
|
_: internalProps,
|
|
@@ -62080,18 +62103,30 @@
|
|
|
62080
62103
|
this._scrollToRowCorrectTimer && (clearTimeout(this._scrollToRowCorrectTimer), this._scrollToRowCorrectTimer = null);
|
|
62081
62104
|
}
|
|
62082
62105
|
release() {
|
|
62083
|
-
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, _0, _1;
|
|
62084
|
-
|
|
62085
|
-
|
|
62106
|
+
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, _0, _1, _2, _3, _4;
|
|
62107
|
+
if ("undefined" != typeof window) {
|
|
62108
|
+
const g = window;
|
|
62109
|
+
(null == g ? void 0 : g[this.id]) === this ? delete g[this.id] : (null == g ? void 0 : g[this.id]) && (g[this.id] = null);
|
|
62110
|
+
const registry = null == g ? void 0 : g.__vtable__;
|
|
62111
|
+
(null === (_a = null == registry ? void 0 : registry.byId) || void 0 === _a ? void 0 : _a[this.id]) === this && delete registry.byId[this.id];
|
|
62112
|
+
const list = null == registry ? void 0 : registry.list;
|
|
62113
|
+
if (Array.isArray(list) && list.length) for (let i = list.length - 1; i >= 0; i--) list[i] === this && list.splice(i, 1);
|
|
62114
|
+
(null == registry ? void 0 : registry.last) === this && (registry.last = Array.isArray(list) && list.length ? list[list.length - 1] : null), (null == g ? void 0 : g.__vtable_last_id__) === this.id && (g.__vtable_last_id__ = null !== (_c = null === (_b = null == registry ? void 0 : registry.last) || void 0 === _b ? void 0 : _b.id) && void 0 !== _c ? _c : null);
|
|
62115
|
+
}
|
|
62086
62116
|
if (this.isReleased) return;
|
|
62087
|
-
|
|
62117
|
+
null === (_f = null === (_e = null === (_d = this.scenegraph) || void 0 === _d ? void 0 : _d.component) || void 0 === _e ? void 0 : _e.vScrollBar) || void 0 === _f || _f.release(), null === (_j = null === (_h = null === (_g = this.scenegraph) || void 0 === _g ? void 0 : _g.component) || void 0 === _h ? void 0 : _h.hScrollBar) || void 0 === _j || _j.release(), this.animationManager.clear(), this.animationManager.ticker.release(), null === (_m = null === (_l = null === (_k = this.scenegraph) || void 0 === _k ? void 0 : _k.stage) || void 0 === _l ? void 0 : _l.ticker) || void 0 === _m || _m.release();
|
|
62118
|
+
const internalProps = this.internalProps,
|
|
62119
|
+
canvas = null == internalProps ? void 0 : internalProps.canvas;
|
|
62120
|
+
(null == canvas ? void 0 : canvas.__vtable__) === this && (delete canvas.__vtable__, delete canvas.__vtable_id__);
|
|
62121
|
+
const element = null == internalProps ? void 0 : internalProps.element;
|
|
62122
|
+
(null == element ? void 0 : element.__vtable__) === this && (delete element.__vtable__, delete element.__vtable_id__), this.clearCorrectTimer(), null === (_p = null === (_o = internalProps.tooltipHandler) || void 0 === _o ? void 0 : _o.release) || void 0 === _p || _p.call(_o), null === (_r = null === (_q = internalProps.menuHandler) || void 0 === _q ? void 0 : _q.release) || void 0 === _r || _r.call(_q), null === (_s = super.release) || void 0 === _s || _s.call(this), this.pluginManager.release(), null === (_u = null === (_t = internalProps.handler) || void 0 === _t ? void 0 : _t.release) || void 0 === _u || _u.call(_t), this.eventManager.release(), null === (_w = null === (_v = internalProps.focusControl) || void 0 === _v ? void 0 : _v.release) || void 0 === _w || _w.call(_v), null === (_x = internalProps.legends) || void 0 === _x || _x.forEach(legend => {
|
|
62088
62123
|
null == legend || legend.release();
|
|
62089
|
-
}), null === (
|
|
62124
|
+
}), null === (_y = internalProps.title) || void 0 === _y || _y.release(), internalProps.title = null, null === (_z = internalProps.emptyTip) || void 0 === _z || _z.release(), internalProps.emptyTip = null, internalProps.layoutMap.release(), internalProps.releaseList && (internalProps.releaseList.forEach(releaseObj => {
|
|
62090
62125
|
var _a;
|
|
62091
62126
|
return null === (_a = null == releaseObj ? void 0 : releaseObj.release) || void 0 === _a ? void 0 : _a.call(releaseObj);
|
|
62092
62127
|
}), internalProps.releaseList = null), this.scenegraph.stage.release(), this.scenegraph.proxy.release();
|
|
62093
|
-
const parentElement = null === (
|
|
62094
|
-
parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), null === (
|
|
62128
|
+
const parentElement = null === (_0 = internalProps.element) || void 0 === _0 ? void 0 : _0.parentElement;
|
|
62129
|
+
parentElement && !this.options.canvas && parentElement.removeChild(internalProps.element), null === (_3 = null === (_2 = null === (_1 = this.editorManager) || void 0 === _1 ? void 0 : _1.editingEditor) || void 0 === _2 ? void 0 : _2.onEnd) || void 0 === _3 || _3.call(_2), this.isReleased = !0, this.scenegraph = null, this.internalProps = null, null === (_4 = this.reactCustomLayout) || void 0 === _4 || _4.clearCache(), clearChartRenderQueue();
|
|
62095
62130
|
}
|
|
62096
62131
|
fireListeners(type, event) {
|
|
62097
62132
|
return super.fireListeners(type, event);
|
|
@@ -95080,7 +95115,7 @@
|
|
|
95080
95115
|
margin: 0 8px;
|
|
95081
95116
|
font-size: 14px;
|
|
95082
95117
|
color: #666;
|
|
95083
|
-
font-family:
|
|
95118
|
+
font-family: monospace;
|
|
95084
95119
|
width: 20px;
|
|
95085
95120
|
display: flex;
|
|
95086
95121
|
align-items: center;
|
|
@@ -95694,7 +95729,7 @@
|
|
|
95694
95729
|
importStyle();
|
|
95695
95730
|
}
|
|
95696
95731
|
|
|
95697
|
-
const version = "1.25.
|
|
95732
|
+
const version = "1.25.1-alpha.1";
|
|
95698
95733
|
importStyles();
|
|
95699
95734
|
|
|
95700
95735
|
exports.TYPES = index;
|