@procaaso/alphinity-ui-components 1.3.0 → 1.4.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.d.cts CHANGED
@@ -610,6 +610,14 @@ interface DeviceControlPanelProps {
610
610
  onModeChange?: (mode: string) => void;
611
611
  /** Called when parameter changes */
612
612
  onParameterChange?: (parameterId: string, value: any) => void;
613
+ /**
614
+ * Called when the operator activates (taps) a numeric/text parameter's value.
615
+ * When provided, that parameter renders as a tappable value instead of an
616
+ * inline input, so the consumer can open its own editor (e.g. a numpad dialog)
617
+ * and commit via `onParameterChange`. Read-only params are never activatable.
618
+ * When omitted, parameters use the default inline-edit behavior.
619
+ */
620
+ onParameterActivate?: (parameterId: string, value: number | string | boolean) => void;
613
621
  /** Called when start button clicked */
614
622
  onStart?: () => void;
615
623
  /** Called when stop button clicked */
@@ -637,7 +645,7 @@ interface DeviceControlPanelProps {
637
645
  /** Embedded mode - uses static positioning for rendering in containers (default: false) */
638
646
  embedded?: boolean;
639
647
  }
640
- declare function DeviceControlPanel({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onModeChange, onParameterChange, onStart, onStop, startPending, stopPending, onCustomAction, onOpenConfig, showConfigButton, onUndock, undockIcon, modeSelectionStyle, embedded, }: DeviceControlPanelProps): react__default.JSX.Element | null;
648
+ declare function DeviceControlPanel({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onModeChange, onParameterChange, onParameterActivate, onStart, onStop, startPending, stopPending, onCustomAction, onOpenConfig, showConfigButton, onUndock, undockIcon, modeSelectionStyle, embedded, }: DeviceControlPanelProps): react__default.JSX.Element | null;
641
649
 
642
650
  type DisplayMode = 'standard' | 'dashboard';
643
651
  interface FullscreenContainerProps {
package/dist/index.d.ts CHANGED
@@ -610,6 +610,14 @@ interface DeviceControlPanelProps {
610
610
  onModeChange?: (mode: string) => void;
611
611
  /** Called when parameter changes */
612
612
  onParameterChange?: (parameterId: string, value: any) => void;
613
+ /**
614
+ * Called when the operator activates (taps) a numeric/text parameter's value.
615
+ * When provided, that parameter renders as a tappable value instead of an
616
+ * inline input, so the consumer can open its own editor (e.g. a numpad dialog)
617
+ * and commit via `onParameterChange`. Read-only params are never activatable.
618
+ * When omitted, parameters use the default inline-edit behavior.
619
+ */
620
+ onParameterActivate?: (parameterId: string, value: number | string | boolean) => void;
613
621
  /** Called when start button clicked */
614
622
  onStart?: () => void;
615
623
  /** Called when stop button clicked */
@@ -637,7 +645,7 @@ interface DeviceControlPanelProps {
637
645
  /** Embedded mode - uses static positioning for rendering in containers (default: false) */
638
646
  embedded?: boolean;
639
647
  }
640
- declare function DeviceControlPanel({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onModeChange, onParameterChange, onStart, onStop, startPending, stopPending, onCustomAction, onOpenConfig, showConfigButton, onUndock, undockIcon, modeSelectionStyle, embedded, }: DeviceControlPanelProps): react__default.JSX.Element | null;
648
+ declare function DeviceControlPanel({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onModeChange, onParameterChange, onParameterActivate, onStart, onStop, startPending, stopPending, onCustomAction, onOpenConfig, showConfigButton, onUndock, undockIcon, modeSelectionStyle, embedded, }: DeviceControlPanelProps): react__default.JSX.Element | null;
641
649
 
642
650
  type DisplayMode = 'standard' | 'dashboard';
643
651
  interface FullscreenContainerProps {
package/dist/index.js CHANGED
@@ -935,6 +935,7 @@ function DeviceControlPanel({
935
935
  toastDuration = 3e3,
936
936
  onModeChange,
937
937
  onParameterChange,
938
+ onParameterActivate,
938
939
  onStart,
939
940
  onStop,
940
941
  startPending = false,
@@ -1647,6 +1648,36 @@ function DeviceControlPanel({
1647
1648
  },
1648
1649
  children: param.options?.map((opt) => /* @__PURE__ */ jsx8("option", { value: opt.value, children: opt.label }, opt.value))
1649
1650
  }
1651
+ ) : onParameterActivate && !param.readOnly ? (
1652
+ // Tappable value: defer editing to the consumer's editor (e.g. a
1653
+ // numpad dialog). Commit happens via onParameterChange.
1654
+ /* @__PURE__ */ jsxs7(
1655
+ "button",
1656
+ {
1657
+ type: "button",
1658
+ onClick: () => onParameterActivate(param.id, localParameterValues[param.id] ?? param.value),
1659
+ style: {
1660
+ width: "100%",
1661
+ height: touchSize,
1662
+ display: "flex",
1663
+ alignItems: "center",
1664
+ backgroundColor: "#ffffff",
1665
+ color: textColor,
1666
+ border: `1px solid ${borderColor}`,
1667
+ borderRadius: "6px",
1668
+ padding: "0 12px",
1669
+ fontSize: `${fontSize.input}px`,
1670
+ fontFamily: "Arial, sans-serif",
1671
+ fontWeight: 600,
1672
+ textAlign: "left",
1673
+ cursor: "pointer"
1674
+ },
1675
+ children: [
1676
+ localParameterValues[param.id] ?? param.value,
1677
+ param.unit ? ` ${param.unit}` : ""
1678
+ ]
1679
+ }
1680
+ )
1650
1681
  ) : /* @__PURE__ */ jsx8(
1651
1682
  "input",
1652
1683
  {