@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,118 +1,132 @@
1
- import { defineComponent as V, ref as O, computed as E, watch as H, createVNode as b, inject as G, onMounted as J } from "vue";
2
- import { isPlainObject as z, cloneDeep as Q } from "lodash-es";
3
- const q = {}, _ = {};
4
- function B(t) {
5
- const { properties: e, title: a, ignore: c } = t, l = c && Array.isArray(c), y = Object.keys(e).reduce((f, j) => ((!l || !c.find((d) => d === j)) && (f[j] = e[j].type === "object" && e[j].properties ? B(e[j]) : Q(e[j].default)), f), {});
6
- if (a && (!l || !c.find((f) => f === "id"))) {
7
- const f = a.toLowerCase().replace(/-/g, "_");
8
- y.id = `${f}_${Math.random().toString().slice(2, 6)}`;
1
+ import { defineComponent as F, ref as O, computed as $, watch as G, createVNode as g, inject as J, onMounted as Q } from "vue";
2
+ import { isPlainObject as q, cloneDeep as V } from "lodash-es";
3
+ const _ = {}, W = {};
4
+ function A(t) {
5
+ const { properties: e, title: l, ignore: r } = t, c = r && Array.isArray(r), p = Object.keys(e).reduce((i, j) => ((!c || !r.find((b) => b === j)) && (i[j] = e[j].type === "object" && e[j].properties ? A(e[j]) : V(e[j].default)), i), {});
6
+ if (l && (!c || !r.find((i) => i === "id"))) {
7
+ const i = l.toLowerCase().replace(/-/g, "_");
8
+ p.id = `${i}_${Math.random().toString().slice(2, 6)}`;
9
9
  }
10
- return y;
10
+ return p;
11
11
  }
12
- function W(t, e = {}, a) {
13
- const c = q[t];
14
- if (c) {
15
- let l = B(c);
16
- const y = _[t];
17
- return l = y ? y({ getSchemaByType: W }, l, e, a) : l, l;
12
+ function U(t) {
13
+ const { properties: e, title: l, required: r } = t;
14
+ if (r && Array.isArray(r)) {
15
+ const c = r.reduce((p, i) => (p[i] = e[i].type === "object" && e[i].properties ? A(e[i]) : V(e[i].default), p), {});
16
+ if (l && r.find((p) => p === "id")) {
17
+ const p = l.toLowerCase().replace(/-/g, "_");
18
+ c.id = `${p}_${Math.random().toString().slice(2, 6)}`;
19
+ }
20
+ return c;
18
21
  }
19
- return null;
22
+ return {
23
+ type: l
24
+ };
20
25
  }
21
- function U(t, e) {
22
- const a = B(e);
23
- return Object.keys(a).reduce((c, l) => (c[l] && z(c[l]) && z(t[l] || !t[l]) ? Object.assign(c[l], t[l] || {}) : c[l] = t[l], c), a), a;
26
+ function H(t, e = {}, l) {
27
+ const r = _[t];
28
+ if (r) {
29
+ let c = U(r);
30
+ const p = W[t];
31
+ return c = p ? p({ getSchemaByType: H }, c, e, l) : c, c;
32
+ }
33
+ return null;
24
34
  }
25
35
  function X(t, e) {
26
- return Object.keys(t).filter((c) => t[c] != null).reduce((c, l) => {
27
- if (e.has(l)) {
28
- const y = e.get(l);
29
- if (typeof y == "string")
30
- c[y] = t[l];
36
+ const l = A(e);
37
+ return Object.keys(l).reduce((r, c) => (Object.prototype.hasOwnProperty.call(t, c) && (r[c] && q(r[c]) && q(t[c] || !t[c]) ? Object.assign(r[c], t[c] || {}) : r[c] = t[c]), r), l), l;
38
+ }
39
+ function Y(t, e) {
40
+ return Object.keys(t).filter((r) => t[r] != null).reduce((r, c) => {
41
+ if (e.has(c)) {
42
+ const p = e.get(c);
43
+ if (typeof p == "string")
44
+ r[p] = t[c];
31
45
  else {
32
- const f = y(l, t[l], t);
33
- Object.assign(c, f);
46
+ const i = p(c, t[c], t);
47
+ Object.assign(r, i);
34
48
  }
35
49
  } else
36
- c[l] = t[l];
37
- return c;
50
+ r[c] = t[c];
51
+ return r;
38
52
  }, {});
39
53
  }
40
- function Y(t, e, a = /* @__PURE__ */ new Map()) {
41
- const c = U(t, e);
42
- return X(c, a);
54
+ function Z(t, e, l = /* @__PURE__ */ new Map()) {
55
+ const r = X(t, e);
56
+ return Y(r, l);
43
57
  }
44
- function Z(t = {}) {
45
- function e(n, u, p, v) {
46
- if (typeof p == "number")
47
- return v[n].length === p;
48
- if (typeof p == "object") {
49
- const k = Object.keys(p)[0], S = p[k];
50
- if (k === "not")
51
- return Number(v[n].length) !== Number(S);
52
- if (k === "moreThan")
53
- return Number(v[n].length) >= Number(S);
54
- if (k === "lessThan")
55
- return Number(v[n].length) <= Number(S);
58
+ function C(t = {}) {
59
+ function e(n, f, v, h) {
60
+ if (typeof v == "number")
61
+ return h[n].length === v;
62
+ if (typeof v == "object") {
63
+ const S = Object.keys(v)[0], k = v[S];
64
+ if (S === "not")
65
+ return Number(h[n].length) !== Number(k);
66
+ if (S === "moreThan")
67
+ return Number(h[n].length) >= Number(k);
68
+ if (S === "lessThan")
69
+ return Number(h[n].length) <= Number(k);
56
70
  }
57
71
  return !1;
58
72
  }
59
- function a(n, u, p, v) {
60
- return v[n] && v[n].propertyValue && String(v[n].propertyValue.value) === String(p);
73
+ function l(n, f, v, h) {
74
+ return h[n] && h[n].propertyValue && String(h[n].propertyValue.value) === String(v);
61
75
  }
62
- const c = /* @__PURE__ */ new Map([
76
+ const r = /* @__PURE__ */ new Map([
63
77
  ["length", e],
64
- ["getProperty", a]
78
+ ["getProperty", l]
65
79
  ]);
66
- Object.keys(t).reduce((n, u) => (n.set(u, t[u]), n), c);
67
- function l(n, u) {
68
- const p = n;
69
- return typeof u == "number" ? [{ target: p, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: p, operator: "getProperty", param: n, value: !!u }] : typeof u == "object" ? Object.keys(u).map((v) => {
70
- if (v === "length")
71
- return { target: p, operator: "length", param: null, value: u[v] };
72
- const k = v, S = u[v];
73
- return { target: p, operator: "getProperty", param: k, value: S };
80
+ Object.keys(t).reduce((n, f) => (n.set(f, t[f]), n), r);
81
+ function c(n, f) {
82
+ const v = n;
83
+ return typeof f == "number" ? [{ target: v, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: v, operator: "getProperty", param: n, value: !!f }] : typeof f == "object" ? Object.keys(f).map((h) => {
84
+ if (h === "length")
85
+ return { target: v, operator: "length", param: null, value: f[h] };
86
+ const S = h, k = f[h];
87
+ return { target: v, operator: "getProperty", param: S, value: k };
74
88
  }) : [];
75
89
  }
76
- function y(n) {
77
- return Object.keys(n).reduce((p, v) => {
78
- const k = l(v, n[v]);
79
- return p.push(...k), p;
90
+ function p(n) {
91
+ return Object.keys(n).reduce((v, h) => {
92
+ const S = c(h, n[h]);
93
+ return v.push(...S), v;
80
94
  }, []);
81
95
  }
82
- function f(n, u) {
83
- if (c.has(n.operator)) {
84
- const p = c.get(n.operator);
85
- return p && p(n.target, n.param, n.value, u) || !1;
96
+ function i(n, f) {
97
+ if (r.has(n.operator)) {
98
+ const v = r.get(n.operator);
99
+ return v && v(n.target, n.param, n.value, f) || !1;
86
100
  }
87
101
  return !1;
88
102
  }
89
- function j(n, u) {
90
- return y(n).reduce((k, S) => k && f(S, u), !0);
103
+ function j(n, f) {
104
+ return p(n).reduce((S, k) => S && i(k, f), !0);
91
105
  }
92
- function d(n, u) {
93
- const p = Object.keys(n), v = p.includes("allOf"), k = p.includes("anyOf"), S = v || k, M = (S ? n[S ? v ? "allOf" : "anyOf" : "allOf"] : [n]).map((T) => j(T, u));
94
- return v ? !M.includes(!1) : M.includes(!0);
106
+ function b(n, f) {
107
+ const v = Object.keys(n), h = v.includes("allOf"), S = v.includes("anyOf"), k = h || S, M = (k ? n[k ? h ? "allOf" : "anyOf" : "allOf"] : [n]).map((P) => j(P, f));
108
+ return h ? !M.includes(!1) : M.includes(!0);
95
109
  }
96
- return { parseValueSchema: d };
110
+ return { parseValueSchema: b };
97
111
  }
98
- const C = {}, K = {};
99
- Z();
100
- function x(t, e, a = /* @__PURE__ */ new Map(), c = (f, j, d, n) => j, l = {}, y = (f) => f) {
101
- return q[e.title] = e, _[e.title] = c, C[e.title] = l, K[e.title] = y, (f = {}) => {
102
- const j = Y(f, e, a), d = Object.keys(t).reduce((n, u) => (n[u] = t[u].default, n), {});
103
- return Object.assign(d, j);
112
+ const K = {}, x = {};
113
+ C();
114
+ function I(t, e, l = /* @__PURE__ */ new Map(), r = (i, j, b, n) => j, c = {}, p = (i) => i) {
115
+ return _[e.title] = e, W[e.title] = r, K[e.title] = c, x[e.title] = p, (i = {}) => {
116
+ const j = Z(i, e, l), b = Object.keys(t).reduce((n, f) => (n[f] = t[f].default, n), {});
117
+ return Object.assign(b, j);
104
118
  };
105
119
  }
106
- function I(t, e) {
120
+ function ee(t, e) {
107
121
  return { customClass: e.class, customStyle: e.style };
108
122
  }
109
- const ee = /* @__PURE__ */ new Map([
110
- ["appearance", I]
123
+ const te = /* @__PURE__ */ new Map([
124
+ ["appearance", ee]
111
125
  ]);
112
- function te(t, e, a) {
126
+ function se(t, e, l) {
113
127
  return e;
114
128
  }
115
- const se = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-design.gitee.io/step.schema.json", re = "step", ce = "A Farris Component", le = "object", ae = {
129
+ const re = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-design.gitee.io/step.schema.json", ce = "step", le = "A Farris Component", ae = "object", ie = {
116
130
  id: {
117
131
  description: "The unique identifier for step",
118
132
  type: "string"
@@ -177,15 +191,15 @@ const se = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-
177
191
  }, oe = [
178
192
  "id",
179
193
  "type"
180
- ], ie = {
181
- $schema: se,
194
+ ], ue = {
195
+ $schema: re,
182
196
  $id: ne,
183
- title: re,
184
- description: ce,
185
- type: le,
186
- properties: ae,
197
+ title: ce,
198
+ description: le,
199
+ type: ae,
200
+ properties: ie,
187
201
  required: oe
188
- }, ue = "step", pe = "A Farris Component", fe = "object", ve = {
202
+ }, pe = "step", fe = "A Farris Component", ve = "object", he = {
189
203
  basic: {
190
204
  description: "Basic Infomation",
191
205
  title: "基本信息",
@@ -207,12 +221,12 @@ const se = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-
207
221
  }
208
222
  }
209
223
  }
210
- }, he = {
211
- title: ue,
212
- description: pe,
213
- type: fe,
214
- categories: ve
215
- }, A = {
224
+ }, de = {
225
+ title: pe,
226
+ description: fe,
227
+ type: ve,
228
+ categories: he
229
+ }, B = {
216
230
  /** 步骤条方向 */
217
231
  direction: { type: String, default: "horizontal" },
218
232
  /** 是否平铺 */
@@ -242,45 +256,45 @@ const se = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-
242
256
  /** 步骤条点击后事件 */
243
257
  onClick: { type: Function, default: () => {
244
258
  } }
245
- }, F = x(A, ie, ee, te, he), L = /* @__PURE__ */ V({
259
+ }, z = I(B, ue, te, se, de), L = /* @__PURE__ */ F({
246
260
  name: "FStep",
247
- props: A,
261
+ props: B,
248
262
  emits: ["click"],
249
263
  setup(t, e) {
250
- const a = O(t.direction), c = O(t.fill), l = O(t.height), y = O(t.steps), f = O(t.clickable), j = O(0), d = O(t.activeIndex), n = E(() => ({
251
- "f-progress-step-list": a.value === "horizontal",
252
- "f-progress-step-list-block": a.value === "vertical",
253
- "f-progress-step-horizontal-fill": a.value === "horizontal" && c.value,
254
- "f-progress-step-vertical-fill": a.value === "vertical" && c.value
255
- })), u = E(() => ({
256
- height: a.value === "vertical" ? `${l.value}px` : ""
264
+ const l = O(t.direction), r = O(t.fill), c = O(t.height), p = O(t.steps), i = O(t.clickable), j = O(0), b = O(t.activeIndex), n = $(() => ({
265
+ "f-progress-step-list": l.value === "horizontal",
266
+ "f-progress-step-list-block": l.value === "vertical",
267
+ "f-progress-step-horizontal-fill": l.value === "horizontal" && r.value,
268
+ "f-progress-step-vertical-fill": l.value === "vertical" && r.value
269
+ })), f = $(() => ({
270
+ height: l.value === "vertical" ? `${c.value}px` : ""
257
271
  }));
258
- function p(r, s) {
259
- const g = {
272
+ function v(a, s) {
273
+ const y = {
260
274
  step: !0,
261
- active: s === d.value,
262
- clickable: f.value,
275
+ active: s === b.value,
276
+ clickable: i.value,
263
277
  // 'click-disable': step.disable,
264
- current: s === d.value
278
+ current: s === b.value
265
279
  };
266
- return s < d.value && (g.finish = !0), g;
280
+ return s < b.value && (y.finish = !0), y;
267
281
  }
268
- function v(r, s) {
269
- const g = {
270
- step: r,
282
+ function h(a, s) {
283
+ const y = {
284
+ step: a,
271
285
  stepIndex: s
272
286
  };
273
- e.emit("click", g);
287
+ e.emit("click", y);
274
288
  }
275
- function k(r, s) {
276
- const g = {
289
+ function S(a, s) {
290
+ const y = {
277
291
  "f-progressstep-row": !0,
278
- "step-active": s === d.value,
279
- "step-current": s === d.value
292
+ "step-active": s === b.value,
293
+ "step-current": s === b.value
280
294
  };
281
- return s < d.value && (g["step-finish"] = !0), g;
295
+ return s < b.value && (y["step-finish"] = !0), y;
282
296
  }
283
- function S(r, s) {
297
+ function k(a, s) {
284
298
  return {
285
299
  "step-icon": !0,
286
300
  "step-success": s,
@@ -288,263 +302,263 @@ const se = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-
288
302
  "f-icon-check": s
289
303
  };
290
304
  }
291
- function P(r, s) {
292
- const g = [];
293
- return s >= d.value || s === j.value ? g.push(b("span", {
305
+ function T(a, s) {
306
+ const y = [];
307
+ return s >= b.value || s === j.value ? y.push(g("span", {
294
308
  class: "step-icon"
295
- }, [s + 1])) : g.push(b("span", {
296
- class: S(r, !0)
297
- }, null)), g;
309
+ }, [s + 1])) : y.push(g("span", {
310
+ class: k(a, !0)
311
+ }, null)), y;
298
312
  }
299
- function D(r, s) {
313
+ function D(a, s) {
300
314
  return {
301
315
  "step-name": !0,
302
- "step-name-success": s < d.value
316
+ "step-name-success": s < b.value
303
317
  };
304
318
  }
305
- function M(r, s) {
306
- return b("div", {
319
+ function M(a, s) {
320
+ return g("div", {
307
321
  class: "f-progress-step-title"
308
- }, [b("p", {
309
- class: D(r, s)
310
- }, [r.title])]);
322
+ }, [g("p", {
323
+ class: D(a, s)
324
+ }, [a.title])]);
311
325
  }
312
- function R(r, s) {
326
+ function w(a, s) {
313
327
  return {
314
328
  "f-progress-step-line": !0,
315
- "f-progress-step-line-success": s === d.value
329
+ "f-progress-step-line-success": s === b.value
316
330
  };
317
331
  }
318
- function T(r, s) {
319
- return s !== y.value.length - 1;
332
+ function P(a, s) {
333
+ return s !== p.value.length - 1;
320
334
  }
321
- const w = E(() => ({
335
+ const R = $(() => ({
322
336
  triangle: !0,
323
- "": a.value === "vertical"
337
+ "": l.value === "vertical"
324
338
  }));
325
- function h() {
326
- return y.value.map((r, s) => b("li", {
327
- class: p(r, s),
328
- onClick: (g) => v(r, s)
329
- }, [b("div", {
330
- class: k(r, s)
331
- }, [b("div", {
339
+ function d() {
340
+ return p.value.map((a, s) => g("li", {
341
+ class: v(a, s),
342
+ onClick: (y) => h(a, s)
343
+ }, [g("div", {
344
+ class: S(a, s)
345
+ }, [g("div", {
332
346
  class: "f-progress-step-content"
333
- }, [P(r, s), M(r, s)]), T(r, s) && b("div", {
334
- class: R(r, s)
335
- }, [b("span", {
336
- class: w.value
347
+ }, [T(a, s), M(a, s)]), P(a, s) && g("div", {
348
+ class: w(a, s)
349
+ }, [g("span", {
350
+ class: R.value
337
351
  }, null)])])]));
338
352
  }
339
- return H(() => t.activeIndex, () => {
340
- t.activeIndex > -1 && t.activeIndex <= y.value.length && (d.value = t.activeIndex, h());
341
- }), () => b("div", {
353
+ return G(() => t.activeIndex, () => {
354
+ t.activeIndex > -1 && t.activeIndex <= p.value.length && (b.value = t.activeIndex, d());
355
+ }), () => g("div", {
342
356
  class: "f-progress-step"
343
- }, [b("ul", {
357
+ }, [g("ul", {
344
358
  class: n.value,
345
- style: u.value
346
- }, [h()])]);
359
+ style: f.value
360
+ }, [d()])]);
347
361
  }
348
362
  });
349
- function ge(t, e, a) {
350
- var w;
351
- const c = "", l = "", y = O();
352
- function f() {
363
+ function ye(t, e, l) {
364
+ var R;
365
+ const r = "", c = "", p = O();
366
+ function i() {
353
367
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
354
368
  }
355
369
  function j() {
356
370
  return !1;
357
371
  }
358
- function d() {
372
+ function b() {
359
373
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
360
374
  }
361
375
  function n() {
362
376
  return (e == null ? void 0 : e.schema.componentType) === "frame";
363
377
  }
364
- function u(h) {
365
- if (!h || !h.value)
378
+ function f(d) {
379
+ if (!d || !d.value)
366
380
  return null;
367
- if (h.value.schema && h.value.schema.type === "component")
368
- return h.value;
369
- const r = O(h == null ? void 0 : h.value.parent), s = u(r);
381
+ if (d.value.schema && d.value.schema.type === "component")
382
+ return d.value;
383
+ const a = O(d == null ? void 0 : d.value.parent), s = f(a);
370
384
  return s || null;
371
385
  }
372
- function p(h = e) {
373
- const { componentInstance: r, designerItemElementRef: s } = h;
374
- return !r || !r.value ? null : r.value.canMove ? s : p(h.parent);
386
+ function v(d = e) {
387
+ const { componentInstance: a, designerItemElementRef: s } = d;
388
+ return !a || !a.value ? null : a.value.canMove ? s : v(d.parent);
375
389
  }
376
- function v(h) {
377
- return !!a;
390
+ function h(d) {
391
+ return !!l;
378
392
  }
379
- function k() {
393
+ function S() {
380
394
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
381
395
  }
382
- function S() {
396
+ function k() {
383
397
  }
384
- function P(h, r) {
398
+ function T(d, a) {
385
399
  }
386
- function D(h, r) {
387
- const { componentType: s } = h;
388
- let g = W(s, h, r);
400
+ function D(d, a) {
401
+ const { componentType: s } = d;
402
+ let y = H(s, d, a);
389
403
  const o = s.toLowerCase().replace(/-/g, "_");
390
- return g && !g.id && g.type === s && (g.id = `${o}_${Math.random().toString().slice(2, 6)}`), g;
404
+ return y && !y.id && y.type === s && (y.id = `${o}_${Math.random().toString().slice(2, 6)}`), y;
391
405
  }
392
- function M(h) {
406
+ function M(d) {
393
407
  }
394
- function R(...h) {
408
+ function w(...d) {
395
409
  }
396
- function T() {
397
- e != null && e.schema.contents && e.schema.contents.map((h) => {
398
- var g;
399
- let r = h.id;
400
- h.type === "component-ref" && (r = h.component);
401
- const s = t.value.querySelector(`#${r}-design-item`);
402
- (g = s == null ? void 0 : s.componentInstance) != null && g.value.onRemoveComponent && s.componentInstance.value.onRemoveComponent();
410
+ function P() {
411
+ e != null && e.schema.contents && e.schema.contents.map((d) => {
412
+ var y;
413
+ let a = d.id;
414
+ d.type === "component-ref" && (a = d.component);
415
+ const s = t.value.querySelector(`#${a}-design-item`);
416
+ (y = s == null ? void 0 : s.componentInstance) != null && y.value.onRemoveComponent && s.componentInstance.value.onRemoveComponent();
403
417
  });
404
418
  }
405
- return y.value = {
406
- canMove: f(),
419
+ return p.value = {
420
+ canMove: i(),
407
421
  canSelectParent: j(),
408
- canDelete: d(),
422
+ canDelete: b(),
409
423
  canNested: !n(),
410
424
  contents: e == null ? void 0 : e.schema.contents,
411
425
  elementRef: t,
412
- parent: (w = e == null ? void 0 : e.parent) == null ? void 0 : w.componentInstance,
426
+ parent: (R = e == null ? void 0 : e.parent) == null ? void 0 : R.componentInstance,
413
427
  schema: e == null ? void 0 : e.schema,
414
- styles: c,
415
- designerClass: l,
416
- canAccepts: v,
417
- getBelongedComponentInstance: u,
418
- getDraggableDesignItemElement: p,
419
- getDraggingDisplayText: k,
420
- getPropConfig: R,
421
- getDragScopeElement: S,
422
- onAcceptMovedChildElement: P,
428
+ styles: r,
429
+ designerClass: c,
430
+ canAccepts: h,
431
+ getBelongedComponentInstance: f,
432
+ getDraggableDesignItemElement: v,
433
+ getDraggingDisplayText: S,
434
+ getPropConfig: w,
435
+ getDragScopeElement: k,
436
+ onAcceptMovedChildElement: T,
423
437
  onChildElementMovedOut: M,
424
438
  addNewChildComponentSchema: D,
425
439
  triggerBelongedComponentToMoveWhenMoved: O(!1),
426
440
  triggerBelongedComponentToDeleteWhenDeleted: O(!1),
427
- onRemoveComponent: T
428
- }, y;
441
+ onRemoveComponent: P
442
+ }, p;
429
443
  }
430
- const ye = /* @__PURE__ */ V({
444
+ const ge = /* @__PURE__ */ F({
431
445
  name: "FStepDesign",
432
- props: A,
446
+ props: B,
433
447
  emits: [],
434
448
  setup(t, e) {
435
- const a = O(t.direction), c = O(t.fill), l = O(t.height), y = O(t.steps), f = O(0), j = O(t.clickable), d = O(0), n = O(), u = G("design-item-context"), p = ge(n, u);
436
- J(() => {
437
- n.value.componentInstance = p;
438
- }), e.expose(p.value);
439
- const v = E(() => ({
440
- "f-progress-step-list": a.value === "horizontal",
441
- "f-progress-step-list-block": a.value === "vertical",
442
- "f-progress-step-horizontal-fill": a.value === "horizontal" && c.value,
443
- "f-progress-step-vertical-fill": a.value === "vertical" && c.value
444
- })), k = E(() => ({
445
- height: a.value === "vertical" ? `${l.value}px` : ""
449
+ const l = O(t.direction), r = O(t.fill), c = O(t.height), p = O(t.steps), i = O(0), j = O(t.clickable), b = O(0), n = O(), f = J("design-item-context"), v = ye(n, f);
450
+ Q(() => {
451
+ n.value.componentInstance = v;
452
+ }), e.expose(v.value);
453
+ const h = $(() => ({
454
+ "f-progress-step-list": l.value === "horizontal",
455
+ "f-progress-step-list-block": l.value === "vertical",
456
+ "f-progress-step-horizontal-fill": l.value === "horizontal" && r.value,
457
+ "f-progress-step-vertical-fill": l.value === "vertical" && r.value
458
+ })), S = $(() => ({
459
+ height: l.value === "vertical" ? `${c.value}px` : ""
446
460
  }));
447
- function S(o, i) {
461
+ function k(o, u) {
448
462
  const m = {
449
463
  step: !0,
450
- active: i === f.value,
464
+ active: u === i.value,
451
465
  clickable: j.value,
452
466
  "click-disable": o.disable,
453
- current: i === f.value
467
+ current: u === i.value
454
468
  };
455
- return i < f.value && (m.finish = !0), o.status && (m[o.status] = !0), o.hasOwnProperty("class") && o.class.split(" ").reduce(($, N) => ($[N] = !0, $), m), m;
469
+ return u < i.value && (m.finish = !0), o.status && (m[o.status] = !0), o.hasOwnProperty("class") && o.class.split(" ").reduce((E, N) => (E[N] = !0, E), m), m;
456
470
  }
457
- function P(o, i) {
471
+ function T(o, u) {
458
472
  }
459
- function D(o, i) {
473
+ function D(o, u) {
460
474
  const m = {
461
475
  "f-progressstep-row": !0,
462
- "step-active": i === f.value,
463
- "step-current": i === f.value
476
+ "step-active": u === i.value,
477
+ "step-current": u === i.value
464
478
  };
465
- return i < f.value && (m["step-finish"] = !0), o.status && (m["step-" + o.status] = !0), m;
479
+ return u < i.value && (m["step-finish"] = !0), o.status && (m["step-" + o.status] = !0), m;
466
480
  }
467
- function M(o, i) {
481
+ function M(o, u) {
468
482
  const m = {
469
483
  "step-icon": !0,
470
- "step-success": i,
471
- "k-icon": i,
472
- "k-i-check": i
484
+ "step-success": u,
485
+ "k-icon": u,
486
+ "k-i-check": u
473
487
  };
474
- return o.hasOwnProperty("icon") && o.class.split(" ").reduce(($, N) => ($[N] = !0, $), m), m;
488
+ return o.hasOwnProperty("icon") && o.class.split(" ").reduce((E, N) => (E[N] = !0, E), m), m;
475
489
  }
476
- function R(o, i) {
490
+ function w(o, u) {
477
491
  const m = [];
478
- return o.icon ? m.push(b("span", {
492
+ return o.icon ? m.push(g("span", {
479
493
  class: M(o, !1)
480
- }, null)) : i >= f.value || i === d.value ? m.push(b("span", {
494
+ }, null)) : u >= i.value || u === b.value ? m.push(g("span", {
481
495
  class: "step-icon"
482
- }, [i + 1])) : m.push(b("span", {
496
+ }, [u + 1])) : m.push(g("span", {
483
497
  class: M(o, !0)
484
498
  }, null)), m;
485
499
  }
486
- function T(o, i) {
500
+ function P(o, u) {
487
501
  return {
488
502
  "step-name": !0,
489
- "step-name-success": i < f.value
503
+ "step-name-success": u < i.value
490
504
  };
491
505
  }
492
- function w(o, i) {
493
- return b("div", {
506
+ function R(o, u) {
507
+ return g("div", {
494
508
  class: "f-progress-step-title"
495
- }, [b("p", {
496
- class: T(o, i)
509
+ }, [g("p", {
510
+ class: P(o, u)
497
511
  }, [o.title])]);
498
512
  }
499
- function h(o, i) {
513
+ function d(o, u) {
500
514
  return {
501
515
  "f-progress-step-line": !0,
502
- "f-progress-step-line-success": i === f.value
516
+ "f-progress-step-line-success": u === i.value
503
517
  };
504
518
  }
505
- function r(o, i) {
506
- return i !== y.value.length - 1;
519
+ function a(o, u) {
520
+ return u !== p.value.length - 1;
507
521
  }
508
- const s = E(() => ({
522
+ const s = $(() => ({
509
523
  triangle: !0,
510
- "": a.value === "vertical"
524
+ "": l.value === "vertical"
511
525
  }));
512
- function g() {
513
- return y.value.map((o, i) => b("li", {
514
- class: S(o, i),
526
+ function y() {
527
+ return p.value.map((o, u) => g("li", {
528
+ class: k(o, u),
515
529
  onClick: (m) => void 0
516
- }, [b("div", {
517
- class: D(o, i)
518
- }, [b("div", {
530
+ }, [g("div", {
531
+ class: D(o, u)
532
+ }, [g("div", {
519
533
  class: "f-progress-step-content"
520
- }, [R(o, i), w(o, i)]), r(o, i) && b("div", {
521
- class: h(o, i)
522
- }, [b("span", {
534
+ }, [w(o, u), R(o, u)]), a(o, u) && g("div", {
535
+ class: d(o, u)
536
+ }, [g("span", {
523
537
  class: s.value
524
538
  }, null)])])]));
525
539
  }
526
- return () => b("div", {
540
+ return () => g("div", {
527
541
  ref: n,
528
542
  class: "f-progress-step"
529
- }, [b("ul", {
530
- class: v.value,
531
- style: k.value
532
- }, [g()])]);
543
+ }, [g("ul", {
544
+ class: h.value,
545
+ style: S.value
546
+ }, [y()])]);
533
547
  }
534
- }), me = {
548
+ }), Oe = {
535
549
  install(t) {
536
550
  t.component(L.name, L);
537
551
  },
538
- register(t, e, a, c) {
539
- t.step = L, e.step = F;
552
+ register(t, e, l, r) {
553
+ t.step = L, e.step = z;
540
554
  },
541
- registerDesigner(t, e, a) {
542
- t.step = ye, e.step = F;
555
+ registerDesigner(t, e, l) {
556
+ t.step = ge, e.step = z;
543
557
  }
544
558
  };
545
559
  export {
546
560
  L as Step,
547
- me as default,
548
- F as propsResolver,
549
- A as stepProps
561
+ Oe as default,
562
+ z as propsResolver,
563
+ B as stepProps
550
564
  };