seat-editor 3.6.49 → 3.6.51

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.
Files changed (71) hide show
  1. package/dist/app/graph-view/page.d.ts +1 -1
  2. package/dist/app/graph-view-new/page.d.ts +1 -1
  3. package/dist/app/layout.d.ts +1 -1
  4. package/dist/app/new-board/page.d.ts +1 -1
  5. package/dist/app/old-board/page.d.ts +1 -2
  6. package/dist/app/only-view/chair.d.ts +1 -1
  7. package/dist/app/only-view/chair.js +2 -10
  8. package/dist/app/only-view/page.d.ts +1 -1
  9. package/dist/app/only-view/user.d.ts +1 -1
  10. package/dist/app/only-view/user.js +2 -10
  11. package/dist/app/page.d.ts +1 -1
  12. package/dist/app/test/page.d.ts +1 -2
  13. package/dist/app/v2/page.d.ts +1 -1
  14. package/dist/components/button-radio/index.d.ts +1 -1
  15. package/dist/components/button-tools/index.d.ts +1 -1
  16. package/dist/components/form-tools/label.d.ts +1 -1
  17. package/dist/components/form-tools/shape.d.ts +2 -2
  18. package/dist/components/icons/camera.d.ts +1 -2
  19. package/dist/components/icons/circle.d.ts +1 -2
  20. package/dist/components/icons/square.d.ts +1 -2
  21. package/dist/components/icons/type-1.d.ts +1 -2
  22. package/dist/components/icons/type-2.d.ts +1 -2
  23. package/dist/components/icons/type-3.d.ts +1 -2
  24. package/dist/components/icons/type-4.d.ts +1 -2
  25. package/dist/components/icons/type-5.d.ts +1 -2
  26. package/dist/components/input/number-indicator.d.ts +1 -1
  27. package/dist/components/joystick/index.d.ts +1 -2
  28. package/dist/components/layer/index.d.ts +1 -1
  29. package/dist/components/layer-v2/index.d.ts +1 -1
  30. package/dist/components/layer-v3/index.d.ts +2 -3
  31. package/dist/components/layer-v4/index.d.ts +1 -1
  32. package/dist/components/layer-v5/icons.d.ts +1 -1
  33. package/dist/components/layer-v5/index.d.ts +1 -1
  34. package/dist/components/lib/index.d.ts +1 -1
  35. package/dist/components/modal-preview/index.d.ts +1 -1
  36. package/dist/features/board/index.d.ts +1 -1
  37. package/dist/features/board-v2/index.d.ts +1 -2
  38. package/dist/features/board-v3/icons.d.ts +1 -1
  39. package/dist/features/board-v3/index.d.ts +1 -1
  40. package/dist/features/navbar/index.d.ts +1 -1
  41. package/dist/features/package/index.d.ts +1 -1
  42. package/dist/features/panel/index.d.ts +1 -1
  43. package/dist/features/panel/polygon.d.ts +1 -1
  44. package/dist/features/panel/select-tool.d.ts +1 -1
  45. package/dist/features/panel/selected-group.d.ts +1 -1
  46. package/dist/features/panel/square-circle-tool.d.ts +1 -1
  47. package/dist/features/panel/table-seat-circle.d.ts +1 -1
  48. package/dist/features/panel/table-seat-square.d.ts +1 -1
  49. package/dist/features/panel/text-tool.d.ts +1 -1
  50. package/dist/features/panel/upload-group-tool.d.ts +1 -1
  51. package/dist/features/panel/upload-tool.d.ts +1 -1
  52. package/dist/features/side-tool/icons.d.ts +1 -1
  53. package/dist/features/side-tool/index.d.ts +1 -1
  54. package/dist/features/view-only/index.d.ts +1 -1
  55. package/dist/features/view-only-2/index.d.ts +1 -1
  56. package/dist/features/view-only-3/index.d.ts +1 -1
  57. package/dist/features/view-only-4/index.d.ts +1 -1
  58. package/dist/features/view-only-5/connect-handle.js +1 -1
  59. package/dist/features/view-only-5/connect-handle.jsx +1 -1
  60. package/dist/features/view-only-5/connection-layer.js +18 -31
  61. package/dist/features/view-only-5/connection-layer.jsx +102 -46
  62. package/dist/features/view-only-5/index.d.ts +1 -1
  63. package/dist/features/view-only-5/index.js +108 -19
  64. package/dist/features/view-only-5/index.jsx +108 -19
  65. package/dist/features/view-only-5/utils.d.ts +1 -1
  66. package/dist/features/view-only-5/utils.js +30 -21
  67. package/dist/features/view-only-6/index.d.ts +1 -1
  68. package/dist/features/view-only-7/index.d.ts +1 -1
  69. package/dist/provider/redux-provider.d.ts +1 -1
  70. package/dist/provider/store-provider.d.ts +1 -1
  71. package/package.json +1 -1
