@farris/ui-vue 1.2.9 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/components/accordion/index.esm.js +63 -63
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +402 -323
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.css +1 -1
  6. package/components/button-edit/index.esm.js +98 -96
  7. package/components/button-edit/index.umd.cjs +1 -1
  8. package/components/calendar/index.esm.js +66 -66
  9. package/components/calendar/index.umd.cjs +1 -1
  10. package/components/capsule/index.esm.js +118 -118
  11. package/components/capsule/index.umd.cjs +1 -1
  12. package/components/checkbox/index.esm.js +539 -460
  13. package/components/checkbox/index.umd.cjs +1 -1
  14. package/components/color-picker/index.esm.js +135 -135
  15. package/components/color-picker/index.umd.cjs +2 -2
  16. package/components/combo-list/index.css +1 -0
  17. package/components/combo-list/index.esm.js +1007 -312
  18. package/components/combo-list/index.umd.cjs +1 -1
  19. package/components/combo-tree/index.esm.js +97 -97
  20. package/components/combo-tree/index.umd.cjs +1 -1
  21. package/components/common/index.esm.js +778 -700
  22. package/components/common/index.umd.cjs +1 -1
  23. package/components/component/index.esm.js +472 -329
  24. package/components/component/index.umd.cjs +1 -1
  25. package/components/condition/index.css +1 -0
  26. package/components/condition/index.esm.js +2231 -1055
  27. package/components/condition/index.umd.cjs +1 -1
  28. package/components/content-container/index.esm.js +79 -79
  29. package/components/content-container/index.umd.cjs +1 -1
  30. package/components/data-grid/index.css +1 -1
  31. package/components/data-grid/index.esm.js +6408 -5034
  32. package/components/data-grid/index.umd.cjs +1 -1
  33. package/components/data-view/index.css +1 -0
  34. package/components/data-view/index.esm.js +4762 -3511
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.css +1 -1
  37. package/components/date-picker/index.esm.js +3442 -2742
  38. package/components/date-picker/index.umd.cjs +1 -1
  39. package/components/designer-outline/index.esm.js +14 -13
  40. package/components/designer-outline/index.umd.cjs +1 -1
  41. package/components/dropdown/index.esm.js +73 -73
  42. package/components/dropdown/index.umd.cjs +2 -2
  43. package/components/dynamic-form/index.css +1 -0
  44. package/components/dynamic-form/index.esm.js +2597 -1141
  45. package/components/dynamic-form/index.umd.cjs +1 -1
  46. package/components/dynamic-resolver/index.esm.js +114 -71
  47. package/components/dynamic-resolver/index.umd.cjs +1 -1
  48. package/components/dynamic-view/index.esm.js +303 -290
  49. package/components/dynamic-view/index.umd.cjs +1 -1
  50. package/components/events-editor/index.esm.js +171 -171
  51. package/components/events-editor/index.umd.cjs +1 -1
  52. package/components/expression-editor/index.esm.js +65 -65
  53. package/components/expression-editor/index.umd.cjs +1 -1
  54. package/components/external-container/index.css +1 -1
  55. package/components/external-container/index.esm.js +3075 -2586
  56. package/components/external-container/index.umd.cjs +1 -1
  57. package/components/field-selector/index.css +1 -1
  58. package/components/field-selector/index.esm.js +5272 -8511
  59. package/components/field-selector/index.umd.cjs +1 -1
  60. package/components/filter-bar/index.css +1 -1
  61. package/components/filter-bar/index.esm.js +1726 -1822
  62. package/components/filter-bar/index.umd.cjs +1 -1
  63. package/components/image-cropper/index.esm.js +126 -126
  64. package/components/image-cropper/index.umd.cjs +1 -1
  65. package/components/input-group/index.esm.js +620 -540
  66. package/components/input-group/index.umd.cjs +1 -1
  67. package/components/layout/index.esm.js +88 -88
  68. package/components/layout/index.umd.cjs +1 -1
  69. package/components/list-nav/index.esm.js +71 -71
  70. package/components/list-nav/index.umd.cjs +1 -1
  71. package/components/list-view/index.css +1 -1
  72. package/components/list-view/index.esm.js +3582 -2356
  73. package/components/list-view/index.umd.cjs +1 -1
  74. package/components/lookup/index.css +1 -1
  75. package/components/lookup/index.esm.js +10752 -8972
  76. package/components/lookup/index.umd.cjs +1 -1
  77. package/components/mapping-editor/index.css +1 -1
  78. package/components/mapping-editor/index.esm.js +5601 -5329
  79. package/components/mapping-editor/index.umd.cjs +1 -1
  80. package/components/message-box/index.css +1 -1
  81. package/components/message-box/index.esm.js +511 -471
  82. package/components/message-box/index.umd.cjs +1 -1
  83. package/components/modal/index.css +1 -1
  84. package/components/modal/index.esm.js +438 -398
  85. package/components/modal/index.umd.cjs +1 -1
  86. package/components/nav/index.esm.js +535 -452
  87. package/components/nav/index.umd.cjs +2 -2
  88. package/components/notify/index.esm.js +59 -53
  89. package/components/notify/index.umd.cjs +1 -1
  90. package/components/number-range/index.esm.js +556 -477
  91. package/components/number-range/index.umd.cjs +1 -1
  92. package/components/number-spinner/index.esm.js +504 -425
  93. package/components/number-spinner/index.umd.cjs +1 -1
  94. package/components/order/index.css +1 -1
  95. package/components/order/index.esm.js +1833 -1054
  96. package/components/order/index.umd.cjs +1 -1
  97. package/components/page-footer/index.esm.js +100 -100
  98. package/components/page-footer/index.umd.cjs +1 -1
  99. package/components/page-header/index.esm.js +899 -870
  100. package/components/page-header/index.umd.cjs +1 -1
  101. package/components/pagination/index.esm.js +576 -487
  102. package/components/pagination/index.umd.cjs +1 -1
  103. package/components/popover/index.esm.js +71 -70
  104. package/components/popover/index.umd.cjs +1 -1
  105. package/components/progress/index.esm.js +73 -73
  106. package/components/progress/index.umd.cjs +2 -2
  107. package/components/property-editor/index.css +1 -1
  108. package/components/property-editor/index.esm.js +1916 -1220
  109. package/components/property-editor/index.umd.cjs +3 -3
  110. package/components/property-panel/index.esm.js +783 -886
  111. package/components/property-panel/index.umd.cjs +1 -1
  112. package/components/query-solution/index.css +1 -1
  113. package/components/query-solution/index.esm.js +3632 -2556
  114. package/components/query-solution/index.umd.cjs +1 -1
  115. package/components/radio-button/index.esm.js +72 -72
  116. package/components/radio-button/index.umd.cjs +1 -1
  117. package/components/radio-group/index.esm.js +484 -405
  118. package/components/radio-group/index.umd.cjs +1 -1
  119. package/components/rate/index.esm.js +152 -152
  120. package/components/rate/index.umd.cjs +1 -1
  121. package/components/response-layout/index.esm.js +73 -73
  122. package/components/response-layout/index.umd.cjs +1 -1
  123. package/components/response-layout-editor/index.css +1 -1
  124. package/components/response-layout-editor/index.esm.js +1081 -1043
  125. package/components/response-layout-editor/index.umd.cjs +1 -1
  126. package/components/response-toolbar/index.esm.js +753 -738
  127. package/components/response-toolbar/index.umd.cjs +1 -1
  128. package/components/schema-selector/index.css +1 -1
  129. package/components/schema-selector/index.esm.js +4418 -4177
  130. package/components/schema-selector/index.umd.cjs +2 -2
  131. package/components/search-box/index.esm.js +119 -119
  132. package/components/search-box/index.umd.cjs +1 -1
  133. package/components/section/index.esm.js +92 -91
  134. package/components/section/index.umd.cjs +1 -1
  135. package/components/smoke-detector/index.esm.js +59 -59
  136. package/components/smoke-detector/index.umd.cjs +1 -1
  137. package/components/splitter/index.esm.js +103 -103
  138. package/components/splitter/index.umd.cjs +1 -1
  139. package/components/step/index.esm.js +85 -85
  140. package/components/step/index.umd.cjs +1 -1
  141. package/components/switch/index.esm.js +457 -378
  142. package/components/switch/index.umd.cjs +1 -1
  143. package/components/tabs/index.css +1 -1
  144. package/components/tabs/index.esm.js +1696 -1617
  145. package/components/tabs/index.umd.cjs +1 -1
  146. package/components/tags/index.esm.js +53 -53
  147. package/components/tags/index.umd.cjs +1 -1
  148. package/components/text/index.esm.js +268 -268
  149. package/components/text/index.umd.cjs +1 -1
  150. package/components/textarea/index.esm.js +420 -341
  151. package/components/textarea/index.umd.cjs +1 -1
  152. package/components/time-picker/index.css +1 -1
  153. package/components/time-picker/index.esm.js +1062 -981
  154. package/components/time-picker/index.umd.cjs +1 -1
  155. package/components/transfer/index.css +1 -1
  156. package/components/transfer/index.esm.js +381 -379
  157. package/components/transfer/index.umd.cjs +1 -1
  158. package/components/tree-grid/index.css +1 -1
  159. package/components/tree-grid/index.esm.js +5252 -9560
  160. package/components/tree-grid/index.umd.cjs +1 -1
  161. package/components/tree-view/index.css +1 -0
  162. package/components/tree-view/index.esm.js +3920 -2692
  163. package/components/tree-view/index.umd.cjs +1 -1
  164. package/components/uploader/index.esm.js +373 -367
  165. package/components/uploader/index.umd.cjs +2 -2
  166. package/components/verify-detail/index.esm.js +92 -92
  167. package/components/verify-detail/index.umd.cjs +1 -1
  168. package/components/video/index.esm.js +597 -417
  169. package/components/video/index.umd.cjs +1 -1
  170. package/components/weather/index.esm.js +251 -251
  171. package/components/weather/index.umd.cjs +4 -4
  172. package/farris.all.esm.js +17125 -16176
  173. package/farris.all.umd.cjs +8 -8
  174. package/index.css +1 -1
  175. package/package.json +1 -1
  176. package/types/capsule/src/capsule.props.d.ts +2 -2
  177. package/types/combo-list/src/components/list-container.component.d.ts +0 -3
  178. package/types/combo-list/src/components/list-container.props.d.ts +0 -4
  179. package/types/common/index.d.ts +1 -0
  180. package/types/common/types.d.ts +1 -1
  181. package/types/common/utils/encrypt.d.ts +2 -0
  182. package/types/component/src/component.props.d.ts +7 -0
  183. package/types/component/src/designer/use-designer-rules.d.ts +1 -1
  184. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  185. package/types/components.d.ts +1 -0
  186. package/types/data-grid/index.d.ts +5 -2
  187. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  188. package/types/data-grid/src/data-grid.props.d.ts +1 -0
  189. package/types/data-view/composition/types.d.ts +18 -1
  190. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  191. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  192. package/types/designer-canvas/src/composition/types.d.ts +1 -1
  193. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  194. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  195. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  196. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  197. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  198. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  199. package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
  200. package/types/dynamic-form/src/types.d.ts +12 -1
  201. package/types/dynamic-resolver/index.d.ts +1 -0
  202. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  203. package/types/dynamic-resolver/src/types.d.ts +9 -0
  204. package/types/dynamic-view/index.d.ts +1 -0
  205. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  206. package/types/index.d.ts +2 -0
  207. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  208. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  209. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  210. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  211. package/types/lookup/src/composition/types.d.ts +8 -0
  212. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  213. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  214. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  215. package/types/lookup/src/composition/use-http.d.ts +9 -5
  216. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  217. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  218. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  219. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  220. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  221. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  222. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  223. package/types/modal/src/modal.component.d.ts +3 -0
  224. package/types/modal/src/modal.props.d.ts +4 -0
  225. package/types/page-header/src/page-header.props.d.ts +1 -0
  226. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  227. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  228. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  229. package/types/response-layout-editor/src/type.d.ts +21 -0
  230. package/types/tabs/src/tabs.props.d.ts +1 -0
  231. package/types/tree-grid/index.d.ts +8 -2
  232. package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
  233. package/types/data-grid/src/designer/use-group-column.d.ts +0 -20
  234. package/types/modal/src/composition/use-esc.d.ts +0 -1
  235. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  236. package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
