@hpcc-js/react 2.53.4 → 2.53.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 +13 -6
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +13 -6
- 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 +2 -2
- package/src/__package__.ts +2 -2
- package/src/icon.tsx +27 -16
- package/src/image.tsx +25 -0
- package/src/vertex3.tsx +1 -1
- package/types/__package__.d.ts +2 -2
- package/types/icon.d.ts +1 -0
- package/types/icon.d.ts.map +1 -1
- package/types/image.d.ts +11 -0
- package/types/image.d.ts.map +1 -0
- package/types-3.4/__package__.d.ts +2 -2
- package/types-3.4/icon.d.ts +1 -0
- package/types-3.4/image.d.ts +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/react",
|
|
3
|
-
"version": "2.53.
|
|
3
|
+
"version": "2.53.5",
|
|
4
4
|
"description": "hpcc-js - Viz React",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.es6",
|
|
@@ -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": "2704ebc35d1e391d2ac6a0e4962b66b3b8d488f8"
|
|
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.53.
|
|
3
|
-
export const BUILD_VERSION = "2.104.
|
|
2
|
+
export const PKG_VERSION = "2.53.5";
|
|
3
|
+
export const BUILD_VERSION = "2.104.19";
|
package/src/icon.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Palette } from "@hpcc-js/common";
|
|
2
2
|
import * as React from "@hpcc-js/preact-shim";
|
|
3
|
+
import { Image } from "./image";
|
|
3
4
|
import { ImageChar } from "./ImageChar";
|
|
4
5
|
import { Shape } from "./shape";
|
|
5
6
|
|
|
@@ -11,6 +12,7 @@ export interface Icon {
|
|
|
11
12
|
fill?: string;
|
|
12
13
|
stroke?: string;
|
|
13
14
|
strokeWidth?: number;
|
|
15
|
+
imageUrl?: string;
|
|
14
16
|
imageFontFamily?: string;
|
|
15
17
|
imageChar?: string;
|
|
16
18
|
imageCharFill?: string;
|
|
@@ -27,6 +29,7 @@ export const Icon: React.FunctionComponent<Icon> = ({
|
|
|
27
29
|
fill,
|
|
28
30
|
stroke,
|
|
29
31
|
strokeWidth = 0,
|
|
32
|
+
imageUrl = "",
|
|
30
33
|
imageFontFamily = "FontAwesome",
|
|
31
34
|
imageChar = "",
|
|
32
35
|
imageCharFill = Palette.textColor(fill),
|
|
@@ -47,15 +50,23 @@ export const Icon: React.FunctionComponent<Icon> = ({
|
|
|
47
50
|
shapeRendering={shapeRendering}
|
|
48
51
|
cornerRadius={cornerRadius}
|
|
49
52
|
/>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
{imageUrl ?
|
|
54
|
+
<Image
|
|
55
|
+
href={imageUrl}
|
|
56
|
+
x={xOffset}
|
|
57
|
+
y={yOffset}
|
|
58
|
+
height={height - padding}
|
|
59
|
+
></Image> :
|
|
60
|
+
<ImageChar
|
|
61
|
+
x={xOffset}
|
|
62
|
+
y={yOffset}
|
|
63
|
+
height={height - padding}
|
|
64
|
+
fontFamily={imageFontFamily}
|
|
65
|
+
char={imageChar}
|
|
66
|
+
fill={imageCharFill}
|
|
67
|
+
font-weight={400}
|
|
68
|
+
></ImageChar>
|
|
69
|
+
}
|
|
59
70
|
</>;
|
|
60
71
|
};
|
|
61
72
|
|
|
@@ -72,13 +83,13 @@ export const Icons: React.FunctionComponent<Icons> = ({
|
|
|
72
83
|
}) => {
|
|
73
84
|
const IconComponents = icons.map(cat => {
|
|
74
85
|
return <g
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
86
|
+
key={cat.id}
|
|
87
|
+
id={cat.id}
|
|
88
|
+
>
|
|
89
|
+
<Icon
|
|
90
|
+
{...cat}
|
|
91
|
+
/>
|
|
92
|
+
</g>;
|
|
82
93
|
});
|
|
83
94
|
return <>{IconComponents}</>;
|
|
84
95
|
};
|
package/src/image.tsx
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "@hpcc-js/preact-shim";
|
|
2
|
+
|
|
3
|
+
interface Image {
|
|
4
|
+
href: string;
|
|
5
|
+
x?: number;
|
|
6
|
+
y?: number;
|
|
7
|
+
height?: number;
|
|
8
|
+
yOffset?: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const Image: React.FunctionComponent<Image> = ({
|
|
12
|
+
href,
|
|
13
|
+
x,
|
|
14
|
+
y = 0,
|
|
15
|
+
height = 12
|
|
16
|
+
}) => {
|
|
17
|
+
|
|
18
|
+
return <image
|
|
19
|
+
href={href}
|
|
20
|
+
x={x - height / 2}
|
|
21
|
+
y={y - height / 2}
|
|
22
|
+
width={height}
|
|
23
|
+
height={height}
|
|
24
|
+
></image>;
|
|
25
|
+
};
|
package/src/vertex3.tsx
CHANGED
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.53.
|
|
3
|
-
export declare const BUILD_VERSION = "2.104.
|
|
2
|
+
export declare const PKG_VERSION = "2.53.5";
|
|
3
|
+
export declare const BUILD_VERSION = "2.104.19";
|
|
4
4
|
//# sourceMappingURL=__package__.d.ts.map
|
package/types/icon.d.ts
CHANGED
package/types/icon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../src/icon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../src/icon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAK9C,MAAM,WAAW,IAAI;IACjB,KAAK,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,GAAG,eAAe,GAAG,YAAY,GAAG,oBAAoB,CAAC;CACnF;AAED,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,iBAAiB,CAAC,IAAI,CA8C9C,CAAC;AAEF,MAAM,WAAW,MAAO,SAAQ,IAAI;IAChC,EAAE,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,KAAK;IAClB,KAAK,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAchD,CAAC"}
|
package/types/image.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "@hpcc-js/preact-shim";
|
|
2
|
+
interface Image {
|
|
3
|
+
href: string;
|
|
4
|
+
x?: number;
|
|
5
|
+
y?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
yOffset?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const Image: React.FunctionComponent<Image>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../src/image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAE9C,UAAU,KAAK;IACX,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAchD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const PKG_NAME = "@hpcc-js/react";
|
|
2
|
-
export declare const PKG_VERSION = "2.53.
|
|
3
|
-
export declare const BUILD_VERSION = "2.104.
|
|
2
|
+
export declare const PKG_VERSION = "2.53.5";
|
|
3
|
+
export declare const BUILD_VERSION = "2.104.19";
|
|
4
4
|
//# sourceMappingURL=__package__.d.ts.map
|
package/types-3.4/icon.d.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "@hpcc-js/preact-shim";
|
|
2
|
+
interface Image {
|
|
3
|
+
href: string;
|
|
4
|
+
x?: number;
|
|
5
|
+
y?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
yOffset?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const Image: React.FunctionComponent<Image>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=image.d.ts.map
|