@@ -268,7 +268,8 @@ const LayerView = (props) => {
268
268
  }, [actionPrivileged]);
269
269
  const timerRef = useRef(null);
270
270
  const handlePointerDown = (e) => {
271
- var _a, _b, _c;
271
+ var _a, _b, _c, _d, _e, _f;
272
+ const shiftActive = e.shiftKey;
272
273
  const svg = svgRef.current;
273
274
  if (!e.isPrimary || !svg)
274
275
  return;
@@ -287,11 +288,31 @@ const LayerView = (props) => {
287
288
  const downInOutSelection = hadSelection && makeSelection && e.button !== 2;
288
289
  const unSelectAll = hadSelection && e.button === 2 && targetGroup && !targetSelectionGroup;
289
290
  const hasSelectionDownOutSelection = !targetSelectionGroup && targetGroup && hadSelection;
291
+ const targetSelection = e.target.closest("g[id='selection-lines']");
290
292
  if (downOutTable || (!targetGroup && !targetSelectionGroup)) {
291
293
  if (graph.connecting) {
292
294
  graph.cancelConnect();
293
295
  }
294
296
  }
297
+ let idTargetElement = JSON.parse((targetGroup === null || targetGroup === void 0 ? void 0 : targetGroup.getAttribute("data-id")) || "{}");
298
+ const selectionTarget = (_b = (_a = targetSelection === null || targetSelection === void 0 ? void 0 : targetSelection.dataset) === null || _a === void 0 ? void 0 : _a.selection) === null || _b === void 0 ? void 0 : _b.replace("selection-", "");
299
+ const activeId = selectionTarget !== null && selectionTarget !== void 0 ? selectionTarget : idTargetElement;
300
+ if (targetGroup && shiftActive) {
301
+ const findById = renderedElements === null || renderedElements === void 0 ? void 0 : renderedElements.find((comp) => comp.id == activeId);
302
+ const currentSelection = (_c = dataElementSelectionGroupRef.current) !== null && _c !== void 0 ? _c : [];
303
+ if (currentSelection.length == 0 && findById) {
304
+ currentSelection.push(findById);
305
+ }
306
+ const alreadySelected = currentSelection.some((comp) => comp.id == activeId);
307
+ let newSelection;
308
+ if (alreadySelected) {
309
+ newSelection = currentSelection.filter((comp) => comp.id != activeId);
310
+ }
311
+ else {
312
+ newSelection = [...currentSelection, findById];
313
+ }
314
+ dataElementSelectionGroupRef.current = newSelection;
315
+ }
295
316
  if (makeSelection) {
296
317
  const boxSelection = createTableGhost({
297
318
  x,
@@ -302,9 +323,9 @@ const LayerView = (props) => {
302
323
  shape: "selection-box",
303
324
  id: "selection-box-ghost",
304
325
  });
305
- (_a = svgRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(boxSelection);
326
+ (_d = svgRef.current) === null || _d === void 0 ? void 0 : _d.appendChild(boxSelection);
306
327
  }
307
- if (downInOutSelection || hasSelectionDownOutSelection || unSelectAll) {
328
+ if ((downInOutSelection || hasSelectionDownOutSelection || unSelectAll) && !shiftActive) {
308
329
  handleUnSelectComponent();
309
330
  }
310
331
  if (unSelectAll) {
@@ -340,7 +361,7 @@ const LayerView = (props) => {
340
361
  const ghostId = JSON.parse((targetGroup === null || targetGroup === void 0 ? void 0 : targetGroup.getAttribute("data-id")) || "{}");
341
362
  const allowedDrag = (!(props === null || props === void 0 ? void 0 : props.dragTableBlockKey)
342
363
  ? true
343
- : !((_b = props === null || props === void 0 ? void 0 : props.dragTableBlockKey) === null || _b === void 0 ? void 0 : _b.some((_) => {
364
+ : !((_e = props === null || props === void 0 ? void 0 : props.dragTableBlockKey) === null || _e === void 0 ? void 0 : _e.some((_) => {
344
365
  const dataRaw = originalData({ id: ghostId, type: "find" });
345
366
  return _.value === (dataRaw === null || dataRaw === void 0 ? void 0 : dataRaw[_.key]);
346
367
  }))) && (actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.dragTable);
@@ -348,7 +369,7 @@ const LayerView = (props) => {
348
369
  Object.keys(ghostAttributes).forEach((key) => ghost.setAttribute(key, ghostAttributes[key]));
349
370
  }
350
371
  if (allowedDrag) {
351
- (_c = e.dataTransfer) === null || _c === void 0 ? void 0 : _c.setData("application/json", JSON.stringify(ghostId));
372
+ (_f = e.dataTransfer) === null || _f === void 0 ? void 0 : _f.setData("application/json", JSON.stringify(ghostId));
352
373
  const dataRaw = originalData({ id: ghostId, type: "find" });
353
374
  (actionPrivileged === null || actionPrivileged === void 0 ? void 0 : actionPrivileged.dragTable) &&
354
375
  (props === null || props === void 0 ? void 0 : props.onDragTable) &&
@@ -441,7 +462,43 @@ const LayerView = (props) => {
441
462
  };
442
463
  pointerMoveGhost(e.nativeEvent);
443
464
  const pointerHandleUp = (e) => {
444
- var _a, _b, _c, _d, _e;
465
+ var _a, _b, _c, _d, _e, _f;
466
+ if (shiftActive) {
467
+ const allElementSelectionGroup = dataElementSelectionGroupRef.current;
468
+ // HITUNG BOUNDING BOX
469
+ let xs = [];
470
+ let ys = [];
471
+ let x2 = [];
472
+ let y2 = [];
473
+ allElementSelectionGroup.forEach((element) => {
474
+ const activeId = element.id;
475
+ const { g } = getAttributeElement(svg, String(activeId));
476
+ const { x, y, width, height } = getGlobalBBox(svg, g);
477
+ xs.push(x);
478
+ ys.push(y);
479
+ x2.push(x + width);
480
+ y2.push(y + height);
481
+ });
482
+ const selectionBox = {
483
+ x: Math.min(...xs),
484
+ y: Math.min(...ys),
485
+ width: Math.max(...x2) - Math.min(...xs),
486
+ height: Math.max(...y2) - Math.min(...ys),
487
+ stroke: "red",
488
+ shape: "selection-box",
489
+ fill: "transparent",
490
+ id: `${Date.now()}`,
491
+ rotation: 0,
492
+ };
493
+ setSelectedLines(selectionBox);
494
+ const allTableInSelection = (_a = dataElementSelectionGroupRef.current) === null || _a === void 0 ? void 0 : _a.map((d) => d.id);
495
+ const filterTableInSelection = componentProps === null || componentProps === void 0 ? void 0 : componentProps.filter((item) => {
496
+ var _a, _b;
497
+ return ((_a = item === null || item === void 0 ? void 0 : item[mappingKey]) === null || _a === void 0 ? void 0 : _a.id) &&
498
+ (allTableInSelection === null || allTableInSelection === void 0 ? void 0 : allTableInSelection.includes((_b = item === null || item === void 0 ? void 0 : item[mappingKey]) === null || _b === void 0 ? void 0 : _b.id));
499
+ });
500
+ onMakeSelection && onMakeSelection(filterTableInSelection);
501
+ }
445
502
  if (targetGroup && !hadSelection) {
446
503
  const dataId = JSON.parse(targetGroup.getAttribute("data-id") || "{}");
447
504
  isDragging.current = false;
@@ -489,10 +546,10 @@ const LayerView = (props) => {
489
546
  setTooltip({ x: newX / scale, y: newY / scale, visible: rightClick });
490
547
  }
491
548
  if (makeSelection &&
492
- ((_a = dataElementSelectionGroupRef.current) === null || _a === void 0 ? void 0 : _a.length) > 0 &&
549
+ ((_b = dataElementSelectionGroupRef.current) === null || _b === void 0 ? void 0 : _b.length) > 0 &&
493
550
  e.button === 0 &&
494
551
  !targetSelectionGroup) {
495
- const allTableInSelection = (_b = dataElementSelectionGroupRef.current) === null || _b === void 0 ? void 0 : _b.map((d) => d.id);
552
+ const allTableInSelection = (_c = dataElementSelectionGroupRef.current) === null || _c === void 0 ? void 0 : _c.map((d) => d.id);
496
553
  const filterTableInSelection = componentProps === null || componentProps === void 0 ? void 0 : componentProps.filter((item) => {
497
554
  var _a, _b;
498
555
  return ((_a = item === null || item === void 0 ? void 0 : item[mappingKey]) === null || _a === void 0 ? void 0 : _a.id) &&
@@ -530,13 +587,13 @@ const LayerView = (props) => {
530
587
  if (!hasInvalidNumber(selectionBox)) {
531
588
  setSelectedLines(selectionBox);
532
589
  }
533
- (_c = svg.querySelector("#selection-box-ghost")) === null || _c === void 0 ? void 0 : _c.remove();
590
+ (_d = svg.querySelector("#selection-box-ghost")) === null || _d === void 0 ? void 0 : _d.remove();
534
591
  }
535
592
  if (makeSelection &&
536
- ((_d = dataElementSelectionGroupRef.current) === null || _d === void 0 ? void 0 : _d.length) === 0 &&
593
+ ((_e = dataElementSelectionGroupRef.current) === null || _e === void 0 ? void 0 : _e.length) === 0 &&
537
594
  e.button === 0 &&
538
595
  targetSelectionGroup) {
539
- (_e = svg.querySelector("#selection-box-ghost")) === null || _e === void 0 ? void 0 : _e.remove();
596
+ (_f = svg.querySelector("#selection-box-ghost")) === null || _f === void 0 ? void 0 : _f.remove();
540
597
  setSelectedLines(null);
541
598
  }
542
599
  setPanningGroup(false);
@@ -618,15 +675,10 @@ const LayerView = (props) => {
618
675
  // ─── Node helper ──────────────────────────────────────────────────────────
619
676
  const getNodeById = useCallback((id) => {
620
677
  var _a, _b, _c, _d;
621
- const comp = componentsEditor.find((item) => {
622
- var _a, _b, _c;
623
- if (mappingKey && (item === null || item === void 0 ? void 0 : item[mappingKey]))
624
- return ((_b = (_a = item[mappingKey]) === null || _a === void 0 ? void 0 : _a[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _b !== void 0 ? _b : item[mappingKey].id == id);
625
- return (_c = item === null || item === void 0 ? void 0 : item[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _c !== void 0 ? _c : item.id == id;
626
- });
678
+ const comp = renderedElements.find((c) => { var _a; return ((_a = c[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _a !== void 0 ? _a : c.id) === id; });
627
679
  if (!comp)
628
680
  return null;
629
- const v = mappingKey ? comp[mappingKey] : comp;
681
+ const v = comp;
630
682
  const w = (_a = v.width) !== null && _a !== void 0 ? _a : 100;
631
683
  const h = (_b = v.height) !== null && _b !== void 0 ? _b : 50;
632
684
  const rotation = (_c = v.rotation) !== null && _c !== void 0 ? _c : 0;
@@ -664,7 +716,43 @@ const LayerView = (props) => {
664
716
  const viewBox = isValidBoundingBox
665
717
  ? `${boundingBox.minX - (((_a = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _a === void 0 ? void 0 : _a.paddingLeft) || 0)} ${boundingBox.minY - (((_b = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _b === void 0 ? void 0 : _b.paddingTop) || 0)} ${boundingBox.width + (((_c = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _c === void 0 ? void 0 : _c.paddingRight) || 0)} ${boundingBox.height + (((_d = props === null || props === void 0 ? void 0 : props.viewStyles) === null || _d === void 0 ? void 0 : _d.paddingBottom) || 0)}`
666
718
  : "0 0 1000 1000";
667
- const renderedElements = useMemo(() => renderElements(componentsEditor, mappingKey, tableMatchKey, graph.connecting, groupSelection, graph.edges, connectionMatchKey, displaySettings === null || displaySettings === void 0 ? void 0 : displaySettings.selectionGroup), [
719
+ const stillHoldShift = useRef(false);
720
+ useEffect(() => {
721
+ var _a, _b;
722
+ if (stillHoldShift.current && dataElementSelectionGroupRef.current) {
723
+ const selectionLines = (_a = svgRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("#selection-lines");
724
+ selectionLines === null || selectionLines === void 0 ? void 0 : selectionLines.setAttribute("pointer-events", "none");
725
+ }
726
+ if (!stillHoldShift.current && dataElementSelectionGroupRef.current) {
727
+ const selectionLines = (_b = svgRef.current) === null || _b === void 0 ? void 0 : _b.querySelector("#selection-lines");
728
+ selectionLines === null || selectionLines === void 0 ? void 0 : selectionLines.setAttribute("pointer-events", "all");
729
+ }
730
+ }, [stillHoldShift.current, dataElementSelectionGroupRef.current]);
731
+ useEffect(() => {
732
+ const handleKeyDown = (e) => {
733
+ var _a, _b;
734
+ // setPressedKey(e.key);
735
+ const selectionLines = (_a = svgRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("#selection-lines");
736
+ (_b = svgRef.current) === null || _b === void 0 ? void 0 : _b.querySelector("#selection-lines");
737
+ if (e.key === "Shift") {
738
+ stillHoldShift.current = true;
739
+ selectionLines === null || selectionLines === void 0 ? void 0 : selectionLines.setAttribute("pointer-events", "none");
740
+ }
741
+ };
742
+ const handleKeyUp = () => {
743
+ var _a;
744
+ const selectionLines = (_a = svgRef.current) === null || _a === void 0 ? void 0 : _a.querySelector("#selection-lines");
745
+ stillHoldShift.current = false;
746
+ selectionLines === null || selectionLines === void 0 ? void 0 : selectionLines.setAttribute("pointer-events", "all");
747
+ };
748
+ window.addEventListener("keydown", handleKeyDown);
749
+ window.addEventListener("keyup", handleKeyUp);
750
+ return () => {
751
+ window.removeEventListener("keydown", handleKeyDown);
752
+ window.removeEventListener("keyup", handleKeyUp);
753
+ };
754
+ }, [dataElementSelectionGroupRef.current]);
755
+ const renderedElements = useMemo(() => renderElements(componentsEditor, mappingKey, tableMatchKey, graph.connecting, groupSelection, graph.edges, connectionMatchKey, displaySettings === null || displaySettings === void 0 ? void 0 : displaySettings.selectionGroup, graph.selectedNode), [
668
756
  componentsEditor,
669
757
  mappingKey,
670
758
  tableMatchKey,
@@ -675,6 +763,7 @@ const LayerView = (props) => {
675
763
  groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection,
676
764
  graph.edges,
677
765
  connectionMatchKey,
766
+ graph.selectedNode
678
767
  ]);
679
768
  return (<div className="relative w-full h-full flex-1" ref={containerRef} style={{ overflow: "auto", WebkitOverflowScrolling: "touch" }} {...props.containerProps}>
680
769
  {loading && (<div className="absolute z-10 top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 bg-opacity-50 bg-white w-full h-full flex items-center justify-center">
@@ -65,4 +65,4 @@ export declare const renderElements: (elementEditor: ComponentProps[], mappingKe
65
65
  }, edges?: EdgeType[], connectionMatchKey?: {
66
66
  key: string;
67
67
  value: string | number;
68
- }, settingSelectionGroup?: boolean) => ComponentProps[];
68
+ }, settingSelectionGroup?: boolean, selectedNodeId?: string) => ComponentProps[];
@@ -71,48 +71,57 @@ const findIndexByValue = (obj, targetValue) => {
71
71
  const foundEntry = Object.entries(obj).find(([_, values]) => values.includes(targetValue));
72
72
  return foundEntry ? Number(foundEntry[0]) : undefined;
73
73
  };
74
- export const renderElements = (elementEditor, mappingKey, tableMatchKey, connecting, groupSelection, edges, connectionMatchKey, settingSelectionGroup) => {
74
+ export const renderElements = (elementEditor, mappingKey, tableMatchKey, connecting, groupSelection, edges, connectionMatchKey, settingSelectionGroup, selectedNodeId) => {
75
75
  var _a;
76
- const allIDFromIdConnection = ((_a = edges === null || edges === void 0 ? void 0 : edges.filter((edge) => edge.from === (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) || edge.to === (connecting === null || connecting === void 0 ? void 0 : connecting.fromId)
76
+ const allIDFromIdConnection = ((_a = edges === null || edges === void 0 ? void 0 : edges.filter((edge) => edge.from === (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) || edge.to === (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) || selectedNodeId
77
77
  //bikin ed.to di merge dengan ed.from
78
- )) === null || _a === void 0 ? void 0 : _a.map((edge) => edge.to === (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) ? edge.from : edge.to)) || [];
78
+ )) === null || _a === void 0 ? void 0 : _a.map((edge) => (edge.to === (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) ? edge.from : edge.to))) ||
79
+ [];
79
80
  return elementEditor.map((editorItem) => {
80
81
  var _a, _b, _c, _d;
81
82
  const isUsingMapping = mappingKey &&
82
83
  typeof editorItem[mappingKey] === "object" &&
83
84
  editorItem[mappingKey] !== null;
84
85
  let finalProps = isUsingMapping ? editorItem[mappingKey] : editorItem;
86
+ const findIndexSelection = findIndexByValue(groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.selection, finalProps === null || finalProps === void 0 ? void 0 : finalProps[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]);
87
+ let fill = finalProps === null || finalProps === void 0 ? void 0 : finalProps.fill;
88
+ let stroke = finalProps === null || finalProps === void 0 ? void 0 : finalProps.stroke;
89
+ let seatFill = finalProps === null || finalProps === void 0 ? void 0 : finalProps.seatFill;
85
90
  if (tableMatchKey) {
86
91
  const tableMatch = tableMatchKey.find((item) => {
87
92
  const hasKey = Object.keys(editorItem).some((key) => key == item.key);
88
93
  if (hasKey)
89
94
  return item.value == (editorItem === null || editorItem === void 0 ? void 0 : editorItem[item.key]);
90
95
  });
91
- const findIndexSelection = findIndexByValue(groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.selection, finalProps === null || finalProps === void 0 ? void 0 : finalProps[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]);
92
- let fill = finalProps === null || finalProps === void 0 ? void 0 : finalProps.fill;
93
- let stroke = finalProps === null || finalProps === void 0 ? void 0 : finalProps.stroke;
94
- let seatFill = finalProps === null || finalProps === void 0 ? void 0 : finalProps.seatFill;
95
- if (findIndexSelection !== undefined && settingSelectionGroup) {
96
- fill = groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection[findIndexSelection];
97
- seatFill = groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection[findIndexSelection];
98
- stroke = groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection[findIndexSelection];
99
- }
100
96
  if ((_a = tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.properties) === null || _a === void 0 ? void 0 : _a.fill) {
101
97
  fill = (_b = tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.properties) === null || _b === void 0 ? void 0 : _b.fill;
102
98
  seatFill = (_c = tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.properties) === null || _c === void 0 ? void 0 : _c.seatFill;
103
99
  stroke = (_d = tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.properties) === null || _d === void 0 ? void 0 : _d.stroke;
104
100
  }
105
- if ((connecting === null || connecting === void 0 ? void 0 : connecting.fromId) == (finalProps === null || finalProps === void 0 ? void 0 : finalProps.id)) {
106
- fill = "#F8F5FF";
107
- stroke = "#5014D0";
108
- }
109
- if ((allIDFromIdConnection === null || allIDFromIdConnection === void 0 ? void 0 : allIDFromIdConnection.includes(finalProps === null || finalProps === void 0 ? void 0 : finalProps.id)) && (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) !== (finalProps === null || finalProps === void 0 ? void 0 : finalProps.id)) {
110
- fill = "#EEF6FF";
111
- stroke = "#3E97FF";
112
- seatFill = "#3E97FF";
113
- }
114
101
  finalProps = Object.assign(Object.assign(Object.assign({}, finalProps), tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.properties), { fill: fill, seatFill: seatFill, stroke, className: tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.className, element: tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.element });
115
102
  }
103
+ if (findIndexSelection) {
104
+ if (findIndexSelection !== undefined && settingSelectionGroup) {
105
+ fill = groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection[findIndexSelection];
106
+ seatFill = groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection[findIndexSelection];
107
+ stroke = groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.colorGroupSelection[findIndexSelection];
108
+ finalProps = Object.assign(Object.assign({}, finalProps), { fill: fill, seatFill: seatFill, stroke });
109
+ }
110
+ }
111
+ if (((connecting === null || connecting === void 0 ? void 0 : connecting.fromId) || selectedNodeId) ==
112
+ ((finalProps === null || finalProps === void 0 ? void 0 : finalProps[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) || (finalProps === null || finalProps === void 0 ? void 0 : finalProps.id))) {
113
+ fill = "#F8F5FF";
114
+ stroke = "#5014D0";
115
+ finalProps = Object.assign(Object.assign({}, finalProps), { fill: fill, seatFill: seatFill, stroke });
116
+ }
117
+ if ((allIDFromIdConnection === null || allIDFromIdConnection === void 0 ? void 0 : allIDFromIdConnection.includes((finalProps === null || finalProps === void 0 ? void 0 : finalProps[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) || (finalProps === null || finalProps === void 0 ? void 0 : finalProps.id))) &&
118
+ (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) !==
119
+ ((finalProps === null || finalProps === void 0 ? void 0 : finalProps[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) || (finalProps === null || finalProps === void 0 ? void 0 : finalProps.id))) {
120
+ fill = "#EEF6FF";
121
+ stroke = "#3E97FF";
122
+ seatFill = "#3E97FF";
123
+ finalProps = Object.assign(Object.assign({}, finalProps), { fill: fill, seatFill: seatFill, stroke });
124
+ }
116
125
  if (connectionMatchKey) {
117
126
  if (!(finalProps === null || finalProps === void 0 ? void 0 : finalProps[connectionMatchKey.key])) {
118
127
  finalProps = Object.assign(Object.assign({}, finalProps), { [connectionMatchKey.key]: editorItem === null || editorItem === void 0 ? void 0 : editorItem[connectionMatchKey.key] });
@@ -95,5 +95,5 @@ export interface LayerViewProps<TMeta = undefined> {
95
95
  onEdgesChange?: (edges: EdgeType[], table: PropertiesProps[]) => void;
96
96
  keyNode: string;
97
97
  }
98
- declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.JSX.Element;
98
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
99
99
  export default LayerView;
@@ -95,5 +95,5 @@ export interface LayerViewProps<TMeta = undefined> {
95
95
  onEdgesChange?: (edges: EdgeType[], table: PropertiesProps[]) => void;
96
96
  keyNode: string;
97
97
  }
98
- declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.JSX.Element;
98
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
99
99
  export default LayerView;
@@ -1,3 +1,3 @@
1
1
  export declare const ReduxProvider: ({ children }: {
2
2
  children: React.ReactNode;
3
- }) => import("react").JSX.Element;
3
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
1
  export declare const StoreProvider: ({ children, themeColor, }: {
2
2
  children: React.ReactNode;
3
3
  themeColor?: string;
4
- }) => import("react").JSX.Element;
4
+ }) => import("react/jsx-runtime").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seat-editor",
3
- "version": "3.6.49",
3
+ "version": "3.6.51",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",