@knotx/plugins-base-render 0.2.6 → 0.2.8
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/dist/index.cjs +4 -7
- package/dist/index.js +4 -7
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
|
@@ -261,13 +261,10 @@ __publicField(_BaseRender, "DEFAULT_EDGE_WRAPPER", ({
|
|
|
261
261
|
}) => {
|
|
262
262
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
263
263
|
const edge = useEdge(id);
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
const source = useNode(edge.source);
|
|
269
|
-
const target = useNode(edge.target);
|
|
270
|
-
if (!source || !target) {
|
|
264
|
+
const EdgeRenderer = getEdgeRenderer(edge == null ? void 0 : edge.type);
|
|
265
|
+
const source = useNode((edge == null ? void 0 : edge.source) || "");
|
|
266
|
+
const target = useNode((edge == null ? void 0 : edge.target) || "");
|
|
267
|
+
if (!edge || !source || !target) {
|
|
271
268
|
return null;
|
|
272
269
|
}
|
|
273
270
|
const sourceX = ((_b = (_a2 = source.position) == null ? void 0 : _a2.x) != null ? _b : 0) + ((_d = (_c = source.measured) == null ? void 0 : _c.width) != null ? _d : 0);
|
package/dist/index.js
CHANGED
|
@@ -259,13 +259,10 @@ __publicField(_BaseRender, "DEFAULT_EDGE_WRAPPER", ({
|
|
|
259
259
|
}) => {
|
|
260
260
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
|
261
261
|
const edge = useEdge(id);
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
const source = useNode(edge.source);
|
|
267
|
-
const target = useNode(edge.target);
|
|
268
|
-
if (!source || !target) {
|
|
262
|
+
const EdgeRenderer = getEdgeRenderer(edge == null ? void 0 : edge.type);
|
|
263
|
+
const source = useNode((edge == null ? void 0 : edge.source) || "");
|
|
264
|
+
const target = useNode((edge == null ? void 0 : edge.target) || "");
|
|
265
|
+
if (!edge || !source || !target) {
|
|
269
266
|
return null;
|
|
270
267
|
}
|
|
271
268
|
const sourceX = ((_b = (_a2 = source.position) == null ? void 0 : _a2.x) != null ? _b : 0) + ((_d = (_c = source.measured) == null ? void 0 : _c.width) != null ? _d : 0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knotx/plugins-base-render",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Base Render Plugin for Knotx",
|
|
5
5
|
"author": "boenfu",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@knotx/jsx": "0.2.
|
|
31
|
+
"@knotx/jsx": "0.2.7"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"rxjs": "^7.8.1",
|
|
35
|
-
"@knotx/core": "0.2.
|
|
36
|
-
"@knotx/decorators": "0.2.
|
|
37
|
-
"@knotx/render": "0.2.
|
|
35
|
+
"@knotx/core": "0.2.7",
|
|
36
|
+
"@knotx/decorators": "0.2.7",
|
|
37
|
+
"@knotx/render": "0.2.7"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@knotx/build-config": "0.2.
|
|
41
|
-
"@knotx/eslint-config": "0.2.
|
|
42
|
-
"@knotx/jsx": "0.2.
|
|
43
|
-
"@knotx/typescript-config": "0.2.
|
|
40
|
+
"@knotx/build-config": "0.2.7",
|
|
41
|
+
"@knotx/eslint-config": "0.2.7",
|
|
42
|
+
"@knotx/jsx": "0.2.7",
|
|
43
|
+
"@knotx/typescript-config": "0.2.7"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "unbuild",
|