@openremote/or-rules 1.8.0-snapshot.20250725074716 → 1.8.0-snapshot.20250725120001
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.
- package/README.md +30 -30
- package/custom-elements.json +13 -13
- package/dist/umd/index.bundle.js +4744 -4744
- package/dist/umd/index.bundle.js.map +1 -1
- package/lib/flow-viewer/components/confirmation-dialog.js +61 -24
- package/lib/flow-viewer/components/connection-container.js +35 -1
- package/lib/flow-viewer/components/connection-line.js +117 -28
- package/lib/flow-viewer/components/context-menu.js +140 -45
- package/lib/flow-viewer/components/editor-workspace.js +282 -20
- package/lib/flow-viewer/components/flow-editor.js +160 -47
- package/lib/flow-viewer/components/flow-node-socket.js +146 -31
- package/lib/flow-viewer/components/flow-node.js +192 -29
- package/lib/flow-viewer/components/internal-picker.js +271 -54
- package/lib/flow-viewer/components/node-menu-item.js +132 -32
- package/lib/flow-viewer/components/node-panel.js +104 -60
- package/lib/flow-viewer/components/notification-dialog.js +55 -23
- package/lib/flow-viewer/components/popup-modal.js +113 -54
- package/lib/flow-viewer/components/rule-browser.js +119 -30
- package/lib/flow-viewer/components/selectable-element.js +71 -1
- package/lib/flow-viewer/components/selection-box.js +119 -15
- package/lib/flow-viewer/components/top-bar.js +116 -49
- package/lib/flow-viewer/components/workspace-contextmenu-options.js +128 -5
- package/lib/flow-viewer/components/writable-dropdown.js +51 -5
- package/lib/flow-viewer/converters/node-converter.js +10 -1
- package/lib/flow-viewer/flow-viewer.js +19 -1
- package/lib/flow-viewer/models/camera.js +2 -1
- package/lib/flow-viewer/models/context-menu-button.js +2 -1
- package/lib/flow-viewer/models/light-node-collection.js +2 -1
- package/lib/flow-viewer/models/status.js +8 -1
- package/lib/flow-viewer/node-structure/copy.machine.js +34 -1
- package/lib/flow-viewer/node-structure/identity.assigner.js +10 -1
- package/lib/flow-viewer/node-structure/identity.dom.link.js +4 -1
- package/lib/flow-viewer/node-structure/index.js +5 -1
- package/lib/flow-viewer/node-structure/socket.type.matcher.js +50 -1
- package/lib/flow-viewer/node-structure/utils.js +109 -1
- package/lib/flow-viewer/services/copy-paste-manager.js +59 -1
- package/lib/flow-viewer/services/exporter.js +67 -1
- package/lib/flow-viewer/services/input.js +80 -1
- package/lib/flow-viewer/services/integration.js +27 -1
- package/lib/flow-viewer/services/modal.js +29 -8
- package/lib/flow-viewer/services/project.js +222 -1
- package/lib/flow-viewer/services/shortcuts.js +63 -1
- package/lib/flow-viewer/styles/editor-workspace-style.js +55 -53
- package/lib/flow-viewer/styles/flow-node-style.js +95 -93
- package/lib/flow-viewer/styles/picker-styles.js +31 -29
- package/lib/flow-viewer/utils.js +49 -1
- package/lib/index.js +953 -56
- package/lib/json-viewer/forms/or-rule-form-alarm.js +91 -18
- package/lib/json-viewer/forms/or-rule-form-email-message.js +51 -12
- package/lib/json-viewer/forms/or-rule-form-localized.js +269 -43
- package/lib/json-viewer/forms/or-rule-form-push-notification.js +152 -63
- package/lib/json-viewer/forms/or-rule-form-webhook.js +296 -101
- package/lib/json-viewer/modals/or-rule-alarm-modal.js +173 -17
- package/lib/json-viewer/modals/or-rule-notification-modal.js +196 -11
- package/lib/json-viewer/modals/or-rule-radial-modal.js +142 -17
- package/lib/json-viewer/modals/or-rule-webhook-modal.js +78 -8
- package/lib/json-viewer/or-rule-action-alarm.js +97 -5
- package/lib/json-viewer/or-rule-action-attribute.js +235 -33
- package/lib/json-viewer/or-rule-action-notification.js +465 -56
- package/lib/json-viewer/or-rule-action-webhook.js +49 -18
- package/lib/json-viewer/or-rule-asset-query.js +849 -126
- package/lib/json-viewer/or-rule-condition.js +216 -29
- package/lib/json-viewer/or-rule-json-viewer.js +393 -34
- package/lib/json-viewer/or-rule-then-otherwise.js +609 -113
- package/lib/json-viewer/or-rule-trigger-query.js +227 -57
- package/lib/json-viewer/or-rule-when.js +343 -126
- package/lib/or-rule-group-viewer.js +106 -12
- package/lib/or-rule-text-viewer.js +133 -22
- package/lib/or-rule-tree.js +601 -57
- package/lib/or-rule-validity.js +373 -62
- package/lib/or-rule-viewer.js +361 -81
- package/lib/style.js +89 -64
- package/package.json +11 -11
|
@@ -1 +1,222 @@
|
|
|
1
|
-
var __awaiter
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { EventEmitter } from "events";
|
|
11
|
+
import { input } from "../components/flow-editor";
|
|
12
|
+
import { NodeUtilities } from "../node-structure";
|
|
13
|
+
import { SocketTypeMatcher } from "../node-structure/socket.type.matcher";
|
|
14
|
+
export class Project extends EventEmitter {
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
this.nodes = [];
|
|
18
|
+
this.connections = [];
|
|
19
|
+
this.existingFlowRuleId = -1;
|
|
20
|
+
this.existingFlowRuleName = null;
|
|
21
|
+
this.existingFlowRuleDesc = null;
|
|
22
|
+
this.isInUnsavedState = false;
|
|
23
|
+
this.isConnecting = false;
|
|
24
|
+
this.history = [];
|
|
25
|
+
this.historyIndex = 0;
|
|
26
|
+
this.startConnectionDrag = (e, socket, isInputNode) => {
|
|
27
|
+
this.connectionStartSocket = null;
|
|
28
|
+
this.connectionEndSocket = null;
|
|
29
|
+
if (isInputNode) {
|
|
30
|
+
this.connectionEndSocket = socket;
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
this.connectionStartSocket = socket;
|
|
34
|
+
}
|
|
35
|
+
this.isConnecting = true;
|
|
36
|
+
this.emit("connectionstart", e, socket);
|
|
37
|
+
};
|
|
38
|
+
this.connectionDragging = (e) => {
|
|
39
|
+
this.emit("connecting", e);
|
|
40
|
+
};
|
|
41
|
+
this.endConnectionDrag = (e, socket, isInputNode) => {
|
|
42
|
+
if (!this.isConnecting) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (isInputNode) {
|
|
46
|
+
this.connectionEndSocket = socket;
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
this.connectionStartSocket = socket;
|
|
50
|
+
}
|
|
51
|
+
this.isConnecting = false;
|
|
52
|
+
this.emit("connectionend", e, socket);
|
|
53
|
+
if (this.connectionEndSocket && this.connectionStartSocket) {
|
|
54
|
+
this.createConnection(this.connectionStartSocket.id, this.connectionEndSocket.id);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
this.setMaxListeners(1024);
|
|
58
|
+
}
|
|
59
|
+
get isCurrentlyConnecting() {
|
|
60
|
+
return this.isConnecting;
|
|
61
|
+
}
|
|
62
|
+
set unsavedState(state) {
|
|
63
|
+
this.isInUnsavedState = state;
|
|
64
|
+
this.emit("unsavedstateset", state);
|
|
65
|
+
}
|
|
66
|
+
get unsavedState() {
|
|
67
|
+
return this.isInUnsavedState;
|
|
68
|
+
}
|
|
69
|
+
setCurrentProject(id, name, desc) {
|
|
70
|
+
this.unsavedState = false;
|
|
71
|
+
this.existingFlowRuleId = id;
|
|
72
|
+
this.existingFlowRuleName = name;
|
|
73
|
+
this.existingFlowRuleDesc = desc;
|
|
74
|
+
this.history = [];
|
|
75
|
+
this.emit("projectset", id);
|
|
76
|
+
}
|
|
77
|
+
notifyChange() {
|
|
78
|
+
this.unsavedState = true;
|
|
79
|
+
this.emit("changed");
|
|
80
|
+
}
|
|
81
|
+
createUndoSnapshot() {
|
|
82
|
+
this.history = this.history.splice(0, this.historyIndex + 1);
|
|
83
|
+
this.history.push(JSON.parse(JSON.stringify(this.toNodeCollection("", ""))));
|
|
84
|
+
this.historyIndex = this.history.length - 1;
|
|
85
|
+
}
|
|
86
|
+
undo() {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
if (this.history.length === 0 || this.historyIndex === -1) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
if (this.historyIndex === this.history.length - 1) {
|
|
92
|
+
this.history.push(JSON.parse(JSON.stringify(this.toNodeCollection("", ""))));
|
|
93
|
+
}
|
|
94
|
+
yield this.fromNodeCollection(this.history[this.historyIndex]);
|
|
95
|
+
this.historyIndex--;
|
|
96
|
+
this.notifyChange();
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
redo() {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
if (this.history.length === 0 || this.historyIndex >= (this.history.length - 2)) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
this.historyIndex++;
|
|
105
|
+
yield this.fromNodeCollection(this.history[this.historyIndex + 1]);
|
|
106
|
+
this.notifyChange();
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
fromNodeCollection(collection) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
yield this.clear();
|
|
112
|
+
collection.nodes.forEach((node) => {
|
|
113
|
+
this.addNode(node);
|
|
114
|
+
});
|
|
115
|
+
collection.connections.forEach((conn) => {
|
|
116
|
+
this.createConnection(conn.from, conn.to);
|
|
117
|
+
});
|
|
118
|
+
this.emit("nodecollectionloaded", collection);
|
|
119
|
+
this.unsavedState = false;
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
toNodeCollection(name, description) {
|
|
123
|
+
return {
|
|
124
|
+
name,
|
|
125
|
+
description,
|
|
126
|
+
connections: this.connections,
|
|
127
|
+
nodes: this.nodes
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
clear() {
|
|
131
|
+
return __awaiter(this, arguments, void 0, function* (alsoResetProject = false) {
|
|
132
|
+
input.clearSelection();
|
|
133
|
+
this.nodes.forEach((n) => {
|
|
134
|
+
this.removeNode(n);
|
|
135
|
+
});
|
|
136
|
+
this.nodes = [];
|
|
137
|
+
this.connections = [];
|
|
138
|
+
this.unsavedState = !alsoResetProject;
|
|
139
|
+
if (alsoResetProject) {
|
|
140
|
+
this.setCurrentProject(-1, null, null);
|
|
141
|
+
}
|
|
142
|
+
this.emit("cleared");
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
addNode(node) {
|
|
146
|
+
if (this.nodes.filter((n) => n.id === node.id).length > 0) {
|
|
147
|
+
throw new Error("Node with identical identity already exists in the project");
|
|
148
|
+
}
|
|
149
|
+
this.nodes.push(node);
|
|
150
|
+
this.emit("nodeadded", node);
|
|
151
|
+
}
|
|
152
|
+
removeNode(node) {
|
|
153
|
+
input.clearSelection();
|
|
154
|
+
this.connections.filter((c) => {
|
|
155
|
+
const from = NodeUtilities.getSocketFromID(c.from, this.nodes);
|
|
156
|
+
const to = NodeUtilities.getSocketFromID(c.to, this.nodes);
|
|
157
|
+
return from.nodeId === node.id || to.nodeId === node.id;
|
|
158
|
+
}).forEach((c) => {
|
|
159
|
+
this.removeConnection(c);
|
|
160
|
+
});
|
|
161
|
+
this.nodes.filter((n) => n.id === node.id).forEach((n) => {
|
|
162
|
+
this.nodes.splice(this.nodes.indexOf(n), 1);
|
|
163
|
+
this.emit("noderemoved", n);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
removeConnection(connection) {
|
|
167
|
+
input.clearSelection();
|
|
168
|
+
this.connections.filter((c) => c.from === connection.from && c.to === connection.to).forEach((c) => {
|
|
169
|
+
const index = this.connections.indexOf(c);
|
|
170
|
+
if (index === -1) {
|
|
171
|
+
console.warn("attempt to delete nonexistent connection");
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
this.connections.splice(index, 1);
|
|
175
|
+
this.emit("connectionremoved", c);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
isValidConnection(connection) {
|
|
180
|
+
const fromSocket = NodeUtilities.getSocketFromID(connection.from, this.nodes);
|
|
181
|
+
const toSocket = NodeUtilities.getSocketFromID(connection.to, this.nodes);
|
|
182
|
+
if (!fromSocket ||
|
|
183
|
+
!toSocket) {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
return !(!SocketTypeMatcher.match(fromSocket.type, toSocket.type) ||
|
|
187
|
+
fromSocket.id === toSocket.id ||
|
|
188
|
+
fromSocket.nodeId === toSocket.nodeId);
|
|
189
|
+
}
|
|
190
|
+
createConnection(fromSocket, toSocket) {
|
|
191
|
+
const connection = {
|
|
192
|
+
from: fromSocket,
|
|
193
|
+
to: toSocket
|
|
194
|
+
};
|
|
195
|
+
if (!(this.isValidConnection(connection))) {
|
|
196
|
+
return false;
|
|
197
|
+
}
|
|
198
|
+
// If the type contains _ARRAY, then assume that we allow multiple nodes to connect to that socket.
|
|
199
|
+
if (!((NodeUtilities.getSocketFromID(connection.to, this.nodes).type).includes("_ARRAY"))) {
|
|
200
|
+
for (const c of this.connections.filter((j) => j.to === toSocket)) {
|
|
201
|
+
// TODO: this.connections should contain the types of the other nodes, so that we only remove
|
|
202
|
+
this.removeConnection(c);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
this.connections.push(connection);
|
|
206
|
+
this.emit("connectioncreated", fromSocket, toSocket);
|
|
207
|
+
return true;
|
|
208
|
+
}
|
|
209
|
+
removeInvalidConnections() {
|
|
210
|
+
for (const c of this.connections.map(c => this.enrichConnection(c)).filter(j => !this.isValidConnection(j))) {
|
|
211
|
+
this.removeConnection(c);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
enrichConnection(c) {
|
|
215
|
+
var _a, _b;
|
|
216
|
+
return {
|
|
217
|
+
from: (_a = NodeUtilities.getSocketFromID(c.from, this.nodes)) === null || _a === void 0 ? void 0 : _a.id,
|
|
218
|
+
to: (_b = NodeUtilities.getSocketFromID(c.to, this.nodes)) === null || _b === void 0 ? void 0 : _b.id
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
//# sourceMappingURL=project.js.map
|
|
@@ -1 +1,63 @@
|
|
|
1
|
-
import{FlowNode
|
|
1
|
+
import { FlowNode } from "../components/flow-node";
|
|
2
|
+
import { ConnectionLine } from "../components/connection-line";
|
|
3
|
+
import { input, project } from "../components/flow-editor";
|
|
4
|
+
export class Shortcuts {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.actions = [
|
|
7
|
+
{
|
|
8
|
+
keys: ["Delete", "Backspace"],
|
|
9
|
+
action: () => {
|
|
10
|
+
project.createUndoSnapshot();
|
|
11
|
+
const selectedNodes = input.selected.filter((s) => s instanceof FlowNode && s.selected && !s.frozen);
|
|
12
|
+
const selectedConnections = input.selected.filter((s) => s instanceof ConnectionLine && s.selected);
|
|
13
|
+
selectedConnections.forEach((n) => project.removeConnection(n.connection));
|
|
14
|
+
selectedNodes.forEach((n) => project.removeNode(n.node));
|
|
15
|
+
project.notifyChange();
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
keys: ["KeyA"],
|
|
20
|
+
requireCtrl: true,
|
|
21
|
+
action: () => {
|
|
22
|
+
if (input.selected.length > 0) {
|
|
23
|
+
input.clearSelection(true);
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
input.selectables.forEach((s) => {
|
|
27
|
+
input.select(s, true);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
keys: ["KeyZ"],
|
|
34
|
+
requireCtrl: true,
|
|
35
|
+
action: () => {
|
|
36
|
+
project.undo();
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
keys: ["KeyY"],
|
|
41
|
+
requireCtrl: true,
|
|
42
|
+
action: () => {
|
|
43
|
+
project.redo();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
window.addEventListener("keydown", (e) => {
|
|
48
|
+
if (!(document.activeElement instanceof HTMLBodyElement)) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
this.actions.forEach((a) => {
|
|
52
|
+
if (!a.keys.includes(e.key) && !a.keys.includes(e.code)) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (a.requireCtrl && !e.ctrlKey) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
a.action();
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=shortcuts.js.map
|
|
@@ -1,53 +1,55 @@
|
|
|
1
|
-
import{css
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
stroke:
|
|
52
|
-
|
|
53
|
-
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export const EditorWorkspaceStyle = css `
|
|
3
|
+
:host{
|
|
4
|
+
background: whitesmoke;
|
|
5
|
+
position: relative;
|
|
6
|
+
display: block;
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
box-shadow: rgba(0, 0, 0, 0.2) 0 0 4px inset;
|
|
9
|
+
height: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.view-options{
|
|
13
|
+
position: absolute;
|
|
14
|
+
left: 0;
|
|
15
|
+
top: 0;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: row;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.button{
|
|
21
|
+
padding: 10px;
|
|
22
|
+
margin: 10px;
|
|
23
|
+
cursor:pointer;
|
|
24
|
+
background: rgba(0,0,0,0.02);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
or-mwc-input[type=button]
|
|
28
|
+
{
|
|
29
|
+
margin: 10px;
|
|
30
|
+
color: inherit;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.button:hover{
|
|
34
|
+
background: rgba(0,0,0,0.04);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.button:active{
|
|
38
|
+
background: rgba(0,0,0,0.06);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
svg, connection-container {
|
|
42
|
+
pointer-events: none;
|
|
43
|
+
position: absolute;
|
|
44
|
+
display: block;
|
|
45
|
+
right: 0;
|
|
46
|
+
top: 0;
|
|
47
|
+
left: 0;
|
|
48
|
+
bottom: 0;
|
|
49
|
+
width: 100%;
|
|
50
|
+
height: 100%;
|
|
51
|
+
stroke-width: 4px;
|
|
52
|
+
stroke: rgb(80,80,80);
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
//# sourceMappingURL=editor-workspace-style.js.map
|
|
@@ -1,93 +1,95 @@
|
|
|
1
|
-
import{css
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
min-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
grid-template-
|
|
11
|
-
grid-template-
|
|
12
|
-
|
|
13
|
-
"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
min-
|
|
23
|
-
|
|
24
|
-
grid-template-
|
|
25
|
-
grid-template-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
justify-content:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
border-
|
|
54
|
-
border-bottom-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
margin-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export const FlowNodeStyle = css `
|
|
3
|
+
:host{
|
|
4
|
+
white-space: nowrap;
|
|
5
|
+
min-width: 80px;
|
|
6
|
+
min-height: 80px;
|
|
7
|
+
background: rgba(200,200,200, 0.85);
|
|
8
|
+
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-columns: auto auto auto;
|
|
11
|
+
grid-template-rows: auto 1fr;
|
|
12
|
+
grid-template-areas:
|
|
13
|
+
"title title title"
|
|
14
|
+
"input internal output";
|
|
15
|
+
|
|
16
|
+
position: absolute;
|
|
17
|
+
border-radius: var(--roundness);
|
|
18
|
+
transform-origin: 0 0;
|
|
19
|
+
z-index: 0;
|
|
20
|
+
}
|
|
21
|
+
:host([minimal]){
|
|
22
|
+
min-width: 60px;
|
|
23
|
+
min-height: 60px;
|
|
24
|
+
grid-template-columns: var(--socket-display-size) 1fr var(--socket-display-size);
|
|
25
|
+
grid-template-rows: auto;
|
|
26
|
+
grid-template-areas:
|
|
27
|
+
"input title output";
|
|
28
|
+
}
|
|
29
|
+
.socket-side{
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
justify-content: space-evenly;
|
|
34
|
+
}
|
|
35
|
+
.inputs{
|
|
36
|
+
grid-area: input;
|
|
37
|
+
align-items: flex-start;
|
|
38
|
+
}
|
|
39
|
+
.inputs flow-node-socket{
|
|
40
|
+
transform: translateX(calc(var(--socket-size) / -2));
|
|
41
|
+
}
|
|
42
|
+
.outputs{
|
|
43
|
+
grid-area: output;
|
|
44
|
+
align-items: flex-end;
|
|
45
|
+
}
|
|
46
|
+
.outputs flow-node-socket{
|
|
47
|
+
transform: translateX(calc(var(--socket-size) / 2));
|
|
48
|
+
}
|
|
49
|
+
.title{
|
|
50
|
+
grid-area: title;
|
|
51
|
+
padding: 3px 6px 3px 6px;
|
|
52
|
+
background: rgb(180,180,180);
|
|
53
|
+
border-radius: inherit;
|
|
54
|
+
border-bottom-left-radius: 0;
|
|
55
|
+
border-bottom-right-radius: 0;
|
|
56
|
+
color: white;
|
|
57
|
+
cursor: grab;
|
|
58
|
+
}
|
|
59
|
+
.title.input{
|
|
60
|
+
background: var(--input-color);
|
|
61
|
+
text-align: right;
|
|
62
|
+
}
|
|
63
|
+
.title.processor{
|
|
64
|
+
background: var(--processor-color);
|
|
65
|
+
text-align: center;
|
|
66
|
+
}
|
|
67
|
+
.title.output{
|
|
68
|
+
background: var(--output-color);
|
|
69
|
+
text-align: left;
|
|
70
|
+
}
|
|
71
|
+
.title.minimal{
|
|
72
|
+
background: transparent;
|
|
73
|
+
font-size: 20px;
|
|
74
|
+
line-height: 50%;
|
|
75
|
+
display: table;
|
|
76
|
+
padding: 15px 0 15px 0;
|
|
77
|
+
text-align: center;
|
|
78
|
+
margin-top: auto;
|
|
79
|
+
margin-bottom: auto;
|
|
80
|
+
}
|
|
81
|
+
.title.minimal[singlechar]{
|
|
82
|
+
font-size: 32px;
|
|
83
|
+
}
|
|
84
|
+
.lock-icon{
|
|
85
|
+
position: absolute;
|
|
86
|
+
top: 0px;
|
|
87
|
+
right: 0px;
|
|
88
|
+
color: rgba(255,255,255,0.8);
|
|
89
|
+
transform: scale(.7);
|
|
90
|
+
}
|
|
91
|
+
.lock-icon.input{
|
|
92
|
+
left: 0;
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
95
|
+
//# sourceMappingURL=flow-node-style.js.map
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import{css
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
min-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
export const PickerStyle = css `
|
|
3
|
+
input{
|
|
4
|
+
border: 0;
|
|
5
|
+
height: max-content;
|
|
6
|
+
}
|
|
7
|
+
textarea {
|
|
8
|
+
min-width: 150px;
|
|
9
|
+
min-height: 37px;
|
|
10
|
+
}
|
|
11
|
+
input[type=number] {
|
|
12
|
+
padding: 11px 10px;
|
|
13
|
+
}
|
|
14
|
+
textarea, input[type=text], select{
|
|
15
|
+
font-family: inherit;
|
|
16
|
+
padding: 10px;
|
|
17
|
+
border-radius: var(--roundness);
|
|
18
|
+
width: fit-content;
|
|
19
|
+
border: none;
|
|
20
|
+
}
|
|
21
|
+
.attribute-label{
|
|
22
|
+
padding: 5px;
|
|
23
|
+
background: rgba(0,0,0,0.05);
|
|
24
|
+
text-align: center;
|
|
25
|
+
border-radius: var(--roundness);
|
|
26
|
+
font-size: 110%;
|
|
27
|
+
color: rgb(76, 76, 76);
|
|
28
|
+
font-weight: 400;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
//# sourceMappingURL=picker-styles.js.map
|