@web-utils/component 2.9.13 → 2.9.15
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 +33 -25
- package/flow-viewer/index.mjs +54 -46
- package/fy-input-tree/index.mjs +2 -1
- package/fy-input-tree/style.css +1 -1
- package/package.json +1 -1
- package/web-types.json +41 -1
package/easy-popup/index.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var d = (e, t, i) => new Promise((o, a) => {
|
|
2
|
+
var h = (s) => {
|
|
3
3
|
try {
|
|
4
4
|
n(i.next(s));
|
|
5
5
|
} catch (r) {
|
|
6
6
|
a(r);
|
|
7
7
|
}
|
|
8
|
-
},
|
|
8
|
+
}, f = (s) => {
|
|
9
9
|
try {
|
|
10
10
|
n(i.throw(s));
|
|
11
11
|
} catch (r) {
|
|
12
12
|
a(r);
|
|
13
13
|
}
|
|
14
|
-
}, n = (s) => s.done ? o(s.value) : Promise.resolve(s.value).then(
|
|
14
|
+
}, n = (s) => s.done ? o(s.value) : Promise.resolve(s.value).then(h, f);
|
|
15
15
|
n((i = i.apply(e, t)).next());
|
|
16
16
|
});
|
|
17
|
-
import { getComputedWidth as
|
|
18
|
-
import { n as
|
|
19
|
-
var
|
|
17
|
+
import { getComputedWidth as p, getComputedHeight as u } from "@web-utils/core";
|
|
18
|
+
import { n as c } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
|
|
19
|
+
var x = function() {
|
|
20
20
|
var e = this, t = e.$createElement, i = e._self._c || t;
|
|
21
21
|
return i("Transition", {
|
|
22
22
|
attrs: {
|
|
@@ -32,12 +32,14 @@ var _ = function() {
|
|
|
32
32
|
ref: "container",
|
|
33
33
|
class: ["easy-popup", {
|
|
34
34
|
"easy-popup__visible": e.visible,
|
|
35
|
-
"easy-popup__hide": !e.visible
|
|
35
|
+
"easy-popup__hide": !e.visible,
|
|
36
|
+
"flex-row": e.flexRow,
|
|
37
|
+
"flex-column": e.flexColumn
|
|
36
38
|
}],
|
|
37
39
|
style: e.position
|
|
38
40
|
}, [e._t("default")], 2) : e._e()]);
|
|
39
|
-
},
|
|
40
|
-
const
|
|
41
|
+
}, y = [];
|
|
42
|
+
const _ = {
|
|
41
43
|
name: "EasyPopup",
|
|
42
44
|
props: {
|
|
43
45
|
// 是否开启边界检测
|
|
@@ -54,7 +56,10 @@ const y = {
|
|
|
54
56
|
borderWidth: {
|
|
55
57
|
type: Number,
|
|
56
58
|
default: 6
|
|
57
|
-
}
|
|
59
|
+
},
|
|
60
|
+
appendToBody: Boolean,
|
|
61
|
+
flexRow: Boolean,
|
|
62
|
+
flexColumn: Boolean
|
|
58
63
|
},
|
|
59
64
|
data() {
|
|
60
65
|
return {
|
|
@@ -75,41 +80,44 @@ const y = {
|
|
|
75
80
|
},
|
|
76
81
|
watch: {
|
|
77
82
|
axis() {
|
|
78
|
-
return
|
|
83
|
+
return d(this, null, function* () {
|
|
79
84
|
if (this.border) {
|
|
80
85
|
yield this.$nextTick();
|
|
81
|
-
const e =
|
|
86
|
+
const e = p(this.$refs.container), t = u(this.$refs.container), i = document.body.offsetWidth, o = document.body.offsetHeight;
|
|
82
87
|
this.axis.x + this.offset.x + e >= i && (this.axis.x = i - e - this.borderWidth - this.offset.x), this.axis.y + this.offset.y + t >= o && (this.axis.y = o - t - this.borderWidth - this.offset.y);
|
|
83
88
|
}
|
|
84
89
|
});
|
|
85
90
|
}
|
|
86
91
|
},
|
|
92
|
+
destroyed() {
|
|
93
|
+
this.$el.remove();
|
|
94
|
+
},
|
|
87
95
|
methods: {
|
|
88
96
|
show({ clientX: e, clientY: t }) {
|
|
89
|
-
this.axis = { x: e, y: t }, this.visible || (document.addEventListener("click", this.hide, !0), this.rendered = !0, this.visible = !0);
|
|
97
|
+
this.axis = { x: e, y: t }, this.visible || (document.addEventListener("click", this.hide, !0), this.rendered = !0, this.visible = !0), this.appendToBody && document.body.appendChild(this.$el);
|
|
90
98
|
},
|
|
91
99
|
hide() {
|
|
92
100
|
this.visible = !1, document.removeEventListener("click", this.hide);
|
|
93
101
|
}
|
|
94
102
|
}
|
|
95
|
-
},
|
|
96
|
-
var
|
|
97
|
-
y,
|
|
103
|
+
}, l = {};
|
|
104
|
+
var m = /* @__PURE__ */ c(
|
|
98
105
|
_,
|
|
99
|
-
|
|
106
|
+
x,
|
|
107
|
+
y,
|
|
100
108
|
!1,
|
|
101
|
-
|
|
109
|
+
v,
|
|
102
110
|
null,
|
|
103
111
|
null,
|
|
104
112
|
null
|
|
105
113
|
);
|
|
106
|
-
function
|
|
107
|
-
for (let t in
|
|
108
|
-
this[t] =
|
|
114
|
+
function v(e) {
|
|
115
|
+
for (let t in l)
|
|
116
|
+
this[t] = l[t];
|
|
109
117
|
}
|
|
110
|
-
const
|
|
111
|
-
return
|
|
118
|
+
const g = /* @__PURE__ */ function() {
|
|
119
|
+
return m.exports;
|
|
112
120
|
}();
|
|
113
121
|
export {
|
|
114
|
-
|
|
122
|
+
g as default
|
|
115
123
|
};
|
package/flow-viewer/index.mjs
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var b = Object.defineProperty, x = Object.defineProperties;
|
|
2
|
+
var M = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var f = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var u = (e, i, t) => i in e ?
|
|
4
|
+
var V = Object.prototype.hasOwnProperty, $ = Object.prototype.propertyIsEnumerable;
|
|
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
8
|
if (f)
|
|
9
9
|
for (var t of f(i))
|
|
10
|
-
|
|
10
|
+
$.call(i, t) && u(e, t, i[t]);
|
|
11
11
|
return e;
|
|
12
|
-
}, v = (e, i) =>
|
|
13
|
-
var y = (e, i, t) => new Promise((
|
|
14
|
-
var h = (
|
|
12
|
+
}, v = (e, i) => x(e, M(i));
|
|
13
|
+
var y = (e, i, t) => new Promise((s, n) => {
|
|
14
|
+
var h = (o) => {
|
|
15
15
|
try {
|
|
16
|
-
a(t.next(
|
|
17
|
-
} catch (
|
|
18
|
-
|
|
16
|
+
a(t.next(o));
|
|
17
|
+
} catch (r) {
|
|
18
|
+
n(r);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, l = (o) => {
|
|
21
21
|
try {
|
|
22
|
-
a(t.throw(
|
|
23
|
-
} catch (
|
|
24
|
-
|
|
22
|
+
a(t.throw(o));
|
|
23
|
+
} catch (r) {
|
|
24
|
+
n(r);
|
|
25
25
|
}
|
|
26
|
-
}, a = (
|
|
26
|
+
}, a = (o) => o.done ? s(o.value) : Promise.resolve(o.value).then(h, l);
|
|
27
27
|
a((t = t.apply(e, i)).next());
|
|
28
28
|
});
|
|
29
|
-
import
|
|
29
|
+
import E from "bpmn-js/lib/NavigatedViewer";
|
|
30
30
|
import d from "diagram-js/lib/navigation/zoomscroll/ZoomScroll";
|
|
31
|
-
import { create as c, attr as
|
|
32
|
-
import { query as
|
|
31
|
+
import { create as c, attr as p, append as m } from "tiny-svg";
|
|
32
|
+
import { query as A } from "min-dom";
|
|
33
33
|
import F from "@web-utils/component/easy-popup";
|
|
34
34
|
import "@web-utils/component/easy-popup/style.css";
|
|
35
35
|
import { n as S } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
|
|
36
|
-
var
|
|
36
|
+
var B = function() {
|
|
37
37
|
var e = this, i = e.$createElement, t = e._self._c || i;
|
|
38
38
|
return t("div", {
|
|
39
39
|
ref: "container",
|
|
@@ -44,6 +44,8 @@ var A = function() {
|
|
|
44
44
|
}, [t("EasyPopup", {
|
|
45
45
|
ref: "popup",
|
|
46
46
|
attrs: {
|
|
47
|
+
"append-to-body": "",
|
|
48
|
+
"flex-column": "",
|
|
47
49
|
offset: {
|
|
48
50
|
x: 6,
|
|
49
51
|
y: 6
|
|
@@ -54,7 +56,7 @@ var A = function() {
|
|
|
54
56
|
}, {
|
|
55
57
|
element: e.element
|
|
56
58
|
})], 2)], 1);
|
|
57
|
-
},
|
|
59
|
+
}, P = [];
|
|
58
60
|
const g = d.prototype._handleWheel, W = {
|
|
59
61
|
__init__: ["zoomScroll"],
|
|
60
62
|
zoomScroll: ["type", d]
|
|
@@ -83,7 +85,9 @@ const g = d.prototype._handleWheel, W = {
|
|
|
83
85
|
type: String,
|
|
84
86
|
default: "rgb(0 190 0 / 100%)"
|
|
85
87
|
},
|
|
86
|
-
ctrlKey: Boolean
|
|
88
|
+
ctrlKey: Boolean,
|
|
89
|
+
nodePopup: Boolean,
|
|
90
|
+
events: Array
|
|
87
91
|
},
|
|
88
92
|
data() {
|
|
89
93
|
return {
|
|
@@ -98,35 +102,39 @@ const g = d.prototype._handleWheel, W = {
|
|
|
98
102
|
},
|
|
99
103
|
mounted() {
|
|
100
104
|
d.prototype._handleWheel = this.ctrlKey ? g : function(e) {
|
|
101
|
-
const { target: i, deltaMode: t, clientX:
|
|
105
|
+
const { target: i, deltaMode: t, clientX: s, clientY: n, deltaX: h, deltaY: l } = e;
|
|
102
106
|
g.call(this, {
|
|
103
107
|
target: i,
|
|
104
108
|
deltaMode: t,
|
|
105
|
-
clientX:
|
|
106
|
-
clientY:
|
|
109
|
+
clientX: s,
|
|
110
|
+
clientY: n,
|
|
107
111
|
deltaX: h,
|
|
108
|
-
deltaY:
|
|
112
|
+
deltaY: l,
|
|
109
113
|
preventDefault() {
|
|
110
114
|
e.preventDefault();
|
|
111
115
|
},
|
|
112
116
|
ctrlKey: !0
|
|
113
117
|
});
|
|
114
|
-
}, this.bpmnViewer = new
|
|
118
|
+
}, this.bpmnViewer = new E(v(w({}, this.options), {
|
|
115
119
|
container: this.$refs.container,
|
|
116
120
|
additionalModules: [W]
|
|
117
121
|
})), this.bpmnViewer.on("import.done", (e) => {
|
|
118
122
|
const i = e.error, t = e.warnings;
|
|
119
123
|
i ? this.$emit("error", i) : this.$emit("shown", t), this.bpmnViewer.get("canvas").zoom("fit-viewport", "center"), this.canvas = this.bpmnViewer.get("canvas"), this.elementRegistry = this.bpmnViewer.get("elementRegistry");
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
this.$emit("
|
|
124
|
+
const s = this.bpmnViewer.get("eventBus");
|
|
125
|
+
this.events && this.events.forEach((r) => {
|
|
126
|
+
s.on(r, (k) => {
|
|
127
|
+
this.$emit(r.replace(".", "-"), k.element);
|
|
128
|
+
});
|
|
129
|
+
}), this.nodePopup && s.on("element.mousemove", (r) => {
|
|
130
|
+
r.element.type === "bpmn:UserTask" && requestAnimationFrame(() => y(this, null, function* () {
|
|
131
|
+
this.$emit("node-mousemove", r.element), this.element = r.element, yield this.$nextTick(), this.$refs.popup.show(r.originalEvent);
|
|
124
132
|
}));
|
|
125
|
-
}),
|
|
133
|
+
}), this.nodePopup && s.on("element.out", () => {
|
|
126
134
|
this.$refs.popup.hide(), this.element = {};
|
|
127
135
|
}), this.highlightFlow(this.historicActivities, this.activities);
|
|
128
|
-
const
|
|
129
|
-
|
|
136
|
+
const n = c("marker");
|
|
137
|
+
p(n, {
|
|
130
138
|
id: "sequenceflow-arrow-green",
|
|
131
139
|
viewBox: "0 0 20 20",
|
|
132
140
|
refX: "11",
|
|
@@ -136,12 +144,12 @@ const g = d.prototype._handleWheel, W = {
|
|
|
136
144
|
orient: "auto"
|
|
137
145
|
});
|
|
138
146
|
const h = c("path");
|
|
139
|
-
|
|
147
|
+
p(h, {
|
|
140
148
|
d: "M 1 5 L 11 10 L 1 15 Z",
|
|
141
149
|
style: "stroke-linecap: round; stroke-linejoin: round; stroke: var(--highlight-color); stroke-width: 1px; fill: var(--highlight-color);"
|
|
142
|
-
}),
|
|
143
|
-
const
|
|
144
|
-
|
|
150
|
+
}), m(n, h);
|
|
151
|
+
const l = c("marker");
|
|
152
|
+
p(l, {
|
|
145
153
|
id: "conditional-default-flow-marker-green",
|
|
146
154
|
viewBox: "0 0 20 20",
|
|
147
155
|
refX: "0",
|
|
@@ -151,12 +159,12 @@ const g = d.prototype._handleWheel, W = {
|
|
|
151
159
|
orient: "auto"
|
|
152
160
|
});
|
|
153
161
|
const a = c("path");
|
|
154
|
-
|
|
162
|
+
p(a, {
|
|
155
163
|
d: "M 6 4 L 10 16",
|
|
156
164
|
style: "stroke-linecap: round; stroke-linejoin: round; stroke: var(--highlight-color); stroke-width: 2px; fill: var(--highlight-color);"
|
|
157
|
-
}),
|
|
158
|
-
const
|
|
159
|
-
|
|
165
|
+
}), m(l, a);
|
|
166
|
+
const o = A("defs", this.$el);
|
|
167
|
+
m(o, n), m(o, l);
|
|
160
168
|
}), this.bpmnViewer.importXML(this.xml), this.$watch(() => ({
|
|
161
169
|
activities: this.activities,
|
|
162
170
|
historicActivities: this.historicActivities
|
|
@@ -178,8 +186,8 @@ const g = d.prototype._handleWheel, W = {
|
|
|
178
186
|
}, _ = {};
|
|
179
187
|
var q = /* @__PURE__ */ S(
|
|
180
188
|
X,
|
|
181
|
-
A,
|
|
182
189
|
B,
|
|
190
|
+
P,
|
|
183
191
|
!1,
|
|
184
192
|
C,
|
|
185
193
|
null,
|
|
@@ -190,9 +198,9 @@ function C(e) {
|
|
|
190
198
|
for (let i in _)
|
|
191
199
|
this[i] = _[i];
|
|
192
200
|
}
|
|
193
|
-
const
|
|
201
|
+
const U = /* @__PURE__ */ function() {
|
|
194
202
|
return q.exports;
|
|
195
203
|
}();
|
|
196
204
|
export {
|
|
197
|
-
|
|
205
|
+
U as default
|
|
198
206
|
};
|
package/fy-input-tree/index.mjs
CHANGED
|
@@ -39,6 +39,7 @@ var f = function() {
|
|
|
39
39
|
expression: "filterValue"
|
|
40
40
|
}
|
|
41
41
|
})], 1) : e._e(), l("ElOption", {
|
|
42
|
+
staticClass: "avue-input-tree__dropdown",
|
|
42
43
|
attrs: {
|
|
43
44
|
value: e.text
|
|
44
45
|
}
|
|
@@ -170,7 +171,7 @@ const m = {
|
|
|
170
171
|
return this.multiple ? this.text : [this.text || ""];
|
|
171
172
|
},
|
|
172
173
|
labelShow() {
|
|
173
|
-
return [...this.node].map((
|
|
174
|
+
return [...this.node].map((t) => this.getLabelText(t));
|
|
174
175
|
}
|
|
175
176
|
},
|
|
176
177
|
watch: {
|
package/fy-input-tree/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.avue-input-tree .el-tag__close{display:none!important}.avue-input-tree__item{width:100%}.avue-input-tree__filter{margin:5px 0 0;padding:0 10px}.avue-input-tree__select{padding:10px 0}.avue-input-tree__desc{float:right;margin-right:12px;color:#8492a6;font-size:13px}
|
|
1
|
+
.avue-input-tree .el-tag__close{display:none!important}.avue-input-tree__dropdown{height:auto;background-color:#fff;overflow:auto;max-height:600px;min-height:300px;padding:0 10px}.avue-input-tree__dropdown:hover,.avue-input-tree__dropdown.hover{background-color:#fff}.avue-input-tree__item{width:100%}.avue-input-tree__filter{margin:5px 0 0;padding:0 10px}.avue-input-tree__select{padding:10px 0}.avue-input-tree__desc{float:right;margin-right:12px;color:#8492a6;font-size:13px}
|
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.15",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"description-markup": "markdown",
|
|
@@ -1428,6 +1428,30 @@
|
|
|
1428
1428
|
"type": "number"
|
|
1429
1429
|
},
|
|
1430
1430
|
"default": "6"
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
"name": "appendToBody",
|
|
1434
|
+
"value": {
|
|
1435
|
+
"kind": "expression",
|
|
1436
|
+
"type": "boolean"
|
|
1437
|
+
},
|
|
1438
|
+
"default": ""
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
"name": "flexRow",
|
|
1442
|
+
"value": {
|
|
1443
|
+
"kind": "expression",
|
|
1444
|
+
"type": "boolean"
|
|
1445
|
+
},
|
|
1446
|
+
"default": ""
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
"name": "flexColumn",
|
|
1450
|
+
"value": {
|
|
1451
|
+
"kind": "expression",
|
|
1452
|
+
"type": "boolean"
|
|
1453
|
+
},
|
|
1454
|
+
"default": ""
|
|
1431
1455
|
}
|
|
1432
1456
|
],
|
|
1433
1457
|
"slots": [
|
|
@@ -2643,6 +2667,22 @@
|
|
|
2643
2667
|
"type": "boolean"
|
|
2644
2668
|
},
|
|
2645
2669
|
"default": ""
|
|
2670
|
+
},
|
|
2671
|
+
{
|
|
2672
|
+
"name": "nodePopup",
|
|
2673
|
+
"value": {
|
|
2674
|
+
"kind": "expression",
|
|
2675
|
+
"type": "boolean"
|
|
2676
|
+
},
|
|
2677
|
+
"default": ""
|
|
2678
|
+
},
|
|
2679
|
+
{
|
|
2680
|
+
"name": "events",
|
|
2681
|
+
"value": {
|
|
2682
|
+
"kind": "expression",
|
|
2683
|
+
"type": "array"
|
|
2684
|
+
},
|
|
2685
|
+
"default": ""
|
|
2646
2686
|
}
|
|
2647
2687
|
],
|
|
2648
2688
|
"events": [
|