@farris/ui-vue 1.3.4 → 1.3.6

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 (145) hide show
  1. package/components/accordion/index.esm.js +16 -16
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +65 -65
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.esm.js +13 -13
  6. package/components/button-edit/index.umd.cjs +1 -1
  7. package/components/calendar/index.esm.js +504 -490
  8. package/components/calendar/index.umd.cjs +1 -1
  9. package/components/capsule/index.esm.js +247 -233
  10. package/components/capsule/index.umd.cjs +1 -1
  11. package/components/checkbox/index.esm.js +356 -344
  12. package/components/checkbox/index.umd.cjs +1 -1
  13. package/components/color-picker/index.esm.js +159 -145
  14. package/components/color-picker/index.umd.cjs +2 -2
  15. package/components/combo-list/index.esm.js +127 -128
  16. package/components/combo-list/index.umd.cjs +1 -1
  17. package/components/combo-tree/index.esm.js +15 -15
  18. package/components/combo-tree/index.umd.cjs +1 -1
  19. package/components/component/index.esm.js +101 -87
  20. package/components/component/index.umd.cjs +1 -1
  21. package/components/condition/index.esm.js +9 -7
  22. package/components/condition/index.umd.cjs +1 -1
  23. package/components/content-container/index.esm.js +181 -167
  24. package/components/content-container/index.umd.cjs +1 -1
  25. package/components/data-grid/index.esm.js +746 -730
  26. package/components/data-grid/index.umd.cjs +1 -1
  27. package/components/data-view/index.esm.js +9 -7
  28. package/components/data-view/index.umd.cjs +1 -1
  29. package/components/date-picker/index.esm.js +789 -777
  30. package/components/date-picker/index.umd.cjs +1 -1
  31. package/components/designer-canvas/index.esm.js +3096 -3069
  32. package/components/designer-canvas/index.umd.cjs +1 -1
  33. package/components/dropdown/index.esm.js +257 -243
  34. package/components/dropdown/index.umd.cjs +2 -2
  35. package/components/dynamic-form/index.esm.js +322 -306
  36. package/components/dynamic-form/index.umd.cjs +1 -1
  37. package/components/dynamic-resolver/index.esm.js +177 -163
  38. package/components/dynamic-resolver/index.umd.cjs +1 -1
  39. package/components/event-parameter/index.esm.js +78 -82
  40. package/components/event-parameter/index.umd.cjs +1 -1
  41. package/components/events-editor/index.esm.js +501 -487
  42. package/components/events-editor/index.umd.cjs +1 -1
  43. package/components/expression-editor/index.esm.js +37 -37
  44. package/components/expression-editor/index.umd.cjs +1 -1
  45. package/components/external-container/index.esm.js +487 -472
  46. package/components/external-container/index.umd.cjs +1 -1
  47. package/components/field-selector/index.esm.js +440 -433
  48. package/components/field-selector/index.umd.cjs +1 -1
  49. package/components/filter-bar/index.esm.js +594 -587
  50. package/components/filter-bar/index.umd.cjs +1 -1
  51. package/components/flow-canvas/index.esm.js +2766 -2739
  52. package/components/flow-canvas/index.umd.cjs +1 -1
  53. package/components/image-cropper/index.esm.js +402 -388
  54. package/components/image-cropper/index.umd.cjs +1 -1
  55. package/components/input-group/index.esm.js +201 -202
  56. package/components/input-group/index.umd.cjs +1 -1
  57. package/components/layout/index.esm.js +264 -245
  58. package/components/layout/index.umd.cjs +1 -1
  59. package/components/list-nav/index.esm.js +157 -143
  60. package/components/list-nav/index.umd.cjs +1 -1
  61. package/components/list-view/index.esm.js +314 -298
  62. package/components/list-view/index.umd.cjs +1 -1
  63. package/components/lookup/index.esm.js +862 -843
  64. package/components/lookup/index.umd.cjs +1 -1
  65. package/components/mapping-editor/index.esm.js +1031 -1015
  66. package/components/mapping-editor/index.umd.cjs +1 -1
  67. package/components/nav/index.esm.js +169 -155
  68. package/components/nav/index.umd.cjs +2 -2
  69. package/components/number-range/index.esm.js +150 -137
  70. package/components/number-range/index.umd.cjs +1 -1
  71. package/components/number-spinner/index.esm.js +207 -194
  72. package/components/number-spinner/index.umd.cjs +1 -1
  73. package/components/order/index.esm.js +427 -414
  74. package/components/order/index.umd.cjs +1 -1
  75. package/components/page-footer/index.esm.js +22 -22
  76. package/components/page-footer/index.umd.cjs +1 -1
  77. package/components/page-header/index.esm.js +510 -492
  78. package/components/page-header/index.umd.cjs +1 -1
  79. package/components/pagination/index.esm.js +192 -178
  80. package/components/pagination/index.umd.cjs +1 -1
  81. package/components/progress/index.esm.js +234 -220
  82. package/components/progress/index.umd.cjs +3 -3
  83. package/components/property-editor/index.esm.js +288 -277
  84. package/components/property-editor/index.umd.cjs +2 -2
  85. package/components/property-panel/index.esm.js +62 -61
  86. package/components/property-panel/index.umd.cjs +1 -1
  87. package/components/query-solution/index.esm.js +776 -770
  88. package/components/query-solution/index.umd.cjs +6 -6
  89. package/components/radio-button/index.esm.js +64 -64
  90. package/components/radio-button/index.umd.cjs +1 -1
  91. package/components/radio-group/index.esm.js +296 -283
  92. package/components/radio-group/index.umd.cjs +1 -1
  93. package/components/rate/index.esm.js +222 -208
  94. package/components/rate/index.umd.cjs +1 -1
  95. package/components/response-layout/index.esm.js +187 -173
  96. package/components/response-layout/index.umd.cjs +1 -1
  97. package/components/response-layout-editor/index.esm.js +554 -542
  98. package/components/response-layout-editor/index.umd.cjs +1 -1
  99. package/components/response-toolbar/index.esm.js +483 -469
  100. package/components/response-toolbar/index.umd.cjs +1 -1
  101. package/components/schema-selector/index.esm.js +634 -619
  102. package/components/schema-selector/index.umd.cjs +2 -2
  103. package/components/search-box/index.esm.js +228 -214
  104. package/components/search-box/index.umd.cjs +1 -1
  105. package/components/section/index.esm.js +419 -406
  106. package/components/section/index.umd.cjs +1 -1
  107. package/components/smoke-detector/index.esm.js +162 -148
  108. package/components/smoke-detector/index.umd.cjs +1 -1
  109. package/components/splitter/index.esm.js +308 -284
  110. package/components/splitter/index.umd.cjs +1 -1
  111. package/components/step/index.esm.js +279 -265
  112. package/components/step/index.umd.cjs +1 -1
  113. package/components/switch/index.esm.js +183 -170
  114. package/components/switch/index.umd.cjs +1 -1
  115. package/components/tabs/index.esm.js +307 -294
  116. package/components/tabs/index.umd.cjs +1 -1
  117. package/components/tags/index.esm.js +320 -306
  118. package/components/tags/index.umd.cjs +1 -1
  119. package/components/text/index.esm.js +245 -231
  120. package/components/text/index.umd.cjs +1 -1
  121. package/components/textarea/index.esm.js +260 -247
  122. package/components/textarea/index.umd.cjs +1 -1
  123. package/components/time-picker/index.esm.js +409 -396
  124. package/components/time-picker/index.umd.cjs +1 -1
  125. package/components/transfer/index.esm.js +424 -410
  126. package/components/transfer/index.umd.cjs +1 -1
  127. package/components/tree-grid/index.esm.js +383 -376
  128. package/components/tree-grid/index.umd.cjs +1 -1
  129. package/components/tree-view/index.esm.js +595 -575
  130. package/components/tree-view/index.umd.cjs +1 -1
  131. package/components/uploader/index.esm.js +325 -311
  132. package/components/uploader/index.umd.cjs +2 -2
  133. package/components/verify-detail/index.esm.js +304 -290
  134. package/components/verify-detail/index.umd.cjs +1 -1
  135. package/components/video/index.esm.js +99 -85
  136. package/components/video/index.umd.cjs +1 -1
  137. package/components/weather/index.esm.js +947 -933
  138. package/components/weather/index.umd.cjs +4 -4
  139. package/farris.all.esm.js +5492 -5470
  140. package/farris.all.umd.cjs +13 -13
  141. package/index.css +1 -1
  142. package/package.json +1 -1
  143. package/types/condition/src/composition/condition-value/input-group-value.d.ts +1 -1
  144. package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
  145. package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
