@web-utils/component 3.4.6 → 3.6.0
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/chat/index.mjs +1 -1
- package/chunks/ElementBaseInfo.jv89Vjy1.mjs +118 -0
- package/chunks/ElementForm.4QQYs5uq.mjs +241 -0
- package/chunks/ElementListeners.vfHHHAOL.mjs +255 -0
- package/chunks/ElementMultiInstance.3Z28ewuh.mjs +191 -0
- package/chunks/ElementOtherConfig.B1NfMTYh.mjs +60 -0
- package/chunks/ElementProperties.CRIQaaPc.mjs +112 -0
- package/chunks/ElementTaskConfig.MBbkLrth.mjs +326 -0
- package/chunks/FlowCondition.BfU9kw6h.mjs +132 -0
- package/chunks/{FormTemp.CJOJOy8K.mjs → FormTemp.BSpnNput.mjs} +4 -4
- package/chunks/SignalAndMessage.CH6L7cYu.mjs +96 -0
- package/chunks/UserTaskListeners.XXe5dC5I.mjs +210 -0
- package/chunks/confirmable-mixin.D4LAArE5.mjs +114 -0
- package/chunks/{dataformat.ARPY2U57.mjs → dataformat.B9UvztrQ.mjs} +7 -7
- package/chunks/{dic.DBmh9yzU.mjs → dic.CET0XdKP.mjs} +3 -3
- package/chunks/{event.mRPNW7Cx.mjs → event.BT1F_1vF.mjs} +6 -6
- package/chunks/{form-input-mixin.DMuQta5I.mjs → form-input-mixin.BkKiqJhi.mjs} +2 -2
- package/chunks/{form-item-mixin.CdcqXa2h.mjs → form-item-mixin.CG4ZwzMC.mjs} +1 -1
- package/chunks/{index.DwCBGcYk.mjs → index.MAFc4eFi.mjs} +4 -4
- package/chunks/{init.CauLYxJq.mjs → init.ofpxEyAI.mjs} +8 -8
- package/chunks/{json-beautifier.j1-U5g4P.mjs → json-beautifier.Bp3GslGm.mjs} +2 -0
- package/chunks/{util.BaRFvfAi.mjs → util.CoahLDYn.mjs} +7 -7
- package/chunks/utilSelf.CRqpl0Cz.mjs +56 -0
- package/chunks/utils.DRcxC1Fb.mjs +60 -0
- package/code-mirror-editor/index.mjs +45 -45
- package/confirm-button/index.mjs +1 -1
- package/confirmable/index.mjs +1 -1
- package/data-table-picker/index.mjs +1 -1
- package/dialog-form/index.mjs +1 -1
- package/e-charts/index.mjs +3 -3
- package/editable-tree/index.mjs +13 -13
- package/element-listeners/style.css +1 -0
- package/element-multi-instance/style.css +1 -0
- package/ellipsis/index.mjs +148 -0
- package/ellipsis/style.css +1 -0
- package/flex-column/index.mjs +1 -1
- package/flex-item/index.mjs +1 -1
- package/flex-row/index.mjs +1 -1
- package/flow/index.mjs +1 -1
- package/flow-designer/index.mjs +519 -2134
- package/flow-designer/style.css +1 -1
- package/flow-node/index.mjs +1 -1
- package/form-cascader/index.mjs +5 -5
- package/form-checkbox-group/index.mjs +2 -2
- package/form-date-picker/index.mjs +2 -2
- package/form-holder/index.mjs +1 -1
- package/form-input/index.mjs +2 -2
- package/form-input-email/index.mjs +2 -2
- package/form-input-id-card/index.mjs +2 -2
- package/form-input-number/index.mjs +2 -2
- package/form-input-phone-number/index.mjs +2 -2
- package/form-input-tag/index.mjs +2 -2
- package/form-input-time/index.mjs +2 -2
- package/form-item/index.mjs +1 -1
- package/form-radio-group/index.mjs +2 -2
- package/form-select/index.mjs +2 -2
- package/form-switch/index.mjs +2 -2
- package/form-textarea/index.mjs +2 -2
- package/form-view/index.mjs +3 -3
- package/fy-array/index.mjs +2 -2
- package/fy-cascader/index.mjs +1 -1
- package/fy-checkbox/index.mjs +1 -1
- package/fy-code/index.mjs +1 -1
- package/fy-curd/index.mjs +9 -9
- package/fy-date/index.mjs +1 -1
- package/fy-draggable/index.mjs +1 -1
- package/fy-dynamic/index.mjs +2 -2
- package/fy-empty/index.mjs +1 -1
- package/fy-form/index.mjs +14 -14
- package/fy-form-design/index.mjs +2 -2
- package/fy-input/index.mjs +1 -1
- package/fy-input-color/index.mjs +1 -1
- package/fy-input-icon/index.mjs +1 -1
- package/fy-input-map/index.mjs +1 -1
- package/fy-input-number/index.mjs +1 -1
- package/fy-input-table/index.mjs +1 -1
- package/fy-input-tree/index.mjs +1 -1
- package/fy-input-tree/style.css +1 -1
- package/fy-radio/index.mjs +1 -1
- package/fy-rate/index.mjs +1 -1
- package/fy-select/index.mjs +3 -3
- package/fy-slider/index.mjs +2 -2
- package/fy-switch/index.mjs +1 -1
- package/fy-time/index.mjs +1 -1
- package/fy-title/index.mjs +1 -1
- package/fy-tree/index.mjs +1 -1
- package/fy-u-editor/index.mjs +1 -1
- package/fy-upload/index.mjs +2 -2
- package/image-cropper/index.mjs +1 -1
- package/image-preview/index.mjs +1 -1
- package/index.mjs +455 -451
- package/license/index.mjs +1 -1
- package/login/index.mjs +1 -1
- package/monaco-editor/index.mjs +1 -1
- package/package.json +16 -16
- package/page-index/index.mjs +1 -1
- package/page-index-top/index.mjs +1 -1
- package/pageable-table/index.mjs +3 -3
- package/pageable-view/index.mjs +3 -3
- package/present-view/index.mjs +3 -3
- package/record-video/index.mjs +1 -1
- package/resize-observer/index.mjs +1 -1
- package/search/index.mjs +2 -2
- package/search-popover/index.mjs +4 -4
- package/sign/index.mjs +1 -1
- package/table-view/index.mjs +6 -6
- package/text-ellipsis/index.mjs +1 -1
- package/verify/index.mjs +1 -1
- package/vue-tree-select/index.mjs +354 -347
- package/vue-tree-select/style.css +1 -1
- package/watermark/index.mjs +1 -1
- package/web-types.json +82 -4
- package/chunks/confirmable-mixin.D2KW-Qlc.mjs +0 -116
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
function f(t, e, r, n) {
|
|
2
|
+
const i = /* @__PURE__ */ Object.create(null);
|
|
3
|
+
switch (i.event = e.event, r && (i.id = e.id), e.listenerType) {
|
|
4
|
+
case "scriptListener":
|
|
5
|
+
i.script = l(t, e, n);
|
|
6
|
+
break;
|
|
7
|
+
case "expressionListener":
|
|
8
|
+
i.expression = e.expression;
|
|
9
|
+
break;
|
|
10
|
+
case "delegateExpressionListener":
|
|
11
|
+
i.delegateExpression = e.delegateExpression;
|
|
12
|
+
break;
|
|
13
|
+
default:
|
|
14
|
+
i.class = e.class;
|
|
15
|
+
}
|
|
16
|
+
if (e.fields && (i.fields = e.fields.map((s) => a(t, s, n))), r && e.event === "timeout" && e.eventDefinitionType) {
|
|
17
|
+
const s = t.moddle.create("bpmn:FormalExpression", {
|
|
18
|
+
body: e.eventTimeDefinitions
|
|
19
|
+
}), c = t.moddle.create("bpmn:TimerEventDefinition", {
|
|
20
|
+
id: `TimerEventDefinition_${d(8)}`,
|
|
21
|
+
[`time${e.eventDefinitionType.replace(/^\S/, (o) => o.toUpperCase())}`]: s
|
|
22
|
+
});
|
|
23
|
+
i.eventDefinitions = [c];
|
|
24
|
+
}
|
|
25
|
+
return t.moddle.create(`${n}:${r ? "TaskListener" : "ExecutionListener"}`, i);
|
|
26
|
+
}
|
|
27
|
+
function a(t, e, r) {
|
|
28
|
+
const { name: n, fieldType: i, string: s, expression: c } = e, o = i === "string" ? { name: n, string: s } : { name: n, expression: c };
|
|
29
|
+
return t.moddle.create(`${r}:Field`, o);
|
|
30
|
+
}
|
|
31
|
+
function l(t, e, r) {
|
|
32
|
+
const { scriptType: n, scriptFormat: i, value: s, resource: c } = e, o = n === "inlineScript" ? { scriptFormat: i, value: s } : { scriptFormat: i, resource: c };
|
|
33
|
+
return t.moddle.create(`${r}:Script`, o);
|
|
34
|
+
}
|
|
35
|
+
function m(t, e, r) {
|
|
36
|
+
const n = t.moddle.create("bpmn:ExtensionElements", {
|
|
37
|
+
values: r
|
|
38
|
+
});
|
|
39
|
+
t.modeling.updateProperties(e, {
|
|
40
|
+
extensionElements: n
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function d(t = 8, e) {
|
|
44
|
+
let r = "";
|
|
45
|
+
const n = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
46
|
+
for (let i = t; i > 0; --i)
|
|
47
|
+
r += n[Math.floor(Math.random() * n.length)];
|
|
48
|
+
return r;
|
|
49
|
+
}
|
|
50
|
+
const p = (t, e = "body") => t ? t.get(e) : null, E = (t, e, r = "body", n) => {
|
|
51
|
+
u(t, e, { [r]: n });
|
|
52
|
+
}, u = ({ modeling: t }, e, r) => {
|
|
53
|
+
t.updateProperties(e, r);
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
E as a,
|
|
57
|
+
f as c,
|
|
58
|
+
p as g,
|
|
59
|
+
m as u
|
|
60
|
+
};
|
|
@@ -14,7 +14,7 @@ import "codemirror/addon/fold/brace-fold";
|
|
|
14
14
|
import "codemirror/addon/fold/comment-fold";
|
|
15
15
|
import { n as F } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
16
16
|
var P = function() {
|
|
17
|
-
var
|
|
17
|
+
var i = {}, l = function() {
|
|
18
18
|
var m = {
|
|
19
19
|
trace: function() {
|
|
20
20
|
},
|
|
@@ -87,7 +87,7 @@ var P = function() {
|
|
|
87
87
|
[25, 3]
|
|
88
88
|
],
|
|
89
89
|
performAction: function(u, t, n, p, s, e, o) {
|
|
90
|
-
var
|
|
90
|
+
var r = e.length - 1;
|
|
91
91
|
switch (s) {
|
|
92
92
|
case 1:
|
|
93
93
|
this.$ = u.replace(/\\(\\|")/g, "$1").replace(/\\n/g, `
|
|
@@ -106,33 +106,33 @@ var P = function() {
|
|
|
106
106
|
this.$ = !1;
|
|
107
107
|
break;
|
|
108
108
|
case 6:
|
|
109
|
-
return this.$ = e[
|
|
109
|
+
return this.$ = e[r - 1];
|
|
110
110
|
case 13:
|
|
111
111
|
this.$ = {};
|
|
112
112
|
break;
|
|
113
113
|
case 14:
|
|
114
|
-
this.$ = e[
|
|
114
|
+
this.$ = e[r - 1];
|
|
115
115
|
break;
|
|
116
116
|
case 15:
|
|
117
|
-
this.$ = [e[
|
|
117
|
+
this.$ = [e[r - 2], e[r]];
|
|
118
118
|
break;
|
|
119
119
|
case 16:
|
|
120
|
-
this.$ = {}, this.$[e[
|
|
120
|
+
this.$ = {}, this.$[e[r][0]] = e[r][1];
|
|
121
121
|
break;
|
|
122
122
|
case 17:
|
|
123
|
-
this.$ = e[
|
|
123
|
+
this.$ = e[r - 2], e[r - 2][e[r][0]] = e[r][1];
|
|
124
124
|
break;
|
|
125
125
|
case 18:
|
|
126
126
|
this.$ = [];
|
|
127
127
|
break;
|
|
128
128
|
case 19:
|
|
129
|
-
this.$ = e[
|
|
129
|
+
this.$ = e[r - 1];
|
|
130
130
|
break;
|
|
131
131
|
case 20:
|
|
132
|
-
this.$ = [e[
|
|
132
|
+
this.$ = [e[r]];
|
|
133
133
|
break;
|
|
134
134
|
case 21:
|
|
135
|
-
this.$ = e[
|
|
135
|
+
this.$ = e[r - 2], e[r - 2].push(e[r]);
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
138
|
table: [
|
|
@@ -237,22 +237,22 @@ var P = function() {
|
|
|
237
237
|
throw new Error(u);
|
|
238
238
|
},
|
|
239
239
|
parse: function(u) {
|
|
240
|
-
function t(
|
|
241
|
-
s.length = s.length - 2 *
|
|
240
|
+
function t(f) {
|
|
241
|
+
s.length = s.length - 2 * f, e.length = e.length - f, o.length = o.length - f;
|
|
242
242
|
}
|
|
243
243
|
function n() {
|
|
244
|
-
var
|
|
245
|
-
return
|
|
244
|
+
var f;
|
|
245
|
+
return f = p.lexer.lex() || 1, typeof f != "number" && (f = p.symbols_[f] || f), f;
|
|
246
246
|
}
|
|
247
|
-
var p = this, s = [0], e = [null], o = [],
|
|
247
|
+
var p = this, s = [0], e = [null], o = [], r = this.table, v = "", d = 0, N = 0, _ = 0, $ = 2, J = 1;
|
|
248
248
|
this.lexer.setInput(u), this.lexer.yy = this.yy, this.yy.lexer = this.lexer, typeof this.lexer.yylloc == "undefined" && (this.lexer.yylloc = {});
|
|
249
249
|
var b = this.lexer.yylloc;
|
|
250
250
|
o.push(b), typeof this.yy.parseError == "function" && (this.parseError = this.yy.parseError);
|
|
251
|
-
for (var h, S, a, c, w, g = {}, k,
|
|
252
|
-
if (a = s[s.length - 1], this.defaultActions[a] ? c = this.defaultActions[a] : (h == null && (h = n()), c =
|
|
251
|
+
for (var h, S, a, c, w, g = {}, k, y, A, E; ; ) {
|
|
252
|
+
if (a = s[s.length - 1], this.defaultActions[a] ? c = this.defaultActions[a] : (h == null && (h = n()), c = r[a] && r[a][h]), typeof c == "undefined" || !c.length || !c[0]) {
|
|
253
253
|
if (!_) {
|
|
254
254
|
E = [];
|
|
255
|
-
for (k in
|
|
255
|
+
for (k in r[a]) this.terminals_[k] && k > 2 && E.push("'" + this.terminals_[k] + "'");
|
|
256
256
|
var x = "";
|
|
257
257
|
this.lexer.showPosition ? x = "Parse error on line " + (d + 1) + `:
|
|
258
258
|
` + this.lexer.showPosition() + `
|
|
@@ -268,11 +268,11 @@ Expecting ` + E.join(", ") + ", got '" + this.terminals_[h] + "'" : x = "Parse e
|
|
|
268
268
|
if (h == J) throw new Error(x || "Parsing halted.");
|
|
269
269
|
N = this.lexer.yyleng, v = this.lexer.yytext, d = this.lexer.yylineno, b = this.lexer.yylloc, h = n();
|
|
270
270
|
}
|
|
271
|
-
for (; !($.toString() in
|
|
271
|
+
for (; !($.toString() in r[a]); ) {
|
|
272
272
|
if (a == 0) throw new Error(x || "Parsing halted.");
|
|
273
273
|
t(1), a = s[s.length - 1];
|
|
274
274
|
}
|
|
275
|
-
S = h, h = $, a = s[s.length - 1], c =
|
|
275
|
+
S = h, h = $, a = s[s.length - 1], c = r[a] && r[a][$], _ = 3;
|
|
276
276
|
}
|
|
277
277
|
if (c[0] instanceof Array && c.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + a + ", token: " + h);
|
|
278
278
|
switch (c[0]) {
|
|
@@ -280,13 +280,13 @@ Expecting ` + E.join(", ") + ", got '" + this.terminals_[h] + "'" : x = "Parse e
|
|
|
280
280
|
s.push(h), e.push(this.lexer.yytext), o.push(this.lexer.yylloc), s.push(c[1]), h = null, S ? (h = S, S = null) : (N = this.lexer.yyleng, v = this.lexer.yytext, d = this.lexer.yylineno, b = this.lexer.yylloc, _ > 0 && _--);
|
|
281
281
|
break;
|
|
282
282
|
case 2:
|
|
283
|
-
if (
|
|
284
|
-
first_line: o[o.length - (
|
|
283
|
+
if (y = this.productions_[c[1]][1], g.$ = e[e.length - y], g._$ = {
|
|
284
|
+
first_line: o[o.length - (y || 1)].first_line,
|
|
285
285
|
last_line: o[o.length - 1].last_line,
|
|
286
|
-
first_column: o[o.length - (
|
|
286
|
+
first_column: o[o.length - (y || 1)].first_column,
|
|
287
287
|
last_column: o[o.length - 1].last_column
|
|
288
288
|
}, w = this.performAction.call(g, v, N, d, this.yy, c[1], e, o), typeof w != "undefined") return w;
|
|
289
|
-
|
|
289
|
+
y && (s = s.slice(0, -1 * y * 2), e = e.slice(0, -1 * y), o = o.slice(0, -1 * y)), s.push(this.productions_[c[1]][0]), e.push(g.$), o.push(g._$), A = r[s[s.length - 2]][s[s.length - 1]], s.push(A);
|
|
290
290
|
break;
|
|
291
291
|
case 3:
|
|
292
292
|
return !0;
|
|
@@ -337,7 +337,7 @@ Expecting ` + E.join(", ") + ", got '" + this.terminals_[h] + "'" : x = "Parse e
|
|
|
337
337
|
this._input || (this.done = !0);
|
|
338
338
|
var t, n, p, s, e;
|
|
339
339
|
this._more || (this.yytext = "", this.match = "");
|
|
340
|
-
for (var o = this._currentRules(),
|
|
340
|
+
for (var o = this._currentRules(), r = 0; r < o.length && (p = this._input.match(this.rules[o[r]]), !(p && (!n || p[0].length > n[0].length) && (n = p, s = r, !this.options.flex))); r++)
|
|
341
341
|
;
|
|
342
342
|
if (n)
|
|
343
343
|
return e = n[0].match(/\n.*/g), e && (this.yylineno += e.length), this.yylloc = {
|
|
@@ -424,25 +424,25 @@ Expecting ` + E.join(", ") + ", got '" + this.terminals_[h] + "'" : x = "Parse e
|
|
|
424
424
|
}();
|
|
425
425
|
return m.lexer = I, m;
|
|
426
426
|
}();
|
|
427
|
-
return
|
|
427
|
+
return i.parser = l, i.parse = function() {
|
|
428
428
|
return l.parse.apply(l, arguments);
|
|
429
|
-
},
|
|
429
|
+
}, i;
|
|
430
430
|
}();
|
|
431
431
|
window.jsonlint = P;
|
|
432
|
-
const O = (
|
|
433
|
-
if (
|
|
432
|
+
const O = (i) => {
|
|
433
|
+
if (i)
|
|
434
434
|
try {
|
|
435
|
-
return JSON.stringify(JSON.parse(
|
|
435
|
+
return JSON.stringify(JSON.parse(i), null, 1);
|
|
436
436
|
} catch (l) {
|
|
437
437
|
}
|
|
438
|
-
return
|
|
439
|
-
}, R = (
|
|
440
|
-
if (
|
|
438
|
+
return i;
|
|
439
|
+
}, R = (i) => {
|
|
440
|
+
if (i)
|
|
441
441
|
try {
|
|
442
|
-
return JSON.stringify(JSON.parse(
|
|
442
|
+
return JSON.stringify(JSON.parse(i));
|
|
443
443
|
} catch (l) {
|
|
444
444
|
}
|
|
445
|
-
return
|
|
445
|
+
return i;
|
|
446
446
|
}, T = {
|
|
447
447
|
name: "CodeMirrorEditor",
|
|
448
448
|
inject: {
|
|
@@ -460,9 +460,9 @@ const O = (r) => {
|
|
|
460
460
|
}
|
|
461
461
|
},
|
|
462
462
|
watch: {
|
|
463
|
-
value(
|
|
463
|
+
value(i) {
|
|
464
464
|
var l;
|
|
465
|
-
(l = this.editor) == null || l.setValue(O(
|
|
465
|
+
(l = this.editor) == null || l.setValue(O(i));
|
|
466
466
|
}
|
|
467
467
|
},
|
|
468
468
|
mounted() {
|
|
@@ -480,23 +480,23 @@ const O = (r) => {
|
|
|
480
480
|
// styleActiveLine: true,
|
|
481
481
|
// gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter', 'CodeMirror-lint-markers']
|
|
482
482
|
}), this.editor.setValue(O(this.value)), this.editor.on("blur", this.change), this.editor.on("focus", this.focus), this.editor.setOption("extraKeys", {
|
|
483
|
-
"Ctrl-Alt-L"(
|
|
484
|
-
|
|
483
|
+
"Ctrl-Alt-L"(i) {
|
|
484
|
+
i.setValue(O(i.getValue()), null, 1);
|
|
485
485
|
}
|
|
486
486
|
});
|
|
487
487
|
},
|
|
488
488
|
beforeDestroy() {
|
|
489
|
-
var
|
|
490
|
-
(
|
|
489
|
+
var i, l;
|
|
490
|
+
(i = this.editor) == null || i.off("blur", this.change), (l = this.editor) == null || l.toTextArea();
|
|
491
491
|
},
|
|
492
492
|
methods: {
|
|
493
493
|
focus() {
|
|
494
|
-
var
|
|
495
|
-
(l = (
|
|
494
|
+
var i, l;
|
|
495
|
+
(l = (i = this.elFormItem).clearValidate) == null || l.call(i);
|
|
496
496
|
},
|
|
497
497
|
change() {
|
|
498
|
-
var
|
|
499
|
-
this.$emit("input", R((
|
|
498
|
+
var i;
|
|
499
|
+
this.$emit("input", R((i = this.editor) == null ? void 0 : i.getValue()));
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
502
|
};
|
package/confirm-button/index.mjs
CHANGED
package/confirmable/index.mjs
CHANGED
package/dialog-form/index.mjs
CHANGED
|
@@ -11,7 +11,7 @@ var l = (t, e, o) => e in t ? c(t, e, { enumerable: !0, configurable: !0, writab
|
|
|
11
11
|
return t;
|
|
12
12
|
}, r = (t, e) => d(t, m(e));
|
|
13
13
|
import { isEmpty as b } from "@web-utils/core";
|
|
14
|
-
import { d as f } from "../chunks/util.
|
|
14
|
+
import { d as f } from "../chunks/util.CoahLDYn.mjs";
|
|
15
15
|
import h from "vue";
|
|
16
16
|
import { n as _ } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
17
17
|
const i = {
|
package/e-charts/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as s from "echarts/core";
|
|
2
2
|
import { isString as r } from "@web-utils/core";
|
|
3
3
|
import { debounce as a } from "@web-utils/integrations/lodash";
|
|
4
|
-
import {
|
|
4
|
+
import { removeListener as n, addListener as o } from "resize-detector";
|
|
5
5
|
import { n as d } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
6
6
|
const c = ["theme", "initOptions", "autoResize"], l = ["manualUpdate", "watchShallow"], p = {
|
|
7
7
|
name: "ECharts",
|
|
@@ -129,7 +129,7 @@ const c = ["theme", "initOptions", "autoResize"], l = ["manualUpdate", "watchSha
|
|
|
129
129
|
},
|
|
130
130
|
100,
|
|
131
131
|
{ leading: !0 }
|
|
132
|
-
),
|
|
132
|
+
), o(this.$el, this.__resizeHandler)), Object.defineProperties(this, {
|
|
133
133
|
// Only recalculated when accessed from JavaScript.
|
|
134
134
|
// Won't update DOM on value change because getters
|
|
135
135
|
// don't depend on reactive values
|
|
@@ -161,7 +161,7 @@ const c = ["theme", "initOptions", "autoResize"], l = ["manualUpdate", "watchSha
|
|
|
161
161
|
));
|
|
162
162
|
},
|
|
163
163
|
destroy() {
|
|
164
|
-
this.autoResize &&
|
|
164
|
+
this.autoResize && n(this.$el, this.__resizeHandler), this.dispose(), this.chart = null;
|
|
165
165
|
},
|
|
166
166
|
refresh() {
|
|
167
167
|
this.chart && (this.destroy(), this.init());
|
package/editable-tree/index.mjs
CHANGED
|
@@ -26,10 +26,10 @@ var a = (t, e, i) => new Promise((s, o) => {
|
|
|
26
26
|
}, l = (d) => d.done ? s(d.value) : Promise.resolve(d.value).then(n, r);
|
|
27
27
|
l((i = i.apply(t, e)).next());
|
|
28
28
|
});
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
29
|
+
import { findTreeChildren as T, delay as M, isUndefined as p, isNotEmpty as K, fastClone as P, isPlainObject as u, isFunction as N, computePosition as E, isVerticalScrollbarVisible as D, scrollbarWidth as L, hasOwn as m } from "@web-utils/core";
|
|
30
|
+
import { removeResizeListener as C, addResizeListener as g } from "@web-utils/integrations/resize";
|
|
31
31
|
import { cloneDeep as v } from "@web-utils/integrations/lodash";
|
|
32
|
-
import { a as R, b as z, c as y } from "../chunks/index.
|
|
32
|
+
import { a as R, b as z, c as y } from "../chunks/index.MAFc4eFi.mjs";
|
|
33
33
|
import { n as S } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
34
34
|
const V = {
|
|
35
35
|
name: "EditableTree",
|
|
@@ -164,14 +164,14 @@ const V = {
|
|
|
164
164
|
this.tryFetch();
|
|
165
165
|
},
|
|
166
166
|
mounted() {
|
|
167
|
-
|
|
167
|
+
g(this.$refs.tree.$el, this.resize), g(this.$refs.treeWrapper, this.resize);
|
|
168
168
|
},
|
|
169
169
|
beforeDestroy() {
|
|
170
|
-
|
|
170
|
+
C(this.$refs.tree.$el, this.resize), C(this.$refs.treeWrapper, this.resize);
|
|
171
171
|
},
|
|
172
172
|
methods: {
|
|
173
|
-
filterTreeProperties:
|
|
174
|
-
filterTreeEvents:
|
|
173
|
+
filterTreeProperties: z,
|
|
174
|
+
filterTreeEvents: R,
|
|
175
175
|
addExpandKey(t) {
|
|
176
176
|
this.reserveExpandKey && this.expandedKeys.push(t[this.nodeKey]);
|
|
177
177
|
},
|
|
@@ -179,11 +179,11 @@ const V = {
|
|
|
179
179
|
this.reserveExpandKey && (this.expandedKeys = this.expandedKeys.filter((e) => e !== t[this.nodeKey]));
|
|
180
180
|
},
|
|
181
181
|
resize() {
|
|
182
|
-
|
|
182
|
+
D(this.$refs.treeWrapper) ? this.right = 4 + L : this.right = 4;
|
|
183
183
|
},
|
|
184
184
|
showContextMenu(t, e, i) {
|
|
185
185
|
return a(this, null, function* () {
|
|
186
|
-
e.contextmenu === !1 || e.id === -1 || e.id === 0 || e.edit === !0 || this.contextMenu && (this.curNode = i, this.curData = e, this.showMenu = !0, this.$refs.tree.setCurrentKey(e.id), yield this.$nextTick(), this.position =
|
|
186
|
+
e.contextmenu === !1 || e.id === -1 || e.id === 0 || e.edit === !0 || this.contextMenu && (this.curNode = i, this.curData = e, this.showMenu = !0, this.$refs.tree.setCurrentKey(e.id), yield this.$nextTick(), this.position = E(t, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
|
|
187
187
|
});
|
|
188
188
|
},
|
|
189
189
|
hideContextMenu() {
|
|
@@ -394,14 +394,14 @@ const V = {
|
|
|
394
394
|
},
|
|
395
395
|
onConfirm(t, e) {
|
|
396
396
|
return a(this, null, function* () {
|
|
397
|
-
if (e[this.treeProps.label] === this.text || !
|
|
397
|
+
if (e[this.treeProps.label] === this.text || !K(this.text)) {
|
|
398
398
|
this.clear();
|
|
399
399
|
return;
|
|
400
400
|
}
|
|
401
401
|
p(e.loading) ? this.$set(e, "loading", !0) : e.loading = !0;
|
|
402
402
|
try {
|
|
403
403
|
if (this.loading = !0, e.id === -1) {
|
|
404
|
-
const i = yield this.saveApi(this.newNodeBuilder(this.text, t.parent.data || { id: -1 })), s =
|
|
404
|
+
const i = yield this.saveApi(this.newNodeBuilder(this.text, t.parent.data || { id: -1 })), s = P(e);
|
|
405
405
|
y(e, h(c({}, i.data), { isTempNode: !1 })), this.$emit("node-added", e, s, t), this.registerNode(t);
|
|
406
406
|
} else
|
|
407
407
|
yield this.updateApi(h(c({}, e), { [this.treeProps.label]: this.text }));
|
|
@@ -430,7 +430,7 @@ const V = {
|
|
|
430
430
|
scrollIntoView(t) {
|
|
431
431
|
return a(this, null, function* () {
|
|
432
432
|
var e, i;
|
|
433
|
-
yield this.$nextTick(), t || (yield
|
|
433
|
+
yield this.$nextTick(), t || (yield M(300)), (i = (e = this.$refs) == null ? void 0 : e.labelTxt) == null || i.focus();
|
|
434
434
|
});
|
|
435
435
|
},
|
|
436
436
|
inputKeyup(t, e, i) {
|
|
@@ -458,7 +458,7 @@ const V = {
|
|
|
458
458
|
return this.$refs.tree.root;
|
|
459
459
|
},
|
|
460
460
|
findTreeNode(t) {
|
|
461
|
-
return
|
|
461
|
+
return T(this.$refs.tree.root.childNodes, (e) => e.data === t || e.data.id === t, "childNodes");
|
|
462
462
|
},
|
|
463
463
|
registerNode(t) {
|
|
464
464
|
t.store.registerNode(t), delete t.store.nodesMap[-1];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.element-listeners-drawer .el-drawer__header{margin-bottom:0}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.element-multi-instance .el-select{display:block}.flow-tips-list-item{list-style:inside square}.flow-tips-title{padding-top:10px;padding-bottom:10px}.flow-tips-keyword{font-weight:700}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { n as c } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
2
|
+
const d = (t) => {
|
|
3
|
+
if (!t) return 0;
|
|
4
|
+
const e = t.match(/^\d*(\.\d*)?/);
|
|
5
|
+
return e ? Number(e[0]) : 0;
|
|
6
|
+
}, a = {
|
|
7
|
+
name: "Ellipsis",
|
|
8
|
+
props: {
|
|
9
|
+
content: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ""
|
|
12
|
+
},
|
|
13
|
+
direction: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "end"
|
|
16
|
+
},
|
|
17
|
+
rows: {
|
|
18
|
+
type: [Number, String],
|
|
19
|
+
default: 1
|
|
20
|
+
},
|
|
21
|
+
expandText: {
|
|
22
|
+
type: String,
|
|
23
|
+
default: ""
|
|
24
|
+
},
|
|
25
|
+
collapseText: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: ""
|
|
28
|
+
},
|
|
29
|
+
symbol: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: "..."
|
|
32
|
+
},
|
|
33
|
+
lineHeight: {
|
|
34
|
+
type: [Number, String],
|
|
35
|
+
default: "20"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
emits: ["click", "change"],
|
|
39
|
+
data() {
|
|
40
|
+
return {
|
|
41
|
+
ellipsis: {
|
|
42
|
+
leading: "",
|
|
43
|
+
tailing: ""
|
|
44
|
+
},
|
|
45
|
+
maxHeight: 0,
|
|
46
|
+
// 当行的最大高度
|
|
47
|
+
exceeded: !1,
|
|
48
|
+
// 是否超出
|
|
49
|
+
expanded: !1
|
|
50
|
+
// 是否折叠
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
watch: {
|
|
54
|
+
content(t, e) {
|
|
55
|
+
t !== e && this.createContainer();
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
mounted() {
|
|
59
|
+
this.createContainer();
|
|
60
|
+
},
|
|
61
|
+
methods: {
|
|
62
|
+
/**
|
|
63
|
+
* 创建虚拟 container,内容为 props.content 的内容
|
|
64
|
+
*/
|
|
65
|
+
createContainer() {
|
|
66
|
+
if (!this.$refs.root) return;
|
|
67
|
+
const t = window.getComputedStyle(this.$refs.root), e = document.createElement("div");
|
|
68
|
+
Array.prototype.slice.apply(t).forEach((l) => {
|
|
69
|
+
e.style.setProperty(l, t.getPropertyValue(l));
|
|
70
|
+
}), e.style.position = "fixed", e.style.left = "999999px", e.style.top = "999999px", e.style.zIndex = "-1000", e.style.height = "auto", e.style.minHeight = "auto", e.style.maxHeight = "auto", e.style.textOverflow = "clip", e.style.whiteSpace = "normal", e.style.webkitLineClamp = "unset", e.style.display = "block";
|
|
71
|
+
const s = d(t.lineHeight === "normal" ? this.lineHeight : t.lineHeight);
|
|
72
|
+
this.maxHeight = Math.floor(s * (Number(this.rows) + 0.5) + d(t.paddingTop) + d(t.paddingBottom)), e.innerText = this.content, document.body.appendChild(e), this.calcEllipse(e);
|
|
73
|
+
},
|
|
74
|
+
/**
|
|
75
|
+
* 展开收起
|
|
76
|
+
* @param type
|
|
77
|
+
*/
|
|
78
|
+
clickHandle(t) {
|
|
79
|
+
t === 1 ? (this.expanded = !0, this.$emit("change", "expand")) : (this.expanded = !1, this.$emit("change", "collapse"));
|
|
80
|
+
},
|
|
81
|
+
/**
|
|
82
|
+
* 文本点击
|
|
83
|
+
*/
|
|
84
|
+
handleClick() {
|
|
85
|
+
this.$emit("click");
|
|
86
|
+
},
|
|
87
|
+
/**
|
|
88
|
+
* 计算省略号的位置
|
|
89
|
+
* @param container
|
|
90
|
+
*/
|
|
91
|
+
calcEllipse(t) {
|
|
92
|
+
if (t.offsetHeight <= this.maxHeight)
|
|
93
|
+
this.exceeded = !1, document.body.removeChild(t);
|
|
94
|
+
else {
|
|
95
|
+
this.exceeded = !0;
|
|
96
|
+
const e = this.content.length, i = Math.floor(e / 2);
|
|
97
|
+
this.ellipsis = this.direction === "middle" ? this.tailorMiddle([0, i], [i, e], t) : this.tailor(0, e, t), document.body.removeChild(t);
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
tailorMiddle(t, e, i) {
|
|
101
|
+
const s = this.expanded ? this.collapseText : this.expandText, l = this.content.length;
|
|
102
|
+
if (t[1] - t[0] <= 1 && e[1] - e[0] <= 1)
|
|
103
|
+
return {
|
|
104
|
+
leading: this.content.slice(0, t[0]) + this.symbol,
|
|
105
|
+
tailing: this.symbol + this.content.slice(e[1], l)
|
|
106
|
+
};
|
|
107
|
+
const n = Math.floor((t[0] + t[1]) / 2), o = Math.ceil((e[0] + e[1]) / 2);
|
|
108
|
+
return i.innerText = this.content.slice(0, n) + this.symbol + s + this.symbol + this.content.slice(o, l), i.offsetHeight <= this.maxHeight ? this.tailorMiddle([n, t[1]], [e[0], o], i) : this.tailorMiddle([t[0], n], [o, e[1]], i);
|
|
109
|
+
},
|
|
110
|
+
/**
|
|
111
|
+
* 计算 start/end 省略
|
|
112
|
+
* @param left
|
|
113
|
+
* @param right
|
|
114
|
+
* @param container
|
|
115
|
+
* @return {{leading: string}|{tailing: string}|*}
|
|
116
|
+
*/
|
|
117
|
+
tailor(t, e, i) {
|
|
118
|
+
const s = this.expanded ? this.collapseText : this.expandText, l = this.content.length;
|
|
119
|
+
if (e - t <= 1)
|
|
120
|
+
return this.direction === "end" ? {
|
|
121
|
+
leading: this.content.slice(0, t) + this.symbol
|
|
122
|
+
} : {
|
|
123
|
+
tailing: this.symbol + this.content.slice(e, l)
|
|
124
|
+
};
|
|
125
|
+
const n = Math.round((t + e) / 2);
|
|
126
|
+
return this.direction === "end" ? i.innerText = this.content.slice(0, n) + this.symbol + s : i.innerText = s + this.symbol + this.content.slice(n, l), i.offsetHeight <= this.maxHeight ? this.direction === "end" ? this.tailor(n, e, i) : this.tailor(t, n, i) : this.direction === "end" ? this.tailor(t, n, i) : this.tailor(n, e, i);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
var h = function() {
|
|
131
|
+
var e = this, i = e._self._c;
|
|
132
|
+
return i("div", { ref: "root", staticClass: "fy-ellipsis", on: { click: e.handleClick } }, [e.exceeded ? e._e() : i("div", [e._v(e._s(e.content))]), e.exceeded && !e.expanded ? i("div", [e._v(" " + e._s(e.ellipsis && e.ellipsis.leading)), e.expandText ? i("span", { staticClass: "fy-ellipsis__text", on: { click: function(s) {
|
|
133
|
+
return s.stopPropagation(), e.clickHandle(1);
|
|
134
|
+
} } }, [e._v(e._s(e.expandText))]) : e._e(), e._v(e._s(e.ellipsis && e.ellipsis.tailing) + " ")]) : e._e(), e.exceeded && e.expanded ? i("div", [e._v(" " + e._s(e.content) + " "), e.expandText ? i("span", { staticClass: "fy-ellipsis__text", on: { click: function(s) {
|
|
135
|
+
return s.stopPropagation(), e.clickHandle(2);
|
|
136
|
+
} } }, [e._v(e._s(e.collapseText))]) : e._e()]) : e._e()]);
|
|
137
|
+
}, r = [], p = /* @__PURE__ */ c(
|
|
138
|
+
a,
|
|
139
|
+
h,
|
|
140
|
+
r,
|
|
141
|
+
!1,
|
|
142
|
+
null,
|
|
143
|
+
null
|
|
144
|
+
);
|
|
145
|
+
const x = p.exports;
|
|
146
|
+
export {
|
|
147
|
+
x as default
|
|
148
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.fy-ellipsis{display:flex}.fy-ellipsis__text{cursor:pointer;color:#3460fa;display:inline}
|
package/flex-column/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ var a = (t, e, n) => e in t ? i(t, e, { enumerable: !0, configurable: !0, writab
|
|
|
10
10
|
m.call(e, n) && a(t, n, e[n]);
|
|
11
11
|
return t;
|
|
12
12
|
}, c = (t, e) => f(t, u(e));
|
|
13
|
-
import { g as h } from "../chunks/index.
|
|
13
|
+
import { g as h } from "../chunks/index.MAFc4eFi.mjs";
|
|
14
14
|
import { n as _ } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
15
15
|
const d = {
|
|
16
16
|
name: "FlexColumn",
|
package/flex-item/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ var r = (t, e, l) => e in t ? i(t, e, { enumerable: !0, configurable: !0, writab
|
|
|
10
10
|
x.call(e, l) && r(t, l, e[l]);
|
|
11
11
|
return t;
|
|
12
12
|
}, f = (t, e) => u(t, c(e));
|
|
13
|
-
import { g as m } from "../chunks/index.
|
|
13
|
+
import { g as m } from "../chunks/index.MAFc4eFi.mjs";
|
|
14
14
|
import { n as C } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
15
15
|
const d = {
|
|
16
16
|
name: "FlexItem",
|
package/flex-row/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ var a = (n, e, t) => e in n ? i(n, e, { enumerable: !0, configurable: !0, writab
|
|
|
10
10
|
h.call(e, t) && a(n, t, e[t]);
|
|
11
11
|
return n;
|
|
12
12
|
}, c = (n, e) => f(n, u(e));
|
|
13
|
-
import { g as _ } from "../chunks/index.
|
|
13
|
+
import { g as _ } from "../chunks/index.MAFc4eFi.mjs";
|
|
14
14
|
import { n as m } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
|
|
15
15
|
const d = {
|
|
16
16
|
name: "FlexRow",
|
package/flow/index.mjs
CHANGED