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: "
|
|
149
|
-
value:
|
|
148
|
+
key: "capacity",
|
|
149
|
+
value: 5,
|
|
150
150
|
properties: {
|
|
151
|
-
fill: "#
|
|
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: "
|
|
155
|
-
value:
|
|
154
|
+
key: "capacity",
|
|
155
|
+
value: 5,
|
|
156
156
|
properties: {
|
|
157
|
-
fill: "#
|
|
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:
|
|
20
|
-
move:
|
|
21
|
-
switch:
|
|
22
|
-
drop:
|
|
23
|
-
rightClick:
|
|
24
|
-
double:
|
|
25
|
-
selection:
|
|
26
|
-
grapConnection:
|
|
27
|
-
viewGraph:
|
|
28
|
-
dragTable:
|
|
29
|
-
selectNode:
|
|
30
|
-
connectingNode:
|
|
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:
|
|
19
|
-
move:
|
|
20
|
-
switch:
|
|
21
|
-
drop:
|
|
22
|
-
rightClick:
|
|
23
|
-
double:
|
|
24
|
-
selection:
|
|
25
|
-
grapConnection:
|
|
26
|
-
viewGraph:
|
|
27
|
-
dragTable:
|
|
28
|
-
selectNode:
|
|
29
|
-
connectingNode:
|
|
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
|
-
|
|
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;
|