@imperosoft/cris-webui-components 1.1.2-beta.9 → 1.1.2
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.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +176 -40
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +176 -40
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -319,11 +319,13 @@ interface MatrixItem {
|
|
|
319
319
|
id: number;
|
|
320
320
|
lb: string;
|
|
321
321
|
gp: number;
|
|
322
|
+
/** Selection state: en=enabled, vs=visible */
|
|
322
323
|
sl: {
|
|
323
|
-
on?: boolean;
|
|
324
324
|
en: boolean;
|
|
325
325
|
vs: boolean;
|
|
326
326
|
};
|
|
327
|
+
/** Tied input id (outputs only) — which input is routed to this output */
|
|
328
|
+
ti?: number;
|
|
327
329
|
io: {
|
|
328
330
|
on: boolean;
|
|
329
331
|
vs: boolean;
|
|
@@ -374,6 +376,8 @@ interface CrisCoMatrixListsTieProps {
|
|
|
374
376
|
itemActiveStyle?: CSSProperties;
|
|
375
377
|
/** Item disabled className */
|
|
376
378
|
itemDisabledClassName?: string;
|
|
379
|
+
/** Video mute button text (default: "Mute") */
|
|
380
|
+
vmText?: string;
|
|
377
381
|
/** Video mute button className */
|
|
378
382
|
vmButtonClassName?: string;
|
|
379
383
|
/** Video mute button active className */
|
|
@@ -385,7 +389,7 @@ interface CrisCoMatrixListsTieProps {
|
|
|
385
389
|
/** Custom render for signal indicator */
|
|
386
390
|
renderSignalIndicator?: (on: boolean) => ReactNode;
|
|
387
391
|
}
|
|
388
|
-
declare function CrisCoMatrixListsTie({ oid, inputTitle, outputTitle, showChannels, className, style, listClassName, listStyle, headerClassName, headerStyle, itemClassName, itemStyle, itemActiveClassName, itemActiveStyle, itemDisabledClassName, vmButtonClassName, vmButtonActiveClassName, renderIoIndicator, renderSignalIndicator, }: CrisCoMatrixListsTieProps): react_jsx_runtime.JSX.Element | null;
|
|
392
|
+
declare function CrisCoMatrixListsTie({ oid, inputTitle, outputTitle, showChannels, className, style, listClassName, listStyle, headerClassName, headerStyle, itemClassName, itemStyle, itemActiveClassName, itemActiveStyle, itemDisabledClassName, vmText, vmButtonClassName, vmButtonActiveClassName, renderIoIndicator, renderSignalIndicator, }: CrisCoMatrixListsTieProps): react_jsx_runtime.JSX.Element | null;
|
|
389
393
|
|
|
390
394
|
/**
|
|
391
395
|
* Icon configuration and utilities for CRIS components
|
package/dist/index.d.ts
CHANGED
|
@@ -319,11 +319,13 @@ interface MatrixItem {
|
|
|
319
319
|
id: number;
|
|
320
320
|
lb: string;
|
|
321
321
|
gp: number;
|
|
322
|
+
/** Selection state: en=enabled, vs=visible */
|
|
322
323
|
sl: {
|
|
323
|
-
on?: boolean;
|
|
324
324
|
en: boolean;
|
|
325
325
|
vs: boolean;
|
|
326
326
|
};
|
|
327
|
+
/** Tied input id (outputs only) — which input is routed to this output */
|
|
328
|
+
ti?: number;
|
|
327
329
|
io: {
|
|
328
330
|
on: boolean;
|
|
329
331
|
vs: boolean;
|
|
@@ -374,6 +376,8 @@ interface CrisCoMatrixListsTieProps {
|
|
|
374
376
|
itemActiveStyle?: CSSProperties;
|
|
375
377
|
/** Item disabled className */
|
|
376
378
|
itemDisabledClassName?: string;
|
|
379
|
+
/** Video mute button text (default: "Mute") */
|
|
380
|
+
vmText?: string;
|
|
377
381
|
/** Video mute button className */
|
|
378
382
|
vmButtonClassName?: string;
|
|
379
383
|
/** Video mute button active className */
|
|
@@ -385,7 +389,7 @@ interface CrisCoMatrixListsTieProps {
|
|
|
385
389
|
/** Custom render for signal indicator */
|
|
386
390
|
renderSignalIndicator?: (on: boolean) => ReactNode;
|
|
387
391
|
}
|
|
388
|
-
declare function CrisCoMatrixListsTie({ oid, inputTitle, outputTitle, showChannels, className, style, listClassName, listStyle, headerClassName, headerStyle, itemClassName, itemStyle, itemActiveClassName, itemActiveStyle, itemDisabledClassName, vmButtonClassName, vmButtonActiveClassName, renderIoIndicator, renderSignalIndicator, }: CrisCoMatrixListsTieProps): react_jsx_runtime.JSX.Element | null;
|
|
392
|
+
declare function CrisCoMatrixListsTie({ oid, inputTitle, outputTitle, showChannels, className, style, listClassName, listStyle, headerClassName, headerStyle, itemClassName, itemStyle, itemActiveClassName, itemActiveStyle, itemDisabledClassName, vmText, vmButtonClassName, vmButtonActiveClassName, renderIoIndicator, renderSignalIndicator, }: CrisCoMatrixListsTieProps): react_jsx_runtime.JSX.Element | null;
|
|
389
393
|
|
|
390
394
|
/**
|
|
391
395
|
* Icon configuration and utilities for CRIS components
|
package/dist/index.js
CHANGED
|
@@ -137,6 +137,8 @@ function CrisButton({
|
|
|
137
137
|
const pressedRef = (0, import_react.useRef)(false);
|
|
138
138
|
const touchingRef = (0, import_react.useRef)(false);
|
|
139
139
|
const touchStartedHereRef = (0, import_react.useRef)(false);
|
|
140
|
+
const touchStartYRef = (0, import_react.useRef)(0);
|
|
141
|
+
const touchMovedRef = (0, import_react.useRef)(false);
|
|
140
142
|
const feedbackJoin = joinFeedback ?? join;
|
|
141
143
|
const feedback = (0, import_cris_webui_ch5_core.useDigital)(feedbackJoin ?? 0);
|
|
142
144
|
const enabledJoin = (0, import_cris_webui_ch5_core.useDigital)(joinEnable ?? 0);
|
|
@@ -219,30 +221,42 @@ function CrisButton({
|
|
|
219
221
|
dSet(join, false);
|
|
220
222
|
}
|
|
221
223
|
};
|
|
222
|
-
const
|
|
224
|
+
const SCROLL_THRESHOLD = 8;
|
|
225
|
+
const handleTouchStart = (e) => {
|
|
223
226
|
log("handleTouchStart");
|
|
224
227
|
touchStart();
|
|
225
228
|
touchingRef.current = true;
|
|
226
229
|
touchStartedHereRef.current = true;
|
|
227
|
-
|
|
230
|
+
touchMovedRef.current = false;
|
|
231
|
+
touchStartYRef.current = e.touches[0]?.clientY ?? 0;
|
|
232
|
+
};
|
|
233
|
+
const handleTouchMove = (e) => {
|
|
234
|
+
if (touchMovedRef.current) return;
|
|
235
|
+
const dy = Math.abs((e.touches[0]?.clientY ?? 0) - touchStartYRef.current);
|
|
236
|
+
if (dy > SCROLL_THRESHOLD) {
|
|
237
|
+
touchMovedRef.current = true;
|
|
238
|
+
log("touchMove: scroll detected, dy:", dy);
|
|
239
|
+
}
|
|
228
240
|
};
|
|
229
241
|
const handleTouchEnd = () => {
|
|
230
|
-
log("handleTouchEnd", {
|
|
242
|
+
log("handleTouchEnd", { touchStartedHere: touchStartedHereRef.current, moved: touchMovedRef.current });
|
|
231
243
|
touchEnd();
|
|
232
244
|
touchingRef.current = true;
|
|
233
|
-
if (touchStartedHereRef.current) {
|
|
245
|
+
if (touchStartedHereRef.current && !touchMovedRef.current) {
|
|
234
246
|
touchStartedHereRef.current = false;
|
|
247
|
+
handlePress();
|
|
235
248
|
handleRelease();
|
|
236
249
|
} else {
|
|
237
|
-
|
|
250
|
+
touchStartedHereRef.current = false;
|
|
251
|
+
log("SKIPPED: touch moved or did not start here");
|
|
238
252
|
}
|
|
239
253
|
};
|
|
240
254
|
const handleTouchCancel = () => {
|
|
241
|
-
log("handleTouchCancel");
|
|
255
|
+
log("handleTouchCancel (scroll detected)");
|
|
242
256
|
touchEnd();
|
|
243
257
|
touchingRef.current = true;
|
|
244
258
|
touchStartedHereRef.current = false;
|
|
245
|
-
|
|
259
|
+
touchMovedRef.current = false;
|
|
246
260
|
};
|
|
247
261
|
const handleMouseDown = () => {
|
|
248
262
|
if (isTouchActive() || touchingRef.current) return;
|
|
@@ -343,7 +357,7 @@ function CrisButton({
|
|
|
343
357
|
cursor: suppressKeyClicks ? "default" : "pointer",
|
|
344
358
|
position: isFreePositioned ? void 0 : "relative",
|
|
345
359
|
overflow: isFreePositioned ? void 0 : "hidden",
|
|
346
|
-
touchAction: "
|
|
360
|
+
touchAction: "pan-x pan-y",
|
|
347
361
|
userSelect: "none",
|
|
348
362
|
WebkitUserSelect: "none"
|
|
349
363
|
},
|
|
@@ -351,6 +365,7 @@ function CrisButton({
|
|
|
351
365
|
onMouseUp: handleMouseUp,
|
|
352
366
|
onMouseLeave: handleMouseLeave,
|
|
353
367
|
onTouchStart: handleTouchStart,
|
|
368
|
+
onTouchMove: handleTouchMove,
|
|
354
369
|
onTouchEnd: handleTouchEnd,
|
|
355
370
|
onTouchCancel: handleTouchCancel,
|
|
356
371
|
children: [
|
|
@@ -1332,12 +1347,25 @@ function CrisCoDebug({
|
|
|
1332
1347
|
// src/components/CrisCoMatrixListsTie.tsx
|
|
1333
1348
|
var import_cris_webui_ch5_core8 = require("@imperosoft/cris-webui-ch5-core");
|
|
1334
1349
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1350
|
+
var colors = {
|
|
1351
|
+
itemBg: "#4f5152",
|
|
1352
|
+
itemActiveBg: "#007ca0",
|
|
1353
|
+
vmActiveBg: "#dc2626",
|
|
1354
|
+
text: "#ffffff",
|
|
1355
|
+
headerText: "#6b7280",
|
|
1356
|
+
ioOn: "#4caf50",
|
|
1357
|
+
ioOff: "#f44336",
|
|
1358
|
+
sgOn: "#2196f3",
|
|
1359
|
+
sgOff: "#666666"
|
|
1360
|
+
};
|
|
1335
1361
|
var defaults = {
|
|
1336
1362
|
container: {
|
|
1337
1363
|
display: "flex",
|
|
1338
1364
|
flexDirection: "row",
|
|
1339
|
-
gap:
|
|
1340
|
-
|
|
1365
|
+
gap: "1.5rem",
|
|
1366
|
+
padding: "1rem 2rem",
|
|
1367
|
+
height: "100%",
|
|
1368
|
+
width: "100%"
|
|
1341
1369
|
},
|
|
1342
1370
|
list: {
|
|
1343
1371
|
flex: 1,
|
|
@@ -1347,57 +1375,129 @@ var defaults = {
|
|
|
1347
1375
|
minHeight: 0
|
|
1348
1376
|
},
|
|
1349
1377
|
header: {
|
|
1350
|
-
fontSize:
|
|
1351
|
-
fontWeight:
|
|
1352
|
-
padding: "
|
|
1378
|
+
fontSize: "1.5em",
|
|
1379
|
+
fontWeight: 700,
|
|
1380
|
+
padding: "0.5rem 0.75rem",
|
|
1353
1381
|
textTransform: "uppercase",
|
|
1354
|
-
|
|
1355
|
-
|
|
1382
|
+
letterSpacing: "0.05em",
|
|
1383
|
+
color: colors.headerText,
|
|
1384
|
+
flexShrink: 0,
|
|
1385
|
+
textAlign: "center"
|
|
1356
1386
|
},
|
|
1357
1387
|
scroll: {
|
|
1358
1388
|
flex: 1,
|
|
1359
1389
|
minHeight: 0,
|
|
1360
1390
|
overflow: "auto",
|
|
1391
|
+
scrollbarWidth: "none",
|
|
1361
1392
|
WebkitOverflowScrolling: "touch",
|
|
1362
1393
|
display: "flex",
|
|
1363
1394
|
flexDirection: "column",
|
|
1364
|
-
gap:
|
|
1395
|
+
gap: "0.15rem"
|
|
1365
1396
|
},
|
|
1366
1397
|
item: {
|
|
1367
1398
|
display: "flex",
|
|
1368
|
-
alignItems: "
|
|
1369
|
-
gap:
|
|
1370
|
-
padding: "
|
|
1371
|
-
minHeight:
|
|
1399
|
+
alignItems: "stretch",
|
|
1400
|
+
gap: "0.5rem",
|
|
1401
|
+
padding: "0 0.4rem 0 0",
|
|
1402
|
+
minHeight: "3.7rem",
|
|
1372
1403
|
cursor: "pointer",
|
|
1373
|
-
userSelect: "none"
|
|
1404
|
+
userSelect: "none",
|
|
1405
|
+
background: colors.itemBg,
|
|
1406
|
+
borderRadius: "0.5rem",
|
|
1407
|
+
transition: "background 0.15s"
|
|
1408
|
+
},
|
|
1409
|
+
itemActive: {
|
|
1410
|
+
background: colors.itemActiveBg
|
|
1411
|
+
},
|
|
1412
|
+
itemBtn: {
|
|
1413
|
+
flex: 1,
|
|
1414
|
+
minWidth: 0,
|
|
1415
|
+
display: "flex",
|
|
1416
|
+
alignItems: "stretch",
|
|
1417
|
+
background: "transparent",
|
|
1418
|
+
border: "none",
|
|
1419
|
+
textAlign: "left",
|
|
1420
|
+
color: colors.text,
|
|
1421
|
+
height: "100%",
|
|
1422
|
+
borderRadius: "0.5rem",
|
|
1423
|
+
cursor: "pointer"
|
|
1424
|
+
},
|
|
1425
|
+
itemBtnInner: {
|
|
1426
|
+
display: "flex",
|
|
1427
|
+
alignItems: "center",
|
|
1428
|
+
gap: "0.4rem",
|
|
1429
|
+
width: "100%",
|
|
1430
|
+
flex: 1,
|
|
1431
|
+
padding: "0.5rem 0.9rem"
|
|
1432
|
+
},
|
|
1433
|
+
channelNum: {
|
|
1434
|
+
flexShrink: 0,
|
|
1435
|
+
opacity: 0.6,
|
|
1436
|
+
minWidth: "1.7em",
|
|
1437
|
+
textAlign: "right",
|
|
1438
|
+
fontWeight: 400,
|
|
1439
|
+
marginRight: "0.4em"
|
|
1374
1440
|
},
|
|
1375
1441
|
itemLabel: {
|
|
1376
1442
|
flex: 1,
|
|
1377
|
-
fontSize:
|
|
1443
|
+
fontSize: "1.4em",
|
|
1444
|
+
fontWeight: 700,
|
|
1378
1445
|
whiteSpace: "nowrap",
|
|
1379
1446
|
overflow: "hidden",
|
|
1380
|
-
textOverflow: "ellipsis"
|
|
1447
|
+
textOverflow: "ellipsis",
|
|
1448
|
+
color: colors.text
|
|
1381
1449
|
},
|
|
1382
1450
|
indicators: {
|
|
1383
1451
|
display: "flex",
|
|
1384
|
-
gap:
|
|
1452
|
+
gap: "0.25rem",
|
|
1385
1453
|
alignItems: "center"
|
|
1386
1454
|
},
|
|
1387
1455
|
indicator: {
|
|
1388
|
-
width:
|
|
1389
|
-
height:
|
|
1456
|
+
width: "1rem",
|
|
1457
|
+
height: "1rem",
|
|
1390
1458
|
borderRadius: "50%",
|
|
1391
1459
|
flexShrink: 0
|
|
1460
|
+
},
|
|
1461
|
+
vmBtn: {
|
|
1462
|
+
flexShrink: 0,
|
|
1463
|
+
alignSelf: "stretch",
|
|
1464
|
+
display: "flex",
|
|
1465
|
+
alignItems: "center",
|
|
1466
|
+
background: colors.itemBg,
|
|
1467
|
+
color: colors.text,
|
|
1468
|
+
border: "none",
|
|
1469
|
+
borderRadius: "0.4rem",
|
|
1470
|
+
padding: "0 0.6rem",
|
|
1471
|
+
margin: "0.3rem 0.3rem 0.3rem 0",
|
|
1472
|
+
fontSize: "0.85em",
|
|
1473
|
+
fontWeight: 700,
|
|
1474
|
+
cursor: "pointer",
|
|
1475
|
+
transition: "background 0.15s"
|
|
1476
|
+
},
|
|
1477
|
+
vmBtnActive: {
|
|
1478
|
+
background: colors.vmActiveBg,
|
|
1479
|
+
color: colors.text
|
|
1392
1480
|
}
|
|
1393
1481
|
};
|
|
1482
|
+
var INJECTED_CSS = `
|
|
1483
|
+
.cris-co-matrix-scroll::-webkit-scrollbar { display: none; }
|
|
1484
|
+
.cris-co-matrix-item > div:first-child > .cris-button { width: 100%; height: 100%; }
|
|
1485
|
+
`;
|
|
1486
|
+
var scrollbarStyleInjected = false;
|
|
1487
|
+
function injectScrollbarStyle() {
|
|
1488
|
+
if (scrollbarStyleInjected) return;
|
|
1489
|
+
scrollbarStyleInjected = true;
|
|
1490
|
+
const style = document.createElement("style");
|
|
1491
|
+
style.textContent = INJECTED_CSS;
|
|
1492
|
+
document.head.appendChild(style);
|
|
1493
|
+
}
|
|
1394
1494
|
function DefaultIoIndicator({ on }) {
|
|
1395
1495
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1396
1496
|
"div",
|
|
1397
1497
|
{
|
|
1398
1498
|
style: {
|
|
1399
1499
|
...defaults.indicator,
|
|
1400
|
-
backgroundColor: on ?
|
|
1500
|
+
backgroundColor: on ? colors.ioOn : colors.ioOff
|
|
1401
1501
|
},
|
|
1402
1502
|
title: on ? "Online" : "Offline"
|
|
1403
1503
|
}
|
|
@@ -1409,7 +1509,7 @@ function DefaultSignalIndicator({ on }) {
|
|
|
1409
1509
|
{
|
|
1410
1510
|
style: {
|
|
1411
1511
|
...defaults.indicator,
|
|
1412
|
-
backgroundColor: on ?
|
|
1512
|
+
backgroundColor: on ? colors.sgOn : colors.sgOff
|
|
1413
1513
|
},
|
|
1414
1514
|
title: on ? "Signal detected" : "No signal"
|
|
1415
1515
|
}
|
|
@@ -1420,6 +1520,7 @@ function MatrixItemRow({
|
|
|
1420
1520
|
type,
|
|
1421
1521
|
active,
|
|
1422
1522
|
showChannels,
|
|
1523
|
+
vmText,
|
|
1423
1524
|
onSelect,
|
|
1424
1525
|
onToggleVideoMute,
|
|
1425
1526
|
itemClassName,
|
|
@@ -1434,20 +1535,37 @@ function MatrixItemRow({
|
|
|
1434
1535
|
}) {
|
|
1435
1536
|
const isActive = active;
|
|
1436
1537
|
const isEnabled = item.sl.en;
|
|
1538
|
+
const useDefaults = !itemClassName;
|
|
1437
1539
|
const classes = [
|
|
1438
1540
|
"cris-co-matrix-item",
|
|
1439
1541
|
itemClassName,
|
|
1440
1542
|
isActive && (itemActiveClassName || "active"),
|
|
1441
1543
|
!isEnabled && (itemDisabledClassName || "disabled")
|
|
1442
1544
|
].filter(Boolean).join(" ");
|
|
1443
|
-
const computedStyle =
|
|
1545
|
+
const computedStyle = useDefaults ? {
|
|
1444
1546
|
...defaults.item,
|
|
1445
1547
|
...itemStyleProp,
|
|
1446
|
-
...isActive ? itemActiveStyle : void 0,
|
|
1548
|
+
...isActive ? { ...defaults.itemActive, ...itemActiveStyle } : void 0,
|
|
1447
1549
|
opacity: isEnabled ? 1 : 0.4
|
|
1448
|
-
};
|
|
1550
|
+
} : { ...itemStyleProp };
|
|
1449
1551
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: classes, style: computedStyle, children: [
|
|
1450
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1552
|
+
useDefaults ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: defaults.itemBtn, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1553
|
+
CrisButton,
|
|
1554
|
+
{
|
|
1555
|
+
selected: isActive,
|
|
1556
|
+
enabled: isEnabled,
|
|
1557
|
+
onPress: onSelect,
|
|
1558
|
+
showLocalFeedback: false,
|
|
1559
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: defaults.itemBtnInner, children: [
|
|
1560
|
+
showChannels && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "cris-co-matrix-ch", style: defaults.channelNum, children: item.id }),
|
|
1561
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: defaults.itemLabel, children: item.lb || `${type === "input" ? "Input" : "Output"} ${item.id}` }),
|
|
1562
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: defaults.indicators, children: [
|
|
1563
|
+
item.io.vs && (renderIoIndicator ? renderIoIndicator(item.io.on) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DefaultIoIndicator, { on: item.io.on })),
|
|
1564
|
+
item.sg.vs && (renderSignalIndicator ? renderSignalIndicator(item.sg.on) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DefaultSignalIndicator, { on: item.sg.on }))
|
|
1565
|
+
] })
|
|
1566
|
+
] })
|
|
1567
|
+
}
|
|
1568
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1451
1569
|
CrisButton,
|
|
1452
1570
|
{
|
|
1453
1571
|
selected: isActive,
|
|
@@ -1455,9 +1573,9 @@ function MatrixItemRow({
|
|
|
1455
1573
|
onPress: onSelect,
|
|
1456
1574
|
className: `cris-co-matrix-item-btn ${itemActiveClassName ?? ""}`,
|
|
1457
1575
|
classActive: itemActiveClassName,
|
|
1458
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", alignItems: "center", gap:
|
|
1576
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "0.4rem", width: "100%" }, children: [
|
|
1459
1577
|
showChannels && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "cris-co-matrix-ch", style: { flexShrink: 0, opacity: 0.6 }, children: item.id }),
|
|
1460
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style:
|
|
1578
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { flex: 1, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: item.lb || `${type === "input" ? "Input" : "Output"} ${item.id}` }),
|
|
1461
1579
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: defaults.indicators, children: [
|
|
1462
1580
|
item.io.vs && (renderIoIndicator ? renderIoIndicator(item.io.on) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DefaultIoIndicator, { on: item.io.on })),
|
|
1463
1581
|
item.sg.vs && (renderSignalIndicator ? renderSignalIndicator(item.sg.on) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(DefaultSignalIndicator, { on: item.sg.on }))
|
|
@@ -1465,17 +1583,31 @@ function MatrixItemRow({
|
|
|
1465
1583
|
] })
|
|
1466
1584
|
}
|
|
1467
1585
|
),
|
|
1468
|
-
item.vm.vs && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1586
|
+
item.vm.vs && (useDefaults && !vmButtonClassName ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: {
|
|
1587
|
+
...defaults.vmBtn,
|
|
1588
|
+
...item.vm.on ? defaults.vmBtnActive : void 0,
|
|
1589
|
+
opacity: item.vm.en ? 1 : 0.4,
|
|
1590
|
+
pointerEvents: item.vm.en ? "auto" : "none"
|
|
1591
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1592
|
+
CrisButton,
|
|
1593
|
+
{
|
|
1594
|
+
selected: item.vm.on,
|
|
1595
|
+
enabled: item.vm.en,
|
|
1596
|
+
text: vmText,
|
|
1597
|
+
onPress: onToggleVideoMute,
|
|
1598
|
+
showLocalFeedback: false
|
|
1599
|
+
}
|
|
1600
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1469
1601
|
CrisButton,
|
|
1470
1602
|
{
|
|
1471
1603
|
selected: item.vm.on,
|
|
1472
1604
|
enabled: item.vm.en,
|
|
1473
|
-
text:
|
|
1605
|
+
text: vmText,
|
|
1474
1606
|
onPress: onToggleVideoMute,
|
|
1475
1607
|
className: vmButtonClassName,
|
|
1476
1608
|
classActive: vmButtonActiveClassName
|
|
1477
1609
|
}
|
|
1478
|
-
)
|
|
1610
|
+
))
|
|
1479
1611
|
] });
|
|
1480
1612
|
}
|
|
1481
1613
|
function CrisCoMatrixListsTie({
|
|
@@ -1494,6 +1626,7 @@ function CrisCoMatrixListsTie({
|
|
|
1494
1626
|
itemActiveClassName,
|
|
1495
1627
|
itemActiveStyle,
|
|
1496
1628
|
itemDisabledClassName,
|
|
1629
|
+
vmText = "Mute",
|
|
1497
1630
|
vmButtonClassName,
|
|
1498
1631
|
vmButtonActiveClassName,
|
|
1499
1632
|
renderIoIndicator,
|
|
@@ -1501,6 +1634,7 @@ function CrisCoMatrixListsTie({
|
|
|
1501
1634
|
}) {
|
|
1502
1635
|
const matrix = (0, import_cris_webui_ch5_core8.useCustomObject)(oid);
|
|
1503
1636
|
const send = (0, import_cris_webui_ch5_core8.useCustomObjectSend)();
|
|
1637
|
+
injectScrollbarStyle();
|
|
1504
1638
|
if (!matrix) return null;
|
|
1505
1639
|
const { si, ip: inputs, op: outputs } = matrix;
|
|
1506
1640
|
const handleSelectInput = (id) => {
|
|
@@ -1532,13 +1666,14 @@ function CrisCoMatrixListsTie({
|
|
|
1532
1666
|
children: inputTitle
|
|
1533
1667
|
}
|
|
1534
1668
|
),
|
|
1535
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: defaults.scroll, children: inputs?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1669
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "cris-co-matrix-scroll", style: defaults.scroll, children: inputs?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1536
1670
|
MatrixItemRow,
|
|
1537
1671
|
{
|
|
1538
1672
|
item,
|
|
1539
1673
|
type: "input",
|
|
1540
1674
|
active: si === item.id,
|
|
1541
1675
|
showChannels,
|
|
1676
|
+
vmText,
|
|
1542
1677
|
onSelect: () => handleSelectInput(item.id),
|
|
1543
1678
|
onToggleVideoMute: () => handleToggleVideoMute("input", item.id),
|
|
1544
1679
|
itemClassName,
|
|
@@ -1570,13 +1705,14 @@ function CrisCoMatrixListsTie({
|
|
|
1570
1705
|
children: outputTitle
|
|
1571
1706
|
}
|
|
1572
1707
|
),
|
|
1573
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: defaults.scroll, children: outputs?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1708
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "cris-co-matrix-scroll", style: defaults.scroll, children: outputs?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1574
1709
|
MatrixItemRow,
|
|
1575
1710
|
{
|
|
1576
1711
|
item,
|
|
1577
1712
|
type: "output",
|
|
1578
|
-
active:
|
|
1713
|
+
active: item.ti === si,
|
|
1579
1714
|
showChannels,
|
|
1715
|
+
vmText,
|
|
1580
1716
|
onSelect: () => handleTie(item.id),
|
|
1581
1717
|
onToggleVideoMute: () => handleToggleVideoMute("output", item.id),
|
|
1582
1718
|
itemClassName,
|