@visactor/vtable-gantt 1.7.3 → 1.7.4
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/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/vtable-gantt.js +98 -116
- package/dist/vtable-gantt.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +5 -5
package/cjs/index.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import * as TYPES from './ts-types';
|
|
|
3
3
|
import type { ColumnDefine, ColumnsDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType } from '@visactor/vtable';
|
|
4
4
|
import { Gantt } from './Gantt';
|
|
5
5
|
import * as tools from './tools';
|
|
6
|
-
export declare const version = "1.7.
|
|
6
|
+
export declare const version = "1.7.4";
|
|
7
7
|
export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools };
|
package/cjs/index.js
CHANGED
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAqBlC,sBAAK;AAPP,mCAAgC;AAS9B,sFATO,aAAK,OASP;AARP,+CAAiC;AAoB/B,sBAAK;AAnBM,QAAA,OAAO,GAAG,OAAO,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';\nexport const version = \"1.7.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAqBlC,sBAAK;AAPP,mCAAgC;AAS9B,sFATO,aAAK,OASP;AARP,+CAAiC;AAoB/B,sBAAK;AAnBM,QAAA,OAAO,GAAG,OAAO,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';\nexport const version = \"1.7.4\";\n/**\n * @namespace VTable\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};\n"]}
|
package/dist/vtable-gantt.js
CHANGED
|
@@ -21758,7 +21758,7 @@
|
|
|
21758
21758
|
}(AggregationType || (AggregationType = {}));
|
|
21759
21759
|
var SortType;
|
|
21760
21760
|
!function (SortType) {
|
|
21761
|
-
SortType.ASC = "ASC", SortType.DESC = "DESC";
|
|
21761
|
+
SortType.ASC = "ASC", SortType.DESC = "DESC", SortType.NORMAL = "NORMAL", SortType.desc = "desc", SortType.asc = "asc", SortType.normal = "normal";
|
|
21762
21762
|
}(SortType || (SortType = {}));
|
|
21763
21763
|
|
|
21764
21764
|
var IconPosition;
|
|
@@ -24390,7 +24390,7 @@
|
|
|
24390
24390
|
return this._formatedValue || (this.formatFun ? this._formatedValue = this.formatFun(this.value(), col, row, table) : this._formatedValue = this.value()), this._formatedValue;
|
|
24391
24391
|
}
|
|
24392
24392
|
reset() {
|
|
24393
|
-
this.records = [];
|
|
24393
|
+
this.records = [], this.clearCacheValue();
|
|
24394
24394
|
}
|
|
24395
24395
|
}
|
|
24396
24396
|
class RecordAggregator extends Aggregator {
|
|
@@ -24447,14 +24447,15 @@
|
|
|
24447
24447
|
push(record) {
|
|
24448
24448
|
if (record) if (this.isRecord && this.records && ("Aggregator" === record.className ? this.records.push(...record.records) : this.records.push(record)), "Aggregator" === record.className) {
|
|
24449
24449
|
const value = record.value();
|
|
24450
|
-
this.sum += value, this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum += value : value < 0 && (this.nagetiveSum += value));
|
|
24450
|
+
this.sum += null != value ? value : 0, this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum += value : value < 0 && (this.nagetiveSum += value));
|
|
24451
24451
|
} else if (this.field && !isNaN(parseFloat(record[this.field]))) {
|
|
24452
24452
|
const value = parseFloat(record[this.field]);
|
|
24453
24453
|
this.sum += value, this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum += value : value < 0 && (this.nagetiveSum += value));
|
|
24454
24454
|
}
|
|
24455
24455
|
}
|
|
24456
24456
|
value() {
|
|
24457
|
-
|
|
24457
|
+
var _a;
|
|
24458
|
+
return (null === (_a = this.records) || void 0 === _a ? void 0 : _a.length) >= 1 ? this.sum : void 0;
|
|
24458
24459
|
}
|
|
24459
24460
|
positiveValue() {
|
|
24460
24461
|
return this.positiveSum;
|
|
@@ -24463,14 +24464,14 @@
|
|
|
24463
24464
|
return this.nagetiveSum;
|
|
24464
24465
|
}
|
|
24465
24466
|
reset() {
|
|
24466
|
-
this.records = [], this.sum = 0;
|
|
24467
|
+
super.reset(), this.records = [], this.sum = 0;
|
|
24467
24468
|
}
|
|
24468
24469
|
recalculate() {
|
|
24469
24470
|
if (this.sum = 0, this._formatedValue = void 0, this.records) for (let i = 0; i < this.records.length; i++) {
|
|
24470
24471
|
const record = this.records[i];
|
|
24471
24472
|
if ("Aggregator" === record.className) {
|
|
24472
24473
|
const value = record.value();
|
|
24473
|
-
this.sum += value, this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum += value : value < 0 && (this.nagetiveSum += value));
|
|
24474
|
+
this.sum += null != value ? value : 0, this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum += value : value < 0 && (this.nagetiveSum += value));
|
|
24474
24475
|
} else if (this.field && !isNaN(parseFloat(record[this.field]))) {
|
|
24475
24476
|
const value = parseFloat(record[this.field]);
|
|
24476
24477
|
this.sum += value, this.needSplitPositiveAndNegativeForSum && (value > 0 ? this.positiveSum += value : value < 0 && (this.nagetiveSum += value));
|
|
@@ -24506,7 +24507,8 @@
|
|
|
24506
24507
|
record && (this.isRecord && this.records && ("Aggregator" === record.className ? this.records.push(...record.records) : this.records.push(record)), "Aggregator" === record.className && record.type === AggregationType.AVG ? (this.sum += record.sum, this.count += record.count) : this.field && !isNaN(parseFloat(record[this.field])) && (this.sum += parseFloat(record[this.field]), this.count++));
|
|
24507
24508
|
}
|
|
24508
24509
|
value() {
|
|
24509
|
-
|
|
24510
|
+
var _a;
|
|
24511
|
+
return (null === (_a = this.records) || void 0 === _a ? void 0 : _a.length) >= 1 ? this.sum / this.count : void 0;
|
|
24510
24512
|
}
|
|
24511
24513
|
reset() {
|
|
24512
24514
|
this.records = [], this.sum = 0, this.count = 0;
|
|
@@ -24526,7 +24528,8 @@
|
|
|
24526
24528
|
record && (this.isRecord && this.records && ("Aggregator" === record.className ? this.records.push(...record.records) : this.records.push(record)), "Aggregator" === record.className ? this.max = record.max > this.max ? record.max : this.max : "number" == typeof record ? this.max = record > this.max ? record : this.max : this.field && "number" == typeof record[this.field] ? this.max = record[this.field] > this.max ? record[this.field] : this.max : this.field && !isNaN(record[this.field]) && (this.max = parseFloat(record[this.field]) > this.max ? parseFloat(record[this.field]) : this.max));
|
|
24527
24529
|
}
|
|
24528
24530
|
value() {
|
|
24529
|
-
|
|
24531
|
+
var _a;
|
|
24532
|
+
return (null === (_a = this.records) || void 0 === _a ? void 0 : _a.length) >= 1 ? this.max : void 0;
|
|
24530
24533
|
}
|
|
24531
24534
|
reset() {
|
|
24532
24535
|
this.records = [], this.max = Number.MIN_SAFE_INTEGER;
|
|
@@ -24546,7 +24549,8 @@
|
|
|
24546
24549
|
record && (this.isRecord && this.records && ("Aggregator" === record.className ? this.records.push(...record.records) : this.records.push(record)), "Aggregator" === record.className ? this.min = record.min < this.min ? record.min : this.min : "number" == typeof record ? this.min = record < this.min ? record : this.min : this.field && "number" == typeof record[this.field] && (this.min = record[this.field] < this.min ? record[this.field] : this.min));
|
|
24547
24550
|
}
|
|
24548
24551
|
value() {
|
|
24549
|
-
|
|
24552
|
+
var _a;
|
|
24553
|
+
return (null === (_a = this.records) || void 0 === _a ? void 0 : _a.length) >= 1 ? this.min : void 0;
|
|
24550
24554
|
}
|
|
24551
24555
|
reset() {
|
|
24552
24556
|
this.records = [], this.min = Number.MAX_SAFE_INTEGER;
|
|
@@ -25221,7 +25225,7 @@
|
|
|
25221
25225
|
aggregationFun: (values, records, field) => {
|
|
25222
25226
|
const groupMap = new Map(),
|
|
25223
25227
|
groupResult = [];
|
|
25224
|
-
for (let i = 0; i < records.length; i++) dealWithGroup(records[i], groupResult, groupMap, groupByKeys, 0);
|
|
25228
|
+
for (let i = 0; i < records.length; i++) dealWithGroup(records[i], groupResult, groupMap, groupByKeys, 0), records[i].vtableOriginIndex = i;
|
|
25225
25229
|
return groupResult;
|
|
25226
25230
|
}
|
|
25227
25231
|
}), this.fieldAggregators.push(this.groupAggregator);
|
|
@@ -25269,15 +25273,18 @@
|
|
|
25269
25273
|
const groupByKey = groupByKeys[level];
|
|
25270
25274
|
if (!isValid$1(groupByKey)) return void children.push(record);
|
|
25271
25275
|
const value = record[groupByKey];
|
|
25272
|
-
if (void 0 !== value)
|
|
25273
|
-
|
|
25274
|
-
|
|
25275
|
-
|
|
25276
|
-
|
|
25277
|
-
|
|
25278
|
-
|
|
25279
|
-
|
|
25280
|
-
|
|
25276
|
+
if (void 0 !== value) {
|
|
25277
|
+
if (map.has(value)) {
|
|
25278
|
+
const index = map.get(value);
|
|
25279
|
+
return dealWithGroup(record, children[index].children, children[index].map, groupByKeys, level + 1);
|
|
25280
|
+
}
|
|
25281
|
+
return map.set(value, children.length), children.push({
|
|
25282
|
+
vtableMerge: !0,
|
|
25283
|
+
vtableMergeName: value,
|
|
25284
|
+
children: [],
|
|
25285
|
+
map: new Map()
|
|
25286
|
+
}), dealWithGroup(record, children[children.length - 1].children, children[children.length - 1].map, groupByKeys, level + 1);
|
|
25287
|
+
}
|
|
25281
25288
|
}
|
|
25282
25289
|
function syncGroupCollapseState(oldSource, newSource, oldGroupMap, newGroupMap) {
|
|
25283
25290
|
if (!oldGroupMap) {
|
|
@@ -28213,7 +28220,7 @@
|
|
|
28213
28220
|
const cellLocation = scene.table.getCellLocation(col, row),
|
|
28214
28221
|
{
|
|
28215
28222
|
vtableMerge: vtableMerge
|
|
28216
|
-
} = scene.table.getCellRawRecord(col, row);
|
|
28223
|
+
} = scene.table.getCellRawRecord(col, row) || {};
|
|
28217
28224
|
if (vtableMerge && scene.table.options.groupTitleCustomLayout) customLayout = scene.table.options.groupTitleCustomLayout;else if ("body" !== cellLocation) {
|
|
28218
28225
|
const define = scene.table.getHeaderDefine(col, row);
|
|
28219
28226
|
customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout;
|
|
@@ -28417,7 +28424,7 @@
|
|
|
28417
28424
|
const cellType = scene.table.getCellLocation(col, row),
|
|
28418
28425
|
{
|
|
28419
28426
|
vtableMerge: vtableMerge
|
|
28420
|
-
} = scene.table.getCellRawRecord(col, row);
|
|
28427
|
+
} = scene.table.getCellRawRecord(col, row) || {};
|
|
28421
28428
|
if (vtableMerge && scene.table.options.groupTitleCustomLayout) customLayout = scene.table.options.groupTitleCustomLayout;else if ("body" !== cellType) {
|
|
28422
28429
|
const define = scene.table.getHeaderDefine(col, row);
|
|
28423
28430
|
customRender = null == define ? void 0 : define.headerCustomRender, customLayout = null == define ? void 0 : define.headerCustomLayout;
|
|
@@ -30385,76 +30392,37 @@
|
|
|
30385
30392
|
constructor() {
|
|
30386
30393
|
this.time = BaseRenderContributionTime.beforeFillStroke, this.useStyle = !0, this.order = 0;
|
|
30387
30394
|
}
|
|
30388
|
-
drawShape(group, context,
|
|
30395
|
+
drawShape(group, context, xOrigin, yOrigin, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
|
|
30389
30396
|
var _a, _b, _c, _d, _e, _f;
|
|
30390
30397
|
const table = group.stage.table;
|
|
30391
30398
|
if (table) if ("body" === group.role) {
|
|
30392
|
-
|
|
30393
|
-
y = -(null !== (_b = group.attribute.y) && void 0 !== _b ? _b : 0) + table.getFrozenRowsHeight(),
|
|
30394
|
-
width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth(),
|
|
30395
|
-
height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();
|
|
30396
|
-
context.beginPath(), context.rect(x, y, width, height);
|
|
30399
|
+
drawClipRect(context, -(null !== (_a = group.attribute.x) && void 0 !== _a ? _a : 0) + table.getFrozenColsWidth(), -(null !== (_b = group.attribute.y) && void 0 !== _b ? _b : 0) + table.getFrozenRowsHeight(), group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth(), group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight());
|
|
30397
30400
|
} else if ("row-header" === group.role) {
|
|
30398
|
-
|
|
30399
|
-
y = -(null !== (_c = group.attribute.y) && void 0 !== _c ? _c : 0) + table.getFrozenRowsHeight(),
|
|
30400
|
-
width = table.getFrozenColsWidth(),
|
|
30401
|
-
height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();
|
|
30402
|
-
context.beginPath(), context.rect(x, y, width, height);
|
|
30401
|
+
drawClipRect(context, 0, -(null !== (_c = group.attribute.y) && void 0 !== _c ? _c : 0) + table.getFrozenRowsHeight(), table.getFrozenColsWidth(), group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight());
|
|
30403
30402
|
} else if ("col-header" === group.role) {
|
|
30404
|
-
|
|
30405
|
-
y = 0,
|
|
30406
|
-
width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth(),
|
|
30407
|
-
height = table.getFrozenRowsHeight();
|
|
30408
|
-
context.beginPath(), context.rect(x, y, width, height);
|
|
30403
|
+
drawClipRect(context, -(null !== (_d = group.attribute.x) && void 0 !== _d ? _d : 0) + table.getFrozenColsWidth(), 0, group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth(), table.getFrozenRowsHeight());
|
|
30409
30404
|
} else if ("right-frozen" === group.role) {
|
|
30410
|
-
|
|
30411
|
-
y = -(null !== (_e = group.attribute.y) && void 0 !== _e ? _e : 0) + table.getFrozenRowsHeight(),
|
|
30412
|
-
width = table.getRightFrozenColsWidth(),
|
|
30413
|
-
height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();
|
|
30414
|
-
context.beginPath(), context.rect(x, y, width, height);
|
|
30405
|
+
drawClipRect(context, 0, -(null !== (_e = group.attribute.y) && void 0 !== _e ? _e : 0) + table.getFrozenRowsHeight(), table.getRightFrozenColsWidth(), group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight());
|
|
30415
30406
|
} else if ("bottom-frozen" === group.role) {
|
|
30416
|
-
|
|
30417
|
-
y = 0,
|
|
30418
|
-
width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth(),
|
|
30419
|
-
height = table.getBottomFrozenRowsHeight();
|
|
30420
|
-
context.beginPath(), context.rect(x, y, width, height);
|
|
30407
|
+
drawClipRect(context, -(null !== (_f = group.attribute.x) && void 0 !== _f ? _f : 0) + table.getFrozenColsWidth(), 0, group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth(), table.getBottomFrozenRowsHeight());
|
|
30421
30408
|
} else if ("corner-header" === group.role) {
|
|
30422
|
-
|
|
30423
|
-
y = 0,
|
|
30424
|
-
width = table.getFrozenColsWidth(),
|
|
30425
|
-
height = table.getFrozenRowsHeight();
|
|
30426
|
-
context.beginPath(), context.rect(x, y, width, height);
|
|
30409
|
+
drawClipRect(context, 0, 0, table.getFrozenColsWidth(), table.getFrozenRowsHeight());
|
|
30427
30410
|
} else if ("corner-right-top-header" === group.role) {
|
|
30428
|
-
|
|
30429
|
-
y = 0,
|
|
30430
|
-
width = table.getRightFrozenColsWidth(),
|
|
30431
|
-
height = table.getFrozenRowsHeight();
|
|
30432
|
-
context.beginPath(), context.rect(x, y, width, height);
|
|
30411
|
+
drawClipRect(context, 0, 0, table.getRightFrozenColsWidth(), table.getFrozenRowsHeight());
|
|
30433
30412
|
} else if ("corner-right-bottom-header" === group.role) {
|
|
30434
|
-
|
|
30435
|
-
y = 0,
|
|
30436
|
-
width = table.getRightFrozenColsWidth(),
|
|
30437
|
-
height = table.getBottomFrozenRowsHeight();
|
|
30438
|
-
context.beginPath(), context.rect(x, y, width, height);
|
|
30413
|
+
drawClipRect(context, 0, 0, table.getRightFrozenColsWidth(), table.getBottomFrozenRowsHeight());
|
|
30439
30414
|
} else if ("corner-left-bottom-header" === group.role) {
|
|
30440
|
-
|
|
30441
|
-
y = 0,
|
|
30442
|
-
width = table.getFrozenColsWidth(),
|
|
30443
|
-
height = table.getBottomFrozenRowsHeight();
|
|
30444
|
-
context.beginPath(), context.rect(x, y, width, height);
|
|
30415
|
+
drawClipRect(context, 0, 0, table.getFrozenColsWidth(), table.getBottomFrozenRowsHeight());
|
|
30445
30416
|
}
|
|
30446
30417
|
}
|
|
30447
30418
|
};
|
|
30448
30419
|
ClipBodyGroupBeforeRenderContribution = __decorate$3([injectable()], ClipBodyGroupBeforeRenderContribution);
|
|
30449
|
-
|
|
30450
|
-
|
|
30451
|
-
|
|
30452
|
-
|
|
30453
|
-
|
|
30454
|
-
|
|
30455
|
-
}
|
|
30456
|
-
};
|
|
30457
|
-
ClipBodyGroupAfterRenderContribution = __decorate$3([injectable()], ClipBodyGroupAfterRenderContribution);
|
|
30420
|
+
const precision = Math.pow(2, 24);
|
|
30421
|
+
function drawClipRect(context, x, y, width, height) {
|
|
30422
|
+
context.beginPath();
|
|
30423
|
+
const matrix = context.applyedMatrix;
|
|
30424
|
+
Math.abs(matrix.f) > precision || Math.abs(matrix.g) > precision ? context.rect(x - precision, y - precision, width + 2 * precision, height + 2 * precision) : context.rect(x, y, width, height);
|
|
30425
|
+
}
|
|
30458
30426
|
function getCellSizeForDraw(group, width, height, bottomRight) {
|
|
30459
30427
|
const table = group.stage.table;
|
|
30460
30428
|
if ("cell" === group.role) {
|
|
@@ -30709,7 +30677,7 @@
|
|
|
30709
30677
|
SuffixTextBeforeRenderContribution = __decorate([injectable()], SuffixTextBeforeRenderContribution);
|
|
30710
30678
|
|
|
30711
30679
|
var splitModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
30712
|
-
isBound(SplitRectBeforeRenderContribution$1) ? rebind(SplitRectBeforeRenderContribution$1).to(SplitRectBeforeRenderContribution).inSingletonScope() : (bind(SplitRectBeforeRenderContribution).toSelf().inSingletonScope(), bind(RectRenderContribution).toService(SplitRectBeforeRenderContribution)), isBound(SplitRectAfterRenderContribution$1) ? rebind(SplitRectAfterRenderContribution$1).to(SplitRectAfterRenderContribution).inSingletonScope() : (bind(SplitRectAfterRenderContribution).toSelf().inSingletonScope(), bind(RectRenderContribution).toService(SplitRectAfterRenderContribution)), bind(DefaultCanvasChartRender).toSelf().inSingletonScope(), bind(ChartRender).to(DefaultCanvasChartRender), bind(GraphicRender).to(DefaultCanvasChartRender), bind(BeforeImageRenderContribution).toSelf().inSingletonScope(), bind(ImageRenderContribution).toService(BeforeImageRenderContribution), bind(AfterImageRenderContribution).toSelf().inSingletonScope(), bind(ImageRenderContribution).toService(AfterImageRenderContribution), bind(AdjustColorGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(AdjustColorGroupBeforeRenderContribution), bind(AdjustColorGroupAfterRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(AdjustColorGroupAfterRenderContribution), bind(SplitGroupAfterRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(SplitGroupAfterRenderContribution), bind(SplitGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(SplitGroupBeforeRenderContribution), bind(DashGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(DashGroupBeforeRenderContribution), bind(DashGroupAfterRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(DashGroupAfterRenderContribution), bind(AdjustPosGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(AdjustPosGroupBeforeRenderContribution), bind(AdjustPosGroupAfterRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(AdjustPosGroupAfterRenderContribution), bind(ClipBodyGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(ClipBodyGroupBeforeRenderContribution), bind(
|
|
30680
|
+
isBound(SplitRectBeforeRenderContribution$1) ? rebind(SplitRectBeforeRenderContribution$1).to(SplitRectBeforeRenderContribution).inSingletonScope() : (bind(SplitRectBeforeRenderContribution).toSelf().inSingletonScope(), bind(RectRenderContribution).toService(SplitRectBeforeRenderContribution)), isBound(SplitRectAfterRenderContribution$1) ? rebind(SplitRectAfterRenderContribution$1).to(SplitRectAfterRenderContribution).inSingletonScope() : (bind(SplitRectAfterRenderContribution).toSelf().inSingletonScope(), bind(RectRenderContribution).toService(SplitRectAfterRenderContribution)), bind(DefaultCanvasChartRender).toSelf().inSingletonScope(), bind(ChartRender).to(DefaultCanvasChartRender), bind(GraphicRender).to(DefaultCanvasChartRender), bind(BeforeImageRenderContribution).toSelf().inSingletonScope(), bind(ImageRenderContribution).toService(BeforeImageRenderContribution), bind(AfterImageRenderContribution).toSelf().inSingletonScope(), bind(ImageRenderContribution).toService(AfterImageRenderContribution), bind(AdjustColorGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(AdjustColorGroupBeforeRenderContribution), bind(AdjustColorGroupAfterRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(AdjustColorGroupAfterRenderContribution), bind(SplitGroupAfterRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(SplitGroupAfterRenderContribution), bind(SplitGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(SplitGroupBeforeRenderContribution), bind(DashGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(DashGroupBeforeRenderContribution), bind(DashGroupAfterRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(DashGroupAfterRenderContribution), bind(AdjustPosGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(AdjustPosGroupBeforeRenderContribution), bind(AdjustPosGroupAfterRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(AdjustPosGroupAfterRenderContribution), bind(ClipBodyGroupBeforeRenderContribution).toSelf().inSingletonScope(), bind(GroupRenderContribution).toService(ClipBodyGroupBeforeRenderContribution), bind(VTableDrawItemInterceptorContribution).toSelf().inSingletonScope(), bind(DrawItemInterceptor).toService(VTableDrawItemInterceptorContribution), bind(SuffixTextBeforeRenderContribution).toSelf().inSingletonScope(), bind(TextRenderContribution).toService(SuffixTextBeforeRenderContribution);
|
|
30713
30681
|
});
|
|
30714
30682
|
|
|
30715
30683
|
function computeColsWidth(table, colStart, colEnd, update) {
|
|
@@ -35033,6 +35001,19 @@
|
|
|
35033
35001
|
checkedState[sourceIndex] = checkedState[targetIndex], checkedState[targetIndex] = sourceRecord;
|
|
35034
35002
|
}
|
|
35035
35003
|
}
|
|
35004
|
+
function getGroupCheckboxState(table) {
|
|
35005
|
+
const result = [],
|
|
35006
|
+
dataSource = table.dataSource,
|
|
35007
|
+
groupKeyLength = dataSource.dataConfig.groupByRules.length + 1;
|
|
35008
|
+
return dataSource.currentIndexedData.forEach((indexArr, index) => {
|
|
35009
|
+
if (isArray$1(indexArr) && indexArr.length === groupKeyLength) {
|
|
35010
|
+
const {
|
|
35011
|
+
vtableOriginIndex: vtableOriginIndex
|
|
35012
|
+
} = dataSource.getRawRecord(indexArr);
|
|
35013
|
+
result[vtableOriginIndex] = table.stateManager.checkedState[indexArr];
|
|
35014
|
+
}
|
|
35015
|
+
}), result;
|
|
35016
|
+
}
|
|
35036
35017
|
|
|
35037
35018
|
function updateResizeRow(xInTable, yInTable, state) {
|
|
35038
35019
|
xInTable = Math.ceil(xInTable), yInTable = Math.ceil(yInTable);
|
|
@@ -35607,8 +35588,8 @@
|
|
|
35607
35588
|
triggerSort(col, row, iconMark, event) {
|
|
35608
35589
|
if (this.table.isPivotTable()) {
|
|
35609
35590
|
const sortState = this.table.getPivotSortState(col, row),
|
|
35610
|
-
order = sortState ? sortState.toUpperCase() : "
|
|
35611
|
-
new_order = "ASC" === order ? "DESC" : "ASC";
|
|
35591
|
+
order = sortState ? sortState.toUpperCase() : "NORMAL",
|
|
35592
|
+
new_order = "ASC" === order ? "DESC" : "DESC" === order ? "NORMAL" : "ASC";
|
|
35612
35593
|
return this.table.sort(col, row, new_order), void this.table.fireListeners(PIVOT_TABLE_EVENT_TYPE.PIVOT_SORT_CLICK, {
|
|
35613
35594
|
col: col,
|
|
35614
35595
|
row: row,
|
|
@@ -36125,41 +36106,38 @@
|
|
|
36125
36106
|
}
|
|
36126
36107
|
}), table.scenegraph.tableGroup.addEventListener("pointertap", e => {
|
|
36127
36108
|
var _a, _b, _c, _d, _e;
|
|
36128
|
-
if (table.stateManager.columnResize.resizing || table.stateManager.columnMove.moving) return;
|
|
36129
36109
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
36130
|
-
if (eventManager.
|
|
36131
|
-
|
|
36132
|
-
|
|
36133
|
-
|
|
36134
|
-
|
|
36135
|
-
|
|
36136
|
-
|
|
36137
|
-
|
|
36110
|
+
if (!eventManager.touchMove && 0 === e.button && eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.CLICK_CELL)) {
|
|
36111
|
+
const {
|
|
36112
|
+
col: col,
|
|
36113
|
+
row: row
|
|
36114
|
+
} = eventArgsSet.eventArgs,
|
|
36115
|
+
cellInfo = table.getCellInfo(col, row);
|
|
36116
|
+
let icon, position;
|
|
36117
|
+
if (null === (_a = eventArgsSet.eventArgs) || void 0 === _a ? void 0 : _a.target) {
|
|
36118
|
+
const iconInfo = getIconAndPositionFromTarget(null === (_b = eventArgsSet.eventArgs) || void 0 === _b ? void 0 : _b.target);
|
|
36119
|
+
iconInfo && (icon = iconInfo.icon, position = iconInfo.position);
|
|
36138
36120
|
}
|
|
36139
|
-
|
|
36140
|
-
|
|
36141
|
-
|
|
36142
|
-
|
|
36143
|
-
|
|
36144
|
-
|
|
36145
|
-
|
|
36146
|
-
|
|
36147
|
-
|
|
36148
|
-
|
|
36149
|
-
|
|
36150
|
-
|
|
36151
|
-
|
|
36152
|
-
|
|
36153
|
-
|
|
36154
|
-
|
|
36155
|
-
|
|
36156
|
-
|
|
36157
|
-
|
|
36158
|
-
|
|
36159
|
-
target: null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target,
|
|
36160
|
-
mergeCellInfo: null === (_e = eventArgsSet.eventArgs) || void 0 === _e ? void 0 : _e.mergeInfo
|
|
36161
|
-
});
|
|
36162
|
-
table.fireListeners(TABLE_EVENT_TYPE.CLICK_CELL, cellsEvent);
|
|
36121
|
+
const cellsEvent = Object.assign(Object.assign({}, cellInfo), {
|
|
36122
|
+
event: e.nativeEvent,
|
|
36123
|
+
federatedEvent: e,
|
|
36124
|
+
cells: [],
|
|
36125
|
+
targetIcon: icon ? {
|
|
36126
|
+
name: icon.name,
|
|
36127
|
+
position: position,
|
|
36128
|
+
funcType: icon.attribute.funcType
|
|
36129
|
+
} : void 0,
|
|
36130
|
+
target: null === (_c = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _c ? void 0 : _c.target,
|
|
36131
|
+
mergeCellInfo: null === (_d = eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.mergeInfo
|
|
36132
|
+
});
|
|
36133
|
+
table.fireListeners(TABLE_EVENT_TYPE.CLICK_CELL, cellsEvent);
|
|
36134
|
+
}
|
|
36135
|
+
if (!table.stateManager.columnResize.resizing && !table.stateManager.columnMove.moving && (eventManager.dealIconClick(e, eventArgsSet), (null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) && eventManager.touchSetTimeout && "touch" === e.pointerType)) {
|
|
36136
|
+
const eventArgsSet = getCellEventArgsSet(e);
|
|
36137
|
+
if (eventManager.touchSetTimeout) {
|
|
36138
|
+
clearTimeout(eventManager.touchSetTimeout);
|
|
36139
|
+
const isHasSelected = !!(null === (_e = stateManager.select.ranges) || void 0 === _e ? void 0 : _e.length);
|
|
36140
|
+
eventManager.dealTableSelect(eventArgsSet), stateManager.endSelectCells(!0, isHasSelected), eventManager.touchSetTimeout = void 0;
|
|
36163
36141
|
}
|
|
36164
36142
|
}
|
|
36165
36143
|
}), table.scenegraph.stage.addEventListener("pointerdown", e => {
|
|
@@ -37714,7 +37692,7 @@
|
|
|
37714
37692
|
getSortIconForPivotTable(order, _table, col, row) {
|
|
37715
37693
|
const headerC = _table.getHeaderDefine(col, row);
|
|
37716
37694
|
if (!headerC || !1 === headerC.showSort || !isValid$1(headerC.showSort) && !headerC.sort || headerC.columns && headerC.columns.length > 0) return null;
|
|
37717
|
-
return "ASC" === order ? this.downIcon : "DESC" === order ? this.upIcon : this.normalIcon;
|
|
37695
|
+
return "ASC" === (null == order ? void 0 : order.toUpperCase()) ? this.downIcon : "DESC" === (null == order ? void 0 : order.toUpperCase()) ? this.upIcon : this.normalIcon;
|
|
37718
37696
|
}
|
|
37719
37697
|
getDropDownStateIcons(_table, col, row) {
|
|
37720
37698
|
var _a, _b, _c;
|
|
@@ -38637,7 +38615,7 @@
|
|
|
38637
38615
|
constructor(container) {
|
|
38638
38616
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
38639
38617
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
38640
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.7.
|
|
38618
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.7.4", 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");
|
|
38641
38619
|
const {
|
|
38642
38620
|
frozenColCount = 0,
|
|
38643
38621
|
frozenRowCount: frozenRowCount,
|
|
@@ -42320,7 +42298,11 @@
|
|
|
42320
42298
|
this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules), this.refreshRowColCount(), this.scenegraph.createSceneGraph();
|
|
42321
42299
|
}
|
|
42322
42300
|
getCheckboxState(field) {
|
|
42323
|
-
|
|
42301
|
+
if (this.stateManager.checkedState.length < this.rowCount - this.columnHeaderLevelCount && this.stateManager.initLeftRecordsCheckState(this.records), isValid$1(field)) {
|
|
42302
|
+
let stateArr = this.stateManager.checkedState;
|
|
42303
|
+
return this.options.groupBy && (stateArr = getGroupCheckboxState(this)), stateArr.map(state => state[field]);
|
|
42304
|
+
}
|
|
42305
|
+
return this.stateManager.checkedState;
|
|
42324
42306
|
}
|
|
42325
42307
|
getCellCheckboxState(col, row) {
|
|
42326
42308
|
var _a;
|
|
@@ -44943,7 +44925,7 @@
|
|
|
44943
44925
|
getWeekday: getWeekday
|
|
44944
44926
|
});
|
|
44945
44927
|
|
|
44946
|
-
const version = "1.7.
|
|
44928
|
+
const version = "1.7.4";
|
|
44947
44929
|
|
|
44948
44930
|
exports.Gantt = Gantt;
|
|
44949
44931
|
exports.TYPES = index$1;
|