seat-editor 3.6.35 → 3.6.37

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.
@@ -147,8 +147,7 @@ export default function GraphView() {
147
147
  console.log({ edges });
148
148
  return (_jsx("div", { className: "w-full h-screen flex relative", children: _jsxs("div", { className: "flex", children: [_jsx("div", { className: "absolute top-0 left-0 z-10 flex gap-2", children: priviledged.map((item) => (_jsx(Button, { type: actionPrivileged[item.key] ? "primary" : "default", htmlType: "button", onClick: () => {
149
149
  setActionPrivileged((prev) => (Object.assign(Object.assign({}, prev), { [item.key]: !prev[item.key] })));
150
- }, children: item.name }, item.key))) }), _jsx(LayerView, { componentProps: componentSection, statusKey: "section", defaultBackground: "#1e2d4a", mappingKey: "properties", keyNode: "nodes", onEdgesChange: (edges, table) => {
151
- console.log(edges, "edges");
150
+ }, children: item.name }, item.key))) }), _jsx(LayerView, { componentProps: componentSection, statusKey: "section", defaultBackground: "#1e2d4a", mappingKey: "properties", keyNode: "nodes", onEdgesChange: (edges) => {
152
151
  setEdges(edges);
153
152
  }, initialEdges: NODE_PROPERTIES, isConnectEdge: isConnecting, isSelectNode: isSelectNode, connectionMatchKey: {
154
153
  key: "use_checking_availability",
@@ -153,8 +153,7 @@ export default function GraphView() {
153
153
  {item.name}
154
154
  </Button>))}
155
155
  </div>
156
- <LayerView componentProps={componentSection} statusKey="section" defaultBackground="#1e2d4a" mappingKey="properties" keyNode="nodes" onEdgesChange={(edges, table) => {
157
- console.log(edges, "edges");
156
+ <LayerView componentProps={componentSection} statusKey="section" defaultBackground="#1e2d4a" mappingKey="properties" keyNode="nodes" onEdgesChange={(edges) => {
158
157
  setEdges(edges);
159
158
  }} initialEdges={NODE_PROPERTIES} isConnectEdge={isConnecting} isSelectNode={isSelectNode} connectionMatchKey={{
160
159
  key: "use_checking_availability",
@@ -102,7 +102,7 @@ export interface LayerViewProps<TMeta = undefined> {
102
102
  connectingNode?: boolean;
103
103
  dragTransferTable?: boolean;
104
104
  };
105
- onEdgesChange?: (edges: EdgeType[], table: PropertiesProps[]) => void;
105
+ onEdgesChange?: (edges: EdgeType[]) => void;
106
106
  keyNode?: string;
107
107
  isConnectEdge?: boolean;
108
108
  isSelectNode?: boolean;
@@ -1,12 +1,11 @@
1
1
  import React from "react";
2
2
  import { EdgeType, NodeType } from "./utils";
3
3
  import { DraggingAnchor } from "./connection-layer";
4
- import { PropertiesProps } from "../../dto/table";
5
4
  import { TableMatchKey } from ".";
6
5
  export type UseConnectionGraphOptions = {
7
6
  svgRef: React.RefObject<SVGSVGElement>;
8
7
  getNodeById: (id: string) => NodeType | null;
9
- onEdgesChange?: (edges: EdgeType[], table: PropertiesProps[]) => void;
8
+ onEdgesChange?: (edges: EdgeType[]) => void;
10
9
  keyNode?: string;
11
10
  mappingKey?: string;
12
11
  tableMatchKey?: TableMatchKey[];
@@ -168,12 +168,8 @@ export const useConnectionGraph = ({ svgRef, onEdgesChange, keyNode, mappingKey,
168
168
  sourceToTargets.set(e.from, []);
169
169
  sourceToTargets.get(e.from).push(e.to);
170
170
  });
171
- const result = components === null || components === void 0 ? void 0 : components.map((table) => {
172
- var _a, _b;
173
- return (Object.assign(Object.assign({}, table), { [keyNode]: (_b = sourceToTargets.get(String((_a = table === null || table === void 0 ? void 0 : table[mappingKey]) === null || _a === void 0 ? void 0 : _a.id))) !== null && _b !== void 0 ? _b : [] }));
174
- });
175
- onEdgesChange === null || onEdgesChange === void 0 ? void 0 : onEdgesChange(edges, result);
176
- }, [edges]);
171
+ onEdgesChange === null || onEdgesChange === void 0 ? void 0 : onEdgesChange(edges);
172
+ }, [edges, onEdgesChange]);
177
173
  // initialize edges
178
174
  useEffect(() => {
179
175
  if (!isEqual(initialEdges, edges) && components) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seat-editor",
3
- "version": "3.6.35",
3
+ "version": "3.6.37",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",