@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.
Files changed (113) hide show
  1. package/chat/index.mjs +1 -1
  2. package/chunks/ElementBaseInfo.jv89Vjy1.mjs +118 -0
  3. package/chunks/ElementForm.4QQYs5uq.mjs +241 -0
  4. package/chunks/ElementListeners.vfHHHAOL.mjs +255 -0
  5. package/chunks/ElementMultiInstance.3Z28ewuh.mjs +191 -0
  6. package/chunks/ElementOtherConfig.B1NfMTYh.mjs +60 -0
  7. package/chunks/ElementProperties.CRIQaaPc.mjs +112 -0
  8. package/chunks/ElementTaskConfig.MBbkLrth.mjs +326 -0
  9. package/chunks/FlowCondition.BfU9kw6h.mjs +132 -0
  10. package/chunks/{FormTemp.CJOJOy8K.mjs → FormTemp.BSpnNput.mjs} +4 -4
  11. package/chunks/SignalAndMessage.CH6L7cYu.mjs +96 -0
  12. package/chunks/UserTaskListeners.XXe5dC5I.mjs +210 -0
  13. package/chunks/confirmable-mixin.D4LAArE5.mjs +114 -0
  14. package/chunks/{dataformat.ARPY2U57.mjs → dataformat.B9UvztrQ.mjs} +7 -7
  15. package/chunks/{dic.DBmh9yzU.mjs → dic.CET0XdKP.mjs} +3 -3
  16. package/chunks/{event.mRPNW7Cx.mjs → event.BT1F_1vF.mjs} +6 -6
  17. package/chunks/{form-input-mixin.DMuQta5I.mjs → form-input-mixin.BkKiqJhi.mjs} +2 -2
  18. package/chunks/{form-item-mixin.CdcqXa2h.mjs → form-item-mixin.CG4ZwzMC.mjs} +1 -1
  19. package/chunks/{index.DwCBGcYk.mjs → index.MAFc4eFi.mjs} +4 -4
  20. package/chunks/{init.CauLYxJq.mjs → init.ofpxEyAI.mjs} +8 -8
  21. package/chunks/{json-beautifier.j1-U5g4P.mjs → json-beautifier.Bp3GslGm.mjs} +2 -0
  22. package/chunks/{util.BaRFvfAi.mjs → util.CoahLDYn.mjs} +7 -7
  23. package/chunks/utilSelf.CRqpl0Cz.mjs +56 -0
  24. package/chunks/utils.DRcxC1Fb.mjs +60 -0
  25. package/code-mirror-editor/index.mjs +45 -45
  26. package/confirm-button/index.mjs +1 -1
  27. package/confirmable/index.mjs +1 -1
  28. package/data-table-picker/index.mjs +1 -1
  29. package/dialog-form/index.mjs +1 -1
  30. package/e-charts/index.mjs +3 -3
  31. package/editable-tree/index.mjs +13 -13
  32. package/element-listeners/style.css +1 -0
  33. package/element-multi-instance/style.css +1 -0
  34. package/ellipsis/index.mjs +148 -0
  35. package/ellipsis/style.css +1 -0
  36. package/flex-column/index.mjs +1 -1
  37. package/flex-item/index.mjs +1 -1
  38. package/flex-row/index.mjs +1 -1
  39. package/flow/index.mjs +1 -1
  40. package/flow-designer/index.mjs +519 -2134
  41. package/flow-designer/style.css +1 -1
  42. package/flow-node/index.mjs +1 -1
  43. package/form-cascader/index.mjs +5 -5
  44. package/form-checkbox-group/index.mjs +2 -2
  45. package/form-date-picker/index.mjs +2 -2
  46. package/form-holder/index.mjs +1 -1
  47. package/form-input/index.mjs +2 -2
  48. package/form-input-email/index.mjs +2 -2
  49. package/form-input-id-card/index.mjs +2 -2
  50. package/form-input-number/index.mjs +2 -2
  51. package/form-input-phone-number/index.mjs +2 -2
  52. package/form-input-tag/index.mjs +2 -2
  53. package/form-input-time/index.mjs +2 -2
  54. package/form-item/index.mjs +1 -1
  55. package/form-radio-group/index.mjs +2 -2
  56. package/form-select/index.mjs +2 -2
  57. package/form-switch/index.mjs +2 -2
  58. package/form-textarea/index.mjs +2 -2
  59. package/form-view/index.mjs +3 -3
  60. package/fy-array/index.mjs +2 -2
  61. package/fy-cascader/index.mjs +1 -1
  62. package/fy-checkbox/index.mjs +1 -1
  63. package/fy-code/index.mjs +1 -1
  64. package/fy-curd/index.mjs +9 -9
  65. package/fy-date/index.mjs +1 -1
  66. package/fy-draggable/index.mjs +1 -1
  67. package/fy-dynamic/index.mjs +2 -2
  68. package/fy-empty/index.mjs +1 -1
  69. package/fy-form/index.mjs +14 -14
  70. package/fy-form-design/index.mjs +2 -2
  71. package/fy-input/index.mjs +1 -1
  72. package/fy-input-color/index.mjs +1 -1
  73. package/fy-input-icon/index.mjs +1 -1
  74. package/fy-input-map/index.mjs +1 -1
  75. package/fy-input-number/index.mjs +1 -1
  76. package/fy-input-table/index.mjs +1 -1
  77. package/fy-input-tree/index.mjs +1 -1
  78. package/fy-input-tree/style.css +1 -1
  79. package/fy-radio/index.mjs +1 -1
  80. package/fy-rate/index.mjs +1 -1
  81. package/fy-select/index.mjs +3 -3
  82. package/fy-slider/index.mjs +2 -2
  83. package/fy-switch/index.mjs +1 -1
  84. package/fy-time/index.mjs +1 -1
  85. package/fy-title/index.mjs +1 -1
  86. package/fy-tree/index.mjs +1 -1
  87. package/fy-u-editor/index.mjs +1 -1
  88. package/fy-upload/index.mjs +2 -2
  89. package/image-cropper/index.mjs +1 -1
  90. package/image-preview/index.mjs +1 -1
  91. package/index.mjs +455 -451
  92. package/license/index.mjs +1 -1
  93. package/login/index.mjs +1 -1
  94. package/monaco-editor/index.mjs +1 -1
  95. package/package.json +16 -16
  96. package/page-index/index.mjs +1 -1
  97. package/page-index-top/index.mjs +1 -1
  98. package/pageable-table/index.mjs +3 -3
  99. package/pageable-view/index.mjs +3 -3
  100. package/present-view/index.mjs +3 -3
  101. package/record-video/index.mjs +1 -1
  102. package/resize-observer/index.mjs +1 -1
  103. package/search/index.mjs +2 -2
  104. package/search-popover/index.mjs +4 -4
  105. package/sign/index.mjs +1 -1
  106. package/table-view/index.mjs +6 -6
  107. package/text-ellipsis/index.mjs +1 -1
  108. package/verify/index.mjs +1 -1
  109. package/vue-tree-select/index.mjs +354 -347
  110. package/vue-tree-select/style.css +1 -1
  111. package/watermark/index.mjs +1 -1
  112. package/web-types.json +82 -4
  113. 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 r = {}, l = function() {
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 i = e.length - 1;
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[i - 1];
109
+ return this.$ = e[r - 1];
110
110
  case 13:
111
111
  this.$ = {};
112
112
  break;
113
113
  case 14:
114
- this.$ = e[i - 1];
114
+ this.$ = e[r - 1];
115
115
  break;
116
116
  case 15:
117
- this.$ = [e[i - 2], e[i]];
117
+ this.$ = [e[r - 2], e[r]];
118
118
  break;
119
119
  case 16:
120
- this.$ = {}, this.$[e[i][0]] = e[i][1];
120
+ this.$ = {}, this.$[e[r][0]] = e[r][1];
121
121
  break;
122
122
  case 17:
123
- this.$ = e[i - 2], e[i - 2][e[i][0]] = e[i][1];
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[i - 1];
129
+ this.$ = e[r - 1];
130
130
  break;
131
131
  case 20:
132
- this.$ = [e[i]];
132
+ this.$ = [e[r]];
133
133
  break;
134
134
  case 21:
135
- this.$ = e[i - 2], e[i - 2].push(e[i]);
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(y) {
241
- s.length = s.length - 2 * y, e.length = e.length - y, o.length = o.length - y;
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 y;
245
- return y = p.lexer.lex() || 1, typeof y != "number" && (y = p.symbols_[y] || y), y;
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 = [], i = this.table, v = "", d = 0, N = 0, _ = 0, $ = 2, J = 1;
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, f, A, E; ; ) {
252
- if (a = s[s.length - 1], this.defaultActions[a] ? c = this.defaultActions[a] : (h == null && (h = n()), c = i[a] && i[a][h]), typeof c == "undefined" || !c.length || !c[0]) {
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 i[a]) this.terminals_[k] && k > 2 && E.push("'" + this.terminals_[k] + "'");
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 i[a]); ) {
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 = i[a] && i[a][$], _ = 3;
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 (f = this.productions_[c[1]][1], g.$ = e[e.length - f], g._$ = {
284
- first_line: o[o.length - (f || 1)].first_line,
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 - (f || 1)].first_column,
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
- f && (s = s.slice(0, -1 * f * 2), e = e.slice(0, -1 * f), o = o.slice(0, -1 * f)), s.push(this.productions_[c[1]][0]), e.push(g.$), o.push(g._$), A = i[s[s.length - 2]][s[s.length - 1]], s.push(A);
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(), i = 0; i < o.length && (p = this._input.match(this.rules[o[i]]), !(p && (!n || p[0].length > n[0].length) && (n = p, s = i, !this.options.flex))); i++)
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 r.parser = l, r.parse = function() {
427
+ return i.parser = l, i.parse = function() {
428
428
  return l.parse.apply(l, arguments);
429
- }, r;
429
+ }, i;
430
430
  }();
