@procaaso/alphinity-ui-components 1.9.0 → 1.11.0
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 +1161 -361
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +280 -9
- package/dist/index.d.ts +280 -9
- package/dist/index.js +1054 -265
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -48,6 +48,38 @@ declare const Selector: react__default.FC<SelectorProps>;
|
|
|
48
48
|
* Status levels for telemetry values
|
|
49
49
|
*/
|
|
50
50
|
type TelemetryStatus$1 = 'normal' | 'warning' | 'alarm' | 'fault' | 'off';
|
|
51
|
+
/**
|
|
52
|
+
* Marks a value as a maintenance force rather than a measured reading
|
|
53
|
+
* (alphinity-tffi issue #3607, unit U11). A forced value is a deliberate
|
|
54
|
+
* substitution at the instrument, so a surface that shows it must show
|
|
55
|
+
* `active` and, when known, the real value beside it. Never render `active`
|
|
56
|
+
* as a `TelemetryStatus` color; forced and alarm/warning/fault are
|
|
57
|
+
* independent facts about the same reading.
|
|
58
|
+
*/
|
|
59
|
+
interface ForcedState {
|
|
60
|
+
/** True while the tag carries an active maintenance force. Source: the control program's Sts_SimulationActive flag. */
|
|
61
|
+
active: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* The real, unforced value, in the same unit as the primary value.
|
|
64
|
+
* Optional: the backend does not publish this yet for every tag kind
|
|
65
|
+
* (alphinity-tffi unit U3b). Render the forced mark alone when this is
|
|
66
|
+
* absent; never show a placeholder in its place.
|
|
67
|
+
*
|
|
68
|
+
* Covers both directions this feature forces, and the two read
|
|
69
|
+
* differently even though the field is the same:
|
|
70
|
+
* - Forced INPUT (a transmitter): the real, currently measured value.
|
|
71
|
+
* - Forced OUTPUT (a valve, a lamp, a commanded position): the value the
|
|
72
|
+
* control system would be commanding right now if the force were not
|
|
73
|
+
* active. Not the feedback tag. XV valve position feedback (ZSC/ZSO) is
|
|
74
|
+
* synthesized from the commanded position, not sensed by a physical
|
|
75
|
+
* limit switch (alphinity-tffi #774, a permanent design choice), and
|
|
76
|
+
* pump feedback reaches the bus but nothing consumes it as a position.
|
|
77
|
+
* Showing either as "real" would present a derived number as measured -
|
|
78
|
+
* the exact confidently-wrong display this feature exists to prevent.
|
|
79
|
+
* A commanded value, honestly labeled, is the only real answer here.
|
|
80
|
+
*/
|
|
81
|
+
realValue?: number | string | boolean;
|
|
82
|
+
}
|
|
51
83
|
/**
|
|
52
84
|
* Live telemetry value with status
|
|
53
85
|
*/
|
|
@@ -98,6 +130,11 @@ interface TelemetryBinding {
|
|
|
98
130
|
tag: string;
|
|
99
131
|
/** Current telemetry value */
|
|
100
132
|
value: TelemetryValue;
|
|
133
|
+
/**
|
|
134
|
+
* Maintenance force state (#3607, R19). Absent or `active: false` means
|
|
135
|
+
* the value is a real reading; render nothing extra. See `ForcedState`.
|
|
136
|
+
*/
|
|
137
|
+
forced?: ForcedState;
|
|
101
138
|
/**
|
|
102
139
|
* Uniform scaling / EU metadata (units, range, precision). When present it is
|
|
103
140
|
* the authoritative source for the displayed units, decimal precision, and
|
|
@@ -197,10 +234,34 @@ interface ControlPanelProps extends react__default.HTMLAttributes<HTMLDivElement
|
|
|
197
234
|
modeOptions: SelectorOption[];
|
|
198
235
|
/** Callback when mode changes */
|
|
199
236
|
onModeChange: (mode: string) => void;
|
|
200
|
-
/**
|
|
237
|
+
/** Typed/target setpoint value (editable) */
|
|
201
238
|
setpointValue: number | string;
|
|
202
239
|
/** Callback when setpoint changes */
|
|
203
240
|
onSetpointChange: (value: number | string) => void;
|
|
241
|
+
/**
|
|
242
|
+
* The setpoint the control loop is currently running: read-only feedback
|
|
243
|
+
* from live telemetry, shown beside the typed setpoint above so an
|
|
244
|
+
* operator sees target and current separately (the typed field never
|
|
245
|
+
* "snaps back" to reflect the live value).
|
|
246
|
+
*
|
|
247
|
+
* Optional and hidden by default: the caller decides when a live-feedback
|
|
248
|
+
* row is worth showing, since always showing a normally-differing current
|
|
249
|
+
* value can read as a fault when none exists. When this tag carries a
|
|
250
|
+
* maintenance force, the caller MUST pass this prop at that time - a
|
|
251
|
+
* hidden value shows nothing, forced or not, but a shown value must carry
|
|
252
|
+
* its FORCED mark (#3607, R19).
|
|
253
|
+
*/
|
|
254
|
+
currentSetpointValue?: number | string;
|
|
255
|
+
/**
|
|
256
|
+
* True when `currentSetpointValue` is a maintenance force, not a measured
|
|
257
|
+
* reading. Ignored when `currentSetpointValue` is not provided.
|
|
258
|
+
*/
|
|
259
|
+
currentSetpointForced?: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* The real, unforced value for `currentSetpointValue`. Optional; absent
|
|
262
|
+
* until the backend publishes it (alphinity-tffi unit U3b).
|
|
263
|
+
*/
|
|
264
|
+
currentSetpointRealValue?: number | string;
|
|
204
265
|
/** Current second setpoint value (for ramp mode, etc.) */
|
|
205
266
|
secondSetpointValue?: number | string;
|
|
206
267
|
/** Callback when second setpoint changes */
|
|
@@ -266,6 +327,24 @@ interface StatusIndicatorProps extends react__default.HTMLAttributes<HTMLDivElem
|
|
|
266
327
|
shape?: 'circle' | 'square' | 'diamond';
|
|
267
328
|
/** Whether the indicator should have a 3D LED effect */
|
|
268
329
|
led?: boolean;
|
|
330
|
+
/** Whether the indicator is rendered at all. When false, nothing is rendered. Defaults to true. */
|
|
331
|
+
visible?: boolean;
|
|
332
|
+
/**
|
|
333
|
+
* True when the underlying tag's state is a maintenance force, not a
|
|
334
|
+
* measured reading (#3607, R19). Renders a small glyph badge, never a
|
|
335
|
+
* color change: this indicator's whole signal is color plus a short
|
|
336
|
+
* label today, and color alone fails a colorblind operator.
|
|
337
|
+
*/
|
|
338
|
+
forced?: boolean;
|
|
339
|
+
/**
|
|
340
|
+
* The real, unforced state, shown as text beside `label` when `forced`
|
|
341
|
+
* is true. For a forced discrete OUTPUT (a lamp, a valve OPEN/CLOSED
|
|
342
|
+
* indicator - R2), this is the state the system would command if the
|
|
343
|
+
* force were not active, not a second physical reading. Optional:
|
|
344
|
+
* absent until the backend publishes it. When absent, only the forced
|
|
345
|
+
* glyph badge renders.
|
|
346
|
+
*/
|
|
347
|
+
realValue?: string;
|
|
269
348
|
}
|
|
270
349
|
declare const StatusIndicator: react__default.FC<StatusIndicatorProps>;
|
|
271
350
|
|
|
@@ -290,6 +369,19 @@ interface ValueEntryProps extends Omit<react__default.InputHTMLAttributes<HTMLIn
|
|
|
290
369
|
label?: string;
|
|
291
370
|
/** Whether the input is read-only */
|
|
292
371
|
readOnly?: boolean;
|
|
372
|
+
/**
|
|
373
|
+
* True when `value` is a maintenance force, not a measured reading
|
|
374
|
+
* (#3607, R19). Source: the control program's Sts_SimulationActive flag.
|
|
375
|
+
* Renders a FORCED badge; never changes `status`, which stays an
|
|
376
|
+
* independent fact about the same reading.
|
|
377
|
+
*/
|
|
378
|
+
forced?: boolean;
|
|
379
|
+
/**
|
|
380
|
+
* The real, unforced value, shown beside `value` when `forced` is true.
|
|
381
|
+
* Optional: the backend does not publish this for every tag kind yet
|
|
382
|
+
* (alphinity-tffi unit U3b). When absent, only the FORCED badge renders.
|
|
383
|
+
*/
|
|
384
|
+
realValue?: number | string;
|
|
293
385
|
}
|
|
294
386
|
declare const ValueEntry: react__default.FC<ValueEntryProps>;
|
|
295
387
|
|
|
@@ -314,6 +406,16 @@ interface LegacyValueEntryProps extends Omit<react__default.InputHTMLAttributes<
|
|
|
314
406
|
label?: string;
|
|
315
407
|
/** Whether the input is read-only */
|
|
316
408
|
readOnly?: boolean;
|
|
409
|
+
/**
|
|
410
|
+
* True when `value` is a maintenance force, not a measured reading
|
|
411
|
+
* (#3607, R19). Renders a FORCED badge; never changes `status`.
|
|
412
|
+
*/
|
|
413
|
+
forced?: boolean;
|
|
414
|
+
/**
|
|
415
|
+
* The real, unforced value, shown beside `value` when `forced` is true.
|
|
416
|
+
* Optional; absent until the backend publishes it (unit U3b).
|
|
417
|
+
*/
|
|
418
|
+
realValue?: number | string;
|
|
317
419
|
}
|
|
318
420
|
declare const LegacyValueEntry: react__default.FC<LegacyValueEntryProps>;
|
|
319
421
|
|
|
@@ -328,10 +430,16 @@ interface NodeControlConfig {
|
|
|
328
430
|
currentMode: string;
|
|
329
431
|
/** Callback when mode changes */
|
|
330
432
|
onModeChange: (mode: string) => void;
|
|
331
|
-
/**
|
|
433
|
+
/** Typed/target setpoint value (editable) */
|
|
332
434
|
setpoint: number | string;
|
|
333
435
|
/** Callback when setpoint changes */
|
|
334
436
|
onSetpointChange: (value: number | string) => void;
|
|
437
|
+
/** Current setpoint: read-only feedback from live telemetry. See ControlPanelProps.currentSetpointValue. */
|
|
438
|
+
currentSetpoint?: number | string;
|
|
439
|
+
/** True when `currentSetpoint` is a maintenance force, not a measured reading. */
|
|
440
|
+
currentSetpointForced?: boolean;
|
|
441
|
+
/** The real, unforced value for `currentSetpoint`. Optional; absent until the backend publishes it. */
|
|
442
|
+
currentSetpointRealValue?: number | string;
|
|
335
443
|
/** Optional second setpoint value */
|
|
336
444
|
secondSetpoint?: number | string;
|
|
337
445
|
/** Callback for second setpoint */
|
|
@@ -450,6 +558,11 @@ interface ControlParameter {
|
|
|
450
558
|
precision?: number;
|
|
451
559
|
/** Current value */
|
|
452
560
|
value: number | string | boolean;
|
|
561
|
+
/**
|
|
562
|
+
* Maintenance force state for this parameter (#3607, R19). Absent or
|
|
563
|
+
* `active: false` means `value` is a real reading. See `ForcedState`.
|
|
564
|
+
*/
|
|
565
|
+
forced?: ForcedState;
|
|
453
566
|
/** Whether parameter is read-only */
|
|
454
567
|
readOnly?: boolean;
|
|
455
568
|
/** Parameter type */
|
|
@@ -758,6 +871,11 @@ interface TrendLineProps {
|
|
|
758
871
|
color?: string;
|
|
759
872
|
strokeWidth?: number;
|
|
760
873
|
backgroundColor?: string;
|
|
874
|
+
/**
|
|
875
|
+
* True when `values` trends a maintenance force, not measured readings
|
|
876
|
+
* (#3607, R19). Renders a FORCED tag; the trend line itself is unchanged.
|
|
877
|
+
*/
|
|
878
|
+
forced?: boolean;
|
|
761
879
|
}
|
|
762
880
|
interface CircularGaugeProps {
|
|
763
881
|
value: number;
|
|
@@ -766,12 +884,27 @@ interface CircularGaugeProps {
|
|
|
766
884
|
label: string;
|
|
767
885
|
size?: number;
|
|
768
886
|
color?: string;
|
|
887
|
+
/**
|
|
888
|
+
* True when `value` is a maintenance force, not a measured reading
|
|
889
|
+
* (#3607, R19). Source: the control program's Sts_SimulationActive flag.
|
|
890
|
+
*/
|
|
891
|
+
forced?: boolean;
|
|
892
|
+
/**
|
|
893
|
+
* The real, unforced value, shown beside `value` when `forced` is true.
|
|
894
|
+
* Optional; absent until the backend publishes it (unit U3b).
|
|
895
|
+
*/
|
|
896
|
+
realValue?: number;
|
|
769
897
|
}
|
|
770
898
|
interface SparklineProps {
|
|
771
899
|
data: number[];
|
|
772
900
|
width: number;
|
|
773
901
|
height: number;
|
|
774
902
|
color: string;
|
|
903
|
+
/**
|
|
904
|
+
* True when `data` trends a maintenance force, not measured readings
|
|
905
|
+
* (#3607, R19). Renders a FORCED tag; the trend line itself is unchanged.
|
|
906
|
+
*/
|
|
907
|
+
forced?: boolean;
|
|
775
908
|
}
|
|
776
909
|
interface EquipmentIndicatorWithSparklineProps {
|
|
777
910
|
svgX: number;
|
|
@@ -784,6 +917,13 @@ interface EquipmentIndicatorWithSparklineProps {
|
|
|
784
917
|
x: number;
|
|
785
918
|
y: number;
|
|
786
919
|
};
|
|
920
|
+
/**
|
|
921
|
+
* True when this equipment's state is a maintenance force, not a measured
|
|
922
|
+
* reading (#3607, R19). Renders a small glyph badge, never a color
|
|
923
|
+
* change: this indicator's whole signal is color plus a short label
|
|
924
|
+
* today, and color alone fails a colorblind operator.
|
|
925
|
+
*/
|
|
926
|
+
forced?: boolean;
|
|
787
927
|
}
|
|
788
928
|
interface EquipmentIndicatorProps {
|
|
789
929
|
svgX: number;
|
|
@@ -793,6 +933,12 @@ interface EquipmentIndicatorProps {
|
|
|
793
933
|
size?: number;
|
|
794
934
|
style?: react__default.CSSProperties;
|
|
795
935
|
className?: string;
|
|
936
|
+
/**
|
|
937
|
+
* True when this equipment's state is a maintenance force, not a measured
|
|
938
|
+
* reading (#3607, R19). Renders a small glyph badge, never a color
|
|
939
|
+
* change. See EquipmentIndicatorWithSparklineProps.forced.
|
|
940
|
+
*/
|
|
941
|
+
forced?: boolean;
|
|
796
942
|
}
|
|
797
943
|
interface FullscreenWorkspaceTab {
|
|
798
944
|
label: string;
|
|
@@ -954,11 +1100,11 @@ declare const CardUnit: _emotion_styled.StyledComponent<{
|
|
|
954
1100
|
as?: React.ElementType;
|
|
955
1101
|
}, react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
956
1102
|
|
|
957
|
-
declare const TrendLine: ({ values, width, height, color, strokeWidth, backgroundColor, }: TrendLineProps) => react.JSX.Element;
|
|
958
|
-
declare const CircularGauge: ({ value, max, unit, label, size, color, }: CircularGaugeProps) => react.JSX.Element;
|
|
959
|
-
declare const Sparkline: ({ data, width, height, color }: SparklineProps) => react.JSX.Element | null;
|
|
960
|
-
declare const EquipmentIndicatorWithSparkline: ({ svgX, svgY, color, label, size, sparklineData, sparklineOffset, }: EquipmentIndicatorWithSparklineProps) => react.JSX.Element;
|
|
961
|
-
declare const EquipmentIndicator: ({ svgX, svgY, color, label, size, style, className, }: EquipmentIndicatorProps) => react.JSX.Element;
|
|
1103
|
+
declare const TrendLine: ({ values, width, height, color, strokeWidth, backgroundColor, forced, }: TrendLineProps) => react.JSX.Element;
|
|
1104
|
+
declare const CircularGauge: ({ value, max, unit, label, size, color, forced, realValue, }: CircularGaugeProps) => react.JSX.Element;
|
|
1105
|
+
declare const Sparkline: ({ data, width, height, color, forced }: SparklineProps) => react.JSX.Element | null;
|
|
1106
|
+
declare const EquipmentIndicatorWithSparkline: ({ svgX, svgY, color, label, size, sparklineData, sparklineOffset, forced, }: EquipmentIndicatorWithSparklineProps) => react.JSX.Element;
|
|
1107
|
+
declare const EquipmentIndicator: ({ svgX, svgY, color, label, size, style, className, forced, }: EquipmentIndicatorProps) => react.JSX.Element;
|
|
962
1108
|
|
|
963
1109
|
declare function FullscreenWorkspace({ svgContent, overlays, leftPanel, rightPanel, footer, tabs, activeTab, onTabChange, defaultLeftCollapsed, defaultRightCollapsed, leftCollapsed: leftCollapsedProp, rightCollapsed: rightCollapsedProp, onLeftCollapseChange, onRightCollapseChange, displayMode, defaultDisplayMode, onDisplayModeChange, showDisplayModeToggle, showZoomControls, onZoomIn, onZoomOut, onResetZoom, zoomDisabled, className, ...rest }: FullscreenWorkspaceProps): react__default.ReactElement;
|
|
964
1110
|
|
|
@@ -1018,6 +1164,29 @@ type StatusColorMap = Partial<Record<DeviceStatus, Partial<StatusColorEntry>>>;
|
|
|
1018
1164
|
* - stopping: amber (transitional)
|
|
1019
1165
|
*/
|
|
1020
1166
|
declare const DEFAULT_STATUS_COLORS: Record<DeviceStatus, StatusColorEntry>;
|
|
1167
|
+
/**
|
|
1168
|
+
* Maintenance-force marking color (#3607, R19). Deliberately outside
|
|
1169
|
+
* DEFAULT_STATUS_COLORS: a forced value is not a health status, and must
|
|
1170
|
+
* never share a color with warning/alarm/fault or read as one of them.
|
|
1171
|
+
* Violet is unused elsewhere in this palette.
|
|
1172
|
+
*
|
|
1173
|
+
* Light fill + dark text, not a solid vivid chip: reads as a calm marker
|
|
1174
|
+
* rather than an alarm sticker, while the vivid `border` shade still
|
|
1175
|
+
* outlines a forced value's box/ring so it stays findable at a glance.
|
|
1176
|
+
*/
|
|
1177
|
+
declare const FORCED_MARK_COLOR: StatusColorEntry;
|
|
1178
|
+
/**
|
|
1179
|
+
* Position-unknown marking color (views-library #27). Deliberately outside
|
|
1180
|
+
* DEFAULT_STATUS_COLORS, for the same reason as FORCED_MARK_COLOR: a device
|
|
1181
|
+
* whose position the control system has disclaimed is not a health status,
|
|
1182
|
+
* and must not compete with warning/alarm/fault. Values match the consuming
|
|
1183
|
+
* HMI ISA token module (light theme).
|
|
1184
|
+
*
|
|
1185
|
+
* `fill` is the pattern background, `text` is the hatch line color.
|
|
1186
|
+
*/
|
|
1187
|
+
declare const UNKNOWN_MARK_COLOR: StatusColorEntry;
|
|
1188
|
+
/** Dark-theme values for UNKNOWN_MARK_COLOR. */
|
|
1189
|
+
declare const UNKNOWN_MARK_COLOR_DARK: StatusColorEntry;
|
|
1021
1190
|
/**
|
|
1022
1191
|
* Resolve a status string to a full color entry.
|
|
1023
1192
|
*
|
|
@@ -1043,6 +1212,13 @@ interface NodeInstance {
|
|
|
1043
1212
|
fill?: string;
|
|
1044
1213
|
stroke?: string;
|
|
1045
1214
|
};
|
|
1215
|
+
/**
|
|
1216
|
+
* Opt-in. True when the control system has disclaimed this device's position
|
|
1217
|
+
* (for example a valve with bad limit-switch feedback). The symbol renders
|
|
1218
|
+
* with a diagonal hatch, a non-colour cue, so it differs from a CLOSED
|
|
1219
|
+
* symbol. Default off. Wins over status and customColors.
|
|
1220
|
+
*/
|
|
1221
|
+
positionUnknown?: boolean;
|
|
1046
1222
|
metadata?: Record<string, unknown>;
|
|
1047
1223
|
}
|
|
1048
1224
|
interface Transform {
|
|
@@ -1340,6 +1516,34 @@ interface UseTelemetryStatusOptions {
|
|
|
1340
1516
|
*/
|
|
1341
1517
|
declare function useTelemetryStatus(telemetry: TelemetryMap, diagram: Diagram, setDiagram: (diagram: Diagram) => void, options?: UseTelemetryStatusOptions): void;
|
|
1342
1518
|
|
|
1519
|
+
/** Options for the signal-binding sync. */
|
|
1520
|
+
interface UseBooleanIndicatorsOptions {
|
|
1521
|
+
/** Whether the sync is enabled (default: true). Disable in edit mode. */
|
|
1522
|
+
enabled?: boolean;
|
|
1523
|
+
/** Symbol id treated as a status indicator (default: 'status-indicator'). */
|
|
1524
|
+
symbolId?: string;
|
|
1525
|
+
}
|
|
1526
|
+
/**
|
|
1527
|
+
* Drive a status-indicator node's color and visibility from independent named
|
|
1528
|
+
* signals.
|
|
1529
|
+
*
|
|
1530
|
+
* Each indicator node names two tags in its metadata:
|
|
1531
|
+
* - `colorSource` — a tag whose truthy value shows `onColor`, falsy shows `offColor`.
|
|
1532
|
+
* - `visibleSource` — a tag whose truthy value shows the node, falsy hides it.
|
|
1533
|
+
*
|
|
1534
|
+
* Both are resolved against a tag → value index built from every published
|
|
1535
|
+
* telemetry binding, so color and visibility can follow completely different
|
|
1536
|
+
* signals. A blank source leaves that property alone (color unbound, visibility
|
|
1537
|
+
* static). Writes `customColors.fill` and `visible` — never touches the renderer
|
|
1538
|
+
* props, so the NodeRenderer memo boundary stays intact.
|
|
1539
|
+
*
|
|
1540
|
+
* @example
|
|
1541
|
+
* ```tsx
|
|
1542
|
+
* useBooleanIndicators(telemetry, diagram, setDiagram, { enabled: mode === 'runtime' });
|
|
1543
|
+
* ```
|
|
1544
|
+
*/
|
|
1545
|
+
declare function useBooleanIndicators(telemetry: TelemetryMap, diagram: Diagram, setDiagram: (diagram: Diagram) => void, options?: UseBooleanIndicatorsOptions): void;
|
|
1546
|
+
|
|
1343
1547
|
interface DragPoint {
|
|
1344
1548
|
x: number;
|
|
1345
1549
|
y: number;
|
|
@@ -1549,6 +1753,10 @@ interface NodeConfigPanelProps {
|
|
|
1549
1753
|
onUpdateTelemetry: (updates: any) => void;
|
|
1550
1754
|
/** Callback when telemetry binding is added for the first time */
|
|
1551
1755
|
onAddTelemetry?: () => void;
|
|
1756
|
+
/** Callback to remove/clear the telemetry binding for this node */
|
|
1757
|
+
onRemoveTelemetry?: () => void;
|
|
1758
|
+
/** Known signal/tag names, used to autocomplete and validate 'tag' fields. */
|
|
1759
|
+
availableTags?: string[];
|
|
1552
1760
|
/** Callback when node is removed */
|
|
1553
1761
|
onRemove: () => void;
|
|
1554
1762
|
/** Additional CSS class name */
|
|
@@ -1570,7 +1778,7 @@ interface NodeConfigPanelProps {
|
|
|
1570
1778
|
* />
|
|
1571
1779
|
* ```
|
|
1572
1780
|
*/
|
|
1573
|
-
declare function NodeConfigPanel({ node, binding, onUpdateNode, onUpdateTelemetry, onAddTelemetry, onRemove, className, style, }: NodeConfigPanelProps): react__default.JSX.Element;
|
|
1781
|
+
declare function NodeConfigPanel({ node, binding, onUpdateNode, onUpdateTelemetry, onAddTelemetry, onRemoveTelemetry, availableTags, onRemove, className, style, }: NodeConfigPanelProps): react__default.JSX.Element;
|
|
1574
1782
|
|
|
1575
1783
|
/**
|
|
1576
1784
|
* Validates a diagram object structure
|
|
@@ -1651,6 +1859,60 @@ declare function getSymbolDefinition(symbolId: string): SymbolDefinition | undef
|
|
|
1651
1859
|
*/
|
|
1652
1860
|
declare function getAvailableSymbols(): string[];
|
|
1653
1861
|
|
|
1862
|
+
/**
|
|
1863
|
+
* Appearance schema — the reusable contract for per-element editable properties.
|
|
1864
|
+
*
|
|
1865
|
+
* A placeable element declares its editable appearance fields as data. The
|
|
1866
|
+
* properties panel (NodeConfigPanel) renders any schema generically, and the
|
|
1867
|
+
* renderer (NodeRenderer) reads the same defaults. Add a new element by adding
|
|
1868
|
+
* one schema entry — no panel code changes. This is the pattern the
|
|
1869
|
+
* "add a placeable element" skill generates.
|
|
1870
|
+
*/
|
|
1871
|
+
type AppearanceFieldKind = 'select' | 'boolean' | 'number' | 'text' | 'tag';
|
|
1872
|
+
/**
|
|
1873
|
+
* Where a field's value is read from and written to on the NodeInstance.
|
|
1874
|
+
* - 'metadata' (default): the untyped node.metadata bag, keyed by field.key
|
|
1875
|
+
* - 'visible': the node.visible flag
|
|
1876
|
+
* - 'scale': node.transform.scale (via valueMap for select options)
|
|
1877
|
+
*/
|
|
1878
|
+
type AppearanceTarget = 'metadata' | 'visible' | 'scale';
|
|
1879
|
+
interface AppearanceField {
|
|
1880
|
+
/** metadata key, or the driver for the special 'visible'/'scale' targets */
|
|
1881
|
+
key: string;
|
|
1882
|
+
kind: AppearanceFieldKind;
|
|
1883
|
+
/** Human label for the panel; defaults to key when absent */
|
|
1884
|
+
label?: string;
|
|
1885
|
+
/** Options for kind 'select' */
|
|
1886
|
+
options?: string[];
|
|
1887
|
+
/** Where the value is stored; defaults to 'metadata' */
|
|
1888
|
+
target?: AppearanceTarget;
|
|
1889
|
+
/** Default value when the node has no value set */
|
|
1890
|
+
default?: string | number | boolean;
|
|
1891
|
+
/** For target 'scale': maps a select option to a numeric scale factor */
|
|
1892
|
+
valueMap?: Record<string, number>;
|
|
1893
|
+
/** Optional help text shown under the control in the panel */
|
|
1894
|
+
help?: string;
|
|
1895
|
+
}
|
|
1896
|
+
type AppearanceValue = string | number | boolean;
|
|
1897
|
+
/** Named color presets for the boolean indicator (name → hex). */
|
|
1898
|
+
declare const COLOR_PRESETS: Record<string, string>;
|
|
1899
|
+
/** Resolve a color preset name to a hex value, falling back to grey. */
|
|
1900
|
+
declare function resolvePresetColor(name: string | undefined): string;
|
|
1901
|
+
/** Appearance schema for the Status LED symbol. */
|
|
1902
|
+
declare const STATUS_LED_APPEARANCE: AppearanceField[];
|
|
1903
|
+
/** Return the editable appearance fields for a symbol, or [] if it declares none. */
|
|
1904
|
+
declare function getAppearanceSchema(symbolId: string): AppearanceField[];
|
|
1905
|
+
/**
|
|
1906
|
+
* Default values for the 'metadata'-targeted fields of a symbol, keyed by field key.
|
|
1907
|
+
* The renderer merges these under the node's own metadata, so a freshly dropped
|
|
1908
|
+
* element looks correct before any editing.
|
|
1909
|
+
*/
|
|
1910
|
+
declare function getAppearanceDefaults(symbolId: string): Record<string, AppearanceValue>;
|
|
1911
|
+
/** Read the current value of a field from a node, applying the field default. */
|
|
1912
|
+
declare function readAppearanceValue(node: NodeInstance, field: AppearanceField): AppearanceValue;
|
|
1913
|
+
/** Produce the NodeInstance update for a new field value. */
|
|
1914
|
+
declare function writeAppearanceValue(node: NodeInstance, field: AppearanceField, value: AppearanceValue): Partial<NodeInstance>;
|
|
1915
|
+
|
|
1654
1916
|
/**
|
|
1655
1917
|
* Telemetry status type
|
|
1656
1918
|
*/
|
|
@@ -1730,6 +1992,15 @@ interface ConfigParameter {
|
|
|
1730
1992
|
type: 'number' | 'string' | 'boolean' | 'select' | 'multiselect';
|
|
1731
1993
|
/** Current value */
|
|
1732
1994
|
value: any;
|
|
1995
|
+
/**
|
|
1996
|
+
* Maintenance force state for this parameter (#3607, R19). A field the
|
|
1997
|
+
* operator has not overridden falls back to control's live value (the
|
|
1998
|
+
* pilet's own DashboardScreen does this on every config refresh), so
|
|
1999
|
+
* `value` here can be a live, forced reading, not only a static setting.
|
|
2000
|
+
* Absent or `active: false` means `value` is a real reading or a real
|
|
2001
|
+
* saved setting. See `ForcedState`.
|
|
2002
|
+
*/
|
|
2003
|
+
forced?: ForcedState;
|
|
1733
2004
|
/** Default value */
|
|
1734
2005
|
defaultValue?: any;
|
|
1735
2006
|
/** Whether parameter is read-only */
|
|
@@ -2058,4 +2329,4 @@ interface SimulationOptions {
|
|
|
2058
2329
|
*/
|
|
2059
2330
|
declare function useSimulation(telemetry: TelemetryMap, updateTelemetryBatch: (updates: Array<any>) => void, options?: SimulationOptions): void;
|
|
2060
2331
|
|
|
2061
|
-
export { type AnchorType, Button, type ButtonProps, CardHeader, CardUnit, CardValue, CircularGauge, type CircularGaugeProps, type CommandKind, type ConfigActions, type ConfigDisplay, type ConfigParameter, type ConfigSection, type ConfigState, type ConfigTheme, type ControlCapabilities, type ControlMode, ControlPanel, type ControlPanelProps, type ControlParameter, type ControlState, type CustomAction, DEFAULT_STATUS_COLORS, DEFAULT_THRESHOLDS, DashboardCard, type DataBinding, type DeviceConfigBinding, type DeviceConfigMap, DeviceConfigPanel, type DeviceConfigPanelProps, type DeviceControlBinding, type DeviceControlMap, DeviceControlPanel, type DeviceControlPanelProps, type DeviceStatus, type Diagram, type DiagramMetadata, type DisplayMode, DisplayModeToggle, type DragPoint, type DragState, EquipmentIndicator, type EquipmentIndicatorProps, EquipmentIndicatorWithSparkline, type EquipmentIndicatorWithSparklineProps, FixedSVGContainer, FooterPanel, FullscreenContainer, FullscreenWorkspace, type FullscreenWorkspaceProps, type FullscreenWorkspaceTab, type KeyboardShortcutsOptions, LeftPanel, LeftToggleButton, LegacyValueEntry, type LegacyValueEntryProps, type ModeConfig, NodeConfigPanel, type NodeConfigPanelProps, type NodeControlConfig, NodeControlsPanel, type NodeControlsPanelProps, type NodeInstance, NumpadDialog, type NumpadDialogProps, type Overlay, type OverlayContent, type OverlayTheme, type OverlayType, PIDCanvas, type PIDCanvasControls, type PIDCanvasFeatures, type PIDCanvasProps, PanelContent, PanelTabs, type PipeEdge, type PipeStyle, type Point, type PortDefinition, type PortInstance, type PortType, RightPanel, RightToggleButton, SVGArea, SVGLockedOverlay, type SVGLockedOverlayProps, type ScalingMetadata, ScrollableSVGWrapper, type SelectionState, Selector, type SelectorOption, type SelectorProps, type SimulationOptions, Sparkline, type SparklineProps, type StatusColorEntry, type StatusColorMap, StatusIndicator, type StatusIndicatorProps, type SymbolCategory, type SymbolDefinition, SymbolLibrary, type SymbolLibraryProps, type SymbolMetadata, type TelemetryBinding, type TelemetryMap, type TelemetryStatus$1 as TelemetryStatus, type TelemetryValue, ThemeProvider, ThemeToggle, type ThemeToggleProps, type Thresholds, type Transform, TrendLine, type TrendLineProps, type UseDeviceControlsOptions, type UseDragOptions, type UseDragResult, type UseSelectionOptions, type UseSelectionResult, type UseTelemetryOptions, type UseTelemetryResult, type UseTelemetryStatusOptions, type UseViewBoxOptions, type UseViewBoxResult, ValueEntry, type ValueEntryProps, type ViewBox, ZoomButton, ZoomControls, calculateThresholdStatus, createConfigBinding, createControlBinding, exampleDiagram, exportDiagram, generateRoutePoints, getAvailableSymbols, getPortWorldPosition, getSymbolDefinition, importDiagram, mockSymbolLibrary, nodeHasPort, overlayStyles, registerSymbol, registerSymbols, resolveStatusColor, useDeviceConfigs, useDeviceControls, useDrag, useKeyboardShortcuts, useSelection, useSimulation, useTelemetry, useTelemetryStatus, useTheme, useViewBox, validateDiagram };
|
|
2332
|
+
export { type AnchorType, type AppearanceField, type AppearanceFieldKind, type AppearanceTarget, type AppearanceValue, Button, type ButtonProps, COLOR_PRESETS, CardHeader, CardUnit, CardValue, CircularGauge, type CircularGaugeProps, type CommandKind, type ConfigActions, type ConfigDisplay, type ConfigParameter, type ConfigSection, type ConfigState, type ConfigTheme, type ControlCapabilities, type ControlMode, ControlPanel, type ControlPanelProps, type ControlParameter, type ControlState, type CustomAction, DEFAULT_STATUS_COLORS, DEFAULT_THRESHOLDS, DashboardCard, type DataBinding, type DeviceConfigBinding, type DeviceConfigMap, DeviceConfigPanel, type DeviceConfigPanelProps, type DeviceControlBinding, type DeviceControlMap, DeviceControlPanel, type DeviceControlPanelProps, type DeviceStatus, type Diagram, type DiagramMetadata, type DisplayMode, DisplayModeToggle, type DragPoint, type DragState, EquipmentIndicator, type EquipmentIndicatorProps, EquipmentIndicatorWithSparkline, type EquipmentIndicatorWithSparklineProps, FORCED_MARK_COLOR, FixedSVGContainer, FooterPanel, type ForcedState, FullscreenContainer, FullscreenWorkspace, type FullscreenWorkspaceProps, type FullscreenWorkspaceTab, type KeyboardShortcutsOptions, LeftPanel, LeftToggleButton, LegacyValueEntry, type LegacyValueEntryProps, type ModeConfig, NodeConfigPanel, type NodeConfigPanelProps, type NodeControlConfig, NodeControlsPanel, type NodeControlsPanelProps, type NodeInstance, NumpadDialog, type NumpadDialogProps, type Overlay, type OverlayContent, type OverlayTheme, type OverlayType, PIDCanvas, type PIDCanvasControls, type PIDCanvasFeatures, type PIDCanvasProps, PanelContent, PanelTabs, type PipeEdge, type PipeStyle, type Point, type PortDefinition, type PortInstance, type PortType, RightPanel, RightToggleButton, STATUS_LED_APPEARANCE, SVGArea, SVGLockedOverlay, type SVGLockedOverlayProps, type ScalingMetadata, ScrollableSVGWrapper, type SelectionState, Selector, type SelectorOption, type SelectorProps, type SimulationOptions, Sparkline, type SparklineProps, type StatusColorEntry, type StatusColorMap, StatusIndicator, type StatusIndicatorProps, type SymbolCategory, type SymbolDefinition, SymbolLibrary, type SymbolLibraryProps, type SymbolMetadata, type TelemetryBinding, type TelemetryMap, type TelemetryStatus$1 as TelemetryStatus, type TelemetryValue, ThemeProvider, ThemeToggle, type ThemeToggleProps, type Thresholds, type Transform, TrendLine, type TrendLineProps, UNKNOWN_MARK_COLOR, UNKNOWN_MARK_COLOR_DARK, type UseBooleanIndicatorsOptions, type UseDeviceControlsOptions, type UseDragOptions, type UseDragResult, type UseSelectionOptions, type UseSelectionResult, type UseTelemetryOptions, type UseTelemetryResult, type UseTelemetryStatusOptions, type UseViewBoxOptions, type UseViewBoxResult, ValueEntry, type ValueEntryProps, type ViewBox, ZoomButton, ZoomControls, calculateThresholdStatus, createConfigBinding, createControlBinding, exampleDiagram, exportDiagram, generateRoutePoints, getAppearanceDefaults, getAppearanceSchema, getAvailableSymbols, getPortWorldPosition, getSymbolDefinition, importDiagram, mockSymbolLibrary, nodeHasPort, overlayStyles, readAppearanceValue, registerSymbol, registerSymbols, resolvePresetColor, resolveStatusColor, useBooleanIndicators, useDeviceConfigs, useDeviceControls, useDrag, useKeyboardShortcuts, useSelection, useSimulation, useTelemetry, useTelemetryStatus, useTheme, useViewBox, validateDiagram, writeAppearanceValue };
|