@farris/ui-vue 1.3.1 → 1.3.3

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 (259) hide show
  1. package/components/accordion/index.esm.js +103 -99
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +301 -351
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/binding-selector/index.esm.js +444 -0
  6. package/components/binding-selector/index.umd.cjs +1 -0
  7. package/components/binding-selector/package.json +8 -0
  8. package/components/border-editor/index.esm.js +5 -3
  9. package/components/border-editor/index.umd.cjs +1 -1
  10. package/components/button-edit/index.esm.js +143 -139
  11. package/components/button-edit/index.umd.cjs +1 -1
  12. package/components/calendar/index.esm.js +407 -396
  13. package/components/calendar/index.umd.cjs +1 -1
  14. package/components/capsule/index.esm.js +266 -255
  15. package/components/capsule/index.umd.cjs +1 -1
  16. package/components/checkbox/index.esm.js +628 -641
  17. package/components/checkbox/index.umd.cjs +1 -1
  18. package/components/color-picker/index.esm.js +379 -374
  19. package/components/color-picker/index.umd.cjs +2 -2
  20. package/components/combo-list/index.esm.js +471 -471
  21. package/components/combo-list/index.umd.cjs +1 -1
  22. package/components/combo-tree/index.esm.js +155 -148
  23. package/components/combo-tree/index.umd.cjs +1 -1
  24. package/components/common/index.esm.js +487 -478
  25. package/components/common/index.umd.cjs +1 -1
  26. package/components/component/index.esm.js +330 -279
  27. package/components/component/index.umd.cjs +1 -1
  28. package/components/condition/index.esm.js +1171 -1277
  29. package/components/condition/index.umd.cjs +1 -1
  30. package/components/content-container/index.esm.js +220 -204
  31. package/components/content-container/index.umd.cjs +1 -1
  32. package/components/data-grid/index.esm.js +4743 -4641
  33. package/components/data-grid/index.umd.cjs +1 -1
  34. package/components/data-view/index.esm.js +2916 -3019
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.esm.js +2375 -2590
  37. package/components/date-picker/index.umd.cjs +1 -1
  38. package/components/designer-canvas/index.css +1 -1
  39. package/components/designer-canvas/index.esm.js +9518 -1198
  40. package/components/designer-canvas/index.umd.cjs +1 -1
  41. package/components/designer-outline/index.esm.js +2 -1
  42. package/components/designer-outline/index.umd.cjs +1 -1
  43. package/components/drawer/index.esm.js +34 -38
  44. package/components/drawer/index.umd.cjs +1 -1
  45. package/components/dropdown/index.esm.js +149 -138
  46. package/components/dropdown/index.umd.cjs +2 -2
  47. package/components/dynamic-form/index.esm.js +1602 -1740
  48. package/components/dynamic-form/index.umd.cjs +1 -1
  49. package/components/dynamic-resolver/index.esm.js +159 -151
  50. package/components/dynamic-resolver/index.umd.cjs +1 -1
  51. package/components/dynamic-view/index.esm.js +218 -218
  52. package/components/dynamic-view/index.umd.cjs +1 -1
  53. package/components/event-parameter/index.esm.js +311 -0
  54. package/components/event-parameter/index.umd.cjs +1 -0
  55. package/components/event-parameter/package.json +8 -0
  56. package/components/events-editor/index.css +1 -1
  57. package/components/events-editor/index.esm.js +533 -563
  58. package/components/events-editor/index.umd.cjs +1 -1
  59. package/components/expression-editor/index.esm.js +95 -91
  60. package/components/expression-editor/index.umd.cjs +1 -1
  61. package/components/external-container/index.esm.js +2356 -2455
  62. package/components/external-container/index.umd.cjs +1 -1
  63. package/components/field-selector/index.esm.js +3048 -3308
  64. package/components/field-selector/index.umd.cjs +1 -1
  65. package/components/filter-bar/index.css +1 -1
  66. package/components/filter-bar/index.esm.js +10537 -3249
  67. package/components/filter-bar/index.umd.cjs +1 -1
  68. package/components/flow-canvas/index.css +1 -1
  69. package/components/flow-canvas/index.esm.js +9781 -1327
  70. package/components/flow-canvas/index.umd.cjs +1 -1
  71. package/components/image-cropper/index.esm.js +353 -341
  72. package/components/image-cropper/index.umd.cjs +1 -1
  73. package/components/input-group/index.esm.js +510 -827
  74. package/components/input-group/index.umd.cjs +1 -1
  75. package/components/layout/index.esm.js +278 -268
  76. package/components/layout/index.umd.cjs +1 -1
  77. package/components/list-nav/index.esm.js +144 -136
  78. package/components/list-nav/index.umd.cjs +1 -1
  79. package/components/list-view/index.esm.js +2139 -2237
  80. package/components/list-view/index.umd.cjs +1 -1
  81. package/components/lookup/index.esm.js +6414 -6367
  82. package/components/lookup/index.umd.cjs +1 -1
  83. package/components/mapping-editor/index.esm.js +5216 -5114
  84. package/components/mapping-editor/index.umd.cjs +1 -1
  85. package/components/message-box/index.esm.js +252 -252
  86. package/components/message-box/index.umd.cjs +1 -1
  87. package/components/modal/index.esm.js +70 -70
  88. package/components/modal/index.umd.cjs +1 -1
  89. package/components/nav/index.esm.js +486 -984
  90. package/components/nav/index.umd.cjs +3 -3
  91. package/components/number-range/index.esm.js +446 -498
  92. package/components/number-range/index.umd.cjs +1 -1
  93. package/components/number-spinner/index.esm.js +363 -388
  94. package/components/number-spinner/index.umd.cjs +1 -1
  95. package/components/order/index.esm.js +1050 -1308
  96. package/components/order/index.umd.cjs +1 -1
  97. package/components/page-footer/index.esm.js +134 -131
  98. package/components/page-footer/index.umd.cjs +1 -1
  99. package/components/page-header/index.esm.js +1072 -1082
  100. package/components/page-header/index.umd.cjs +1 -1
  101. package/components/pagination/index.esm.js +412 -910
  102. package/components/pagination/index.umd.cjs +1 -1
  103. package/components/progress/index.esm.js +214 -203
  104. package/components/progress/index.umd.cjs +3 -3
  105. package/components/property-editor/index.esm.js +1361 -1536
  106. package/components/property-editor/index.umd.cjs +2 -2
  107. package/components/property-panel/index.esm.js +650 -677
  108. package/components/property-panel/index.umd.cjs +1 -1
  109. package/components/query-solution/index.css +1 -1
  110. package/components/query-solution/index.esm.js +12344 -5048
  111. package/components/query-solution/index.umd.cjs +6 -1
  112. package/components/radio-button/index.esm.js +97 -97
  113. package/components/radio-button/index.umd.cjs +1 -1
  114. package/components/radio-group/index.css +1 -1
  115. package/components/radio-group/index.esm.js +1821 -565
  116. package/components/radio-group/index.umd.cjs +1 -1
  117. package/components/rate/index.esm.js +251 -244
  118. package/components/rate/index.umd.cjs +1 -1
  119. package/components/response-layout/index.esm.js +151 -140
  120. package/components/response-layout/index.umd.cjs +1 -1
  121. package/components/response-layout-editor/index.esm.js +707 -676
  122. package/components/response-layout-editor/index.umd.cjs +1 -1
  123. package/components/response-toolbar/index.esm.js +719 -740
  124. package/components/response-toolbar/index.umd.cjs +1 -1
  125. package/components/schema-selector/index.esm.js +4977 -5249
  126. package/components/schema-selector/index.umd.cjs +2 -2
  127. package/components/search-box/index.esm.js +145 -134
  128. package/components/search-box/index.umd.cjs +1 -1
  129. package/components/section/index.esm.js +348 -337
  130. package/components/section/index.umd.cjs +1 -1
  131. package/components/smoke-detector/index.esm.js +141 -130
  132. package/components/smoke-detector/index.umd.cjs +1 -1
  133. package/components/splitter/index.esm.js +311 -301
  134. package/components/splitter/index.umd.cjs +1 -1
  135. package/components/step/index.esm.js +231 -220
  136. package/components/step/index.umd.cjs +1 -1
  137. package/components/switch/index.esm.js +385 -432
  138. package/components/switch/index.umd.cjs +1 -1
  139. package/components/tabs/index.esm.js +1932 -1914
  140. package/components/tabs/index.umd.cjs +1 -1
  141. package/components/tags/index.esm.js +351 -340
  142. package/components/tags/index.umd.cjs +1 -1
  143. package/components/text/index.esm.js +209 -199
  144. package/components/text/index.umd.cjs +1 -1
  145. package/components/textarea/index.esm.js +388 -415
  146. package/components/textarea/index.umd.cjs +1 -1
  147. package/components/time-picker/index.esm.js +619 -666
  148. package/components/time-picker/index.umd.cjs +1 -1
  149. package/components/transfer/index.esm.js +493 -486
  150. package/components/transfer/index.umd.cjs +1 -1
  151. package/components/tree-grid/index.esm.js +3169 -3278
  152. package/components/tree-grid/index.umd.cjs +1 -1
  153. package/components/tree-view/index.esm.js +2320 -2418
  154. package/components/tree-view/index.umd.cjs +1 -1
  155. package/components/uploader/index.esm.js +563 -554
  156. package/components/uploader/index.umd.cjs +2 -2
  157. package/components/verify-detail/index.esm.js +287 -276
  158. package/components/verify-detail/index.umd.cjs +1 -1
  159. package/components/video/index.esm.js +368 -324
  160. package/components/video/index.umd.cjs +1 -1
  161. package/components/weather/index.esm.js +498 -487
  162. package/components/weather/index.umd.cjs +5 -5
  163. package/farris.all.esm.js +51302 -47651
  164. package/farris.all.umd.cjs +14 -9
  165. package/index.css +1 -1
  166. package/package.json +1 -1
  167. package/types/binding-selector/index.d.ts +55 -0
  168. package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
  169. package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
  170. package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
  171. package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
  172. package/types/combo-list/src/components/list-container.component.d.ts +6 -6
  173. package/types/combo-list/src/components/list-container.props.d.ts +1 -1
  174. package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
  175. package/types/common/entity/entity-schema.d.ts +26 -11
  176. package/types/common/index.d.ts +1 -0
  177. package/types/common/types.d.ts +2 -2
  178. package/types/condition/src/condition-fields.design.component.d.ts +18 -0
  179. package/types/condition/src/types.d.ts +6 -6
  180. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
  181. package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
  182. package/types/data-grid/src/data-grid.props.d.ts +2 -2
  183. package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
  184. package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
  185. package/types/data-view/composition/types.d.ts +2 -2
  186. package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
  187. package/types/date-picker/src/components/month/month.component.d.ts +3 -3
  188. package/types/date-picker/src/components/year/year.component.d.ts +3 -3
  189. package/types/designer-canvas/index.d.ts +2 -1
  190. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  191. package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
  192. package/types/designer-canvas/src/composition/types.d.ts +49 -40
  193. package/types/designer-canvas/src/types.d.ts +8 -20
  194. package/types/dynamic-form/index.d.ts +1 -1
  195. package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
  196. package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
  197. package/types/dynamic-form/src/types.d.ts +1 -1
  198. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +5 -0
  199. package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
  200. package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
  201. package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
  202. package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
  203. package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
  204. package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
  205. package/types/event-parameter/index.d.ts +31 -0
  206. package/types/event-parameter/src/composition/type.d.ts +77 -0
  207. package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
  208. package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
  209. package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
  210. package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
  211. package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
  212. package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
  213. package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
  214. package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
  215. package/types/field-selector/src/field-selector.component.d.ts +1 -2
  216. package/types/field-selector/src/field-selector.props.d.ts +0 -9
  217. package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
  218. package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
  219. package/types/list-view/src/list-view-table.component.d.ts +15 -0
  220. package/types/lookup/src/composition/use-user-data.d.ts +2 -2
  221. package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
  222. package/types/modal/src/composition/modal.service.d.ts +2 -1
  223. package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
  224. package/types/page-header/src/page-header.component.d.ts +1 -1
  225. package/types/property-panel/index.d.ts +2 -1
  226. package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
  227. package/types/property-panel/src/composition/type.d.ts +0 -13
  228. package/types/query-solution/src/composition/types.d.ts +35 -4
  229. package/types/query-solution/src/composition/use-header.d.ts +21 -0
  230. package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
  231. package/types/query-solution/src/composition/use-solution.d.ts +20 -0
  232. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +17 -16
  233. package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
  234. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +3 -51
  235. package/types/query-solution/src/query-solution.d.ts +10 -2
  236. package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
  237. package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
  238. package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
  239. package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
  240. package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
  241. package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
  242. package/types/section/src/property-config/section.property-config.d.ts +17 -17
  243. package/types/section/src/schema/schema-resolver.d.ts +1 -2
  244. package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
  245. package/types/tabs/src/composition/types.d.ts +4 -1
  246. package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
  247. package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
  248. package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
  249. package/types/text/src/composition/types.d.ts +4 -4
  250. package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
  251. package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
  252. package/types/weather/src/composition/use-weather-color.d.ts +15 -0
  253. package/types/weather/src/composition/use-weather-data.d.ts +15 -0
  254. package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
  255. package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
  256. package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
  257. package/types/weather/src/composition/types.d.ts +0 -2
  258. /package/types/dynamic-form/src/designer/{use-designer-rules.d.ts → response-form-use-designer-rules.d.ts} +0 -0
  259. /package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +0 -0
