@procaaso/alphinity-ui-components 1.8.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 +31 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +69 -68
- package/dist/index.d.ts +69 -68
- package/dist/index.js +31 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4933,6 +4933,30 @@ function PipeRenderer({
|
|
|
4933
4933
|
|
|
4934
4934
|
// src/components/PIDCanvas/DataOverlay.tsx
|
|
4935
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
|
+
}
|
|
4936
4960
|
function DataOverlay({
|
|
4937
4961
|
nodeId,
|
|
4938
4962
|
x,
|
|
@@ -5037,25 +5061,7 @@ function DataOverlay({
|
|
|
5037
5061
|
children: displayText
|
|
5038
5062
|
}
|
|
5039
5063
|
),
|
|
5040
|
-
showStatus && value.status !== "normal" &&
|
|
5041
|
-
"circle",
|
|
5042
|
-
{
|
|
5043
|
-
cx: displayX + 35 * scale,
|
|
5044
|
-
cy: displayY - 18 * scale,
|
|
5045
|
-
r: 3 * scale,
|
|
5046
|
-
fill: finalTextColor,
|
|
5047
|
-
opacity: "0.9",
|
|
5048
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5049
|
-
"animate",
|
|
5050
|
-
{
|
|
5051
|
-
attributeName: "opacity",
|
|
5052
|
-
values: "0.9;0.3;0.9",
|
|
5053
|
-
dur: "1.5s",
|
|
5054
|
-
repeatCount: "indefinite"
|
|
5055
|
-
}
|
|
5056
|
-
)
|
|
5057
|
-
}
|
|
5058
|
-
),
|
|
5064
|
+
showStatus && value.status !== "normal" && renderStatusDot(displayX, displayY, scale, finalTextColor),
|
|
5059
5065
|
value.quality !== void 0 && value.quality < 100 && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
5060
5066
|
"text",
|
|
5061
5067
|
{
|
|
@@ -8721,14 +8727,17 @@ function DeviceConfigPanel({
|
|
|
8721
8727
|
const currentTimestamp = binding?.state.lastSaved || 0;
|
|
8722
8728
|
if (binding?.state.lastSaveResult && currentTimestamp !== lastResultTimestampRef.current) {
|
|
8723
8729
|
lastResultTimestampRef.current = currentTimestamp;
|
|
8730
|
+
let hideTimer;
|
|
8724
8731
|
const showTimer = setTimeout(() => {
|
|
8725
8732
|
setShowToast(true);
|
|
8726
|
-
|
|
8733
|
+
hideTimer = setTimeout(() => {
|
|
8727
8734
|
setShowToast(false);
|
|
8728
8735
|
}, toastDuration);
|
|
8729
|
-
return () => clearTimeout(hideTimer);
|
|
8730
8736
|
}, 0);
|
|
8731
|
-
return () =>
|
|
8737
|
+
return () => {
|
|
8738
|
+
clearTimeout(showTimer);
|
|
8739
|
+
if (hideTimer) clearTimeout(hideTimer);
|
|
8740
|
+
};
|
|
8732
8741
|
}
|
|
8733
8742
|
}, [binding?.state.lastSaveResult, binding?.state.lastSaved, toastDuration]);
|
|
8734
8743
|
const parametersBySection = (0, import_react21.useMemo)(() => {
|