431
431
  window.jsonlint = P;
432
- const O = (r) => {
433
- if (r)
432
+ const O = (i) => {
433
+ if (i)
434
434
  try {
435
- return JSON.stringify(JSON.parse(r), null, 1);
435
+ return JSON.stringify(JSON.parse(i), null, 1);
436
436
  } catch (l) {
437
437
  }
438
- return r;
439
- }, R = (r) => {
440
- if (r)
438
+ return i;
439
+ }, R = (i) => {
440
+ if (i)
441
441
  try {
442
- return JSON.stringify(JSON.parse(r));
442
+ return JSON.stringify(JSON.parse(i));
443
443
  } catch (l) {
444
444
  }
445
- return r;
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(r) {
463
+ value(i) {
464
464
  var l;
465
- (l = this.editor) == null || l.setValue(O(r));
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"(r) {
484
- r.setValue(O(r.getValue()), null, 1);
483
+ "Ctrl-Alt-L"(i) {
484
+ i.setValue(O(i.getValue()), null, 1);
485
485
  }
486
486
  });
487
487
  },
488
488
  beforeDestroy() {
489
- var r, l;
490
- (r = this.editor) == null || r.off("blur", this.change), (l = this.editor) == null || l.toTextArea();
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 r, l;
495
- (l = (r = this.elFormItem).clearValidate) == null || l.call(r);
494
+ var i, l;
495
+ (l = (i = this.elFormItem).clearValidate) == null || l.call(i);
496
496
  },
497
497
  change() {
498
- var r;
499
- this.$emit("input", R((r = this.editor) == null ? void 0 : r.getValue()));
498
+ var i;
499
+ this.$emit("input", R((i = this.editor) == null ? void 0 : i.getValue()));
500
500
  }
501
501
  }