@@ -1,102 +1,106 @@
1
- import { defineComponent as V, ref as O, computed as R, watch as G, createVNode as d, inject as H, onMounted as J } from "vue";
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
2
  import { isPlainObject as z, cloneDeep as Q } from "lodash-es";
3
- const q = {}, W = {};
3
+ const q = {}, _ = {};
4
4
  function B(t) {
5
- const { properties: e, title: i, ignore: n } = t, l = n && Array.isArray(n), y = Object.keys(e).reduce((f, j) => ((!l || !n.find((b) => b == j)) && (f[j] = e[j].type === "object" && e[j].properties ? B(e[j]) : Q(e[j].default)), f), {});
6
- return i && (!l || !n.find((f) => f == "id")) && (y.id = `${i}-${Date.now()}`), y;
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)}`;
9
+ }
10
+ return y;
7
11
  }
8
- function _(t, e = {}, i) {
9
- const n = q[t];
10
- if (n) {
11
- let l = B(n);
12
- const y = W[t];
13
- return l = y ? y({ getSchemaByType: _ }, l, e, i) : l, l;
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;
14
18
  }
15
19
  return null;
16
20
  }
17
21
  function U(t, e) {
18
- const i = B(e);
19
- return Object.keys(t).reduce((n, l) => (n[l] && z(n[l]) && z(t[l]) ? Object.assign(n[l], t[l]) : n[l] = t[l], n), i), i;
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;
20
24
  }
21
25
  function X(t, e) {
22
- return Object.keys(t).filter((n) => t[n] != null).reduce((n, l) => {
26
+ return Object.keys(t).filter((c) => t[c] != null).reduce((c, l) => {
23
27
  if (e.has(l)) {
24
28
  const y = e.get(l);
25
29
  if (typeof y == "string")
26
- n[y] = t[l];
30
+ c[y] = t[l];
27
31
  else {
28
32
  const f = y(l, t[l], t);
29
- Object.assign(n, f);
33
+ Object.assign(c, f);
30
34
  }
31
35
  } else
32
- n[l] = t[l];
33
- return n;
36
+ c[l] = t[l];
37
+ return c;
34
38
  }, {});
35
39
  }
36
- function Y(t, e, i = /* @__PURE__ */ new Map()) {
37
- const n = U(t, e);
38
- return X(n, i);
40
+ function Y(t, e, a = /* @__PURE__ */ new Map()) {
41
+ const c = U(t, e);
42
+ return X(c, a);
39
43
  }
40
44
  function Z(t = {}) {
41
- function e(r, p, u, v) {
42
- if (typeof u == "number")
43
- return v[r].length === u;
44
- if (typeof u == "object") {
45
- const k = Object.keys(u)[0], S = u[k];
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];
46
50
  if (k === "not")
47
- return Number(v[r].length) !== Number(S);
51
+ return Number(v[n].length) !== Number(S);
48
52
  if (k === "moreThan")
49
- return Number(v[r].length) >= Number(S);
53
+ return Number(v[n].length) >= Number(S);
50
54
  if (k === "lessThan")
51
- return Number(v[r].length) <= Number(S);
55
+ return Number(v[n].length) <= Number(S);
52
56
  }
53
57
  return !1;
54
58
  }
55
- function i(r, p, u, v) {
56
- return v[r] && v[r].propertyValue && String(v[r].propertyValue.value) === String(u);
59
+ function a(n, u, p, v) {
60
+ return v[n] && v[n].propertyValue && String(v[n].propertyValue.value) === String(p);
57
61
  }
58
- const n = /* @__PURE__ */ new Map([
62
+ const c = /* @__PURE__ */ new Map([
59
63
  ["length", e],
60
- ["getProperty", i]
64
+ ["getProperty", a]
61
65
  ]);
62
- Object.keys(t).reduce((r, p) => (r.set(p, t[p]), r), n);
63
- function l(r, p) {
64
- const u = r;
65
- return typeof p == "number" ? [{ target: u, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: u, operator: "getProperty", param: r, value: !!p }] : typeof p == "object" ? Object.keys(p).map((v) => {
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) => {
66
70
  if (v === "length")
67
- return { target: u, operator: "length", param: null, value: p[v] };
68
- const k = v, S = p[v];
69
- return { target: u, operator: "getProperty", param: k, value: S };
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 };
70
74
  }) : [];
71
75
  }
72
- function y(r) {
73
- return Object.keys(r).reduce((u, v) => {
74
- const k = l(v, r[v]);
75
- return u.push(...k), u;
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;
76
80
  }, []);
77
81
  }
78
- function f(r, p) {
79
- if (n.has(r.operator)) {
80
- const u = n.get(r.operator);
81
- return u && u(r.target, r.param, r.value, p) || !1;
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;
82
86
  }
83
87
  return !1;
84
88
  }
85
- function j(r, p) {
86
- return y(r).reduce((k, S) => k && f(S, p), !0);
89
+ function j(n, u) {
90
+ return y(n).reduce((k, S) => k && f(S, u), !0);
87
91
  }
88
- function b(r, p) {
89
- const u = Object.keys(r), v = u.includes("allOf"), k = u.includes("anyOf"), S = v || k, T = (S ? r[S ? v ? "allOf" : "anyOf" : "allOf"] : [r]).map((D) => j(D, p));
90
- return v ? !T.includes(!1) : T.includes(!0);
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);
91
95
  }
92
- return { parseValueSchema: b };
96
+ return { parseValueSchema: d };
93
97
  }
94
98
  const C = {}, K = {};
95
99
  Z();
96
- function x(t, e, i = /* @__PURE__ */ new Map(), n = (f, j, b) => j, l = {}, y = (f) => f) {
97
- return q[e.title] = e, W[e.title] = n, C[e.title] = l, K[e.title] = y, (f = {}) => {
98
- const j = Y(f, e, i), b = Object.keys(t).reduce((r, p) => (r[p] = t[p].default, r), {});
99
- return Object.assign(b, j);
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);
100
104
  };
101
105
  }
102
106
  function I(t, e) {
@@ -105,10 +109,10 @@ function I(t, e) {
105
109
  const ee = /* @__PURE__ */ new Map([
106
110
  ["appearance", I]
107
111
  ]);
108
- function te(t, e, i) {
112
+ function te(t, e, a) {
109
113
  return e;
110
114
  }
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 = {
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 = {
112
116
  id: {
113
117
  description: "The unique identifier for step",
114
118
  type: "string"
@@ -170,17 +174,17 @@ const se = "https://json-schema.org/draft/2020-12/schema", re = "https://farris-
170
174
  type: "boolean",
171
175
  default: !0
172
176
  }
173
- }, ie = [
177
+ }, oe = [
174
178
  "id",
175
179
  "type"
176
- ], oe = {
180
+ ], ie = {
177
181
  $schema: se,
178
- $id: re,
179
- title: ne,
182
+ $id: ne,
183
+ title: re,
180
184
  description: ce,
181
185
  type: le,
182
186
  properties: ae,
183
- required: ie
187
+ required: oe
184
188
  }, ue = "step", pe = "A Farris Component", fe = "object", ve = {
185
189
  basic: {
186
190
  description: "Basic Infomation",
@@ -208,7 +212,7 @@ const se = "https://json-schema.org/draft/2020-12/schema", re = "https://farris-
208
212
  description: pe,
209
213
  type: fe,
210
214
  categories: ve
211
- }, L = {
215
+ }, A = {
212
216
  /** 步骤条方向 */
213
217
  direction: { type: String, default: "horizontal" },
214
218
  /** 是否平铺 */
@@ -238,45 +242,45 @@ const se = "https://json-schema.org/draft/2020-12/schema", re = "https://farris-
238
242
  /** 步骤条点击后事件 */
239
243
  onClick: { type: Function, default: () => {
240
244
  } }
241
- }, F = x(L, oe, ee, te, he), A = /* @__PURE__ */ V({
245
+ }, F = x(A, ie, ee, te, he), L = /* @__PURE__ */ V({
242
246
  name: "FStep",
243
- props: L,
247
+ props: A,
244
248
  emits: ["click"],
245
249
  setup(t, e) {
246
- const i = O(t.direction), n = O(t.fill), l = O(t.height), y = O(t.steps), f = O(t.clickable), j = O(0), b = O(t.activeIndex), r = R(() => ({
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" && n.value,
250
- "f-progress-step-vertical-fill": i.value === "vertical" && n.value
251
- })), p = R(() => ({
252
- height: i.value === "vertical" ? `${l.value}px` : ""
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` : ""
253
257
  }));
