@visactor/vtable-calendar 1.11.2-alpha.2 → 1.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vtable-calendar.js +126 -62
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +4 -4
package/dist/vtable-calendar.js
CHANGED
|
@@ -33680,8 +33680,9 @@
|
|
|
33680
33680
|
dy: 0
|
|
33681
33681
|
});
|
|
33682
33682
|
}), renderDefault) {
|
|
33683
|
-
const style = table._getCellStyle(colStart, rowStart)
|
|
33684
|
-
|
|
33683
|
+
const style = table._getCellStyle(colStart, rowStart),
|
|
33684
|
+
padding = getQuadProps(getProp("padding", style, col, row, table));
|
|
33685
|
+
updateCellContentHeight(singleCellGroup, distHeight, detaY, autoRowHeight, padding, style.textAlign, style.textBaseline, table);
|
|
33685
33686
|
}
|
|
33686
33687
|
const rangeHeight = table.getRowHeight(row),
|
|
33687
33688
|
rangeWidth = table.getColWidth(col);
|
|
@@ -33701,8 +33702,9 @@
|
|
|
33701
33702
|
widthChange && (singleCellGroup.needUpdateWidth = !0);
|
|
33702
33703
|
}
|
|
33703
33704
|
} else {
|
|
33704
|
-
const style = table._getCellStyle(cellGroup.col, cellGroup.row)
|
|
33705
|
-
|
|
33705
|
+
const style = table._getCellStyle(cellGroup.col, cellGroup.row),
|
|
33706
|
+
padding = getQuadProps(getProp("padding", style, cellGroup.col, cellGroup.row, table));
|
|
33707
|
+
updateCellContentHeight(cellGroup, distHeight, detaY, autoRowHeight, padding, style.textAlign, style.textBaseline, table);
|
|
33706
33708
|
}
|
|
33707
33709
|
}
|
|
33708
33710
|
|
|
@@ -33898,7 +33900,7 @@
|
|
|
33898
33900
|
let changed = !1;
|
|
33899
33901
|
if (renderDefault) {
|
|
33900
33902
|
const style = table._getCellStyle(colStart, rowStart),
|
|
33901
|
-
padding = getQuadProps(style
|
|
33903
|
+
padding = getQuadProps(getProp("padding", style, col, row, table)),
|
|
33902
33904
|
textAlign = style.textAlign,
|
|
33903
33905
|
textBaseline = style.textBaseline;
|
|
33904
33906
|
changed = updateCellContentWidth(singleCellGroup, distWidth, cellHeight, detaX, autoRowHeight, padding, textAlign, textBaseline, table.scenegraph);
|
|
@@ -33929,7 +33931,7 @@
|
|
|
33929
33931
|
return isHeightChange;
|
|
33930
33932
|
}
|
|
33931
33933
|
const style = table._getCellStyle(cellGroup.col, cellGroup.row),
|
|
33932
|
-
padding = getQuadProps(style.
|
|
33934
|
+
padding = getQuadProps(getProp("padding", style, cellGroup.col, cellGroup.row, table)),
|
|
33933
33935
|
textAlign = style.textAlign,
|
|
33934
33936
|
textBaseline = style.textBaseline;
|
|
33935
33937
|
return updateCellContentWidth(cellGroup, distWidth, table.getRowHeight(cellGroup.row), detaX, autoRowHeight, padding, textAlign, textBaseline, table.scenegraph);
|
|
@@ -40752,12 +40754,16 @@
|
|
|
40752
40754
|
function initCheckedState(records, state) {
|
|
40753
40755
|
state.checkedState = [], state.headerCheckedState = {}, state.radioState = {};
|
|
40754
40756
|
let isNeedInitHeaderCheckedStateFromRecord = !1;
|
|
40755
|
-
state._checkboxCellTypeFields = [], state._headerCheckFuncs = {}, state.table.internalProps.layoutMap.headerObjects.forEach((hd, index) => {
|
|
40757
|
+
if (state._checkboxCellTypeFields = [], state._headerCheckFuncs = {}, state.table.internalProps.layoutMap.headerObjects.forEach((hd, index) => {
|
|
40756
40758
|
if ("checkbox" === hd.headerType) {
|
|
40757
40759
|
const headerChecked = hd.define.checked;
|
|
40758
40760
|
null == headerChecked || "function" == typeof headerChecked ? (isNeedInitHeaderCheckedStateFromRecord = !0, "function" == typeof headerChecked && (state._headerCheckFuncs[hd.field] = headerChecked)) : state.headerCheckedState[hd.field] = headerChecked, "checkbox" !== hd.define.cellType || hd.fieldFormat || state._checkboxCellTypeFields.push(hd.field);
|
|
40759
40761
|
}
|
|
40760
|
-
}),
|
|
40762
|
+
}), 1 === state.table.leftRowSeriesNumberCount) state.headerCheckedState._vtable_rowSeries_number = !1, state._checkboxCellTypeFields.push("_vtable_rowSeries_number"), isNeedInitHeaderCheckedStateFromRecord = !0;else if (state.table.leftRowSeriesNumberCount > 1) {
|
|
40763
|
+
for (let i = 0; i < state.table.leftRowSeriesNumberCount; i++) state.headerCheckedState[`_vtable_rowSeries_number_${i}`] = !1, state._checkboxCellTypeFields.push(`_vtable_rowSeries_number_${i}`);
|
|
40764
|
+
isNeedInitHeaderCheckedStateFromRecord = !0;
|
|
40765
|
+
}
|
|
40766
|
+
isNeedInitHeaderCheckedStateFromRecord && records.forEach((record, index) => {
|
|
40761
40767
|
state._checkboxCellTypeFields.forEach(field => {
|
|
40762
40768
|
const value = record[field];
|
|
40763
40769
|
let isChecked;
|
|
@@ -40801,14 +40807,28 @@
|
|
|
40801
40807
|
}
|
|
40802
40808
|
}
|
|
40803
40809
|
function setCellCheckboxState(col, row, checked, table) {
|
|
40804
|
-
const
|
|
40805
|
-
|
|
40806
|
-
if (!
|
|
40810
|
+
const cellGroup = table.scenegraph.getCell(col, row),
|
|
40811
|
+
checkbox = null == cellGroup ? void 0 : cellGroup.getChildByName("checkbox");
|
|
40812
|
+
if (!checkbox) {
|
|
40813
|
+
const field = table.getHeaderField(col, row);
|
|
40814
|
+
if (table.isHeader(col, row)) {
|
|
40815
|
+
table.stateManager.setHeaderCheckedState(field, checked);
|
|
40816
|
+
"checkbox" === table.getCellType(col, row) && table.scenegraph.updateCheckboxCellState(col, row, checked);
|
|
40817
|
+
} else {
|
|
40818
|
+
table.stateManager.setCheckedState(col, row, field, checked);
|
|
40819
|
+
if ("checkbox" === table.getCellType(col, row)) {
|
|
40820
|
+
const oldHeaderCheckedState = table.stateManager.headerCheckedState[field],
|
|
40821
|
+
newHeaderCheckedState = table.stateManager.updateHeaderCheckedState(field, col, row);
|
|
40822
|
+
oldHeaderCheckedState !== newHeaderCheckedState && table.scenegraph.updateHeaderCheckboxCellState(col, row, newHeaderCheckedState);
|
|
40823
|
+
}
|
|
40824
|
+
}
|
|
40825
|
+
return;
|
|
40826
|
+
}
|
|
40807
40827
|
const {
|
|
40808
40828
|
checked: oldChecked,
|
|
40809
40829
|
indeterminate: indeterminate
|
|
40810
|
-
} =
|
|
40811
|
-
indeterminate ? (checked ||
|
|
40830
|
+
} = checkbox.attribute;
|
|
40831
|
+
indeterminate ? (checked || checkbox._handlePointerUp(), checkbox._handlePointerUp()) : oldChecked ? checked || checkbox._handlePointerUp() : checked && checkbox._handlePointerUp();
|
|
40812
40832
|
}
|
|
40813
40833
|
function changeCheckboxOrder(sourceIndex, targetIndex, state) {
|
|
40814
40834
|
const {
|
|
@@ -41636,9 +41656,11 @@
|
|
|
41636
41656
|
data = Object.assign({
|
|
41637
41657
|
__value: cellValue,
|
|
41638
41658
|
__dataValue: cellOriginValue
|
|
41639
|
-
}, rowData)
|
|
41640
|
-
|
|
41641
|
-
|
|
41659
|
+
}, rowData);
|
|
41660
|
+
if (isFunction$1(templateLink)) url = templateLink(data, col, row, table);else {
|
|
41661
|
+
const re = /\{\s*(\S+?)\s*\}/g;
|
|
41662
|
+
url = templateLink.replace(re, (matchs, key) => data[key]);
|
|
41663
|
+
}
|
|
41642
41664
|
} else if (linkDetect) {
|
|
41643
41665
|
if (!regUrl.test(cellValue)) return;
|
|
41644
41666
|
url = cellValue;
|
|
@@ -43307,12 +43329,14 @@
|
|
|
43307
43329
|
}
|
|
43308
43330
|
class MenuElement {
|
|
43309
43331
|
constructor(table) {
|
|
43310
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
43332
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
43311
43333
|
this._handler = new EventHandler(), this._rootElement = createMenuDomElement$1(), this._secondElement = createMenuDomElement$1(), this._secondElement.sub = !0, this._showChildrenIndex = -1, this._rootElement.addEventListener("wheel", e => {
|
|
43312
43334
|
e.stopPropagation();
|
|
43313
43335
|
}), null === (_a = this._rootElement) || void 0 === _a || _a.addEventListener("mousedown", e => {
|
|
43314
43336
|
e.stopPropagation(), e.preventDefault();
|
|
43315
|
-
}), null === (_b = this._rootElement) || void 0 === _b || _b.addEventListener("
|
|
43337
|
+
}), null === (_b = this._rootElement) || void 0 === _b || _b.addEventListener("contextmenu", e => {
|
|
43338
|
+
e.stopPropagation(), e.preventDefault();
|
|
43339
|
+
}), null === (_c = this._rootElement) || void 0 === _c || _c.addEventListener("touchend", e => {
|
|
43316
43340
|
if (e.stopPropagation(), e.preventDefault(), this._rootElement.classList.contains(HIDDEN_CLASSNAME$1)) return;
|
|
43317
43341
|
const {
|
|
43318
43342
|
col: col,
|
|
@@ -43335,7 +43359,7 @@
|
|
|
43335
43359
|
cellLocation: table.getCellLocation(col, row),
|
|
43336
43360
|
event: e
|
|
43337
43361
|
}), table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLEAR, null), table.fireListeners(TABLE_EVENT_TYPE.HIDE_MENU, null), e.stopPropagation();
|
|
43338
|
-
}), null === (
|
|
43362
|
+
}), null === (_d = this._rootElement) || void 0 === _d || _d.addEventListener("click", e => {
|
|
43339
43363
|
if (e.stopPropagation(), e.preventDefault(), this._rootElement.classList.contains(HIDDEN_CLASSNAME$1)) return;
|
|
43340
43364
|
const {
|
|
43341
43365
|
col: col,
|
|
@@ -43358,7 +43382,7 @@
|
|
|
43358
43382
|
cellLocation: table.getCellLocation(col, row),
|
|
43359
43383
|
event: e
|
|
43360
43384
|
}), table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLEAR, null), table.fireListeners(TABLE_EVENT_TYPE.HIDE_MENU, null), e.stopPropagation();
|
|
43361
|
-
}), null === (
|
|
43385
|
+
}), null === (_e = this._rootElement) || void 0 === _e || _e.addEventListener("mousemove", e => {
|
|
43362
43386
|
var _a, _b;
|
|
43363
43387
|
if (this._rootElement.classList.contains(HIDDEN_CLASSNAME$1)) return;
|
|
43364
43388
|
e.stopPropagation();
|
|
@@ -43391,17 +43415,17 @@
|
|
|
43391
43415
|
null == secondElement || secondElement.classList.remove(SHOWN_CLASSNAME$1), null == secondElement || secondElement.classList.add(HIDDEN_CLASSNAME$1);
|
|
43392
43416
|
}
|
|
43393
43417
|
}, 300);
|
|
43394
|
-
}), null === (
|
|
43418
|
+
}), null === (_f = this._secondElement) || void 0 === _f || _f.addEventListener("wheel", e => {
|
|
43395
43419
|
e.stopPropagation();
|
|
43396
|
-
}), null === (
|
|
43420
|
+
}), null === (_g = this._secondElement) || void 0 === _g || _g.addEventListener("mousemove", e => {
|
|
43397
43421
|
this._rootElement.classList.contains(HIDDEN_CLASSNAME$1) || e.stopPropagation();
|
|
43398
|
-
}), null === (
|
|
43422
|
+
}), null === (_h = this._secondElement) || void 0 === _h || _h.addEventListener("mouseenter", e => {
|
|
43399
43423
|
this._mouseEnterSecondElement = !0;
|
|
43400
|
-
}), null === (
|
|
43424
|
+
}), null === (_j = this._secondElement) || void 0 === _j || _j.addEventListener("mouseleave", e => {
|
|
43401
43425
|
this._mouseEnterSecondElement = !1;
|
|
43402
|
-
}), null === (
|
|
43426
|
+
}), null === (_k = this._secondElement) || void 0 === _k || _k.addEventListener("mousedown", e => {
|
|
43403
43427
|
e.stopPropagation(), e.preventDefault();
|
|
43404
|
-
}), null === (
|
|
43428
|
+
}), null === (_l = this._secondElement) || void 0 === _l || _l.addEventListener("click", e => {
|
|
43405
43429
|
if (e.stopPropagation(), e.preventDefault(), this._secondElement.classList.contains(HIDDEN_CLASSNAME$1)) return;
|
|
43406
43430
|
const {
|
|
43407
43431
|
col: col,
|
|
@@ -43471,11 +43495,12 @@
|
|
|
43471
43495
|
this._menuInstanceInfo = void 0, (null == rootElement ? void 0 : rootElement.parentElement) && (rootElement.classList.remove(SHOWN_CLASSNAME$1), rootElement.classList.add(HIDDEN_CLASSNAME$1)), (null == secondElement ? void 0 : secondElement.parentElement) && (secondElement.classList.remove(SHOWN_CLASSNAME$1), secondElement.classList.add(HIDDEN_CLASSNAME$1));
|
|
43472
43496
|
}
|
|
43473
43497
|
_canBindToCell(table, col, row) {
|
|
43498
|
+
var _a;
|
|
43474
43499
|
const rect = table.getCellRangeRelativeRect({
|
|
43475
43500
|
col: col,
|
|
43476
43501
|
row: row
|
|
43477
43502
|
}),
|
|
43478
|
-
element = table.getElement(),
|
|
43503
|
+
element = null !== (_a = table.internalProps.menu.parentElement) && void 0 !== _a ? _a : table.getElement(),
|
|
43479
43504
|
{
|
|
43480
43505
|
top: top,
|
|
43481
43506
|
bottom: bottom,
|
|
@@ -43491,12 +43516,15 @@
|
|
|
43491
43516
|
return !(offsetHeight < top) && !(offsetWidth < left);
|
|
43492
43517
|
}
|
|
43493
43518
|
_bindToCell(table, col, row, position, referencePosition) {
|
|
43519
|
+
var _a;
|
|
43494
43520
|
const rootElement = this._rootElement,
|
|
43495
|
-
element = table.getElement(),
|
|
43521
|
+
element = null !== (_a = table.internalProps.menu.parentElement) && void 0 !== _a ? _a : table.getElement(),
|
|
43496
43522
|
{
|
|
43497
43523
|
width: containerWidth,
|
|
43498
|
-
height: containerHeight
|
|
43499
|
-
|
|
43524
|
+
height: containerHeight,
|
|
43525
|
+
left: containerLeft,
|
|
43526
|
+
top: containerTop
|
|
43527
|
+
} = element.getBoundingClientRect();
|
|
43500
43528
|
if (rootElement) {
|
|
43501
43529
|
rootElement.parentElement !== element && element.appendChild(rootElement), rootElement.style.left = "0px";
|
|
43502
43530
|
const maxWidth = .8 * containerWidth;
|
|
@@ -43508,19 +43536,30 @@
|
|
|
43508
43536
|
const rect = element.getBoundingClientRect(),
|
|
43509
43537
|
scaleX = rect.width / element.offsetWidth,
|
|
43510
43538
|
scaleY = rect.height / element.offsetHeight;
|
|
43511
|
-
|
|
43539
|
+
rootElementTop * scaleY + rootElementHeight > containerHeight && (rootElementTop = (containerHeight - rootElementHeight) / scaleY), rootElementTop < 0 && (rootElementTop /= 2);
|
|
43540
|
+
let deltaTop = 0,
|
|
43541
|
+
deltaLeft = 0;
|
|
43542
|
+
if (table.getElement() !== element) {
|
|
43543
|
+
const {
|
|
43544
|
+
left: left,
|
|
43545
|
+
top: top
|
|
43546
|
+
} = table.getElement().getBoundingClientRect();
|
|
43547
|
+
deltaTop = top - containerTop, deltaLeft = left - containerLeft;
|
|
43548
|
+
}
|
|
43549
|
+
return rootElement.style.top = `${rootElementTop + deltaTop}px`, rootElementLeft < 0 ? rootElementLeft = 0 : rootElementLeft * scaleX + rootElementWidth > containerWidth && (rootElementLeft = (containerWidth - rootElementWidth) / scaleX), rootElement.style.left = `${rootElementLeft + deltaLeft}px`, !0;
|
|
43512
43550
|
}
|
|
43513
43551
|
return !1;
|
|
43514
43552
|
}
|
|
43515
43553
|
_bindSecondElement(table, col, row, x, y) {
|
|
43554
|
+
var _a;
|
|
43516
43555
|
const secondElement = this._secondElement,
|
|
43517
43556
|
rootElement = this._rootElement,
|
|
43518
|
-
element = table.getElement(),
|
|
43557
|
+
element = null !== (_a = table.internalProps.menu.parentElement) && void 0 !== _a ? _a : table.getElement(),
|
|
43519
43558
|
{
|
|
43520
43559
|
width: containerWidth,
|
|
43521
43560
|
left: containerLeft,
|
|
43522
43561
|
top: containerTop
|
|
43523
|
-
} =
|
|
43562
|
+
} = element.getBoundingClientRect(),
|
|
43524
43563
|
{
|
|
43525
43564
|
x: rootLeft,
|
|
43526
43565
|
y: rootTop,
|
|
@@ -44343,19 +44382,22 @@
|
|
|
44343
44382
|
this.table = table, this.customCellStyle = customCellStyle, this.customCellStyleArrangement = customCellStyleArrangement;
|
|
44344
44383
|
}
|
|
44345
44384
|
getCustomCellStyle(col, row) {
|
|
44346
|
-
const
|
|
44347
|
-
if (
|
|
44348
|
-
const
|
|
44349
|
-
return
|
|
44350
|
-
|
|
44351
|
-
|
|
44352
|
-
|
|
44353
|
-
|
|
44354
|
-
|
|
44385
|
+
const customStyleIds = this.getCustomCellStyleIds(col, row);
|
|
44386
|
+
if (customStyleIds.length) {
|
|
44387
|
+
const styles = [];
|
|
44388
|
+
return customStyleIds.forEach(customStyleId => {
|
|
44389
|
+
const styleOption = this.getCustomCellStyleOption(customStyleId);
|
|
44390
|
+
(null == styleOption ? void 0 : styleOption.style) && styles.push(styleOption.style);
|
|
44391
|
+
}), merge({}, ...styles);
|
|
44392
|
+
}
|
|
44393
|
+
}
|
|
44394
|
+
getCustomCellStyleIds(col, row) {
|
|
44395
|
+
const customStyleIds = [],
|
|
44396
|
+
range = this.table.getCellRange(col, row);
|
|
44355
44397
|
for (let c = range.start.col; c <= range.end.col; c++) for (let r = range.start.row; r <= range.end.row; r++) this.customCellStyleArrangement.forEach(style => {
|
|
44356
|
-
style.cellPosition.range ? style.cellPosition.range.start.col <= c && style.cellPosition.range.end.col >= c && style.cellPosition.range.start.row <= r && style.cellPosition.range.end.row >= r && (
|
|
44398
|
+
style.cellPosition.range ? style.cellPosition.range.start.col <= c && style.cellPosition.range.end.col >= c && style.cellPosition.range.start.row <= r && style.cellPosition.range.end.row >= r && customStyleIds.push(style.customStyleId) : style.cellPosition.col === c && style.cellPosition.row === r && customStyleIds.push(style.customStyleId);
|
|
44357
44399
|
});
|
|
44358
|
-
return
|
|
44400
|
+
return customStyleIds;
|
|
44359
44401
|
}
|
|
44360
44402
|
getCustomCellStyleOption(customStyleId) {
|
|
44361
44403
|
return this.customCellStyle.find(style => style.id === customStyleId);
|
|
@@ -45471,7 +45513,7 @@
|
|
|
45471
45513
|
constructor(container) {
|
|
45472
45514
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
45473
45515
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
45474
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.11.2
|
|
45516
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.11.2", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
45475
45517
|
const {
|
|
45476
45518
|
frozenColCount = 0,
|
|
45477
45519
|
frozenRowCount: frozenRowCount,
|
|
@@ -45541,7 +45583,8 @@
|
|
|
45541
45583
|
parentElement: this.getElement(),
|
|
45542
45584
|
renderMode: "html",
|
|
45543
45585
|
isShowOverflowTextTooltip: !1,
|
|
45544
|
-
confine: !0
|
|
45586
|
+
confine: !0,
|
|
45587
|
+
position: Placement.bottom
|
|
45545
45588
|
}, options.tooltip), "html" === internalProps.tooltip.renderMode) {
|
|
45546
45589
|
const TooltipHandler = Factory.getComponent("tooltipHandler");
|
|
45547
45590
|
TooltipHandler && (internalProps.tooltipHandler = new TooltipHandler(this, internalProps.tooltip.confine));
|
|
@@ -46292,7 +46335,8 @@
|
|
|
46292
46335
|
parentElement: this.getElement(),
|
|
46293
46336
|
renderMode: "html",
|
|
46294
46337
|
isShowOverflowTextTooltip: !1,
|
|
46295
|
-
confine: !0
|
|
46338
|
+
confine: !0,
|
|
46339
|
+
position: Placement.bottom
|
|
46296
46340
|
}, options.tooltip), "html" === internalProps.tooltip.renderMode && !internalProps.tooltipHandler) {
|
|
46297
46341
|
const TooltipHandler = Factory.getComponent("tooltipHandler");
|
|
46298
46342
|
internalProps.tooltipHandler = new TooltipHandler(this, internalProps.tooltip.confine);
|
|
@@ -47913,18 +47957,20 @@
|
|
|
47913
47957
|
}
|
|
47914
47958
|
handleRowSeriesNumber(rowSeriesNumber) {
|
|
47915
47959
|
var _a, _b;
|
|
47916
|
-
rowSeriesNumber && (Array.isArray(rowSeriesNumber) ? this.rowSeriesNumberColumn = rowSeriesNumber.map(seriesNumber => {
|
|
47917
|
-
var _a, _b;
|
|
47960
|
+
rowSeriesNumber && (Array.isArray(rowSeriesNumber) ? this.rowSeriesNumberColumn = rowSeriesNumber.map((seriesNumber, index) => {
|
|
47961
|
+
var _a, _b, _c;
|
|
47918
47962
|
return {
|
|
47919
47963
|
id: this.seqId++,
|
|
47920
47964
|
title: seriesNumber.title,
|
|
47921
|
-
define:
|
|
47965
|
+
define: merge({
|
|
47966
|
+
field: "_vtable_rowSeries_number_" + index
|
|
47967
|
+
}, seriesNumber),
|
|
47922
47968
|
cellType: null !== (_a = seriesNumber.cellType) && void 0 !== _a ? _a : "text",
|
|
47923
47969
|
headerType: null !== (_b = rowSeriesNumber.cellType) && void 0 !== _b ? _b : "text",
|
|
47924
47970
|
style: seriesNumber.style,
|
|
47925
47971
|
width: seriesNumber.width,
|
|
47926
47972
|
format: seriesNumber.format,
|
|
47927
|
-
field: seriesNumber.field,
|
|
47973
|
+
field: null !== (_c = seriesNumber.field) && void 0 !== _c ? _c : "_vtable_rowSeries_number_" + index,
|
|
47928
47974
|
icon: seriesNumber.icon,
|
|
47929
47975
|
headerIcon: seriesNumber.headerIcon,
|
|
47930
47976
|
isChildNode: !1
|
|
@@ -47932,13 +47978,15 @@
|
|
|
47932
47978
|
}) : this.rowSeriesNumberColumn = [{
|
|
47933
47979
|
id: this.seqId++,
|
|
47934
47980
|
title: rowSeriesNumber.title,
|
|
47935
|
-
define:
|
|
47981
|
+
define: merge({
|
|
47982
|
+
field: "_vtable_rowSeries_number"
|
|
47983
|
+
}, rowSeriesNumber),
|
|
47936
47984
|
cellType: null !== (_a = rowSeriesNumber.cellType) && void 0 !== _a ? _a : "text",
|
|
47937
47985
|
headerType: null !== (_b = rowSeriesNumber.cellType) && void 0 !== _b ? _b : "text",
|
|
47938
47986
|
style: rowSeriesNumber.style,
|
|
47939
47987
|
width: rowSeriesNumber.width,
|
|
47940
47988
|
format: rowSeriesNumber.format,
|
|
47941
|
-
field: "",
|
|
47989
|
+
field: "_vtable_rowSeries_number",
|
|
47942
47990
|
icon: rowSeriesNumber.icon,
|
|
47943
47991
|
headerIcon: rowSeriesNumber.headerIcon,
|
|
47944
47992
|
isChildNode: !1
|
|
@@ -48331,9 +48379,11 @@
|
|
|
48331
48379
|
return this._headerObjectMap[id];
|
|
48332
48380
|
}
|
|
48333
48381
|
getHeaderField(col, row) {
|
|
48334
|
-
var _a;
|
|
48382
|
+
var _a, _b, _c;
|
|
48383
|
+
if (this.isSeriesNumberInHeader(col, row)) return null === (_a = this.getSeriesNumberHeader(col, row)) || void 0 === _a ? void 0 : _a.field;
|
|
48384
|
+
if (this.isSeriesNumberInBody(col, row)) return null === (_b = this.getSeriesNumberBody(col, row)) || void 0 === _b ? void 0 : _b.field;
|
|
48335
48385
|
const id = this.getCellId(col, row);
|
|
48336
|
-
return (null === (
|
|
48386
|
+
return (null === (_c = this._headerObjectMap[id]) || void 0 === _c ? void 0 : _c.field) || (this.transpose ? this._columns[row] && this._columns[row].field : this._columns[col - this.leftRowSeriesNumberColumnCount] && this._columns[col - this.leftRowSeriesNumberColumnCount].field);
|
|
48337
48387
|
}
|
|
48338
48388
|
getHeaderCellAdressById(id) {
|
|
48339
48389
|
for (let i = 0; i < this._headerCellIds.length; i++) {
|
|
@@ -50974,11 +51024,12 @@
|
|
|
50974
51024
|
this._menuInstanceInfo = void 0, (null == rootElement ? void 0 : rootElement.parentElement) && (rootElement.classList.remove(SHOWN_CLASSNAME), rootElement.classList.add(HIDDEN_CLASSNAME));
|
|
50975
51025
|
}
|
|
50976
51026
|
_canBindToCell(table, col, row) {
|
|
51027
|
+
var _a;
|
|
50977
51028
|
const rect = table.getCellRangeRelativeRect({
|
|
50978
51029
|
col: col,
|
|
50979
51030
|
row: row
|
|
50980
51031
|
}),
|
|
50981
|
-
element = table.getElement(),
|
|
51032
|
+
element = null !== (_a = table.internalProps.menu.parentElement) && void 0 !== _a ? _a : table.getElement(),
|
|
50982
51033
|
{
|
|
50983
51034
|
top: top,
|
|
50984
51035
|
bottom: bottom,
|
|
@@ -50994,12 +51045,15 @@
|
|
|
50994
51045
|
return !(offsetHeight < top) && !(offsetWidth < left);
|
|
50995
51046
|
}
|
|
50996
51047
|
_bindCell(table, col, row, position, referencePosition) {
|
|
51048
|
+
var _a;
|
|
50997
51049
|
const rootElement = this._rootElement,
|
|
50998
|
-
element = table.getElement(),
|
|
51050
|
+
element = null !== (_a = table.internalProps.menu.parentElement) && void 0 !== _a ? _a : table.getElement(),
|
|
50999
51051
|
{
|
|
51000
51052
|
width: containerWidth,
|
|
51001
|
-
height: containerHeight
|
|
51002
|
-
|
|
51053
|
+
height: containerHeight,
|
|
51054
|
+
left: containerLeft,
|
|
51055
|
+
top: containerTop
|
|
51056
|
+
} = element.getBoundingClientRect();
|
|
51003
51057
|
if (rootElement) {
|
|
51004
51058
|
rootElement.parentElement !== element && element.appendChild(rootElement), rootElement.style.left = "0px";
|
|
51005
51059
|
const maxWidth = .8 * containerWidth;
|
|
@@ -51007,7 +51061,17 @@
|
|
|
51007
51061
|
const rootElementWidth = rootElement.clientWidth,
|
|
51008
51062
|
rootElementHeight = rootElement.clientHeight;
|
|
51009
51063
|
let rootElementLeft, rootElementTop;
|
|
51010
|
-
|
|
51064
|
+
position && (rootElementLeft = position.x, rootElementTop = position.y), referencePosition && (rootElementLeft = referencePosition.rect.right - rootElementWidth, rootElementTop = referencePosition.rect.bottom), rootElementTop + rootElementHeight > containerHeight && (rootElementTop = containerHeight - rootElementHeight, rootElementLeft += rootElementWidth - 2), rootElementTop < 0 && (rootElementTop /= 2);
|
|
51065
|
+
let deltaTop = 0,
|
|
51066
|
+
deltaLeft = 0;
|
|
51067
|
+
if (table.getElement() !== element) {
|
|
51068
|
+
const {
|
|
51069
|
+
left: left,
|
|
51070
|
+
top: top
|
|
51071
|
+
} = table.getElement().getBoundingClientRect();
|
|
51072
|
+
deltaTop = top - containerTop, deltaLeft = left - containerLeft;
|
|
51073
|
+
}
|
|
51074
|
+
return rootElement.style.top = `${rootElementTop + deltaTop}px`, rootElementLeft < 0 ? rootElementLeft = 0 : rootElementLeft + rootElementWidth > containerWidth && (rootElementLeft = containerWidth - rootElementWidth), rootElement.style.left = `${rootElementLeft + deltaLeft}px`, !0;
|
|
51011
51075
|
}
|
|
51012
51076
|
return !1;
|
|
51013
51077
|
}
|
|
@@ -51585,7 +51649,7 @@
|
|
|
51585
51649
|
tooltipOption = {
|
|
51586
51650
|
content: headerDescription,
|
|
51587
51651
|
referencePosition: {
|
|
51588
|
-
placement:
|
|
51652
|
+
placement: table.internalProps.tooltip.position,
|
|
51589
51653
|
rect: rect
|
|
51590
51654
|
},
|
|
51591
51655
|
disappearDelay: null !== (_a = table.internalProps.tooltip.overflowTextTooltipDisappearDelay) && void 0 !== _a ? _a : 0,
|
|
@@ -51600,7 +51664,7 @@
|
|
|
51600
51664
|
overflowText && (tooltipOption = {
|
|
51601
51665
|
content: headerDescription ? `${headerDescription}\n ${overflowText}` : overflowText,
|
|
51602
51666
|
referencePosition: {
|
|
51603
|
-
placement:
|
|
51667
|
+
placement: table.internalProps.tooltip.position,
|
|
51604
51668
|
rect: rect
|
|
51605
51669
|
},
|
|
51606
51670
|
disappearDelay: null !== (_c = table.internalProps.tooltip.overflowTextTooltipDisappearDelay) && void 0 !== _c ? _c : 0,
|