seat-editor 3.6.8 → 3.6.10

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.
@@ -145,15 +145,15 @@ export default function GraphView() {
145
145
  // }}
146
146
  onMakeSelection: onMakeSelection, tableMatchKey: [
147
147
  {
148
- key: "section",
149
- value: 1,
148
+ key: "capacity",
149
+ value: 5,
150
150
  properties: {
151
- fill: "#F6F6F6",
152
- },
153
- element: {
154
- icon: undefined,
155
- props: {},
151
+ fill: "#000000",
156
152
  },
153
+ // element: {
154
+ // icon: undefined,
155
+ // props: {},
156
+ // },
157
157
  },
158
158
  ], onDragTable: (_, data) => setDataDrag(data), actionPrivileged: actionPrivileged }), _jsxs("div", { className: "w-1/5 p-4", onMouseMove: handleMouseMove, onMouseLeave: handleMouseLeave, children: [_jsx("div", { id: "table" }), _jsxs("div", { className: "rounded-lg bg-white p-4", children: [_jsx("h1", { className: "text-2xl font-bold", children: "Section" }), sections.map((section) => (_jsxs("div", { className: clsx("font-bold text-white rounded-md p-2 cursor-pointer", sectionActive === section.id && "!bg-blue-500"), style: { backgroundColor: section.color }, onClick: () => setSectionActive(section.id), children: [_jsx("h2", { className: "text-lg", children: section.name }), section.items.length > 0 && (_jsx("ul", { className: "list-disc pl-5 bg-opacity-50 bg-white p-2 rounded ", children: section.items.map((item) => (_jsx("li", { children: item.name }, item.id))) }))] }, section.id)))] })] }), _jsx("div", { className: "w-1/5 p-4", children: _jsx("div", { className: "rounded-lg bg-white p-4", children: _jsx("h1", { className: "text-2xl font-bold", children: "Nodes" }) }) })] }) }));
159
159
  }
@@ -151,15 +151,15 @@ export default function GraphView() {
151
151
  // }}
152
152
  onMakeSelection={onMakeSelection} tableMatchKey={[
153
153
  {
154
- key: "section",
155
- value: 1,
154
+ key: "capacity",
155
+ value: 5,
156
156
  properties: {
157
- fill: "#F6F6F6",
158
- },
159
- element: {
160
- icon: undefined,
161
- props: {},
157
+ fill: "#000000",
162
158
  },
159
+ // element: {
160
+ // icon: undefined,
161
+ // props: {},
162
+ // },
163
163
  },
164
164
  ]} onDragTable={(_, data) => setDataDrag(data)} actionPrivileged={actionPrivileged}/>
165
165
  <div className="w-1/5 p-4" onMouseMove={handleMouseMove} onMouseLeave={handleMouseLeave}>
@@ -16,18 +16,18 @@ const LayerView = (props) => {
16
16
  const { componentProps, extraComponentProps, onSelectComponent, onDoubleClick, mappingKey, statusKey, defaultBackground, defaultBoundingBox,
17
17
  // iconTags,
18
18
  tooltipProps, onRightClick, allowTooltip = true, tableMatchKey, eventMatchTable, ghostAttributes, onDrop, onSwitch, refs, privilegedTags, loadingRender, actionPrivileged = {
19
- select: true,
20
- move: true,
21
- switch: true,
22
- drop: true,
23
- rightClick: true,
24
- double: true,
25
- selection: true,
26
- grapConnection: true,
27
- viewGraph: true,
28
- dragTable: true,
29
- selectNode: true,
30
- connectingNode: true
19
+ select: false,
20
+ move: false,
21
+ switch: false,
22
+ drop: false,
23
+ rightClick: false,
24
+ double: false,
25
+ selection: false,
26
+ grapConnection: false,
27
+ viewGraph: false,
28
+ dragTable: false,
29
+ selectNode: false,
30
+ connectingNode: false
31
31
  }, onMakeSelection, } = props;
32
32
  const widthTooltip = (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.minWidth) || 168;
33
33
  const tableGhost = useRef(null);
@@ -15,18 +15,18 @@ const LayerView = (props) => {
15
15
  const { componentProps, extraComponentProps, onSelectComponent, onDoubleClick, mappingKey, statusKey, defaultBackground, defaultBoundingBox,
16
16
  // iconTags,
17
17
  tooltipProps, onRightClick, allowTooltip = true, tableMatchKey, eventMatchTable, ghostAttributes, onDrop, onSwitch, refs, privilegedTags, loadingRender, actionPrivileged = {
18
- select: true,
19
- move: true,
20
- switch: true,
21
- drop: true,
22
- rightClick: true,
23
- double: true,
24
- selection: true,
25
- grapConnection: true,
26
- viewGraph: true,
27
- dragTable: true,
28
- selectNode: true,
29
- connectingNode: true
18
+ select: false,
19
+ move: false,
20
+ switch: false,
21
+ drop: false,
22
+ rightClick: false,
23
+ double: false,
24
+ selection: false,
25
+ grapConnection: false,
26
+ viewGraph: false,
27
+ dragTable: false,
28
+ selectNode: false,
29
+ connectingNode: false
30
30
  }, onMakeSelection, } = props;
31
31
  const widthTooltip = (tooltipProps === null || tooltipProps === void 0 ? void 0 : tooltipProps.minWidth) || 168;
32
32
  const tableGhost = useRef(null);
@@ -69,6 +69,7 @@ export const buildPath = (points) => {
69
69
  // ─── renderElements ──────────────────────────────────────────────────────────
70
70
  export const renderElements = (elementEditor, mappingKey, tableMatchKey, connecting) => {
71
71
  return elementEditor.map((editorItem) => {
72
+ var _a, _b;
72
73
  const isUsingMapping = mappingKey &&
73
74
  typeof editorItem[mappingKey] === "object" &&
74
75
  editorItem[mappingKey] !== null;
@@ -79,8 +80,7 @@ export const renderElements = (elementEditor, mappingKey, tableMatchKey, connect
79
80
  if (hasKey)
80
81
  return item.value == (editorItem === null || editorItem === void 0 ? void 0 : editorItem[item.key]);
81
82
  });
82
- // console.log({finalProps},{ connecting},connecting?.fromId == finalProps?.id)
83
- const fill = (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) == (finalProps === null || finalProps === void 0 ? void 0 : finalProps.id) ? "#7239EA" : finalProps === null || finalProps === void 0 ? void 0 : finalProps.fill;
83
+ const fill = (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) == (finalProps === null || finalProps === void 0 ? void 0 : finalProps.id) ? "#7239EA" : (_b = (_a = tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.properties) === null || _a === void 0 ? void 0 : _a.fill) !== null && _b !== void 0 ? _b : finalProps === null || finalProps === void 0 ? void 0 : finalProps.fill;
84
84
  finalProps = Object.assign(Object.assign(Object.assign({}, finalProps), tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.properties), { fill: fill, className: tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.className, element: tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.element });
85
85
  }
86
86
  return finalProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seat-editor",
3
- "version": "3.6.8",
3
+ "version": "3.6.10",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",