@@ -1,119 +1,133 @@
1
- import { computed as h, defineComponent as A, ref as d, watch as C, createVNode as y, Fragment as Q, inject as U, onMounted as Z } from "vue";
2
- import { isPlainObject as F, cloneDeep as x } from "lodash-es";
3
- import { withInstall as K } from "../common/index.esm.js";
1
+ import { computed as h, defineComponent as C, ref as d, watch as F, createVNode as y, Fragment as U, inject as Z, onMounted as x } from "vue";
2
+ import { isPlainObject as A, cloneDeep as q } from "lodash-es";
3
+ import { withInstall as I } from "../common/index.esm.js";
4
4
  const z = {}, V = {};
5
- function L(e) {
6
- const { properties: r, title: i, ignore: s } = e, n = s && Array.isArray(s), c = Object.keys(r).reduce((g, a) => ((!n || !s.find((v) => v === a)) && (g[a] = r[a].type === "object" && r[a].properties ? L(r[a]) : x(r[a].default)), g), {});
7
- if (i && (!n || !s.find((g) => g === "id"))) {
8
- const g = i.toLowerCase().replace(/-/g, "_");
9
- c.id = `${g}_${Math.random().toString().slice(2, 6)}`;
5
+ function R(e) {
6
+ const { properties: r, title: c, ignore: s } = e, n = s && Array.isArray(s), o = Object.keys(r).reduce((a, i) => ((!n || !s.find((v) => v === i)) && (a[i] = r[i].type === "object" && r[i].properties ? R(r[i]) : q(r[i].default)), a), {});
7
+ if (c && (!n || !s.find((a) => a === "id"))) {
8
+ const a = c.toLowerCase().replace(/-/g, "_");
9
+ o.id = `${a}_${Math.random().toString().slice(2, 6)}`;
10
10
  }
11
- return c;
11
+ return o;
12
12
  }
13
- function q(e, r = {}, i) {
13
+ function K(e) {
14
+ const { properties: r, title: c, required: s } = e;
15
+ if (s && Array.isArray(s)) {
16
+ const n = s.reduce((o, a) => (o[a] = r[a].type === "object" && r[a].properties ? R(r[a]) : q(r[a].default), o), {});
17
+ if (c && s.find((o) => o === "id")) {
18
+ const o = c.toLowerCase().replace(/-/g, "_");
19
+ n.id = `${o}_${Math.random().toString().slice(2, 6)}`;
20
+ }
21
+ return n;
22
+ }
23
+ return {
24
+ type: c
25
+ };
26
+ }
27
+ function _(e, r = {}, c) {
14
28
  const s = z[e];
15
29
  if (s) {
16
- let n = L(s);
17
- const c = V[e];
18
- return n = c ? c({ getSchemaByType: q }, n, r, i) : n, n;
30
+ let n = K(s);
31
+ const o = V[e];
32
+ return n = o ? o({ getSchemaByType: _ }, n, r, c) : n, n;
19
33
  }
20
34
  return null;
21
35
  }
22
- function I(e, r) {
23
- const i = L(r);
24
- return Object.keys(i).reduce((s, n) => (s[n] && F(s[n]) && F(e[n] || !e[n]) ? Object.assign(s[n], e[n] || {}) : s[n] = e[n], s), i), i;
25
- }
26
36
  function ee(e, r) {
37
+ const c = R(r);
38
+ return Object.keys(c).reduce((s, n) => (Object.prototype.hasOwnProperty.call(e, n) && (s[n] && A(s[n]) && A(e[n] || !e[n]) ? Object.assign(s[n], e[n] || {}) : s[n] = e[n]), s), c), c;
39
+ }
40
+ function re(e, r) {
27
41
  return Object.keys(e).filter((s) => e[s] != null).reduce((s, n) => {
28
42
  if (r.has(n)) {
29
- const c = r.get(n);
30
- if (typeof c == "string")
31
- s[c] = e[n];
43
+ const o = r.get(n);
44
+ if (typeof o == "string")
45
+ s[o] = e[n];
32
46
  else {
33
- const g = c(n, e[n], e);
34
- Object.assign(s, g);
47
+ const a = o(n, e[n], e);
48
+ Object.assign(s, a);
35
49
  }
36
50
  } else
37
51
  s[n] = e[n];
38
52
  return s;
39
53
  }, {});
40
54
  }
41
- function re(e, r, i = /* @__PURE__ */ new Map()) {
42
- const s = I(e, r);
43
- return ee(s, i);
55
+ function te(e, r, c = /* @__PURE__ */ new Map()) {
56
+ const s = ee(e, r);
57
+ return re(s, c);
44
58
  }
45
- function te(e = {}) {
46
- function r(t, o, l, u) {
47
- if (typeof l == "number")
48
- return u[t].length === l;
49
- if (typeof l == "object") {
50
- const b = Object.keys(l)[0], P = l[b];
59
+ function se(e = {}) {
60
+ function r(t, l, u, f) {
61
+ if (typeof u == "number")
62
+ return f[t].length === u;
63
+ if (typeof u == "object") {
64
+ const b = Object.keys(u)[0], P = u[b];
51
65
  if (b === "not")
52
- return Number(u[t].length) !== Number(P);
66
+ return Number(f[t].length) !== Number(P);
53
67
  if (b === "moreThan")
54
- return Number(u[t].length) >= Number(P);
68
+ return Number(f[t].length) >= Number(P);
55
69
  if (b === "lessThan")
56
- return Number(u[t].length) <= Number(P);
70
+ return Number(f[t].length) <= Number(P);
57
71
  }
58
72
  return !1;
59
73
  }
60
- function i(t, o, l, u) {
61
- return u[t] && u[t].propertyValue && String(u[t].propertyValue.value) === String(l);
74
+ function c(t, l, u, f) {
75
+ return f[t] && f[t].propertyValue && String(f[t].propertyValue.value) === String(u);
62
76
  }
63
77
  const s = /* @__PURE__ */ new Map([
64
78
  ["length", r],
65
- ["getProperty", i]
79
+ ["getProperty", c]
66
80
  ]);
67
- Object.keys(e).reduce((t, o) => (t.set(o, e[o]), t), s);
68
- function n(t, o) {
69
- const l = t;
70
- return typeof o == "number" ? [{ target: l, operator: "length", param: null, value: Number(o) }] : typeof o == "boolean" ? [{ target: l, operator: "getProperty", param: t, value: !!o }] : typeof o == "object" ? Object.keys(o).map((u) => {
71
- if (u === "length")
72
- return { target: l, operator: "length", param: null, value: o[u] };
73
- const b = u, P = o[u];
74
- return { target: l, operator: "getProperty", param: b, value: P };
81
+ Object.keys(e).reduce((t, l) => (t.set(l, e[l]), t), s);
82
+ function n(t, l) {
83
+ const u = t;
84
+ return typeof l == "number" ? [{ target: u, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: u, operator: "getProperty", param: t, value: !!l }] : typeof l == "object" ? Object.keys(l).map((f) => {
85
+ if (f === "length")
86
+ return { target: u, operator: "length", param: null, value: l[f] };
87
+ const b = f, P = l[f];
88
+ return { target: u, operator: "getProperty", param: b, value: P };
75
89
  }) : [];
76
90
  }
77
- function c(t) {
78
- return Object.keys(t).reduce((l, u) => {
79
- const b = n(u, t[u]);
80
- return l.push(...b), l;
91
+ function o(t) {
92
+ return Object.keys(t).reduce((u, f) => {
93
+ const b = n(f, t[f]);
94
+ return u.push(...b), u;
81
95
  }, []);
82
96
  }
83
- function g(t, o) {
97
+ function a(t, l) {
84
98
  if (s.has(t.operator)) {
85
- const l = s.get(t.operator);
86
- return l && l(t.target, t.param, t.value, o) || !1;
99
+ const u = s.get(t.operator);
100
+ return u && u(t.target, t.param, t.value, l) || !1;
87
101
  }
88
102
  return !1;
89
103
  }
90
- function a(t, o) {
91
- return c(t).reduce((b, P) => b && g(P, o), !0);
104
+ function i(t, l) {
105
+ return o(t).reduce((b, P) => b && a(P, l), !0);
92
106
  }
93
- function v(t, o) {
94
- const l = Object.keys(t), u = l.includes("allOf"), b = l.includes("anyOf"), P = u || b, p = (P ? t[P ? u ? "allOf" : "anyOf" : "allOf"] : [t]).map((S) => a(S, o));
95
- return u ? !p.includes(!1) : p.includes(!0);
107
+ function v(t, l) {
108
+ const u = Object.keys(t), f = u.includes("allOf"), b = u.includes("anyOf"), P = f || b, p = (P ? t[P ? f ? "allOf" : "anyOf" : "allOf"] : [t]).map((S) => i(S, l));
109
+ return f ? !p.includes(!1) : p.includes(!0);
96
110
  }
97
111
  return { parseValueSchema: v };
98
112
  }
99
- const se = {}, ne = {};
100
- te();
101
- function oe(e, r, i = /* @__PURE__ */ new Map(), s = (g, a, v, t) => a, n = {}, c = (g) => g) {
102
- return z[r.title] = r, V[r.title] = s, se[r.title] = n, ne[r.title] = c, (g = {}) => {
103
- const a = re(g, r, i), v = Object.keys(e).reduce((t, o) => (t[o] = e[o].default, t), {});
104
- return Object.assign(v, a);
113
+ const ne = {}, oe = {};
114
+ se();
115
+ function ae(e, r, c = /* @__PURE__ */ new Map(), s = (a, i, v, t) => i, n = {}, o = (a) => a) {
116
+ return z[r.title] = r, V[r.title] = s, ne[r.title] = n, oe[r.title] = o, (a = {}) => {
117
+ const i = te(a, r, c), v = Object.keys(e).reduce((t, l) => (t[l] = e[l].default, t), {});
118
+ return Object.assign(v, i);
105
119
  };
106
120
  }
107
- function ae(e, r) {
121
+ function ce(e, r) {
108
122
  return { customClass: r.class, customStyle: r.style };
109
123
  }
110
- const ce = /* @__PURE__ */ new Map([
111
- ["appearance", ae]
124
+ const le = /* @__PURE__ */ new Map([
125
+ ["appearance", ce]
112
126
  ]);
113
- function le(e, r, i) {
127
+ function ie(e, r, c) {
114
128
  return r;
115
129
  }
116
- const ue = "https://json-schema.org/draft/2020-12/schema", ie = "https://farris-design.gitee.io/progress.schema.json", fe = "progress", ge = "A Farris Component", pe = "object", de = {
130
+ const ue = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-design.gitee.io/progress.schema.json", ge = "progress", pe = "A Farris Component", de = "object", ye = {
117
131
  id: {
118
132
  description: "The unique identifier for progress",
119
133
  type: "string"
@@ -175,18 +189,18 @@ const ue = "https://json-schema.org/draft/2020-12/schema", ie = "https://farris-
175
189
  type: "boolean",
176
190
  default: !0
177
191
  }
178
- }, ye = [
192
+ }, he = [
179
193
  "id",
180
194
  "type"
181
- ], he = {
195
+ ], ve = {
182
196
  $schema: ue,
183
- $id: ie,
184
- title: fe,
185
- description: ge,
186
- type: pe,
187
- properties: de,
188
- required: ye
189
- }, ve = "progress", me = "A Farris Component", ke = "object", be = {
197
+ $id: fe,
198
+ title: ge,
199
+ description: pe,
200
+ type: de,
201
+ properties: ye,
202
+ required: he
203
+ }, me = "progress", ke = "A Farris Component", be = "object", Pe = {
190
204
  basic: {
191
205
  description: "Basic Infomation",
192
206
  title: "基本信息",
@@ -208,12 +222,12 @@ const ue = "https://json-schema.org/draft/2020-12/schema", ie = "https://farris-
208
222
  }
209
223
  }
210
224
  }
211
- }, Pe = {
212
- title: ve,
213
- description: me,
214
- type: ke,
215
- categories: be
216
- }, R = {
225
+ }, Se = {
226
+ title: me,
227
+ description: ke,
228
+ type: be,
229
+ categories: Pe
230
+ }, W = {
217
231
  progressType: { type: String, default: "line" },
218
232
  strokeWidth: { type: Number, default: 0 },
219
233
  size: { type: String, default: "default" },
@@ -244,43 +258,43 @@ const ue = "https://json-schema.org/draft/2020-12/schema", ie = "https://farris-
244
258
  * 格式化进度信息
245
259
  */
246
260
  format: { type: Function, default: (e, r) => `${e}%` }
247
- }, _ = oe(R, he, ce, le, Pe);
248
- function Se(e) {
249
- function r(g) {
250
- return +g.replace("%", "");
261
+ }, X = ae(W, ve, le, ie, Se);
262
+ function $e(e) {
263
+ function r(a) {
264
+ return +a.replace("%", "");
251
265
  }
252
- function i(g) {
253
- let a = [];
254
- return Object.keys(g).forEach((v) => {
255
- const t = g[v], o = r(v);
256
- isNaN(o) || a.push({
257
- key: o,
266
+ function c(a) {
267
+ let i = [];
268
+ return Object.keys(a).forEach((v) => {
269
+ const t = a[v], l = r(v);
270
+ isNaN(l) || i.push({
271
+ key: l,
258
272
  value: t
259
273
  });
260
- }), a = a.sort((v, t) => v.key - t.key), a;
274
+ }), i = i.sort((v, t) => v.key - t.key), i;
261
275
  }
262
276
  const s = h(() => !!e.strokeColor && typeof e.strokeColor != "string"), n = h(() => {
263
- const { from: g = "#59a1ff", to: a = "#59a1ff", direction: v = "to right", ...t } = e.strokeColor;
277
+ const { from: a = "#59a1ff", to: i = "#59a1ff", direction: v = "to right", ...t } = e.strokeColor;
264
278
  if (Object.keys(t).length !== 0) {
265
- const o = i(t).map(({ key: l, value: u }) => `${u} ${l}%`).join(", ");
266
- return `linear-gradient(${v}, ${o})`;
279
+ const l = c(t).map(({ key: u, value: f }) => `${f} ${u}%`).join(", ");
280
+ return `linear-gradient(${v}, ${l})`;
267
281
  }
268
- return `linear-gradient(${v}, ${g}, ${a})`;
269
- }), c = h(() => i(e.strokeColor).map(({ key: g, value: a }) => ({ offset: `${g}%`, color: a })));
282
+ return `linear-gradient(${v}, ${a}, ${i})`;
283
+ }), o = h(() => c(e.strokeColor).map(({ key: a, value: i }) => ({ offset: `${a}%`, color: i })));
270
284
  return {
271
285
  isGradient: s,
272
286
  linearGradient: n,
273
- circleGradient: c
287
+ circleGradient: o
274
288
  };
275
289
  }
276
- function $e(e) {
290
+ function we(e) {
277
291
  return { strokeWidth: h(() => e.strokeWidth || (e.progressType === "line" && e.size !== "small" ? 8 : 6)) };
278
292
  }
279
- function we(e) {
293
+ function je(e) {
280
294
  return { formatPercentageText: h(() => e.format(e.percent, e.successPercent)) };
281
295
  }
282
- function je(e, r, i, s) {
283
- const { isCircleStyle: n } = r, { isGradient: c, linearGradient: g } = i, { strokeWidth: a } = s, v = h(() => {
296
+ function Oe(e, r, c, s) {
297
+ const { isCircleStyle: n } = r, { isGradient: o, linearGradient: a } = c, { strokeWidth: i } = s, v = h(() => {
284
298
  const p = {
285
299
  "f-progress": !0,
286
300
  "f-progress-line": e.progressType === "line",
@@ -293,44 +307,44 @@ function je(e, r, i, s) {
293
307
  width: `${e.width}px`,
294
308
  height: `${e.width}px`,
295
309
  "font-size": `${e.width * 0.15 + 6}px`,
296
- "f-progress-circle-gradient": c.value
297
- })), o = h(() => ({
310
+ "f-progress-circle-gradient": o.value
311
+ })), l = h(() => ({
298
312
  "f-progress-inner": !0,
299
- "f-progress-circle-gradient": c.value
300
- })), l = 0, u = h(() => l + 1), b = h(() => {
301
- const p = 50 - a.value / 2, $ = e.gapPosition || (e.progressType === "circle" ? "top" : "bottom");
302
- let S = 0, w = -p, f = 0, m = p * -2;
313
+ "f-progress-circle-gradient": o.value
314
+ })), u = 0, f = h(() => u + 1), b = h(() => {
315
+ const p = 50 - i.value / 2, $ = e.gapPosition || (e.progressType === "circle" ? "top" : "bottom");
316
+ let S = 0, w = -p, g = 0, m = p * -2;
303
317
  switch ($) {
304
318
  case "left":
305
- S = -p, w = 0, f = p * 2, m = 0;
319
+ S = -p, w = 0, g = p * 2, m = 0;
306
320
  break;
307
321
  case "right":
308
- S = p, w = 0, f = p * -2, m = 0;
322
+ S = p, w = 0, g = p * -2, m = 0;
309
323
  break;
310
324
  case "bottom":
311
325
  w = p, m = p * 2;
312
326
  break;
313
327
  }
314
328
  return `M 50,50 m ${S},${w}
315
- a ${p},${p} 0 1 1 ${f},${-m}
316
- a ${p},${p} 0 1 1 ${-f},${m}`;
329
+ a ${p},${p} 0 1 1 ${g},${-m}
330
+ a ${p},${p} 0 1 1 ${-g},${m}`;
317
331
  }), P = h(() => {
318
- const p = 50 - a.value / 2, $ = Math.PI * 2 * p, S = e.gapDegree || (e.progressType === "circle" ? 0 : 75);
332
+ const p = 50 - i.value / 2, $ = Math.PI * 2 * p, S = e.gapDegree || (e.progressType === "circle" ? 0 : 75);
319
333
  return {
320
334
  strokeDasharray: `${$ - S}px ${$}px`,
321
335
  strokeDashoffset: `-${S / 2}px`,
322
336
  transition: "stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s"
323
337
  };
324
338
  }), T = h(() => {
325
- const p = 50 - a.value / 2, $ = Math.PI * 2 * p, S = e.gapDegree || (e.progressType === "circle" ? 0 : 75), w = e.successPercent !== void 0 && e.successPercent !== null ? [e.successPercent, e.percent] : [e.percent];
326
- return w.map((f, m) => {
339
+ const p = 50 - i.value / 2, $ = Math.PI * 2 * p, S = e.gapDegree || (e.progressType === "circle" ? 0 : 75), w = e.successPercent !== void 0 && e.successPercent !== null ? [e.successPercent, e.percent] : [e.percent];
340
+ return w.map((g, m) => {
327
341
  const k = w.length === 2 && m === 0;
328
342
  return {
329
- stroke: c.value && !k ? `url(#gradient-${u.value})` : null,
343
+ stroke: o.value && !k ? `url(#gradient-${f.value})` : null,
330
344
  strokePathStyle: {
331
- stroke: c.value ? null : k ? "default" : e.strokeColor,
345
+ stroke: o.value ? null : k ? "default" : e.strokeColor,
332
346
  transition: "stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s",
333
- strokeDasharray: `${(f || 0) / 100 * ($ - S)}px ${$}px`,
347
+ strokeDasharray: `${(g || 0) / 100 * ($ - S)}px ${$}px`,
334
348
  strokeDashoffset: `-${S / 2}px`
335
349
  }
336
350
  };
@@ -338,68 +352,68 @@ function je(e, r, i, s) {
338
352
  }), B = h(() => ({
339
353
  width: `${e.percent}%`,
340
354
  "border-radius": e.strokeLinecap === "round" ? "100px" : "0",
341
- background: c.value ? null : e.strokeColor,
342
- "background-image": c.value ? g.value : null,
343
- height: `${a.value}px`
355
+ background: o.value ? null : e.strokeColor,
356
+ "background-image": o.value ? a.value : null,
357
+ height: `${i.value}px`
344
358
  }));
345
359
  return {
346
360
  progressClass: v,
347
361
  inCircleProgressBarStyle: t,
348
- inCircleProgressBarClass: o,
362
+ inCircleProgressBarClass: l,
349
363
  pathString: b,
350
364
  trailPathStyle: P,
351
365
  progressCirclePaths: T,
352
- gradientId: u,
366
+ gradientId: f,
353
367
  inlineProgressBackgroundStyle: B
354
368
  };
355
369
  }
356
- function Oe(e) {
370
+ function Be(e) {
357
371
  return { isCircleStyle: h(() => e.progressType === "circle" || e.progressType === "dashboard") };
358
372
  }
359
- function Be(e) {
373
+ function Te(e) {
360
374
  const r = h(() => {
361
375
  const n = {
362
376
  "f-progress-text-icon": !0,
363
377
  "f-icon": !0
364
- }, c = `f-icon-${e.progressStatus}`;
365
- return n[c] = !0, n;
366
- }), i = h(() => {
378
+ }, o = `f-icon-${e.progressStatus}`;
379
+ return n[o] = !0, n;
380
+ }), c = h(() => {
367
381
  const n = {
368
382
  "f-progress-text-icon": !0,
369
383
  "f-icon": !0
370
- }, c = e.progressStatus === "success" ? "f-icon-checkmark" : "f-icon-x";
371
- return n[c] = !0, n;
384
+ }, o = e.progressStatus === "success" ? "f-icon-checkmark" : "f-icon-x";
385
+ return n[o] = !0, n;
372
386
  }), s = h(() => e.progressStatus === "error" || e.progressStatus === "success");
373
387
  return {
374
388
  inlineProgrssStatusClass: r,
375
- circleProgrssStatusClass: i,
389
+ circleProgrssStatusClass: c,
376
390
  shouldShowStatus: s
377
391
  };
378
392
  }
379
- function Te(e) {
393
+ function De(e) {
380
394
  const r = h(() => ({
381
395
  width: `${e.successPercent}%`,
382
396
  "border-radius": e.strokeLinecap === "round" ? "100px" : "0",
383
397
  height: `${e.strokeWidth}px`,
384
398
  "background-image": e.enableBackgroundImg ? `url(${e.backgroundImg})` : null
385
- })), i = h(() => e.successPercent || e.successPercent === 0);
386
- return { inlineProgressSuccessBackgroundStyle: r, shouldShowSuccessInlineProgressBackground: i };
399
+ })), c = h(() => e.successPercent || e.successPercent === 0);
400
+ return { inlineProgressSuccessBackgroundStyle: r, shouldShowSuccessInlineProgressBackground: c };
387
401
  }
388
- const E = /* @__PURE__ */ A({
402
+ const E = /* @__PURE__ */ C({
389
403
  name: "FProgress",
390
- props: R,
404
+ props: W,
391
405
  emits: [],
392
406
  setup(e) {
393
- const r = d(e.progressType), i = d(e.showInfo), s = d(e.percent), n = d(e.strokeLinecap), c = Se(e), {
394
- isGradient: g,
395
- circleGradient: a
396
- } = c, v = $e(e), {
407
+ const r = d(e.progressType), c = d(e.showInfo), s = d(e.percent), n = d(e.strokeLinecap), o = $e(e), {
408
+ isGradient: a,
409
+ circleGradient: i
410
+ } = o, v = we(e), {
397
411
  strokeWidth: t
398
412
  } = v, {
399
- formatPercentageText: o
400
- } = we(e), l = Oe(e), {
401
- isCircleStyle: u
402
- } = l, {
413
+ formatPercentageText: l
414
+ } = je(e), u = Be(e), {
415
+ isCircleStyle: f
416
+ } = u, {
403
417
  progressClass: b,
404
418
  inCircleProgressBarStyle: P,
405
419
  inCircleProgressBarClass: T,
@@ -408,26 +422,26 @@ const E = /* @__PURE__ */ A({
408
422
  progressCirclePaths: $,
409
423
  gradientId: S,
410
424
  inlineProgressBackgroundStyle: w
411
- } = je(e, l, c, v), {
412
- inlineProgrssStatusClass: f,
425
+ } = Oe(e, u, o, v), {
426
+ inlineProgrssStatusClass: g,
413
427
  circleProgrssStatusClass: m,
414
428
  shouldShowStatus: k
415
- } = Be(e), {
429
+ } = Te(e), {
416
430
  inlineProgressSuccessBackgroundStyle: O,
417
431
  shouldShowSuccessInlineProgressBackground: M
418
- } = Te(e);
419
- C(() => e.percent, (D) => {
432
+ } = De(e);
433
+ F(() => e.percent, (D) => {
420
434
  s.value = D || 0;
421
435
  });
422
436
  function N() {
423
- return i.value && y("span", {
437
+ return c.value && y("span", {
424
438
  class: "f-progress-text"
425
439
  }, [k.value ? y("span", {
426
- class: u.value ? m.value : f.value
427
- }, null) : o.value]);
440
+ class: f.value ? m.value : g.value
441
+ }, null) : l.value]);
428
442
  }
429
443
  function G() {
430
- return y(Q, null, [y("div", {
444
+ return y(U, null, [y("div", {
431
445
  class: "f-progress-outer"
432
446
  }, [y("div", {
433
447
  class: "f-progress-inner"
@@ -439,20 +453,20 @@ const E = /* @__PURE__ */ A({
439
453
  style: O.value
440
454
  }, null)])]), N()]);
441
455
  }
442
- function W() {
456
+ function L() {
443
457
  return y("div", {
444
458
  class: T.value,
445
459
  style: P.value
446
460
  }, [y("svg", {
447
461
  class: "f-progress-circle",
448
462
  viewBox: "0 0 100 100"
449
- }, [g.value && y("defs", null, [y("linearGradient", {
463
+ }, [a.value && y("defs", null, [y("linearGradient", {
450
464
  id: "gradient-" + S.value,
451
465
  x1: "100%",
452
466
  y1: "0%",
453
467
  x2: "0%",
454
468
  y2: "0%"
455
- }, [a.value.map((D) => y("stop", {
469
+ }, [i.value.map((D) => y("stop", {
456
470
  offset: D.offset,
457
471
  "stop-color": D.color
458
472
  }, null))])]), y("path", {
@@ -474,16 +488,16 @@ const E = /* @__PURE__ */ A({
474
488
  }
475
489
  return () => y("div", {
476
490
  class: b.value
477
- }, [r.value === "line" && G(), u.value && W()]);
491
+ }, [r.value === "line" && G(), f.value && L()]);
478
492
  }
479
493
  });
480
- function De(e, r, i) {
494
+ function Me(e, r, c) {
481
495
  var w;
482
- const s = "", n = "", c = d();
483
- function g() {
496
+ const s = "", n = "", o = d();
497
+ function a() {
484
498
  return (r == null ? void 0 : r.schema.componentType) !== "frame";
485
499
  }
486
- function a() {
500
+ function i() {
487
501
  return !1;
488
502
  }
489
503
  function v() {
@@ -492,50 +506,50 @@ function De(e, r, i) {
492
506
  function t() {
493
507
  return (r == null ? void 0 : r.schema.componentType) === "frame";
494
508
  }
495
- function o(f) {
496
- if (!f || !f.value)
509
+ function l(g) {
510
+ if (!g || !g.value)
497
511
  return null;
498
- if (f.value.schema && f.value.schema.type === "component")
499
- return f.value;
500
- const m = d(f == null ? void 0 : f.value.parent), k = o(m);
512
+ if (g.value.schema && g.value.schema.type === "component")
513
+ return g.value;
514
+ const m = d(g == null ? void 0 : g.value.parent), k = l(m);
501
515
  return k || null;
502
516
  }
503
- function l(f = r) {
504
- const { componentInstance: m, designerItemElementRef: k } = f;
505
- return !m || !m.value ? null : m.value.canMove ? k : l(f.parent);
517
+ function u(g = r) {
518
+ const { componentInstance: m, designerItemElementRef: k } = g;
519
+ return !m || !m.value ? null : m.value.canMove ? k : u(g.parent);
506
520
  }
507
- function u(f) {
508
- return !!i;
521
+ function f(g) {
522
+ return !!c;
509
523
  }
510
524
  function b() {
511
525
  return (r == null ? void 0 : r.schema.label) || (r == null ? void 0 : r.schema.title) || (r == null ? void 0 : r.schema.name);
512
526
  }
513
527
  function P() {
514
528
  }
515
- function T(f, m) {
529
+ function T(g, m) {
516
530
  }
517
- function B(f, m) {
518
- const { componentType: k } = f;
519
- let O = q(k, f, m);
531
+ function B(g, m) {
532
+ const { componentType: k } = g;
533
+ let O = _(k, g, m);
520
534
  const M = k.toLowerCase().replace(/-/g, "_");
521
535
  return O && !O.id && O.type === k && (O.id = `${M}_${Math.random().toString().slice(2, 6)}`), O;
522
536
  }
523
- function p(f) {
537
+ function p(g) {
524
538
  }
525
- function $(...f) {
539
+ function $(...g) {
526
540
  }
527
541
  function S() {
528
- r != null && r.schema.contents && r.schema.contents.map((f) => {
542
+ r != null && r.schema.contents && r.schema.contents.map((g) => {
529
543
  var O;
530
- let m = f.id;
531
- f.type === "component-ref" && (m = f.component);
544
+ let m = g.id;
545
+ g.type === "component-ref" && (m = g.component);
532
546
  const k = e.value.querySelector(`#${m}-design-item`);
533
547
  (O = k == null ? void 0 : k.componentInstance) != null && O.value.onRemoveComponent && k.componentInstance.value.onRemoveComponent();
534
548
  });
535
549
  }
536
- return c.value = {
537
- canMove: g(),
538
- canSelectParent: a(),
550
+ return o.value = {
551
+ canMove: a(),
552
+ canSelectParent: i(),
539
553
  canDelete: v(),
540
554
  canNested: !t(),
541
555
  contents: r == null ? void 0 : r.schema.contents,
@@ -544,9 +558,9 @@ function De(e, r, i) {
544
558
  schema: r == null ? void 0 : r.schema,
545
559
  styles: s,
546
560
  designerClass: n,
547
- canAccepts: u,
548
- getBelongedComponentInstance: o,
549
- getDraggableDesignItemElement: l,
561
+ canAccepts: f,
562
+ getBelongedComponentInstance: l,
563
+ getDraggableDesignItemElement: u,
550
564
  getDraggingDisplayText: b,
551
565
  getPropConfig: $,
552
566
  getDragScopeElement: P,
@@ -556,40 +570,40 @@ function De(e, r, i) {
556
570
  triggerBelongedComponentToMoveWhenMoved: d(!1),
557
571
  triggerBelongedComponentToDeleteWhenDeleted: d(!1),
558
572
  onRemoveComponent: S
559
- }, c;
573
+ }, o;
560
574
  }
561
- const Me = /* @__PURE__ */ A({
575
+ const Ne = /* @__PURE__ */ C({
562
576
  name: "FProgressDesign",
563
- props: R,
577
+ props: W,
564
578
  emits: [],
565
579
  setup(e, r) {
566
- const i = d(e.progressStatus), s = d(e.progressType), n = d(e.size), c = d(e.showInfo), g = d(e.strokeWidth), a = d(e.percent), v = d(e.strokeLinecap), t = d(!1), o = d(e.strokeColor), l = d(null), u = d(0), b = d(e.width), P = d(""), T = d([]), B = d(""), p = d([]), $ = d(e.enableBackgroundImg), S = d(e.backgroundImg), w = d(), f = U("design-item-context"), m = De(w, f);
567
- Z(() => {
580
+ const c = d(e.progressStatus), s = d(e.progressType), n = d(e.size), o = d(e.showInfo), a = d(e.strokeWidth), i = d(e.percent), v = d(e.strokeLinecap), t = d(!1), l = d(e.strokeColor), u = d(null), f = d(0), b = d(e.width), P = d(""), T = d([]), B = d(""), p = d([]), $ = d(e.enableBackgroundImg), S = d(e.backgroundImg), w = d(), g = Z("design-item-context"), m = Me(w, g);
581
+ x(() => {
568
582
  w.value.componentInstance = m;
569
- }), r.expose(m.value), C(() => e.percent, (j) => {
570
- a.value = j || 0;
583
+ }), r.expose(m.value), F(() => e.percent, (j) => {
584
+ i.value = j || 0;
571
585
  });
572
- const k = h(() => g.value || (s.value === "line" && n.value !== "small" ? 8 : 6)), O = h(() => s.value === "circle" || s.value === "dashboard"), M = h(() => {
586
+ const k = h(() => a.value || (s.value === "line" && n.value !== "small" ? 8 : 6)), O = h(() => s.value === "circle" || s.value === "dashboard"), M = h(() => {
573
587
  const j = {
574
588
  "f-progress": !0,
575
589
  "f-progress-line": s.value === "line",
576
590
  "ant-progress-small": n.value === "small",
577
- "f-progress-show-info": c.value,
591
+ "f-progress-show-info": o.value,
578
592
  ".f-progress-circle": O.value
579
- }, J = `f-progress-status-${i.value}`;
580
- return j[J] = !0, j;
593
+ }, Q = `f-progress-status-${c.value}`;
594
+ return j[Q] = !0, j;
581
595
  }), N = h(() => ({
582
- width: `${a.value}%`,
596
+ width: `${i.value}%`,
583
597
  "border-radius": v.value === "round" ? "100px" : "0",
584
- backgroud: t.value ? null : o.value,
585
- "background-image": t.value ? l.value : null,
598
+ backgroud: t.value ? null : l.value,
599
+ "background-image": t.value ? u.value : null,
586
600
  height: `${k.value}px`
587
601
  })), G = h(() => ({
588
- width: `${a.value}%`,
602
+ width: `${i.value}%`,
589
603
  "border-radius": v.value === "round" ? "100px" : "0",
590
604
  height: `${k.value}px`,
591
605
  "background-image": $.value ? S.value : null
592
- })), W = h(() => u.value || u.value === 0);
606
+ })), L = h(() => f.value || f.value === 0);
593
607
  function D() {
594
608
  return y("div", {
595
609
  class: "f-progress-outer"
@@ -598,21 +612,21 @@ const Me = /* @__PURE__ */ A({
598
612
  }, [y("div", {
599
613
  class: "f-progress-bg",
600
614
  style: N.value
601
- }, null), W.value && y("div", {
615
+ }, null), L.value && y("div", {
602
616
  class: "f-progress-success-bg",
603
617
  style: G.value
604
618
  }, null)])]);
605
619
  }
606
- const X = h(() => ({
620
+ const Y = h(() => ({
607
621
  width: `${b.value}px`,
608
622
  height: `${b.value}px`,
609
623
  "font-size": `${b.value * 0.15 + 6}px`,
610
624
  "f-progress-circle-gradient": t.value
611
- })), Y = h(() => ({}));
612
- function H() {
625
+ })), H = h(() => ({}));
626
+ function J() {
613
627
  return y("div", {
614
628
  class: "f-progress-inner",
615
- style: X.value
629
+ style: Y.value
616
630
  }, [y("svg", {
617
631
  class: "f-progress-circle",
618
632
  viewBox: "0 0 100 100"
@@ -631,33 +645,33 @@ const Me = /* @__PURE__ */ A({
631
645
  "fill-opacity": "0",
632
646
  "stroke-width": k.value,
633
647
  d: B.value,
634
- style: Y.value
648
+ style: H.value
635
649
  }, null), p.value.map((j) => y("path", {
636
650
  class: "f-progress-circle-path",
637
651
  "fill-opacity": "0",
638
652
  d: B.value,
639
653
  "stroke-linecap": v.value,
640
654
  stroke: j.stroke,
641
- "stroke-width": a.value ? k.value : 0,
655
+ "stroke-width": i.value ? k.value : 0,
642
656
  style: j.strokePathStyle
643
657
  }, null))])]);
644
658
  }
645
659
  return () => y("div", {
646
660
  ref: w,
647
661
  class: M.value
648
- }, [s.value === "line" && D(), O.value && H()]);
662
+ }, [s.value === "line" && D(), O.value && J()]);
649
663
  }
650
664
  });
651
- E.register = (e, r, i) => {
652
- e.progress = E, r.progress = _;
665
+ E.register = (e, r, c) => {
666
+ e.progress = E, r.progress = X;
653
667
  };
654
- E.registerDesigner = (e, r, i) => {
655
- e.progress = Me, r.progress = _;
668
+ E.registerDesigner = (e, r, c) => {
669
+ e.progress = Ne, r.progress = X;
656
670
  };
657
- const We = K(E);
671
+ const Re = I(E);
658
672
  export {
659
673
  E as Progress,
660
- We as default,
661
- R as progressProps,
662
- _ as propsResolver
674
+ Re as default,
675
+ W as progressProps,
676
+ X as propsResolver
663
677
  };