seat-editor 3.6.29 → 3.6.31

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 (77) hide show
  1. package/dist/app/graph-view/page.d.ts +1 -1
  2. package/dist/app/graph-view-new/constant.d.ts +145 -532
  3. package/dist/app/graph-view-new/constant.js +2004 -6067
  4. package/dist/app/graph-view-new/page.d.ts +1 -1
  5. package/dist/app/graph-view-new/page.js +5 -8
  6. package/dist/app/graph-view-new/page.jsx +5 -8
  7. package/dist/app/layout.d.ts +1 -1
  8. package/dist/app/new-board/page.d.ts +1 -1
  9. package/dist/app/old-board/page.d.ts +2 -1
  10. package/dist/app/only-view/chair.d.ts +1 -1
  11. package/dist/app/only-view/chair.js +10 -2
  12. package/dist/app/only-view/page.d.ts +1 -1
  13. package/dist/app/only-view/user.d.ts +1 -1
  14. package/dist/app/only-view/user.js +10 -2
  15. package/dist/app/page.d.ts +1 -1
  16. package/dist/app/test/page.d.ts +2 -1
  17. package/dist/app/v2/page.d.ts +1 -1
  18. package/dist/components/button-radio/index.d.ts +1 -1
  19. package/dist/components/button-tools/index.d.ts +1 -1
  20. package/dist/components/form-tools/label.d.ts +1 -1
  21. package/dist/components/form-tools/shape.d.ts +2 -2
  22. package/dist/components/icons/camera.d.ts +2 -1
  23. package/dist/components/icons/circle.d.ts +2 -1
  24. package/dist/components/icons/square.d.ts +2 -1
  25. package/dist/components/icons/type-1.d.ts +2 -1
  26. package/dist/components/icons/type-2.d.ts +2 -1
  27. package/dist/components/icons/type-3.d.ts +2 -1
  28. package/dist/components/icons/type-4.d.ts +2 -1
  29. package/dist/components/icons/type-5.d.ts +2 -1
  30. package/dist/components/input/number-indicator.d.ts +1 -1
  31. package/dist/components/joystick/index.d.ts +2 -1
  32. package/dist/components/layer/index.d.ts +1 -1
  33. package/dist/components/layer-v2/index.d.ts +1 -1
  34. package/dist/components/layer-v3/index.d.ts +3 -2
  35. package/dist/components/layer-v4/index.d.ts +1 -1
  36. package/dist/components/layer-v5/icons.d.ts +1 -1
  37. package/dist/components/layer-v5/index.d.ts +1 -1
  38. package/dist/components/lib/index.d.ts +1 -1
  39. package/dist/components/modal-preview/index.d.ts +1 -1
  40. package/dist/features/board/index.d.ts +1 -1
  41. package/dist/features/board-v2/index.d.ts +2 -1
  42. package/dist/features/board-v3/icons.d.ts +1 -1
  43. package/dist/features/board-v3/index.d.ts +1 -1
  44. package/dist/features/navbar/index.d.ts +1 -1
  45. package/dist/features/package/index.d.ts +1 -1
  46. package/dist/features/panel/index.d.ts +1 -1
  47. package/dist/features/panel/polygon.d.ts +1 -1
  48. package/dist/features/panel/select-tool.d.ts +1 -1
  49. package/dist/features/panel/selected-group.d.ts +1 -1
  50. package/dist/features/panel/square-circle-tool.d.ts +1 -1
  51. package/dist/features/panel/table-seat-circle.d.ts +1 -1
  52. package/dist/features/panel/table-seat-square.d.ts +1 -1
  53. package/dist/features/panel/text-tool.d.ts +1 -1
  54. package/dist/features/panel/upload-group-tool.d.ts +1 -1
  55. package/dist/features/panel/upload-tool.d.ts +1 -1
  56. package/dist/features/side-tool/icons.d.ts +1 -1
  57. package/dist/features/side-tool/index.d.ts +1 -1
  58. package/dist/features/view-only/index.d.ts +1 -1
  59. package/dist/features/view-only-2/index.d.ts +1 -1
  60. package/dist/features/view-only-3/index.d.ts +1 -1
  61. package/dist/features/view-only-4/index.d.ts +1 -1
  62. package/dist/features/view-only-5/connect-handle.js +4 -0
  63. package/dist/features/view-only-5/connect-handle.jsx +4 -0
  64. package/dist/features/view-only-5/connection-layer.d.ts +1 -0
  65. package/dist/features/view-only-5/connection-layer.js +5 -3
  66. package/dist/features/view-only-5/connection-layer.jsx +5 -3
  67. package/dist/features/view-only-5/index.d.ts +2 -1
  68. package/dist/features/view-only-5/index.js +6 -3
  69. package/dist/features/view-only-5/index.jsx +6 -3
  70. package/dist/features/view-only-5/use-connection-graph.d.ts +1 -0
  71. package/dist/features/view-only-5/use-connection-graph.js +3 -0
  72. package/dist/features/view-only-5/utils.js +2 -0
  73. package/dist/features/view-only-6/index.d.ts +1 -1
  74. package/dist/features/view-only-7/index.d.ts +1 -1
  75. package/dist/provider/redux-provider.d.ts +1 -1
  76. package/dist/provider/store-provider.d.ts +1 -1
  77. package/package.json +1 -1
