@web-utils/component 2.8.15 → 2.8.17
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/easy-popup/index.mjs +3 -3
- package/flow-designer/index.mjs +10093 -0
- package/flow-designer/style.css +1 -0
- package/flow-viewer/index.mjs +78 -92
- package/index.mjs +435 -443
- package/package.json +1 -1
- package/web-types.json +33 -194
- package/process-designer/index.mjs +0 -4676
- package/process-designer/style.css +0 -1
- package/process-palette/index.mjs +0 -190
- package/process-palette/style.css +0 -1
- package/properties-panel/index.mjs +0 -4791
- package/properties-panel/style.css +0 -1
package/flow-viewer/index.mjs
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var y = Object.prototype.hasOwnProperty,
|
|
5
|
-
var
|
|
6
|
-
for (var i in
|
|
7
|
-
y.call(
|
|
8
|
-
if (
|
|
9
|
-
for (var i of
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
}, g = (
|
|
13
|
-
var
|
|
14
|
-
var
|
|
1
|
+
var _ = Object.defineProperty, d = Object.defineProperties;
|
|
2
|
+
var v = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var p = Object.getOwnPropertySymbols;
|
|
4
|
+
var y = Object.prototype.hasOwnProperty, b = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var c = (e, t, i) => t in e ? _(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, u = (e, t) => {
|
|
6
|
+
for (var i in t || (t = {}))
|
|
7
|
+
y.call(t, i) && c(e, i, t[i]);
|
|
8
|
+
if (p)
|
|
9
|
+
for (var i of p(t))
|
|
10
|
+
b.call(t, i) && c(e, i, t[i]);
|
|
11
|
+
return e;
|
|
12
|
+
}, g = (e, t) => d(e, v(t));
|
|
13
|
+
var f = (e, t, i) => new Promise((n, o) => {
|
|
14
|
+
var s = (r) => {
|
|
15
15
|
try {
|
|
16
16
|
h(i.next(r));
|
|
17
|
-
} catch (
|
|
18
|
-
|
|
17
|
+
} catch (m) {
|
|
18
|
+
o(m);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, l = (r) => {
|
|
21
21
|
try {
|
|
22
22
|
h(i.throw(r));
|
|
23
|
-
} catch (
|
|
24
|
-
|
|
23
|
+
} catch (m) {
|
|
24
|
+
o(m);
|
|
25
25
|
}
|
|
26
|
-
}, h = (r) => r.done ? n(r.value) : Promise.resolve(r.value).then(
|
|
27
|
-
h((i = i.apply(
|
|
26
|
+
}, h = (r) => r.done ? n(r.value) : Promise.resolve(r.value).then(s, l);
|
|
27
|
+
h((i = i.apply(e, t)).next());
|
|
28
28
|
});
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
29
|
+
import V from "bpmn-js/lib/NavigatedViewer";
|
|
30
|
+
import a from "diagram-js/lib/navigation/zoomscroll/ZoomScroll";
|
|
31
|
+
import x from "@web-utils/component/easy-popup";
|
|
32
32
|
import "@web-utils/component/easy-popup/style.css";
|
|
33
|
-
import { n as
|
|
34
|
-
var
|
|
35
|
-
var
|
|
33
|
+
import { n as F } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
|
|
34
|
+
var M = function() {
|
|
35
|
+
var e = this, t = e.$createElement, i = e._self._c || t;
|
|
36
36
|
return i("div", {
|
|
37
37
|
ref: "container",
|
|
38
38
|
staticClass: "flow-viewer"
|
|
39
39
|
}, [i("EasyPopup", {
|
|
40
40
|
ref: "popup"
|
|
41
|
-
}, [
|
|
42
|
-
return [
|
|
41
|
+
}, [e._t("default", function() {
|
|
42
|
+
return [e._v(" " + e._s(e.element) + " ")];
|
|
43
43
|
}, {
|
|
44
|
-
element:
|
|
44
|
+
element: e.element
|
|
45
45
|
})], 2)], 1);
|
|
46
|
-
},
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
const { target:
|
|
50
|
-
|
|
51
|
-
target:
|
|
46
|
+
}, $ = [];
|
|
47
|
+
const S = a.prototype._handleWheel;
|
|
48
|
+
a.prototype._handleWheel = function(e) {
|
|
49
|
+
const { target: t, deltaMode: i, clientX: n, clientY: o, deltaX: s, deltaY: l } = e;
|
|
50
|
+
S.call(this, {
|
|
51
|
+
target: t,
|
|
52
52
|
deltaMode: i,
|
|
53
53
|
clientX: n,
|
|
54
|
-
clientY:
|
|
55
|
-
deltaX:
|
|
56
|
-
deltaY:
|
|
54
|
+
clientY: o,
|
|
55
|
+
deltaX: s,
|
|
56
|
+
deltaY: l,
|
|
57
57
|
preventDefault() {
|
|
58
|
-
|
|
58
|
+
e.preventDefault();
|
|
59
59
|
},
|
|
60
60
|
ctrlKey: !0
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
|
-
const
|
|
63
|
+
const A = {
|
|
64
64
|
__init__: ["zoomScroll"],
|
|
65
|
-
zoomScroll: ["type",
|
|
66
|
-
},
|
|
65
|
+
zoomScroll: ["type", a]
|
|
66
|
+
}, k = {
|
|
67
67
|
name: "FlowViewer",
|
|
68
68
|
components: {
|
|
69
|
-
EasyPopup:
|
|
69
|
+
EasyPopup: x
|
|
70
70
|
},
|
|
71
71
|
props: {
|
|
72
72
|
xml: {
|
|
@@ -91,77 +91,63 @@ const $ = {
|
|
|
91
91
|
};
|
|
92
92
|
},
|
|
93
93
|
watch: {
|
|
94
|
-
xml(
|
|
95
|
-
var
|
|
96
|
-
(
|
|
94
|
+
xml(e) {
|
|
95
|
+
var t;
|
|
96
|
+
(t = this.bpmnViewer) == null || t.importXML(e);
|
|
97
97
|
},
|
|
98
98
|
activities: "highlightActivity",
|
|
99
99
|
flows: "highlightFlow"
|
|
100
100
|
},
|
|
101
101
|
mounted() {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const n =
|
|
109
|
-
n
|
|
110
|
-
const l = this.bpmnViewer.get("eventBus");
|
|
111
|
-
this.canvas = this.bpmnViewer.get("canvas"), l.on("element.mousemove", (o) => d(this, null, function* () {
|
|
102
|
+
this.bpmnViewer = new V(g(u({}, this.options), {
|
|
103
|
+
container: this.$refs.container,
|
|
104
|
+
additionalModules: [A]
|
|
105
|
+
})), this.bpmnViewer.on("import.done", (e) => {
|
|
106
|
+
const t = e.error, i = e.warnings;
|
|
107
|
+
t ? this.$emit("error", t) : this.$emit("shown", i), this.bpmnViewer.get("canvas").zoom("fit-viewport", "center"), this.canvas = this.bpmnViewer.get("canvas"), this.elementRegistry = this.bpmnViewer.get("elementRegistry");
|
|
108
|
+
const n = this.bpmnViewer.get("eventBus");
|
|
109
|
+
n.on("element.mousemove", (o) => f(this, null, function* () {
|
|
112
110
|
o.element.type === "bpmn:UserTask" && (this.$emit("node-mousemove", o.element), this.element = o.element, yield this.$nextTick(), this.$refs.popup.show(o.originalEvent));
|
|
113
|
-
})),
|
|
111
|
+
})), n.on("element.out", () => {
|
|
114
112
|
this.$refs.popup.hide(), this.element = {};
|
|
115
113
|
}), this.highlightFlow(this.flows), this.highlightActivity(this.activities);
|
|
116
|
-
}),
|
|
114
|
+
}), this.bpmnViewer.importXML(this.xml);
|
|
117
115
|
},
|
|
118
116
|
beforeDestroy() {
|
|
119
|
-
var
|
|
120
|
-
(
|
|
117
|
+
var e;
|
|
118
|
+
(e = this.bpmnViewer) == null || e.destroy();
|
|
121
119
|
},
|
|
122
120
|
methods: {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
highlightFlow(t) {
|
|
127
|
-
this.canvas.getRootElement().children.filter((e) => e.type === "bpmn:SequenceFlow" && this.canvas.hasMarker(e, "highlight-line")).forEach((e) => {
|
|
128
|
-
var i;
|
|
129
|
-
return (i = this.canvas) == null ? void 0 : i.removeMarker(e, "highlight-line");
|
|
130
|
-
}), t.length > 0 && t.forEach((e) => {
|
|
131
|
-
var n;
|
|
132
|
-
const i = this.getElementById(e);
|
|
133
|
-
i && ((n = this.canvas) == null || n.addMarker(i, "highlight-line"));
|
|
121
|
+
highlight(e, t, i) {
|
|
122
|
+
this.elementRegistry.getAll().forEach((n) => {
|
|
123
|
+
n.type === t && (e.includes(n.id) ? this.canvas.addMarker(n, i) : this.canvas.removeMarker(n, i));
|
|
134
124
|
});
|
|
135
125
|
},
|
|
136
|
-
|
|
137
|
-
this.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
var n;
|
|
142
|
-
const i = this.getElementById(e);
|
|
143
|
-
i && ((n = this.canvas) == null || n.addMarker(i, "highlight"));
|
|
144
|
-
});
|
|
126
|
+
highlightFlow(e) {
|
|
127
|
+
this.highlight(e, "bpmn:SequenceFlow", "highlight-line");
|
|
128
|
+
},
|
|
129
|
+
highlightActivity(e) {
|
|
130
|
+
this.highlight(e, "bpmn:UserTask", "highlight");
|
|
145
131
|
}
|
|
146
132
|
}
|
|
147
|
-
},
|
|
148
|
-
var
|
|
149
|
-
S,
|
|
133
|
+
}, w = {};
|
|
134
|
+
var E = /* @__PURE__ */ F(
|
|
150
135
|
k,
|
|
151
|
-
|
|
136
|
+
M,
|
|
137
|
+
$,
|
|
152
138
|
!1,
|
|
153
|
-
|
|
139
|
+
R,
|
|
154
140
|
null,
|
|
155
141
|
null,
|
|
156
142
|
null
|
|
157
143
|
);
|
|
158
|
-
function
|
|
159
|
-
for (let
|
|
160
|
-
this[
|
|
144
|
+
function R(e) {
|
|
145
|
+
for (let t in w)
|
|
146
|
+
this[t] = w[t];
|
|
161
147
|
}
|
|
162
|
-
const
|
|
163
|
-
return
|
|
148
|
+
const q = /* @__PURE__ */ function() {
|
|
149
|
+
return E.exports;
|
|
164
150
|
}();
|
|
165
151
|
export {
|
|
166
|
-
|
|
152
|
+
q as default
|
|
167
153
|
};
|