@hpcc-js/react 2.49.2 → 2.49.5
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.es6.js +37 -32
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +37 -32
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +5 -5
- package/src/__package__.ts +2 -2
- package/src/edge.tsx +0 -1
- package/src/text.tsx +14 -10
- package/src/vertex.tsx +4 -2
- package/types/__package__.d.ts +2 -2
- package/types/edge.d.ts.map +1 -1
- package/types/text.d.ts.map +1 -1
- package/types/vertex.d.ts.map +1 -1
- package/types-3.4/__package__.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/react",
|
|
3
|
-
"version": "2.49.
|
|
3
|
+
"version": "2.49.5",
|
|
4
4
|
"description": "hpcc-js - Viz React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.es6",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"build": "npm run compile-es6 && npm run bundle",
|
|
34
34
|
"watch": "npm-run-all compile-es6 -p compile-es6-watch bundle-watch",
|
|
35
35
|
"stamp": "node ../../node_modules/@hpcc-js/bundle/src/stamp.js",
|
|
36
|
-
"lint": "eslint src
|
|
36
|
+
"lint": "eslint ./src",
|
|
37
37
|
"docs": "typedoc --options tdoptions.json .",
|
|
38
38
|
"update": "npx npm-check-updates -u -t minor"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@hpcc-js/common": "^2.
|
|
42
|
-
"@hpcc-js/preact-shim": "^2.
|
|
41
|
+
"@hpcc-js/common": "^2.68.1",
|
|
42
|
+
"@hpcc-js/preact-shim": "^2.15.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@hpcc-js/bundle": "^2.11.1",
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"url": "https://github.com/hpcc-systems/Visualization/issues"
|
|
57
57
|
},
|
|
58
58
|
"homepage": "https://github.com/hpcc-systems/Visualization",
|
|
59
|
-
"gitHead": "
|
|
59
|
+
"gitHead": "b7c5d9a853196b53078d665df4368629a1a87903"
|
|
60
60
|
}
|
package/src/__package__.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export const PKG_NAME = "@hpcc-js/react";
|
|
2
|
-
export const PKG_VERSION = "2.49.
|
|
3
|
-
export const BUILD_VERSION = "2.
|
|
2
|
+
export const PKG_VERSION = "2.49.5";
|
|
3
|
+
export const BUILD_VERSION = "2.103.1";
|
package/src/edge.tsx
CHANGED
|
@@ -37,6 +37,5 @@ export const Edge: React.FunctionComponent<Edge> = ({
|
|
|
37
37
|
stroke = "black",
|
|
38
38
|
strokeDasharray
|
|
39
39
|
}) => {
|
|
40
|
-
console.log("strokeDasharray", strokeDasharray);
|
|
41
40
|
return <path stroke={stroke} stroke-dasharray={strokeDasharray} d={line(calcArc(points, curveDepth))}></path>;
|
|
42
41
|
};
|
package/src/text.tsx
CHANGED
|
@@ -42,11 +42,13 @@ export const Text: React.FunctionComponent<Text> = ({
|
|
|
42
42
|
height = 12,
|
|
43
43
|
fontFamily = "Verdana",
|
|
44
44
|
fill = "black",
|
|
45
|
-
onSizeUpdate
|
|
45
|
+
onSizeUpdate
|
|
46
46
|
}) => {
|
|
47
47
|
const [totalWidth, onTotalWidthUpdate] = React.useState(0);
|
|
48
48
|
const [totalHeight, onTotalHeightUpdate] = React.useState(0);
|
|
49
|
-
React.useEffect(() =>
|
|
49
|
+
React.useEffect(() => {
|
|
50
|
+
onSizeUpdate && onSizeUpdate({ width: totalWidth, height: totalHeight });
|
|
51
|
+
}, [totalWidth, totalHeight, onSizeUpdate]);
|
|
50
52
|
|
|
51
53
|
const parts = text.split("\n");
|
|
52
54
|
const ts = Utility.textSize(parts, fontFamily, height);
|
|
@@ -92,11 +94,13 @@ export const TextBox: React.FunctionComponent<TextBox> = ({
|
|
|
92
94
|
textFill = "black",
|
|
93
95
|
strokeWidth = 1,
|
|
94
96
|
cornerRadius = 0,
|
|
95
|
-
onSizeUpdate
|
|
97
|
+
onSizeUpdate
|
|
96
98
|
}) => {
|
|
97
99
|
const [textWidth, onTextWidthUpdate] = React.useState(0);
|
|
98
100
|
const [textHeight, onTextHeightUpdate] = React.useState(0);
|
|
99
|
-
React.useEffect(() =>
|
|
101
|
+
React.useEffect(() => {
|
|
102
|
+
onSizeUpdate && onSizeUpdate({ width: textWidth, height: textHeight });
|
|
103
|
+
}, [textWidth, textHeight, onSizeUpdate]);
|
|
100
104
|
|
|
101
105
|
const w = textWidth + padding * 2 + strokeWidth;
|
|
102
106
|
const h = textHeight + padding * 2 + strokeWidth;
|
|
@@ -120,7 +124,7 @@ export const TextBox: React.FunctionComponent<TextBox> = ({
|
|
|
120
124
|
/>
|
|
121
125
|
</g>
|
|
122
126
|
</>
|
|
123
|
-
|
|
127
|
+
;
|
|
124
128
|
|
|
125
129
|
function onTextSizeUpdate(size) {
|
|
126
130
|
onTextWidthUpdate(size.width);
|
|
@@ -162,7 +166,7 @@ export const LabelledRect: React.FunctionComponent<LabelledRect> = ({
|
|
|
162
166
|
strokeWidth={strokeWidth}
|
|
163
167
|
cornerRadius={cornerRadius}
|
|
164
168
|
/>
|
|
165
|
-
<g transform={`translate(${-(width/2) + padding} ${-(height/2) + padding})`}>
|
|
169
|
+
<g transform={`translate(${-(width / 2) + padding} ${-(height / 2) + padding})`}>
|
|
166
170
|
<TextLine
|
|
167
171
|
text={text}
|
|
168
172
|
fontFamily={fontFamily}
|
|
@@ -173,7 +177,7 @@ export const LabelledRect: React.FunctionComponent<LabelledRect> = ({
|
|
|
173
177
|
/>
|
|
174
178
|
</g>
|
|
175
179
|
</>
|
|
176
|
-
|
|
180
|
+
;
|
|
177
181
|
};
|
|
178
182
|
|
|
179
183
|
export const IconLabelledRect: React.FunctionComponent<IconLabelledRect> = ({
|
|
@@ -201,7 +205,7 @@ export const IconLabelledRect: React.FunctionComponent<IconLabelledRect> = ({
|
|
|
201
205
|
strokeWidth={strokeWidth}
|
|
202
206
|
cornerRadius={cornerRadius}
|
|
203
207
|
/>
|
|
204
|
-
<g transform={`translate(${-(width/2) + padding} ${-(height/2) + padding})`}>
|
|
208
|
+
<g transform={`translate(${-(width / 2) + padding} ${-(height / 2) + padding})`}>
|
|
205
209
|
<Icon
|
|
206
210
|
shape="square"
|
|
207
211
|
imageFontFamily={iconFontFamily}
|
|
@@ -211,7 +215,7 @@ export const IconLabelledRect: React.FunctionComponent<IconLabelledRect> = ({
|
|
|
211
215
|
imageCharFill={textFill}
|
|
212
216
|
/>
|
|
213
217
|
</g>
|
|
214
|
-
<g transform={`translate(${-(width/2) + (padding * 2) + height} ${-(height/2) + padding})`}>
|
|
218
|
+
<g transform={`translate(${-(width / 2) + (padding * 2) + height} ${-(height / 2) + padding})`}>
|
|
215
219
|
<TextLine
|
|
216
220
|
text={text}
|
|
217
221
|
fontFamily={fontFamily}
|
|
@@ -222,5 +226,5 @@ export const IconLabelledRect: React.FunctionComponent<IconLabelledRect> = ({
|
|
|
222
226
|
/>
|
|
223
227
|
</g>
|
|
224
228
|
</>
|
|
225
|
-
|
|
229
|
+
;
|
|
226
230
|
};
|
package/src/vertex.tsx
CHANGED
|
@@ -55,12 +55,14 @@ export const Vertex: React.FunctionComponent<Vertex> = ({
|
|
|
55
55
|
textboxFill,
|
|
56
56
|
textboxStroke,
|
|
57
57
|
textFontFamily,
|
|
58
|
-
onSizeUpdate
|
|
58
|
+
onSizeUpdate,
|
|
59
59
|
showLabel = true
|
|
60
60
|
}) => {
|
|
61
61
|
const [textBoxWidth, onTextBoxWidthUpdate] = React.useState(0);
|
|
62
62
|
const [textBoxHeight, onTextBoxHeightUpdate] = React.useState(0);
|
|
63
|
-
React.useEffect(() =>
|
|
63
|
+
React.useEffect(() => {
|
|
64
|
+
onSizeUpdate && onSizeUpdate({ width: 0, height: 0 });
|
|
65
|
+
}, [textBoxWidth, textBoxHeight, onSizeUpdate]);
|
|
64
66
|
|
|
65
67
|
icon = {
|
|
66
68
|
imageChar: "fa-question",
|
package/types/__package__.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const PKG_NAME = "@hpcc-js/react";
|
|
2
|
-
export declare const PKG_VERSION = "2.49.
|
|
3
|
-
export declare const BUILD_VERSION = "2.
|
|
2
|
+
export declare const PKG_VERSION = "2.49.5";
|
|
3
|
+
export declare const BUILD_VERSION = "2.103.1";
|
|
4
4
|
//# sourceMappingURL=__package__.d.ts.map
|
package/types/edge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../src/edge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAyB9C,MAAM,WAAW,IAAI;IACjB,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../src/edge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAyB9C,MAAM,WAAW,IAAI;IACjB,MAAM,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAO9C,CAAC"}
|
package/types/text.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../src/text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAI9C,UAAU,QAAQ;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,iBAAiB,CAAC,QAAQ,CAetD,CAAC;AAEF,UAAU,IAAI;IACV,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACpE;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../src/text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAI9C,UAAU,QAAQ;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CA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@
|
|
|
1
1
|
export declare const PKG_NAME = "@hpcc-js/react";
|
|
2
|
-
export declare const PKG_VERSION = "2.49.
|
|
3
|
-
export declare const BUILD_VERSION = "2.
|
|
2
|
+
export declare const PKG_VERSION = "2.49.5";
|
|
3
|
+
export declare const BUILD_VERSION = "2.103.1";
|
|
4
4
|
//# sourceMappingURL=__package__.d.ts.map
|