@selfdecode/sd-component-library 4.0.140 → 4.0.141
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/lib/core/functions.d.ts +1 -1
- package/lib/sd-component-library100.js +2 -2
- package/lib/sd-component-library101.js +3 -3
- package/lib/sd-component-library102.js +2 -2
- package/lib/sd-component-library106.js +2 -2
- package/lib/sd-component-library112.js +1 -1
- package/lib/sd-component-library117.js +1 -1
- package/lib/sd-component-library118.js +2 -2
- package/lib/sd-component-library120.js +1 -1
- package/lib/sd-component-library121.js +1 -1
- package/lib/sd-component-library126.js +2 -2
- package/lib/sd-component-library127.js +2 -2
- package/lib/sd-component-library129.js +1 -1
- package/lib/sd-component-library133.js +3 -3
- package/lib/sd-component-library134.js +1 -1
- package/lib/sd-component-library136.js +2 -2
- package/lib/sd-component-library16.js +1 -1
- package/lib/sd-component-library167.js +1 -1
- package/lib/sd-component-library168.js +1 -1
- package/lib/sd-component-library171.js +1 -1
- package/lib/sd-component-library172.js +4 -4
- package/lib/sd-component-library202.js +1 -1
- package/lib/sd-component-library203.js +1 -1
- package/lib/sd-component-library205.js +18 -3
- package/lib/sd-component-library205.js.map +1 -1
- package/lib/sd-component-library206.js +63 -17
- package/lib/sd-component-library206.js.map +1 -1
- package/lib/sd-component-library207.js +22 -20
- package/lib/sd-component-library207.js.map +1 -1
- package/lib/sd-component-library208.js +21 -3
- package/lib/sd-component-library208.js.map +1 -1
- package/lib/sd-component-library209.js +1 -1
- package/lib/sd-component-library209.js.map +1 -1
- package/lib/sd-component-library210.js +3 -64
- package/lib/sd-component-library210.js.map +1 -1
- package/lib/sd-component-library211.js +37 -20
- package/lib/sd-component-library211.js.map +1 -1
- package/lib/sd-component-library212.js +128 -56
- package/lib/sd-component-library212.js.map +1 -1
- package/lib/sd-component-library213.js +13 -40
- package/lib/sd-component-library213.js.map +1 -1
- package/lib/sd-component-library214.js +13 -128
- package/lib/sd-component-library214.js.map +1 -1
- package/lib/sd-component-library215.js +3 -13
- package/lib/sd-component-library215.js.map +1 -1
- package/lib/sd-component-library216.js +2 -2
- package/lib/sd-component-library216.js.map +1 -1
- package/lib/sd-component-library217.js +3 -52
- package/lib/sd-component-library217.js.map +1 -1
- package/lib/sd-component-library218.js +52 -14
- package/lib/sd-component-library218.js.map +1 -1
- package/lib/sd-component-library219.js +65 -3
- package/lib/sd-component-library219.js.map +1 -1
- package/lib/sd-component-library220.js +2 -2
- package/lib/sd-component-library220.js.map +1 -1
- package/lib/sd-component-library222.js +13 -61
- package/lib/sd-component-library222.js.map +1 -1
- package/lib/sd-component-library223.js +26 -3
- package/lib/sd-component-library223.js.map +1 -1
- package/lib/sd-component-library224.js +56 -16
- package/lib/sd-component-library224.js.map +1 -1
- package/lib/sd-component-library225.js +3 -3
- package/lib/sd-component-library225.js.map +1 -1
- package/lib/sd-component-library226.js +3 -31
- package/lib/sd-component-library226.js.map +1 -1
- package/lib/sd-component-library227.js +3 -19
- package/lib/sd-component-library227.js.map +1 -1
- package/lib/sd-component-library228.js +31 -20
- package/lib/sd-component-library228.js.map +1 -1
- package/lib/sd-component-library229.js +19 -28
- package/lib/sd-component-library229.js.map +1 -1
- package/lib/sd-component-library230.js +19 -32
- package/lib/sd-component-library230.js.map +1 -1
- package/lib/sd-component-library231.js +28 -3
- package/lib/sd-component-library231.js.map +1 -1
- package/lib/sd-component-library232.js +32 -128
- package/lib/sd-component-library232.js.map +1 -1
- package/lib/sd-component-library233.js +129 -43
- package/lib/sd-component-library233.js.map +1 -1
- package/lib/sd-component-library234.js +41 -45
- package/lib/sd-component-library234.js.map +1 -1
- package/lib/sd-component-library235.js +46 -7
- package/lib/sd-component-library235.js.map +1 -1
- package/lib/sd-component-library236.js +8 -64
- package/lib/sd-component-library236.js.map +1 -1
- package/lib/sd-component-library237.js +62 -41
- package/lib/sd-component-library237.js.map +1 -1
- package/lib/sd-component-library238.js +43 -13
- package/lib/sd-component-library238.js.map +1 -1
- package/lib/sd-component-library239.js +12 -47
- package/lib/sd-component-library239.js.map +1 -1
- package/lib/sd-component-library240.js +21 -75
- package/lib/sd-component-library240.js.map +1 -1
- package/lib/sd-component-library241.js +103 -35
- package/lib/sd-component-library241.js.map +1 -1
- package/lib/sd-component-library242.js +47 -27
- package/lib/sd-component-library242.js.map +1 -1
- package/lib/sd-component-library243.js +24 -21
- package/lib/sd-component-library243.js.map +1 -1
- package/lib/sd-component-library244.js +47 -103
- package/lib/sd-component-library244.js.map +1 -1
- package/lib/sd-component-library245.js +46 -45
- package/lib/sd-component-library245.js.map +1 -1
- package/lib/sd-component-library246.js +40 -23
- package/lib/sd-component-library246.js.map +1 -1
- package/lib/sd-component-library247.js +24 -50
- package/lib/sd-component-library247.js.map +1 -1
- package/lib/sd-component-library248.js +72 -18
- package/lib/sd-component-library248.js.map +1 -1
- package/lib/sd-component-library249.js +20 -19
- package/lib/sd-component-library249.js.map +1 -1
- package/lib/sd-component-library250.js +20 -2
- package/lib/sd-component-library250.js.map +1 -1
- package/lib/sd-component-library251.js +2 -325
- package/lib/sd-component-library251.js.map +1 -1
- package/lib/sd-component-library252.js +325 -5
- package/lib/sd-component-library252.js.map +1 -1
- package/lib/sd-component-library253.js +5 -26
- package/lib/sd-component-library253.js.map +1 -1
- package/lib/sd-component-library258.js +18 -127
- package/lib/sd-component-library258.js.map +1 -1
- package/lib/sd-component-library259.js +18 -26
- package/lib/sd-component-library259.js.map +1 -1
- package/lib/sd-component-library260.js +30 -51
- package/lib/sd-component-library260.js.map +1 -1
- package/lib/sd-component-library261.js +39 -62
- package/lib/sd-component-library261.js.map +1 -1
- package/lib/sd-component-library262.js +120 -62
- package/lib/sd-component-library262.js.map +1 -1
- package/lib/sd-component-library263.js +74 -9
- package/lib/sd-component-library263.js.map +1 -1
- package/lib/sd-component-library264.js +72 -47
- package/lib/sd-component-library264.js.map +1 -1
- package/lib/sd-component-library265.js +120 -88
- package/lib/sd-component-library265.js.map +1 -1
- package/lib/sd-component-library266.js +10 -92
- package/lib/sd-component-library266.js.map +1 -1
- package/lib/sd-component-library267.js +50 -30
- package/lib/sd-component-library267.js.map +1 -1
- package/lib/sd-component-library268.js +29 -20
- package/lib/sd-component-library268.js.map +1 -1
- package/lib/sd-component-library269.js +17 -121
- package/lib/sd-component-library269.js.map +1 -1
- package/lib/sd-component-library270.js +125 -10
- package/lib/sd-component-library270.js.map +1 -1
- package/lib/sd-component-library271.js +8 -49
- package/lib/sd-component-library271.js.map +1 -1
- package/lib/sd-component-library272.js +46 -117
- package/lib/sd-component-library272.js.map +1 -1
- package/lib/sd-component-library273.js +90 -2
- package/lib/sd-component-library273.js.map +1 -1
- package/lib/sd-component-library274.js +92 -2
- package/lib/sd-component-library274.js.map +1 -1
- package/lib/sd-component-library275.js +2 -25
- package/lib/sd-component-library275.js.map +1 -1
- package/lib/sd-component-library276.js +2 -22
- package/lib/sd-component-library276.js.map +1 -1
- package/lib/sd-component-library277.js +6 -2
- package/lib/sd-component-library277.js.map +1 -1
- package/lib/sd-component-library278.js +2 -2
- package/lib/sd-component-library279.js +2 -10
- package/lib/sd-component-library279.js.map +1 -1
- package/lib/sd-component-library283.js +10 -6
- package/lib/sd-component-library283.js.map +1 -1
- package/lib/sd-component-library286.js +5 -5
- package/lib/sd-component-library287.js +2 -3
- package/lib/sd-component-library287.js.map +1 -1
- package/lib/sd-component-library288.js +8 -3
- package/lib/sd-component-library288.js.map +1 -1
- package/lib/sd-component-library289.js +328 -3
- package/lib/sd-component-library289.js.map +1 -1
- package/lib/sd-component-library290.js +51 -2
- package/lib/sd-component-library290.js.map +1 -1
- package/lib/sd-component-library291.js +2 -8
- package/lib/sd-component-library291.js.map +1 -1
- package/lib/sd-component-library292.js +73 -324
- package/lib/sd-component-library292.js.map +1 -1
- package/lib/sd-component-library293.js +90 -48
- package/lib/sd-component-library293.js.map +1 -1
- package/lib/sd-component-library294.js +53 -2
- package/lib/sd-component-library294.js.map +1 -1
- package/lib/sd-component-library295.js +8 -76
- package/lib/sd-component-library295.js.map +1 -1
- package/lib/sd-component-library296.js +4 -92
- package/lib/sd-component-library296.js.map +1 -1
- package/lib/sd-component-library297.js +48 -48
- package/lib/sd-component-library297.js.map +1 -1
- package/lib/sd-component-library298.js +3 -9
- package/lib/sd-component-library298.js.map +1 -1
- package/lib/sd-component-library299.js +3 -5
- package/lib/sd-component-library299.js.map +1 -1
- package/lib/sd-component-library300.js +3 -53
- package/lib/sd-component-library300.js.map +1 -1
- package/lib/sd-component-library311.js +1 -1
- package/lib/sd-component-library312.js +2 -2
- package/lib/sd-component-library4.js +16 -16
- package/lib/sd-component-library4.js.map +1 -1
- package/lib/sd-component-library48.js +1 -1
- package/lib/sd-component-library49.js +1 -1
- package/lib/sd-component-library51.js +3 -3
- package/lib/sd-component-library52.js +2 -2
- package/lib/sd-component-library53.js +2 -2
- package/lib/sd-component-library6.js +1 -1
- package/lib/sd-component-library60.js +1 -1
- package/lib/sd-component-library61.js +1 -1
- package/lib/sd-component-library62.js +1 -1
- package/lib/sd-component-library63.js +1 -1
- package/lib/sd-component-library64.js +2 -2
- package/lib/sd-component-library65.js +1 -1
- package/lib/sd-component-library7.js +1 -1
- package/lib/sd-component-library70.js +2 -2
- package/lib/sd-component-library72.js +3 -3
- package/lib/sd-component-library74.js +2 -2
- package/lib/sd-component-library75.js +3 -3
- package/lib/sd-component-library79.js +1 -1
- package/lib/sd-component-library80.js +1 -1
- package/lib/sd-component-library85.js +1 -1
- package/lib/sd-component-library86.js +6 -6
- package/lib/sd-component-library87.js +2 -2
- package/lib/sd-component-library88.js +1 -1
- package/lib/sd-component-library89.js +5 -5
- package/lib/sd-component-library90.js +1 -1
- package/lib/sd-component-library92.js +6 -6
- package/lib/sd-component-library93.js +1 -1
- package/lib/sd-component-library94.js +7 -7
- package/lib/sd-component-library95.js +1 -1
- package/lib/sd-component-library98.js +2 -2
- package/lib/sd-component-library99.js +3 -3
- package/package.json +1 -1
|
@@ -1,23 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
var a = /* @__PURE__ */ ((r) => (r.GREEN = "#00B466", r.ORANGE = "#FF9900", r.RED = "#FF0000", r))(a || {});
|
|
3
|
-
const u = (r) => !r.some(
|
|
4
|
-
({ color: t }) => !Object.values(a).includes(t)
|
|
5
|
-
), f = (r, t) => l(r, t) && u(t), A = (r, t, n, i, o, d) => {
|
|
6
|
-
const c = r - (t - 1) * n, e = (360 - r) / 2 + n * i + c * o, s = e + c * (d - o), g = (e + s) / 2;
|
|
7
|
-
return {
|
|
8
|
-
rangeArcStart: e,
|
|
9
|
-
rangeArcEnd: s,
|
|
10
|
-
rangeArcMiddle: g
|
|
11
|
-
};
|
|
12
|
-
}, R = (r) => {
|
|
13
|
-
const { start: t, end: n } = r;
|
|
14
|
-
return t === 0 ? n < 0.6 : n === 1 ? t > 0.4 : !1;
|
|
15
|
-
};
|
|
1
|
+
const e = 250, t = 220, s = 270, n = 10, a = 6, l = 4.5, o = 1.5, d = 18, c = 4, i = 6.5, r = 8, u = 40, f = 6, h = 1.5, m = 32, M = 20, g = 100, R = 14, W = 100, D = 100, k = 87, I = 3, N = 1.5, P = 4, S = 6, b = 3, B = 10, C = 18, F = 7, T = 100;
|
|
16
2
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
s as defaultArc,
|
|
4
|
+
f as defaultDashHeight,
|
|
5
|
+
h as defaultDashWidth,
|
|
6
|
+
n as defaultDistanceBetweenRanges,
|
|
7
|
+
M as defaultDistanceFromLabelToRanges,
|
|
8
|
+
d as defaultDistanceFromRangesToNeedle,
|
|
9
|
+
m as defaultDistanceFromRangesToScale,
|
|
10
|
+
a as defaultGaugeWidth,
|
|
11
|
+
t as defaultHeight,
|
|
12
|
+
i as defaultInnerCircleRadius,
|
|
13
|
+
c as defaultInnerCircleStrokeWidth,
|
|
14
|
+
o as defaultInnerPointRadius,
|
|
15
|
+
W as defaultMaskBorderRadius,
|
|
16
|
+
r as defaultNeedleWidth,
|
|
17
|
+
u as defaultNumberOfDashes,
|
|
18
|
+
l as defaultPointStrokeWidth,
|
|
19
|
+
e as defaultWidth,
|
|
20
|
+
R as labelPaddingX,
|
|
21
|
+
g as labelWidth,
|
|
22
|
+
B as smallMeterDistanceBetweenRanges,
|
|
23
|
+
C as smallMeterDistanceFromRangesToNeedle,
|
|
24
|
+
P as smallMeterGaugeWidth,
|
|
25
|
+
k as smallMeterHeight,
|
|
26
|
+
S as smallMeterInnerCircleRadius,
|
|
27
|
+
b as smallMeterInnerCircleStrokeWidth,
|
|
28
|
+
T as smallMeterMaskBorderRadius,
|
|
29
|
+
F as smallMeterNeedleWidth,
|
|
30
|
+
N as smallMeterPointRadius,
|
|
31
|
+
I as smallMeterPointStrokeWidth,
|
|
32
|
+
D as smallMeterWidth
|
|
22
33
|
};
|
|
23
34
|
//# sourceMappingURL=sd-component-library228.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library228.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library228.js","sources":["../src/components/meters/outline-meter/contants.ts"],"sourcesContent":["/**\n * Default values for outline meters\n */\nexport const defaultWidth = 250;\nexport const defaultHeight = 220;\nexport const defaultArc = 270;\nexport const defaultDistanceBetweenRanges = 10;\nexport const defaultGaugeWidth = 6;\nexport const defaultPointStrokeWidth = 4.5;\nexport const defaultInnerPointRadius = 1.5;\nexport const defaultDistanceFromRangesToNeedle = 18;\nexport const defaultInnerCircleStrokeWidth = 4;\nexport const defaultInnerCircleRadius = 6.5;\nexport const defaultNeedleWidth = 8;\nexport const defaultNumberOfDashes = 40;\nexport const defaultDashHeight = 6;\nexport const defaultDashWidth = 1.5;\nexport const defaultDistanceFromRangesToScale = 32;\nexport const defaultDistanceFromLabelToRanges = 20;\nexport const labelWidth = 100;\nexport const labelPaddingX = 14;\nexport const defaultMaskBorderRadius = 100;\n\n/**\n * Small Outline meter default values\n */\nexport const smallMeterWidth = 100;\nexport const smallMeterHeight = 87;\nexport const smallMeterPointStrokeWidth = 3;\nexport const smallMeterPointRadius = 1.5;\nexport const smallMeterGaugeWidth = 4;\nexport const smallMeterInnerCircleRadius = 6;\nexport const smallMeterInnerCircleStrokeWidth = 3;\nexport const smallMeterDistanceBetweenRanges = 10;\nexport const smallMeterDistanceFromRangesToNeedle = 18;\nexport const smallMeterNeedleWidth = 7;\nexport const smallMeterMaskBorderRadius = 100;\n"],"names":["defaultWidth","defaultHeight","defaultArc","defaultDistanceBetweenRanges","defaultGaugeWidth","defaultPointStrokeWidth","defaultInnerPointRadius","defaultDistanceFromRangesToNeedle","defaultInnerCircleStrokeWidth","defaultInnerCircleRadius","defaultNeedleWidth","defaultNumberOfDashes","defaultDashHeight","defaultDashWidth","defaultDistanceFromRangesToScale","defaultDistanceFromLabelToRanges","labelWidth","labelPaddingX","defaultMaskBorderRadius","smallMeterWidth","smallMeterHeight","smallMeterPointStrokeWidth","smallMeterPointRadius","smallMeterGaugeWidth","smallMeterInnerCircleRadius","smallMeterInnerCircleStrokeWidth","smallMeterDistanceBetweenRanges","smallMeterDistanceFromRangesToNeedle","smallMeterNeedleWidth","smallMeterMaskBorderRadius"],"mappings":"AAGO,MAAMA,IAAe,KACfC,IAAgB,KAChBC,IAAa,KACbC,IAA+B,IAC/BC,IAAoB,GACpBC,IAA0B,KAC1BC,IAA0B,KAC1BC,IAAoC,IACpCC,IAAgC,GAChCC,IAA2B,KAC3BC,IAAqB,GACrBC,IAAwB,IACxBC,IAAoB,GACpBC,IAAmB,KACnBC,IAAmC,IACnCC,IAAmC,IACnCC,IAAa,KACbC,IAAgB,IAChBC,IAA0B,KAK1BC,IAAkB,KAClBC,IAAmB,IACnBC,IAA6B,GAC7BC,IAAwB,KACxBC,IAAuB,GACvBC,IAA8B,GAC9BC,IAAmC,GACnCC,IAAkC,IAClCC,IAAuC,IACvCC,IAAwB,GACxBC,IAA6B;"}
|
|
@@ -1,31 +1,22 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
color: t < o ? n[o].color : e.color
|
|
12
|
-
}));
|
|
13
|
-
return /* @__PURE__ */ a.jsx(a.Fragment, { children: i.map((e, t) => /* @__PURE__ */ g(
|
|
14
|
-
d,
|
|
15
|
-
{
|
|
16
|
-
...e,
|
|
17
|
-
...r,
|
|
18
|
-
idx: t,
|
|
19
|
-
totalRanges: n.length,
|
|
20
|
-
pointerLength: c,
|
|
21
|
-
key: `${e.start}-${e.end}-${t}`,
|
|
22
|
-
isMatchedRange: o === t,
|
|
23
|
-
ref: m
|
|
24
|
-
}
|
|
25
|
-
)) });
|
|
26
|
-
}
|
|
27
|
-
);
|
|
1
|
+
import { j as t } from "./sd-component-library197.js";
|
|
2
|
+
import { SmileyGaugeColor as e } from "./sd-component-library230.js";
|
|
3
|
+
import { ReactComponent as o } from "./sd-component-library298.js";
|
|
4
|
+
import { ReactComponent as m } from "./sd-component-library299.js";
|
|
5
|
+
import { ReactComponent as i } from "./sd-component-library300.js";
|
|
6
|
+
const S = 10, c = 80, p = 100, y = 87, R = 30, d = 3, f = 2, g = 4, u = /* @__PURE__ */ new Map([
|
|
7
|
+
[e.GREEN, /* @__PURE__ */ t.jsx(o, {})],
|
|
8
|
+
[e.ORANGE, /* @__PURE__ */ t.jsx(m, {})],
|
|
9
|
+
[e.RED, /* @__PURE__ */ t.jsx(i, {})]
|
|
10
|
+
]);
|
|
28
11
|
export {
|
|
29
|
-
|
|
12
|
+
u as COLOR_TO_ICON_MAP,
|
|
13
|
+
S as defaultDistanceBetweenRanges,
|
|
14
|
+
c as defaultSmileyWidth,
|
|
15
|
+
g as smallSmileyGaugeWidth,
|
|
16
|
+
f as smallSmileyInnerPointRadius,
|
|
17
|
+
d as smallSmileyInnerPointStrokeWidth,
|
|
18
|
+
y as smallSmileyMeterHeight,
|
|
19
|
+
p as smallSmileyMeterWidth,
|
|
20
|
+
R as smallSmileyWidth
|
|
30
21
|
};
|
|
31
22
|
//# sourceMappingURL=sd-component-library229.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library229.js","sources":["../src/components/meters/smiley-meter-v2/
|
|
1
|
+
{"version":3,"file":"sd-component-library229.js","sources":["../src/components/meters/smiley-meter-v2/constants.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { HappySmileyIcon, NeutralSmileyIcon, SadSmileyIcon } from \"./assets\";\n\n/**\n * Large Smiley meter v2 default values.\n */\nimport { SmileyGaugeColor } from \"./utils\";\n\nexport const defaultDistanceBetweenRanges = 10;\nexport const defaultSmileyWidth = 80;\n\n/**\n * Small Smiley meter v2 default values.\n */\nexport const smallSmileyMeterWidth = 100;\nexport const smallSmileyMeterHeight = 87;\nexport const smallSmileyWidth = 30;\nexport const smallSmileyInnerPointStrokeWidth = 3;\nexport const smallSmileyInnerPointRadius = 2;\nexport const smallSmileyGaugeWidth = 4;\n\nexport const COLOR_TO_ICON_MAP = new Map<SmileyGaugeColor, React.ReactNode>([\n [SmileyGaugeColor.GREEN, <HappySmileyIcon />],\n [SmileyGaugeColor.ORANGE, <NeutralSmileyIcon />],\n [SmileyGaugeColor.RED, <SadSmileyIcon />],\n]);\n"],"names":["defaultDistanceBetweenRanges","defaultSmileyWidth","smallSmileyMeterWidth","smallSmileyMeterHeight","smallSmileyWidth","smallSmileyInnerPointStrokeWidth","smallSmileyInnerPointRadius","smallSmileyGaugeWidth","COLOR_TO_ICON_MAP","SmileyGaugeColor","jsx","HappySmileyIcon","NeutralSmileyIcon","SadSmileyIcon"],"mappings":";;;;;AASO,MAAMA,IAA+B,IAC/BC,IAAqB,IAKrBC,IAAwB,KACxBC,IAAyB,IACzBC,IAAmB,IACnBC,IAAmC,GACnCC,IAA8B,GAC9BC,IAAwB,GAExBC,wBAAwB,IAAuC;AAAA,EAC1E,CAACC,EAAiB,OAAOC,gBAAAA,EAAA,IAACC,IAAgB,CAAA,CAAE;AAAA,EAC5C,CAACF,EAAiB,QAAQC,gBAAAA,EAAA,IAACE,IAAkB,CAAA,CAAE;AAAA,EAC/C,CAACH,EAAiB,KAAKC,gBAAAA,EAAA,IAACG,IAAc,CAAA,CAAE;AAC1C,CAAC;"}
|
|
@@ -1,36 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
n,
|
|
16
|
-
o,
|
|
17
|
-
r,
|
|
18
|
-
s,
|
|
19
|
-
g,
|
|
20
|
-
l
|
|
21
|
-
), t = Math.round(x);
|
|
22
|
-
return /* @__PURE__ */ h.jsx(
|
|
23
|
-
u,
|
|
24
|
-
{
|
|
25
|
-
...e,
|
|
26
|
-
...a,
|
|
27
|
-
alpha: i ? 360 - t : t,
|
|
28
|
-
radius: m,
|
|
29
|
-
round: c
|
|
30
|
-
}
|
|
31
|
-
);
|
|
1
|
+
import { isCorrectOutlineMeterConfig as l } from "./sd-component-library91.js";
|
|
2
|
+
var a = /* @__PURE__ */ ((r) => (r.GREEN = "#00B466", r.ORANGE = "#FF9900", r.RED = "#FF0000", r))(a || {});
|
|
3
|
+
const u = (r) => !r.some(
|
|
4
|
+
({ color: t }) => !Object.values(a).includes(t)
|
|
5
|
+
), f = (r, t) => l(r, t) && u(t), A = (r, t, n, i, o, d) => {
|
|
6
|
+
const c = r - (t - 1) * n, e = (360 - r) / 2 + n * i + c * o, s = e + c * (d - o), g = (e + s) / 2;
|
|
7
|
+
return {
|
|
8
|
+
rangeArcStart: e,
|
|
9
|
+
rangeArcEnd: s,
|
|
10
|
+
rangeArcMiddle: g
|
|
11
|
+
};
|
|
12
|
+
}, R = (r) => {
|
|
13
|
+
const { start: t, end: n } = r;
|
|
14
|
+
return t === 0 ? n < 0.6 : n === 1 ? t > 0.4 : !1;
|
|
32
15
|
};
|
|
33
16
|
export {
|
|
34
|
-
|
|
17
|
+
a as SmileyGaugeColor,
|
|
18
|
+
u as areColorsValid,
|
|
19
|
+
R as getIsHorizontal,
|
|
20
|
+
A as getRangeProperties,
|
|
21
|
+
f as isCorrectSmileyMeterConfig
|
|
35
22
|
};
|
|
36
23
|
//# sourceMappingURL=sd-component-library230.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library230.js","sources":["../src/components/meters/smiley-meter-v2/
|
|
1
|
+
{"version":3,"file":"sd-component-library230.js","sources":["../src/components/meters/smiley-meter-v2/utils.ts"],"sourcesContent":["import { OutlineMeterRangeConfig } from \"../outline-meter\";\nimport { isCorrectOutlineMeterConfig } from \"../outline-meter/utils\";\nimport { SmileyMeterRange } from \"./interfaces\";\n\nexport enum SmileyGaugeColor {\n GREEN = \"#00B466\",\n ORANGE = \"#FF9900\",\n RED = \"#FF0000\",\n}\n\nexport const areColorsValid = (ranges: OutlineMeterRangeConfig[]) =>\n !ranges.some(\n ({ color }) => !Object.values(SmileyGaugeColor).includes(color as any)\n );\n\nexport const isCorrectSmileyMeterConfig = (\n value: number,\n ranges: OutlineMeterRangeConfig[]\n): ranges is SmileyMeterRange[] => {\n return isCorrectOutlineMeterConfig(value, ranges) && areColorsValid(ranges);\n};\n\nexport const getRangeProperties = (\n arc: number,\n totalRanges: number,\n distanceBetweenRanges: number,\n idx: number,\n start: number,\n end: number\n) => {\n const arcForRanges = arc - (totalRanges - 1) * distanceBetweenRanges;\n const arcStart = (360 - arc) / 2; // deg\n const rangeArcStart =\n arcStart + distanceBetweenRanges * idx + arcForRanges * start;\n const rangeArcEnd = rangeArcStart + arcForRanges * (end - start);\n\n const rangeArcMiddle = (rangeArcStart + rangeArcEnd) / 2;\n return {\n rangeArcStart,\n rangeArcEnd,\n rangeArcMiddle,\n };\n};\n\nexport const getIsHorizontal = (range: SmileyMeterRange) => {\n const { start, end } = range;\n return start === 0 ? end < 0.6 : end === 1 ? start > 0.4 : false;\n};\n"],"names":["SmileyGaugeColor","areColorsValid","ranges","color","isCorrectSmileyMeterConfig","value","isCorrectOutlineMeterConfig","getRangeProperties","arc","totalRanges","distanceBetweenRanges","idx","start","end","arcForRanges","rangeArcStart","rangeArcEnd","rangeArcMiddle","getIsHorizontal","range"],"mappings":";AAIY,IAAAA,sBAAAA,OACVA,EAAA,QAAQ,WACRA,EAAA,SAAS,WACTA,EAAA,MAAM,WAHIA,IAAAA,KAAA,CAAA,CAAA;AAML,MAAMC,IAAiB,CAACC,MAC7B,CAACA,EAAO;AAAA,EACN,CAAC,EAAE,OAAAC,EAAY,MAAA,CAAC,OAAO,OAAOH,CAAgB,EAAE,SAASG,CAAY;AACvE,GAEWC,IAA6B,CACxCC,GACAH,MAEOI,EAA4BD,GAAOH,CAAM,KAAKD,EAAeC,CAAM,GAG/DK,IAAqB,CAChCC,GACAC,GACAC,GACAC,GACAC,GACAC,MACG;AACG,QAAAC,IAAeN,KAAOC,IAAc,KAAKC,GAEzCK,KADY,MAAMP,KAAO,IAElBE,IAAwBC,IAAMG,IAAeF,GACpDI,IAAcD,IAAgBD,KAAgBD,IAAMD,IAEpDK,KAAkBF,IAAgBC,KAAe;AAChD,SAAA;AAAA,IACL,eAAAD;AAAA,IACA,aAAAC;AAAA,IACA,gBAAAC;AAAA,EAAA;AAEJ,GAEaC,IAAkB,CAACC,MAA4B;AACpD,QAAA,EAAE,OAAAP,GAAO,KAAAC,EAAQ,IAAAM;AACvB,SAAOP,MAAU,IAAIC,IAAM,MAAMA,MAAQ,IAAID,IAAQ,MAAM;AAC7D;"}
|
|
@@ -1,6 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { j as a } from "./sd-component-library197.js";
|
|
2
|
+
import R, { createElement as g } from "react";
|
|
3
|
+
import { isValueInRange as f } from "./sd-component-library91.js";
|
|
4
|
+
import { SmileyMeterRange as d } from "./sd-component-library312.js";
|
|
5
|
+
const j = R.forwardRef(
|
|
6
|
+
(r, m) => {
|
|
7
|
+
const { value: s, ranges: n, distanceFromRanges: c } = r, o = n.findIndex(
|
|
8
|
+
({ start: e, end: t, bounds: l }) => f(s, e, t, l)
|
|
9
|
+
), i = n.map((e, t) => ({
|
|
10
|
+
...e,
|
|
11
|
+
color: t < o ? n[o].color : e.color
|
|
12
|
+
}));
|
|
13
|
+
return /* @__PURE__ */ a.jsx(a.Fragment, { children: i.map((e, t) => /* @__PURE__ */ g(
|
|
14
|
+
d,
|
|
15
|
+
{
|
|
16
|
+
...e,
|
|
17
|
+
...r,
|
|
18
|
+
idx: t,
|
|
19
|
+
totalRanges: n.length,
|
|
20
|
+
pointerLength: c,
|
|
21
|
+
key: `${e.start}-${e.end}-${t}`,
|
|
22
|
+
isMatchedRange: o === t,
|
|
23
|
+
ref: m
|
|
24
|
+
}
|
|
25
|
+
)) });
|
|
26
|
+
}
|
|
27
|
+
);
|
|
3
28
|
export {
|
|
4
|
-
|
|
29
|
+
j as SmileyMeterRanges
|
|
5
30
|
};
|
|
6
31
|
//# sourceMappingURL=sd-component-library231.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library231.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library231.js","sources":["../src/components/meters/smiley-meter-v2/partials/smiley-meter-ranges/smiley-meter-ranges.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { isValueInRange } from \"../../../outline-meter/utils\";\nimport { SmileyMeterRange } from \"../smiley-meter-range\";\nimport { SmileyMeterRangesProps as Props } from \"./interfaces\";\n\nexport const SmileyMeterRanges = React.forwardRef<SVGCircleElement, Props>(\n (props, pointRef) => {\n const { value, ranges, distanceFromRanges } = props;\n\n const matchingRangeIndex = ranges.findIndex(({ start, end, bounds }) =>\n isValueInRange(value, start, end, bounds)\n );\n const newRanges = ranges.map((range, idx) => ({\n ...range,\n color:\n idx < matchingRangeIndex\n ? ranges[matchingRangeIndex].color\n : range.color,\n }));\n\n return (\n <>\n {newRanges.map((range, idx) => (\n <SmileyMeterRange\n {...range}\n {...props}\n idx={idx}\n totalRanges={ranges.length}\n pointerLength={distanceFromRanges}\n key={`${range.start}-${range.end}-${idx}`}\n isMatchedRange={matchingRangeIndex === idx}\n ref={pointRef}\n />\n ))}\n </>\n );\n }\n);\n"],"names":["SmileyMeterRanges","React","props","pointRef","value","ranges","distanceFromRanges","matchingRangeIndex","start","end","bounds","isValueInRange","newRanges","range","idx","jsx","Fragment","createElement","SmileyMeterRange"],"mappings":";;;;AAMO,MAAMA,IAAoBC,EAAM;AAAA,EACrC,CAACC,GAAOC,MAAa;AACnB,UAAM,EAAE,OAAAC,GAAO,QAAAC,GAAQ,oBAAAC,EAAA,IAAuBJ,GAExCK,IAAqBF,EAAO;AAAA,MAAU,CAAC,EAAE,OAAAG,GAAO,KAAAC,GAAK,QAAAC,QACzDC,EAAeP,GAAOI,GAAOC,GAAKC,CAAM;AAAA,IAAA,GAEpCE,IAAYP,EAAO,IAAI,CAACQ,GAAOC,OAAS;AAAA,MAC5C,GAAGD;AAAA,MACH,OACEC,IAAMP,IACFF,EAAOE,CAAkB,EAAE,QAC3BM,EAAM;AAAA,IACZ,EAAA;AAEF,WAEKE,gBAAAA,EAAA,IAAAC,EAAA,UAAA,EAAA,UAAAJ,EAAU,IAAI,CAACC,GAAOC,MACrB,gBAAAG;AAAA,MAACC;AAAA,MAAA;AAAA,QACE,GAAGL;AAAA,QACH,GAAGX;AAAA,QACJ,KAAAY;AAAA,QACA,aAAaT,EAAO;AAAA,QACpB,eAAeC;AAAA,QACf,KAAK,GAAGO,EAAM,KAAK,IAAIA,EAAM,GAAG,IAAIC,CAAG;AAAA,QACvC,gBAAgBP,MAAuBO;AAAA,QACvC,KAAKX;AAAA,MAAA;AAAA,IAER,CAAA,EACH,CAAA;AAAA,EAEJ;AACF;"}
|
|
@@ -1,132 +1,36 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
a
|
|
31
|
-
), { x: W, y: k } = d(
|
|
32
|
-
t,
|
|
33
|
-
i
|
|
34
|
-
), u = V || m === 0 ? "left" : m === y - 1 ? "right" : "top";
|
|
35
|
-
if (f || !Y) {
|
|
36
|
-
const J = f && Y || !f && F(g, r, R) ? x : S, B = C ? i - l : i, { y: K } = d(
|
|
37
|
-
t,
|
|
38
|
-
B
|
|
39
|
-
), { x: N, y: Q } = d(
|
|
40
|
-
t,
|
|
41
|
-
(a + B) / 2
|
|
42
|
-
);
|
|
43
|
-
return /* @__PURE__ */ e.jsxs("g", { children: [
|
|
44
|
-
/* @__PURE__ */ e.jsx(
|
|
45
|
-
X,
|
|
46
|
-
{
|
|
47
|
-
startX: P,
|
|
48
|
-
startY: j,
|
|
49
|
-
endX: W,
|
|
50
|
-
endY: k,
|
|
51
|
-
startAlpha: a,
|
|
52
|
-
endAlpha: i,
|
|
53
|
-
color: J,
|
|
54
|
-
radius: t,
|
|
55
|
-
width: s
|
|
56
|
-
}
|
|
57
|
-
),
|
|
58
|
-
!E && w && /* @__PURE__ */ e.jsx(
|
|
59
|
-
O,
|
|
60
|
-
{
|
|
61
|
-
diameter: o,
|
|
62
|
-
position: u,
|
|
63
|
-
distanceFromRanges: b,
|
|
64
|
-
isInRange: Y,
|
|
65
|
-
...u === "right" && j > o / 2 || u === "left" && K > o / 2 ? {
|
|
66
|
-
rangeX: N,
|
|
67
|
-
rangeY: Q
|
|
68
|
-
} : void 0
|
|
69
|
-
}
|
|
70
|
-
)
|
|
71
|
-
] });
|
|
1
|
+
import { j as h } from "./sd-component-library197.js";
|
|
2
|
+
import { getRangeProperties as p } from "./sd-component-library230.js";
|
|
3
|
+
import { MatchedRangeLabelBox as u } from "./sd-component-library311.js";
|
|
4
|
+
const b = (e) => {
|
|
5
|
+
const {
|
|
6
|
+
range: a,
|
|
7
|
+
arc: n,
|
|
8
|
+
totalRanges: o,
|
|
9
|
+
distanceBetweenRanges: r,
|
|
10
|
+
idx: s,
|
|
11
|
+
diameter: d,
|
|
12
|
+
segmented: c,
|
|
13
|
+
counterClockWise: i
|
|
14
|
+
} = e, { start: g, end: l } = a, m = d / 2, { rangeArcMiddle: x } = p(
|
|
15
|
+
n,
|
|
16
|
+
o,
|
|
17
|
+
r,
|
|
18
|
+
s,
|
|
19
|
+
g,
|
|
20
|
+
l
|
|
21
|
+
), t = Math.round(x);
|
|
22
|
+
return /* @__PURE__ */ h.jsx(
|
|
23
|
+
u,
|
|
24
|
+
{
|
|
25
|
+
...e,
|
|
26
|
+
...a,
|
|
27
|
+
alpha: i ? 360 - t : t,
|
|
28
|
+
radius: m,
|
|
29
|
+
round: c
|
|
72
30
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
/* @__PURE__ */ e.jsx(
|
|
76
|
-
X,
|
|
77
|
-
{
|
|
78
|
-
startX: P,
|
|
79
|
-
startY: j,
|
|
80
|
-
endX: h,
|
|
81
|
-
endY: p,
|
|
82
|
-
startAlpha: a,
|
|
83
|
-
endAlpha: c,
|
|
84
|
-
color: x,
|
|
85
|
-
radius: t,
|
|
86
|
-
width: s,
|
|
87
|
-
roundEnd: !1
|
|
88
|
-
}
|
|
89
|
-
),
|
|
90
|
-
/* @__PURE__ */ e.jsx(
|
|
91
|
-
X,
|
|
92
|
-
{
|
|
93
|
-
startX: h,
|
|
94
|
-
startY: p,
|
|
95
|
-
endX: W,
|
|
96
|
-
endY: k,
|
|
97
|
-
startAlpha: c,
|
|
98
|
-
endAlpha: i,
|
|
99
|
-
color: S,
|
|
100
|
-
radius: t,
|
|
101
|
-
width: s,
|
|
102
|
-
roundStart: !1
|
|
103
|
-
}
|
|
104
|
-
),
|
|
105
|
-
/* @__PURE__ */ e.jsx(
|
|
106
|
-
"circle",
|
|
107
|
-
{
|
|
108
|
-
cx: (h + z) / 2,
|
|
109
|
-
cy: (p + G) / 2,
|
|
110
|
-
r: I + T,
|
|
111
|
-
strokeWidth: I,
|
|
112
|
-
stroke: x,
|
|
113
|
-
fill: "white",
|
|
114
|
-
ref: M
|
|
115
|
-
}
|
|
116
|
-
),
|
|
117
|
-
!E && w && /* @__PURE__ */ e.jsx(
|
|
118
|
-
O,
|
|
119
|
-
{
|
|
120
|
-
diameter: o,
|
|
121
|
-
isInRange: !0,
|
|
122
|
-
position: u,
|
|
123
|
-
distanceFromRanges: b
|
|
124
|
-
}
|
|
125
|
-
)
|
|
126
|
-
] });
|
|
127
|
-
}
|
|
128
|
-
);
|
|
31
|
+
);
|
|
32
|
+
};
|
|
129
33
|
export {
|
|
130
|
-
|
|
34
|
+
b as MatchedRangeLabelBox
|
|
131
35
|
};
|
|
132
36
|
//# sourceMappingURL=sd-component-library232.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sd-component-library232.js","sources":["../src/components/meters/
|
|
1
|
+
{"version":3,"file":"sd-component-library232.js","sources":["../src/components/meters/smiley-meter-v2/partials/matched-range-label-box/matched-range-label-box.tsx"],"sourcesContent":["import React from \"react\";\n\nimport { MatchedRangeLabelBox as LabelBox } from \"../../../common-outline-meter-partials\";\nimport { getRangeProperties } from \"../../utils\";\nimport { MatchedRangeBoxProps as Props } from \"./interfaces\";\n\nexport const MatchedRangeLabelBox: React.FC<Props> = (props) => {\n const {\n range,\n arc,\n totalRanges,\n distanceBetweenRanges,\n idx,\n diameter,\n segmented,\n counterClockWise,\n } = props;\n const { start, end } = range;\n\n const radius = diameter / 2;\n const { rangeArcMiddle: alpha } = getRangeProperties(\n arc,\n totalRanges,\n distanceBetweenRanges,\n idx,\n start,\n end\n );\n\n const roundedAlpha = Math.round(alpha);\n\n return (\n <LabelBox\n {...props}\n {...range}\n alpha={counterClockWise ? 360 - roundedAlpha : roundedAlpha}\n radius={radius}\n round={segmented}\n />\n );\n};\n"],"names":["MatchedRangeLabelBox","props","range","arc","totalRanges","distanceBetweenRanges","idx","diameter","segmented","counterClockWise","start","end","radius","alpha","getRangeProperties","roundedAlpha","jsx","LabelBox"],"mappings":";;;AAMa,MAAAA,IAAwC,CAACC,MAAU;AACxD,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,KAAAC;AAAA,IACA,aAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,KAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,kBAAAC;AAAA,EACE,IAAAR,GACE,EAAE,OAAAS,GAAO,KAAAC,EAAQ,IAAAT,GAEjBU,IAASL,IAAW,GACpB,EAAE,gBAAgBM,EAAA,IAAUC;AAAA,IAChCX;AAAA,IACAC;AAAA,IACAC;AAAA,IACAC;AAAA,IACAI;AAAA,IACAC;AAAA,EAAA,GAGII,IAAe,KAAK,MAAMF,CAAK;AAGnC,SAAAG,gBAAAA,EAAA;AAAA,IAACC;AAAAA,IAAA;AAAA,MACE,GAAGhB;AAAA,MACH,GAAGC;AAAA,MACJ,OAAOO,IAAmB,MAAMM,IAAeA;AAAA,MAC/C,QAAAH;AAAA,MACA,OAAOJ;AAAA,IAAA;AAAA,EAAA;AAGb;"}
|