@hpcc-js/react 2.49.2 → 2.49.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hpcc-js/react",
3
- "version": "2.49.2",
3
+ "version": "2.49.3",
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/**/*.ts",
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.66.1",
42
- "@hpcc-js/preact-shim": "^2.14.2"
41
+ "@hpcc-js/common": "^2.67.0",
42
+ "@hpcc-js/preact-shim": "^2.14.3"
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": "1a0ca31a7d2d50f83116d780353a8c894e1d4797"
59
+ "gitHead": "bd452a4559c9e5790881521a332964eef36153b7"
60
60
  }
@@ -1,3 +1,3 @@
1
1
  export const PKG_NAME = "@hpcc-js/react";
2
- export const PKG_VERSION = "2.49.2";
3
- export const BUILD_VERSION = "2.102.8";
2
+ export const PKG_VERSION = "2.49.3";
3
+ export const BUILD_VERSION = "2.102.11";
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 = (size: Utility.TextSize) => { }
45
+ onSizeUpdate
46
46
  }) => {
47
47
  const [totalWidth, onTotalWidthUpdate] = React.useState(0);
48
48
  const [totalHeight, onTotalHeightUpdate] = React.useState(0);
49
- React.useEffect(() => onSizeUpdate({ width: totalWidth, height: totalHeight }), [totalWidth, totalHeight]);
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 = (size: { width: number, height: number }) => { }
97
+ onSizeUpdate
96
98
  }) => {
97
99
  const [textWidth, onTextWidthUpdate] = React.useState(0);
98
100
  const [textHeight, onTextHeightUpdate] = React.useState(0);
99
- React.useEffect(() => onSizeUpdate({ width: textWidth, height: textHeight }), [textWidth, textHeight]);
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 = (size: { width: number, height: number }) => { },
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(() => onSizeUpdate({ width: 0, height: 0 }), [textBoxWidth, textBoxHeight]);
63
+ React.useEffect(() => {
64
+ onSizeUpdate && onSizeUpdate({ width: 0, height: 0 });
65
+ }, [textBoxWidth, textBoxHeight, onSizeUpdate]);
64
66
 
65
67
  icon = {
66
68
  imageChar: "fa-question",
@@ -1,4 +1,4 @@
1
1
  export declare const PKG_NAME = "@hpcc-js/react";
2
- export declare const PKG_VERSION = "2.49.2";
3
- export declare const BUILD_VERSION = "2.102.8";
2
+ export declare const PKG_VERSION = "2.49.3";
3
+ export declare const BUILD_VERSION = "2.102.11";
4
4
  //# sourceMappingURL=__package__.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"__package__.d.ts","sourceRoot":"","sources":["../src/__package__.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,mBAAmB,CAAC;AACzC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,aAAa,YAAY,CAAC"}
1
+ {"version":3,"file":"__package__.d.ts","sourceRoot":"","sources":["../src/__package__.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,mBAAmB,CAAC;AACzC,eAAO,MAAM,WAAW,WAAW,CAAC;AACpC,eAAO,MAAM,aAAa,aAAa,CAAC"}
@@ -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,CAQ9C,CAAC"}
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"}
@@ -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,MAA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C;IACjE,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,iBAAiB,CAAC,MAAM,CA+DlD,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export declare const PKG_NAME = "@hpcc-js/react";
2
- export declare const PKG_VERSION = "2.49.2";
3
- export declare const BUILD_VERSION = "2.102.8";
2
+ export declare const PKG_VERSION = "2.49.3";
3
+ export declare const BUILD_VERSION = "2.102.11";
4
4
  //# sourceMappingURL=__package__.d.ts.map