@camstack/ui-library 1.1.46 → 1.2.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/composites/device-step-matrix.d.ts +8 -1
- package/dist/index.cjs +12 -9
- package/dist/index.js +12 -9
- package/package.json +1 -1
|
@@ -26,5 +26,12 @@ export interface DeviceStepMatrixProps {
|
|
|
26
26
|
/** Single-node fallback (B): which node the one column shows. */
|
|
27
27
|
readonly fallbackNodeId: string | null;
|
|
28
28
|
readonly onFallbackNodeChange: (nodeId: string) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Hide the col-1 gate entirely (per-node BASE view). When set, col-1 renders
|
|
31
|
+
* ONLY the step label — no gate/zone control — and its header reads "Step"
|
|
32
|
+
* instead of "Step · gate". Enablement in that view is per-camera, so the
|
|
33
|
+
* node-level matrix carries no gate. Default (absent/false) is unchanged.
|
|
34
|
+
*/
|
|
35
|
+
readonly hideGate?: boolean;
|
|
29
36
|
}
|
|
30
|
-
export declare function DeviceStepMatrix({ tree, agents, gateFor, getCellState, onCellClick, selectedCell, onSetGate, gateBusy, fallbackNodeId, onFallbackNodeChange, }: DeviceStepMatrixProps): import("react").JSX.Element;
|
|
37
|
+
export declare function DeviceStepMatrix({ tree, agents, gateFor, getCellState, onCellClick, selectedCell, onSetGate, gateBusy, fallbackNodeId, onFallbackNodeChange, hideGate, }: DeviceStepMatrixProps): import("react").JSX.Element;
|
package/dist/index.cjs
CHANGED
|
@@ -15088,11 +15088,11 @@ function ZoneBadge() {
|
|
|
15088
15088
|
})]
|
|
15089
15089
|
});
|
|
15090
15090
|
}
|
|
15091
|
-
function StepGateCell({ node, depth, gate, busy, onSet }) {
|
|
15091
|
+
function StepGateCell({ node, depth, gate, busy, onSet, hideGate }) {
|
|
15092
15092
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15093
15093
|
className: "sticky left-0 z-10 flex flex-col gap-2 border-b border-border bg-surface px-3 py-2.5 text-xs min-w-0",
|
|
15094
15094
|
style: { paddingLeft: `${12 + depth * 14}px` },
|
|
15095
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StepLabel, { node }), gate.kind === "zone-driven" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ZoneBadge, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GateControl, {
|
|
15095
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StepLabel, { node }), hideGate ? null : gate.kind === "zone-driven" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ZoneBadge, {}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GateControl, {
|
|
15096
15096
|
gate,
|
|
15097
15097
|
busy,
|
|
15098
15098
|
onSet
|
|
@@ -15135,7 +15135,7 @@ function NodeSelectorBar({ nodes, selected, onSelect }) {
|
|
|
15135
15135
|
]
|
|
15136
15136
|
});
|
|
15137
15137
|
}
|
|
15138
|
-
function MatrixGrid({ tree, agents, gateFor, getCellState, onCellClick, selectedCell, onSetGate, gateBusy, single }) {
|
|
15138
|
+
function MatrixGrid({ tree, agents, gateFor, getCellState, onCellClick, selectedCell, onSetGate, gateBusy, single, hideGate }) {
|
|
15139
15139
|
const rows = (0, react$1.useMemo)(() => flattenTree(tree), [tree]);
|
|
15140
15140
|
const groups = (0, react$1.useMemo)(() => groupAgentColumns(agents), [agents]);
|
|
15141
15141
|
const gridTemplate = single ? `minmax(0, 1.35fr) repeat(${agents.length}, minmax(0, 1fr))` : `${STEP_COL_REM}rem repeat(${agents.length}, 13rem)`;
|
|
@@ -15147,7 +15147,7 @@ function MatrixGrid({ tree, agents, gateFor, getCellState, onCellClick, selected
|
|
|
15147
15147
|
children: [
|
|
15148
15148
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
15149
15149
|
className: "sticky left-0 top-0 z-20 border-b border-border bg-muted/60 px-3 py-2 text-[10px] uppercase tracking-widest text-foreground-subtle",
|
|
15150
|
-
children: "Step · gate"
|
|
15150
|
+
children: hideGate ? "Step" : "Step · gate"
|
|
15151
15151
|
}),
|
|
15152
15152
|
groups.map((group) => group.grouped ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GroupedAgentHeader, { group }, group.agentNodeId) : group.columns.map((col) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15153
15153
|
className: "sticky top-0 z-10 min-w-0 border-b border-l border-border bg-muted/60 px-3 py-2",
|
|
@@ -15168,19 +15168,21 @@ function MatrixGrid({ tree, agents, gateFor, getCellState, onCellClick, selected
|
|
|
15168
15168
|
onCellClick,
|
|
15169
15169
|
selectedCell,
|
|
15170
15170
|
onSetGate,
|
|
15171
|
-
gateBusy
|
|
15171
|
+
gateBusy,
|
|
15172
|
+
hideGate
|
|
15172
15173
|
}, node.addonId))
|
|
15173
15174
|
]
|
|
15174
15175
|
})
|
|
15175
15176
|
});
|
|
15176
15177
|
}
|
|
15177
|
-
function MatrixRow({ node, depth, agents, gate, getCellState, onCellClick, selectedCell, onSetGate, gateBusy }) {
|
|
15178
|
+
function MatrixRow({ node, depth, agents, gate, getCellState, onCellClick, selectedCell, onSetGate, gateBusy, hideGate }) {
|
|
15178
15179
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StepGateCell, {
|
|
15179
15180
|
node,
|
|
15180
15181
|
depth,
|
|
15181
15182
|
gate,
|
|
15182
15183
|
busy: gateBusy,
|
|
15183
|
-
onSet: (next) => onSetGate(node.addonId, next)
|
|
15184
|
+
onSet: (next) => onSetGate(node.addonId, next),
|
|
15185
|
+
hideGate
|
|
15184
15186
|
}), agents.map((a) => {
|
|
15185
15187
|
const state = getCellState(node.addonId, a);
|
|
15186
15188
|
const isSelected = selectedCell !== null && selectedCell.addonId === node.addonId && agentColumnKey(selectedCell) === agentColumnKey(a);
|
|
@@ -15194,7 +15196,7 @@ function MatrixRow({ node, depth, agents, gate, getCellState, onCellClick, selec
|
|
|
15194
15196
|
}, agentColumnKey(a));
|
|
15195
15197
|
})] });
|
|
15196
15198
|
}
|
|
15197
|
-
function DeviceStepMatrix({ tree, agents, gateFor, getCellState, onCellClick, selectedCell, onSetGate, gateBusy, fallbackNodeId, onFallbackNodeChange }) {
|
|
15199
|
+
function DeviceStepMatrix({ tree, agents, gateFor, getCellState, onCellClick, selectedCell, onSetGate, gateBusy, fallbackNodeId, onFallbackNodeChange, hideGate }) {
|
|
15198
15200
|
const containerRef = (0, react$1.useRef)(null);
|
|
15199
15201
|
const [width, setWidth] = (0, react$1.useState)(0);
|
|
15200
15202
|
(0, react$1.useLayoutEffect)(() => {
|
|
@@ -15229,7 +15231,8 @@ function DeviceStepMatrix({ tree, agents, gateFor, getCellState, onCellClick, se
|
|
|
15229
15231
|
selectedCell,
|
|
15230
15232
|
onSetGate,
|
|
15231
15233
|
gateBusy,
|
|
15232
|
-
single: single && selectedNode !== null
|
|
15234
|
+
single: single && selectedNode !== null,
|
|
15235
|
+
hideGate
|
|
15233
15236
|
})]
|
|
15234
15237
|
});
|
|
15235
15238
|
}
|
package/dist/index.js
CHANGED
|
@@ -15064,11 +15064,11 @@ function ZoneBadge() {
|
|
|
15064
15064
|
})]
|
|
15065
15065
|
});
|
|
15066
15066
|
}
|
|
15067
|
-
function StepGateCell({ node, depth, gate, busy, onSet }) {
|
|
15067
|
+
function StepGateCell({ node, depth, gate, busy, onSet, hideGate }) {
|
|
15068
15068
|
return /* @__PURE__ */ jsxs("div", {
|
|
15069
15069
|
className: "sticky left-0 z-10 flex flex-col gap-2 border-b border-border bg-surface px-3 py-2.5 text-xs min-w-0",
|
|
15070
15070
|
style: { paddingLeft: `${12 + depth * 14}px` },
|
|
15071
|
-
children: [/* @__PURE__ */ jsx(StepLabel, { node }), gate.kind === "zone-driven" ? /* @__PURE__ */ jsx(ZoneBadge, {}) : /* @__PURE__ */ jsx(GateControl, {
|
|
15071
|
+
children: [/* @__PURE__ */ jsx(StepLabel, { node }), hideGate ? null : gate.kind === "zone-driven" ? /* @__PURE__ */ jsx(ZoneBadge, {}) : /* @__PURE__ */ jsx(GateControl, {
|
|
15072
15072
|
gate,
|
|
15073
15073
|
busy,
|
|
15074
15074
|
onSet
|
|
@@ -15111,7 +15111,7 @@ function NodeSelectorBar({ nodes, selected, onSelect }) {
|
|
|
15111
15111
|
]
|
|
15112
15112
|
});
|
|
15113
15113
|
}
|
|
15114
|
-
function MatrixGrid({ tree, agents, gateFor, getCellState, onCellClick, selectedCell, onSetGate, gateBusy, single }) {
|
|
15114
|
+
function MatrixGrid({ tree, agents, gateFor, getCellState, onCellClick, selectedCell, onSetGate, gateBusy, single, hideGate }) {
|
|
15115
15115
|
const rows = useMemo(() => flattenTree(tree), [tree]);
|
|
15116
15116
|
const groups = useMemo(() => groupAgentColumns(agents), [agents]);
|
|
15117
15117
|
const gridTemplate = single ? `minmax(0, 1.35fr) repeat(${agents.length}, minmax(0, 1fr))` : `${STEP_COL_REM}rem repeat(${agents.length}, 13rem)`;
|
|
@@ -15123,7 +15123,7 @@ function MatrixGrid({ tree, agents, gateFor, getCellState, onCellClick, selected
|
|
|
15123
15123
|
children: [
|
|
15124
15124
|
/* @__PURE__ */ jsx("div", {
|
|
15125
15125
|
className: "sticky left-0 top-0 z-20 border-b border-border bg-muted/60 px-3 py-2 text-[10px] uppercase tracking-widest text-foreground-subtle",
|
|
15126
|
-
children: "Step · gate"
|
|
15126
|
+
children: hideGate ? "Step" : "Step · gate"
|
|
15127
15127
|
}),
|
|
15128
15128
|
groups.map((group) => group.grouped ? /* @__PURE__ */ jsx(GroupedAgentHeader, { group }, group.agentNodeId) : group.columns.map((col) => /* @__PURE__ */ jsxs("div", {
|
|
15129
15129
|
className: "sticky top-0 z-10 min-w-0 border-b border-l border-border bg-muted/60 px-3 py-2",
|
|
@@ -15144,19 +15144,21 @@ function MatrixGrid({ tree, agents, gateFor, getCellState, onCellClick, selected
|
|
|
15144
15144
|
onCellClick,
|
|
15145
15145
|
selectedCell,
|
|
15146
15146
|
onSetGate,
|
|
15147
|
-
gateBusy
|
|
15147
|
+
gateBusy,
|
|
15148
|
+
hideGate
|
|
15148
15149
|
}, node.addonId))
|
|
15149
15150
|
]
|
|
15150
15151
|
})
|
|
15151
15152
|
});
|
|
15152
15153
|
}
|
|
15153
|
-
function MatrixRow({ node, depth, agents, gate, getCellState, onCellClick, selectedCell, onSetGate, gateBusy }) {
|
|
15154
|
+
function MatrixRow({ node, depth, agents, gate, getCellState, onCellClick, selectedCell, onSetGate, gateBusy, hideGate }) {
|
|
15154
15155
|
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(StepGateCell, {
|
|
15155
15156
|
node,
|
|
15156
15157
|
depth,
|
|
15157
15158
|
gate,
|
|
15158
15159
|
busy: gateBusy,
|
|
15159
|
-
onSet: (next) => onSetGate(node.addonId, next)
|
|
15160
|
+
onSet: (next) => onSetGate(node.addonId, next),
|
|
15161
|
+
hideGate
|
|
15160
15162
|
}), agents.map((a) => {
|
|
15161
15163
|
const state = getCellState(node.addonId, a);
|
|
15162
15164
|
const isSelected = selectedCell !== null && selectedCell.addonId === node.addonId && agentColumnKey(selectedCell) === agentColumnKey(a);
|
|
@@ -15170,7 +15172,7 @@ function MatrixRow({ node, depth, agents, gate, getCellState, onCellClick, selec
|
|
|
15170
15172
|
}, agentColumnKey(a));
|
|
15171
15173
|
})] });
|
|
15172
15174
|
}
|
|
15173
|
-
function DeviceStepMatrix({ tree, agents, gateFor, getCellState, onCellClick, selectedCell, onSetGate, gateBusy, fallbackNodeId, onFallbackNodeChange }) {
|
|
15175
|
+
function DeviceStepMatrix({ tree, agents, gateFor, getCellState, onCellClick, selectedCell, onSetGate, gateBusy, fallbackNodeId, onFallbackNodeChange, hideGate }) {
|
|
15174
15176
|
const containerRef = useRef(null);
|
|
15175
15177
|
const [width, setWidth] = useState(0);
|
|
15176
15178
|
useLayoutEffect(() => {
|
|
@@ -15205,7 +15207,8 @@ function DeviceStepMatrix({ tree, agents, gateFor, getCellState, onCellClick, se
|
|
|
15205
15207
|
selectedCell,
|
|
15206
15208
|
onSetGate,
|
|
15207
15209
|
gateBusy,
|
|
15208
|
-
single: single && selectedNode !== null
|
|
15210
|
+
single: single && selectedNode !== null,
|
|
15211
|
+
hideGate
|
|
15209
15212
|
})]
|
|
15210
15213
|
});
|
|
15211
15214
|
}
|