@web-utils/component 2.9.6 → 2.9.8
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/base.css +1 -1
- package/flow-designer/index.mjs +343 -303
- package/flow-designer/style.css +1 -1
- package/flow-viewer/index.mjs +55 -56
- package/package.json +1 -1
- package/web-types.json +9 -1
package/flow-designer/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.process-panel__container{box-sizing:border-box;max-height:100%;padding:0 8px;overflow-y:auto;overflow-x:hidden;border-left:1px solid #eee;box-shadow:0 0 8px #ccc;transition:width .25s ease-in}.process-panel__container.hide:hover{background-color:#e8f4ff}.process-panel__container.show{overflow-x:auto}.process-panel__container .open-properties-handel{font-size:20px;cursor:pointer;text-align:center;color:#606266}.process-panel__container .open-properties-handel:hover{color:#1682e6}.process-panel__container .element-property{display:flex;align-items:flex-start;width:100%;margin:8px 0}.process-panel__container .element-property .element-property__label{display:block;box-sizing:border-box;width:90px;padding-right:12px;overflow:hidden;font-size:14px;line-height:32px;text-align:right}.process-panel__container .element-property .element-property__value{flex:1;line-height:32px}.process-panel__container .element-property .el-form-item{width:100%;margin-bottom:0;padding-bottom:18px}.process-panel__container .list-property{flex-direction:column}.process-panel__container .list-property .element-listener-item{display:inline-grid;grid-column-gap:8px;grid-template-columns:16px auto 32px 32px;width:100%}.process-panel__container .list-property .element-listener-item+.element-listener-item{margin-top:8px}.process-panel__container .el-collapse-item__content{padding-bottom:0}.process-panel__container .el-input.is-disabled .el-input__inner{color:#999}.process-panel__container .el-form-item.el-form-item--mini{margin-bottom:0}.process-panel__container .el-form-item.el-form-item--mini+.el-form-item{margin-top:16px}.panel-tab__title{padding:0 8px;font-weight:600;font-size:1.1em;line-height:1.2em}.panel-tab__title i{margin-right:8px;font-size:1.2em}.panel-tab__content{box-sizing:border-box;width:100%;padding:8px 16px;border-top:1px solid #eee}.panel-tab__content .panel-tab__content--title{display:flex;justify-content:space-between;padding-bottom:8px}.panel-tab__content .panel-tab__content--title span{flex:1;text-align:left}.listener-filed__title{display:inline-flex;align-items:center;justify-content:space-between;width:100%;margin-top:0}.listener-filed__title span{width:200px;font-size:14px;text-align:left}.listener-filed__title i{margin-right:8px}.element-drawer__button{display:inline-flex;justify-content:space-around;width:100%;margin-top:8px}.element-drawer__button>.el-button{width:100%}.flow-drawer .el-drawer__body{padding:10px}.my-process-designer{display:flex;flex:1;flex-direction:column;box-sizing:border-box;width:100%;height:100%}.my-process-designer .bts-toggle-mode{display:none}.my-process-designer .djs-palette.open .djs-palette-entries div[class^=bpmn-icon-]:before,.my-process-designer .djs-palette.open .djs-palette-entries div[class*=bpmn-icon-]:before{line-height:unset}.my-process-designer .djs-palette.open .djs-palette-entries div.entry{position:relative}.my-process-designer .djs-palette.open .djs-palette-entries div.entry:hover:after{position:absolute;top:0;right:-10px;bottom:0;z-index:100;display:inline-block;box-sizing:border-box;width:max-content;padding:0 16px;overflow:hidden;font-size:.5em;font-variant:normal;text-transform:none;text-decoration:inherit;vertical-align:text-bottom;background:#fafafa;border:1px solid #ccc;border-radius:4px;box-shadow:0 0 6px #eee;transform:translate(100%);content:attr(title)}.my-process-designer .my-process-designer__header{width:100%;min-height:36px}.my-process-designer .my-process-designer__header .el-button{text-align:center}.my-process-designer .my-process-designer__header .el-button-group{margin:4px}.my-process-designer .my-process-designer__header .el-tooltip__popper .el-button{width:100%;padding-right:8px;padding-left:8px;text-align:left}.my-process-designer .my-process-designer__header .el-tooltip__popper .el-button:hover{color:#fff;background:rgba(64,158,255,.8)}.my-process-designer .my-process-designer__header .align{position:relative}.my-process-designer .my-process-designer__header .align i:after{position:absolute;transform:rotate(90deg) translate(200%,60%);content:"|"}.my-process-designer .my-process-designer__header .align.align-left i{transform:rotate(90deg)}.my-process-designer .my-process-designer__header .align.align-right i{transform:rotate(-90deg)}.my-process-designer .my-process-designer__header .align.align-top i{transform:rotate(180deg)}.my-process-designer .my-process-designer__header .align.align-bottom i{transform:rotate(0)}.my-process-designer .my-process-designer__header .align.align-center i{transform:rotate(90deg)}.my-process-designer .my-process-designer__header .align.align-center i:after{transform:rotate(90deg) translateY(60%)}.my-process-designer .my-process-designer__header .align.align-middle i{transform:rotate(0)}.my-process-designer .my-process-designer__header .align.align-middle i:after{transform:rotate(90deg) translateY(60%)}.my-process-designer .my-process-designer__container{display:inline-flex;flex:1;width:100%}.my-process-designer .my-process-designer__container .my-process-designer__canvas{position:relative;flex:1;height:100
|
|
1
|
+
.process-panel__container{box-sizing:border-box;max-height:100%;padding:0 8px;overflow-y:auto;overflow-x:hidden;border-left:1px solid #eee;box-shadow:0 0 8px #ccc;transition:width .25s ease-in}.process-panel__container.hide:hover{background-color:#e8f4ff}.process-panel__container.show{overflow-x:auto}.process-panel__container .open-properties-handel{font-size:20px;cursor:pointer;text-align:center;color:#606266}.process-panel__container .open-properties-handel:hover{color:#1682e6}.process-panel__container .element-property{display:flex;align-items:flex-start;width:100%;margin:8px 0}.process-panel__container .element-property .element-property__label{display:block;box-sizing:border-box;width:90px;padding-right:12px;overflow:hidden;font-size:14px;line-height:32px;text-align:right}.process-panel__container .element-property .element-property__value{flex:1;line-height:32px}.process-panel__container .element-property .el-form-item{width:100%;margin-bottom:0;padding-bottom:18px}.process-panel__container .list-property{flex-direction:column}.process-panel__container .list-property .element-listener-item{display:inline-grid;grid-column-gap:8px;grid-template-columns:16px auto 32px 32px;width:100%}.process-panel__container .list-property .element-listener-item+.element-listener-item{margin-top:8px}.process-panel__container .el-collapse-item__content{padding-bottom:0}.process-panel__container .el-input.is-disabled .el-input__inner{color:#999}.process-panel__container .el-form-item.el-form-item--mini{margin-bottom:0}.process-panel__container .el-form-item.el-form-item--mini+.el-form-item{margin-top:16px}.panel-tab__title{padding:0 8px;font-weight:600;font-size:1.1em;line-height:1.2em}.panel-tab__title i{margin-right:8px;font-size:1.2em}.panel-tab__content{box-sizing:border-box;width:100%;padding:8px 16px;border-top:1px solid #eee}.panel-tab__content .panel-tab__content--title{display:flex;justify-content:space-between;padding-bottom:8px}.panel-tab__content .panel-tab__content--title span{flex:1;text-align:left}.listener-filed__title{display:inline-flex;align-items:center;justify-content:space-between;width:100%;margin-top:0}.listener-filed__title span{width:200px;font-size:14px;text-align:left}.listener-filed__title i{margin-right:8px}.element-drawer__button{display:inline-flex;justify-content:space-around;width:100%;margin-top:8px}.element-drawer__button>.el-button{width:100%}.flow-drawer .el-drawer__body{padding:10px}.my-process-designer{display:flex;flex:1;flex-direction:column;box-sizing:border-box;width:100%;height:100%}.my-process-designer .bts-toggle-mode{display:none}.my-process-designer .djs-palette.open .djs-palette-entries div[class^=bpmn-icon-]:before,.my-process-designer .djs-palette.open .djs-palette-entries div[class*=bpmn-icon-]:before{line-height:unset}.my-process-designer .djs-palette.open .djs-palette-entries div.entry{position:relative}.my-process-designer .djs-palette.open .djs-palette-entries div.entry:hover:after{position:absolute;top:0;right:-10px;bottom:0;z-index:100;display:inline-block;box-sizing:border-box;width:max-content;padding:0 16px;overflow:hidden;font-size:.5em;font-variant:normal;text-transform:none;text-decoration:inherit;vertical-align:text-bottom;background:#fafafa;border:1px solid #ccc;border-radius:4px;box-shadow:0 0 6px #eee;transform:translate(100%);content:attr(title)}.my-process-designer .my-process-designer__header{width:100%;min-height:36px}.my-process-designer .my-process-designer__header .el-button{text-align:center}.my-process-designer .my-process-designer__header .el-button-group{margin:4px}.my-process-designer .my-process-designer__header .el-tooltip__popper .el-button{width:100%;padding-right:8px;padding-left:8px;text-align:left}.my-process-designer .my-process-designer__header .el-tooltip__popper .el-button:hover{color:#fff;background:rgba(64,158,255,.8)}.my-process-designer .my-process-designer__header .align{position:relative}.my-process-designer .my-process-designer__header .align i:after{position:absolute;transform:rotate(90deg) translate(200%,60%);content:"|"}.my-process-designer .my-process-designer__header .align.align-left i{transform:rotate(90deg)}.my-process-designer .my-process-designer__header .align.align-right i{transform:rotate(-90deg)}.my-process-designer .my-process-designer__header .align.align-top i{transform:rotate(180deg)}.my-process-designer .my-process-designer__header .align.align-bottom i{transform:rotate(0)}.my-process-designer .my-process-designer__header .align.align-center i{transform:rotate(90deg)}.my-process-designer .my-process-designer__header .align.align-center i:after{transform:rotate(90deg) translateY(60%)}.my-process-designer .my-process-designer__header .align.align-middle i{transform:rotate(0)}.my-process-designer .my-process-designer__header .align.align-middle i:after{transform:rotate(90deg) translateY(60%)}.my-process-designer .my-process-designer__container{display:inline-flex;flex:1;width:100%}.my-process-designer .my-process-designer__container .my-process-designer__canvas{position:relative;flex:1;height:100%}.my-process-designer .my-process-designer__container .my-process-designer__canvas div.toggle-mode{display:none}.my-process-designer .my-process-designer__container .my-process-designer__property-panel{z-index:10;height:100%;overflow:scroll;overflow-y:auto}.my-process-designer .my-process-designer__container .my-process-designer__property-panel *{box-sizing:border-box}.flow-designer{display:flex;width:100%;height:100%;background-color:#fff}
|
package/flow-viewer/index.mjs
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
var _ = Object.defineProperty,
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var _ = Object.defineProperty, v = Object.defineProperties;
|
|
2
|
+
var y = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var c = Object.getOwnPropertySymbols;
|
|
4
|
+
var b = Object.prototype.hasOwnProperty, V = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var u = (e, t, i) => t in e ? _(e, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : e[t] = i, g = (e, t) => {
|
|
6
6
|
for (var i in t || (t = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var i of
|
|
10
|
-
|
|
7
|
+
b.call(t, i) && u(e, i, t[i]);
|
|
8
|
+
if (c)
|
|
9
|
+
for (var i of c(t))
|
|
10
|
+
V.call(t, i) && u(e, i, t[i]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
14
|
-
var
|
|
12
|
+
}, f = (e, t) => v(e, y(t));
|
|
13
|
+
var d = (e, t, i) => new Promise((n, o) => {
|
|
14
|
+
var l = (r) => {
|
|
15
15
|
try {
|
|
16
|
-
|
|
16
|
+
a(i.next(r));
|
|
17
17
|
} catch (m) {
|
|
18
18
|
o(m);
|
|
19
19
|
}
|
|
20
|
-
},
|
|
20
|
+
}, h = (r) => {
|
|
21
21
|
try {
|
|
22
|
-
|
|
22
|
+
a(i.throw(r));
|
|
23
23
|
} catch (m) {
|
|
24
24
|
o(m);
|
|
25
25
|
}
|
|
26
|
-
},
|
|
27
|
-
|
|
26
|
+
}, a = (r) => r.done ? n(r.value) : Promise.resolve(r.value).then(l, h);
|
|
27
|
+
a((i = i.apply(e, t)).next());
|
|
28
28
|
});
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
29
|
+
import x from "bpmn-js/lib/NavigatedViewer";
|
|
30
|
+
import s from "diagram-js/lib/navigation/zoomscroll/ZoomScroll";
|
|
31
|
+
import F from "@web-utils/component/easy-popup";
|
|
32
32
|
import "@web-utils/component/easy-popup/style.css";
|
|
33
|
-
import { n as
|
|
34
|
-
var
|
|
33
|
+
import { n as M } from "../chunks/vueComponentNormalizer.446f5dc4.mjs";
|
|
34
|
+
var $ = function() {
|
|
35
35
|
var e = this, t = e.$createElement, i = e._self._c || t;
|
|
36
36
|
return i("div", {
|
|
37
37
|
ref: "container",
|
|
38
|
-
staticClass: "flow-viewer"
|
|
38
|
+
staticClass: "flow-viewer flow-background-image"
|
|
39
39
|
}, [i("EasyPopup", {
|
|
40
40
|
ref: "popup"
|
|
41
41
|
}, [e._t("default", function() {
|
|
@@ -43,30 +43,14 @@ var M = function() {
|
|
|
43
43
|
}, {
|
|
44
44
|
element: e.element
|
|
45
45
|
})], 2)], 1);
|
|
46
|
-
},
|
|
47
|
-
const
|
|
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
|
-
deltaMode: i,
|
|
53
|
-
clientX: n,
|
|
54
|
-
clientY: o,
|
|
55
|
-
deltaX: s,
|
|
56
|
-
deltaY: l,
|
|
57
|
-
preventDefault() {
|
|
58
|
-
e.preventDefault();
|
|
59
|
-
},
|
|
60
|
-
ctrlKey: !0
|
|
61
|
-
});
|
|
62
|
-
};
|
|
63
|
-
const A = {
|
|
46
|
+
}, S = [];
|
|
47
|
+
const p = s.prototype._handleWheel, k = {
|
|
64
48
|
__init__: ["zoomScroll"],
|
|
65
|
-
zoomScroll: ["type",
|
|
66
|
-
},
|
|
49
|
+
zoomScroll: ["type", s]
|
|
50
|
+
}, A = {
|
|
67
51
|
name: "FlowViewer",
|
|
68
52
|
components: {
|
|
69
|
-
EasyPopup:
|
|
53
|
+
EasyPopup: F
|
|
70
54
|
},
|
|
71
55
|
props: {
|
|
72
56
|
xml: {
|
|
@@ -83,7 +67,8 @@ const A = {
|
|
|
83
67
|
flows: {
|
|
84
68
|
type: Array,
|
|
85
69
|
default: () => []
|
|
86
|
-
}
|
|
70
|
+
},
|
|
71
|
+
ctrlKey: Boolean
|
|
87
72
|
},
|
|
88
73
|
data() {
|
|
89
74
|
return {
|
|
@@ -99,14 +84,28 @@ const A = {
|
|
|
99
84
|
flows: "highlightFlow"
|
|
100
85
|
},
|
|
101
86
|
mounted() {
|
|
102
|
-
|
|
87
|
+
s.prototype._handleWheel = this.ctrlKey ? p : function(e) {
|
|
88
|
+
const { target: t, deltaMode: i, clientX: n, clientY: o, deltaX: l, deltaY: h } = e;
|
|
89
|
+
p.call(this, {
|
|
90
|
+
target: t,
|
|
91
|
+
deltaMode: i,
|
|
92
|
+
clientX: n,
|
|
93
|
+
clientY: o,
|
|
94
|
+
deltaX: l,
|
|
95
|
+
deltaY: h,
|
|
96
|
+
preventDefault() {
|
|
97
|
+
e.preventDefault();
|
|
98
|
+
},
|
|
99
|
+
ctrlKey: !0
|
|
100
|
+
});
|
|
101
|
+
}, this.bpmnViewer = new x(f(g({}, this.options), {
|
|
103
102
|
container: this.$refs.container,
|
|
104
|
-
additionalModules: [
|
|
103
|
+
additionalModules: [k]
|
|
105
104
|
})), this.bpmnViewer.on("import.done", (e) => {
|
|
106
105
|
const t = e.error, i = e.warnings;
|
|
107
106
|
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
107
|
const n = this.bpmnViewer.get("eventBus");
|
|
109
|
-
n.on("element.mousemove", (o) =>
|
|
108
|
+
n.on("element.mousemove", (o) => d(this, null, function* () {
|
|
110
109
|
o.element.type === "bpmn:UserTask" && (this.$emit("node-mousemove", o.element), this.element = o.element, yield this.$nextTick(), this.$refs.popup.show(o.originalEvent));
|
|
111
110
|
})), n.on("element.out", () => {
|
|
112
111
|
this.$refs.popup.hide(), this.element = {};
|
|
@@ -115,7 +114,7 @@ const A = {
|
|
|
115
114
|
},
|
|
116
115
|
beforeDestroy() {
|
|
117
116
|
var e;
|
|
118
|
-
(e = this.bpmnViewer) == null || e.destroy();
|
|
117
|
+
s.prototype._handleWheel = p, (e = this.bpmnViewer) == null || e.destroy();
|
|
119
118
|
},
|
|
120
119
|
methods: {
|
|
121
120
|
highlight(e, t, i) {
|
|
@@ -131,23 +130,23 @@ const A = {
|
|
|
131
130
|
}
|
|
132
131
|
}
|
|
133
132
|
}, w = {};
|
|
134
|
-
var E = /* @__PURE__ */
|
|
135
|
-
|
|
136
|
-
M,
|
|
133
|
+
var E = /* @__PURE__ */ M(
|
|
134
|
+
A,
|
|
137
135
|
$,
|
|
136
|
+
S,
|
|
138
137
|
!1,
|
|
139
|
-
|
|
138
|
+
B,
|
|
140
139
|
null,
|
|
141
140
|
null,
|
|
142
141
|
null
|
|
143
142
|
);
|
|
144
|
-
function
|
|
143
|
+
function B(e) {
|
|
145
144
|
for (let t in w)
|
|
146
145
|
this[t] = w[t];
|
|
147
146
|
}
|
|
148
|
-
const
|
|
147
|
+
const j = /* @__PURE__ */ function() {
|
|
149
148
|
return E.exports;
|
|
150
149
|
}();
|
|
151
150
|
export {
|
|
152
|
-
|
|
151
|
+
j as default
|
|
153
152
|
};
|
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.8",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
8
8
|
"description-markup": "markdown",
|
|
@@ -2611,6 +2611,14 @@
|
|
|
2611
2611
|
"type": "array"
|
|
2612
2612
|
},
|
|
2613
2613
|
"default": "[]"
|
|
2614
|
+
},
|
|
2615
|
+
{
|
|
2616
|
+
"name": "ctrlKey",
|
|
2617
|
+
"value": {
|
|
2618
|
+
"kind": "expression",
|
|
2619
|
+
"type": "boolean"
|
|
2620
|
+
},
|
|
2621
|
+
"default": ""
|
|
2614
2622
|
}
|
|
2615
2623
|
],
|
|
2616
2624
|
"events": [
|