impaktapps-design 0.2.1 → 0.2.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.
|
@@ -35853,14 +35853,11 @@ var ReactSpeedometer = /* @__PURE__ */ getDefaultExportFromCjs(dist$1);
|
|
|
35853
35853
|
const SpeedoMeter = ({
|
|
35854
35854
|
value
|
|
35855
35855
|
}) => {
|
|
35856
|
-
var _a2, _b2, _c2, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n2, _o, _p, _q;
|
|
35857
|
-
const [speedoValue, setspeedoValue] = useState(value.main.data);
|
|
35858
|
-
useEffect(() => {
|
|
35859
|
-
setspeedoValue(value.main.data);
|
|
35860
|
-
}, [value.main.data]);
|
|
35856
|
+
var _a2, _b2, _c2, _d, _e2, _f, _g, _h, _i, _j, _k, _l, _m, _n2, _o, _p, _q, _r, _s, _t2, _u, _v, _w;
|
|
35861
35857
|
return /* @__PURE__ */ jsxs("div", {
|
|
35862
35858
|
style: {
|
|
35863
|
-
...(_a2 = value == null ? void 0 : value.style) == null ? void 0 : _a2.containerStyle
|
|
35859
|
+
...(_a2 = value == null ? void 0 : value.style) == null ? void 0 : _a2.containerStyle,
|
|
35860
|
+
overflow: "scroll"
|
|
35864
35861
|
},
|
|
35865
35862
|
children: [((_b2 = value == null ? void 0 : value.main) == null ? void 0 : _b2.header) && /* @__PURE__ */ jsx("div", {
|
|
35866
35863
|
style: {
|
|
@@ -35875,29 +35872,31 @@ const SpeedoMeter = ({
|
|
|
35875
35872
|
}), /* @__PURE__ */ jsx("div", {
|
|
35876
35873
|
style: {
|
|
35877
35874
|
width: "100%",
|
|
35875
|
+
minWidth: 500,
|
|
35878
35876
|
display: "flex",
|
|
35879
|
-
justifyContent: "center"
|
|
35877
|
+
justifyContent: "center",
|
|
35878
|
+
overflow: "scroll"
|
|
35880
35879
|
},
|
|
35881
35880
|
children: /* @__PURE__ */ jsx(
|
|
35882
35881
|
ReactSpeedometer,
|
|
35883
35882
|
{
|
|
35884
35883
|
segmentColors: (_d = value == null ? void 0 : value.style) == null ? void 0 : _d.segmentColors,
|
|
35885
|
-
maxValue: (
|
|
35886
|
-
width: ((
|
|
35887
|
-
needleHeightRatio: ((
|
|
35888
|
-
currentValueText: (
|
|
35889
|
-
customSegmentLabels: (
|
|
35890
|
-
ringWidth: ((
|
|
35891
|
-
needleTransitionDuration: ((
|
|
35892
|
-
height: (
|
|
35893
|
-
needleTransition: ((
|
|
35894
|
-
value: (
|
|
35895
|
-
needleColor: ((
|
|
35896
|
-
minValue: (
|
|
35897
|
-
startColor: ((
|
|
35898
|
-
segments: ((
|
|
35899
|
-
endColor: ((
|
|
35900
|
-
textColor: ((
|
|
35884
|
+
maxValue: ((_f = (_e2 = value == null ? void 0 : value.main) == null ? void 0 : _e2.data) == null ? void 0 : _f.maxValue) || 500,
|
|
35885
|
+
width: ((_g = value == null ? void 0 : value.style) == null ? void 0 : _g.width) || 450,
|
|
35886
|
+
needleHeightRatio: ((_h = value == null ? void 0 : value.style) == null ? void 0 : _h.needleHeightRatio) || 0.7,
|
|
35887
|
+
currentValueText: (_i = value == null ? void 0 : value.main) == null ? void 0 : _i.currentValueText,
|
|
35888
|
+
customSegmentLabels: (_j = value == null ? void 0 : value.main) == null ? void 0 : _j.customSegmentLabel,
|
|
35889
|
+
ringWidth: ((_k = value == null ? void 0 : value.style) == null ? void 0 : _k.ringWidth) || 37,
|
|
35890
|
+
needleTransitionDuration: ((_l = value == null ? void 0 : value.style) == null ? void 0 : _l.needleTransitionDuration) || 5333,
|
|
35891
|
+
height: (_m = value == null ? void 0 : value.style) == null ? void 0 : _m.height,
|
|
35892
|
+
needleTransition: ((_n2 = value == null ? void 0 : value.style) == null ? void 0 : _n2.needleTransition) || "easeElastic",
|
|
35893
|
+
value: ((_p = (_o = value == null ? void 0 : value.main) == null ? void 0 : _o.data) == null ? void 0 : _p.value) || 473,
|
|
35894
|
+
needleColor: ((_q = value == null ? void 0 : value.style) == null ? void 0 : _q.needleColor) || "red",
|
|
35895
|
+
minValue: ((_s = (_r = value == null ? void 0 : value.main) == null ? void 0 : _r.data) == null ? void 0 : _s.minValue) || 0,
|
|
35896
|
+
startColor: ((_t2 = value == null ? void 0 : value.style) == null ? void 0 : _t2.startColor) || "red",
|
|
35897
|
+
segments: ((_u = value == null ? void 0 : value.main) == null ? void 0 : _u.segments) || 5,
|
|
35898
|
+
endColor: ((_v = value == null ? void 0 : value.style) == null ? void 0 : _v.endColor) || "green",
|
|
35899
|
+
textColor: ((_w = value == null ? void 0 : value.style) == null ? void 0 : _w.textColor) || "black"
|
|
35901
35900
|
}
|
|
35902
35901
|
)
|
|
35903
35902
|
})]
|
package/package.json
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react";
|
|
2
2
|
import ReactSpeedometer from "react-d3-speedometer";
|
|
3
3
|
|
|
4
4
|
const SpeedoMeter = ({ value }: any) => {
|
|
5
|
-
const [speedoValue, setspeedoValue] = useState(value.main.data);
|
|
6
|
-
useEffect(()=>{
|
|
7
|
-
setspeedoValue(value.main.data)
|
|
8
|
-
},[value.main.data])
|
|
9
5
|
return (
|
|
10
|
-
<div style={{ ...value?.style?.containerStyle }}>
|
|
6
|
+
<div style={{ ...value?.style?.containerStyle,overflow:"scroll" }}>
|
|
11
7
|
{value?.main?.header && (
|
|
12
8
|
<div
|
|
13
9
|
style={{
|
|
@@ -22,12 +18,12 @@ useEffect(()=>{
|
|
|
22
18
|
{value.main.header}
|
|
23
19
|
</div>
|
|
24
20
|
)}
|
|
25
|
-
<div style={{ width:
|
|
21
|
+
<div style={{ width:"100%",minWidth:500,display: "flex", justifyContent: "center",overflow:"scroll" }}>
|
|
26
22
|
<ReactSpeedometer
|
|
27
23
|
// needleTransition=''
|
|
28
24
|
segmentColors={value?.style?.segmentColors}
|
|
29
|
-
maxValue={
|
|
30
|
-
width={value?.style?.width ||
|
|
25
|
+
maxValue={value?.main?.data?.maxValue || 500}
|
|
26
|
+
width={value?.style?.width || 450}
|
|
31
27
|
needleHeightRatio={value?.style?.needleHeightRatio || 0.7}
|
|
32
28
|
currentValueText={value?.main?.currentValueText}
|
|
33
29
|
customSegmentLabels={value?.main?.customSegmentLabel}
|
|
@@ -35,11 +31,12 @@ useEffect(()=>{
|
|
|
35
31
|
needleTransitionDuration={
|
|
36
32
|
value?.style?.needleTransitionDuration || 5333
|
|
37
33
|
}
|
|
38
|
-
|
|
34
|
+
// fluidWidth={true}
|
|
35
|
+
height={value?.style?.height}
|
|
39
36
|
needleTransition={value?.style?.needleTransition || "easeElastic"}
|
|
40
|
-
value={
|
|
37
|
+
value={value?.main?.data?.value || 473}
|
|
41
38
|
needleColor={value?.style?.needleColor || "red"}
|
|
42
|
-
minValue={
|
|
39
|
+
minValue={value?.main?.data?.minValue || 0}
|
|
43
40
|
startColor={value?.style?.startColor || "red"}
|
|
44
41
|
segments={value?.main?.segments || 5}
|
|
45
42
|
endColor={value?.style?.endColor || "green"}
|