@web-utils/component 2.7.13 → 2.7.14

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 (110) hide show
  1. package/dist/chunks/{ConfigSelect.vue_vue_type_template_lang.e7a9d5b7.js → ConfigSelect.vue_vue_type_template_lang.dfc91f07.js} +20 -15
  2. package/dist/chunks/{ConfigTable.vue_vue_type_template_lang.e9060616.js → ConfigTable.vue_vue_type_template_lang.b27540fd.js} +1 -1
  3. package/dist/chunks/{ConfigUpload.vue_vue_type_template_lang.48dd814b.js → ConfigUpload.vue_vue_type_template_lang.129c0ced.js} +18 -13
  4. package/dist/chunks/{WidgetConfig.vue_vue_type_template_lang.7928c468.js → WidgetConfig.vue_vue_type_template_lang.3cc74fe8.js} +16 -16
  5. package/dist/chunks/{WidgetForm.vue_vue_type_template_lang.e3e800a6.js → WidgetForm.vue_vue_type_template_lang.d4b05679.js} +10 -10
  6. package/dist/chunks/{WidgetFormGroup.vue_vue_type_template_lang.6a693e5e.js → WidgetFormGroup.vue_vue_type_template_lang.bdcb6d37.js} +13 -13
  7. package/dist/chunks/{WidgetFormTable.vue_vue_type_template_lang.291bf39a.js → WidgetFormTable.vue_vue_type_template_lang.e2b788ba.js} +3 -2
  8. package/dist/chunks/{dataformat.d3fd2d1b.js → dataformat.65b92bfe.js} +36 -35
  9. package/dist/chunks/detail.d67573b1.js +28 -0
  10. package/dist/chunks/dic.70feb9b4.js +135 -0
  11. package/dist/chunks/{event.43b42228.js → event.dd6f522d.js} +3 -3
  12. package/dist/chunks/{init.3b47bb80.js → init.7c58eb34.js} +10 -10
  13. package/dist/chunks/{monaco.1dbdc960.js → monaco.cefcb9f5.js} +92 -85
  14. package/dist/chunks/{packages.6f252850.js → packages.1fc9ccba.js} +1 -1
  15. package/dist/chunks/slot.4b391395.js +27 -0
  16. package/dist/chunks/util.23fe58fb.js +261 -0
  17. package/dist/components/afd-column/index.js +1 -1
  18. package/dist/components/affix/index.js +2 -2
  19. package/dist/components/base.css +1 -1
  20. package/dist/components/carousel/index.js +2 -2
  21. package/dist/components/chat/index.js +9 -9
  22. package/dist/components/column/index.js +25 -25
  23. package/dist/components/column-default/index.js +3 -2
  24. package/dist/components/column-dynamic/index.js +1 -1
  25. package/dist/components/column-menu/index.js +11 -11
  26. package/dist/components/column-slot/index.js +54 -53
  27. package/dist/components/config-custom/index.js +3 -3
  28. package/dist/components/config-event/index.js +5 -5
  29. package/dist/components/config-rate/index.js +1 -1
  30. package/dist/components/config-rate/style.css +1 -1
  31. package/dist/components/config-select/index.js +3 -3
  32. package/dist/components/config-switch/index.js +5 -5
  33. package/dist/components/config-switch/style.css +1 -1
  34. package/dist/components/config-table/index.js +3 -3
  35. package/dist/components/config-tree/index.js +3 -3
  36. package/dist/components/config-tree/style.css +1 -1
  37. package/dist/components/config-upload/index.js +1 -1
  38. package/dist/components/dialog-excel/index.js +37 -40
  39. package/dist/components/dialog-filter/index.js +19 -19
  40. package/dist/components/dialog-form/index.js +1 -1
  41. package/dist/components/element-dialog/index.js +2 -2
  42. package/dist/components/element-dialog/style.css +1 -1
  43. package/dist/components/flow/index.js +17 -18
  44. package/dist/components/flow-node/index.js +1 -1
  45. package/dist/components/form-temp/index.js +3 -3
  46. package/dist/components/fy-array/index.js +2 -2
  47. package/dist/components/fy-cascader/index.js +13 -13
  48. package/dist/components/fy-checkbox/index.js +4 -4
  49. package/dist/components/fy-code/index.js +1 -1
  50. package/dist/components/fy-curd/index.js +68 -69
  51. package/dist/components/fy-date/index.js +1 -1
  52. package/dist/components/fy-dialog-form/index.js +11 -11
  53. package/dist/components/fy-draggable/index.js +5 -7
  54. package/dist/components/fy-dynamic/index.js +32 -28
  55. package/dist/components/fy-empty/index.js +1 -1
  56. package/dist/components/fy-form/index.js +153 -141
  57. package/dist/components/fy-form-design/index.js +31 -31
  58. package/dist/components/fy-input/index.js +60 -46
  59. package/dist/components/fy-input-color/index.js +34 -29
  60. package/dist/components/fy-input-icon/index.js +1 -1
  61. package/dist/components/fy-input-map/index.js +14 -14
  62. package/dist/components/fy-input-number/index.js +1 -1
  63. package/dist/components/fy-input-table/index.js +2 -2
  64. package/dist/components/fy-input-tree/index.js +12 -12
  65. package/dist/components/fy-radio/index.js +1 -1
  66. package/dist/components/fy-rate/index.js +1 -1
  67. package/dist/components/fy-select/index.js +3 -3
  68. package/dist/components/fy-slider/index.js +2 -2
  69. package/dist/components/fy-switch/index.js +1 -1
  70. package/dist/components/fy-tabs/index.js +2 -2
  71. package/dist/components/fy-time/index.js +2 -2
  72. package/dist/components/fy-title/index.js +1 -1
  73. package/dist/components/fy-tree/index.js +3 -3
  74. package/dist/components/fy-u-editor/index.js +26 -24
  75. package/dist/components/fy-upload/index.js +146 -282
  76. package/dist/components/header-menu/index.js +2 -2
  77. package/dist/components/header-search/index.js +16 -15
  78. package/dist/components/image-cropper/index.js +299 -0
  79. package/dist/components/image-cropper/style.css +1 -0
  80. package/dist/components/image-preview/index.js +346 -0
  81. package/dist/components/image-preview/style.css +1 -0
  82. package/dist/components/keyboard/index.js +58 -63
  83. package/dist/components/license/index.js +7 -7
  84. package/dist/components/login/index.js +37 -32
  85. package/dist/components/name-avatar/index.js +1 -1
  86. package/dist/components/pageable-table/index.js +1 -1
  87. package/dist/components/pageable-view/index.js +26 -26
  88. package/dist/components/photo-swipe/index.js +71 -166
  89. package/dist/components/queue/index.js +6 -6
  90. package/dist/components/record-video/index.js +18 -18
  91. package/dist/components/search/index.js +3 -3
  92. package/dist/components/sign/index.js +64 -59
  93. package/dist/components/skeleton/index.js +1 -1
  94. package/dist/components/table-page/index.js +5 -5
  95. package/dist/components/text-ellipsis/index.js +11 -10
  96. package/dist/components/verify/index.js +25 -25
  97. package/dist/components/widget-config/index.js +8 -8
  98. package/dist/components/widget-form/index.js +7 -7
  99. package/dist/components/widget-form-group/index.js +8 -8
  100. package/dist/components/widget-form-item/index.js +14 -13
  101. package/dist/components/widget-form-table/index.js +14 -14
  102. package/dist/index.css +109 -40
  103. package/dist/index.es.js +4048 -3732
  104. package/package.json +5 -56
  105. package/web-types.json +28 -10
  106. package/dist/chunks/detail.ac4d421a.js +0 -28
  107. package/dist/chunks/dic.79d9f595.js +0 -133
  108. package/dist/chunks/slot.1b8d2b1b.js +0 -27
  109. package/dist/chunks/util.80e28481.js +0 -250
  110. package/dist/components/photo-swipe/style.css +0 -1