254
- function u(c, s) {
258
+ function p(r, s) {
255
259
  const g = {
256
260
  step: !0,
257
- active: s === b.value,
261
+ active: s === d.value,
258
262
  clickable: f.value,
259
263
  // 'click-disable': step.disable,
260
- current: s === b.value
264
+ current: s === d.value
261
265
  };
262
- return s < b.value && (g.finish = !0), g;
266
+ return s < d.value && (g.finish = !0), g;
263
267
  }
264
- function v(c, s) {
268
+ function v(r, s) {
265
269
  const g = {
266
- step: c,
270
+ step: r,
267
271
  stepIndex: s
268
272
  };
269
273
  e.emit("click", g);
270
274
  }
271
- function k(c, s) {
275
+ function k(r, s) {
272
276
  const g = {
273
277
  "f-progressstep-row": !0,
274
- "step-active": s === b.value,
275
- "step-current": s === b.value
278
+ "step-active": s === d.value,
279
+ "step-current": s === d.value
276
280
  };
277
- return s < b.value && (g["step-finish"] = !0), g;
281
+ return s < d.value && (g["step-finish"] = !0), g;
278
282
  }
279
- function S(c, s) {
283
+ function S(r, s) {
280
284
  return {
281
285
  "step-icon": !0,
282
286
  "step-success": s,
@@ -284,79 +288,77 @@ const se = "https://json-schema.org/draft/2020-12/schema", re = "https://farris-
284
288
  "f-icon-check": s
285
289
  };
286
290
  }
287
- function M(c, s) {
291
+ function P(r, s) {
288
292
  const g = [];
289
- return s >= b.value || s === j.value ? g.push(d("span", {
293
+ return s >= d.value || s === j.value ? g.push(b("span", {
290
294
  class: "step-icon"
291
- }, [s + 1])) : g.push(d("span", {
292
- class: S(c, !0)
295
+ }, [s + 1])) : g.push(b("span", {
296
+ class: S(r, !0)
293
297
  }, null)), g;
294
298
  }
295
- function P(c, s) {
299
+ function D(r, s) {
296
300
  return {
297
301
  "step-name": !0,
298
- "step-name-success": s < b.value
302
+ "step-name-success": s < d.value
299
303
  };
300
304
  }
301
- function T(c, s) {
302
- return d("div", {
305
+ function M(r, s) {
306
+ return b("div", {
303
307
  class: "f-progress-step-title"
304
- }, [d("p", {
305
- class: P(c, s)
306
- }, [c.title])]);
308
+ }, [b("p", {
309
+ class: D(r, s)
310
+ }, [r.title])]);
307
311
  }
308
- function E(c, s) {
312
+ function R(r, s) {
309
313
  return {
310
314
  "f-progress-step-line": !0,
311
- "f-progress-step-line-success": s === b.value
315
+ "f-progress-step-line-success": s === d.value
312
316
  };
313
317
  }
314
- function D(c, s) {
318
+ function T(r, s) {
315
319
  return s !== y.value.length - 1;
316
320
  }
317
- const w = R(() => ({
321
+ const w = E(() => ({
318
322
  triangle: !0,
319
- "": i.value === "vertical"
323
+ "": a.value === "vertical"
320
324
  }));
321
325
  function h() {
322
- return y.value.map((c, s) => d("li", {
323
- class: u(c, s),
324
- onClick: (g) => v(c, s)
325
- }, [d("div", {
326
- class: k(c, s)
327
- }, [d("div", {
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", {
328
332
  class: "f-progress-step-content"
329
- }, [M(c, s), T(c, s)]), D(c, s) && d("div", {
330
- class: E(c, s)
331
- }, [d("span", {
333
+ }, [P(r, s), M(r, s)]), T(r, s) && b("div", {
334
+ class: R(r, s)
335
+ }, [b("span", {
332
336
  class: w.value
333
337
  }, null)])])]));
334
338
  }
335
- return G(() => t.activeIndex, () => {
336
- t.activeIndex > -1 && t.activeIndex <= y.value.length && (b.value = t.activeIndex, h());
337
- }), () => d("div", {
339
+ return H(() => t.activeIndex, () => {
340
+ t.activeIndex > -1 && t.activeIndex <= y.value.length && (d.value = t.activeIndex, h());
341
+ }), () => b("div", {
338
342
  class: "f-progress-step"
339
- }, [d("ul", {
340
- class: r.value,
341
- style: p.value
343
+ }, [b("ul", {
344
+ class: n.value,
345
+ style: u.value
342
346
  }, [h()])]);
343
347
  }
344
348
  });
345
- function ge(t, e, i) {
349
+ function ge(t, e, a) {
346
350
  var w;
347
- function n() {
348
- }
349
- const l = "", y = "", f = O();
350
- function j() {
351
+ const c = "", l = "", y = O();
352
+ function f() {
351
353
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
352
354
  }
353
- function b() {
355
+ function j() {
354
356
  return !1;
355
357
  }
356
- function r() {
358
+ function d() {
357
359
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
358
360
  }
359
- function p() {
361
+ function n() {
360
362
  return (e == null ? void 0 : e.schema.componentType) === "frame";
361
363
  }
362
364
  function u(h) {
@@ -364,176 +366,185 @@ function ge(t, e, i) {
364
366
  return null;
365
367
  if (h.value.schema && h.value.schema.type === "component")
366
368
  return h.value;
367
- const c = O(h == null ? void 0 : h.value.parent), s = u(c);
369
+ const r = O(h == null ? void 0 : h.value.parent), s = u(r);
368
370
  return s || null;
369
371
  }
370
- function v(h = e) {
371
- const { componentInstance: c, designerItemElementRef: s } = h;
372
- return !c || !c.value ? null : c.value.canMove ? s : v(h.parent);
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);
373
375
  }
374
- function k(h) {
375
- return !!i;
376
+ function v(h) {
377
+ return !!a;
376
378
  }
377
- function S() {
379
+ function k() {
378
380
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
379
381
  }
380
- function M() {
382
+ function S() {
381
383
  }
382
- function P(h, c) {
384
+ function P(h, r) {
383
385
  }
384
- function T(h, c) {
386
+ function D(h, r) {
385
387
  const { componentType: s } = h;
386
- let g = _(s, h, c);
387
- const a = s.toLowerCase().replace("-", "_");
388
- return g && !g.id && g.type === s && (g.id = `${a}_${Math.random().toString().slice(2, 6)}`), g;
388
+ let g = W(s, h, r);
389
+ const o = s.toLowerCase().replace(/-/g, "_");
390
+ return g && !g.id && g.type === s && (g.id = `${o}_${Math.random().toString().slice(2, 6)}`), g;
391
+ }
392
+ function M(h) {
389
393
  }
390
- function E(h) {
394
+ function R(...h) {
391
395
  }
392
- function D(...h) {
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();
403
+ });
393
404
  }
394
- return f.value = {
395
- canMove: j(),
396
- canSelectParent: b(),
397
- canDelete: r(),
398
- canNested: !p(),
405
+ return y.value = {
406
+ canMove: f(),
407
+ canSelectParent: j(),
408
+ canDelete: d(),
409
+ canNested: !n(),
399
410
  contents: e == null ? void 0 : e.schema.contents,
400
411
  elementRef: t,
401
412
  parent: (w = e == null ? void 0 : e.parent) == null ? void 0 : w.componentInstance,
402
413
  schema: e == null ? void 0 : e.schema,
403
- styles: l,
404
- designerClass: y,
405
- canAccepts: k,
414
+ styles: c,
415
+ designerClass: l,
416
+ canAccepts: v,
406
417
  getBelongedComponentInstance: u,
407
- getDraggableDesignItemElement: v,
408
- getDraggingDisplayText: S,
409
- getPropConfig: D,
410
- getDragScopeElement: M,
418
+ getDraggableDesignItemElement: p,
419
+ getDraggingDisplayText: k,
420
+ getPropConfig: R,
421
+ getDragScopeElement: S,
411
422
  onAcceptMovedChildElement: P,
412
- onChildElementMovedOut: E,
413
- addNewChildComponentSchema: T,
414
- updateDragAndDropRules: n,
423
+ onChildElementMovedOut: M,
424
+ addNewChildComponentSchema: D,
415
425
  triggerBelongedComponentToMoveWhenMoved: O(!1),
416
- triggerBelongedComponentToDeleteWhenDeleted: O(!1)
417
- }, f;
426
+ triggerBelongedComponentToDeleteWhenDeleted: O(!1),
427
+ onRemoveComponent: T
428
+ }, y;
418
429
  }
419
- const de = /* @__PURE__ */ V({
430
+ const ye = /* @__PURE__ */ V({
420
431
  name: "FStepDesign",
421
- props: L,
432
+ props: A,
422
433
  emits: [],
423
434
  setup(t, e) {
424
- const i = O(t.direction), n = O(t.fill), l = O(t.height), y = O(t.steps), f = O(0), j = O(t.clickable), b = O(0), r = O(), p = H("design-item-context"), u = ge(r, p);
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);
425
436
  J(() => {
426
- r.value.componentInstance = u;
427
- }), e.expose(u.value);
428
- const v = R(() => ({
429
- "f-progress-step-list": i.value === "horizontal",
430
- "f-progress-step-list-block": i.value === "vertical",
431
- "f-progress-step-horizontal-fill": i.value === "horizontal" && n.value,
432
- "f-progress-step-vertical-fill": i.value === "vertical" && n.value
433
- })), k = R(() => ({
434
- height: i.value === "vertical" ? `${l.value}px` : ""
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` : ""
435
446
  }));
436
- function S(a, o) {
447
+ function S(o, i) {
437
448
  const m = {
438
449
  step: !0,
439
- active: o === f.value,
450
+ active: i === f.value,
440
451
  clickable: j.value,
441
- "click-disable": a.disable,
442
- current: o === f.value
452
+ "click-disable": o.disable,
453
+ current: i === f.value
443
454
  };
444
- return o < f.value && (m.finish = !0), a.status && (m[a.status] = !0), a.hasOwnProperty("class") && a.class.split(" ").reduce((N, $) => (N[$] = !0, N), m), m;
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;
445
456
  }
446
- function M(a, o) {
457
+ function P(o, i) {
447
458
  }
448
- function P(a, o) {
459
+ function D(o, i) {
449
460
  const m = {
450
461
  "f-progressstep-row": !0,
451
- "step-active": o === f.value,
452
- "step-current": o === f.value
462
+ "step-active": i === f.value,
463
+ "step-current": i === f.value
453
464
  };
454
- return o < f.value && (m["step-finish"] = !0), a.status && (m["step-" + a.status] = !0), m;
465
+ return i < f.value && (m["step-finish"] = !0), o.status && (m["step-" + o.status] = !0), m;
455
466
  }
456
- function T(a, o) {
467
+ function M(o, i) {
457
468
  const m = {
458
469
  "step-icon": !0,
459
- "step-success": o,
460
- "k-icon": o,
461
- "k-i-check": o
470
+ "step-success": i,
471
+ "k-icon": i,
472
+ "k-i-check": i
462
473
  };
463
- return a.hasOwnProperty("icon") && a.class.split(" ").reduce((N, $) => (N[$] = !0, N), m), m;
474
+ return o.hasOwnProperty("icon") && o.class.split(" ").reduce(($, N) => ($[N] = !0, $), m), m;
464
475
  }
465
- function E(a, o) {
476
+ function R(o, i) {
466
477
  const m = [];
467
- return a.icon ? m.push(d("span", {
468
- class: T(a, !1)
469
- }, null)) : o >= f.value || o === b.value ? m.push(d("span", {
478
+ return o.icon ? m.push(b("span", {
479
+ class: M(o, !1)
480
+ }, null)) : i >= f.value || i === d.value ? m.push(b("span", {
470
481
  class: "step-icon"
471
- }, [o + 1])) : m.push(d("span", {
472
- class: T(a, !0)
482
+ }, [i + 1])) : m.push(b("span", {
483
+ class: M(o, !0)
473
484
  }, null)), m;
474
485
  }
475
- function D(a, o) {
486
+ function T(o, i) {
476
487
  return {
477
488
  "step-name": !0,
478
- "step-name-success": o < f.value
489
+ "step-name-success": i < f.value
479
490
  };
480
491
  }
481
- function w(a, o) {
482
- return d("div", {
492
+ function w(o, i) {
493
+ return b("div", {
483
494
  class: "f-progress-step-title"
484
- }, [d("p", {
485
- class: D(a, o)
486
- }, [a.title])]);
495
+ }, [b("p", {
496
+ class: T(o, i)
497
+ }, [o.title])]);
487
498
  }
488
- function h(a, o) {
499
+ function h(o, i) {
489
500
  return {
490
501
  "f-progress-step-line": !0,
491
- "f-progress-step-line-success": o === f.value
502
+ "f-progress-step-line-success": i === f.value
492
503
  };
493
504
  }
494
- function c(a, o) {
495
- return o !== y.value.length - 1;
505
+ function r(o, i) {
506
+ return i !== y.value.length - 1;
496
507
  }
497
- const s = R(() => ({
508
+ const s = E(() => ({
498
509
  triangle: !0,
499
- "": i.value === "vertical"
510
+ "": a.value === "vertical"
500
511
  }));
501
512
  function g() {
502
- return y.value.map((a, o) => d("li", {
503
- class: S(a, o),
513
+ return y.value.map((o, i) => b("li", {
514
+ class: S(o, i),
504
515
  onClick: (m) => void 0
505
- }, [d("div", {
506
- class: P(a, o)
507
- }, [d("div", {
516
+ }, [b("div", {
517
+ class: D(o, i)
518
+ }, [b("div", {
508
519
  class: "f-progress-step-content"
509
- }, [E(a, o), w(a, o)]), c(a, o) && d("div", {
510
- class: h(a, o)
511
- }, [d("span", {
520
+ }, [R(o, i), w(o, i)]), r(o, i) && b("div", {
521
+ class: h(o, i)
522
+ }, [b("span", {
512
523
  class: s.value
513
524
  }, null)])])]));
514
525
  }
515
- return () => d("div", {
516
- ref: r,
526
+ return () => b("div", {
527
+ ref: n,
517
528
  class: "f-progress-step"
518
- }, [d("ul", {
529
+ }, [b("ul", {
519
530
  class: v.value,
520
531
  style: k.value
521
532
  }, [g()])]);
522
533
  }
523
534
  }), me = {
524
535
  install(t) {
525
- t.component(A.name, A);
536
+ t.component(L.name, L);
526
537
  },
527
- register(t, e, i, n) {
528
- t.step = A, e.step = F;
538
+ register(t, e, a, c) {
539
+ t.step = L, e.step = F;
529
540
  },
530
- registerDesigner(t, e, i) {
531
- t.step = de, e.step = F;
541
+ registerDesigner(t, e, a) {
542
+ t.step = ye, e.step = F;
532
543
  }
533
544
  };
534
545
  export {
535
- A as Step,
546
+ L as Step,
536
547
  me as default,
537
548
  F as propsResolver,
538
- L as stepProps
549
+ A as stepProps
539
550
  };