@visactor/vtable 0.13.2-alpha.6 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/PivotChart.js +6 -6
- package/cjs/PivotChart.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuContainer.js +1 -1
- package/cjs/components/menu/dom/logic/MenuContainer.js.map +1 -1
- package/cjs/components/menu/dom/logic/MenuElement.js +3 -3
- package/cjs/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/cjs/core/BaseTable.d.ts +2 -2
- package/cjs/core/BaseTable.js +6 -1
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.d.ts +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.js +1 -1
- package/cjs/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/cjs/event/event.js +8 -3
- package/cjs/event/event.js.map +1 -1
- package/cjs/event/listener/table-group.js +29 -5
- package/cjs/event/listener/table-group.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/layout/pivot-header-layout.js +1 -0
- package/cjs/layout/pivot-header-layout.js.map +1 -1
- package/cjs/layout/simple-header-layout.js +1 -0
- package/cjs/layout/simple-header-layout.js.map +1 -1
- package/cjs/scenegraph/component/custom.d.ts +1 -0
- package/cjs/scenegraph/component/custom.js +14 -2
- package/cjs/scenegraph/component/custom.js.map +1 -1
- package/cjs/scenegraph/component/menu.js +1 -1
- package/cjs/scenegraph/component/menu.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/proxy.js +2 -2
- package/cjs/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.js +3 -3
- package/cjs/scenegraph/group-creater/progress/update-position/update-auto-column.js.map +1 -1
- package/cjs/scenegraph/layout/compute-col-width.js +3 -2
- package/cjs/scenegraph/layout/compute-col-width.js.map +1 -1
- package/cjs/scenegraph/layout/compute-row-height.js +3 -2
- package/cjs/scenegraph/layout/compute-row-height.js.map +1 -1
- package/cjs/scenegraph/layout/frozen.js +1 -2
- package/cjs/scenegraph/layout/frozen.js.map +1 -1
- package/cjs/scenegraph/layout/move-cell.js +1 -1
- package/cjs/scenegraph/layout/move-cell.js.map +1 -1
- package/cjs/scenegraph/layout/update-row.js +4 -1
- package/cjs/scenegraph/layout/update-row.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +15 -13
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/scenegraph/utils/update-container.d.ts +1 -1
- package/cjs/scenegraph/utils/update-container.js +1 -2
- package/cjs/scenegraph/utils/update-container.js.map +1 -1
- package/cjs/ts-types/events.d.ts +2 -2
- package/cjs/ts-types/events.js.map +1 -1
- package/dist/vtable.js +225 -117
- package/dist/vtable.min.js +2 -2
- package/es/PivotChart.js +6 -6
- package/es/PivotChart.js.map +1 -1
- package/es/components/menu/dom/logic/MenuContainer.js +1 -1
- package/es/components/menu/dom/logic/MenuContainer.js.map +1 -1
- package/es/components/menu/dom/logic/MenuElement.js +3 -3
- package/es/components/menu/dom/logic/MenuElement.js.map +1 -1
- package/es/core/BaseTable.d.ts +2 -2
- package/es/core/BaseTable.js +6 -1
- package/es/core/BaseTable.js.map +1 -1
- package/es/core/TABLE_EVENT_TYPE.d.ts +1 -1
- package/es/core/TABLE_EVENT_TYPE.js +1 -1
- package/es/core/TABLE_EVENT_TYPE.js.map +1 -1
- package/es/event/event.js +8 -3
- package/es/event/event.js.map +1 -1
- package/es/event/listener/table-group.js +29 -5
- package/es/event/listener/table-group.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/layout/pivot-header-layout.js +1 -0
- package/es/layout/pivot-header-layout.js.map +1 -1
- package/es/layout/simple-header-layout.js +1 -0
- package/es/layout/simple-header-layout.js.map +1 -1
- package/es/scenegraph/component/custom.d.ts +1 -0
- package/es/scenegraph/component/custom.js +12 -0
- package/es/scenegraph/component/custom.js.map +1 -1
- package/es/scenegraph/component/menu.js +1 -1
- package/es/scenegraph/component/menu.js.map +1 -1
- package/es/scenegraph/group-creater/progress/proxy.js +2 -2
- package/es/scenegraph/group-creater/progress/proxy.js.map +1 -1
- package/es/scenegraph/group-creater/progress/update-position/update-auto-column.js +3 -3
- package/es/scenegraph/group-creater/progress/update-position/update-auto-column.js.map +1 -1
- package/es/scenegraph/layout/compute-col-width.js +4 -1
- package/es/scenegraph/layout/compute-col-width.js.map +1 -1
- package/es/scenegraph/layout/compute-row-height.js +4 -1
- package/es/scenegraph/layout/compute-row-height.js.map +1 -1
- package/es/scenegraph/layout/frozen.js +1 -2
- package/es/scenegraph/layout/frozen.js.map +1 -1
- package/es/scenegraph/layout/move-cell.js +1 -1
- package/es/scenegraph/layout/move-cell.js.map +1 -1
- package/es/scenegraph/layout/update-row.js +4 -1
- package/es/scenegraph/layout/update-row.js.map +1 -1
- package/es/scenegraph/scenegraph.js +10 -10
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/scenegraph/utils/update-container.d.ts +1 -1
- package/es/scenegraph/utils/update-container.js +1 -2
- package/es/scenegraph/utils/update-container.js.map +1 -1
- package/es/ts-types/events.d.ts +2 -2
- package/es/ts-types/events.js.map +1 -1
- package/package.json +6 -6
package/dist/vtable.js
CHANGED
|
@@ -492,7 +492,7 @@
|
|
|
492
492
|
const isRegExp = value => isType$5(value, "RegExp");
|
|
493
493
|
var isRegExp$1 = isRegExp;
|
|
494
494
|
|
|
495
|
-
const isBase64 = value => new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(value);
|
|
495
|
+
const isBase64 = value => new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp|svg\+xml)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(value);
|
|
496
496
|
var isBase64$1 = isBase64;
|
|
497
497
|
|
|
498
498
|
const getType = value => ({}).toString.call(value).replace(/^\[object /, "").replace(/]$/, "");
|
|
@@ -3178,7 +3178,7 @@
|
|
|
3178
3178
|
SORT_CLICK: 'sort_click',
|
|
3179
3179
|
FREEZE_CLICK: 'freeze_click',
|
|
3180
3180
|
SCROLL: 'scroll',
|
|
3181
|
-
|
|
3181
|
+
DROPDOWN_MENU_CLICK: 'dropdown_menu_click',
|
|
3182
3182
|
MOUSEOVER_CHART_SYMBOL: 'mouseover_chart_symbol',
|
|
3183
3183
|
DRAG_SELECT_END: 'drag_select_end',
|
|
3184
3184
|
DROPDOWN_ICON_CLICK: 'dropdown_icon_click',
|
|
@@ -10630,9 +10630,7 @@
|
|
|
10630
10630
|
let data = ResourceLoader.cache.get(url);
|
|
10631
10631
|
data ? "fail" === data.loadState ? application$1.global.getRequestAnimationFrame()(() => {
|
|
10632
10632
|
mark.imageLoadFail(url);
|
|
10633
|
-
}) : "init" === data.loadState || "loading" === data.loadState ? null === (_a = data.waitingMark) || void 0 === _a || _a.push(mark) : mark &&
|
|
10634
|
-
mark.imageLoadSuccess(url, data.data);
|
|
10635
|
-
}) : (data = {
|
|
10633
|
+
}) : "init" === data.loadState || "loading" === data.loadState ? null === (_a = data.waitingMark) || void 0 === _a || _a.push(mark) : mark && mark.imageLoadSuccess(url, data.data) : (data = {
|
|
10636
10634
|
type: "image",
|
|
10637
10635
|
loadState: "init"
|
|
10638
10636
|
}, ResourceLoader.cache.set(url, data), data.dataPromise = application$1.global.loadImage(url), data.dataPromise ? (data.waitingMark = [mark], data.dataPromise.then(res => {
|
|
@@ -11284,7 +11282,7 @@
|
|
|
11284
11282
|
data: "init",
|
|
11285
11283
|
state: null
|
|
11286
11284
|
};
|
|
11287
|
-
this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading",
|
|
11285
|
+
this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", image.startsWith("<svg") ? (ResourceLoader$1.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background) : (isValidUrl$1(image) || image.includes("/") || isBase64$1(image)) && (ResourceLoader$1.GetImage(image, this), this.backgroundImg = this.backgroundImg || background)) : (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background);
|
|
11288
11286
|
}
|
|
11289
11287
|
imageLoadSuccess(url, image, cb) {
|
|
11290
11288
|
if (!this.resources) return;
|
|
@@ -11434,7 +11432,7 @@
|
|
|
11434
11432
|
if ("/" === xmlData[i + 1]) {
|
|
11435
11433
|
const closeIndex = findClosingIndex(xmlData, ">", i, "Closing Tag is not closed."),
|
|
11436
11434
|
propIndex = jPath.lastIndexOf(".");
|
|
11437
|
-
jPath = jPath.substring(0, propIndex), currentNode = this.tagsNodeStack.pop(), textData = "", i = closeIndex;
|
|
11435
|
+
jPath = jPath.substring(0, propIndex), currentNode = this.tagsNodeStack.pop(), currentNode && currentNode.child && textData && currentNode.child[currentNode.child.length - 1][":@"] && (currentNode.child[currentNode.child.length - 1][":@"].text = textData), textData = "", i = closeIndex;
|
|
11438
11436
|
} else if ("?" === xmlData[i + 1]) {
|
|
11439
11437
|
i = readTagExp(xmlData, i, !1, "?>").closeIndex + 1;
|
|
11440
11438
|
} else if ("!--" === xmlData.substr(i + 1, 3)) {
|
|
@@ -19122,6 +19120,7 @@
|
|
|
19122
19120
|
return this.currentRenderMap.get(type) || this.defaultRenderMap.get(type);
|
|
19123
19121
|
}
|
|
19124
19122
|
clearScreen(renderService, context, drawContext) {
|
|
19123
|
+
var _a;
|
|
19125
19124
|
const {
|
|
19126
19125
|
clear: clear
|
|
19127
19126
|
} = drawContext;
|
|
@@ -19133,7 +19132,12 @@
|
|
|
19133
19132
|
} = drawContext,
|
|
19134
19133
|
x = 0,
|
|
19135
19134
|
y = 0;
|
|
19136
|
-
context.clearRect(x, y, width, height)
|
|
19135
|
+
context.clearRect(x, y, width, height);
|
|
19136
|
+
const stage = null === (_a = renderService.drawParams) || void 0 === _a ? void 0 : _a.stage;
|
|
19137
|
+
if (stage && stage.backgroundImg && stage.resources) {
|
|
19138
|
+
const res = stage.resources.get(clear);
|
|
19139
|
+
res && "success" === res.state && res.data && context.drawImage(res.data, x, y, width, height);
|
|
19140
|
+
} else context.fillStyle = createColor(context, clear, {
|
|
19137
19141
|
AABBBounds: {
|
|
19138
19142
|
x1: x,
|
|
19139
19143
|
y1: y,
|
|
@@ -20215,7 +20219,7 @@
|
|
|
20215
20219
|
wrapGroup: wrapGroup
|
|
20216
20220
|
} = _ref;
|
|
20217
20221
|
application$1.global.removeDom(wrapGroup);
|
|
20218
|
-
}), nativeDom = "string" == typeof dom ? new DOMParser().parseFromString(dom, "text/
|
|
20222
|
+
}), nativeDom = "string" == typeof dom ? new DOMParser().parseFromString(dom, "text/html").firstChild : dom;
|
|
20219
20223
|
const _container = container || (!0 === stage.params.enableHtmlAttribute ? null : stage.params.enableHtmlAttribute);
|
|
20220
20224
|
nativeContainer = _container ? "string" == typeof _container ? application$1.global.getElementById(_container) : _container : graphic.stage.window.getContainer();
|
|
20221
20225
|
const wrapGroup = application$1.global.createDom({
|
|
@@ -20697,7 +20701,9 @@
|
|
|
20697
20701
|
return this.viewBox.height();
|
|
20698
20702
|
}
|
|
20699
20703
|
}
|
|
20700
|
-
})), params.autoRender && this.enableAutoRender(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.ticker = params.ticker || defaultTicker, this.supportInteractiveLayer = !1 !== params.interactiveLayer, this.timeline = new DefaultTimeline$1(), this.ticker.addTimeline(this.timeline), this.timeline.pause(), this.optmize(params.optimize)
|
|
20704
|
+
})), params.autoRender && this.enableAutoRender(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.ticker = params.ticker || defaultTicker, this.supportInteractiveLayer = !1 !== params.interactiveLayer, this.timeline = new DefaultTimeline$1(), this.ticker.addTimeline(this.timeline), this.timeline.pause(), this.optmize(params.optimize), this._background && isString$3(this._background) && this.setAttributes({
|
|
20705
|
+
background: this._background
|
|
20706
|
+
});
|
|
20701
20707
|
}
|
|
20702
20708
|
optmize(params) {
|
|
20703
20709
|
this.optmizeRender(null == params ? void 0 : params.skipRenderWithOutRange);
|
|
@@ -21805,7 +21811,7 @@
|
|
|
21805
21811
|
}
|
|
21806
21812
|
getNativeAABBBounds(_dom) {
|
|
21807
21813
|
let dom = _dom;
|
|
21808
|
-
if ("string" == typeof _dom && (dom = new DOMParser().parseFromString(_dom, "text/
|
|
21814
|
+
if ("string" == typeof _dom && (dom = new DOMParser().parseFromString(_dom, "text/html").firstChild), dom.getBoundingClientRect) {
|
|
21809
21815
|
const b = dom.getBoundingClientRect();
|
|
21810
21816
|
return new DynamicB(b);
|
|
21811
21817
|
}
|
|
@@ -25709,7 +25715,7 @@
|
|
|
25709
25715
|
});
|
|
25710
25716
|
}
|
|
25711
25717
|
setAttribute(key, value, forceUpdateTag) {
|
|
25712
|
-
|
|
25718
|
+
isPlainObject$3(this.attribute[key]) && isPlainObject$3(value) && !isFunction$1(this.attribute[key]) && !isFunction$1(value) ? merge$1(this.attribute[key], value) : this.attribute[key] = value, GROUP_ATTRIBUTES.includes(key) || this.render(), this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.onAttributeUpdate();
|
|
25713
25719
|
}
|
|
25714
25720
|
setAttributes(params, forceUpdateTag) {
|
|
25715
25721
|
const keys = Object.keys(params);
|
|
@@ -27118,20 +27124,54 @@
|
|
|
27118
27124
|
}
|
|
27119
27125
|
}
|
|
27120
27126
|
|
|
27127
|
+
function rotate(x, y, deg, originX, originY) {
|
|
27128
|
+
return {
|
|
27129
|
+
x: (x - originX) * Math.cos(deg) + (y - originY) * Math.sin(deg) + originX,
|
|
27130
|
+
y: (x - originX) * Math.sin(deg) + (originY - y) * Math.cos(deg) + originY
|
|
27131
|
+
};
|
|
27132
|
+
}
|
|
27133
|
+
function genNormalBounds(item) {
|
|
27134
|
+
const bounds = item.AABBBounds;
|
|
27135
|
+
return {
|
|
27136
|
+
x1: bounds.x1,
|
|
27137
|
+
x2: bounds.x2,
|
|
27138
|
+
y1: bounds.y1,
|
|
27139
|
+
y2: bounds.y2,
|
|
27140
|
+
centerX: item.attribute.x,
|
|
27141
|
+
centerY: item.attribute.y,
|
|
27142
|
+
angle: item.attribute.angle
|
|
27143
|
+
};
|
|
27144
|
+
}
|
|
27145
|
+
function genRotateBounds(items) {
|
|
27146
|
+
items.forEach(item => {
|
|
27147
|
+
if (item.rotatedBounds || !item.attribute.angle) return;
|
|
27148
|
+
const bounds = genNormalBounds(item),
|
|
27149
|
+
rotatedCenter = rotate(bounds.centerX, bounds.centerY, bounds.angle, item.attribute.x, item.attribute.y),
|
|
27150
|
+
deltaX = rotatedCenter.x - bounds.centerX,
|
|
27151
|
+
deltaY = rotatedCenter.y - bounds.centerY;
|
|
27152
|
+
bounds.x1 += deltaX, bounds.x2 += deltaX, bounds.y1 += deltaY, bounds.y2 += deltaY, bounds.centerX += deltaX, bounds.centerY += deltaY, item.rotatedBounds = bounds;
|
|
27153
|
+
});
|
|
27154
|
+
}
|
|
27155
|
+
function itemIntersect(item1, item2) {
|
|
27156
|
+
return isRectIntersect(item1.AABBBounds, item2.AABBBounds, !1) && (!item1.rotatedBounds || !item2.rotatedBounds || isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0));
|
|
27157
|
+
}
|
|
27158
|
+
|
|
27121
27159
|
const methods$1 = {
|
|
27122
27160
|
parity: function (items) {
|
|
27123
27161
|
return items.filter((item, i) => i % 2 ? item.setAttribute("opacity", 0) : 1);
|
|
27124
27162
|
},
|
|
27125
27163
|
greedy: function (items, sep) {
|
|
27126
27164
|
let a;
|
|
27127
|
-
return items.filter((b, i) => i && intersect$1(a
|
|
27165
|
+
return items.filter((b, i) => i && intersect$1(a, b, sep) ? b.setAttribute("opacity", 0) : (a = b, 1));
|
|
27128
27166
|
}
|
|
27129
27167
|
};
|
|
27130
|
-
function intersect$1(
|
|
27131
|
-
|
|
27168
|
+
function intersect$1(textA, textB, sep) {
|
|
27169
|
+
const a = textA.AABBBounds,
|
|
27170
|
+
b = textB.AABBBounds;
|
|
27171
|
+
return sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2) && (!textA.rotatedBounds || !textB.rotatedBounds || sep > Math.max(textB.rotatedBounds.x1 - textA.rotatedBounds.x2, textA.rotatedBounds.x1 - textB.rotatedBounds.x2, textB.rotatedBounds.y1 - textA.rotatedBounds.y2, textA.rotatedBounds.y1 - textB.rotatedBounds.y2));
|
|
27132
27172
|
}
|
|
27133
27173
|
function hasOverlap$1(items, pad) {
|
|
27134
|
-
for (let b, i = 1, n = items.length, a = items[0]
|
|
27174
|
+
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;
|
|
27135
27175
|
}
|
|
27136
27176
|
function hasBounds(item) {
|
|
27137
27177
|
const b = item.AABBBounds;
|
|
@@ -27145,7 +27185,7 @@
|
|
|
27145
27185
|
const source = labels.filter(hasBounds);
|
|
27146
27186
|
if (isEmpty(source)) return;
|
|
27147
27187
|
let items;
|
|
27148
|
-
items = reset(source);
|
|
27188
|
+
items = reset(source), genRotateBounds(items);
|
|
27149
27189
|
const {
|
|
27150
27190
|
method = "parity",
|
|
27151
27191
|
separation: sep = 0
|
|
@@ -27155,7 +27195,7 @@
|
|
|
27155
27195
|
do {
|
|
27156
27196
|
items = reduce(items, sep);
|
|
27157
27197
|
} while (items.length >= 3 && hasOverlap$1(items, sep));
|
|
27158
|
-
items.length < 3 && !last(source).attribute.opacity &&
|
|
27198
|
+
items.length < 3 && !last(source).attribute.opacity && items.length > 1 && (last(items).setAttribute("opacity", 0), last(source).setAttribute("opacity", 1));
|
|
27159
27199
|
}
|
|
27160
27200
|
source.forEach(item => {
|
|
27161
27201
|
item.setAttribute("visible", !!item.attribute.opacity);
|
|
@@ -27182,39 +27222,9 @@
|
|
|
27182
27222
|
for (let i = 1; i < items.length; i++) if (itemIntersect(items[i - 1], items[i])) return !0;
|
|
27183
27223
|
return !1;
|
|
27184
27224
|
}
|
|
27185
|
-
function itemIntersect(item1, item2) {
|
|
27186
|
-
return isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0);
|
|
27187
|
-
}
|
|
27188
27225
|
function tryRotate(orient, items) {
|
|
27189
27226
|
"bottom" !== orient && "top" !== orient || rotateXAxis(orient, items), "left" !== orient && "right" !== orient || rotateYAxis(orient, items), genRotateBounds(items);
|
|
27190
27227
|
}
|
|
27191
|
-
function rotate(x, y, deg, originX, originY) {
|
|
27192
|
-
return {
|
|
27193
|
-
x: (x - originX) * Math.cos(deg) + (y - originY) * Math.sin(deg) + originX,
|
|
27194
|
-
y: (x - originX) * Math.sin(deg) + (originY - y) * Math.cos(deg) + originY
|
|
27195
|
-
};
|
|
27196
|
-
}
|
|
27197
|
-
function genNormalBounds(item) {
|
|
27198
|
-
const bounds = item.AABBBounds;
|
|
27199
|
-
return {
|
|
27200
|
-
x1: bounds.x1,
|
|
27201
|
-
x2: bounds.x2,
|
|
27202
|
-
y1: bounds.y1,
|
|
27203
|
-
y2: bounds.y2,
|
|
27204
|
-
centerX: item.attribute.x,
|
|
27205
|
-
centerY: item.attribute.y,
|
|
27206
|
-
angle: item.attribute.angle
|
|
27207
|
-
};
|
|
27208
|
-
}
|
|
27209
|
-
function genRotateBounds(items) {
|
|
27210
|
-
items.forEach(item => {
|
|
27211
|
-
const bounds = genNormalBounds(item),
|
|
27212
|
-
rotatedCenter = rotate(bounds.centerX, bounds.centerY, bounds.angle, item.attribute.x, item.attribute.y),
|
|
27213
|
-
deltaX = rotatedCenter.x - bounds.centerX,
|
|
27214
|
-
deltaY = rotatedCenter.y - bounds.centerY;
|
|
27215
|
-
bounds.x1 += deltaX, bounds.x2 += deltaX, bounds.y1 += deltaY, bounds.y2 += deltaY, bounds.centerX += deltaX, bounds.centerY += deltaY, item.rotatedBounds = bounds;
|
|
27216
|
-
});
|
|
27217
|
-
}
|
|
27218
27228
|
function clampAngle() {
|
|
27219
27229
|
let angle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
27220
27230
|
if (angle < 0) for (; angle < 0;) angle += 2 * Math.PI;
|
|
@@ -27531,18 +27541,17 @@
|
|
|
27531
27541
|
if (flush && labelShapes.length) {
|
|
27532
27542
|
const {
|
|
27533
27543
|
orient: orient,
|
|
27534
|
-
start:
|
|
27535
|
-
end:
|
|
27544
|
+
start: axisStart,
|
|
27545
|
+
end: axisEnd
|
|
27536
27546
|
} = this.attribute,
|
|
27537
27547
|
isX = "bottom" === orient || "top" === orient,
|
|
27538
27548
|
first = labelShapes[0],
|
|
27539
27549
|
last$1 = last(labelShapes),
|
|
27540
27550
|
isInverse = isX ? first.attribute.x > last$1.attribute.x : first.attribute.y < last$1.attribute.y;
|
|
27541
27551
|
if (isX) {
|
|
27542
|
-
const width = Math.abs(start.x - end.x);
|
|
27543
27552
|
if (isInverse) {
|
|
27544
|
-
const start =
|
|
27545
|
-
end =
|
|
27553
|
+
const start = axisEnd.x,
|
|
27554
|
+
end = axisStart.x,
|
|
27546
27555
|
startBound = first.AABBBounds.x2,
|
|
27547
27556
|
endBound = last$1.AABBBounds.x1;
|
|
27548
27557
|
startBound > start && first.setAttributes({
|
|
@@ -27553,8 +27562,8 @@
|
|
|
27553
27562
|
textAlign: "left"
|
|
27554
27563
|
});
|
|
27555
27564
|
} else {
|
|
27556
|
-
const start =
|
|
27557
|
-
end =
|
|
27565
|
+
const start = axisStart.x,
|
|
27566
|
+
end = axisEnd.x,
|
|
27558
27567
|
startBound = first.AABBBounds.x1,
|
|
27559
27568
|
endBound = last$1.AABBBounds.x2;
|
|
27560
27569
|
startBound < start && first.setAttributes({
|
|
@@ -27565,33 +27574,30 @@
|
|
|
27565
27574
|
textAlign: "right"
|
|
27566
27575
|
});
|
|
27567
27576
|
}
|
|
27577
|
+
} else if (isInverse) {
|
|
27578
|
+
const startBound = first.AABBBounds.y1,
|
|
27579
|
+
endBound = last$1.AABBBounds.y2,
|
|
27580
|
+
start = axisStart.y,
|
|
27581
|
+
end = axisEnd.y;
|
|
27582
|
+
startBound < start && first.setAttributes({
|
|
27583
|
+
y: start,
|
|
27584
|
+
textBaseline: "top"
|
|
27585
|
+
}), endBound > end && last$1.setAttributes({
|
|
27586
|
+
y: end,
|
|
27587
|
+
textBaseline: "bottom"
|
|
27588
|
+
});
|
|
27568
27589
|
} else {
|
|
27569
|
-
const
|
|
27570
|
-
|
|
27571
|
-
|
|
27572
|
-
|
|
27573
|
-
|
|
27574
|
-
|
|
27575
|
-
|
|
27576
|
-
|
|
27577
|
-
|
|
27578
|
-
|
|
27579
|
-
|
|
27580
|
-
textBaseline: "bottom"
|
|
27581
|
-
});
|
|
27582
|
-
} else {
|
|
27583
|
-
const start = height,
|
|
27584
|
-
end = 0,
|
|
27585
|
-
startBound = first.AABBBounds.y2,
|
|
27586
|
-
endBound = last$1.AABBBounds.y1;
|
|
27587
|
-
startBound > start && first.setAttributes({
|
|
27588
|
-
y: start,
|
|
27589
|
-
textBaseline: "bottom"
|
|
27590
|
-
}), endBound < end && last$1.setAttributes({
|
|
27591
|
-
y: end,
|
|
27592
|
-
textBaseline: "top"
|
|
27593
|
-
});
|
|
27594
|
-
}
|
|
27590
|
+
const start = axisEnd.y,
|
|
27591
|
+
end = axisStart.y,
|
|
27592
|
+
startBound = first.AABBBounds.y2,
|
|
27593
|
+
endBound = last$1.AABBBounds.y1;
|
|
27594
|
+
startBound > start && first.setAttributes({
|
|
27595
|
+
y: start,
|
|
27596
|
+
textBaseline: "bottom"
|
|
27597
|
+
}), endBound < end && last$1.setAttributes({
|
|
27598
|
+
y: end,
|
|
27599
|
+
textBaseline: "top"
|
|
27600
|
+
});
|
|
27595
27601
|
}
|
|
27596
27602
|
}
|
|
27597
27603
|
}
|
|
@@ -38300,6 +38306,9 @@
|
|
|
38300
38306
|
table
|
|
38301
38307
|
};
|
|
38302
38308
|
const customRenderObj = customLayout(arg);
|
|
38309
|
+
if (customRenderObj.rootContainer) {
|
|
38310
|
+
customRenderObj.rootContainer = decodeReactDom(customRenderObj.rootContainer);
|
|
38311
|
+
}
|
|
38303
38312
|
if (customRenderObj.rootContainer instanceof Group$1) {
|
|
38304
38313
|
elementsGroup = customRenderObj.rootContainer;
|
|
38305
38314
|
elementsGroup.name = 'custom-container';
|
|
@@ -38548,6 +38557,23 @@
|
|
|
38548
38557
|
}
|
|
38549
38558
|
return parseInt(str, 10);
|
|
38550
38559
|
}
|
|
38560
|
+
function decodeReactDom(dom) {
|
|
38561
|
+
if (!dom.$$typeof) {
|
|
38562
|
+
return dom;
|
|
38563
|
+
}
|
|
38564
|
+
const type = dom.type;
|
|
38565
|
+
const { attribute, children } = dom.props;
|
|
38566
|
+
const g = type({ attribute });
|
|
38567
|
+
g.id = attribute.id;
|
|
38568
|
+
g.name = attribute.name;
|
|
38569
|
+
children &&
|
|
38570
|
+
children.length &&
|
|
38571
|
+
children.forEach((item) => {
|
|
38572
|
+
const c = decodeReactDom(item);
|
|
38573
|
+
g.add(c);
|
|
38574
|
+
});
|
|
38575
|
+
return g;
|
|
38576
|
+
}
|
|
38551
38577
|
|
|
38552
38578
|
const icons = {};
|
|
38553
38579
|
class IconCache {
|
|
@@ -41245,6 +41271,9 @@
|
|
|
41245
41271
|
};
|
|
41246
41272
|
if (customLayout) {
|
|
41247
41273
|
const customLayoutObj = customLayout(arg);
|
|
41274
|
+
if (customLayoutObj.rootContainer) {
|
|
41275
|
+
customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);
|
|
41276
|
+
}
|
|
41248
41277
|
if (customLayoutObj.rootContainer instanceof Group$1) {
|
|
41249
41278
|
height = customLayoutObj.rootContainer.AABBBounds.height() ?? 0;
|
|
41250
41279
|
}
|
|
@@ -41998,7 +42027,7 @@
|
|
|
41998
42027
|
const resultMenuInfo = this.getEventInfo(target);
|
|
41999
42028
|
const resultTableInfo = this._table.getMenuInfo(this._menuInfo.col, this._menuInfo.row, this._menuInfo.type);
|
|
42000
42029
|
const result = Object.assign(resultMenuInfo, resultTableInfo);
|
|
42001
|
-
this._table.fireListeners(TABLE_EVENT_TYPE.
|
|
42030
|
+
this._table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, result);
|
|
42002
42031
|
}
|
|
42003
42032
|
});
|
|
42004
42033
|
}
|
|
@@ -43869,6 +43898,9 @@
|
|
|
43869
43898
|
};
|
|
43870
43899
|
if (customLayout) {
|
|
43871
43900
|
const customLayoutObj = customLayout(arg);
|
|
43901
|
+
if (customLayoutObj.rootContainer) {
|
|
43902
|
+
customLayoutObj.rootContainer = decodeReactDom(customLayoutObj.rootContainer);
|
|
43903
|
+
}
|
|
43872
43904
|
if (customLayoutObj.rootContainer instanceof Group$1) {
|
|
43873
43905
|
width = customLayoutObj.rootContainer.AABBBounds.width() ?? 0;
|
|
43874
43906
|
}
|
|
@@ -44932,8 +44964,8 @@
|
|
|
44932
44964
|
}
|
|
44933
44965
|
}
|
|
44934
44966
|
const totalActualBodyColumnCount = Math.min(table.scenegraph.proxy.colLimit, table.scenegraph.proxy.bodyRightCol - table.scenegraph.proxy.bodyLeftCol + 1);
|
|
44935
|
-
const totalBodyWidth = table.getColsWidth(table.
|
|
44936
|
-
const totalWidth = table.getColsWidth(table.
|
|
44967
|
+
const totalBodyWidth = table.getColsWidth(table.frozenColCount, table.frozenColCount + totalActualBodyColumnCount);
|
|
44968
|
+
const totalWidth = table.getColsWidth(table.frozenColCount, table.colCount - 1);
|
|
44937
44969
|
table.scenegraph.proxy.xLimitLeft = totalBodyWidth / 2;
|
|
44938
44970
|
table.scenegraph.proxy.xLimitRight = totalWidth - totalBodyWidth / 2;
|
|
44939
44971
|
}
|
|
@@ -44945,7 +44977,7 @@
|
|
|
44945
44977
|
x = prevCellGroup.attribute.x + table.getColWidth(colGroup._prev.col);
|
|
44946
44978
|
}
|
|
44947
44979
|
else {
|
|
44948
|
-
x = table.getColsWidth(table.
|
|
44980
|
+
x = table.getColsWidth(table.frozenColCount, colGroup.col - 1);
|
|
44949
44981
|
}
|
|
44950
44982
|
colGroup.setAttribute('x', x);
|
|
44951
44983
|
}
|
|
@@ -44956,7 +44988,7 @@
|
|
|
44956
44988
|
x = nextCellGroup.attribute.x - table.getColWidth(colGroup.col);
|
|
44957
44989
|
}
|
|
44958
44990
|
else {
|
|
44959
|
-
x = table.getColsWidth(table.
|
|
44991
|
+
x = table.getColsWidth(table.frozenColCount, colGroup.col - 1);
|
|
44960
44992
|
}
|
|
44961
44993
|
colGroup.setAttribute('x', x);
|
|
44962
44994
|
}
|
|
@@ -45659,7 +45691,6 @@
|
|
|
45659
45691
|
this.colEnd = endCol;
|
|
45660
45692
|
this.colUpdatePos = this.colEnd;
|
|
45661
45693
|
this.referenceCol = this.colStart + Math.floor((endCol - this.colStart) / 2);
|
|
45662
|
-
this.table.scenegraph.updateContainerAttrWidthAndX();
|
|
45663
45694
|
this.table.scenegraph.updateContainer();
|
|
45664
45695
|
this.table.scenegraph.updateBorderSizeAndPosition();
|
|
45665
45696
|
}
|
|
@@ -45858,7 +45889,6 @@
|
|
|
45858
45889
|
columnGroup.setAttribute('width', table.getColWidth(col));
|
|
45859
45890
|
}
|
|
45860
45891
|
}
|
|
45861
|
-
scene.updateContainerAttrWidthAndX();
|
|
45862
45892
|
scene.updateContainer();
|
|
45863
45893
|
for (let col = updateColStart; col <= updateColEnd; col++) {
|
|
45864
45894
|
const columnGroup = table.scenegraph.getColGroup(col);
|
|
@@ -46171,6 +46201,9 @@
|
|
|
46171
46201
|
function removeRow(row, scene) {
|
|
46172
46202
|
for (let col = 0; col < scene.table.colCount; col++) {
|
|
46173
46203
|
const colGroup = scene.getColGroup(col, false);
|
|
46204
|
+
if (!colGroup) {
|
|
46205
|
+
continue;
|
|
46206
|
+
}
|
|
46174
46207
|
let cellGroup;
|
|
46175
46208
|
colGroup.forEachChildren((cell) => {
|
|
46176
46209
|
if (cell.row === row) {
|
|
@@ -46204,6 +46237,9 @@
|
|
|
46204
46237
|
continue;
|
|
46205
46238
|
}
|
|
46206
46239
|
const colGroup = scene.getColGroup(col);
|
|
46240
|
+
if (!colGroup) {
|
|
46241
|
+
continue;
|
|
46242
|
+
}
|
|
46207
46243
|
if (colGroup.firstChild && row < colGroup.firstChild.row) {
|
|
46208
46244
|
colGroup.insertBefore(cellGroup, colGroup.firstChild);
|
|
46209
46245
|
colGroup.firstChild.row = colGroup.firstChild.row + 1;
|
|
@@ -46240,6 +46276,9 @@
|
|
|
46240
46276
|
for (let col = 0; col < scene.table.colCount; col++) {
|
|
46241
46277
|
const headerColGroup = scene.getColGroup(col, true);
|
|
46242
46278
|
const colGroup = scene.getColGroup(col, false);
|
|
46279
|
+
if (!headerColGroup || !colGroup) {
|
|
46280
|
+
continue;
|
|
46281
|
+
}
|
|
46243
46282
|
let rowIndex = headerColGroup.firstChild?.row;
|
|
46244
46283
|
headerColGroup.forEachChildren((cellGroup) => {
|
|
46245
46284
|
cellGroup.row = rowIndex;
|
|
@@ -46257,6 +46296,9 @@
|
|
|
46257
46296
|
for (let col = 0; col < scene.table.colCount; col++) {
|
|
46258
46297
|
const headerColGroup = scene.getColGroup(col, true);
|
|
46259
46298
|
const colGroup = scene.getColGroup(col, false);
|
|
46299
|
+
if (!headerColGroup || !colGroup) {
|
|
46300
|
+
continue;
|
|
46301
|
+
}
|
|
46260
46302
|
let rowIndex = headerColGroup.firstChild?.row;
|
|
46261
46303
|
let y = 0;
|
|
46262
46304
|
rowIndex = colGroup.firstChild?.row;
|
|
@@ -46446,7 +46488,6 @@
|
|
|
46446
46488
|
scene.proxy.colStart = scene.table.frozenColCount;
|
|
46447
46489
|
scene.bodyGroup.setAttribute('x', scene.rowHeaderGroup.attribute.width);
|
|
46448
46490
|
scene.colHeaderGroup.setAttribute('x', scene.cornerHeaderGroup.attribute.width);
|
|
46449
|
-
scene.updateContainerAttrWidthAndX();
|
|
46450
46491
|
scene.updateContainer();
|
|
46451
46492
|
scene.updateBorderSizeAndPosition();
|
|
46452
46493
|
if (!scene.isPivot && !scene.transpose) {
|
|
@@ -46895,8 +46936,7 @@
|
|
|
46895
46936
|
});
|
|
46896
46937
|
}
|
|
46897
46938
|
|
|
46898
|
-
function updateContainerChildrenX(containerGroup) {
|
|
46899
|
-
let x = 0;
|
|
46939
|
+
function updateContainerChildrenX(containerGroup, x) {
|
|
46900
46940
|
containerGroup.forEachChildrenSkipChild((column, index) => {
|
|
46901
46941
|
column.setAttribute('x', x);
|
|
46902
46942
|
x += column.attribute.width;
|
|
@@ -47541,7 +47581,6 @@
|
|
|
47541
47581
|
updateColWidth(col, detaX, skipUpdateContainer) {
|
|
47542
47582
|
updateColWidth(this, col, Math.round(detaX));
|
|
47543
47583
|
if (!skipUpdateContainer) {
|
|
47544
|
-
this.updateContainerAttrWidthAndX();
|
|
47545
47584
|
this.updateContainer();
|
|
47546
47585
|
}
|
|
47547
47586
|
}
|
|
@@ -47788,7 +47827,6 @@
|
|
|
47788
47827
|
this.component.setFrozenColumnShadow(this.table.frozenColCount - 1);
|
|
47789
47828
|
}
|
|
47790
47829
|
this.table.stateManeger.checkFrozen();
|
|
47791
|
-
this.updateContainerAttrWidthAndX();
|
|
47792
47830
|
this.updateContainer();
|
|
47793
47831
|
this.createFrameBorder();
|
|
47794
47832
|
this.updateBorderSizeAndPosition();
|
|
@@ -47956,15 +47994,26 @@
|
|
|
47956
47994
|
moveHeaderPosition(colSource, rowSource, colTarget, rowTarget, this.table);
|
|
47957
47995
|
}
|
|
47958
47996
|
updateContainerAttrWidthAndX() {
|
|
47959
|
-
const cornerX = updateContainerChildrenX(this.cornerHeaderGroup);
|
|
47960
|
-
const rowHeaderX = updateContainerChildrenX(this.rowHeaderGroup);
|
|
47961
|
-
const colHeaderX =
|
|
47962
|
-
|
|
47963
|
-
|
|
47964
|
-
|
|
47965
|
-
|
|
47966
|
-
|
|
47967
|
-
|
|
47997
|
+
const cornerX = updateContainerChildrenX(this.cornerHeaderGroup, 0);
|
|
47998
|
+
const rowHeaderX = updateContainerChildrenX(this.rowHeaderGroup, 0);
|
|
47999
|
+
const colHeaderX = this.colHeaderGroup.hasChildNodes()
|
|
48000
|
+
? updateContainerChildrenX(this.colHeaderGroup, this.colHeaderGroup.firstChild.col > 0
|
|
48001
|
+
? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.colHeaderGroup.firstChild.col - 1)
|
|
48002
|
+
: 0)
|
|
48003
|
+
: 0;
|
|
48004
|
+
const bodyX = this.bodyGroup.hasChildNodes()
|
|
48005
|
+
? updateContainerChildrenX(this.bodyGroup, this.bodyGroup.firstChild.col > 0
|
|
48006
|
+
? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.bodyGroup.firstChild.col - 1)
|
|
48007
|
+
: 0)
|
|
48008
|
+
: 0;
|
|
48009
|
+
const rightX = updateContainerChildrenX(this.rightFrozenGroup, 0);
|
|
48010
|
+
this.bottomFrozenGroup.hasChildNodes() &&
|
|
48011
|
+
updateContainerChildrenX(this.bottomFrozenGroup, this.bottomFrozenGroup.firstChild.col > 0
|
|
48012
|
+
? this.table.getColsWidth(this.table.frozenColCount ?? 0, this.bottomFrozenGroup.firstChild.col - 1)
|
|
48013
|
+
: 0);
|
|
48014
|
+
updateContainerChildrenX(this.leftBottomCornerGroup, 0);
|
|
48015
|
+
updateContainerChildrenX(this.rightTopCornerGroup, 0);
|
|
48016
|
+
updateContainerChildrenX(this.rightBottomCornerGroup, 0);
|
|
47968
48017
|
this.cornerHeaderGroup.setDeltaWidth(cornerX - this.cornerHeaderGroup.attribute.width);
|
|
47969
48018
|
this.leftBottomCornerGroup.setDeltaWidth(cornerX - this.leftBottomCornerGroup.attribute.width);
|
|
47970
48019
|
this.colHeaderGroup.setDeltaWidth(colHeaderX - this.colHeaderGroup.attribute.width);
|
|
@@ -47980,6 +48029,7 @@
|
|
|
47980
48029
|
this.bodyGroup.setAttribute('x', this.rowHeaderGroup.attribute.width);
|
|
47981
48030
|
}
|
|
47982
48031
|
updateContainer() {
|
|
48032
|
+
this.updateContainerAttrWidthAndX();
|
|
47983
48033
|
this.updateTableSize();
|
|
47984
48034
|
const oldHorizontalBarPos = this.table.stateManeger.scroll.horizontalBarPos;
|
|
47985
48035
|
const oldVerticalBarPos = this.table.stateManeger.scroll.verticalBarPos;
|
|
@@ -50238,9 +50288,44 @@
|
|
|
50238
50288
|
if (stateManeger.isResizeCol()) {
|
|
50239
50289
|
endResizeCol(table);
|
|
50240
50290
|
}
|
|
50291
|
+
else if (stateManeger.isMoveCol()) {
|
|
50292
|
+
table.stateManeger.endMoveCol();
|
|
50293
|
+
if (table.stateManeger.columnMove?.colSource !== -1 &&
|
|
50294
|
+
table.stateManeger.columnMove?.rowSource !== -1 &&
|
|
50295
|
+
table.stateManeger.columnMove?.colTarget !== -1 &&
|
|
50296
|
+
table.stateManeger.columnMove?.rowTarget !== -1) {
|
|
50297
|
+
if (table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION)) {
|
|
50298
|
+
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
|
|
50299
|
+
target: { col: table.stateManeger.columnMove.colTarget, row: table.stateManeger.columnMove.rowTarget },
|
|
50300
|
+
source: {
|
|
50301
|
+
col: table.stateManeger.columnMove.colSource,
|
|
50302
|
+
row: table.stateManeger.columnMove.rowSource
|
|
50303
|
+
}
|
|
50304
|
+
});
|
|
50305
|
+
}
|
|
50306
|
+
}
|
|
50307
|
+
}
|
|
50308
|
+
else if (stateManeger.isSelecting()) {
|
|
50309
|
+
table.stateManeger.endSelectCells();
|
|
50310
|
+
if (table.stateManeger.select?.ranges?.length) {
|
|
50311
|
+
const lastCol = table.stateManeger.select.ranges[table.stateManeger.select.ranges.length - 1].end.col;
|
|
50312
|
+
const lastRow = table.stateManeger.select.ranges[table.stateManeger.select.ranges.length - 1].end.row;
|
|
50313
|
+
if (table.hasListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END)) {
|
|
50314
|
+
const cellsEvent = {
|
|
50315
|
+
event: e.nativeEvent,
|
|
50316
|
+
cells: [],
|
|
50317
|
+
col: lastCol,
|
|
50318
|
+
row: lastRow,
|
|
50319
|
+
scaleRatio: table.canvas.getBoundingClientRect().width / table.canvas.offsetWidth,
|
|
50320
|
+
target: undefined
|
|
50321
|
+
};
|
|
50322
|
+
cellsEvent.cells = table.getSelectedCellInfos();
|
|
50323
|
+
table.fireListeners(TABLE_EVENT_TYPE.DRAG_SELECT_END, cellsEvent);
|
|
50324
|
+
}
|
|
50325
|
+
}
|
|
50326
|
+
}
|
|
50241
50327
|
stateManeger.updateInteractionState(InteractionState.default);
|
|
50242
50328
|
eventManeger.dealTableHover();
|
|
50243
|
-
eventManeger.dealTableSelect();
|
|
50244
50329
|
});
|
|
50245
50330
|
table.scenegraph.tableGroup.addEventListener('pointerdown', (e) => {
|
|
50246
50331
|
LastPointerXY = { x: e.x, y: e.y };
|
|
@@ -50319,8 +50404,8 @@
|
|
|
50319
50404
|
endResizeCol(table);
|
|
50320
50405
|
}
|
|
50321
50406
|
else if (stateManeger.isMoveCol()) {
|
|
50322
|
-
table.stateManeger.endMoveCol();
|
|
50323
50407
|
const eventArgsSet = getCellEventArgsSet(e);
|
|
50408
|
+
table.stateManeger.endMoveCol();
|
|
50324
50409
|
if (eventArgsSet.eventArgs && table.hasListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION)) {
|
|
50325
50410
|
table.fireListeners(TABLE_EVENT_TYPE.CHANGE_HEADER_POSITION, {
|
|
50326
50411
|
target: { col: eventArgsSet.eventArgs.col, row: eventArgsSet.eventArgs.row },
|
|
@@ -50417,6 +50502,7 @@
|
|
|
50417
50502
|
if (eventManeger.touchSetTimeout) {
|
|
50418
50503
|
clearTimeout(eventManeger.touchSetTimeout);
|
|
50419
50504
|
eventManeger.dealTableSelect(eventArgsSet);
|
|
50505
|
+
stateManeger.endSelectCells();
|
|
50420
50506
|
eventManeger.touchSetTimeout = undefined;
|
|
50421
50507
|
}
|
|
50422
50508
|
}
|
|
@@ -51014,7 +51100,7 @@
|
|
|
51014
51100
|
this.table.toggleHierarchyState(col, row);
|
|
51015
51101
|
}
|
|
51016
51102
|
});
|
|
51017
|
-
this.table.on(TABLE_EVENT_TYPE.
|
|
51103
|
+
this.table.on(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, () => {
|
|
51018
51104
|
stateManeger.hideMenu();
|
|
51019
51105
|
});
|
|
51020
51106
|
if (checkHaveTextStick(this.table)) {
|
|
@@ -51073,6 +51159,13 @@
|
|
|
51073
51159
|
if (eventArgs.target.name === 'checkbox') {
|
|
51074
51160
|
return false;
|
|
51075
51161
|
}
|
|
51162
|
+
const define = this.table.getBodyColumnDefine(eventArgs.col, eventArgs.row);
|
|
51163
|
+
if (this.table.isHeader(eventArgs.col, eventArgs.row) && define?.disableHeaderSelect) {
|
|
51164
|
+
return false;
|
|
51165
|
+
}
|
|
51166
|
+
else if (!this.table.isHeader(eventArgs.col, eventArgs.row) && define?.disableSelect) {
|
|
51167
|
+
return false;
|
|
51168
|
+
}
|
|
51076
51169
|
if (this.table.isPivotChart() &&
|
|
51077
51170
|
(eventArgsSet?.eventArgs?.target.name === 'axis-label' || eventArgsSet?.eventArgs?.target.type === 'chart')) {
|
|
51078
51171
|
this.table.stateManeger.updateSelectPos(-1, -1);
|
|
@@ -51649,7 +51742,7 @@
|
|
|
51649
51742
|
? table.internalProps.layoutMap.getPivotDimensionInfo(col, row)
|
|
51650
51743
|
: table.getHeaderField(col, row);
|
|
51651
51744
|
const highlight = table._dropDownMenuIsHighlight(col, row, dropDownIndex);
|
|
51652
|
-
table.fireListeners(TABLE_EVENT_TYPE.
|
|
51745
|
+
table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, {
|
|
51653
51746
|
col,
|
|
51654
51747
|
row,
|
|
51655
51748
|
field: field,
|
|
@@ -51677,7 +51770,7 @@
|
|
|
51677
51770
|
? table.internalProps.layoutMap.getPivotDimensionInfo(col, row)
|
|
51678
51771
|
: table.getHeaderField(col, row);
|
|
51679
51772
|
const highlight = table._dropDownMenuIsHighlight(col, row, dropDownIndex);
|
|
51680
|
-
table.fireListeners(TABLE_EVENT_TYPE.
|
|
51773
|
+
table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, {
|
|
51681
51774
|
col,
|
|
51682
51775
|
row,
|
|
51683
51776
|
field: field,
|
|
@@ -51790,7 +51883,7 @@
|
|
|
51790
51883
|
}
|
|
51791
51884
|
}
|
|
51792
51885
|
});
|
|
51793
|
-
table.fireListeners(TABLE_EVENT_TYPE.
|
|
51886
|
+
table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, {
|
|
51794
51887
|
col,
|
|
51795
51888
|
row,
|
|
51796
51889
|
field: field,
|
|
@@ -53024,7 +53117,7 @@
|
|
|
53024
53117
|
? table.internalProps.layoutMap.getPivotDimensionInfo(col, row)
|
|
53025
53118
|
: table.getHeaderField(col, row);
|
|
53026
53119
|
const highlight = table._dropDownMenuIsHighlight(col, row, dropDownIndex);
|
|
53027
|
-
table.fireListeners(TABLE_EVENT_TYPE.
|
|
53120
|
+
table.fireListeners(TABLE_EVENT_TYPE.DROPDOWN_MENU_CLICK, {
|
|
53028
53121
|
col,
|
|
53029
53122
|
row,
|
|
53030
53123
|
field: field,
|
|
@@ -53984,7 +54077,7 @@
|
|
|
53984
54077
|
return TABLE_EVENT_TYPE;
|
|
53985
54078
|
}
|
|
53986
54079
|
options;
|
|
53987
|
-
version = "0.13.2
|
|
54080
|
+
version = "0.13.2";
|
|
53988
54081
|
pagination;
|
|
53989
54082
|
id = `VTable${Date.now()}`;
|
|
53990
54083
|
headerStyleCache;
|
|
@@ -55797,6 +55890,9 @@
|
|
|
55797
55890
|
this.render();
|
|
55798
55891
|
}
|
|
55799
55892
|
getCopyValue() {
|
|
55893
|
+
if (!this.stateManeger.select?.ranges) {
|
|
55894
|
+
return null;
|
|
55895
|
+
}
|
|
55800
55896
|
const ranges = this.stateManeger.select.ranges;
|
|
55801
55897
|
let minCol = Math.min(ranges[0].start.col, ranges[0].end.col);
|
|
55802
55898
|
let maxCol = Math.max(ranges[0].start.col, ranges[0].end.col);
|
|
@@ -55892,7 +55988,13 @@
|
|
|
55892
55988
|
return copyValue;
|
|
55893
55989
|
}
|
|
55894
55990
|
getSelectedCellInfos() {
|
|
55991
|
+
if (!this.stateManeger.select?.ranges) {
|
|
55992
|
+
return null;
|
|
55993
|
+
}
|
|
55895
55994
|
const ranges = this.stateManeger.select.ranges;
|
|
55995
|
+
if (!ranges.length) {
|
|
55996
|
+
return [];
|
|
55997
|
+
}
|
|
55896
55998
|
let minCol = Math.min(ranges[0].start.col, ranges[0].end.col);
|
|
55897
55999
|
let maxCol = Math.max(ranges[0].start.col, ranges[0].end.col);
|
|
55898
56000
|
let minRow = Math.min(ranges[0].start.row, ranges[0].end.row);
|
|
@@ -56987,6 +57089,9 @@
|
|
|
56987
57089
|
return undefined;
|
|
56988
57090
|
}
|
|
56989
57091
|
canMoveHeaderPosition(source, target) {
|
|
57092
|
+
if (source.col < 0 || source.row < 0 || target.col < 0 || target.row < 0) {
|
|
57093
|
+
return false;
|
|
57094
|
+
}
|
|
56990
57095
|
const sourceCellRange = this.getCellRange(source.col, source.row);
|
|
56991
57096
|
if (this.isColumnHeader(source.col, source.row)) {
|
|
56992
57097
|
const sourceTopId = this.getParentCellId(source.col, sourceCellRange.start.row);
|
|
@@ -59341,6 +59446,9 @@
|
|
|
59341
59446
|
return undefined;
|
|
59342
59447
|
}
|
|
59343
59448
|
canMoveHeaderPosition(source, target) {
|
|
59449
|
+
if (source.col < 0 || source.row < 0 || target.col < 0 || target.row < 0) {
|
|
59450
|
+
return false;
|
|
59451
|
+
}
|
|
59344
59452
|
const sourceCellRange = this.getCellRange(source.col, source.row);
|
|
59345
59453
|
if (this.isColumnHeader(source.col, source.row)) {
|
|
59346
59454
|
const sourceTopId = this.getParentCellId(source.col, sourceCellRange.start.row);
|
|
@@ -62646,7 +62754,7 @@
|
|
|
62646
62754
|
collectValuesBy[indicatorDefine.indicatorKey] = {
|
|
62647
62755
|
by: rowKeys,
|
|
62648
62756
|
range: true,
|
|
62649
|
-
sumBy: indicatorDefine.chartSpec?.stack
|
|
62757
|
+
sumBy: indicatorDefine.chartSpec?.stack &&
|
|
62650
62758
|
columnKeys.concat(indicatorDefine.chartSpec?.xField)
|
|
62651
62759
|
};
|
|
62652
62760
|
if (indicatorDefine.chartSpec.series) {
|
|
@@ -62668,7 +62776,7 @@
|
|
|
62668
62776
|
collectValuesBy[yField] = {
|
|
62669
62777
|
by: rowKeys,
|
|
62670
62778
|
range: chartSeries.direction !== 'horizontal',
|
|
62671
|
-
sumBy: chartSeries.stack
|
|
62779
|
+
sumBy: chartSeries.stack && columnKeys.concat(chartSeries?.xField),
|
|
62672
62780
|
sortBy: chartSeries.direction === 'horizontal'
|
|
62673
62781
|
? chartSeries?.data?.fields?.[yField]?.domain ??
|
|
62674
62782
|
indicatorDefine.chartSpec?.data?.fields?.[yField]?.domain
|
|
@@ -62696,7 +62804,7 @@
|
|
|
62696
62804
|
collectValuesBy[yField] = {
|
|
62697
62805
|
by: rowKeys,
|
|
62698
62806
|
range: indicators[i].chartSpec.direction !== 'horizontal',
|
|
62699
|
-
sumBy: indicatorDefine.chartSpec.stack
|
|
62807
|
+
sumBy: indicatorDefine.chartSpec.stack &&
|
|
62700
62808
|
columnKeys.concat(indicatorDefine.chartSpec?.xField),
|
|
62701
62809
|
sortBy: indicatorDefine.chartSpec.direction === 'horizontal'
|
|
62702
62810
|
? indicatorDefine.chartSpec?.data?.fields?.[yField]?.domain
|
|
@@ -62713,7 +62821,7 @@
|
|
|
62713
62821
|
collectValuesBy[indicatorDefine.indicatorKey] = {
|
|
62714
62822
|
by: columnKeys,
|
|
62715
62823
|
range: true,
|
|
62716
|
-
sumBy: indicatorDefine.chartSpec?.stack
|
|
62824
|
+
sumBy: indicatorDefine.chartSpec?.stack &&
|
|
62717
62825
|
rowKeys.concat(indicatorDefine.chartSpec?.yField)
|
|
62718
62826
|
};
|
|
62719
62827
|
if (indicatorDefine.chartSpec.series) {
|
|
@@ -62735,7 +62843,7 @@
|
|
|
62735
62843
|
collectValuesBy[xField] = {
|
|
62736
62844
|
by: columnKeys,
|
|
62737
62845
|
range: chartSeries.direction === 'horizontal',
|
|
62738
|
-
sumBy: chartSeries.stack
|
|
62846
|
+
sumBy: chartSeries.stack && rowKeys.concat(chartSeries?.yField),
|
|
62739
62847
|
sortBy: chartSeries.direction !== 'horizontal'
|
|
62740
62848
|
? chartSeries?.data?.fields?.[xField]?.domain ??
|
|
62741
62849
|
indicatorDefine.chartSpec?.data?.fields?.[xField]?.domain
|
|
@@ -62763,7 +62871,7 @@
|
|
|
62763
62871
|
collectValuesBy[xField] = {
|
|
62764
62872
|
by: columnKeys,
|
|
62765
62873
|
range: indicators[i].chartSpec.direction === 'horizontal',
|
|
62766
|
-
sumBy: indicatorDefine.chartSpec.stack
|
|
62874
|
+
sumBy: indicatorDefine.chartSpec.stack &&
|
|
62767
62875
|
rowKeys.concat(indicatorDefine.chartSpec?.yField),
|
|
62768
62876
|
sortBy: indicatorDefine.chartSpec.direction !== 'horizontal'
|
|
62769
62877
|
? indicatorDefine.chartSpec?.data?.fields?.[xField]?.domain
|
|
@@ -63854,7 +63962,7 @@
|
|
|
63854
63962
|
return new Tag(params ? params.attribute : {});
|
|
63855
63963
|
}
|
|
63856
63964
|
|
|
63857
|
-
const version = "0.13.2
|
|
63965
|
+
const version = "0.13.2";
|
|
63858
63966
|
function getIcons() {
|
|
63859
63967
|
return get$1();
|
|
63860
63968
|
}
|