@visactor/vtable-gantt 1.9.2-alpha.1 → 1.9.2-alpha.3
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 +73 -100
- package/dist/vtable-gantt.min.js +2 -2
- 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
|
@@ -5,5 +5,5 @@ import { Gantt } from './Gantt';
|
|
|
5
5
|
import * as tools from './tools';
|
|
6
6
|
import * as VRender from './vrender';
|
|
7
7
|
import * as VTable from './vtable';
|
|
8
|
-
export declare const version = "1.9.2-alpha.
|
|
8
|
+
export declare const version = "1.9.2-alpha.3";
|
|
9
9
|
export { TYPES, GanttConstructorOptions, Gantt, ColumnsDefine, ColumnDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine, TextAlignType, TextBaselineType, tools, VRender, VTable };
|
package/cjs/index.js
CHANGED
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAuBlC,sBAAK;AATP,mCAAgC;AAW9B,sFAXO,aAAK,OAWP;AAVP,+CAAiC;AAsB/B,sBAAK;AArBP,mDAAqC;AAsBnC,0BAAO;AArBT,iDAAmC;AAsBjC,wBAAM;AArBK,QAAA,OAAO,GAAG,eAAe,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';\nexport const version = \"1.9.2-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kDAAoC;AAuBlC,sBAAK;AATP,mCAAgC;AAW9B,sFAXO,aAAK,OAWP;AAVP,+CAAiC;AAsB/B,sBAAK;AArBP,mDAAqC;AAsBnC,0BAAO;AArBT,iDAAmC;AAsBjC,wBAAM;AArBK,QAAA,OAAO,GAAG,eAAe,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';\nexport const version = \"1.9.2-alpha.3\";\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 VRender,\n VTable\n};\n"]}
|
package/dist/vtable-gantt.js
CHANGED
|
@@ -4469,14 +4469,8 @@
|
|
|
4469
4469
|
return needTestLetter && (index = testLetter(desc, index)), index;
|
|
4470
4470
|
}
|
|
4471
4471
|
function testLetter(string, index) {
|
|
4472
|
-
let negativeWrongMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
4473
4472
|
let i = index;
|
|
4474
|
-
for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i--, i <= 0) return
|
|
4475
|
-
return i;
|
|
4476
|
-
}
|
|
4477
|
-
function testLetter2(string, index) {
|
|
4478
|
-
let i = index;
|
|
4479
|
-
for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i++, i >= string.length) return i;
|
|
4473
|
+
for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i--, i <= 0) return index;
|
|
4480
4474
|
return i;
|
|
4481
4475
|
}
|
|
4482
4476
|
function measureTextCanvas(text, character) {
|
|
@@ -4574,7 +4568,7 @@
|
|
|
4574
4568
|
width: length
|
|
4575
4569
|
};
|
|
4576
4570
|
}
|
|
4577
|
-
clipText(text, options, width, wordBreak
|
|
4571
|
+
clipText(text, options, width, wordBreak) {
|
|
4578
4572
|
if (0 === text.length) return {
|
|
4579
4573
|
str: "",
|
|
4580
4574
|
width: 0
|
|
@@ -4590,8 +4584,8 @@
|
|
|
4590
4584
|
};
|
|
4591
4585
|
const data = this._clipText(text, options, width, 0, text.length - 1, "end", !1);
|
|
4592
4586
|
if (wordBreak && data.str !== text) {
|
|
4593
|
-
|
|
4594
|
-
index !== data.str.length && (
|
|
4587
|
+
const index = testLetter(text, data.str.length);
|
|
4588
|
+
index !== data.str.length && (data.str = text.substring(0, index), data.width = this.measureTextWidth(data.str, options));
|
|
4595
4589
|
}
|
|
4596
4590
|
return data;
|
|
4597
4591
|
}
|
|
@@ -8671,7 +8665,7 @@
|
|
|
8671
8665
|
const path = "function" == typeof graphic.pathProxy ? graphic.pathProxy(graphic.attribute) : graphic.pathProxy;
|
|
8672
8666
|
return renderCommandList(path.commandList, context, x, y), context.setShadowBlendStyle && context.setShadowBlendStyle(graphic, graphic.attribute, themeAttributes), doStroke && (strokeCb ? strokeCb(context, graphic.attribute, themeAttributes) : sVisible && (context.setStrokeStyle(graphic, graphic.attribute, x - originX, y - originY, themeAttributes), context.stroke())), doFill && (fillCb ? fillCb(context, graphic.attribute, themeAttributes) : fVisible && (context.setCommonStyle(graphic, graphic.attribute, x - originX, y - originY, themeAttributes), context.fill())), !0;
|
|
8673
8667
|
}
|
|
8674
|
-
function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
|
|
8668
|
+
function intersect$2(x0, y0, x1, y1, x2, y2, x3, y3) {
|
|
8675
8669
|
const x10 = x1 - x0,
|
|
8676
8670
|
y10 = y1 - y0,
|
|
8677
8671
|
x32 = x3 - x2,
|
|
@@ -8740,7 +8734,7 @@
|
|
|
8740
8734
|
yire = innerRadius * sin(innerEndAngle);
|
|
8741
8735
|
let xore, yore, xirs, yirs;
|
|
8742
8736
|
if ((maxInnerCornerRadius > epsilon || maxOuterCornerRadius > epsilon) && (xore = outerRadius * cos(outerEndAngle), yore = outerRadius * sin(outerEndAngle), xirs = innerRadius * cos(innerStartAngle), yirs = innerRadius * sin(innerStartAngle), deltaAngle < pi)) {
|
|
8743
|
-
const oc = intersect(xors, yors, xirs, yirs, xore, yore, xire, yire);
|
|
8737
|
+
const oc = intersect$2(xors, yors, xirs, yirs, xore, yore, xire, yire);
|
|
8744
8738
|
if (oc) {
|
|
8745
8739
|
const ax = xors - oc[0],
|
|
8746
8740
|
ay = yors - oc[1],
|
|
@@ -9305,7 +9299,7 @@
|
|
|
9305
9299
|
validCheck(attribute, theme, aabbBounds, graphic) {
|
|
9306
9300
|
if (!graphic) return !0;
|
|
9307
9301
|
if (null != attribute.forceBoundsHeight || null != attribute.forceBoundsWidth) return !0;
|
|
9308
|
-
if (graphic.shadowRoot
|
|
9302
|
+
if (graphic.shadowRoot) return !0;
|
|
9309
9303
|
const {
|
|
9310
9304
|
visible = theme.visible
|
|
9311
9305
|
} = attribute;
|
|
@@ -12574,22 +12568,20 @@
|
|
|
12574
12568
|
});
|
|
12575
12569
|
break;
|
|
12576
12570
|
}
|
|
12577
|
-
const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-
|
|
12578
|
-
if ("" !== str && "" === clip.str
|
|
12571
|
+
const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-word" === wordBreak);
|
|
12572
|
+
if ("" !== str && "" === clip.str) {
|
|
12579
12573
|
if (ellipsis) {
|
|
12580
12574
|
const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
|
|
12581
12575
|
clip.str = null !== (_c = clipEllipsis.str) && void 0 !== _c ? _c : "", clip.width = null !== (_d = clipEllipsis.width) && void 0 !== _d ? _d : 0;
|
|
12582
12576
|
} else clip.str = "", clip.width = 0;
|
|
12583
12577
|
needCut = !1;
|
|
12584
12578
|
}
|
|
12585
|
-
linesLayout.push({
|
|
12579
|
+
if (linesLayout.push({
|
|
12586
12580
|
str: clip.str,
|
|
12587
12581
|
width: clip.width
|
|
12588
|
-
});
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
let newStr = str.substring(cutLength);
|
|
12592
|
-
"keep-all" === wordBreak && (newStr = newStr.replace(/^\s+/g, "")), lines.splice(i + 1, 0, newStr);
|
|
12582
|
+
}), clip.str.length === str.length) ;else if (needCut) {
|
|
12583
|
+
const newStr = str.substring(clip.str.length);
|
|
12584
|
+
lines.splice(i + 1, 0, newStr);
|
|
12593
12585
|
}
|
|
12594
12586
|
}
|
|
12595
12587
|
let maxWidth = 0;
|
|
@@ -21062,15 +21054,6 @@
|
|
|
21062
21054
|
labelPoint = getVerticalCoord(point, getCircleVerticalVector(labelOffset, point, center, inside));
|
|
21063
21055
|
return getCircleLabelPosition(labelPoint, getCircleVerticalVector(labelOffset || 1, labelPoint, center, inside));
|
|
21064
21056
|
}
|
|
21065
|
-
function textIntersect(textA, textB, sep) {
|
|
21066
|
-
let a = textA.OBBBounds,
|
|
21067
|
-
b = textB.OBBBounds;
|
|
21068
|
-
return a && b && !a.empty() && !b.empty() ? a.intersects(b) : (a = textA.AABBBounds, b = textB.AABBBounds, sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2));
|
|
21069
|
-
}
|
|
21070
|
-
function hasOverlap(items, pad) {
|
|
21071
|
-
for (let b, i = 1, n = items.length, a = items[0]; i < n; a = b, ++i) if (b = items[i], textIntersect(a, b, pad)) return !0;
|
|
21072
|
-
return !1;
|
|
21073
|
-
}
|
|
21074
21057
|
|
|
21075
21058
|
const dispatchHoverState = (e, container, lastHover) => {
|
|
21076
21059
|
const target = e.target;
|
|
@@ -21395,9 +21378,17 @@
|
|
|
21395
21378
|
},
|
|
21396
21379
|
greedy: function (items, sep) {
|
|
21397
21380
|
let a;
|
|
21398
|
-
return items.filter((b, i) => i &&
|
|
21381
|
+
return items.filter((b, i) => i && intersect$1(a, b, sep) ? b.setAttribute("opacity", 0) : (a = b, 1));
|
|
21399
21382
|
}
|
|
21400
21383
|
};
|
|
21384
|
+
function intersect$1(textA, textB, sep) {
|
|
21385
|
+
let a = textA.OBBBounds,
|
|
21386
|
+
b = textB.OBBBounds;
|
|
21387
|
+
return a && b && !a.empty() && !b.empty() ? a.intersects(b) : (a = textA.AABBBounds, b = textB.AABBBounds, sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2));
|
|
21388
|
+
}
|
|
21389
|
+
function hasOverlap$1(items, pad) {
|
|
21390
|
+
for (let b, i = 1, n = items.length, a = items[0]; i < n; a = b, ++i) if (intersect$1(a, b = items[i], pad)) return !0;
|
|
21391
|
+
}
|
|
21401
21392
|
function hasBounds(item) {
|
|
21402
21393
|
let bounds;
|
|
21403
21394
|
return bounds = item.OBBBounds.empty() ? item.AABBBounds : item.OBBBounds, bounds.width() > 1 && bounds.height() > 1;
|
|
@@ -21405,20 +21396,6 @@
|
|
|
21405
21396
|
function reset(items) {
|
|
21406
21397
|
return items.forEach(item => item.setAttribute("opacity", 1)), items;
|
|
21407
21398
|
}
|
|
21408
|
-
function forceItemVisible$1(sourceItem, items, check, comparator) {
|
|
21409
|
-
let inverse = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
|
|
21410
|
-
if (check && !sourceItem.attribute.opacity) {
|
|
21411
|
-
const remainLength = items.length;
|
|
21412
|
-
if (remainLength > 1) {
|
|
21413
|
-
sourceItem.setAttribute("opacity", 1);
|
|
21414
|
-
for (let i = 0; i < remainLength; i++) {
|
|
21415
|
-
const item = inverse ? items[remainLength - 1 - i] : items[i];
|
|
21416
|
-
if (!comparator(item)) break;
|
|
21417
|
-
item.setAttribute("opacity", 0);
|
|
21418
|
-
}
|
|
21419
|
-
}
|
|
21420
|
-
}
|
|
21421
|
-
}
|
|
21422
21399
|
function autoHide(labels, config) {
|
|
21423
21400
|
if (isEmpty$1(labels)) return;
|
|
21424
21401
|
const source = labels.filter(hasBounds);
|
|
@@ -21430,19 +21407,20 @@
|
|
|
21430
21407
|
separation: sep = 0
|
|
21431
21408
|
} = config,
|
|
21432
21409
|
reduce = isFunction$3(method) ? method : methods$1[method] || methods$1.parity;
|
|
21433
|
-
if (items.length >= 3 && hasOverlap(items, sep)) {
|
|
21410
|
+
if (items.length >= 3 && hasOverlap$1(items, sep)) {
|
|
21434
21411
|
do {
|
|
21435
21412
|
items = reduce(items, sep);
|
|
21436
|
-
} while (items.length >= 3 && hasOverlap(items, sep));
|
|
21437
|
-
|
|
21438
|
-
|
|
21439
|
-
|
|
21440
|
-
|
|
21441
|
-
|
|
21442
|
-
|
|
21443
|
-
|
|
21444
|
-
|
|
21445
|
-
|
|
21413
|
+
} while (items.length >= 3 && hasOverlap$1(items, sep));
|
|
21414
|
+
if (items.length < 3 || config.lastVisible) {
|
|
21415
|
+
const lastSourceItem = last$1(source);
|
|
21416
|
+
if (!lastSourceItem.attribute.opacity) {
|
|
21417
|
+
const remainLength = items.length;
|
|
21418
|
+
if (remainLength > 1) {
|
|
21419
|
+
lastSourceItem.setAttribute("opacity", 1);
|
|
21420
|
+
for (let i = remainLength - 1; i >= 0 && intersect$1(items[i], lastSourceItem, sep); i--) items[i].setAttribute("opacity", 0);
|
|
21421
|
+
}
|
|
21422
|
+
}
|
|
21423
|
+
}
|
|
21446
21424
|
}
|
|
21447
21425
|
source.forEach(item => {
|
|
21448
21426
|
item.setAttribute("visible", !!item.attribute.opacity);
|
|
@@ -22049,7 +22027,6 @@
|
|
|
22049
22027
|
autoHideMethod: autoHideMethod,
|
|
22050
22028
|
autoHideSeparation: autoHideSeparation,
|
|
22051
22029
|
lastVisible: lastVisible,
|
|
22052
|
-
firstVisible: firstVisible,
|
|
22053
22030
|
autoWrap: autoWrap$1,
|
|
22054
22031
|
overflowLimitLength: overflowLimitLength
|
|
22055
22032
|
} = label;
|
|
@@ -22083,8 +22060,7 @@
|
|
|
22083
22060
|
orient: orient,
|
|
22084
22061
|
method: autoHideMethod,
|
|
22085
22062
|
separation: autoHideSeparation,
|
|
22086
|
-
lastVisible: lastVisible
|
|
22087
|
-
firstVisible: firstVisible
|
|
22063
|
+
lastVisible: lastVisible
|
|
22088
22064
|
});
|
|
22089
22065
|
}
|
|
22090
22066
|
}
|
|
@@ -22154,6 +22130,13 @@
|
|
|
22154
22130
|
nextBounds = new AABBBounds$1(nextLabel).expand(gap / 2);
|
|
22155
22131
|
return prevBounds.intersects(nextBounds);
|
|
22156
22132
|
};
|
|
22133
|
+
function intersect(a, b, sep) {
|
|
22134
|
+
return sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2);
|
|
22135
|
+
}
|
|
22136
|
+
function hasOverlap(items, pad) {
|
|
22137
|
+
for (let b, i = 1, n = items.length, a = items[0]; i < n; a = b, ++i) if (b = items[i], intersect(a.AABBBounds, b.AABBBounds, pad)) return !0;
|
|
22138
|
+
return !1;
|
|
22139
|
+
}
|
|
22157
22140
|
const MIN_TICK_GAP = 12;
|
|
22158
22141
|
const calculateFlushPos = (basePosition, size, rangePosition, otherEnd) => rangePosition < basePosition ? Math.max(basePosition - size / 2, rangePosition) : rangePosition > basePosition ? Math.min(basePosition - size / 2, rangePosition - size) : rangePosition < otherEnd ? rangePosition : rangePosition - size;
|
|
22159
22142
|
const getCartesianLabelBounds = (scale, domain, op) => {
|
|
@@ -22687,20 +22670,6 @@
|
|
|
22687
22670
|
} else scaleTicks = getTicks(count);
|
|
22688
22671
|
return scaleTicks;
|
|
22689
22672
|
}
|
|
22690
|
-
function forceItemVisible(sourceItem, items, check, comparator) {
|
|
22691
|
-
let inverse = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
|
|
22692
|
-
if (check && !items.includes(sourceItem)) {
|
|
22693
|
-
let remainLength = items.length;
|
|
22694
|
-
if (remainLength > 1) {
|
|
22695
|
-
inverse ? items.push(sourceItem) : items.unshift(sourceItem);
|
|
22696
|
-
for (let i = 0; i < remainLength; i++) {
|
|
22697
|
-
const index = inverse ? remainLength - 1 - i : i;
|
|
22698
|
-
if (!comparator(items[index])) break;
|
|
22699
|
-
items.splice(index, 1), i--, remainLength--;
|
|
22700
|
-
}
|
|
22701
|
-
}
|
|
22702
|
-
}
|
|
22703
|
-
}
|
|
22704
22673
|
const continuousTicks = (scale, op) => {
|
|
22705
22674
|
var _a, _b;
|
|
22706
22675
|
if (!isContinuous(scale.type)) return convertDomainToTickData(scale.domain());
|
|
@@ -22740,8 +22709,7 @@
|
|
|
22740
22709
|
customTicks: customTicks
|
|
22741
22710
|
}));
|
|
22742
22711
|
}
|
|
22743
|
-
|
|
22744
|
-
if (op.labelFirstVisible && domain[0] !== scaleTicks[0] && !scaleTicks.includes(domain[0]) && scaleTicks.unshift(domain[0]), op.labelLastVisible && domain[domain.length - 1] !== scaleTicks[scaleTicks.length - 1] && !scaleTicks.includes(domain[domain.length - 1]) && scaleTicks.push(domain[domain.length - 1]), op.sampling && scaleTicks.length > 1 && ("cartesian" === op.coordinateType || "polar" === op.coordinateType && "radius" === op.axisOrientType)) {
|
|
22712
|
+
if (op.sampling && ("cartesian" === op.coordinateType || "polar" === op.coordinateType && "radius" === op.axisOrientType)) {
|
|
22745
22713
|
const {
|
|
22746
22714
|
labelGap = 4,
|
|
22747
22715
|
labelFlush: labelFlush
|
|
@@ -22750,14 +22718,8 @@
|
|
|
22750
22718
|
AABBBounds: bounds,
|
|
22751
22719
|
value: scaleTicks[i]
|
|
22752
22720
|
}));
|
|
22753
|
-
const
|
|
22754
|
-
firstSourceItem = source[0],
|
|
22755
|
-
lastSourceItem = last$1(source),
|
|
22756
|
-
samplingMethod = breakData && breakData() ? methods.greedy : methods.parity;
|
|
22721
|
+
const samplingMethod = breakData && breakData() ? methods.greedy : methods.parity;
|
|
22757
22722
|
for (; items.length >= 3 && hasOverlap(items, labelGap);) items = samplingMethod(items, labelGap);
|
|
22758
|
-
const checkFirst = op.labelFirstVisible;
|
|
22759
|
-
let checkLast = op.labelLastVisible;
|
|
22760
|
-
textIntersect(firstSourceItem, lastSourceItem, labelGap) && items.includes(lastSourceItem) && items.length > 1 && checkFirst && checkLast && (items.splice(items.indexOf(lastSourceItem), 1), checkLast = !1), forceItemVisible(firstSourceItem, items, checkFirst, item => textIntersect(item, firstSourceItem, labelGap)), forceItemVisible(lastSourceItem, items, checkLast, item => textIntersect(item, lastSourceItem, labelGap) || !(!checkFirst || item === firstSourceItem) && textIntersect(item, firstSourceItem, labelGap), !0);
|
|
22761
22723
|
const ticks = items.map(item => item.value);
|
|
22762
22724
|
ticks.length < 3 && labelFlush && (ticks.length > 1 && ticks.pop(), last$1(ticks) !== last$1(scaleTicks) && ticks.push(last$1(scaleTicks))), scaleTicks = ticks;
|
|
22763
22725
|
}
|
|
@@ -22769,7 +22731,7 @@
|
|
|
22769
22731
|
},
|
|
22770
22732
|
greedy: function (items, sep) {
|
|
22771
22733
|
let a;
|
|
22772
|
-
return items.filter((b, i) => (!i || !
|
|
22734
|
+
return items.filter((b, i) => (!i || !intersect(a.AABBBounds, b.AABBBounds, sep)) && (a = b, !0));
|
|
22773
22735
|
}
|
|
22774
22736
|
};
|
|
22775
22737
|
|
|
@@ -23531,8 +23493,8 @@
|
|
|
23531
23493
|
this._autoEllipsis(autoEllipsisStrategy, layoutWidth, labelShape, valueShape), valueAttr.alignRight ? valueShape.setAttributes({
|
|
23532
23494
|
textAlign: "right",
|
|
23533
23495
|
x: this._itemWidthByUser - shapeSize / 2 - parsedPadding[1] - parsedPadding[3] - focusSpace - valueSpace
|
|
23534
|
-
}) : valueShape.setAttribute("x",
|
|
23535
|
-
} else valueShape.setAttribute("x",
|
|
23496
|
+
}) : valueShape.setAttribute("x", valueSpace + (labelShape.AABBBounds.empty() ? 0 : labelShape.AABBBounds.x2));
|
|
23497
|
+
} else valueShape.setAttribute("x", valueSpace + (labelShape.AABBBounds.empty() ? 0 : labelShape.AABBBounds.x2));
|
|
23536
23498
|
focusStartX = valueSpace + (valueShape.AABBBounds.empty() ? 0 : valueShape.AABBBounds.x2), innerGroup.add(valueShape);
|
|
23537
23499
|
} else this._itemWidthByUser ? (labelShape.setAttribute("maxLineWidth", this._itemWidthByUser - parsedPadding[1] - parsedPadding[3] - shapeSize - shapeSpace - focusSpace), focusStartX = labelSpace + (labelShape.AABBBounds.empty() ? 0 : labelShape.AABBBounds.x2)) : focusStartX = labelSpace + (labelShape.AABBBounds.empty() ? 0 : labelShape.AABBBounds.x2);
|
|
23538
23500
|
focusShape && (focusShape.setAttribute("x", focusStartX), innerGroup.add(focusShape));
|
|
@@ -23598,8 +23560,9 @@
|
|
|
23598
23560
|
disableTriggerEvent: disableTriggerEvent
|
|
23599
23561
|
}));
|
|
23600
23562
|
}
|
|
23601
|
-
_updatePositionOfPager(renderStartY, compWidth, compHeight) {
|
|
23563
|
+
_updatePositionOfPager(contentWidth, contentHeight, renderStartY, compWidth, compHeight) {
|
|
23602
23564
|
const {
|
|
23565
|
+
maxHeight: maxHeight,
|
|
23603
23566
|
pager: pager
|
|
23604
23567
|
} = this.attribute,
|
|
23605
23568
|
{
|
|
@@ -23610,14 +23573,14 @@
|
|
|
23610
23573
|
if (this._pagerComponent.setTotal(totalPage), isHorizontal) {
|
|
23611
23574
|
let y;
|
|
23612
23575
|
y = "start" === position ? renderStartY : "end" === position ? renderStartY + compHeight - this._pagerComponent.AABBBounds.height() / 2 : renderStartY + compHeight / 2 - this._pagerComponent.AABBBounds.height() / 2, this._pagerComponent.setAttributes({
|
|
23613
|
-
x:
|
|
23576
|
+
x: contentWidth,
|
|
23614
23577
|
y: y
|
|
23615
23578
|
});
|
|
23616
23579
|
} else {
|
|
23617
23580
|
let x;
|
|
23618
23581
|
x = "start" === position ? 0 : "end" === position ? compWidth - this._pagerComponent.AABBBounds.width() : (compWidth - this._pagerComponent.AABBBounds.width()) / 2, this._pagerComponent.setAttributes({
|
|
23619
23582
|
x: x,
|
|
23620
|
-
y:
|
|
23583
|
+
y: maxHeight - this._pagerComponent.AABBBounds.height()
|
|
23621
23584
|
});
|
|
23622
23585
|
}
|
|
23623
23586
|
}
|
|
@@ -23646,10 +23609,11 @@
|
|
|
23646
23609
|
const {
|
|
23647
23610
|
value: value
|
|
23648
23611
|
} = e.detail;
|
|
23649
|
-
let newPage;
|
|
23650
|
-
return
|
|
23612
|
+
let newPage = value[0] * this._itemContext.totalPage;
|
|
23613
|
+
return pager.scrollByPosition ? newPage += 1 : newPage = Math.floor(newPage) + 1, newPage;
|
|
23651
23614
|
} : e => e.detail.current,
|
|
23652
23615
|
onScroll = e => {
|
|
23616
|
+
e.preventDefault();
|
|
23653
23617
|
const scrollComponent = this._pagerComponent,
|
|
23654
23618
|
preScrollRange = scrollComponent.getScrollRange(),
|
|
23655
23619
|
{
|
|
@@ -23678,7 +23642,7 @@
|
|
|
23678
23642
|
if (this._itemContext.isScrollbar) {
|
|
23679
23643
|
if (this._pagerComponent.addEventListener("scrollDrag", onPaging), this._pagerComponent.addEventListener("scrollUp", onPaging), this.attribute.pager.roamScroll) {
|
|
23680
23644
|
const THROTTLE_TIME = 50;
|
|
23681
|
-
this.addEventListener("wheel",
|
|
23645
|
+
this.addEventListener("wheel", throttle$2(onScroll, THROTTLE_TIME));
|
|
23682
23646
|
}
|
|
23683
23647
|
} else this._pagerComponent.addEventListener("toPrev", onPaging), this._pagerComponent.addEventListener("toNext", onPaging);
|
|
23684
23648
|
}
|
|
@@ -23726,7 +23690,7 @@
|
|
|
23726
23690
|
}), startX += spaceCol + width;
|
|
23727
23691
|
}), this._itemContext.startX = startX, this._itemContext.startY = startY, this._itemContext.pages = pages;
|
|
23728
23692
|
const total = Math.ceil(pages / maxRow);
|
|
23729
|
-
this._itemContext.totalPage = total, this._updatePositionOfPager(renderStartY, compWidth, compHeight);
|
|
23693
|
+
this._itemContext.totalPage = total, this._updatePositionOfPager(contentWidth, contentHeight, renderStartY, compWidth, compHeight);
|
|
23730
23694
|
} else {
|
|
23731
23695
|
if (compWidth = this._itemMaxWidth * maxCol + (maxCol - 1) * spaceCol, compHeight = maxHeight, contentWidth = compWidth, comp = this._createPager(compStyle), this._pagerComponent = comp, this._innerView.add(comp), contentHeight = maxHeight - comp.AABBBounds.height() - pagerSpace - renderStartY, contentHeight <= 0) return this._innerView.removeChild(comp), !1;
|
|
23732
23696
|
itemsContainer.getChildren().forEach((item, index) => {
|
|
@@ -23739,7 +23703,7 @@
|
|
|
23739
23703
|
}), startY += spaceRow + height;
|
|
23740
23704
|
});
|
|
23741
23705
|
const total = Math.ceil(pages / maxCol);
|
|
23742
|
-
this._itemContext.totalPage = total, this._updatePositionOfPager(renderStartY, compWidth, compHeight);
|
|
23706
|
+
this._itemContext.totalPage = total, this._updatePositionOfPager(contentWidth, contentHeight, renderStartY, compWidth, compHeight);
|
|
23743
23707
|
}
|
|
23744
23708
|
defaultCurrent > 1 && (isHorizontal ? itemsContainer.setAttribute("y", -(defaultCurrent - 1) * (compHeight + spaceRow)) : itemsContainer.setAttribute("x", -(defaultCurrent - 1) * (compWidth + spaceCol)));
|
|
23745
23709
|
const clipGroup = graphicCreator.group({
|
|
@@ -23862,9 +23826,6 @@
|
|
|
23862
23826
|
config.state[key] && (isFunction$3(config.state[key]) ? newConfig.state[key] = config.state[key](item, isSelected, index, items) : newConfig.state[key] = config.state[key]);
|
|
23863
23827
|
})), newConfig;
|
|
23864
23828
|
}
|
|
23865
|
-
release() {
|
|
23866
|
-
super.release(), this.removeAllEventListeners();
|
|
23867
|
-
}
|
|
23868
23829
|
}
|
|
23869
23830
|
DiscreteLegend.defaultAttributes = {
|
|
23870
23831
|
layout: "horizontal",
|
|
@@ -33744,7 +33705,7 @@
|
|
|
33744
33705
|
width: width,
|
|
33745
33706
|
height: height
|
|
33746
33707
|
} = attribute;
|
|
33747
|
-
return this._AABBBounds.setValue(x, y, x + width, y + height), this.parent && this.parent.addChildUpdateBoundTag(), this.clearUpdateBoundTag(), this._AABBBounds;
|
|
33708
|
+
return this._AABBBounds.setValue(x, y, x + width, y + height), this.parent && this.parent.addChildUpdateBoundTag(), this.clearUpdateBoundTag(), this.shadowRoot && this.shadowRoot.tryUpdateAABBBounds(), this._AABBBounds;
|
|
33748
33709
|
}
|
|
33749
33710
|
return "body" === this.role || "row-header" === this.role || "col-header" === this.role || "right-frozen" === this.role || "bottom-frozen" === this.role || "corner-header" === this.role || "corner-right-top-header" === this.role || "corner-right-bottom-header" === this.role || "corner-left-bottom-header" === this.role ? (this._AABBBounds.setValue(-1 / 0, -1 / 0, 1 / 0, 1 / 0), this.parent && this.parent.addChildUpdateBoundTag(), this.clearUpdateBoundTag(), this.shadowRoot && this.shadowRoot.tryUpdateAABBBounds(), this._AABBBounds) : super.doUpdateAABBBounds();
|
|
33750
33711
|
}
|
|
@@ -34467,6 +34428,18 @@
|
|
|
34467
34428
|
}).catch(err => {});
|
|
34468
34429
|
}
|
|
34469
34430
|
|
|
34431
|
+
function onBeforeAttributeUpdateForInvertHighlight(val, attribute) {
|
|
34432
|
+
var _a, _b;
|
|
34433
|
+
const graphic = this;
|
|
34434
|
+
if (graphic.shadowRoot && graphic.shadowRoot.childrenCount && (isValid$1(val.width) || isValid$1(val.height))) {
|
|
34435
|
+
const shadowRect = graphic.shadowRoot.findChildrenByName("shadow-rect")[0];
|
|
34436
|
+
shadowRect && shadowRect.setAttributes({
|
|
34437
|
+
width: null !== (_a = val.width) && void 0 !== _a ? _a : shadowRect.attribute.width,
|
|
34438
|
+
height: null !== (_b = val.height) && void 0 !== _b ? _b : shadowRect.attribute.height
|
|
34439
|
+
});
|
|
34440
|
+
}
|
|
34441
|
+
}
|
|
34442
|
+
|
|
34470
34443
|
function createCell(type, value, define, table, col, row, colWidth, cellWidth, cellHeight, columnGroup, y, padding, textAlign, textBaseline, mayHaveIcon, cellTheme, range, customResult) {
|
|
34471
34444
|
var _a, _b;
|
|
34472
34445
|
let cellGroup,
|
|
@@ -34526,7 +34499,7 @@
|
|
|
34526
34499
|
} else if ("radio" === type) {
|
|
34527
34500
|
cellGroup = Factory.getFunction("createRadioCellGroup")(null, columnGroup, 0, y, col, row, colWidth, cellWidth, cellHeight, padding, textAlign, textBaseline, table, cellTheme, define);
|
|
34528
34501
|
}
|
|
34529
|
-
return cellGroup;
|
|
34502
|
+
return cellGroup.onBeforeAttributeUpdate = onBeforeAttributeUpdateForInvertHighlight, cellGroup;
|
|
34530
34503
|
}
|
|
34531
34504
|
function updateCell$1(col, row, table, addNew, isShadow) {
|
|
34532
34505
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
@@ -46962,7 +46935,7 @@
|
|
|
46962
46935
|
constructor(container) {
|
|
46963
46936
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
46964
46937
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
46965
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.9.2-alpha.
|
|
46938
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.9.2-alpha.3", 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");
|
|
46966
46939
|
const {
|
|
46967
46940
|
frozenColCount = 0,
|
|
46968
46941
|
frozenRowCount: frozenRowCount,
|
|
@@ -57304,7 +57277,7 @@
|
|
|
57304
57277
|
themes: themes$1
|
|
57305
57278
|
});
|
|
57306
57279
|
|
|
57307
|
-
const version = "1.9.2-alpha.
|
|
57280
|
+
const version = "1.9.2-alpha.3";
|
|
57308
57281
|
|
|
57309
57282
|
exports.Gantt = Gantt;
|
|
57310
57283
|
exports.TYPES = index$2;
|