@procaaso/alphinity-ui-components 1.7.0 → 1.8.1
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.cjs +65 -48
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +96 -79
- package/dist/index.d.ts +96 -79
- package/dist/index.js +65 -48
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1859,33 +1859,41 @@ function DeviceControlPanel({
|
|
|
1859
1859
|
}
|
|
1860
1860
|
)
|
|
1861
1861
|
] }),
|
|
1862
|
-
activeCapabilities?.customActions && activeCapabilities.customActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" }, children: activeCapabilities.customActions.map((action) =>
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1862
|
+
activeCapabilities?.customActions && activeCapabilities.customActions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { display: "flex", flexWrap: "wrap", gap: "8px" }, children: activeCapabilities.customActions.map((action) => {
|
|
1863
|
+
const actionDisabled = action.disabled === true;
|
|
1864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1865
|
+
"button",
|
|
1866
|
+
{
|
|
1867
|
+
onClick: () => {
|
|
1868
|
+
if (!actionDisabled) onCustomAction?.(action.id);
|
|
1869
|
+
},
|
|
1870
|
+
disabled: actionDisabled,
|
|
1871
|
+
title: actionDisabled ? action.disabledReason : void 0,
|
|
1872
|
+
style: {
|
|
1873
|
+
flex: 1,
|
|
1874
|
+
minWidth: "120px",
|
|
1875
|
+
height: touchSize,
|
|
1876
|
+
backgroundColor: surfaceColor,
|
|
1877
|
+
color: textColor,
|
|
1878
|
+
border: `1px solid ${borderColor}`,
|
|
1879
|
+
borderRadius: "6px",
|
|
1880
|
+
fontSize: "11px",
|
|
1881
|
+
fontWeight: 600,
|
|
1882
|
+
fontFamily: "monospace",
|
|
1883
|
+
letterSpacing: "0.5px",
|
|
1884
|
+
textTransform: "uppercase",
|
|
1885
|
+
cursor: actionDisabled ? "not-allowed" : "pointer",
|
|
1886
|
+
opacity: actionDisabled ? 0.4 : 1,
|
|
1887
|
+
transition: "all 0.15s"
|
|
1888
|
+
},
|
|
1889
|
+
children: [
|
|
1890
|
+
action.icon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { marginRight: "6px" }, children: action.icon }),
|
|
1891
|
+
action.label
|
|
1892
|
+
]
|
|
1881
1893
|
},
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
]
|
|
1886
|
-
},
|
|
1887
|
-
action.id
|
|
1888
|
-
)) })
|
|
1894
|
+
action.id
|
|
1895
|
+
);
|
|
1896
|
+
}) })
|
|
1889
1897
|
] }),
|
|
1890
1898
|
binding.state.lastCommandResult && showToast && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1891
1899
|
"div",
|
|
@@ -4925,6 +4933,30 @@ function PipeRenderer({
|
|
|
4925
4933
|
|
|
4926
4934
|
// src/components/PIDCanvas/DataOverlay.tsx
|
|
4927
4935
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
4936
|
+
var PULSE_KEYFRAME_ID = "pid-data-overlay-pulse-keyframes";
|
|
4937
|
+
var PULSE_ANIMATION = "pid-data-overlay-pulse 1.5s ease-in-out infinite";
|
|
4938
|
+
function ensurePulseKeyframes() {
|
|
4939
|
+
if (typeof document === "undefined") return;
|
|
4940
|
+
if (document.getElementById(PULSE_KEYFRAME_ID)) return;
|
|
4941
|
+
const style = document.createElement("style");
|
|
4942
|
+
style.id = PULSE_KEYFRAME_ID;
|
|
4943
|
+
style.textContent = "@keyframes pid-data-overlay-pulse{0%{opacity:.9}50%{opacity:.3}100%{opacity:.9}}";
|
|
4944
|
+
document.head.appendChild(style);
|
|
4945
|
+
}
|
|
4946
|
+
function renderStatusDot(cx, cy, scale, fill) {
|
|
4947
|
+
ensurePulseKeyframes();
|
|
4948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
4949
|
+
"circle",
|
|
4950
|
+
{
|
|
4951
|
+
className: "pid-data-overlay-status-dot",
|
|
4952
|
+
cx: cx + 35 * scale,
|
|
4953
|
+
cy: cy - 18 * scale,
|
|
4954
|
+
r: 3 * scale,
|
|
4955
|
+
fill,
|
|
4956
|
+
style: { animation: PULSE_ANIMATION }
|
|
4957
|
+
}
|
|
4958
|
+
);
|
|
4959
|
+
}
|
|
4928
4960
|
function DataOverlay({
|
|
4929
4961
|
nodeId,
|
|
4930
4962
|
x,
|
|
@@ -5029,25 +5061,7 @@ function DataOverlay({
|
|
|
5029
5061
|
children: displayText
|
|
5030
5062
|
}
|
|
5031
5063
|
),
|
|
5032
|
-
showStatus && value.status !== "normal" &&
|
|
5033
|
-
"circle",
|
|
5034
|
-
{
|
|
5035
|
-
cx: displayX + 35 * scale,
|
|
5036
|
-
cy: displayY - 18 * scale,
|
|
5037
|
-
r: 3 * scale,
|
|
5038
|
-
fill: finalTextColor,
|
|
5039
|
-
opacity: "0.9",
|
|
5040
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5041
|
-
"animate",
|
|
5042
|
-
{
|
|
5043
|
-
attributeName: "opacity",
|
|
5044
|
-
values: "0.9;0.3;0.9",
|
|
5045
|
-
dur: "1.5s",
|
|
5046
|
-
repeatCount: "indefinite"
|
|
5047
|
-
}
|
|
5048
|
-
)
|
|
5049
|
-
}
|
|
5050
|
-
),
|
|
5064
|
+
showStatus && value.status !== "normal" && renderStatusDot(displayX, displayY, scale, finalTextColor),
|
|
5051
5065
|
value.quality !== void 0 && value.quality < 100 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
5052
5066
|
"text",
|
|
5053
5067
|
{
|
|
@@ -8713,14 +8727,17 @@ function DeviceConfigPanel({
|
|
|
8713
8727
|
const currentTimestamp = binding?.state.lastSaved || 0;
|
|
8714
8728
|
if (binding?.state.lastSaveResult && currentTimestamp !== lastResultTimestampRef.current) {
|
|
8715
8729
|
lastResultTimestampRef.current = currentTimestamp;
|
|
8730
|
+
let hideTimer;
|
|
8716
8731
|
const showTimer = setTimeout(() => {
|
|
8717
8732
|
setShowToast(true);
|
|
8718
|
-
|
|
8733
|
+
hideTimer = setTimeout(() => {
|
|
8719
8734
|
setShowToast(false);
|
|
8720
8735
|
}, toastDuration);
|
|
8721
|
-
return () => clearTimeout(hideTimer);
|
|
8722
8736
|
}, 0);
|
|
8723
|
-
return () =>
|
|
8737
|
+
return () => {
|
|
8738
|
+
clearTimeout(showTimer);
|
|
8739
|
+
if (hideTimer) clearTimeout(hideTimer);
|
|
8740
|
+
};
|
|
8724
8741
|
}
|
|
8725
8742
|
}, [binding?.state.lastSaveResult, binding?.state.lastSaved, toastDuration]);
|
|
8726
8743
|
const parametersBySection = (0, import_react21.useMemo)(() => {
|