@@ -120,6 +120,7 @@ export interface LayerViewProps<TMeta = undefined> {
120
120
  key: string;
121
121
  value: string | number;
122
122
  };
123
+ onTableMainConnection?: (id: string) => void;
123
124
  }
124
- declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => import("react/jsx-runtime").JSX.Element;
125
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.JSX.Element;
125
126
  export default LayerView;
@@ -29,7 +29,7 @@ const LayerView = (props) => {
29
29
  selectNode: false,
30
30
  connectingNode: false,
31
31
  dragTransferTable: false,
32
- }, onMakeSelection, groupSelection, onHoldTable, showConnection, connectionMatchKey } = props;
32
+ }, onMakeSelection, groupSelection, onHoldTable, showConnection, connectionMatchKey, onTableMainConnection } = props;
33
33
  const widthTooltip = (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.minWidth) || 168;
34
34
  const tableGhost = useRef(null);
35
35
  const hoverUnderghostId = useRef(null);
@@ -687,12 +687,15 @@ const LayerView = (props) => {
687
687
  userSelect: "none",
688
688
  } }, props.svgProps, { children: [_jsx("rect", { width: "100%", height: "100%", fill: "url(#biggrid)" }), hasBoundingBox && (_jsx("defs", { children: _jsx("clipPath", { id: "contentCrop", children: _jsx("rect", { x: boundingBox.minX, y: boundingBox.minY, width: boundingBox.width, height: boundingBox.height }) }) })), _jsx("g", { id: "main-layer", clipPath: "url(#contentCrop)", children: _jsx(Layers, { components: [...extraComponentsEditor, ...renderedElements], selectedTable: selectedTable,
689
689
  // iconTags={iconTags}
690
- eventMatchTable: eventMatchTable, privilegedTags: privilegedTags, selectionLines: selectedLines }) }), _jsx(ConnectionLayer, { edges: graph.edges, selectedEdge: graph.selectedEdge, connecting: graph.connecting, draggingAnchor: graph.draggingAnchor, mousePos: graph.mousePos, getNodeById: getNodeById, onSelectEdge: graph.selectEdge, onDeleteEdge: graph.deleteEdge, onStartDragWaypoint: graph.startDragWaypoint, onInsertWaypoint: graph.insertWaypoint, onRemoveWaypoint: graph.removeWaypoint, onStartDragAnchor: graph.startDragAnchor, isConnectEdge: actionPrivileged.connectingNode, selectedNodeId: graph.selectedNode, showConnection: showConnection, renderedElements: renderedElements, groupSelection: groupSelection, connectionMatchKey: connectionMatchKey }), renderedElements.map((item) => {
690
+ eventMatchTable: eventMatchTable, privilegedTags: privilegedTags, selectionLines: selectedLines }) }), _jsx(ConnectionLayer, { edges: graph.edges, selectedEdge: graph.selectedEdge, connecting: graph.connecting, draggingAnchor: graph.draggingAnchor, mousePos: graph.mousePos, getNodeById: getNodeById, onSelectEdge: graph.selectEdge, onDeleteEdge: graph.deleteEdge, onStartDragWaypoint: graph.startDragWaypoint, onInsertWaypoint: graph.insertWaypoint, onRemoveWaypoint: graph.removeWaypoint, onStartDragAnchor: graph.startDragAnchor, isConnectEdge: actionPrivileged.connectingNode, selectedNodeId: graph.selectedNode, showConnection: showConnection, renderedElements: renderedElements, groupSelection: groupSelection, connectionMatchKey: connectionMatchKey, isSelectNode: actionPrivileged.selectNode }), renderedElements.map((item) => {
691
691
  var _a, _b, _c, _d, _e;
692
692
  const rotated = rotatePoint(item.width / 2, item.height / 2, (_a = item.rotation) !== null && _a !== void 0 ? _a : 0);
693
693
  return (_jsx(ConnectHandle, {
694
694
  // isAnchor={true}
695
- connecting: graph.connecting, cx: item.x + rotated.x, cy: item.y + rotated.y, width: (_b = item.width) !== null && _b !== void 0 ? _b : 100, height: (_c = item.height) !== null && _c !== void 0 ? _c : 50, rotation: (_d = item.rotation) !== null && _d !== void 0 ? _d : 0, nodeId: (_e = item === null || item === void 0 ? void 0 : item[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _e !== void 0 ? _e : String(item.id), isConnecting: !!graph.connecting, isDraggingAnchor: !!graph.draggingAnchor, onStartConnect: (nodeId, clickPos) => graph.startConnect(nodeId, clickPos), onEndConnect: (nodeId, clickPos) => {
695
+ connecting: graph.connecting, cx: item.x + rotated.x, cy: item.y + rotated.y, width: (_b = item.width) !== null && _b !== void 0 ? _b : 100, height: (_c = item.height) !== null && _c !== void 0 ? _c : 50, rotation: (_d = item.rotation) !== null && _d !== void 0 ? _d : 0, nodeId: (_e = item === null || item === void 0 ? void 0 : item[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _e !== void 0 ? _e : String(item.id), isConnecting: !!graph.connecting, isDraggingAnchor: !!graph.draggingAnchor, onStartConnect: (nodeId, clickPos) => {
696
+ graph.startConnect(nodeId, clickPos);
697
+ onTableMainConnection && onTableMainConnection(nodeId);
698
+ }, onEndConnect: (nodeId, clickPos) => {
696
699
  if (graph.draggingAnchor)
697
700
  graph.updateAnchor(nodeId, clickPos);
698
701
  else
@@ -28,7 +28,7 @@ const LayerView = (props) => {
28
28
  selectNode: false,
29
29
  connectingNode: false,
30
30
  dragTransferTable: false,
31
- }, onMakeSelection, groupSelection, onHoldTable, showConnection, connectionMatchKey } = props;
31
+ }, onMakeSelection, groupSelection, onHoldTable, showConnection, connectionMatchKey, onTableMainConnection } = props;
32
32
  const widthTooltip = (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.minWidth) || 168;
33
33
  const tableGhost = useRef(null);
34
34
  const hoverUnderghostId = useRef(null);
@@ -706,14 +706,17 @@ const LayerView = (props) => {
706
706
  eventMatchTable={eventMatchTable} privilegedTags={privilegedTags} selectionLines={selectedLines}/>
707
707
  </g>
708
708
 
709
- <ConnectionLayer edges={graph.edges} selectedEdge={graph.selectedEdge} connecting={graph.connecting} draggingAnchor={graph.draggingAnchor} mousePos={graph.mousePos} getNodeById={getNodeById} onSelectEdge={graph.selectEdge} onDeleteEdge={graph.deleteEdge} onStartDragWaypoint={graph.startDragWaypoint} onInsertWaypoint={graph.insertWaypoint} onRemoveWaypoint={graph.removeWaypoint} onStartDragAnchor={graph.startDragAnchor} isConnectEdge={actionPrivileged.connectingNode} selectedNodeId={graph.selectedNode} showConnection={showConnection} renderedElements={renderedElements} groupSelection={groupSelection} connectionMatchKey={connectionMatchKey}/>
709
+ <ConnectionLayer edges={graph.edges} selectedEdge={graph.selectedEdge} connecting={graph.connecting} draggingAnchor={graph.draggingAnchor} mousePos={graph.mousePos} getNodeById={getNodeById} onSelectEdge={graph.selectEdge} onDeleteEdge={graph.deleteEdge} onStartDragWaypoint={graph.startDragWaypoint} onInsertWaypoint={graph.insertWaypoint} onRemoveWaypoint={graph.removeWaypoint} onStartDragAnchor={graph.startDragAnchor} isConnectEdge={actionPrivileged.connectingNode} selectedNodeId={graph.selectedNode} showConnection={showConnection} renderedElements={renderedElements} groupSelection={groupSelection} connectionMatchKey={connectionMatchKey} isSelectNode={actionPrivileged.selectNode}/>
710
710
 
711
711
  {renderedElements.map((item) => {
712
712
  var _a, _b, _c, _d, _e;
713
713
  const rotated = rotatePoint(item.width / 2, item.height / 2, (_a = item.rotation) !== null && _a !== void 0 ? _a : 0);
714
714
  return (<ConnectHandle key={item.id}
715
715
  // isAnchor={true}
716
- connecting={graph.connecting} cx={item.x + rotated.x} cy={item.y + rotated.y} width={(_b = item.width) !== null && _b !== void 0 ? _b : 100} height={(_c = item.height) !== null && _c !== void 0 ? _c : 50} rotation={(_d = item.rotation) !== null && _d !== void 0 ? _d : 0} nodeId={(_e = item === null || item === void 0 ? void 0 : item[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _e !== void 0 ? _e : String(item.id)} isConnecting={!!graph.connecting} isDraggingAnchor={!!graph.draggingAnchor} onStartConnect={(nodeId, clickPos) => graph.startConnect(nodeId, clickPos)} onEndConnect={(nodeId, clickPos) => {
716
+ connecting={graph.connecting} cx={item.x + rotated.x} cy={item.y + rotated.y} width={(_b = item.width) !== null && _b !== void 0 ? _b : 100} height={(_c = item.height) !== null && _c !== void 0 ? _c : 50} rotation={(_d = item.rotation) !== null && _d !== void 0 ? _d : 0} nodeId={(_e = item === null || item === void 0 ? void 0 : item[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _e !== void 0 ? _e : String(item.id)} isConnecting={!!graph.connecting} isDraggingAnchor={!!graph.draggingAnchor} onStartConnect={(nodeId, clickPos) => {
717
+ graph.startConnect(nodeId, clickPos);
718
+ onTableMainConnection && onTableMainConnection(nodeId);
719
+ }} onEndConnect={(nodeId, clickPos) => {
717
720
  if (graph.draggingAnchor)
718
721
  graph.updateAnchor(nodeId, clickPos);
719
722
  else
@@ -60,4 +60,5 @@ export declare const useConnectionGraph: ({ svgRef, onEdgesChange, keyNode, mapp
60
60
  onMouseMove: (e: React.MouseEvent<SVGSVGElement>) => void;
61
61
  onMouseUp: () => void;
62
62
  selectNode: (nodeId: string) => void;
63
+ clearSelectionNode: () => void;
63
64
  };
@@ -138,6 +138,7 @@ export const useConnectionGraph = ({ svgRef, onEdgesChange, keyNode, mappingKey,
138
138
  deleteEdge(selectedEdge);
139
139
  }, [selectedEdge, deleteEdge]);
140
140
  const clearSelection = useCallback(() => setSelectedEdge(null), []);
141
+ const clearSelectionNode = useCallback(() => setSelectedNode(null), []);
141
142
  // ── Keyboard ─────────────────────────────────────────────────────
142
143
  useEffect(() => {
143
144
  const onKey = (e) => {
@@ -150,6 +151,7 @@ export const useConnectionGraph = ({ svgRef, onEdgesChange, keyNode, mappingKey,
150
151
  cancelConnect();
151
152
  cancelDragAnchor();
152
153
  clearSelection();
154
+ clearSelectionNode();
153
155
  }
154
156
  };
155
157
  window.addEventListener("keydown", onKey);
@@ -276,5 +278,6 @@ export const useConnectionGraph = ({ svgRef, onEdgesChange, keyNode, mappingKey,
276
278
  onMouseMove,
277
279
  onMouseUp,
278
280
  selectNode,
281
+ clearSelectionNode
279
282
  };
280
283
  };
@@ -110,8 +110,10 @@ export const renderElements = (elementEditor, mappingKey, tableMatchKey, connect
110
110
  finalProps = Object.assign(Object.assign(Object.assign({}, finalProps), tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.properties), { fill: fill, stroke, className: tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.className, element: tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.element });
111
111
  }
112
112
  if (connectionMatchKey) {
113
+ console.log("finalProps?.[connectionMatchKey.key]", finalProps, finalProps === null || finalProps === void 0 ? void 0 : finalProps[connectionMatchKey.key]);
113
114
  if (!(finalProps === null || finalProps === void 0 ? void 0 : finalProps[connectionMatchKey.key])) {
114
115
  finalProps = Object.assign(Object.assign({}, finalProps), { [connectionMatchKey.key]: editorItem === null || editorItem === void 0 ? void 0 : editorItem[connectionMatchKey.key] });
116
+ console.log("finalProps?.[connectionMatchKey.key]", finalProps, finalProps === null || finalProps === void 0 ? void 0 : finalProps[connectionMatchKey.key]);
115
117
  }
116
118
  }
117
119
  return finalProps;
@@ -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>) => import("react/jsx-runtime").JSX.Element;
98
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.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>) => import("react/jsx-runtime").JSX.Element;
98
+ declare const LayerView: <TMeta>(props: LayerViewProps<TMeta>) => React.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-runtime").JSX.Element;
3
+ }) => import("react").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-runtime").JSX.Element;
4
+ }) => import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seat-editor",
3
- "version": "3.6.29",
3
+ "version": "3.6.31",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",