@visactor/react-vtable 1.10.6-alpha.0 → 1.10.6-alpha.1
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/react-vtable.js +30 -65
- package/dist/react-vtable.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 +2 -2
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -18,5 +18,5 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", {
|
|
19
19
|
value: !0
|
|
20
20
|
}), exports.version = void 0, __exportStar(require("./tables"), exports), __exportStar(require("./table-components"), exports),
|
|
21
|
-
__exportStar(require("./components"), exports), exports.version = "1.10.6-alpha.
|
|
21
|
+
__exportStar(require("./components"), exports), exports.version = "1.10.6-alpha.1";
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,qDAAmC;AACnC,+CAA6B;AAEhB,QAAA,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["export * from './tables';\nexport * from './table-components';\nexport * from './components';\n\nexport const version = \"1.10.6-alpha.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,qDAAmC;AACnC,+CAA6B;AAEhB,QAAA,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["export * from './tables';\nexport * from './table-components';\nexport * from './components';\n\nexport const version = \"1.10.6-alpha.1\";\n"]}
|
package/dist/react-vtable.js
CHANGED
|
@@ -2891,12 +2891,11 @@
|
|
|
2891
2891
|
for (let i = 0, len = paths.length; i < len; i++) if (currPath = paths[i], coordsStr = currPath.slice(1), commandChar = currPath[0], currCommandData = [commandChar], coordsStrArr = coordsStr.match(rePathCommand), null !== coordsStrArr) {
|
|
2892
2892
|
for (let i = 0, len = coordsStrArr.length; i < len; i++) coordStr = coordsStrArr[i], coordNumber = parseFloat(coordStr), Number.isNaN(coordNumber) || currCommandData.push(coordNumber);
|
|
2893
2893
|
if (standardCommandLen = commandLengths[commandChar], currCommandData.length - 1 > standardCommandLen) {
|
|
2894
|
-
let subCommand
|
|
2895
|
-
bestCommandChar = commandChar;
|
|
2894
|
+
let subCommand;
|
|
2896
2895
|
for (let i = 1, len = currCommandData.length; i < len; i += standardCommandLen) {
|
|
2897
|
-
subCommand = [
|
|
2896
|
+
subCommand = [commandChar];
|
|
2898
2897
|
for (let j = i, subLen = i + standardCommandLen; j < subLen; j++) subCommand.push(currCommandData[j]);
|
|
2899
|
-
result.push(subCommand)
|
|
2898
|
+
result.push(subCommand);
|
|
2900
2899
|
}
|
|
2901
2900
|
} else result.push(currCommandData);
|
|
2902
2901
|
} else result.push(currCommandData);
|
|
@@ -4084,7 +4083,6 @@
|
|
|
4084
4083
|
zIndex: 0,
|
|
4085
4084
|
layout: null,
|
|
4086
4085
|
boundsPadding: 0,
|
|
4087
|
-
fillStrokeOrder: 0,
|
|
4088
4086
|
renderStyle: "default",
|
|
4089
4087
|
pickMode: "accurate",
|
|
4090
4088
|
customPickShape: null,
|
|
@@ -4155,7 +4153,6 @@
|
|
|
4155
4153
|
});
|
|
4156
4154
|
const DefaultPathAttribute = Object.assign(Object.assign({}, DefaultAttribute), {
|
|
4157
4155
|
path: new CustomPath2D(),
|
|
4158
|
-
fillStrokeOrder: 1,
|
|
4159
4156
|
customPath: () => {
|
|
4160
4157
|
Logger.getInstance().warn("空函数");
|
|
4161
4158
|
}
|
|
@@ -5699,7 +5696,7 @@
|
|
|
5699
5696
|
}
|
|
5700
5697
|
static GetFile(url, type) {
|
|
5701
5698
|
let data = ResourceLoader.cache.get(url);
|
|
5702
|
-
return data ? "fail" === data.loadState ? Promise.reject() : "
|
|
5699
|
+
return data ? "init" === data.loadState || "fail" === data.loadState ? Promise.reject() : "loading" === data.loadState ? data.dataPromise.then(data => data.data) : Promise.resolve(data.data) : (data = {
|
|
5703
5700
|
type: type,
|
|
5704
5701
|
loadState: "init"
|
|
5705
5702
|
}, ResourceLoader.cache.set(url, data), "arrayBuffer" === type ? data.dataPromise = application.global.loadArrayBuffer(url) : "blob" === type ? data.dataPromise = application.global.loadBlob(url) : "json" === type && (data.dataPromise = application.global.loadJson(url)), data.dataPromise.then(data => data.data));
|
|
@@ -7913,9 +7910,8 @@
|
|
|
7913
7910
|
constructor() {
|
|
7914
7911
|
super(...arguments), this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
|
|
7915
7912
|
}
|
|
7916
|
-
drawShape(
|
|
7917
|
-
|
|
7918
|
-
image.renderFrame(context, x, y);
|
|
7913
|
+
drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
|
|
7914
|
+
return super.drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
|
|
7919
7915
|
}
|
|
7920
7916
|
}
|
|
7921
7917
|
const defaultImageRenderContribution = new DefaultImageRenderContribution();
|
|
@@ -7997,8 +7993,7 @@
|
|
|
7997
7993
|
x1: x1,
|
|
7998
7994
|
y1: y1,
|
|
7999
7995
|
x: originX = rectAttribute.x,
|
|
8000
|
-
y: originY = rectAttribute.y
|
|
8001
|
-
fillStrokeOrder = rectAttribute.fillStrokeOrder
|
|
7996
|
+
y: originY = rectAttribute.y
|
|
8002
7997
|
} = rect.attribute;
|
|
8003
7998
|
let {
|
|
8004
7999
|
width: width,
|
|
@@ -8017,14 +8012,7 @@
|
|
|
8017
8012
|
doFill: doFill,
|
|
8018
8013
|
doStroke: doStroke
|
|
8019
8014
|
};
|
|
8020
|
-
context.setShadowBlendStyle && context.setShadowBlendStyle(rect, rect.attribute, rectAttribute), this.beforeRenderStep(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb, doFillOrStroke);
|
|
8021
|
-
const _runFill = () => {
|
|
8022
|
-
doFillOrStroke.doFill && (fillCb ? fillCb(context, rect.attribute, rectAttribute) : fVisible && (context.setCommonStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute), context.fill()));
|
|
8023
|
-
},
|
|
8024
|
-
_runStroke = () => {
|
|
8025
|
-
doFillOrStroke.doStroke && (strokeCb ? strokeCb(context, rect.attribute, rectAttribute) : sVisible && (context.setStrokeStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute), context.stroke()));
|
|
8026
|
-
};
|
|
8027
|
-
fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke()), this.afterRenderStep(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
|
|
8015
|
+
context.setShadowBlendStyle && context.setShadowBlendStyle(rect, rect.attribute, rectAttribute), this.beforeRenderStep(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb, doFillOrStroke), doFillOrStroke.doFill && (fillCb ? fillCb(context, rect.attribute, rectAttribute) : fVisible && (context.setCommonStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute), context.fill())), doFillOrStroke.doStroke && (strokeCb ? strokeCb(context, rect.attribute, rectAttribute) : sVisible && (context.setStrokeStyle(rect, rect.attribute, originX - x, originY - y, rectAttribute), context.stroke())), this.afterRenderStep(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
|
|
8028
8016
|
}
|
|
8029
8017
|
draw(rect, renderService, drawContext, params) {
|
|
8030
8018
|
const rectAttribute = getTheme(rect, null == params ? void 0 : params.theme).rect;
|
|
@@ -8060,8 +8048,7 @@
|
|
|
8060
8048
|
x: originX = symbolAttribute.x,
|
|
8061
8049
|
y: originY = symbolAttribute.y,
|
|
8062
8050
|
scaleX = symbolAttribute.scaleX,
|
|
8063
|
-
scaleY = symbolAttribute.scaleY
|
|
8064
|
-
fillStrokeOrder = symbolAttribute.fillStrokeOrder
|
|
8051
|
+
scaleY = symbolAttribute.scaleY
|
|
8065
8052
|
} = symbol.attribute,
|
|
8066
8053
|
data = this.valid(symbol, symbolAttribute, fillCb, strokeCb);
|
|
8067
8054
|
if (!data) return;
|
|
@@ -8084,27 +8071,14 @@
|
|
|
8084
8071
|
const obj = Object.assign({}, a);
|
|
8085
8072
|
obj.fill = null !== (_a = a.fill) && void 0 !== _a ? _a : symbol.attribute.fill, obj.opacity = null !== (_b = a.opacity) && void 0 !== _b ? _b : symbol.attribute.opacity, obj.fillOpacity = symbol.attribute.fillOpacity, obj.stroke = null !== (_c = a.stroke) && void 0 !== _c ? _c : symbol.attribute.stroke, a = obj;
|
|
8086
8073
|
}
|
|
8087
|
-
|
|
8088
|
-
a.fill && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : (context.setCommonStyle(symbol, a, originX - x, originY - y, symbolAttribute), context.fill()));
|
|
8089
|
-
},
|
|
8090
|
-
_runStroke = () => {
|
|
8091
|
-
a.stroke && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : (context.setStrokeStyle(symbol, a, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute), context.stroke()));
|
|
8092
|
-
};
|
|
8093
|
-
fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke());
|
|
8074
|
+
a.fill && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : (context.setCommonStyle(symbol, a, originX - x, originY - y, symbolAttribute), context.fill())), a.stroke && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : (context.setStrokeStyle(symbol, a, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute), context.stroke()));
|
|
8094
8075
|
};
|
|
8095
8076
|
if (keepDirIn3d && context.camera && context.project) {
|
|
8096
8077
|
const p = context.project(x, y, z),
|
|
8097
8078
|
camera = context.camera;
|
|
8098
8079
|
context.camera = null, !1 === parsedPath.draw(context, isArray$1(size) ? [size[0] * scaleX, size[1] * scaleY] : size * scaleX, p.x, p.y, void 0, callback) && context.closePath(), context.camera = camera;
|
|
8099
8080
|
} else !1 === parsedPath.draw(context, size, x, y, z, callback) && context.closePath();
|
|
8100
|
-
context.setShadowBlendStyle && context.setShadowBlendStyle(symbol, symbol.attribute, symbolAttribute), this.beforeRenderStep(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, drawContext, fillCb, strokeCb);
|
|
8101
|
-
const _runFill = () => {
|
|
8102
|
-
doFill && !parsedPath.isSvg && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : fVisible && (context.setCommonStyle(symbol, symbol.attribute, originX - x, originY - y, symbolAttribute), context.fill()));
|
|
8103
|
-
},
|
|
8104
|
-
_runStroke = () => {
|
|
8105
|
-
doStroke && !parsedPath.isSvg && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : sVisible && (context.setStrokeStyle(symbol, symbol.attribute, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute), context.stroke()));
|
|
8106
|
-
};
|
|
8107
|
-
fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke()), this.afterRenderStep(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, drawContext, fillCb, strokeCb);
|
|
8081
|
+
context.setShadowBlendStyle && context.setShadowBlendStyle(symbol, symbol.attribute, symbolAttribute), this.beforeRenderStep(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, drawContext, fillCb, strokeCb), doFill && !parsedPath.isSvg && (fillCb ? fillCb(context, symbol.attribute, symbolAttribute) : fVisible && (context.setCommonStyle(symbol, symbol.attribute, originX - x, originY - y, symbolAttribute), context.fill())), doStroke && !parsedPath.isSvg && (strokeCb ? strokeCb(context, symbol.attribute, symbolAttribute) : sVisible && (context.setStrokeStyle(symbol, symbol.attribute, (originX - x) / scaleX, (originY - y) / scaleY, symbolAttribute), context.stroke())), this.afterRenderStep(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, drawContext, fillCb, strokeCb);
|
|
8108
8082
|
}
|
|
8109
8083
|
draw(symbol, renderService, drawContext, params) {
|
|
8110
8084
|
const symbolAttribute = getTheme(symbol, null == params ? void 0 : params.theme).symbol;
|
|
@@ -8428,7 +8402,6 @@
|
|
|
8428
8402
|
x: originX = imageAttribute.x,
|
|
8429
8403
|
y: originY = imageAttribute.y,
|
|
8430
8404
|
cornerRadius = imageAttribute.cornerRadius,
|
|
8431
|
-
fillStrokeOrder = imageAttribute.fillStrokeOrder,
|
|
8432
8405
|
image: url
|
|
8433
8406
|
} = image.attribute,
|
|
8434
8407
|
data = this.valid(image, imageAttribute, fillCb);
|
|
@@ -8439,37 +8412,29 @@
|
|
|
8439
8412
|
doFill: doFill,
|
|
8440
8413
|
doStroke: doStroke
|
|
8441
8414
|
} = data;
|
|
8442
|
-
context.setShadowBlendStyle && context.setShadowBlendStyle(image, imageAttribute), this.beforeRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
}
|
|
8457
|
-
},
|
|
8458
|
-
_runStroke = () => {
|
|
8459
|
-
doStroke && (strokeCb ? strokeCb(context, image.attribute, imageAttribute) : sVisible && (context.setStrokeStyle(image, image.attribute, originX - x, originY - y, imageAttribute), context.stroke()));
|
|
8460
|
-
};
|
|
8461
|
-
fillStrokeOrder ? (_runStroke(), _runFill()) : (_runFill(), _runStroke()), this.afterRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
|
|
8415
|
+
if (context.setShadowBlendStyle && context.setShadowBlendStyle(image, imageAttribute), this.beforeRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb), doFill) if (fillCb) fillCb(context, image.attribute, imageAttribute);else if (fVisible) {
|
|
8416
|
+
if (!url || !image.resources) return;
|
|
8417
|
+
const res = image.resources.get(url);
|
|
8418
|
+
if ("success" !== res.state) return;
|
|
8419
|
+
let needRestore = !1;
|
|
8420
|
+
0 === cornerRadius || isArray$1(cornerRadius) && cornerRadius.every(num => 0 === num) || (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius), context.save(), context.clip(), needRestore = !0), context.setCommonStyle(image, image.attribute, x, y, imageAttribute);
|
|
8421
|
+
let repeat = 0;
|
|
8422
|
+
if ("repeat" === repeatX && (repeat |= 1), "repeat" === repeatY && (repeat |= 2), repeat) {
|
|
8423
|
+
const pattern = context.createPattern(res.data, repeatStr[repeat]);
|
|
8424
|
+
context.fillStyle = pattern, context.translate(x, y, !0), context.fillRect(0, 0, width, height), context.translate(-x, -y, !0);
|
|
8425
|
+
} else context.drawImage(res.data, x, y, width, height);
|
|
8426
|
+
needRestore && context.restore();
|
|
8427
|
+
}
|
|
8428
|
+
doStroke && (strokeCb ? strokeCb(context, image.attribute, imageAttribute) : sVisible && (context.setStrokeStyle(image, image.attribute, originX - x, originY - y, imageAttribute), context.stroke())), this.afterRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
|
|
8462
8429
|
}
|
|
8463
8430
|
draw(image, renderService, drawContext) {
|
|
8464
8431
|
const {
|
|
8465
8432
|
image: url
|
|
8466
8433
|
} = image.attribute;
|
|
8467
|
-
if (!image.
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
if ("success" !== res.state) return;
|
|
8472
|
-
}
|
|
8434
|
+
if (!url || !image.resources) return;
|
|
8435
|
+
const res = image.resources.get(url);
|
|
8436
|
+
if ("loading" === res.state && isString$1(url)) return void ResourceLoader.improveImageLoading(url);
|
|
8437
|
+
if ("success" !== res.state) return;
|
|
8473
8438
|
const {
|
|
8474
8439
|
context: context
|
|
8475
8440
|
} = renderService.drawParams;
|
|
@@ -19573,7 +19538,7 @@
|
|
|
19573
19538
|
const Checkbox = React.forwardRef(CheckboxComponent);
|
|
19574
19539
|
Checkbox.displayName = 'Checkbox';
|
|
19575
19540
|
|
|
19576
|
-
const version = "1.10.6-alpha.
|
|
19541
|
+
const version = "1.10.6-alpha.1";
|
|
19577
19542
|
|
|
19578
19543
|
Object.defineProperty(exports, 'register', {
|
|
19579
19544
|
enumerable: true,
|