502
502
  };
@@ -1,4 +1,4 @@
1
- import { c as n } from "../chunks/confirmable-mixin.D2KW-Qlc.mjs";
1
+ import { c as n } from "../chunks/confirmable-mixin.D4LAArE5.mjs";
2
2
  import { n as t } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
3
3
  const o = {
4
4
  props: {
@@ -1,4 +1,4 @@
1
- import { c as n } from "../chunks/confirmable-mixin.D2KW-Qlc.mjs";
1
+ import { c as n } from "../chunks/confirmable-mixin.D4LAArE5.mjs";
2
2
  import { n as o } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
3
3
  const e = {
4
4
  name: "Confirmable",
@@ -1,4 +1,4 @@
1
- import { f as i } from "../chunks/index.DwCBGcYk.mjs";
1
+ import { f as i } from "../chunks/index.MAFc4eFi.mjs";
2
2
  import { n } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
3
3
  const o = {
4
4
  name: "DataTablePicker",
@@ -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.BaRFvfAi.mjs";
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 = {
@@ -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 { addListener as n, removeListener as o } from "resize-detector";
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
- ), n(this.$el, this.__resizeHandler)), Object.defineProperties(this, {
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 && o(this.$el, this.__resizeHandler), this.dispose(), this.chart = null;
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());
@@ -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 { hasOwn as m, isVerticalScrollbarVisible as T, scrollbarWidth as M, computePosition as K, isPlainObject as u, isFunction as N, isUndefined as p, isNotEmpty as P, fastClone as E, delay as D, findTreeChildren as L } from "@web-utils/core";
30
- import { addResizeListener as C, removeResizeListener as g } from "@web-utils/integrations/resize";
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.DwCBGcYk.mjs";
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
- C(this.$refs.tree.$el, this.resize), C(this.$refs.treeWrapper, this.resize);
167
+ g(this.$refs.tree.$el, this.resize), g(this.$refs.treeWrapper, this.resize);
168
168
  },
169
169
  beforeDestroy() {
170
- g(this.$refs.tree.$el, this.resize), g(this.$refs.treeWrapper, this.resize);
170
+ C(this.$refs.tree.$el, this.resize), C(this.$refs.treeWrapper, this.resize);
171
171
  },
172
172
  methods: {
173
- filterTreeProperties: R,
174
- filterTreeEvents: z,
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
- T(this.$refs.treeWrapper) ? this.right = 4 + M : this.right = 4;
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 = K(t, this.$refs.contextMenu), window.addEventListener("click", this.hideContextMenu));
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 || !P(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 = E(e);
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 D(300)), (i = (e = this.$refs) == null ? void 0 : e.labelTxt) == null || i.focus();
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 L(this.$refs.tree.root.childNodes, (e) => e.data === t || e.data.id === t, "childNodes");
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}
@@ -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.DwCBGcYk.mjs";
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",
@@ -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.DwCBGcYk.mjs";
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",
@@ -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.DwCBGcYk.mjs";
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
@@ -1,4 +1,4 @@
1
- import { s as l, r } from "../chunks/util.BaRFvfAi.mjs";
1
+ import { r, s as l } from "../chunks/util.CoahLDYn.mjs";
2
2
  import { n as a } from "../chunks/_plugin-vue2_normalizer.CeySl7Fu.mjs";
3
3
  const c = {
4
4
  name: "Flow",