@@ -1,43 +1,43 @@
1
- import { defineComponent as F, ref as m, computed as N, watch as C, createVNode as d, inject as W, onMounted as J } from "vue";
2
- import { cloneDeep as G } from "lodash-es";
3
- const q = {}, _ = {};
1
+ import { defineComponent as q, ref as m, computed as N, watch as W, createVNode as d, inject as J, onMounted as G } from "vue";
2
+ import { isPlainObject as F, cloneDeep as H } from "lodash-es";
3
+ const _ = {}, C = {};
4
4
  function B(t) {
5
- const { properties: e, title: i, ignore: l } = t, o = l && Array.isArray(l), y = Object.keys(e).reduce((f, O) => ((!o || !l.find((b) => b == O)) && (f[O] = e[O].type === "object" && e[O].properties ? B(e[O]) : G(e[O].default)), f), {});
6
- return (!o || !l.find((f) => f == "id")) && (y.id = `${i}-${Date.now()}`), y;
5
+ const { properties: e, title: o, ignore: l } = t, i = l && Array.isArray(l), y = Object.keys(e).reduce((f, O) => ((!i || !l.find((b) => b == O)) && (f[O] = e[O].type === "object" && e[O].properties ? B(e[O]) : H(e[O].default)), f), {});
6
+ return (!i || !l.find((f) => f == "id")) && (y.id = `${o}-${Date.now()}`), y;
7
7
  }
