@procaaso/alphinity-ui-components 1.0.2 → 1.0.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/IMPLEMENTATION_GUIDE.md +1351 -0
- package/README.md +9 -22
- package/dist/index.cjs +70 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +70 -10
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -18,33 +18,20 @@ function HMIPanel() {
|
|
|
18
18
|
const [temperature, setTemperature] = useState(72.5);
|
|
19
19
|
const [pressure, setPressure] = useState(14.7);
|
|
20
20
|
const [systemStatus, setSystemStatus] = useState('normal');
|
|
21
|
-
|
|
21
|
+
|
|
22
22
|
return (
|
|
23
23
|
<div className="p-4 space-y-4">
|
|
24
24
|
{/* System status indicators */}
|
|
25
25
|
<div className="flex gap-4 items-center">
|
|
26
|
-
<StatusIndicator
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
led={true}
|
|
31
|
-
/>
|
|
32
|
-
<StatusIndicator
|
|
33
|
-
status="alarm"
|
|
34
|
-
label="Temperature Alert"
|
|
26
|
+
<StatusIndicator status="normal" label="Power" size="medium" led={true} />
|
|
27
|
+
<StatusIndicator
|
|
28
|
+
status="alarm"
|
|
29
|
+
label="Temperature Alert"
|
|
35
30
|
animation="pulse"
|
|
36
31
|
shape="circle"
|
|
37
32
|
/>
|
|
38
|
-
<StatusIndicator
|
|
39
|
-
|
|
40
|
-
label="Maintenance Due"
|
|
41
|
-
animation="blink"
|
|
42
|
-
/>
|
|
43
|
-
<StatusIndicator
|
|
44
|
-
status="active"
|
|
45
|
-
label="Process Running"
|
|
46
|
-
size="large"
|
|
47
|
-
/>
|
|
33
|
+
<StatusIndicator status="warning" label="Maintenance Due" animation="blink" />
|
|
34
|
+
<StatusIndicator status="active" label="Process Running" size="large" />
|
|
48
35
|
</div>
|
|
49
36
|
|
|
50
37
|
{/* Process control values */}
|
|
@@ -58,7 +45,7 @@ function HMIPanel() {
|
|
|
58
45
|
precision={1}
|
|
59
46
|
status="normal"
|
|
60
47
|
/>
|
|
61
|
-
|
|
48
|
+
|
|
62
49
|
<ValueEntry
|
|
63
50
|
value={pressure}
|
|
64
51
|
onChange={setPressure}
|
|
@@ -67,7 +54,7 @@ function HMIPanel() {
|
|
|
67
54
|
status="warning"
|
|
68
55
|
readOnly
|
|
69
56
|
/>
|
|
70
|
-
|
|
57
|
+
|
|
71
58
|
{/* Control buttons */}
|
|
72
59
|
<Button variant="primary" onClick={() => console.log('Start process')}>
|
|
73
60
|
Start
|
package/dist/index.cjs
CHANGED
|
@@ -2055,9 +2055,10 @@ function NodeRenderer({
|
|
|
2055
2055
|
x: symbol.viewBox.width / 2 + (node.labelOffset?.x ?? 0),
|
|
2056
2056
|
y: symbol.viewBox.height + 12 + (node.labelOffset?.y ?? 0),
|
|
2057
2057
|
textAnchor: "middle",
|
|
2058
|
-
fontSize:
|
|
2058
|
+
fontSize: node.labelFontSize ?? 10,
|
|
2059
2059
|
fontWeight: "600",
|
|
2060
2060
|
fill: isSelected ? "#3b82f6" : "#1f2937",
|
|
2061
|
+
transform: node.transform.rotation ? `rotate(${-node.transform.rotation}, ${symbol.viewBox.width / 2 + (node.labelOffset?.x ?? 0)}, ${symbol.viewBox.height + 12 + (node.labelOffset?.y ?? 0)})` : void 0,
|
|
2061
2062
|
children: node.label || node.id
|
|
2062
2063
|
}
|
|
2063
2064
|
)
|
|
@@ -3635,21 +3636,32 @@ function PIDCanvas({
|
|
|
3635
3636
|
onDrop: handleDrop,
|
|
3636
3637
|
onDragLeave: handleDragLeave,
|
|
3637
3638
|
children: [
|
|
3638
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
3639
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.
|
|
3640
|
-
|
|
3641
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3639
|
+
features.showGrid !== false ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
3640
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("defs", { children: [
|
|
3641
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("pattern", { id: "grid-minor", width: "5", height: "5", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M 5 0 L 0 0 0 5", fill: "none", stroke: "#e5e7eb", strokeWidth: "0.5" }) }),
|
|
3642
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("pattern", { id: "grid-major", width: "25", height: "25", patternUnits: "userSpaceOnUse", children: [
|
|
3643
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("rect", { width: "25", height: "25", fill: "url(#grid-minor)" }),
|
|
3644
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("path", { d: "M 25 0 L 0 0 0 25", fill: "none", stroke: "#d1d5db", strokeWidth: "1" })
|
|
3645
|
+
] })
|
|
3646
|
+
] }),
|
|
3647
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3648
|
+
"rect",
|
|
3649
|
+
{
|
|
3650
|
+
x: Math.floor(viewBox.x / 25) * 25 - viewBox.width,
|
|
3651
|
+
y: Math.floor(viewBox.y / 25) * 25 - viewBox.height,
|
|
3652
|
+
width: Math.ceil(viewBox.width * 3 / 25) * 25,
|
|
3653
|
+
height: Math.ceil(viewBox.height * 3 / 25) * 25,
|
|
3654
|
+
fill: "url(#grid-major)"
|
|
3655
|
+
}
|
|
3656
|
+
)
|
|
3657
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
3646
3658
|
"rect",
|
|
3647
3659
|
{
|
|
3648
3660
|
x: Math.floor(viewBox.x / 25) * 25 - viewBox.width,
|
|
3649
3661
|
y: Math.floor(viewBox.y / 25) * 25 - viewBox.height,
|
|
3650
3662
|
width: Math.ceil(viewBox.width * 3 / 25) * 25,
|
|
3651
3663
|
height: Math.ceil(viewBox.height * 3 / 25) * 25,
|
|
3652
|
-
fill: "
|
|
3664
|
+
fill: features.backgroundColor ?? "#ffffff"
|
|
3653
3665
|
}
|
|
3654
3666
|
),
|
|
3655
3667
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
@@ -4082,6 +4094,54 @@ function NodeConfigPanel({
|
|
|
4082
4094
|
}
|
|
4083
4095
|
)
|
|
4084
4096
|
] })
|
|
4097
|
+
] }),
|
|
4098
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
4099
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { style: { fontSize: "0.75rem", display: "block", marginBottom: "4px" }, children: "Label Font Size:" }),
|
|
4100
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4101
|
+
"input",
|
|
4102
|
+
{
|
|
4103
|
+
type: "number",
|
|
4104
|
+
min: "6",
|
|
4105
|
+
max: "24",
|
|
4106
|
+
value: node.labelFontSize ?? 10,
|
|
4107
|
+
onChange: (e) => onUpdateNode({
|
|
4108
|
+
labelFontSize: parseFloat(e.target.value) || 10
|
|
4109
|
+
}),
|
|
4110
|
+
style: {
|
|
4111
|
+
width: "100%",
|
|
4112
|
+
padding: "6px 8px",
|
|
4113
|
+
borderRadius: "4px",
|
|
4114
|
+
border: "1px solid #cbd5e1",
|
|
4115
|
+
fontSize: "0.875rem"
|
|
4116
|
+
}
|
|
4117
|
+
}
|
|
4118
|
+
)
|
|
4119
|
+
] }),
|
|
4120
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { children: [
|
|
4121
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { style: { fontSize: "0.75rem", display: "block", marginBottom: "4px" }, children: "Rotation (degrees):" }),
|
|
4122
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4123
|
+
"input",
|
|
4124
|
+
{
|
|
4125
|
+
type: "number",
|
|
4126
|
+
min: "0",
|
|
4127
|
+
max: "360",
|
|
4128
|
+
step: "15",
|
|
4129
|
+
value: node.transform.rotation ?? 0,
|
|
4130
|
+
onChange: (e) => onUpdateNode({
|
|
4131
|
+
transform: {
|
|
4132
|
+
...node.transform,
|
|
4133
|
+
rotation: parseFloat(e.target.value) || 0
|
|
4134
|
+
}
|
|
4135
|
+
}),
|
|
4136
|
+
style: {
|
|
4137
|
+
width: "100%",
|
|
4138
|
+
padding: "6px 8px",
|
|
4139
|
+
borderRadius: "4px",
|
|
4140
|
+
border: "1px solid #cbd5e1",
|
|
4141
|
+
fontSize: "0.875rem"
|
|
4142
|
+
}
|
|
4143
|
+
}
|
|
4144
|
+
)
|
|
4085
4145
|
] })
|
|
4086
4146
|
] }),
|
|
4087
4147
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { style: { marginBottom: "20px" }, children: [
|