@web-utils/component 2.9.15 → 2.9.16
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/element-dialog/index.mjs +7 -4
- package/flow-viewer/index.mjs +52 -49
- package/package.json +1 -1
- package/web-types.json +4 -4
package/element-dialog/index.mjs
CHANGED
|
@@ -219,6 +219,9 @@ const v = {
|
|
|
219
219
|
return s(this, null, function* () {
|
|
220
220
|
e ? (this.closed = !1, this.$emit("open"), this.$el.addEventListener("scroll", this.updatePopper), yield this.$nextTick(), this.$refs.dialog.scrollTop = 0, yield this.computeTop(), this.appendToBody && document.body.appendChild(this.$el)) : (this.$el.removeEventListener("scroll", this.updatePopper), this.closed || this.$emit("close"));
|
|
221
221
|
});
|
|
222
|
+
},
|
|
223
|
+
fullScreen(e) {
|
|
224
|
+
this.$emit("toggle-fullscreen", e);
|
|
222
225
|
}
|
|
223
226
|
},
|
|
224
227
|
created() {
|
|
@@ -271,22 +274,22 @@ const v = {
|
|
|
271
274
|
}
|
|
272
275
|
}
|
|
273
276
|
}, p = {};
|
|
274
|
-
var
|
|
277
|
+
var S = /* @__PURE__ */ g(
|
|
275
278
|
C,
|
|
276
279
|
y,
|
|
277
280
|
_,
|
|
278
281
|
!1,
|
|
279
|
-
|
|
282
|
+
b,
|
|
280
283
|
null,
|
|
281
284
|
null,
|
|
282
285
|
null
|
|
283
286
|
);
|
|
284
|
-
function
|
|
287
|
+
function b(e) {
|
|
285
288
|
for (let l in p)
|
|
286
289
|
this[l] = p[l];
|
|
287
290
|
}
|
|
288
291
|
const E = /* @__PURE__ */ function() {
|
|
289
|
-
return
|
|
292
|
+
return S.exports;
|
|
290
293
|
}();
|
|
291
294
|
export {
|
|
292
295
|
E as default
|
package/flow-viewer/index.mjs
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
var b = Object.defineProperty, x = Object.defineProperties;
|
|
2
2
|
var M = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
4
|
-
var V = Object.prototype.hasOwnProperty,
|
|
3
|
+
var g = Object.getOwnPropertySymbols;
|
|
4
|
+
var V = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var u = (e, i, t) => i in e ? b(e, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[i] = t, w = (e, i) => {
|
|
6
6
|
for (var t in i || (i = {}))
|
|
7
7
|
V.call(i, t) && u(e, t, i[t]);
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
|
|
8
|
+
if (g)
|
|
9
|
+
for (var t of g(i))
|
|
10
|
+
E.call(i, t) && u(e, t, i[t]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
12
|
+
}, y = (e, i) => x(e, M(i));
|
|
13
|
+
var v = (e, i, t) => new Promise((s, n) => {
|
|
14
|
+
var l = (r) => {
|
|
15
15
|
try {
|
|
16
|
-
a(t.next(
|
|
17
|
-
} catch (
|
|
18
|
-
n(
|
|
16
|
+
a(t.next(r));
|
|
17
|
+
} catch (o) {
|
|
18
|
+
n(o);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, h = (r) => {
|
|
21
21
|
try {
|
|
22
|
-
a(t.throw(
|
|
23
|
-
} catch (
|
|
24
|
-
n(
|
|
22
|
+
a(t.throw(r));
|
|
23
|
+
} catch (o) {
|
|
24
|
+
n(o);
|
|
25
25
|
}
|
|
26
|
-
}, a = (
|
|
26
|
+
}, a = (r) => r.done ? s(r.value) : Promise.resolve(r.value).then(l, h);
|
|
27
27
|
a((t = t.apply(e, i)).next());
|
|
28
28
|
});
|
|
29
|
-
import
|
|
29
|
+
import $ from "bpmn-js/lib/NavigatedViewer";
|
|
30
30
|
import d from "diagram-js/lib/navigation/zoomscroll/ZoomScroll";
|
|
31
31
|
import { create as c, attr as p, append as m } from "tiny-svg";
|
|
32
32
|
import { query as A } from "min-dom";
|
|
@@ -56,11 +56,11 @@ var B = function() {
|
|
|
56
56
|
}, {
|
|
57
57
|
element: e.element
|
|
58
58
|
})], 2)], 1);
|
|
59
|
-
},
|
|
60
|
-
const
|
|
59
|
+
}, C = [];
|
|
60
|
+
const f = d.prototype._handleWheel, P = {
|
|
61
61
|
__init__: ["zoomScroll"],
|
|
62
62
|
zoomScroll: ["type", d]
|
|
63
|
-
},
|
|
63
|
+
}, W = {
|
|
64
64
|
name: "FlowViewer",
|
|
65
65
|
components: {
|
|
66
66
|
EasyPopup: F
|
|
@@ -101,34 +101,34 @@ const g = d.prototype._handleWheel, W = {
|
|
|
101
101
|
}
|
|
102
102
|
},
|
|
103
103
|
mounted() {
|
|
104
|
-
d.prototype._handleWheel = this.ctrlKey ?
|
|
105
|
-
const { target: i, deltaMode: t, clientX: s, clientY: n, deltaX:
|
|
106
|
-
|
|
104
|
+
d.prototype._handleWheel = this.ctrlKey ? f : function(e) {
|
|
105
|
+
const { target: i, deltaMode: t, clientX: s, clientY: n, deltaX: l, deltaY: h } = e;
|
|
106
|
+
f.call(this, {
|
|
107
107
|
target: i,
|
|
108
108
|
deltaMode: t,
|
|
109
109
|
clientX: s,
|
|
110
110
|
clientY: n,
|
|
111
|
-
deltaX:
|
|
112
|
-
deltaY:
|
|
111
|
+
deltaX: l,
|
|
112
|
+
deltaY: h,
|
|
113
113
|
preventDefault() {
|
|
114
114
|
e.preventDefault();
|
|
115
115
|
},
|
|
116
116
|
ctrlKey: !0
|
|
117
117
|
});
|
|
118
|
-
}, this.bpmnViewer = new
|
|
118
|
+
}, this.bpmnViewer = new $(y(w({}, this.options), {
|
|
119
119
|
container: this.$refs.container,
|
|
120
|
-
additionalModules: [
|
|
120
|
+
additionalModules: [P]
|
|
121
121
|
})), this.bpmnViewer.on("import.done", (e) => {
|
|
122
122
|
const i = e.error, t = e.warnings;
|
|
123
|
-
i ? this.$emit("error", i) : this.$emit("shown", t), this.
|
|
123
|
+
i ? this.$emit("error", i) : this.$emit("shown", t), this.canvas = this.bpmnViewer.get("canvas"), this.fitViewportCenter(), this.elementRegistry = this.bpmnViewer.get("elementRegistry");
|
|
124
124
|
const s = this.bpmnViewer.get("eventBus");
|
|
125
|
-
this.events && this.events.forEach((
|
|
126
|
-
s.on(
|
|
127
|
-
this.$emit(
|
|
125
|
+
this.events && this.events.forEach((o) => {
|
|
126
|
+
s.on(o, (k) => {
|
|
127
|
+
this.$emit(o.replace(".", "-"), k.element);
|
|
128
128
|
});
|
|
129
|
-
}), this.nodePopup && s.on("element.mousemove", (
|
|
130
|
-
|
|
131
|
-
this
|
|
129
|
+
}), this.nodePopup && s.on("element.mousemove", (o) => {
|
|
130
|
+
o.element.type === "bpmn:UserTask" && requestAnimationFrame(() => v(this, null, function* () {
|
|
131
|
+
this.element = o.element, yield this.$nextTick(), this.$refs.popup.show(o.originalEvent);
|
|
132
132
|
}));
|
|
133
133
|
}), this.nodePopup && s.on("element.out", () => {
|
|
134
134
|
this.$refs.popup.hide(), this.element = {};
|
|
@@ -143,13 +143,13 @@ const g = d.prototype._handleWheel, W = {
|
|
|
143
143
|
markerHeight: "10",
|
|
144
144
|
orient: "auto"
|
|
145
145
|
});
|
|
146
|
-
const
|
|
147
|
-
p(
|
|
146
|
+
const l = c("path");
|
|
147
|
+
p(l, {
|
|
148
148
|
d: "M 1 5 L 11 10 L 1 15 Z",
|
|
149
149
|
style: "stroke-linecap: round; stroke-linejoin: round; stroke: var(--highlight-color); stroke-width: 1px; fill: var(--highlight-color);"
|
|
150
|
-
}), m(n,
|
|
151
|
-
const
|
|
152
|
-
p(
|
|
150
|
+
}), m(n, l);
|
|
151
|
+
const h = c("marker");
|
|
152
|
+
p(h, {
|
|
153
153
|
id: "conditional-default-flow-marker-green",
|
|
154
154
|
viewBox: "0 0 20 20",
|
|
155
155
|
refX: "0",
|
|
@@ -162,9 +162,9 @@ const g = d.prototype._handleWheel, W = {
|
|
|
162
162
|
p(a, {
|
|
163
163
|
d: "M 6 4 L 10 16",
|
|
164
164
|
style: "stroke-linecap: round; stroke-linejoin: round; stroke: var(--highlight-color); stroke-width: 2px; fill: var(--highlight-color);"
|
|
165
|
-
}), m(
|
|
166
|
-
const
|
|
167
|
-
m(
|
|
165
|
+
}), m(h, a);
|
|
166
|
+
const r = A("defs", this.$el);
|
|
167
|
+
m(r, n), m(r, h);
|
|
168
168
|
}), this.bpmnViewer.importXML(this.xml), this.$watch(() => ({
|
|
169
169
|
activities: this.activities,
|
|
170
170
|
historicActivities: this.historicActivities
|
|
@@ -174,9 +174,12 @@ const g = d.prototype._handleWheel, W = {
|
|
|
174
174
|
},
|
|
175
175
|
beforeDestroy() {
|
|
176
176
|
var e;
|
|
177
|
-
d.prototype._handleWheel =
|
|
177
|
+
d.prototype._handleWheel = f, (e = this.bpmnViewer) == null || e.destroy();
|
|
178
178
|
},
|
|
179
179
|
methods: {
|
|
180
|
+
fitViewportCenter(e = "center") {
|
|
181
|
+
this.canvas.zoom("fit-viewport", e);
|
|
182
|
+
},
|
|
180
183
|
highlightFlow(e, i) {
|
|
181
184
|
this.elementRegistry.getAll().forEach((t) => {
|
|
182
185
|
["bpmn:StartEvent", "bpmn:UserTask", "bpmn:ExclusiveGateway", "bpmn:ParallelGateway", "bpmn:EndEvent"].includes(t.type) && (e.includes(t.id) && !i.includes(t.id) ? this.canvas.addMarker(t, "highlight") : this.canvas.removeMarker(t, "highlight")), t.type === "bpmn:SequenceFlow" && (e.includes(t.id) ? this.canvas.addMarker(t, "highlight-line") : this.canvas.removeMarker(t, "highlight-line")), t.type === "bpmn:UserTask" && (i.includes(t.id) ? this.canvas.addMarker(t, "highlight-current") : this.canvas.removeMarker(t, "highlight-current"));
|
|
@@ -184,22 +187,22 @@ const g = d.prototype._handleWheel, W = {
|
|
|
184
187
|
}
|
|
185
188
|
}
|
|
186
189
|
}, _ = {};
|
|
187
|
-
var
|
|
188
|
-
|
|
190
|
+
var X = /* @__PURE__ */ S(
|
|
191
|
+
W,
|
|
189
192
|
B,
|
|
190
|
-
P,
|
|
191
|
-
!1,
|
|
192
193
|
C,
|
|
194
|
+
!1,
|
|
195
|
+
q,
|
|
193
196
|
null,
|
|
194
197
|
null,
|
|
195
198
|
null
|
|
196
199
|
);
|
|
197
|
-
function
|
|
200
|
+
function q(e) {
|
|
198
201
|
for (let i in _)
|
|
199
202
|
this[i] = _[i];
|
|
200
203
|
}
|
|
201
204
|
const U = /* @__PURE__ */ function() {
|
|
202
|
-
return
|
|
205
|
+
return X.exports;
|
|
203
206
|
}();
|
|
204
207
|
export {
|
|
205
208
|
U as default
|
package/package.json
CHANGED
package/web-types.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json.schemastore.org/web-types",
|
|
3
3
|
"framework": "vue",
|
|
4
4
|
"name": "@web-utils/component",
|
|
5
|
-
"version": "2.9.
|
|
5
|
+
"version": "2.9.16",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"description-markup": "markdown",
|
|
@@ -2143,6 +2143,9 @@
|
|
|
2143
2143
|
{
|
|
2144
2144
|
"name": "close"
|
|
2145
2145
|
},
|
|
2146
|
+
{
|
|
2147
|
+
"name": "toggle-fullscreen"
|
|
2148
|
+
},
|
|
2146
2149
|
{
|
|
2147
2150
|
"name": "update:visible"
|
|
2148
2151
|
},
|
|
@@ -2691,9 +2694,6 @@
|
|
|
2691
2694
|
},
|
|
2692
2695
|
{
|
|
2693
2696
|
"name": "shown"
|
|
2694
|
-
},
|
|
2695
|
-
{
|
|
2696
|
-
"name": "node-mousemove"
|
|
2697
2697
|
}
|
|
2698
2698
|
],
|
|
2699
2699
|
"slots": [
|