@imperosoft/cris-webui-components 1.1.2-beta.7 → 1.1.2-beta.9

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.mjs CHANGED
@@ -1381,6 +1381,7 @@ function DefaultSignalIndicator({ on }) {
1381
1381
  function MatrixItemRow({
1382
1382
  item,
1383
1383
  type,
1384
+ active,
1384
1385
  showChannels,
1385
1386
  onSelect,
1386
1387
  onToggleVideoMute,
@@ -1394,7 +1395,7 @@ function MatrixItemRow({
1394
1395
  renderIoIndicator,
1395
1396
  renderSignalIndicator
1396
1397
  }) {
1397
- const isActive = item.sl.on;
1398
+ const isActive = active;
1398
1399
  const isEnabled = item.sl.en;
1399
1400
  const classes = [
1400
1401
  "cris-co-matrix-item",
@@ -1418,8 +1419,8 @@ function MatrixItemRow({
1418
1419
  className: `cris-co-matrix-item-btn ${itemActiveClassName ?? ""}`,
1419
1420
  classActive: itemActiveClassName,
1420
1421
  children: /* @__PURE__ */ jsxs7("div", { style: { display: "flex", alignItems: "center", gap: 6, width: "100%" }, children: [
1421
- showChannels && /* @__PURE__ */ jsx8("span", { className: "cris-co-matrix-ch", style: { flexShrink: 0, opacity: 0.6 }, children: item.ch }),
1422
- /* @__PURE__ */ jsx8("span", { style: defaults.itemLabel, children: item.lb || `${type === "input" ? "Input" : "Output"} ${item.ch}` }),
1422
+ showChannels && /* @__PURE__ */ jsx8("span", { className: "cris-co-matrix-ch", style: { flexShrink: 0, opacity: 0.6 }, children: item.id }),
1423
+ /* @__PURE__ */ jsx8("span", { style: defaults.itemLabel, children: item.lb || `${type === "input" ? "Input" : "Output"} ${item.id}` }),
1423
1424
  /* @__PURE__ */ jsxs7("div", { style: defaults.indicators, children: [
1424
1425
  item.io.vs && (renderIoIndicator ? renderIoIndicator(item.io.on) : /* @__PURE__ */ jsx8(DefaultIoIndicator, { on: item.io.on })),
1425
1426
  item.sg.vs && (renderSignalIndicator ? renderSignalIndicator(item.sg.on) : /* @__PURE__ */ jsx8(DefaultSignalIndicator, { on: item.sg.on }))
@@ -1464,15 +1465,15 @@ function CrisCoMatrixListsTie({
1464
1465
  const matrix = useCustomObject2(oid);
1465
1466
  const send = useCustomObjectSend2();
1466
1467
  if (!matrix) return null;
1467
- const { ip: inputs, op: outputs } = matrix;
1468
- const handleSelectInput = (ch) => {
1469
- send(oid, { action: "selectInput", ch });
1468
+ const { si, ip: inputs, op: outputs } = matrix;
1469
+ const handleSelectInput = (id) => {
1470
+ send(oid, { action: "selectInput", id });
1470
1471
  };
1471
- const handleTie = (ch) => {
1472
- send(oid, { action: "tie", ch });
1472
+ const handleTie = (id) => {
1473
+ send(oid, { action: "tie", id });
1473
1474
  };
1474
- const handleToggleVideoMute = (type, ch) => {
1475
- send(oid, { action: "toggleVideoMute", type, ch });
1475
+ const handleToggleVideoMute = (type, id) => {
1476
+ send(oid, { action: "toggleVideoMute", type, id });
1476
1477
  };
1477
1478
  return /* @__PURE__ */ jsxs7(
1478
1479
  "div",
@@ -1499,9 +1500,10 @@ function CrisCoMatrixListsTie({
1499
1500
  {
1500
1501
  item,
1501
1502
  type: "input",
1503
+ active: si === item.id,
1502
1504
  showChannels,
1503
- onSelect: () => handleSelectInput(item.ch),
1504
- onToggleVideoMute: () => handleToggleVideoMute("input", item.ch),
1505
+ onSelect: () => handleSelectInput(item.id),
1506
+ onToggleVideoMute: () => handleToggleVideoMute("input", item.id),
1505
1507
  itemClassName,
1506
1508
  itemStyle,
1507
1509
  itemActiveClassName,
@@ -1512,7 +1514,7 @@ function CrisCoMatrixListsTie({
1512
1514
  renderIoIndicator,
1513
1515
  renderSignalIndicator
1514
1516
  },
1515
- item.ch
1517
+ item.id
1516
1518
  )) })
1517
1519
  ]
1518
1520
  }
@@ -1536,9 +1538,10 @@ function CrisCoMatrixListsTie({
1536
1538
  {
1537
1539
  item,
1538
1540
  type: "output",
1541
+ active: !!item.sl.on,
1539
1542
  showChannels,
1540
- onSelect: () => handleTie(item.ch),
1541
- onToggleVideoMute: () => handleToggleVideoMute("output", item.ch),
1543
+ onSelect: () => handleTie(item.id),
1544
+ onToggleVideoMute: () => handleToggleVideoMute("output", item.id),
1542
1545
  itemClassName,
1543
1546
  itemStyle,
1544
1547
  itemActiveClassName,
@@ -1549,7 +1552,7 @@ function CrisCoMatrixListsTie({
1549
1552
  renderIoIndicator,
1550
1553
  renderSignalIndicator
1551
1554
  },
1552
- item.ch
1555
+ item.id
1553
1556
  )) })
1554
1557
  ]
1555
1558
  }