8
- function L(t, e = {}, i) {
9
- const l = q[t];
8
+ function L(t, e = {}, o) {
9
+ const l = _[t];
10
10
  if (l) {
11
- let o = B(l);
12
- const y = _[t];
13
- return o = y ? y({ getSchemaByType: L }, o, e, i) : o, o;
11
+ let i = B(l);
12
+ const y = C[t];
13
+ return i = y ? y({ getSchemaByType: L }, i, e, o) : i, i;
14
14
  }
15
15
  return null;
16
16
  }
17
- function H(t, e) {
18
- const i = B(e);
19
- return Object.keys(t).reduce((l, o) => (l[o] && typeof l[o] == "object" ? Object.assign(l[o], t[o]) : l[o] = t[o], l), i), i;
20
- }
21
17
  function Q(t, e) {
22
- return Object.keys(t).filter((l) => t[l] != null).reduce((l, o) => {
23
- if (e.has(o)) {
24
- const y = e.get(o);
18
+ const o = B(e);
19
+ return Object.keys(t).reduce((l, i) => (l[i] && F(l[i]) && F(t[i]) ? Object.assign(l[i], t[i]) : l[i] = t[i], l), o), o;
20
+ }
21
+ function U(t, e) {
22
+ return Object.keys(t).filter((l) => t[l] != null).reduce((l, i) => {
23
+ if (e.has(i)) {
24
+ const y = e.get(i);
25
25
  if (typeof y == "string")
26
- l[y] = t[o];
26
+ l[y] = t[i];
27
27
  else {
28
- const f = y(o, t[o], t);
28
+ const f = y(i, t[i], t);
29
29
  Object.assign(l, f);
30
30
  }
31
31
  } else
32
- l[o] = t[o];
32
+ l[i] = t[i];
33
33
  return l;
34
34
  }, {});
35
35
  }
36
- function U(t, e, i = /* @__PURE__ */ new Map()) {
37
- const l = H(t, e);
38
- return Q(l, i);
36
+ function X(t, e, o = /* @__PURE__ */ new Map()) {
37
+ const l = Q(t, e);
38
+ return U(l, o);
39
39
  }
40
- function X(t = {}) {
40
+ function Y(t = {}) {
41
41
  function e(c, v, u, h) {
42
42
  if (typeof u == "number")
43
43
  return h[c].length === u;
@@ -52,15 +52,15 @@ function X(t = {}) {
52
52
  }
53
53
  return !1;
54
54
  }
55
- function i(c, v, u, h) {
55
+ function o(c, v, u, h) {
56
56
  return h[c] && h[c].propertyValue && String(h[c].propertyValue.value) === String(u);
57
57
  }
58
58
  const l = /* @__PURE__ */ new Map([
59
59
  ["length", e],
60
- ["getProperty", i]
60
+ ["getProperty", o]
61
61
  ]);
62
62
  Object.keys(t).reduce((c, v) => (c.set(v, t[v]), c), l);
63
- function o(c, v) {
63
+ function i(c, v) {
64
64
  const u = c;
65
65
  return typeof v == "number" ? [{ target: u, operator: "length", param: null, value: Number(v) }] : typeof v == "boolean" ? [{ target: u, operator: "getProperty", param: c, value: !!v }] : typeof v == "object" ? Object.keys(v).map((h) => {
66
66
  if (h === "length")
@@ -71,7 +71,7 @@ function X(t = {}) {
71
71
  }
72
72
  function y(c) {
73
73
  return Object.keys(c).reduce((u, h) => {
74
- const j = o(h, c[h]);
74
+ const j = i(h, c[h]);
75
75
  return u.push(...j), u;
76
76
  }, []);
77
77
  }
@@ -91,24 +91,24 @@ function X(t = {}) {
91
91
  }
92
92
  return { parseValueSchema: b };
93
93
  }
94
- const Y = {}, Z = {};
95
- X();
96
- function K(t, e, i = /* @__PURE__ */ new Map(), l = (f, O, b) => O, o = {}, y = (f) => f) {
97
- return q[e.title] = e, _[e.title] = l, Y[e.title] = o, Z[e.title] = y, (f = {}) => {
98
- const O = U(f, e, i), b = Object.keys(t).reduce((c, v) => (c[v] = t[v].default, c), {});
94
+ const Z = {}, K = {};
95
+ Y();
96
+ function x(t, e, o = /* @__PURE__ */ new Map(), l = (f, O, b) => O, i = {}, y = (f) => f) {
97
+ return _[e.title] = e, C[e.title] = l, Z[e.title] = i, K[e.title] = y, (f = {}) => {
98
+ const O = X(f, e, o), b = Object.keys(t).reduce((c, v) => (c[v] = t[v].default, c), {});
99
99
  return Object.assign(b, O);
100
100
  };
101
101
  }
102
- function x(t, e) {
102
+ function I(t, e) {
103
103
  return { customClass: e.class, customStyle: e.style };
104
104
  }
105
- const I = /* @__PURE__ */ new Map([
106
- ["appearance", x]
105
+ const ee = /* @__PURE__ */ new Map([
106
+ ["appearance", I]
107
107
  ]);
108
- function ee(t, e, i) {
108
+ function te(t, e, o) {
109
109
  return e;
110
110
  }
111
- const te = "https://json-schema.org/draft/2020-12/schema", se = "https://farris-design.gitee.io/step.schema.json", re = "step", ne = "A Farris Component", ce = "object", le = {
111
+ const se = "https://json-schema.org/draft/2020-12/schema", re = "https://farris-design.gitee.io/step.schema.json", ne = "step", ce = "A Farris Component", le = "object", ae = {
112
112
  id: {
113
113
  description: "The unique identifier for step",
114
114
  type: "string"
@@ -170,18 +170,18 @@ const te = "https://json-schema.org/draft/2020-12/schema", se = "https://farris-
170
170
  type: "boolean",
171
171
  default: !0
172
172
  }
173
- }, ae = [
173
+ }, ie = [
174
174
  "id",
175
175
  "type"
176
176
  ], oe = {
177
- $schema: te,
178
- $id: se,
179
- title: re,
180
- description: ne,
181
- type: ce,
182
- properties: le,
183
- required: ae
184
- }, ie = "step", ue = "A Farris Component", pe = "object", fe = {
177
+ $schema: se,
178
+ $id: re,
179
+ title: ne,
180
+ description: ce,
181
+ type: le,
182
+ properties: ae,
183
+ required: ie
184
+ }, ue = "step", pe = "A Farris Component", fe = "object", ve = {
185
185
  basic: {
186
186
  description: "Basic Infomation",
187
187
  title: "基本信息",
@@ -203,12 +203,12 @@ const te = "https://json-schema.org/draft/2020-12/schema", se = "https://farris-
203
203
  }
204
204
  }
205
205
  }
206
- }, ve = {
207
- title: ie,
208
- description: ue,
209
- type: pe,
210
- categories: fe
211
- }, V = {
206
+ }, he = {
207
+ title: ue,
208
+ description: pe,
209
+ type: fe,
210
+ categories: ve
211
+ }, z = {
212
212
  /** 步骤条方向 */
213
213
  direction: { type: String, default: "horizontal" },
214
214
  /** 是否平铺 */
@@ -238,18 +238,18 @@ const te = "https://json-schema.org/draft/2020-12/schema", se = "https://farris-
238
238
  /** 步骤条点击后事件 */
239
239
  onClick: { type: Function, default: () => {
240
240
  } }
241
- }, z = K(V, oe, I, ee, ve), A = /* @__PURE__ */ F({
241
+ }, V = x(z, oe, ee, te, he), A = /* @__PURE__ */ q({
242
242
  name: "FStep",
243
- props: V,
243
+ props: z,
244
244
  emits: ["click"],
245
245
  setup(t, e) {
246
- const i = m(t.direction), l = m(t.fill), o = m(t.height), y = m(t.steps), f = m(t.clickable), O = m(0), b = m(t.activeIndex), c = N(() => ({
247
- "f-progress-step-list": i.value === "horizontal",
248
- "f-progress-step-list-block": i.value === "vertical",
249
- "f-progress-step-horizontal-fill": i.value === "horizontal" && l.value,
250
- "f-progress-step-vertical-fill": i.value === "vertical" && l.value
246
+ const o = m(t.direction), l = m(t.fill), i = m(t.height), y = m(t.steps), f = m(t.clickable), O = m(0), b = m(t.activeIndex), c = N(() => ({
247
+ "f-progress-step-list": o.value === "horizontal",
248
+ "f-progress-step-list-block": o.value === "vertical",
249
+ "f-progress-step-horizontal-fill": o.value === "horizontal" && l.value,
250
+ "f-progress-step-vertical-fill": o.value === "vertical" && l.value
251
251
  })), v = N(() => ({
252
- height: i.value === "vertical" ? `${o.value}px` : ""
252
+ height: o.value === "vertical" ? `${i.value}px` : ""
253
253
  }));
254
254
  function u(s, r) {
255
255
  const p = {
@@ -316,7 +316,7 @@ const te = "https://json-schema.org/draft/2020-12/schema", se = "https://farris-
316
316
  }
317
317
  const $ = N(() => ({
318
318
  triangle: !0,
319
- "": i.value === "vertical"
319
+ "": o.value === "vertical"
320
320
  }));
321
321
  function M() {
322
322
  return y.value.map((s, r) => d("li", {
@@ -332,7 +332,7 @@ const te = "https://json-schema.org/draft/2020-12/schema", se = "https://farris-
332
332
  class: $.value
333
333
  }, null)])])]));
334
334
  }
335
- return C(() => t.activeIndex, () => {
335
+ return W(() => t.activeIndex, () => {
336
336
  t.activeIndex > -1 && t.activeIndex <= y.value.length && (b.value = t.activeIndex, M());
337
337
  }), () => d("div", {
338
338
  class: "f-progress-step"
@@ -342,11 +342,11 @@ const te = "https://json-schema.org/draft/2020-12/schema", se = "https://farris-
342
342
  }, [M()])]);
343
343
  }
344
344
  });
345
- function he(t, e, i) {
345
+ function ge(t, e, o) {
346
346
  var M;
347
347
  function l() {
348
348
  }
349
- const o = "", y = "", f = m();
349
+ const i = "", y = "", f = m();
350
350
  function O() {
351
351
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
352
352
  }
@@ -372,7 +372,7 @@ function he(t, e, i) {
372
372
  return !r || !r.value ? null : r.value.canMove ? p : h(s.parent);
373
373
  }
374
374
  function j(s) {
375
- return !!i;
375
+ return !!o;
376
376
  }
377
377
  function k() {
378
378
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
@@ -407,7 +407,7 @@ function he(t, e, i) {
407
407
  elementRef: t,
408
408
  parent: (M = e == null ? void 0 : e.parent) == null ? void 0 : M.componentInstance,
409
409
  schema: e == null ? void 0 : e.schema,
410
- styles: o,
410
+ styles: i,
411
411
  designerClass: y,
412
412
  canAccepts: j,
413
413
  getBelongedComponentInstance: u,
@@ -424,22 +424,22 @@ function he(t, e, i) {
424
424
  triggerBelongedComponentToDeleteWhenDeleted: m(!1)
425
425
  }, f;
426
426
  }
427
- const ge = /* @__PURE__ */ F({
427
+ const de = /* @__PURE__ */ q({
428
428
  name: "FStepDesign",
429
- props: V,
429
+ props: z,
430
430
  emits: [],
431
431
  setup(t, e) {
432
- const i = m(t.direction), l = m(t.fill), o = m(t.height), y = m(t.steps), f = m(0), O = m(t.clickable), b = m(0), c = m(), v = W("design-item-context"), u = he(c, v);
433
- J(() => {
432
+ const o = m(t.direction), l = m(t.fill), i = m(t.height), y = m(t.steps), f = m(0), O = m(t.clickable), b = m(0), c = m(), v = J("design-item-context"), u = ge(c, v);
433
+ G(() => {
434
434
  c.value.componentInstance = u;
435
435
  }), e.expose(u.value);
436
436
  const h = N(() => ({
437
- "f-progress-step-list": i.value === "horizontal",
438
- "f-progress-step-list-block": i.value === "vertical",
439
- "f-progress-step-horizontal-fill": i.value === "horizontal" && l.value,
440
- "f-progress-step-vertical-fill": i.value === "vertical" && l.value
437
+ "f-progress-step-list": o.value === "horizontal",
438
+ "f-progress-step-list-block": o.value === "vertical",
439
+ "f-progress-step-horizontal-fill": o.value === "horizontal" && l.value,
440
+ "f-progress-step-vertical-fill": o.value === "vertical" && l.value
441
441
  })), j = N(() => ({
442
- height: i.value === "vertical" ? `${o.value}px` : ""
442
+ height: o.value === "vertical" ? `${i.value}px` : ""
443
443
  }));
444
444
  function k(n, a) {
445
445
  const g = {
@@ -504,7 +504,7 @@ const ge = /* @__PURE__ */ F({
504
504
  }
505
505
  const r = N(() => ({
506
506
  triangle: !0,
507
- "": i.value === "vertical"
507
+ "": o.value === "vertical"
508
508
  }));
509
509
  function p() {
510
510
  return y.value.map((n, a) => d("li", {
@@ -528,20 +528,20 @@ const ge = /* @__PURE__ */ F({
528
528
  style: j.value
529
529
  }, [p()])]);
530
530
  }
531
- }), be = {
531
+ }), me = {
532
532
  install(t) {
533
533
  t.component(A.name, A);
534
534
  },
535
- register(t, e, i, l) {
536
- t.step = A, e.step = z;
535
+ register(t, e, o, l) {
536
+ t.step = A, e.step = V;
537
537
  },
538
- registerDesigner(t, e, i) {
539
- t.step = ge, e.step = z;
538
+ registerDesigner(t, e, o) {
539
+ t.step = de, e.step = V;
540
540
  }
541
541
  };
542
542
  export {
543
543
  A as Step,
544
- be as default,
545
- z as propsResolver,
546
- V as stepProps
544
+ me as default,
545
+ V as propsResolver,
546
+ z as stepProps
547
547
  };
@@ -1 +1 @@
1
- (function(N,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es"],t):(N=typeof globalThis<"u"?globalThis:N||self,t(N.step={},N.Vue,N.LodashES))})(this,function(N,t,F){"use strict";const q={},z={};function R(r){const{properties:e,title:u,ignore:l}=r,i=l&&Array.isArray(l),b=Object.keys(e).reduce((d,v)=>((!i||!l.find(m=>m==v))&&(d[v]=e[v].type==="object"&&e[v].properties?R(e[v]):F.cloneDeep(e[v].default)),d),{});return(!i||!l.find(d=>d=="id"))&&(b.id=`${u}-${Date.now()}`),b}function A(r,e={},u){const l=q[r];if(l){let i=R(l);const b=z[r];return i=b?b({getSchemaByType:A},i,e,u):i,i}return null}function _(r,e){const u=R(e);return Object.keys(r).reduce((l,i)=>(l[i]&&typeof l[i]=="object"?Object.assign(l[i],r[i]):l[i]=r[i],l),u),u}function C(r,e){return Object.keys(r).filter(l=>r[l]!=null).reduce((l,i)=>{if(e.has(i)){const b=e.get(i);if(typeof b=="string")l[b]=r[i];else{const d=b(i,r[i],r);Object.assign(l,d)}}else l[i]=r[i];return l},{})}function W(r,e,u=new Map){const l=_(r,e);return C(l,u)}function J(r={}){function e(a,h,p,g){if(typeof p=="number")return g[a].length===p;if(typeof p=="object"){const O=Object.keys(p)[0],j=p[O];if(O==="not")return Number(g[a].length)!==Number(j);if(O==="moreThan")return Number(g[a].length)>=Number(j);if(O==="lessThan")return Number(g[a].length)<=Number(j)}return!1}function u(a,h,p,g){return g[a]&&g[a].propertyValue&&String(g[a].propertyValue.value)===String(p)}const l=new Map([["length",e],["getProperty",u]]);Object.keys(r).reduce((a,h)=>(a.set(h,r[h]),a),l);function i(a,h){const p=a;return typeof h=="number"?[{target:p,operator:"length",param:null,value:Number(h)}]:typeof h=="boolean"?[{target:p,operator:"getProperty",param:a,value:!!h}]:typeof h=="object"?Object.keys(h).map(g=>{if(g==="length")return{target:p,operator:"length",param:null,value:h[g]};const O=g,j=h[g];return{target:p,operator:"getProperty",param:O,value:j}}):[]}function b(a){return Object.keys(a).reduce((p,g)=>{const O=i(g,a[g]);return p.push(...O),p},[])}function d(a,h){if(l.has(a.operator)){const p=l.get(a.operator);return p&&p(a.target,a.param,a.value,h)||!1}return!1}function v(a,h){return b(a).reduce((O,j)=>O&&d(j,h),!0)}function m(a,h){const p=Object.keys(a),g=p.includes("allOf"),O=p.includes("anyOf"),j=g||O,S=(j?a[j?g?"allOf":"anyOf":"allOf"]:[a]).map(V=>v(V,h));return g?!S.includes(!1):S.includes(!0)}return{parseValueSchema:m}}const G={},H={};J();function Q(r,e,u=new Map,l=(d,v,m)=>v,i={},b=d=>d){return q[e.title]=e,z[e.title]=l,G[e.title]=i,H[e.title]=b,(d={})=>{const v=W(d,e,u),m=Object.keys(r).reduce((a,h)=>(a[h]=r[h].default,a),{});return Object.assign(m,v)}}function U(r,e){return{customClass:e.class,customStyle:e.style}}const X=new Map([["appearance",U]]);function Y(r,e,u){return e}const Z={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/step.schema.json",title:"step",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for step",type:"string"},type:{description:"The type string of step",type:"string",default:"step"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},K={title:"step",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},E={direction:{type:String,default:"horizontal"},fill:{type:Boolean,default:!1},height:{type:Number,default:0},clickable:{type:Boolean,default:!0},steps:{type:Array,default:[{id:"1",title:"审批中(示例)",description:"正在审批"},{id:"2",title:"复核中(示例)",description:"等待复核"}]},activeIndex:{type:Number,default:0},onClick:{type:Function,default:()=>{}}},L=Q(E,Z,X,Y,K),w=t.defineComponent({name:"FStep",props:E,emits:["click"],setup(r,e){const u=t.ref(r.direction),l=t.ref(r.fill),i=t.ref(r.height),b=t.ref(r.steps),d=t.ref(r.clickable),v=t.ref(0),m=t.ref(r.activeIndex),a=t.computed(()=>({"f-progress-step-list":u.value==="horizontal","f-progress-step-list-block":u.value==="vertical","f-progress-step-horizontal-fill":u.value==="horizontal"&&l.value,"f-progress-step-vertical-fill":u.value==="vertical"&&l.value})),h=t.computed(()=>({height:u.value==="vertical"?`${i.value}px`:""}));function p(s,n){const f={step:!0,active:n===m.value,clickable:d.value,current:n===m.value};return n<m.value&&(f.finish=!0),f}function g(s,n){const f={step:s,stepIndex:n};e.emit("click",f)}function O(s,n){const f={"f-progressstep-row":!0,"step-active":n===m.value,"step-current":n===m.value};return n<m.value&&(f["step-finish"]=!0),f}function j(s,n){return{"step-icon":!0,"step-success":n,"f-icon":n,"f-icon-check":n}}function M(s,n){const f=[];return n>=m.value||n===v.value?f.push(t.createVNode("span",{class:"step-icon"},[n+1])):f.push(t.createVNode("span",{class:j(s,!0)},null)),f}function $(s,n){return{"step-name":!0,"step-name-success":n<m.value}}function S(s,n){return t.createVNode("div",{class:"f-progress-step-title"},[t.createVNode("p",{class:$(s,n)},[s.title])])}function D(s,n){return{"f-progress-step-line":!0,"f-progress-step-line-success":n===m.value}}function V(s,n){return n!==b.value.length-1}const P=t.computed(()=>({triangle:!0,"":u.value==="vertical"}));function k(){return b.value.map((s,n)=>t.createVNode("li",{class:p(s,n),onClick:f=>g(s,n)},[t.createVNode("div",{class:O(s,n)},[t.createVNode("div",{class:"f-progress-step-content"},[M(s,n),S(s,n)]),V(s,n)&&t.createVNode("div",{class:D(s,n)},[t.createVNode("span",{class:P.value},null)])])]))}return t.watch(()=>r.activeIndex,()=>{r.activeIndex>-1&&r.activeIndex<=b.value.length&&(m.value=r.activeIndex,k())}),()=>t.createVNode("div",{class:"f-progress-step"},[t.createVNode("ul",{class:a.value,style:h.value},[k()])])}});function x(r,e,u){var k;function l(){}const i="",b="",d=t.ref();function v(){return(e==null?void 0:e.schema.componentType)!=="frame"}function m(){return!1}function a(){return(e==null?void 0:e.schema.componentType)!=="frame"}function h(){return(e==null?void 0:e.schema.componentType)==="frame"}function p(s){if(!s||!s.value)return null;if(s.value.schema&&s.value.schema.type==="component")return s.value;const n=t.ref(s==null?void 0:s.value.parent),f=p(n);return f||null}function g(s=e){const{componentInstance:n,designerItemElementRef:f}=s;return!n||!n.value?null:n.value.canMove?f:g(s.parent)}function O(s){return!!u}function j(){return(e==null?void 0:e.schema.label)||(e==null?void 0:e.schema.title)||(e==null?void 0:e.schema.name)}function M(){}function $(s,n){}function S(s,n){const{componentType:f}=s;let c=A(f,s,n);const o=f.toLowerCase().replace("-","_");return c&&!c.id&&c.type===f&&(c.id=`${o}_${Math.random().toString().slice(2,6)}`),c}function D(s,n){const f=String(s.getAttribute("data-controltype")),c=s.getAttribute("data-feature"),o=c?JSON.parse(c):{};o.parentComponentInstance=d.value;let y=A(f,o);const T=f.toLowerCase().replace("-","_");return y&&!y.id&&y.type===f&&(y.id=`${T}_${Math.random().toString().slice(2,6)}`),y}function V(s){}function P(...s){}return d.value={canMove:v(),canSelectParent:m(),canDelete:a(),canNested:!h(),contents:e==null?void 0:e.schema.contents,elementRef:r,parent:(k=e==null?void 0:e.parent)==null?void 0:k.componentInstance,schema:e==null?void 0:e.schema,styles:i,designerClass:b,canAccepts:O,getBelongedComponentInstance:p,getDraggableDesignItemElement:g,getDraggingDisplayText:j,getPropConfig:P,getDragScopeElement:M,onAcceptMovedChildElement:$,onAcceptNewChildElement:D,onChildElementMovedOut:V,addNewChildComponentSchema:S,updateDragAndDropRules:l,triggerBelongedComponentToMoveWhenMoved:t.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:t.ref(!1)},d}const I=t.defineComponent({name:"FStepDesign",props:E,emits:[],setup(r,e){const u=t.ref(r.direction),l=t.ref(r.fill),i=t.ref(r.height),b=t.ref(r.steps),d=t.ref(0),v=t.ref(r.clickable),m=t.ref(0),a=t.ref(),h=t.inject("design-item-context"),p=x(a,h);t.onMounted(()=>{a.value.componentInstance=p}),e.expose(p.value);const g=t.computed(()=>({"f-progress-step-list":u.value==="horizontal","f-progress-step-list-block":u.value==="vertical","f-progress-step-horizontal-fill":u.value==="horizontal"&&l.value,"f-progress-step-vertical-fill":u.value==="vertical"&&l.value})),O=t.computed(()=>({height:u.value==="vertical"?`${i.value}px`:""}));function j(c,o){const y={step:!0,active:o===d.value,clickable:v.value,"click-disable":c.disable,current:o===d.value};return o<d.value&&(y.finish=!0),c.status&&(y[c.status]=!0),c.hasOwnProperty("class")&&c.class.split(" ").reduce((T,B)=>(T[B]=!0,T),y),y}function M(c,o){}function $(c,o){const y={"f-progressstep-row":!0,"step-active":o===d.value,"step-current":o===d.value};return o<d.value&&(y["step-finish"]=!0),c.status&&(y["step-"+c.status]=!0),y}function S(c,o){const y={"step-icon":!0,"step-success":o,"k-icon":o,"k-i-check":o};return c.hasOwnProperty("icon")&&c.class.split(" ").reduce((T,B)=>(T[B]=!0,T),y),y}function D(c,o){const y=[];return c.icon?y.push(t.createVNode("span",{class:S(c,!1)},null)):o>=d.value||o===m.value?y.push(t.createVNode("span",{class:"step-icon"},[o+1])):y.push(t.createVNode("span",{class:S(c,!0)},null)),y}function V(c,o){return{"step-name":!0,"step-name-success":o<d.value}}function P(c,o){return t.createVNode("div",{class:"f-progress-step-title"},[t.createVNode("p",{class:V(c,o)},[c.title])])}function k(c,o){return{"f-progress-step-line":!0,"f-progress-step-line-success":o===d.value}}function s(c,o){return o!==b.value.length-1}const n=t.computed(()=>({triangle:!0,"":u.value==="vertical"}));function f(){return b.value.map((c,o)=>t.createVNode("li",{class:j(c,o),onClick:y=>void 0},[t.createVNode("div",{class:$(c,o)},[t.createVNode("div",{class:"f-progress-step-content"},[D(c,o),P(c,o)]),s(c,o)&&t.createVNode("div",{class:k(c,o)},[t.createVNode("span",{class:n.value},null)])])]))}return()=>t.createVNode("div",{ref:a,class:"f-progress-step"},[t.createVNode("ul",{class:g.value,style:O.value},[f()])])}}),ee={install(r){r.component(w.name,w)},register(r,e,u,l){r.step=w,e.step=L},registerDesigner(r,e,u){r.step=I,e.step=L}};N.Step=w,N.default=ee,N.propsResolver=L,N.stepProps=E,Object.defineProperties(N,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(N,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es"],t):(N=typeof globalThis<"u"?globalThis:N||self,t(N.step={},N.Vue,N.LodashES))})(this,function(N,t,R){"use strict";const z={},F={};function A(r){const{properties:e,title:u,ignore:l}=r,i=l&&Array.isArray(l),b=Object.keys(e).reduce((d,v)=>((!i||!l.find(m=>m==v))&&(d[v]=e[v].type==="object"&&e[v].properties?A(e[v]):R.cloneDeep(e[v].default)),d),{});return(!i||!l.find(d=>d=="id"))&&(b.id=`${u}-${Date.now()}`),b}function L(r,e={},u){const l=z[r];if(l){let i=A(l);const b=F[r];return i=b?b({getSchemaByType:L},i,e,u):i,i}return null}function _(r,e){const u=A(e);return Object.keys(r).reduce((l,i)=>(l[i]&&R.isPlainObject(l[i])&&R.isPlainObject(r[i])?Object.assign(l[i],r[i]):l[i]=r[i],l),u),u}function C(r,e){return Object.keys(r).filter(l=>r[l]!=null).reduce((l,i)=>{if(e.has(i)){const b=e.get(i);if(typeof b=="string")l[b]=r[i];else{const d=b(i,r[i],r);Object.assign(l,d)}}else l[i]=r[i];return l},{})}function W(r,e,u=new Map){const l=_(r,e);return C(l,u)}function J(r={}){function e(a,h,p,g){if(typeof p=="number")return g[a].length===p;if(typeof p=="object"){const O=Object.keys(p)[0],j=p[O];if(O==="not")return Number(g[a].length)!==Number(j);if(O==="moreThan")return Number(g[a].length)>=Number(j);if(O==="lessThan")return Number(g[a].length)<=Number(j)}return!1}function u(a,h,p,g){return g[a]&&g[a].propertyValue&&String(g[a].propertyValue.value)===String(p)}const l=new Map([["length",e],["getProperty",u]]);Object.keys(r).reduce((a,h)=>(a.set(h,r[h]),a),l);function i(a,h){const p=a;return typeof h=="number"?[{target:p,operator:"length",param:null,value:Number(h)}]:typeof h=="boolean"?[{target:p,operator:"getProperty",param:a,value:!!h}]:typeof h=="object"?Object.keys(h).map(g=>{if(g==="length")return{target:p,operator:"length",param:null,value:h[g]};const O=g,j=h[g];return{target:p,operator:"getProperty",param:O,value:j}}):[]}function b(a){return Object.keys(a).reduce((p,g)=>{const O=i(g,a[g]);return p.push(...O),p},[])}function d(a,h){if(l.has(a.operator)){const p=l.get(a.operator);return p&&p(a.target,a.param,a.value,h)||!1}return!1}function v(a,h){return b(a).reduce((O,j)=>O&&d(j,h),!0)}function m(a,h){const p=Object.keys(a),g=p.includes("allOf"),O=p.includes("anyOf"),j=g||O,S=(j?a[j?g?"allOf":"anyOf":"allOf"]:[a]).map(V=>v(V,h));return g?!S.includes(!1):S.includes(!0)}return{parseValueSchema:m}}const G={},H={};J();function Q(r,e,u=new Map,l=(d,v,m)=>v,i={},b=d=>d){return z[e.title]=e,F[e.title]=l,G[e.title]=i,H[e.title]=b,(d={})=>{const v=W(d,e,u),m=Object.keys(r).reduce((a,h)=>(a[h]=r[h].default,a),{});return Object.assign(m,v)}}function U(r,e){return{customClass:e.class,customStyle:e.style}}const X=new Map([["appearance",U]]);function Y(r,e,u){return e}const Z={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/step.schema.json",title:"step",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for step",type:"string"},type:{description:"The type string of step",type:"string",default:"step"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},K={title:"step",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}}}},w={direction:{type:String,default:"horizontal"},fill:{type:Boolean,default:!1},height:{type:Number,default:0},clickable:{type:Boolean,default:!0},steps:{type:Array,default:[{id:"1",title:"审批中(示例)",description:"正在审批"},{id:"2",title:"复核中(示例)",description:"等待复核"}]},activeIndex:{type:Number,default:0},onClick:{type:Function,default:()=>{}}},B=Q(w,Z,X,Y,K),E=t.defineComponent({name:"FStep",props:w,emits:["click"],setup(r,e){const u=t.ref(r.direction),l=t.ref(r.fill),i=t.ref(r.height),b=t.ref(r.steps),d=t.ref(r.clickable),v=t.ref(0),m=t.ref(r.activeIndex),a=t.computed(()=>({"f-progress-step-list":u.value==="horizontal","f-progress-step-list-block":u.value==="vertical","f-progress-step-horizontal-fill":u.value==="horizontal"&&l.value,"f-progress-step-vertical-fill":u.value==="vertical"&&l.value})),h=t.computed(()=>({height:u.value==="vertical"?`${i.value}px`:""}));function p(s,n){const f={step:!0,active:n===m.value,clickable:d.value,current:n===m.value};return n<m.value&&(f.finish=!0),f}function g(s,n){const f={step:s,stepIndex:n};e.emit("click",f)}function O(s,n){const f={"f-progressstep-row":!0,"step-active":n===m.value,"step-current":n===m.value};return n<m.value&&(f["step-finish"]=!0),f}function j(s,n){return{"step-icon":!0,"step-success":n,"f-icon":n,"f-icon-check":n}}function M(s,n){const f=[];return n>=m.value||n===v.value?f.push(t.createVNode("span",{class:"step-icon"},[n+1])):f.push(t.createVNode("span",{class:j(s,!0)},null)),f}function P(s,n){return{"step-name":!0,"step-name-success":n<m.value}}function S(s,n){return t.createVNode("div",{class:"f-progress-step-title"},[t.createVNode("p",{class:P(s,n)},[s.title])])}function $(s,n){return{"f-progress-step-line":!0,"f-progress-step-line-success":n===m.value}}function V(s,n){return n!==b.value.length-1}const D=t.computed(()=>({triangle:!0,"":u.value==="vertical"}));function k(){return b.value.map((s,n)=>t.createVNode("li",{class:p(s,n),onClick:f=>g(s,n)},[t.createVNode("div",{class:O(s,n)},[t.createVNode("div",{class:"f-progress-step-content"},[M(s,n),S(s,n)]),V(s,n)&&t.createVNode("div",{class:$(s,n)},[t.createVNode("span",{class:D.value},null)])])]))}return t.watch(()=>r.activeIndex,()=>{r.activeIndex>-1&&r.activeIndex<=b.value.length&&(m.value=r.activeIndex,k())}),()=>t.createVNode("div",{class:"f-progress-step"},[t.createVNode("ul",{class:a.value,style:h.value},[k()])])}});function x(r,e,u){var k;function l(){}const i="",b="",d=t.ref();function v(){return(e==null?void 0:e.schema.componentType)!=="frame"}function m(){return!1}function a(){return(e==null?void 0:e.schema.componentType)!=="frame"}function h(){return(e==null?void 0:e.schema.componentType)==="frame"}function p(s){if(!s||!s.value)return null;if(s.value.schema&&s.value.schema.type==="component")return s.value;const n=t.ref(s==null?void 0:s.value.parent),f=p(n);return f||null}function g(s=e){const{componentInstance:n,designerItemElementRef:f}=s;return!n||!n.value?null:n.value.canMove?f:g(s.parent)}function O(s){return!!u}function j(){return(e==null?void 0:e.schema.label)||(e==null?void 0:e.schema.title)||(e==null?void 0:e.schema.name)}function M(){}function P(s,n){}function S(s,n){const{componentType:f}=s;let c=L(f,s,n);const o=f.toLowerCase().replace("-","_");return c&&!c.id&&c.type===f&&(c.id=`${o}_${Math.random().toString().slice(2,6)}`),c}function $(s,n){const f=String(s.getAttribute("data-controltype")),c=s.getAttribute("data-feature"),o=c?JSON.parse(c):{};o.parentComponentInstance=d.value;let y=L(f,o);const T=f.toLowerCase().replace("-","_");return y&&!y.id&&y.type===f&&(y.id=`${T}_${Math.random().toString().slice(2,6)}`),y}function V(s){}function D(...s){}return d.value={canMove:v(),canSelectParent:m(),canDelete:a(),canNested:!h(),contents:e==null?void 0:e.schema.contents,elementRef:r,parent:(k=e==null?void 0:e.parent)==null?void 0:k.componentInstance,schema:e==null?void 0:e.schema,styles:i,designerClass:b,canAccepts:O,getBelongedComponentInstance:p,getDraggableDesignItemElement:g,getDraggingDisplayText:j,getPropConfig:D,getDragScopeElement:M,onAcceptMovedChildElement:P,onAcceptNewChildElement:$,onChildElementMovedOut:V,addNewChildComponentSchema:S,updateDragAndDropRules:l,triggerBelongedComponentToMoveWhenMoved:t.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:t.ref(!1)},d}const I=t.defineComponent({name:"FStepDesign",props:w,emits:[],setup(r,e){const u=t.ref(r.direction),l=t.ref(r.fill),i=t.ref(r.height),b=t.ref(r.steps),d=t.ref(0),v=t.ref(r.clickable),m=t.ref(0),a=t.ref(),h=t.inject("design-item-context"),p=x(a,h);t.onMounted(()=>{a.value.componentInstance=p}),e.expose(p.value);const g=t.computed(()=>({"f-progress-step-list":u.value==="horizontal","f-progress-step-list-block":u.value==="vertical","f-progress-step-horizontal-fill":u.value==="horizontal"&&l.value,"f-progress-step-vertical-fill":u.value==="vertical"&&l.value})),O=t.computed(()=>({height:u.value==="vertical"?`${i.value}px`:""}));function j(c,o){const y={step:!0,active:o===d.value,clickable:v.value,"click-disable":c.disable,current:o===d.value};return o<d.value&&(y.finish=!0),c.status&&(y[c.status]=!0),c.hasOwnProperty("class")&&c.class.split(" ").reduce((T,q)=>(T[q]=!0,T),y),y}function M(c,o){}function P(c,o){const y={"f-progressstep-row":!0,"step-active":o===d.value,"step-current":o===d.value};return o<d.value&&(y["step-finish"]=!0),c.status&&(y["step-"+c.status]=!0),y}function S(c,o){const y={"step-icon":!0,"step-success":o,"k-icon":o,"k-i-check":o};return c.hasOwnProperty("icon")&&c.class.split(" ").reduce((T,q)=>(T[q]=!0,T),y),y}function $(c,o){const y=[];return c.icon?y.push(t.createVNode("span",{class:S(c,!1)},null)):o>=d.value||o===m.value?y.push(t.createVNode("span",{class:"step-icon"},[o+1])):y.push(t.createVNode("span",{class:S(c,!0)},null)),y}function V(c,o){return{"step-name":!0,"step-name-success":o<d.value}}function D(c,o){return t.createVNode("div",{class:"f-progress-step-title"},[t.createVNode("p",{class:V(c,o)},[c.title])])}function k(c,o){return{"f-progress-step-line":!0,"f-progress-step-line-success":o===d.value}}function s(c,o){return o!==b.value.length-1}const n=t.computed(()=>({triangle:!0,"":u.value==="vertical"}));function f(){return b.value.map((c,o)=>t.createVNode("li",{class:j(c,o),onClick:y=>void 0},[t.createVNode("div",{class:P(c,o)},[t.createVNode("div",{class:"f-progress-step-content"},[$(c,o),D(c,o)]),s(c,o)&&t.createVNode("div",{class:k(c,o)},[t.createVNode("span",{class:n.value},null)])])]))}return()=>t.createVNode("div",{ref:a,class:"f-progress-step"},[t.createVNode("ul",{class:g.value,style:O.value},[f()])])}}),ee={install(r){r.component(E.name,E)},register(r,e,u,l){r.step=E,e.step=B},registerDesigner(r,e,u){r.step=I,e.step=B}};N.Step=E,N.default=ee,N.propsResolver=B,N.stepProps=w,Object.defineProperties(N,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});