@visactor/vtable-gantt 1.25.1-alpha.1 → 1.26.1-alpha.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.
- package/cjs/components/Menu.js +2 -0
- package/cjs/event/EventTarget.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/plugins/interface.js +1 -2
- package/cjs/state/gantt-table-sync.js +1 -0
- package/dist/vtable-gantt.js +134 -39
- package/dist/vtable-gantt.min.js +1 -1
- package/es/components/Menu.js +2 -0
- package/es/event/EventTarget.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/plugins/interface.js +1 -2
- package/es/state/gantt-table-sync.js +2 -1
- package/package.json +7 -6
package/cjs/components/Menu.js
CHANGED
package/cjs/event/EventTarget.js
CHANGED
package/cjs/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ import * as tools from './tools';
|
|
|
6
6
|
import * as VRender from './vrender';
|
|
7
7
|
import * as VTable from './vtable';
|
|
8
8
|
import * as plugins from './plugins';
|
|
9
|
-
export declare const version = "1.
|
|
9
|
+
export declare const version = "1.26.1-alpha.0";
|
|
10
10
|
export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable, plugins };
|
package/cjs/index.js
CHANGED
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,QAAA,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nimport * as plugins from './plugins';\nexport const version = \"1.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAwBlC,sBAAK;AAVP,mCAAgC;AAY9B,sFAZO,aAAK,OAYP;AAXP,+CAAiC;AAuB/B,sBAAK;AAtBP,mDAAqC;AAuBnC,0BAAO;AAtBT,iDAAmC;AAuBjC,wBAAM;AAtBR,mDAAqC;AAuBnC,0BAAO;AAtBI,QAAA,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["import type { GanttConstructorOptions } from './ts-types';\nimport * as TYPES from './ts-types';\nimport type {\n ColumnDefine,\n ColumnsDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType\n} from '@visactor/vtable';\nimport { Gantt } from './Gantt';\nimport * as tools from './tools';\nimport * as VRender from './vrender';\nimport * as VTable from './vtable';\nimport * as plugins from './plugins';\nexport const version = \"1.26.1-alpha.0\";\n/**\n * @namespace VTableGantt\n */\nexport {\n TYPES,\n GanttConstructorOptions,\n Gantt,\n ColumnsDefine,\n ColumnDefine,\n LinkColumnDefine,\n ChartColumnDefine,\n ImageColumnDefine,\n SparklineColumnDefine,\n ProgressbarColumnDefine,\n TextColumnDefine,\n GroupColumnDefine,\n TextAlignType,\n TextBaselineType,\n tools,\n VRender,\n VTable,\n plugins\n};\n"]}
|
package/cjs/plugins/interface.js
CHANGED
|
@@ -89,6 +89,7 @@ function _syncTableSize(gantt) {
|
|
|
89
89
|
gantt._updateSize(), (0, gantt_helper_1.updateSplitLineAndResizeLine)(gantt), gantt.zoomScaleManager && gantt.zoomScaleManager.handleTableWidthChange());
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
//# sourceMappingURL=gantt-table-sync.js.map
|
|
92
93
|
exports.syncScrollStateToTable = syncScrollStateToTable, exports.syncScrollStateFromTable = syncScrollStateFromTable,
|
|
93
94
|
exports.syncEditCellFromTable = syncEditCellFromTable, exports.syncTreeChangeFromTable = syncTreeChangeFromTable,
|
|
94
95
|
exports.syncSortFromTable = syncSortFromTable, exports.syncDragOrderFromTable = syncDragOrderFromTable,
|
package/dist/vtable-gantt.js
CHANGED
|
@@ -1847,6 +1847,20 @@
|
|
|
1847
1847
|
function crossProduct(dir1, dir2) {
|
|
1848
1848
|
return dir1[0] * dir2[1] - dir1[1] * dir2[0];
|
|
1849
1849
|
}
|
|
1850
|
+
function fixPrecision$1(num, precision = 10) {
|
|
1851
|
+
return Math.round(num * precision) / precision;
|
|
1852
|
+
}
|
|
1853
|
+
function getDecimalPlaces(n) {
|
|
1854
|
+
const dStr = n.toString().split(/[eE]/),
|
|
1855
|
+
s = (dStr[0].split(".")[1] || "").length - (+dStr[1] || 0);
|
|
1856
|
+
return s > 0 ? s : 0;
|
|
1857
|
+
}
|
|
1858
|
+
function precisionAdd(a, b) {
|
|
1859
|
+
return fixPrecision$1(a + b, 10 ** Math.max(getDecimalPlaces(a), getDecimalPlaces(b)));
|
|
1860
|
+
}
|
|
1861
|
+
function precisionSub(a, b) {
|
|
1862
|
+
return fixPrecision$1(a - b, 10 ** Math.max(getDecimalPlaces(a), getDecimalPlaces(b)));
|
|
1863
|
+
}
|
|
1850
1864
|
|
|
1851
1865
|
class Point {
|
|
1852
1866
|
constructor(x = 0, y = 0, x1, y1) {
|
|
@@ -37505,42 +37519,54 @@
|
|
|
37505
37519
|
if (record) if (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator && this.children) {
|
|
37506
37520
|
this.children.push(record);
|
|
37507
37521
|
const value = record.value();
|
|
37508
|
-
this.sum
|
|
37522
|
+
this.sum = precisionAdd(this.sum, null != value ? value : 0), this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum = precisionAdd(this.positiveSum, value) : value < 0 && (this.nagetiveSum = precisionAdd(this.nagetiveSum, value)));
|
|
37509
37523
|
} else if (this.field && !isNaN(parseFloat(record[this.field]))) {
|
|
37510
37524
|
const value = parseFloat(record[this.field]);
|
|
37511
|
-
this.sum
|
|
37525
|
+
this.sum = precisionAdd(this.sum, value), this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum = precisionAdd(this.positiveSum, value) : value < 0 && (this.nagetiveSum = precisionAdd(this.nagetiveSum, value)));
|
|
37512
37526
|
}
|
|
37513
37527
|
this.clearCacheValue();
|
|
37514
37528
|
}
|
|
37515
37529
|
deleteRecord(record) {
|
|
37516
|
-
if (record)
|
|
37517
|
-
this.
|
|
37518
|
-
|
|
37519
|
-
|
|
37520
|
-
|
|
37521
|
-
|
|
37522
|
-
|
|
37530
|
+
if (record) {
|
|
37531
|
+
if (this.isRecord && this.records) {
|
|
37532
|
+
const index = this.records.indexOf(record);
|
|
37533
|
+
-1 !== index && this.records.splice(index, 1);
|
|
37534
|
+
}
|
|
37535
|
+
if (record.isAggregator && this.children) {
|
|
37536
|
+
const index = this.children.indexOf(record);
|
|
37537
|
+
-1 !== index && this.children.splice(index, 1);
|
|
37538
|
+
const value = record.value();
|
|
37539
|
+
this.sum = precisionSub(this.sum, null != value ? value : 0), this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum = precisionSub(this.positiveSum, value) : value < 0 && (this.nagetiveSum = precisionSub(this.nagetiveSum, value)));
|
|
37540
|
+
} else if (this.field && !isNaN(parseFloat(record[this.field]))) {
|
|
37541
|
+
const value = parseFloat(record[this.field]);
|
|
37542
|
+
this.sum = precisionSub(this.sum, value), this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum = precisionSub(this.positiveSum, value) : value < 0 && (this.nagetiveSum = precisionSub(this.nagetiveSum, value)));
|
|
37543
|
+
}
|
|
37523
37544
|
}
|
|
37524
37545
|
this.clearCacheValue();
|
|
37525
37546
|
}
|
|
37526
37547
|
updateRecord(oldRecord, newRecord) {
|
|
37527
37548
|
if (oldRecord && newRecord) {
|
|
37528
|
-
if (this.isRecord && this.records
|
|
37529
|
-
const
|
|
37530
|
-
|
|
37549
|
+
if (this.isRecord && this.records) {
|
|
37550
|
+
const index = this.records.indexOf(oldRecord);
|
|
37551
|
+
-1 !== index && (this.records[index] = newRecord);
|
|
37552
|
+
}
|
|
37553
|
+
if (oldRecord.isAggregator && this.children) {
|
|
37554
|
+
const oldValue = oldRecord.value(),
|
|
37555
|
+
index = this.children.indexOf(oldRecord);
|
|
37556
|
+
-1 !== index && (this.children[index] = newRecord);
|
|
37531
37557
|
const newValue = newRecord.value();
|
|
37532
|
-
this.
|
|
37558
|
+
this.sum = precisionAdd(this.sum, precisionSub(newValue, oldValue)), this.needSplitPositiveAndNegativeForSum && (oldValue > 0 ? this.positiveSum = precisionSub(this.positiveSum, oldValue) : oldValue < 0 && (this.nagetiveSum = precisionSub(this.nagetiveSum, oldValue)), newValue > 0 ? this.positiveSum = precisionAdd(this.positiveSum, newValue) : newValue < 0 && (this.nagetiveSum = precisionAdd(this.nagetiveSum, newValue)));
|
|
37533
37559
|
} else if (this.field && !isNaN(parseFloat(oldRecord[this.field]))) {
|
|
37534
37560
|
const oldValue = parseFloat(oldRecord[this.field]),
|
|
37535
37561
|
newValue = parseFloat(newRecord[this.field]);
|
|
37536
|
-
this.sum
|
|
37562
|
+
this.sum = precisionAdd(this.sum, precisionSub(newValue, oldValue)), this.needSplitPositiveAndNegativeForSum && (oldValue > 0 ? this.positiveSum = precisionSub(this.positiveSum, oldValue) : oldValue < 0 && (this.nagetiveSum = precisionSub(this.nagetiveSum, oldValue)), newValue > 0 ? this.positiveSum = precisionAdd(this.positiveSum, newValue) : newValue < 0 && (this.nagetiveSum = precisionAdd(this.nagetiveSum, newValue)));
|
|
37537
37563
|
}
|
|
37538
37564
|
this.clearCacheValue();
|
|
37539
37565
|
}
|
|
37540
37566
|
}
|
|
37541
37567
|
value() {
|
|
37542
|
-
var _a
|
|
37543
|
-
return null !== (_a = this.changedValue) && void 0 !== _a ? _a :
|
|
37568
|
+
var _a;
|
|
37569
|
+
return null !== (_a = this.changedValue) && void 0 !== _a ? _a : this.records && this.records.length >= 1 || !1 === this.isRecord ? this.sum : void 0;
|
|
37544
37570
|
}
|
|
37545
37571
|
positiveValue() {
|
|
37546
37572
|
return this.positiveSum;
|
|
@@ -37556,16 +37582,16 @@
|
|
|
37556
37582
|
const child = this.children[i];
|
|
37557
37583
|
if (child.isAggregator) {
|
|
37558
37584
|
const value = child.value();
|
|
37559
|
-
this.sum
|
|
37585
|
+
this.sum = precisionAdd(this.sum, null != value ? value : 0), this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum = precisionAdd(this.positiveSum, value) : value < 0 && (this.nagetiveSum = precisionAdd(this.nagetiveSum, value)));
|
|
37560
37586
|
}
|
|
37561
37587
|
} else if (this.records) for (let i = 0; i < this.records.length; i++) {
|
|
37562
37588
|
const record = this.records[i];
|
|
37563
37589
|
if (record.isAggregator) {
|
|
37564
37590
|
const value = record.value();
|
|
37565
|
-
this.sum
|
|
37591
|
+
this.sum = precisionAdd(this.sum, null != value ? value : 0), this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum = precisionAdd(this.positiveSum, value) : value < 0 && (this.nagetiveSum = precisionAdd(this.nagetiveSum, value)));
|
|
37566
37592
|
} else if (this.field && !isNaN(parseFloat(record[this.field]))) {
|
|
37567
37593
|
const value = parseFloat(record[this.field]);
|
|
37568
|
-
this.sum
|
|
37594
|
+
this.sum = precisionAdd(this.sum, value), this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum = precisionAdd(this.positiveSum, value) : value < 0 && (this.nagetiveSum = precisionAdd(this.nagetiveSum, value)));
|
|
37569
37595
|
}
|
|
37570
37596
|
}
|
|
37571
37597
|
}
|
|
@@ -37608,17 +37634,43 @@
|
|
|
37608
37634
|
super(...arguments), this.type = AggregationType.AVG, this.sum = 0, this.count = 0;
|
|
37609
37635
|
}
|
|
37610
37636
|
push(record) {
|
|
37611
|
-
record && (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator && record.type === AggregationType.AVG ? (this.children && this.children.push(record), this.sum
|
|
37637
|
+
record && (this.isRecord && this.records && (record.isAggregator ? this.records.push(...record.records) : this.records.push(record)), record.isAggregator && record.type === AggregationType.AVG ? (this.children && this.children.push(record), this.sum = precisionAdd(this.sum, record.sum), this.count += record.count) : this.field && !isNaN(parseFloat(record[this.field])) && (this.sum = precisionAdd(this.sum, parseFloat(record[this.field])), this.count++)), this.clearCacheValue();
|
|
37612
37638
|
}
|
|
37613
37639
|
deleteRecord(record) {
|
|
37614
|
-
|
|
37640
|
+
if (record) {
|
|
37641
|
+
if (this.isRecord && this.records) {
|
|
37642
|
+
const index = this.records.indexOf(record);
|
|
37643
|
+
-1 !== index && this.records.splice(index, 1);
|
|
37644
|
+
}
|
|
37645
|
+
if (record.isAggregator && record.type === AggregationType.AVG) {
|
|
37646
|
+
if (this.children) {
|
|
37647
|
+
const index = this.children.indexOf(record);
|
|
37648
|
+
-1 !== index && this.children.splice(index, 1);
|
|
37649
|
+
}
|
|
37650
|
+
this.sum = precisionSub(this.sum, record.sum), this.count -= record.count;
|
|
37651
|
+
} else this.field && !isNaN(parseFloat(record[this.field])) && (this.sum = precisionSub(this.sum, parseFloat(record[this.field])), this.count--);
|
|
37652
|
+
}
|
|
37653
|
+
this.clearCacheValue();
|
|
37615
37654
|
}
|
|
37616
37655
|
updateRecord(oldRecord, newRecord) {
|
|
37617
|
-
|
|
37656
|
+
if (oldRecord && newRecord) {
|
|
37657
|
+
if (this.isRecord && this.records) {
|
|
37658
|
+
const index = this.records.indexOf(oldRecord);
|
|
37659
|
+
-1 !== index && (this.records[index] = newRecord);
|
|
37660
|
+
}
|
|
37661
|
+
if (oldRecord.isAggregator && oldRecord.type === AggregationType.AVG) {
|
|
37662
|
+
if (this.children && newRecord.isAggregator) {
|
|
37663
|
+
const index = this.children.indexOf(oldRecord);
|
|
37664
|
+
-1 !== index && (this.children[index] = newRecord);
|
|
37665
|
+
}
|
|
37666
|
+
this.sum = precisionAdd(this.sum, precisionSub(newRecord.sum, oldRecord.sum)), this.count += newRecord.count - oldRecord.count;
|
|
37667
|
+
} else this.field && !isNaN(parseFloat(oldRecord[this.field])) && (this.sum = precisionAdd(this.sum, precisionSub(parseFloat(newRecord[this.field]), parseFloat(oldRecord[this.field]))));
|
|
37668
|
+
this.clearCacheValue();
|
|
37669
|
+
}
|
|
37618
37670
|
}
|
|
37619
37671
|
value() {
|
|
37620
|
-
var _a
|
|
37621
|
-
return null !== (_a = this.changedValue) && void 0 !== _a ? _a :
|
|
37672
|
+
var _a;
|
|
37673
|
+
return null !== (_a = this.changedValue) && void 0 !== _a ? _a : this.records && this.records.length >= 1 || !1 === this.isRecord && this.count > 0 ? this.sum / this.count : void 0;
|
|
37622
37674
|
}
|
|
37623
37675
|
reset() {
|
|
37624
37676
|
this.changedValue = void 0, this.children = [], this.records = [], this.sum = 0, this.count = 0;
|
|
@@ -37628,11 +37680,11 @@
|
|
|
37628
37680
|
const child = this.children[i];
|
|
37629
37681
|
if (child.isAggregator && child.type === AggregationType.AVG) {
|
|
37630
37682
|
const childValue = child.value();
|
|
37631
|
-
this.sum
|
|
37683
|
+
this.sum = precisionAdd(this.sum, childValue * child.count), this.count += child.count;
|
|
37632
37684
|
}
|
|
37633
37685
|
} else if (this.records) for (let i = 0; i < this.records.length; i++) {
|
|
37634
37686
|
const record = this.records[i];
|
|
37635
|
-
record.isAggregator && record.type === AggregationType.AVG ? (this.sum
|
|
37687
|
+
record.isAggregator && record.type === AggregationType.AVG ? (this.sum = precisionAdd(this.sum, record.sum), this.count += record.count) : this.field && !isNaN(parseFloat(record[this.field])) && (this.sum = precisionAdd(this.sum, parseFloat(record[this.field])), this.count++);
|
|
37636
37688
|
}
|
|
37637
37689
|
}
|
|
37638
37690
|
}
|
|
@@ -45407,15 +45459,17 @@
|
|
|
45407
45459
|
} else if ("sparkline" === type) {
|
|
45408
45460
|
cellGroup = Factory.getFunction("createSparkLineCellGroup")(null, columnGroup, 0, y, col, row, cellWidth, cellHeight, padding, table, cellTheme, isAsync);
|
|
45409
45461
|
} else if ("checkbox" === type) {
|
|
45410
|
-
|
|
45411
|
-
isSeriesNumber = table.internalProps.layoutMap.isSeriesNumber(col, row);
|
|
45412
|
-
if (isAggregation && isSeriesNumber) {
|
|
45462
|
+
if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
|
|
45413
45463
|
cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
|
|
45414
45464
|
} else {
|
|
45415
45465
|
cellGroup = Factory.getFunction("createCheckboxCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync, !1);
|
|
45416
45466
|
}
|
|
45417
45467
|
} else if ("radio" === type) {
|
|
45418
|
-
|
|
45468
|
+
if ("isAggregation" in table.internalProps.layoutMap && table.internalProps.layoutMap.isAggregation(col, row)) {
|
|
45469
|
+
cellGroup = Factory.getFunction("createTextCellGroup")(table, value, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, !1, void 0, !0, cellTheme, range, isAsync);
|
|
45470
|
+
} else {
|
|
45471
|
+
cellGroup = Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define, range);
|
|
45472
|
+
}
|
|
45419
45473
|
} else if ("switch" === type) {
|
|
45420
45474
|
cellGroup = Factory.getFunction("createSwitchCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, mayHaveIcon, table, cellTheme, define, range, isAsync);
|
|
45421
45475
|
} else if ("button" === type) {
|
|
@@ -54596,6 +54650,7 @@
|
|
|
54596
54650
|
} else if (-1 === cellPos.col || -1 === cellPos.row || -1 !== col && -1 !== row) {
|
|
54597
54651
|
if (interactionState !== InteractionState.default || table.eventManager.isDraging || table.stateManager.isResizeCol()) {
|
|
54598
54652
|
if ((interactionState === InteractionState.grabing || table.eventManager.isDraging) && !table.stateManager.isResizeCol()) {
|
|
54653
|
+
if (col >= 0 && row >= 0 && isCellDisableSelect(table, col, row)) return void scenegraph.updateNextFrame();
|
|
54599
54654
|
let extendSelectRange = !isValid$1(skipBodyMerge) || !skipBodyMerge;
|
|
54600
54655
|
-1 === cellPos.col && (cellPos.col = col), -1 === cellPos.row && (cellPos.row = row), cellPos.col = col, cellPos.row = row;
|
|
54601
54656
|
const currentRange = state.select.ranges[state.select.ranges.length - 1];
|
|
@@ -55791,8 +55846,11 @@
|
|
|
55791
55846
|
updateOptionSetState() {
|
|
55792
55847
|
this._updateOptionSetState(), this.setHoverState(), this.setSelectState(), this.setFrozenState();
|
|
55793
55848
|
}
|
|
55849
|
+
endResizeIfResizing() {
|
|
55850
|
+
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);
|
|
55851
|
+
}
|
|
55794
55852
|
_updateOptionSetState() {
|
|
55795
|
-
this.interactionState = InteractionState.default, this.hoverIcon = {
|
|
55853
|
+
this.endResizeIfResizing(), this.interactionState = InteractionState.default, this.hoverIcon = {
|
|
55796
55854
|
col: -1,
|
|
55797
55855
|
row: -1,
|
|
55798
55856
|
icon: null
|
|
@@ -56921,6 +56979,7 @@
|
|
|
56921
56979
|
}
|
|
56922
56980
|
|
|
56923
56981
|
function bindTableGroupListener$1(eventManager) {
|
|
56982
|
+
var _a, _b, _c;
|
|
56924
56983
|
const table = eventManager.table,
|
|
56925
56984
|
stateManager = table.stateManager,
|
|
56926
56985
|
getEventArgsSet = e => getCellEventArgsSetWithTable(e, table);
|
|
@@ -57037,7 +57096,13 @@
|
|
|
57037
57096
|
event: e.nativeEvent
|
|
57038
57097
|
});
|
|
57039
57098
|
}), table.scenegraph.tableGroup.addEventListener("pointerleave", e => {
|
|
57040
|
-
|
|
57099
|
+
var _a, _b, _c;
|
|
57100
|
+
stateManager.isResizeCol() || stateManager.isResizeRow() || stateManager.isMoveCol() || stateManager.isSelecting() || (stateManager.updateInteractionState(InteractionState.default), stateManager.updateCursor());
|
|
57101
|
+
const scrollStyle = table.theme.scrollStyle,
|
|
57102
|
+
horizontalVisible = null !== (_a = null == scrollStyle ? void 0 : scrollStyle.horizontalVisible) && void 0 !== _a ? _a : null == scrollStyle ? void 0 : scrollStyle.visible,
|
|
57103
|
+
verticalVisible = null !== (_b = null == scrollStyle ? void 0 : scrollStyle.verticalVisible) && void 0 !== _b ? _b : null == scrollStyle ? void 0 : scrollStyle.visible,
|
|
57104
|
+
barToSide = null !== (_c = null == scrollStyle ? void 0 : scrollStyle.barToSide) && void 0 !== _c && _c;
|
|
57105
|
+
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, {
|
|
57041
57106
|
col: table.stateManager.hover.cellPos.col,
|
|
57042
57107
|
row: table.stateManager.hover.cellPos.row,
|
|
57043
57108
|
cellRange: table.getCellRangeRelativeRect({
|
|
@@ -57266,7 +57331,29 @@
|
|
|
57266
57331
|
const isHasSelected = !!(null === (_a = stateManager.select.ranges) || void 0 === _a ? void 0 : _a.length);
|
|
57267
57332
|
(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);
|
|
57268
57333
|
}
|
|
57269
|
-
})
|
|
57334
|
+
});
|
|
57335
|
+
const scrollStyle = table.theme.scrollStyle,
|
|
57336
|
+
barToSide = null !== (_a = null == scrollStyle ? void 0 : scrollStyle.barToSide) && void 0 !== _a && _a,
|
|
57337
|
+
horizontalVisible = null !== (_b = null == scrollStyle ? void 0 : scrollStyle.horizontalVisible) && void 0 !== _b ? _b : null == scrollStyle ? void 0 : scrollStyle.visible,
|
|
57338
|
+
verticalVisible = null !== (_c = null == scrollStyle ? void 0 : scrollStyle.verticalVisible) && void 0 !== _c ? _c : null == scrollStyle ? void 0 : scrollStyle.visible,
|
|
57339
|
+
shouldShowScrollOnCanvasHover = barToSide && "focus" === horizontalVisible,
|
|
57340
|
+
shouldShowVScrollOnCanvasHover = barToSide && "focus" === verticalVisible;
|
|
57341
|
+
(shouldShowScrollOnCanvasHover || shouldShowVScrollOnCanvasHover) && (table.scenegraph.stage.addEventListener("pointerenter", e => {
|
|
57342
|
+
var _a, _b, _c;
|
|
57343
|
+
const target = e.target;
|
|
57344
|
+
if (target === table.scenegraph.stage || (null === (_a = null == target ? void 0 : target.isDescendantsOf) || void 0 === _a ? void 0 : _a.call(target, table.scenegraph.stage))) {
|
|
57345
|
+
if (shouldShowScrollOnCanvasHover) {
|
|
57346
|
+
const relativeX = e.x - table.tableX,
|
|
57347
|
+
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";
|
|
57348
|
+
stateManager.showHorizontalScrollBar(!1, target);
|
|
57349
|
+
}
|
|
57350
|
+
shouldShowVScrollOnCanvasHover && stateManager.showVerticalScrollBar();
|
|
57351
|
+
}
|
|
57352
|
+
}), table.scenegraph.stage.addEventListener("pointerleave", e => {
|
|
57353
|
+
var _a;
|
|
57354
|
+
const relatedTarget = e.relatedTarget;
|
|
57355
|
+
(!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());
|
|
57356
|
+
})), table.scenegraph.stage.addEventListener("pointermove", e => {
|
|
57270
57357
|
var _a, _b, _c;
|
|
57271
57358
|
const eventArgsSet = getCellEventArgsSetWithTable(e, table);
|
|
57272
57359
|
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());
|
|
@@ -57825,7 +57912,10 @@
|
|
|
57825
57912
|
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);
|
|
57826
57913
|
const targetCol = table.getTargetColAtConsiderRightFrozen(selectX, considerFrozenX),
|
|
57827
57914
|
targetRow = table.getTargetRowAtConsiderBottomFrozen(selectY, considerFrozenY);
|
|
57828
|
-
!(null === (_c = table.options.select) || void 0 === _c ? void 0 : _c.disableDragSelect) && isValid$1(targetCol) && isValid$1(targetRow)
|
|
57915
|
+
if (!(null === (_c = table.options.select) || void 0 === _c ? void 0 : _c.disableDragSelect) && isValid$1(targetCol) && isValid$1(targetRow)) {
|
|
57916
|
+
if (isCellDisableSelect(table, targetCol.col, targetRow.row)) return;
|
|
57917
|
+
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);
|
|
57918
|
+
}
|
|
57829
57919
|
});
|
|
57830
57920
|
} else table.eventManager.inertiaScroll.isInertiaScrolling() ? table.eventManager.inertiaScroll.endInertia() : table.eventManager.scrollYSpeed = 0;
|
|
57831
57921
|
}
|
|
@@ -59901,6 +59991,7 @@
|
|
|
59901
59991
|
switch (headerType) {
|
|
59902
59992
|
case "text":
|
|
59903
59993
|
case "link":
|
|
59994
|
+
default:
|
|
59904
59995
|
return TextHeaderStyle;
|
|
59905
59996
|
case "image":
|
|
59906
59997
|
case "video":
|
|
@@ -60947,7 +61038,7 @@
|
|
|
60947
61038
|
}
|
|
60948
61039
|
constructor(container, options = {}) {
|
|
60949
61040
|
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;
|
|
60950
|
-
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.
|
|
61041
|
+
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.1-alpha.0", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
|
|
60951
61042
|
const g = window;
|
|
60952
61043
|
g[this.id] = this;
|
|
60953
61044
|
const registry = g.__vtable__ || (g.__vtable__ = {
|
|
@@ -62352,9 +62443,13 @@
|
|
|
62352
62443
|
}
|
|
62353
62444
|
getCellType(col, row) {
|
|
62354
62445
|
let cellType;
|
|
62355
|
-
|
|
62446
|
+
if (this.isSeriesNumberInHeader(col, row)) {
|
|
62447
|
+
const seriesHeaderCellType = this.internalProps.layoutMap.getSeriesNumberHeader(col, row).cellType;
|
|
62448
|
+
return "radio" === seriesHeaderCellType ? "text" : seriesHeaderCellType;
|
|
62449
|
+
}
|
|
62450
|
+
return cellType = this.isHeader(col, row) ? this.internalProps.layoutMap.getHeader(col, row).headerType : this.internalProps.layoutMap.getBody(col, row).cellType, getProp("cellType", {
|
|
62356
62451
|
cellType: cellType
|
|
62357
|
-
}, col, row, this)
|
|
62452
|
+
}, col, row, this);
|
|
62358
62453
|
}
|
|
62359
62454
|
getHeaderField(col, row) {
|
|
62360
62455
|
return this.internalProps.layoutMap.getHeaderField(col, row);
|
|
@@ -66350,7 +66445,7 @@
|
|
|
66350
66445
|
setRecords(records, option) {
|
|
66351
66446
|
var _a, _b, _c, _d, _e;
|
|
66352
66447
|
let sort;
|
|
66353
|
-
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);
|
|
66448
|
+
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);
|
|
66354
66449
|
"undefined" != typeof window && window.performance.now();
|
|
66355
66450
|
const oldHoverState = {
|
|
66356
66451
|
col: this.stateManager.hover.cellPos.col,
|
|
@@ -78438,7 +78533,7 @@
|
|
|
78438
78533
|
PluginManager: PluginManager
|
|
78439
78534
|
});
|
|
78440
78535
|
|
|
78441
|
-
const version = "1.
|
|
78536
|
+
const version = "1.26.1-alpha.0";
|
|
78442
78537
|
|
|
78443
78538
|
exports.Gantt = Gantt;
|
|
78444
78539
|
exports.TYPES = index$4;
|