@@ -1,9 +1,9 @@
1
- import { s as a, l as n, a as h, b as r } from "./dic.79d9f595.js";
2
- import { d, k as l } from "./util.80e28481.js";
3
- import { s as c } from "./slot.1b8d2b1b.js";
1
+ import { s as a, l as n, a as h, b as r } from "./dic.70feb9b4.js";
2
+ import { d, k as c } from "./util.23fe58fb.js";
3
+ import { s as l } from "./slot.4b391395.js";
4
4
  import { isBlank as s } from "@web-utils/core";
5
5
  const f = {
6
- mixins: [c],
6
+ mixins: [l],
7
7
  props: {
8
8
  defaults: {
9
9
  type: Object,
@@ -32,7 +32,7 @@ const f = {
32
32
  },
33
33
  propOption: {
34
34
  handler(t) {
35
- let i = {};
35
+ const i = {};
36
36
  t.forEach((e) => {
37
37
  i[e.prop] = e;
38
38
  }), this.$set(this, "objectOption", i);
@@ -65,10 +65,10 @@ const f = {
65
65
  });
66
66
  },
67
67
  rowKey() {
68
- return this.tableOption.rowKey || l.rowKey;
68
+ return this.tableOption.rowKey || c.rowKey;
69
69
  },
70
70
  formRules() {
71
- let t = {};
71
+ const t = {};
72
72
  return this.propOption.forEach((i) => {
73
73
  i.rules && i.display !== !1 && (t[i.prop] = i.rules);
74
74
  }), t;
@@ -91,7 +91,7 @@ const f = {
91
91
  this.isMobile = document.body.clientWidth <= 768;
92
92
  },
93
93
  updateDic(t, i) {
94
- let e = this.findObject(this.propOption, t);
94
+ const e = this.findObject(this.propOption, t);
95
95
  s(i) && s(t) ? this.handleLoadDic() : s(i) && !s(e.dicUrl) ? a({
96
96
  column: e
97
97
  }).then((o) => {
@@ -103,7 +103,7 @@ const f = {
103
103
  this.$set(t, e, i[e]);
104
104
  });
105
105
  },
106
- //本地字典
106
+ // 本地字典
107
107
  handleLocalDic() {
108
108
  this.handleSetDic(this.DIC, n(this.resultOption));
109
109
  },
@@ -111,7 +111,7 @@ const f = {
111
111
  handleLoadDic() {
112
112
  h(this.resultOption).then((t) => this.handleSetDic(this.DIC, t));
113
113
  },
114
- //级联字典加载
114
+ // 级联字典加载
115
115
  handleLoadCascaderDic() {
116
116
  r(this.propOption, this.data).then((t) => this.handleSetDic(this.cascaderDIC, t));
117
117
  }
@@ -1,6 +1,8 @@
1
- import * as h from "monaco-editor/esm/vs/editor/editor.api";
1
+ import * as f from "monaco-editor/esm/vs/editor/editor.api";
2
2
  import "monaco-editor/esm/vs/basic-languages/javascript/javascript.contribution";
3
- let y = /[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, j = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/, u, g, O = {
3
+ const y = /[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, v = /^[a-zA-Z_$][0-9a-zA-Z_$]*$/;
4
+ let a, g;
5
+ const j = {
4
6
  // table of character substitutions
5
7
  "\b": "\\b",
6
8
  " ": "\\t",
@@ -10,123 +12,128 @@ let y = /[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200
10
12
  '"': '\\"',
11
13
  "'": "\\'",
12
14
  "\\": "\\\\"
13
- }, c;
14
- function b(t, e = {}) {
15
- var i = e.space || 2, n = e.dropQuotesOnKeys != !1, r = e.dropQuotesOnNumbers || !1, s = e.inlineShortArrays || !1, a = e.inlineShortArraysDepth || 1, f = e.quoteType || "single", d = e.minify || !1;
16
- r && x(t);
17
- var l = $(t, null, d ? void 0 : i, n, f);
15
+ };
16
+ let c;
17
+ function M(t, e = {}) {
18
+ const i = e.space || 2, n = e.dropQuotesOnKeys != !1, o = e.dropQuotesOnNumbers || !1, s = e.inlineShortArrays || !1, u = e.inlineShortArraysDepth || 1, h = e.quoteType || "single", d = e.minify || !1;
19
+ o && x(t);
20
+ let l = O(t, null, d ? void 0 : i, n, h);
18
21
  if (s && !d) {
19
- var o = S(l);
20
- if (a > 1)
21
- for (var v = 1; v < a && (l = o, o = S(l), o != l); v++)
22
+ let r = _(l);
23
+ if (u > 1)
24
+ for (let b = 1; b < u && (l = r, r = _(l), r != l); b++)
22
25
  ;
23
- l = o;
26
+ l = r;
24
27
  }
25
28
  return l;
26
29
  }
27
30
  function x(t) {
28
- if (M(t)) {
29
- var e = Object.keys(t);
30
- e && e.forEach(function(i) {
31
- var n = t[i];
32
- if (typeof n == "string") {
33
- var r = n - 0;
34
- t[i] = isNaN(r) ? n : r;
35
- } else
36
- (M(n) || Array.isArray(n)) && x(n);
37
- });
38
- }
31
+ if (!S(t))
32
+ return;
33
+ const e = Object.keys(t);
34
+ e && e.forEach(function(i) {
35
+ const n = t[i];
36
+ if (typeof n == "string") {
37
+ const o = n - 0;
38
+ t[i] = isNaN(o) ? n : o;
39
+ } else
40
+ (S(n) || Array.isArray(n)) && x(n);
41
+ });
39
42
  }
40
- function M(t) {
43
+ function S(t) {
41
44
  return t && typeof t == "object";
42
45
  }
43
- function S(t, e) {
46
+ function _(t, e) {
44
47
  if (e || (e = 80), typeof e != "number" || e < 20)
45
- throw "Invalid width '" + e + "'. Expecting number equal or larger than 20.";
46
- for (var i = t.split(`
47
- `), n = 0, r = null, s = []; n < i.length; ) {
48
- var a = !!i[n].match(/\[/), f = !!i[n].match(/\],?/);
49
- if (a && !f)
50
- s = [i[n]], r = n;
51
- else if (f && !a && r) {
48
+ throw `Invalid width '${e}'. Expecting number equal or larger than 20.`;
49
+ const i = t.split(`
50
+ `);
51
+ let n = 0, o = null, s = [];
52
+ for (; n < i.length; ) {
53
+ const u = !!i[n].match(/\[/), h = !!i[n].match(/\],?/);
54
+ if (u && !h)
55
+ s = [i[n]], o = n;
56
+ else if (h && !u && o) {
52
57
  s.push((i[n] || "").trim());
53
- var d = s.join(" ");
54
- d.length < e && (i.splice(r, n - r + 1, d), n = r), r = null, s = [];
58
+ const d = s.join(" ");
59
+ d.length < e && (i.splice(o, n - o + 1, d), n = o), o = null, s = [];
55
60
  } else
56
- r && s.push((i[n] || "").trim());
61
+ o && s.push((i[n] || "").trim());
57
62
  n += 1;
58
63
  }
59
64
  return i.join(`
60
65
  `);
61
66
  }
62
- function $(t, e, i, n, r) {
63
- var s;
64
- if (u = "", g = "", typeof i == "number")
67
+ function O(t, e, i, n, o) {
68
+ let s;
69
+ if (a = "", g = "", typeof i == "number")
65
70
  for (s = 0; s < i; s += 1)
66
71
  g += " ";
67
72
  else
68
73
  typeof i == "string" && (g = i);
69
74
  if (c = e, e && typeof e != "function" && (typeof e != "object" || typeof e.length != "number"))
70
75
  throw new Error("JSON.stringify");
71
- return m("", { "": t }, n, r);
76
+ return m("", { "": t }, n, o);
72
77
  }
73
78
  function m(t, e, i, n) {
74
- var r, s, a, f, d = u, l, o = e[t];
75
- switch (o && typeof o == "object" && typeof o.toJSON == "function" && (o = o.toJSON(t)), typeof c == "function" && (o = c.call(e, t, o)), typeof o) {
79
+ let o, s, u, h;
80
+ const d = a;
81
+ let l, r = e[t];
82
+ switch (r && typeof r == "object" && typeof r.toJSON == "function" && (r = r.toJSON(t)), typeof c == "function" && (r = c.call(e, t, r)), typeof r) {
76
83
  case "function":
77
- return o;
84
+ return r;
78
85
  case "string":
79
- return p(o, n);
86
+ return p(r, n);
80
87
  case "number":
81
- return isFinite(o) ? String(o) : "null";
88
+ return isFinite(r) ? String(r) : "null";
82
89
  case "boolean":
83
90
  case "null":
84
- return String(o);
91
+ return String(r);
85
92
  case "object":
86
- if (!o)
93
+ if (!r)
87
94
  return "null";
88
- if (u += g, l = [], Object.prototype.toString.apply(o) === "[object Array]") {
89
- for (f = o.length, r = 0; r < f; r += 1)
90
- l[r] = m(r, o, i, n) || "null";
91
- return a = l.length === 0 ? "[]" : u ? `[
92
- ` + u + l.join(`,
93
- ` + u) + `
94
- ` + d + "]" : "[" + l.join(",") + "]", u = d, a;
95
+ if (a += g, l = [], Object.prototype.toString.apply(r) === "[object Array]") {
96
+ for (h = r.length, o = 0; o < h; o += 1)
97
+ l[o] = m(o, r, i, n) || "null";
98
+ return u = l.length === 0 ? "[]" : a ? `[
99
+ ${a}${l.join(`,
100
+ ${a}`)}
101
+ ${d}]` : `[${l.join(",")}]`, a = d, u;
95
102
  }
96
103
  if (c && typeof c == "object")
97
- for (f = c.length, r = 0; r < f; r += 1)
98
- typeof c[r] == "string" && (s = c[r], a = m(s, o, i, n), a && l.push((i ? _(s, n) : p(s, n)) + (u ? ": " : ":") + a));
104
+ for (h = c.length, o = 0; o < h; o += 1)
105
+ typeof c[o] == "string" && (s = c[o], u = m(s, r, i, n), u && l.push((i ? $(s, n) : p(s, n)) + (a ? ": " : ":") + u));
99
106
  else
100
- for (s in o)
101
- Object.prototype.hasOwnProperty.call(o, s) && (a = m(s, o, i, n), a && l.push((i ? _(s, n) : p(s, n)) + (u ? ": " : ":") + a));
102
- return a = l.length === 0 ? "{}" : u ? `{
103
- ` + u + l.join(`,
104
- ` + u) + `
105
- ` + d + "}" : "{" + l.join(",") + "}", u = d, a;
107
+ for (s in r)
108
+ Object.prototype.hasOwnProperty.call(r, s) && (u = m(s, r, i, n), u && l.push((i ? $(s, n) : p(s, n)) + (a ? ": " : ":") + u));
109
+ return u = l.length === 0 ? "{}" : a ? `{
110
+ ${a}${l.join(`,
111
+ ${a}`)}
112
+ ${d}}` : `{${l.join(",")}}`, a = d, u;
106
113
  }
107
114
  }
108
115
  function p(t, e) {
109
116
  y.lastIndex = 0;
110
- var i = '"';
117
+ let i = '"';
111
118
  return e === "single" && (i = "'"), y.test(t) ? i + t.replace(y, function(n) {
112
- var r = O[n];
113
- return typeof r == "string" ? r : "\\u" + ("0000" + n.charCodeAt(0).toString(16)).slice(-4);
119
+ const o = j[n];
120
+ return typeof o == "string" ? o : `\\u${`0000${n.charCodeAt(0).toString(16)}`.slice(-4)}`;
114
121
  }) + i : i + t + i;
115
122
  }
116
- function _(t, e) {
117
- return j.test(t) ? t : p(t, e);
123
+ function $(t, e) {
124
+ return v.test(t) ? t : p(t, e);
118
125
  }
119
126
  function E() {
120
127
  }
121
- const w = {
128
+ const A = {
122
129
  name: "MonacoEditor",
123
130
  props: {
124
131
  diffEditor: { type: Boolean, default: !1 },
125
- //是否使用diff模式
132
+ // 是否使用diff模式
126
133
  width: { type: [String, Number], default: "100%" },
127
134
  height: { type: [String, Number], default: "100%" },
128
135
  original: String,
129
- //只有在diff模式下有效
136
+ // 只有在diff模式下有效
130
137
  value: [String, Object],
131
138
  language: { type: String, default: "javascript" },
132
139
  theme: { type: String, default: "vs" },
@@ -150,18 +157,18 @@ const w = {
150
157
  },
151
158
  keyIndex() {
152
159
  let t = this.value;
153
- typeof t == "object" && (t = b(t)), this.editor && t !== this._getValue() && this._setValue(t);
160
+ typeof t == "object" && (t = M(t)), this.editor && t !== this._getValue() && this._setValue(t);
154
161
  },
155
162
  language() {
156
163
  if (this.editor)
157
164
  if (this.diffEditor) {
158
165
  const { original: t, modified: e } = this.editor.getModel();
159
- h.editor.setModelLanguage(t, this.language), h.editor.setModelLanguage(e, this.language);
166
+ f.editor.setModelLanguage(t, this.language), f.editor.setModelLanguage(e, this.language);
160
167
  } else
161
- h.editor.setModelLanguage(this.editor.getModel(), this.language);
168
+ f.editor.setModelLanguage(this.editor.getModel(), this.language);
162
169
  },
163
170
  theme() {
164
- this.editor && h.editor.setTheme(this.theme);
171
+ this.editor && f.editor.setTheme(this.theme);
165
172
  },
166
173
  style() {
167
174
  this.editor && this.$nextTick(() => {
@@ -207,13 +214,13 @@ const w = {
207
214
  },
208
215
  methods: {
209
216
  initMonaco() {
210
- const { value: t, language: e, theme: i, readOnly: n, options: r } = this;
211
- Object.assign(r, this._editorBeforeMount()), this.editor = h.editor[this.diffEditor ? "createDiffEditor" : "create"](this.$el, {
212
- value: typeof t == "string" ? t : b(t),
217
+ const { value: t, language: e, theme: i, readOnly: n, options: o } = this;
218
+ Object.assign(o, this._editorBeforeMount()), this.editor = f.editor[this.diffEditor ? "createDiffEditor" : "create"](this.$el, {
219
+ value: typeof t == "string" ? t : M(t),
213
220
  language: e,
214
221
  theme: i,
215
222
  readOnly: n,
216
- ...r
223
+ ...o
217
224
  }), this.diffEditor && this._setModel(this.value, this.original), this._editorMounted(this.editor);
218
225
  },
219
226
  _handleFullScreen() {
@@ -222,7 +229,7 @@ const w = {
222
229
  // 放大
223
230
  maxEditor() {
224
231
  this.isMaximum = !0;
225
- let t = this.$el;
232
+ const t = this.$el;
226
233
  this.originSize = {
227
234
  width: t.clientWidth,
228
235
  height: t.clientHeight
@@ -245,26 +252,26 @@ const w = {
245
252
  return this.editor ? this.diffEditor ? this.editor.modifiedEditor : this.editor : null;
246
253
  },
247
254
  _setModel(t, e) {
248
- const { language: i } = this, n = h.editor.createModel(e, i), r = h.editor.createModel(t, i);
255
+ const { language: i } = this, n = f.editor.createModel(e, i), o = f.editor.createModel(t, i);
249
256
  this.editor.setModel({
250
257
  original: n,
251
- modified: r
258
+ modified: o
252
259
  });
253
260
  },
254
261
  _setValue(t) {
255
- let e = this._getEditor();
262
+ const e = this._getEditor();
256
263
  if (e)
257
264
  return e.setValue(t);
258
265
  },
259
266
  _getValue() {
260
- let t = this._getEditor();
267
+ const t = this._getEditor();
261
268
  return t ? t.getValue() : "";
262
269
  },
263
270
  _editorBeforeMount() {
264
- return this.editorBeforeMount(h) || {};
271
+ return this.editorBeforeMount(f) || {};
265
272
  },
266
273
  _editorMounted(t) {
267
- this.editorMounted(t, h), this.diffEditor ? t.onDidUpdateDiff((e) => {
274
+ this.editorMounted(t, f), this.diffEditor ? t.onDidUpdateDiff((e) => {
268
275
  const i = this._getValue();
269
276
  this._emitChange(i, e);
270
277
  }) : t.onDidChangeModelContent((e) => {
@@ -278,6 +285,6 @@ const w = {
278
285
  }
279
286
  };
280
287
  export {
281
- w as M,
282
- b as c
288
+ A as M,
289
+ M as c
283
290
  };
@@ -50,7 +50,7 @@ const a = {
50
50
  }, o = (() => ({
51
51
  logs: function(s) {
52
52
  const t = a[s], i = l(s);
53
- i.warning(t.title), i.warning("CDN:" + (t.url || "-")), i.warning("GITHUB:" + (t.github || "-"));
53
+ i.warning(t.title), i.warning(`CDN:${t.url || "-"}`), i.warning(`GITHUB:${t.github || "-"}`);
54
54
  }
55
55
  }))();
56
56
  export {
@@ -0,0 +1,27 @@
1
+ const a = {
2
+ methods: {
3
+ getSlotName(s = {}, n = "D", e) {
4
+ const r = {
5
+ F: "Form",
6
+ H: "Header",
7
+ E: "Error",
8
+ L: "Label",
9
+ S: "Search",
10
+ T: "Type",
11
+ D: ""
12
+ }, t = s.prop + r[n];
13
+ return e ? e[t] : t;
14
+ },
15
+ getSlotList(s = [], n, e) {
16
+ return e = e.map((r) => r.prop), Object.keys(n).filter((r) => {
17
+ let t = !1;
18
+ return e.includes(r) || s.forEach((o) => {
19
+ r.includes(o) && (t = !0);
20
+ }), t;
21
+ });
22
+ }
23
+ }
24
+ };
25
+ export {
26
+ a as s
27
+ };
@@ -0,0 +1,261 @@
1
+ import { isBlank, getObjType } from "@web-utils/core";
2
+ const KEY_COMPONENT_NAME = "fy-", DIC_PROPS = {
3
+ rowKey: "id",
4
+ rowParentKey: "parentId",
5
+ nodeKey: "id",
6
+ label: "label",
7
+ value: "value",
8
+ desc: "desc",
9
+ groups: "groups",
10
+ title: "title",
11
+ leaf: "leaf",
12
+ children: "children",
13
+ hasChildren: "hasChildren",
14
+ labelText: "名称",
15
+ disabled: "disabled"
16
+ }, DIC_HTTP_PROPS = {
17
+ name: "name",
18
+ url: "url",
19
+ fileName: "file",
20
+ res: ""
21
+ }, DATE_LIST = [
22
+ "dates",
23
+ "date",
24
+ "datetime",
25
+ "datetimerange",
26
+ "daterange",
27
+ "time",
28
+ "timerange",
29
+ "week",
30
+ "month",
31
+ "monthrange",
32
+ "year"
33
+ ], INPUT_LIST = ["tree", "number", "icon", "color", "table", "map"], ARRAY_LIST = ["img", "array", "url"], MULTIPLE_LIST = ["cascader", "tree", "select"], RANGE_LIST = ["slider"], ARRAY_VALUE_LIST = ARRAY_LIST.concat(["upload", "dynamic", "map", "checkbox", "cascader", "dynamic", "timerange", "monthrange", "daterange", "datetimerange", "dates"]), SELECT_LIST = DATE_LIST.concat(["select", "checkbox", "radio", "cascader", "tree", "color", "icon", "table", "map"]), DIC_SHOW_SPLIT = " | ", DIC_SPLIT = ",", typeList = {
34
+ img: /\.(gif|jpg|jpeg|png|webp|svg|GIF|JPG|JPEG|PNG|WEBP|SVG)/,
35
+ video: /\.(swf|avi|flv|mpg|rm|mov|wav|asf|3gp|mkv|rmvb|ogg|mp4)/,
36
+ audio: /\.(mp3|wav|MP3|WAV)/
37
+ }, isMediaType = (e, n) => {
38
+ if (!isBlank(e))
39
+ return typeList.audio.test(e) || n === "audio" ? "audio" : typeList.video.test(e) || n === "video" ? "video" : typeList.img.test(e) || n === "img" ? "img" : !1;
40
+ };
41
+ function getFixed(e = 0, n = 2) {
42
+ return Number(e.toFixed(n));
43
+ }
44
+ function getAsVal(e, n = "") {
45
+ let r = deepClone(e);
46
+ return isBlank(n) || n.split(".").forEach((t) => {
47
+ r = isBlank(r[t]) ? "" : r[t];
48
+ }), r;
49
+ }
50
+ function setAsVal(obj, bind = "", value) {
51
+ let result;
52
+ const type = getObjType(value);
53
+ return isBlank(value) ? type === "array" ? result = `obj.${bind}=[]` : type === "object" ? result = `obj.${bind}={}` : ["number", "boolean"].includes(type) ? result = `obj.${bind}=undefined` : result = `obj.${bind}=''` : type === "string" ? result = `obj.${bind}='${value}'` : result = `obj.${bind}=${value}`, eval(result), obj;
54
+ }
55
+ function downFile(e, n) {
56
+ typeof e == "object" && e instanceof Blob && (e = URL.createObjectURL(e));
57
+ const r = document.createElement("a");
58
+ r.href = e, r.download = n || "";
59
+ let t;
60
+ window.MouseEvent ? t = new MouseEvent("click") : (t = document.createEvent("MouseEvents"), t.initMouseEvent(
61
+ "click",
62
+ !0,
63
+ !1,
64
+ window,
65
+ 0,
66
+ 0,
67
+ 0,
68
+ 0,
69
+ 0,
70
+ !1,
71
+ !1,
72
+ !1,
73
+ !1,
74
+ 0,
75
+ null
76
+ )), r.dispatchEvent(t);
77
+ }
78
+ function strCorNum(e) {
79
+ return e.forEach((n, r) => {
80
+ e[r] = Number(n);
81
+ }), e;
82
+ }
83
+ function extend() {
84
+ let e = arguments[0] || {}, n = !1;
85
+ const r = Array.prototype.slice.call(arguments);
86
+ let t = 1, s, o, a, i, l = !1;
87
+ for (typeof e == "boolean" && (n = e, t++, e = arguments[1]); t < r.length; t++)
88
+ if ((s = r[t]) != null)
89
+ for (a in s)
90
+ i = s[a], o = e[a], n && (toString.call(i) === "[object Object]" || (l = toString.call(i) === "[object Array]")) ? (l ? o = toString.call(o) === "[object Array]" ? o : [] : o = toString.call(o) === "[object Object]" ? o : {}, e[a] = extend(n, o, i)) : i !== void 0 && i !== o && (e[a] = i);
91
+ return e;
92
+ }
93
+ function createObj(e, n) {
94
+ const r = n.split("."), t = r.splice(0, 1)[0], s = {};
95
+ if (s[t] = {}, r.length >= 2) {
96
+ const o = "{", a = "}";
97
+ let i = "";
98
+ r.forEach((l) => {
99
+ i = `${i}${o}"${l}":`;
100
+ }), i = `${i}""`;
101
+ for (let l = 0; l < r.length; l++)
102
+ i = `${i}${a}`;
103
+ i = JSON.parse(i), s[t] = i;
104
+ }
105
+ return e = extend(!0, e, s), e;
106
+ }
107
+ function dataURLtoFile(e, n) {
108
+ const r = e.split(","), t = r[0].match(/:(.*?);/)[1], s = atob(r[1]);
109
+ let o = s.length;
110
+ const a = new Uint8Array(o);
111
+ for (; o--; )
112
+ a[o] = s.charCodeAt(o);
113
+ return new File([a], n, {
114
+ type: t
115
+ });
116
+ }
117
+ function findObject(e, n, r = "prop") {
118
+ let t = -1;
119
+ const s = (() => {
120
+ let o;
121
+ return e.forEach((a) => {
122
+ a.column ? o = "group" : a.children && (o = "tree");
123
+ }), o;
124
+ })();
125
+ return s === "group" ? e.forEach((o) => {
126
+ const a = findArray(o.column, n, r, !0);
127
+ a !== -1 && (t = a);
128
+ }) : s === "tree" ? t = findLabelNode(e, n, { value: r }, !0) : t = findArray(e, n, r, !0), t;
129
+ }
130
+ function randomId() {
131
+ const e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", n = e.length;
132
+ let r = "";
133
+ for (let t = 0; t < 16; t++)
134
+ r += e.charAt(Math.floor(Math.random() * n));
135
+ return r;
136
+ }
137
+ const deepClone = (e) => {
138
+ const n = getObjType(e);
139
+ let r;
140
+ if (n === "array")
141
+ r = [];
142
+ else if (n === "object")
143
+ r = {};
144
+ else
145
+ return e;
146
+ if (n === "array")
147
+ for (var t = 0, s = e.length; t < s; t++)
148
+ e[t] = (() => (e[t] === 0, e[t]))(), e[t] && delete e[t].$parent, r.push(deepClone(e[t]));
149
+ else if (n === "object")
150
+ for (const o in e)
151
+ e && delete e.$parent, r[o] = deepClone(e[o]);
152
+ return r;
153
+ }, setPx = (e, n = "") => (e || (e = n), e ? (e = `${e}`, e.indexOf("%") === -1 && e.indexOf("px") === -1 && (e = `${e}px`), e) : ""), detailDataType = (e, n) => isBlank(e) ? e : n === "number" ? Number(e) : n === "string" ? `${e}` : e, detailDic = (e = [], n = {}, r) => {
154
+ const t = n.value || DIC_PROPS.value, s = n.children || DIC_PROPS.children;
155
+ return e.forEach((o) => {
156
+ o[t] = detailDataType(o[t], r), o[s] && detailDic(o[s], n, r);
157
+ }), e;
158
+ }, findByValue = (e, n, r) => {
159
+ if (isBlank(e))
160
+ return n;
161
+ const t = n instanceof Array, s = t ? n : [n];
162
+ r = r || DIC_PROPS;
163
+ const o = [];
164
+ for (let a = 0; a < s.length; a++)
165
+ o.push(findLabelNode(e, s[a], r) || s[a]);
166
+ return t ? o.join(DIC_SHOW_SPLIT) : o.join();
167
+ }, filterParams = (e, n = ["", "$"], r = !0) => {
168
+ const t = r ? deepClone(e) : e;
169
+ for (const s in t)
170
+ n.includes("") && isBlank(t[s]) && delete t[s], n.includes("$") && s.indexOf("$") !== -1 && delete t[s];
171
+ return t;
172
+ }, detailDicGroup = (e = [], n = {}) => {
173
+ let r = deepClone(e);
174
+ const t = n[DIC_PROPS.groups] || DIC_PROPS.groups;
175
+ return e.forEach((s) => {
176
+ s[t] && (r = r.concat(s[t]));
177
+ }), r;
178
+ }, findLabelNode = (e, n, r, t) => {
179
+ let s;
180
+ t || (e = detailDicGroup(e, r));
181
+ const o = (a) => {
182
+ const i = r.label || DIC_PROPS.label, l = r.value || DIC_PROPS.value, u = r.children || DIC_PROPS.children;
183
+ for (let f = 0; f < a.length; f++) {
184
+ const c = a[f], d = c[u] || [];
185
+ c[l] === n ? s = t ? c : c[i] : o(d);
186
+ }
187
+ };
188
+ return o(e), s;
189
+ }, getDeepData = (e) => (Array.isArray(e) ? e : e.data) || [], getObjValue = (e, n = "", r) => {
190
+ const t = n.split(".");
191
+ let s = e;
192
+ return t[0] === "" && r !== "object" ? getDeepData(e) : (t[0] !== "" && t.forEach((o) => {
193
+ s = s[o];
194
+ }), s);
195
+ }, findArray = (e, n, r, t) => {
196
+ r = r || DIC_PROPS.value;
197
+ for (let s = 0; s < e.length; s++)
198
+ if (e[s][r] === n)
199
+ return t ? e[s] : s;
200
+ return -1;
201
+ }, getPasswordChar = (e = "", n) => {
202
+ const r = e.toString().length;
203
+ e = "";
204
+ for (let t = 0; t < r; t++)
205
+ e = e + n;
206
+ return e;
207
+ }, arraySort = (e = [], n, r) => e.filter((t) => !isBlank(t[n])).sort((t, s) => r(t, s)).concat(e.filter((t) => isBlank(t[n]))), clearVal = (e, n, r = []) => e ? (n.forEach((t) => {
208
+ if (!r.includes(t)) {
209
+ if (t.includes("$"))
210
+ delete e[t];
211
+ else if (!isBlank(e[t])) {
212
+ const s = getObjType(e[t]);
213
+ s === "array" ? e[t] = [] : s === "object" ? e[t] = {} : ["number", "boolean"].includes(s) ? e[t] = void 0 : e[t] = "";
214
+ }
215
+ }
216
+ }), e) : {}, optVal = (e, n) => typeof e == "boolean" ? e : isBlank(e) ? n : e;
217
+ function uploadFun(e = {}, n) {
218
+ n = n || this;
219
+ const r = ["uploadPreview", "uploadBefore", "uploadAfter", "uploadDelete", "uploadError", "uploadExceed"], t = {};
220
+ return e.type === "upload" ? r.forEach((s) => {
221
+ e[s] || (t[s] = n[s]);
222
+ }) : r.forEach((s) => {
223
+ t[s] = n[s];
224
+ }), t;
225
+ }
226
+ export {
227
+ ARRAY_VALUE_LIST as A,
228
+ arraySort as B,
229
+ DIC_SPLIT as D,
230
+ INPUT_LIST as I,
231
+ KEY_COMPONENT_NAME as K,
232
+ MULTIPLE_LIST as M,
233
+ RANGE_LIST as R,
234
+ SELECT_LIST as S,
235
+ detailDataType as a,
236
+ ARRAY_LIST as b,
237
+ createObj as c,
238
+ deepClone as d,
239
+ DATE_LIST as e,
240
+ findObject as f,
241
+ getFixed as g,
242
+ setAsVal as h,
243
+ getAsVal as i,
244
+ filterParams as j,
245
+ DIC_PROPS as k,
246
+ clearVal as l,
247
+ strCorNum as m,
248
+ DIC_SHOW_SPLIT as n,
249
+ optVal as o,
250
+ getPasswordChar as p,
251
+ findByValue as q,
252
+ randomId as r,
253
+ setPx as s,
254
+ detailDic as t,
255
+ uploadFun as u,
256
+ getObjValue as v,
257
+ dataURLtoFile as w,
258
+ isMediaType as x,
259
+ downFile as y,
260
+ DIC_HTTP_PROPS as z
261
+ };
@@ -1,5 +1,5 @@
1
1
  import { s as n, r as o, f as i } from "../../chunks/AfdColumn.vue_vue_type_template_lang.768f2ed2.js";
2
- import { d as l } from "../../chunks/util.80e28481.js";
2
+ import { d as l } from "../../chunks/util.23fe58fb.js";
3
3
  import { n as r } from "../../chunks/vueComponentNormalizer.71e2aa87.js";
4
4
  const a = {
5
5
  name: "AfdColumn",