@visactor/vtable-gantt 1.7.2 → 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/cjs/tools/isx.js +2 -1
- package/cjs/ts-types/events.js +1 -2
- package/dist/vtable-gantt.js +131 -133
- 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/es/tools/isx.js +3 -1
- package/es/ts-types/events.js +1 -2
- 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/cjs/tools/isx.js
CHANGED
package/cjs/ts-types/events.js
CHANGED
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) {
|
|
@@ -27300,7 +27307,7 @@
|
|
|
27300
27307
|
var _a;
|
|
27301
27308
|
let cellGroup,
|
|
27302
27309
|
isAsync = !1;
|
|
27303
|
-
if (isPromise(value) && (value = table.getCellValue(col, row), isAsync = !0), "text" === type || "link" === type) {
|
|
27310
|
+
if (isPromise(value) && (value = table.getCellValue(col, row), isAsync = !0), "text" === type || "link" === type || customResult) {
|
|
27304
27311
|
if ("link" === type) {
|
|
27305
27312
|
const cellValue = value,
|
|
27306
27313
|
headerStyle = table._getCellStyle(col, row);
|
|
@@ -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;
|
|
@@ -29540,10 +29547,13 @@
|
|
|
29540
29547
|
globalCompositeOperation: "destination-out"
|
|
29541
29548
|
}), borderRect.addChild(shadowRect);
|
|
29542
29549
|
const hackRect = createRect({
|
|
29543
|
-
|
|
29544
|
-
|
|
29550
|
+
x: borderLeft / 2,
|
|
29551
|
+
y: borderTop / 2,
|
|
29552
|
+
width: group.attribute.width,
|
|
29553
|
+
height: group.attribute.height,
|
|
29545
29554
|
fill: "transparent",
|
|
29546
|
-
pickable: !1
|
|
29555
|
+
pickable: !1,
|
|
29556
|
+
globalCompositeOperation: "source-over"
|
|
29547
29557
|
});
|
|
29548
29558
|
borderRect.addChild(hackRect);
|
|
29549
29559
|
} else borderRect = createRect(rectAttributes), borderRect.name = "table-border-rect";
|
|
@@ -30105,8 +30115,12 @@
|
|
|
30105
30115
|
cellDisable && (selectMode = void 0);
|
|
30106
30116
|
}
|
|
30107
30117
|
} else if ("replace" === state.table.theme.selectionStyle.selectionFillMode) for (let i = 0; i < ranges.length; i++) {
|
|
30108
|
-
const range = ranges[i]
|
|
30109
|
-
|
|
30118
|
+
const range = ranges[i],
|
|
30119
|
+
rangeColStart = Math.min(range.start.col, range.end.col),
|
|
30120
|
+
rangeColEnd = Math.max(range.start.col, range.end.col),
|
|
30121
|
+
rangeRowStart = Math.min(range.start.row, range.end.row),
|
|
30122
|
+
rangeRowEnd = Math.max(range.start.row, range.end.row);
|
|
30123
|
+
if (rangeColStart <= col && rangeRowStart <= row && rangeColEnd >= col && rangeRowEnd >= row) {
|
|
30110
30124
|
selectMode = "cellBgColor";
|
|
30111
30125
|
break;
|
|
30112
30126
|
}
|
|
@@ -30378,76 +30392,37 @@
|
|
|
30378
30392
|
constructor() {
|
|
30379
30393
|
this.time = BaseRenderContributionTime.beforeFillStroke, this.useStyle = !0, this.order = 0;
|
|
30380
30394
|
}
|
|
30381
|
-
drawShape(group, context,
|
|
30395
|
+
drawShape(group, context, xOrigin, yOrigin, doFill, doStroke, fVisible, sVisible, groupAttribute, drawContext, fillCb, strokeCb, doFillOrStroke) {
|
|
30382
30396
|
var _a, _b, _c, _d, _e, _f;
|
|
30383
30397
|
const table = group.stage.table;
|
|
30384
30398
|
if (table) if ("body" === group.role) {
|
|
30385
|
-
|
|
30386
|
-
y = -(null !== (_b = group.attribute.y) && void 0 !== _b ? _b : 0) + table.getFrozenRowsHeight(),
|
|
30387
|
-
width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth(),
|
|
30388
|
-
height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();
|
|
30389
|
-
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());
|
|
30390
30400
|
} else if ("row-header" === group.role) {
|
|
30391
|
-
|
|
30392
|
-
y = -(null !== (_c = group.attribute.y) && void 0 !== _c ? _c : 0) + table.getFrozenRowsHeight(),
|
|
30393
|
-
width = table.getFrozenColsWidth(),
|
|
30394
|
-
height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();
|
|
30395
|
-
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());
|
|
30396
30402
|
} else if ("col-header" === group.role) {
|
|
30397
|
-
|
|
30398
|
-
y = 0,
|
|
30399
|
-
width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth(),
|
|
30400
|
-
height = table.getFrozenRowsHeight();
|
|
30401
|
-
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());
|
|
30402
30404
|
} else if ("right-frozen" === group.role) {
|
|
30403
|
-
|
|
30404
|
-
y = -(null !== (_e = group.attribute.y) && void 0 !== _e ? _e : 0) + table.getFrozenRowsHeight(),
|
|
30405
|
-
width = table.getRightFrozenColsWidth(),
|
|
30406
|
-
height = group.parent.attribute.height - table.getFrozenRowsHeight() - table.getBottomFrozenRowsHeight();
|
|
30407
|
-
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());
|
|
30408
30406
|
} else if ("bottom-frozen" === group.role) {
|
|
30409
|
-
|
|
30410
|
-
y = 0,
|
|
30411
|
-
width = group.parent.attribute.width - table.getFrozenColsWidth() - table.getRightFrozenColsWidth(),
|
|
30412
|
-
height = table.getBottomFrozenRowsHeight();
|
|
30413
|
-
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());
|
|
30414
30408
|
} else if ("corner-header" === group.role) {
|
|
30415
|
-
|
|
30416
|
-
y = 0,
|
|
30417
|
-
width = table.getFrozenColsWidth(),
|
|
30418
|
-
height = table.getFrozenRowsHeight();
|
|
30419
|
-
context.beginPath(), context.rect(x, y, width, height);
|
|
30409
|
+
drawClipRect(context, 0, 0, table.getFrozenColsWidth(), table.getFrozenRowsHeight());
|
|
30420
30410
|
} else if ("corner-right-top-header" === group.role) {
|
|
30421
|
-
|
|
30422
|
-
y = 0,
|
|
30423
|
-
width = table.getRightFrozenColsWidth(),
|
|
30424
|
-
height = table.getFrozenRowsHeight();
|
|
30425
|
-
context.beginPath(), context.rect(x, y, width, height);
|
|
30411
|
+
drawClipRect(context, 0, 0, table.getRightFrozenColsWidth(), table.getFrozenRowsHeight());
|
|
30426
30412
|
} else if ("corner-right-bottom-header" === group.role) {
|
|
30427
|
-
|
|
30428
|
-
y = 0,
|
|
30429
|
-
width = table.getRightFrozenColsWidth(),
|
|
30430
|
-
height = table.getBottomFrozenRowsHeight();
|
|
30431
|
-
context.beginPath(), context.rect(x, y, width, height);
|
|
30413
|
+
drawClipRect(context, 0, 0, table.getRightFrozenColsWidth(), table.getBottomFrozenRowsHeight());
|
|
30432
30414
|
} else if ("corner-left-bottom-header" === group.role) {
|
|
30433
|
-
|
|
30434
|
-
y = 0,
|
|
30435
|
-
width = table.getFrozenColsWidth(),
|
|
30436
|
-
height = table.getBottomFrozenRowsHeight();
|
|
30437
|
-
context.beginPath(), context.rect(x, y, width, height);
|
|
30415
|
+
drawClipRect(context, 0, 0, table.getFrozenColsWidth(), table.getBottomFrozenRowsHeight());
|
|
30438
30416
|
}
|
|
30439
30417
|
}
|
|
30440
30418
|
};
|
|
30441
30419
|
ClipBodyGroupBeforeRenderContribution = __decorate$3([injectable()], ClipBodyGroupBeforeRenderContribution);
|
|
30442
|
-
|
|
30443
|
-
|
|
30444
|
-
|
|
30445
|
-
|
|
30446
|
-
|
|
30447
|
-
|
|
30448
|
-
}
|
|
30449
|
-
};
|
|
30450
|
-
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
|
+
}
|
|
30451
30426
|
function getCellSizeForDraw(group, width, height, bottomRight) {
|
|
30452
30427
|
const table = group.stage.table;
|
|
30453
30428
|
if ("cell" === group.role) {
|
|
@@ -30702,7 +30677,7 @@
|
|
|
30702
30677
|
SuffixTextBeforeRenderContribution = __decorate([injectable()], SuffixTextBeforeRenderContribution);
|
|
30703
30678
|
|
|
30704
30679
|
var splitModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
30705
|
-
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);
|
|
30706
30681
|
});
|
|
30707
30682
|
|
|
30708
30683
|
function computeColsWidth(table, colStart, colEnd, update) {
|
|
@@ -33784,11 +33759,13 @@
|
|
|
33784
33759
|
updateCheckboxCellState(col, row, checked) {
|
|
33785
33760
|
var _a, _b;
|
|
33786
33761
|
if (this.table.transpose) null === (_a = this.bodyGroup.children) || void 0 === _a || _a.forEach(columnGroup => {
|
|
33787
|
-
|
|
33762
|
+
var _a;
|
|
33763
|
+
null === (_a = columnGroup.getChildAt(row)) || void 0 === _a || _a.getChildren().forEach(node => {
|
|
33788
33764
|
"checkbox" === node.name && node.setAttribute("checked", checked);
|
|
33789
33765
|
});
|
|
33790
33766
|
});else {
|
|
33791
|
-
|
|
33767
|
+
const columnGroup = this.getColGroup(col);
|
|
33768
|
+
null === (_b = null == columnGroup ? void 0 : columnGroup.children) || void 0 === _b || _b.forEach(cellNode => {
|
|
33792
33769
|
cellNode.getChildren().find(node => {
|
|
33793
33770
|
"checkbox" === node.name && node.setAttribute("checked", checked);
|
|
33794
33771
|
});
|
|
@@ -34087,12 +34064,12 @@
|
|
|
34087
34064
|
let cell;
|
|
34088
34065
|
if (!cellGroup) {
|
|
34089
34066
|
const drawRange = this.table.getDrawRange();
|
|
34090
|
-
return abstractY >= drawRange.top && abstractY <= drawRange.bottom
|
|
34067
|
+
return abstractY >= drawRange.top && abstractY <= drawRange.bottom && (cell = this.table.getCellAtRelativePosition(abstractX - offset, abstractY), cell.col === this.table.colCount - 1) ? cell : {
|
|
34091
34068
|
col: -1,
|
|
34092
34069
|
row: -1
|
|
34093
34070
|
};
|
|
34094
34071
|
}
|
|
34095
|
-
return abstractX < cellGroup.globalAABBBounds.x1 + offset ? cell = {
|
|
34072
|
+
return cellGroup.stage ? (abstractX < cellGroup.globalAABBBounds.x1 + offset ? cell = {
|
|
34096
34073
|
col: cellGroup.col - 1,
|
|
34097
34074
|
row: cellGroup.row,
|
|
34098
34075
|
x: cellGroup.globalAABBBounds.x1
|
|
@@ -34100,7 +34077,10 @@
|
|
|
34100
34077
|
col: cellGroup.col,
|
|
34101
34078
|
row: cellGroup.row,
|
|
34102
34079
|
x: cellGroup.globalAABBBounds.x2
|
|
34103
|
-
}), cell && this.table.rightFrozenColCount > 0 && cell.col
|
|
34080
|
+
}), cell && this.table.rightFrozenColCount > 0 && cell.col >= this.table.colCount - this.table.rightFrozenColCount - 1 && this.table.tableNoFrameWidth - this.table.getFrozenColsWidth() - this.table.getRightFrozenColsWidth() + this.table.scrollLeft < this.bodyGroup.attribute.width && (cell.col = cell.col + 1, cell.rightFrozen = !0), cell || {
|
|
34081
|
+
col: -1,
|
|
34082
|
+
row: -1
|
|
34083
|
+
}) : {
|
|
34104
34084
|
col: -1,
|
|
34105
34085
|
row: -1
|
|
34106
34086
|
};
|
|
@@ -34117,7 +34097,7 @@
|
|
|
34117
34097
|
col: cellGroup.col,
|
|
34118
34098
|
row: cellGroup.row,
|
|
34119
34099
|
y: cellGroup.globalAABBBounds.y2
|
|
34120
|
-
}), cell && this.table.bottomFrozenRowCount > 0 && cell.row
|
|
34100
|
+
}), cell && this.table.bottomFrozenRowCount > 0 && cell.row >= this.table.rowCount - this.table.bottomFrozenRowCount - 1 && this.table.tableNoFrameHeight - this.table.getFrozenRowsHeight() - this.table.getBottomFrozenRowsHeight() + this.table.scrollTop < this.bodyGroup.attribute.height && (cell.row = cell.row + 1, cell.bottomFrozen = !0), cell) return cell;
|
|
34121
34101
|
}
|
|
34122
34102
|
return {
|
|
34123
34103
|
col: -1,
|
|
@@ -34808,7 +34788,7 @@
|
|
|
34808
34788
|
}
|
|
34809
34789
|
rightColWidth - detaX < state.table.internalProps.limitMinWidth && (detaX = rightColWidth - state.table.internalProps.limitMinWidth);
|
|
34810
34790
|
}
|
|
34811
|
-
detaX = Math.ceil(detaX), state.columnResize.col < state.table.rowHeaderLevelCount || state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount ? updateResizeColForColumn(detaX, state) : "indicator" === state.table.internalProps.columnResizeType ? updateResizeColForIndicator$1(detaX, state) : "indicatorGroup" === state.table.internalProps.columnResizeType ? updateResizeColForIndicatorGroup$1(detaX, state) : "all" === state.table.internalProps.columnResizeType ? updateResizeColForAll$1(detaX, state) : updateResizeColForColumn(detaX, state), state.columnResize.x = xInTable, state.table.scenegraph.component.updateResizeCol(state.columnResize.col, yInTable, state.columnResize.isRightFrozen), state.columnResize.col < state.table.frozenColCount && !state.table.isPivotTable() && !state.table.transpose ? state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen) : state.
|
|
34791
|
+
detaX = Math.ceil(detaX), state.columnResize.col < state.table.rowHeaderLevelCount || state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount ? updateResizeColForColumn(detaX, state) : "indicator" === state.table.internalProps.columnResizeType ? updateResizeColForIndicator$1(detaX, state) : "indicatorGroup" === state.table.internalProps.columnResizeType ? updateResizeColForIndicatorGroup$1(detaX, state) : "all" === state.table.internalProps.columnResizeType ? updateResizeColForAll$1(detaX, state) : updateResizeColForColumn(detaX, state), state.columnResize.x = xInTable, state.table.scenegraph.component.updateResizeCol(state.columnResize.col, yInTable, state.columnResize.isRightFrozen), state.columnResize.col < state.table.frozenColCount && !state.table.isPivotTable() && !state.table.transpose ? state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1, state.columnResize.isRightFrozen) : state.table.options.frozenColCount && state.table.scenegraph.component.setFrozenColumnShadow(state.table.frozenColCount - 1), (state.columnResize.col >= state.table.colCount - state.table.rightFrozenColCount && !state.table.isPivotTable() && !state.table.transpose || state.table.options.rightFrozenColCount) && state.table.scenegraph.component.setRightFrozenColumnShadow(state.table.colCount - state.table.rightFrozenColCount), state.table.scenegraph.updateNextFrame();
|
|
34812
34792
|
}
|
|
34813
34793
|
function updateResizeColForColumn(detaX, state) {
|
|
34814
34794
|
"adaptive" === state.table.widthMode && state.columnResize.col < state.table.colCount - 1 ? (state.table.scenegraph.updateColWidth(state.columnResize.col, detaX), state.table.scenegraph.updateColWidth(state.columnResize.col + 1, -detaX), state.table.internalProps._widthResizedColMap.add(state.columnResize.col), state.table.internalProps._widthResizedColMap.add(state.columnResize.col + 1)) : (state.table.scenegraph.updateColWidth(state.columnResize.col, detaX), state.table.internalProps._widthResizedColMap.add(state.columnResize.col));
|
|
@@ -35021,6 +35001,19 @@
|
|
|
35021
35001
|
checkedState[sourceIndex] = checkedState[targetIndex], checkedState[targetIndex] = sourceRecord;
|
|
35022
35002
|
}
|
|
35023
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
|
+
}
|
|
35024
35017
|
|
|
35025
35018
|
function updateResizeRow(xInTable, yInTable, state) {
|
|
35026
35019
|
xInTable = Math.ceil(xInTable), yInTable = Math.ceil(yInTable);
|
|
@@ -35595,8 +35588,8 @@
|
|
|
35595
35588
|
triggerSort(col, row, iconMark, event) {
|
|
35596
35589
|
if (this.table.isPivotTable()) {
|
|
35597
35590
|
const sortState = this.table.getPivotSortState(col, row),
|
|
35598
|
-
order = sortState ? sortState.toUpperCase() : "
|
|
35599
|
-
new_order = "ASC" === order ? "DESC" : "ASC";
|
|
35591
|
+
order = sortState ? sortState.toUpperCase() : "NORMAL",
|
|
35592
|
+
new_order = "ASC" === order ? "DESC" : "DESC" === order ? "NORMAL" : "ASC";
|
|
35600
35593
|
return this.table.sort(col, row, new_order), void this.table.fireListeners(PIVOT_TABLE_EVENT_TYPE.PIVOT_SORT_CLICK, {
|
|
35601
35594
|
col: col,
|
|
35602
35595
|
row: row,
|
|
@@ -35785,7 +35778,7 @@
|
|
|
35785
35778
|
horizontal: 1,
|
|
35786
35779
|
vertical: 1
|
|
35787
35780
|
});
|
|
35788
|
-
(optimizedDeltaX || optimizedDeltaY) && state.interactionState !== InteractionState.scrolling && state.updateInteractionState(InteractionState.scrolling), optimizedDeltaX && (state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event), state.showHorizontalScrollBar(!0)), optimizedDeltaY && (state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY, event), state.showVerticalScrollBar(!0)), isWheelEvent && state.resetInteractionState(), event.cancelable && ("none" === state.table.internalProps.overscrollBehavior || Math.abs(deltaY) >= Math.abs(deltaX) && 0 !== deltaY && isVerticalScrollable(deltaY, state) || Math.abs(deltaY) <= Math.abs(deltaX) && 0 !== deltaX && isHorizontalScrollable(deltaX, state)) && event.preventDefault();
|
|
35781
|
+
(optimizedDeltaX || optimizedDeltaY) && state.interactionState !== InteractionState.scrolling && state.updateInteractionState(InteractionState.scrolling), optimizedDeltaX && (state.setScrollLeft(state.scroll.horizontalBarPos + optimizedDeltaX, event), state.showHorizontalScrollBar(!0)), optimizedDeltaY && (state.setScrollTop(state.scroll.verticalBarPos + optimizedDeltaY, event), state.showVerticalScrollBar(!0)), isWheelEvent && state.resetInteractionState(), event.nativeEvent.cancelable && ("none" === state.table.internalProps.overscrollBehavior || Math.abs(deltaY) >= Math.abs(deltaX) && 0 !== deltaY && isVerticalScrollable(deltaY, state) || Math.abs(deltaY) <= Math.abs(deltaX) && 0 !== deltaX && isHorizontalScrollable(deltaX, state)) && event.nativeEvent.preventDefault();
|
|
35789
35782
|
}
|
|
35790
35783
|
function optimizeScrollXY(x, y, ratio) {
|
|
35791
35784
|
var _a, _b;
|
|
@@ -36113,41 +36106,38 @@
|
|
|
36113
36106
|
}
|
|
36114
36107
|
}), table.scenegraph.tableGroup.addEventListener("pointertap", e => {
|
|
36115
36108
|
var _a, _b, _c, _d, _e;
|
|
36116
|
-
if (table.stateManager.columnResize.resizing || table.stateManager.columnMove.moving) return;
|
|
36117
36109
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
36118
|
-
if (eventManager.
|
|
36119
|
-
|
|
36120
|
-
|
|
36121
|
-
|
|
36122
|
-
|
|
36123
|
-
|
|
36124
|
-
|
|
36125
|
-
|
|
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);
|
|
36126
36120
|
}
|
|
36127
|
-
|
|
36128
|
-
|
|
36129
|
-
|
|
36130
|
-
|
|
36131
|
-
|
|
36132
|
-
|
|
36133
|
-
|
|
36134
|
-
|
|
36135
|
-
|
|
36136
|
-
|
|
36137
|
-
|
|
36138
|
-
|
|
36139
|
-
|
|
36140
|
-
|
|
36141
|
-
|
|
36142
|
-
|
|
36143
|
-
|
|
36144
|
-
|
|
36145
|
-
|
|
36146
|
-
|
|
36147
|
-
target: null === (_d = null == eventArgsSet ? void 0 : eventArgsSet.eventArgs) || void 0 === _d ? void 0 : _d.target,
|
|
36148
|
-
mergeCellInfo: null === (_e = eventArgsSet.eventArgs) || void 0 === _e ? void 0 : _e.mergeInfo
|
|
36149
|
-
});
|
|
36150
|
-
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;
|
|
36151
36141
|
}
|
|
36152
36142
|
}
|
|
36153
36143
|
}), table.scenegraph.stage.addEventListener("pointerdown", e => {
|
|
@@ -36456,7 +36446,7 @@
|
|
|
36456
36446
|
if (stateManager.select.cellPos.col === table.colCount - 1 ? (targetRow = Math.min(table.rowCount - 1, stateManager.select.cellPos.row + 1), targetCol = table.rowHeaderLevelCount) : stateManager.select.cellPos.row === table.rowCount - 1 ? (targetRow = table.rowCount - 1, targetCol = table.rowHeaderLevelCount) : (targetRow = stateManager.select.cellPos.row, targetCol = stateManager.select.cellPos.col + 1), isCellDisableSelect(table, targetCol, targetRow)) return;
|
|
36457
36447
|
table.selectCell(targetCol, targetRow), (null === (_t = table.editorManager) || void 0 === _t ? void 0 : _t.editingEditor) && (table.editorManager.completeEdit(), table.getElement().focus(), table.getEditor(targetCol, targetRow) && table.editorManager.startEditCell(targetCol, targetRow));
|
|
36458
36448
|
}
|
|
36459
|
-
} else {
|
|
36449
|
+
} else if (!(e.ctrlKey || e.metaKey || e.shiftKey)) {
|
|
36460
36450
|
const editCellTrigger = table.options.editCellTrigger;
|
|
36461
36451
|
if (("keydown" === editCellTrigger || Array.isArray(editCellTrigger) && editCellTrigger.includes("keydown")) && !(null === (_u = table.editorManager) || void 0 === _u ? void 0 : _u.editingEditor)) {
|
|
36462
36452
|
const allowedKeys = /^[a-zA-Z0-9+\-*\/%=.,\s]$/;
|
|
@@ -37702,7 +37692,7 @@
|
|
|
37702
37692
|
getSortIconForPivotTable(order, _table, col, row) {
|
|
37703
37693
|
const headerC = _table.getHeaderDefine(col, row);
|
|
37704
37694
|
if (!headerC || !1 === headerC.showSort || !isValid$1(headerC.showSort) && !headerC.sort || headerC.columns && headerC.columns.length > 0) return null;
|
|
37705
|
-
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;
|
|
37706
37696
|
}
|
|
37707
37697
|
getDropDownStateIcons(_table, col, row) {
|
|
37708
37698
|
var _a, _b, _c;
|
|
@@ -38066,14 +38056,18 @@
|
|
|
38066
38056
|
}
|
|
38067
38057
|
arrangeCustomCellStyle(cellPos, customStyleId) {
|
|
38068
38058
|
const index = this.customCellStyleArrangement.findIndex(style => style.cellPosition.range && cellPos.range ? style.cellPosition.range.start.col === cellPos.range.start.col && style.cellPosition.range.start.row === cellPos.range.start.row && style.cellPosition.range.end.col === cellPos.range.end.col && style.cellPosition.range.end.row === cellPos.range.end.row : style.cellPosition.col === cellPos.col && style.cellPosition.row === cellPos.row);
|
|
38069
|
-
if (-1 === index
|
|
38059
|
+
if (-1 === index) this.customCellStyleArrangement.push({
|
|
38070
38060
|
cellPosition: {
|
|
38071
38061
|
col: cellPos.col,
|
|
38072
38062
|
row: cellPos.row,
|
|
38073
38063
|
range: cellPos.range
|
|
38074
38064
|
},
|
|
38075
38065
|
customStyleId: customStyleId
|
|
38076
|
-
})
|
|
38066
|
+
});else {
|
|
38067
|
+
if (this.customCellStyleArrangement[index].customStyleId === customStyleId) return;
|
|
38068
|
+
this.customCellStyleArrangement[index].customStyleId = customStyleId;
|
|
38069
|
+
}
|
|
38070
|
+
if (cellPos.range) for (let col = cellPos.range.start.col; col <= cellPos.range.end.col; col++) for (let row = cellPos.range.start.row; row <= cellPos.range.end.row; row++) this.table.scenegraph.updateCellContent(col, row);else this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);
|
|
38077
38071
|
this.table.scenegraph.updateNextFrame();
|
|
38078
38072
|
}
|
|
38079
38073
|
updateCustomCell(customCellStyle, customCellStyleArrangement) {
|
|
@@ -38621,7 +38615,7 @@
|
|
|
38621
38615
|
constructor(container) {
|
|
38622
38616
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
38623
38617
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
38624
|
-
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");
|
|
38625
38619
|
const {
|
|
38626
38620
|
frozenColCount = 0,
|
|
38627
38621
|
frozenRowCount: frozenRowCount,
|
|
@@ -42304,7 +42298,11 @@
|
|
|
42304
42298
|
this.scenegraph.clearCells(), this.sortState ? (this.dataSource.updateFilterRulesForSorted(filterRules), sortRecords(this)) : this.dataSource.updateFilterRules(filterRules), this.refreshRowColCount(), this.scenegraph.createSceneGraph();
|
|
42305
42299
|
}
|
|
42306
42300
|
getCheckboxState(field) {
|
|
42307
|
-
|
|
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;
|
|
42308
42306
|
}
|
|
42309
42307
|
getCellCheckboxState(col, row) {
|
|
42310
42308
|
var _a;
|
|
@@ -44927,7 +44925,7 @@
|
|
|
44927
44925
|
getWeekday: getWeekday
|
|
44928
44926
|
});
|
|
44929
44927
|
|
|
44930
|
-
const version = "1.7.
|
|
44928
|
+
const version = "1.7.4";
|
|
44931
44929
|
|
|
44932
44930
|
exports.Gantt = Gantt;
|
|
44933
44931
|
exports.TYPES = index$1;
|