@farris/ui-vue 1.2.8 → 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 (283) hide show
  1. package/components/accordion/index.esm.js +180 -180
  2. package/components/accordion/index.umd.cjs +1 -0
  3. package/components/avatar/index.esm.js +419 -331
  4. package/components/avatar/index.umd.cjs +1 -0
  5. package/components/border-editor/index.umd.cjs +1 -0
  6. package/components/button/index.umd.cjs +1 -0
  7. package/components/button-edit/index.css +1 -1
  8. package/components/button-edit/index.esm.js +346 -326
  9. package/components/button-edit/index.umd.cjs +1 -0
  10. package/components/button-group/index.umd.cjs +1 -0
  11. package/components/calculator/index.umd.cjs +1 -0
  12. package/components/calendar/index.esm.js +384 -384
  13. package/components/calendar/index.umd.cjs +1 -0
  14. package/components/capsule/index.esm.js +205 -205
  15. package/components/capsule/index.umd.cjs +1 -0
  16. package/components/checkbox/index.esm.js +555 -467
  17. package/components/checkbox/index.umd.cjs +1 -0
  18. package/components/color-picker/index.esm.js +239 -239
  19. package/components/color-picker/index.umd.cjs +3 -0
  20. package/components/combo-list/index.css +1 -0
  21. package/components/combo-list/index.esm.js +1072 -364
  22. package/components/combo-list/index.umd.cjs +1 -0
  23. package/components/combo-tree/index.esm.js +129 -129
  24. package/components/combo-tree/index.umd.cjs +1 -0
  25. package/components/common/index.esm.js +778 -700
  26. package/components/common/index.umd.cjs +1 -0
  27. package/components/component/index.esm.js +582 -327
  28. package/components/component/index.umd.cjs +1 -0
  29. package/components/condition/index.css +1 -0
  30. package/components/condition/index.esm.js +2433 -1134
  31. package/components/condition/index.umd.cjs +1 -0
  32. package/components/content-container/index.esm.js +307 -234
  33. package/components/content-container/index.umd.cjs +1 -0
  34. package/components/data-grid/index.css +1 -1
  35. package/components/data-grid/index.esm.js +6762 -4946
  36. package/components/data-grid/index.umd.cjs +1 -0
  37. package/components/data-view/index.css +1 -0
  38. package/components/data-view/index.esm.js +4977 -3489
  39. package/components/data-view/index.umd.cjs +1 -0
  40. package/components/date-picker/index.css +1 -1
  41. package/components/date-picker/index.esm.js +3525 -2811
  42. package/components/date-picker/index.umd.cjs +1 -0
  43. package/components/designer-canvas/index.css +1 -1
  44. package/components/designer-canvas/index.esm.js +938 -928
  45. package/components/designer-canvas/index.umd.cjs +1 -0
  46. package/components/designer-outline/index.css +1 -1
  47. package/components/designer-outline/index.esm.js +38 -37
  48. package/components/designer-outline/index.umd.cjs +1 -0
  49. package/components/designer-toolbox/index.esm.js +36 -12
  50. package/components/designer-toolbox/index.umd.cjs +1 -0
  51. package/components/discussion-editor/index.umd.cjs +3 -0
  52. package/components/discussion-list/index.umd.cjs +1 -0
  53. package/components/drawer/index.umd.cjs +1 -0
  54. package/components/dropdown/index.esm.js +282 -282
  55. package/components/dropdown/index.umd.cjs +2 -0
  56. package/components/dynamic-form/index.css +1 -0
  57. package/components/dynamic-form/index.esm.js +2684 -1039
  58. package/components/dynamic-form/index.umd.cjs +1 -0
  59. package/components/dynamic-resolver/index.esm.js +149 -101
  60. package/components/dynamic-resolver/index.umd.cjs +1 -0
  61. package/components/dynamic-view/index.esm.js +303 -290
  62. package/components/dynamic-view/index.umd.cjs +1 -0
  63. package/components/enum-editor/index.umd.cjs +1 -0
  64. package/components/events-editor/index.esm.js +573 -518
  65. package/components/events-editor/index.umd.cjs +1 -0
  66. package/components/expression-editor/index.esm.js +99 -99
  67. package/components/expression-editor/index.umd.cjs +1 -0
  68. package/components/external-container/index.css +1 -1
  69. package/components/external-container/index.esm.js +3607 -2799
  70. package/components/external-container/index.umd.cjs +1 -0
  71. package/components/field-selector/index.css +1 -1
  72. package/components/field-selector/index.esm.js +5438 -8236
  73. package/components/field-selector/index.umd.cjs +1 -0
  74. package/components/filter-bar/index.css +1 -1
  75. package/components/filter-bar/index.esm.js +1679 -1759
  76. package/components/filter-bar/index.umd.cjs +1 -0
  77. package/components/flow-canvas/index.css +1 -1
  78. package/components/flow-canvas/index.esm.js +1062 -1052
  79. package/components/flow-canvas/index.umd.cjs +1 -0
  80. package/components/image-cropper/index.esm.js +421 -421
  81. package/components/image-cropper/index.umd.cjs +1 -0
  82. package/components/input-group/index.esm.js +677 -593
  83. package/components/input-group/index.umd.cjs +1 -0
  84. package/components/layout/index.esm.js +326 -326
  85. package/components/layout/index.umd.cjs +1 -0
  86. package/components/list-nav/index.esm.js +272 -199
  87. package/components/list-nav/index.umd.cjs +1 -0
  88. package/components/list-view/index.css +1 -1
  89. package/components/list-view/index.esm.js +3739 -2273
  90. package/components/list-view/index.umd.cjs +1 -0
  91. package/components/loading/index.umd.cjs +8 -0
  92. package/components/locale/index.umd.cjs +1 -0
  93. package/components/lookup/index.css +1 -1
  94. package/components/lookup/index.esm.js +11255 -9004
  95. package/components/lookup/index.umd.cjs +1 -0
  96. package/components/mapping-editor/index.css +1 -1
  97. package/components/mapping-editor/index.esm.js +6046 -5314
  98. package/components/mapping-editor/index.umd.cjs +1 -0
  99. package/components/message-box/index.css +1 -1
  100. package/components/message-box/index.esm.js +511 -471
  101. package/components/message-box/index.umd.cjs +1 -0
  102. package/components/modal/index.css +1 -1
  103. package/components/modal/index.esm.js +438 -398
  104. package/components/modal/index.umd.cjs +1 -0
  105. package/components/nav/index.esm.js +588 -444
  106. package/components/nav/index.umd.cjs +3 -0
  107. package/components/notify/index.esm.js +59 -53
  108. package/components/notify/index.umd.cjs +1 -0
  109. package/components/number-range/index.esm.js +568 -485
  110. package/components/number-range/index.umd.cjs +1 -0
  111. package/components/number-spinner/index.esm.js +542 -454
  112. package/components/number-spinner/index.umd.cjs +1 -0
  113. package/components/order/index.css +1 -1
  114. package/components/order/index.esm.js +1967 -1105
  115. package/components/order/index.umd.cjs +1 -0
  116. package/components/page-footer/index.esm.js +160 -160
  117. package/components/page-footer/index.umd.cjs +1 -0
  118. package/components/page-header/index.esm.js +1282 -1151
  119. package/components/page-header/index.umd.cjs +1 -0
  120. package/components/pagination/index.esm.js +705 -555
  121. package/components/pagination/index.umd.cjs +1 -0
  122. package/components/popover/index.esm.js +71 -70
  123. package/components/popover/index.umd.cjs +1 -0
  124. package/components/progress/index.esm.js +270 -270
  125. package/components/progress/index.umd.cjs +3 -0
  126. package/components/property-editor/index.css +1 -1
  127. package/components/property-editor/index.esm.js +2231 -1517
  128. package/components/property-editor/index.umd.cjs +3 -0
  129. package/components/property-panel/index.esm.js +813 -909
  130. package/components/property-panel/index.umd.cjs +1 -0
  131. package/components/query-solution/index.css +1 -1
  132. package/components/query-solution/index.esm.js +3781 -2566
  133. package/components/query-solution/index.umd.cjs +1 -0
  134. package/components/radio-button/index.esm.js +101 -101
  135. package/components/radio-button/index.umd.cjs +1 -0
  136. package/components/radio-group/index.esm.js +538 -450
  137. package/components/radio-group/index.umd.cjs +1 -0
  138. package/components/rate/index.esm.js +238 -233
  139. package/components/rate/index.umd.cjs +1 -0
  140. package/components/response-layout/index.esm.js +155 -155
  141. package/components/response-layout/index.umd.cjs +1 -0
  142. package/components/response-layout-editor/index.css +1 -1
  143. package/components/response-layout-editor/index.esm.js +1243 -1180
  144. package/components/response-layout-editor/index.umd.cjs +1 -0
  145. package/components/response-toolbar/index.esm.js +988 -877
  146. package/components/response-toolbar/index.umd.cjs +1 -0
  147. package/components/schema-selector/index.css +1 -1
  148. package/components/schema-selector/index.esm.js +5413 -4867
  149. package/components/schema-selector/index.umd.cjs +8 -0
  150. package/components/search-box/index.esm.js +199 -199
  151. package/components/search-box/index.umd.cjs +1 -0
  152. package/components/section/index.esm.js +646 -503
  153. package/components/section/index.umd.cjs +1 -0
  154. package/components/smoke-detector/index.esm.js +144 -144
  155. package/components/smoke-detector/index.umd.cjs +1 -0
  156. package/components/spacing-editor/index.umd.cjs +1 -0
  157. package/components/splitter/index.esm.js +464 -391
  158. package/components/splitter/index.umd.cjs +1 -0
  159. package/components/step/index.esm.js +249 -249
  160. package/components/step/index.umd.cjs +1 -0
  161. package/components/switch/index.esm.js +483 -394
  162. package/components/switch/index.umd.cjs +1 -0
  163. package/components/tabs/index.css +1 -1
  164. package/components/tabs/index.esm.js +2366 -2208
  165. package/components/tabs/index.umd.cjs +1 -0
  166. package/components/tags/index.esm.js +397 -399
  167. package/components/tags/index.umd.cjs +1 -0
  168. package/components/text/index.esm.js +394 -394
  169. package/components/text/index.umd.cjs +1 -0
  170. package/components/textarea/index.esm.js +451 -367
  171. package/components/textarea/index.umd.cjs +1 -0
  172. package/components/time-picker/index.css +1 -1
  173. package/components/time-picker/index.esm.js +1252 -1144
  174. package/components/time-picker/index.umd.cjs +1 -0
  175. package/components/tooltip/index.umd.cjs +1 -0
  176. package/components/transfer/index.css +1 -1
  177. package/components/transfer/index.esm.js +510 -499
  178. package/components/transfer/index.umd.cjs +1 -0
  179. package/components/tree-grid/index.css +1 -1
  180. package/components/tree-grid/index.esm.js +5463 -9330
  181. package/components/tree-grid/index.umd.cjs +1 -0
  182. package/components/tree-view/index.css +1 -0
  183. package/components/tree-view/index.esm.js +4058 -2597
  184. package/components/tree-view/index.umd.cjs +1 -0
  185. package/components/uploader/index.esm.js +510 -504
  186. package/components/uploader/index.umd.cjs +2 -0
  187. package/components/verify-detail/index.esm.js +220 -220
  188. package/components/verify-detail/index.umd.cjs +1 -0
  189. package/components/video/index.esm.js +653 -394
  190. package/components/video/index.umd.cjs +1 -0
  191. package/components/weather/index.esm.js +1028 -1028
  192. package/components/weather/index.umd.cjs +16 -0
  193. package/farris.all.esm.js +20407 -18556
  194. package/farris.all.umd.cjs +8 -8
  195. package/index.css +1 -1
  196. package/package.json +1 -1
  197. package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
  198. package/types/capsule/src/capsule.props.d.ts +2 -2
  199. package/types/combo-list/src/components/list-container.props.d.ts +1 -1
  200. package/types/common/entity/entity-schema.d.ts +258 -0
  201. package/types/common/index.d.ts +1 -0
  202. package/types/common/types.d.ts +1 -1
  203. package/types/common/utils/encrypt.d.ts +2 -0
  204. package/types/component/src/component-ref.props.d.ts +4 -0
  205. package/types/component/src/component.props.d.ts +7 -0
  206. package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
  207. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  208. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  209. package/types/components.d.ts +1 -0
  210. package/types/data-grid/index.d.ts +8 -2
  211. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
  212. package/types/data-grid/src/data-grid.component.d.ts +3 -1
  213. package/types/data-grid/src/data-grid.props.d.ts +3 -2
  214. package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
  215. package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
  216. package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
  217. package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
  218. package/types/data-view/components/column-format/date.component.d.ts +4 -0
  219. package/types/data-view/components/column-format/enum.component.d.ts +4 -0
  220. package/types/data-view/components/column-format/number.component.d.ts +4 -0
  221. package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
  222. package/types/data-view/composition/types.d.ts +36 -7
  223. package/types/data-view/composition/use-edit.d.ts +2 -1
  224. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  225. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  226. package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
  227. package/types/designer-canvas/src/composition/types.d.ts +1 -1
  228. package/types/designer-canvas/src/types.d.ts +2 -2
  229. package/types/dynamic-form/index.d.ts +2 -1
  230. package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
  231. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  232. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  233. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  234. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  235. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  236. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  237. package/types/dynamic-form/src/schema/schema-resolver.d.ts +3 -1
  238. package/types/dynamic-form/src/types.d.ts +12 -1
  239. package/types/dynamic-resolver/index.d.ts +1 -0
  240. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  241. package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
  242. package/types/dynamic-resolver/src/types.d.ts +12 -2
  243. package/types/dynamic-view/index.d.ts +1 -0
  244. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  245. package/types/index.d.ts +2 -0
  246. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  247. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  248. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  249. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  250. package/types/lookup/src/composition/types.d.ts +8 -0
  251. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  252. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  253. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  254. package/types/lookup/src/composition/use-http.d.ts +9 -5
  255. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  256. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  257. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  258. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  259. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  260. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  261. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  262. package/types/modal/src/modal.component.d.ts +3 -0
  263. package/types/modal/src/modal.props.d.ts +4 -0
  264. package/types/page-header/src/page-header.props.d.ts +1 -0
  265. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  266. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  267. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  268. package/types/response-layout-editor/src/type.d.ts +21 -0
  269. package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
  270. package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
  271. package/types/section/src/property-config/section.property-config.d.ts +93 -0
  272. package/types/section/src/schema/schema-resolver.d.ts +2 -1
  273. package/types/tabs/src/composition/types.d.ts +2 -2
  274. package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
  275. package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
  276. package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
  277. package/types/tabs/src/tabs.props.d.ts +1 -0
  278. package/types/tags/index.d.ts +36 -5
  279. package/types/tree-grid/index.d.ts +8 -2
  280. package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
  281. package/types/modal/src/composition/use-esc.d.ts +0 -1
  282. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  283. package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
@@ -1,7 +1,7 @@
1
- import { defineComponent as F, ref as y, watch as D, computed as M, onMounted as P, createVNode as A, nextTick as T, inject as H } from "vue";
2
- import { cloneDeep as Q } from "lodash-es";
3
- import { withInstall as U } from "../common/index.esm.js";
4
- const X = "https://json-schema.org/draft/2020-12/schema", Y = "https://farris-design.gitee.io/capsule.schema.json", Z = "capsule", I = "A Farris Component", K = "object", x = {
1
+ import { defineComponent as F, ref as y, watch as D, computed as S, onMounted as P, createVNode as w, nextTick as T, inject as Q } from "vue";
2
+ import { isPlainObject as q, cloneDeep as U } from "lodash-es";
3
+ import { withInstall as X } from "../common/index.esm.js";
4
+ const Y = "https://json-schema.org/draft/2020-12/schema", Z = "https://farris-design.gitee.io/capsule.schema.json", I = "capsule", K = "A Farris Component", x = "object", ee = {
5
5
  id: {
6
6
  description: "The unique identifier for a capsule",
7
7
  type: "string"
@@ -63,126 +63,126 @@ const X = "https://json-schema.org/draft/2020-12/schema", Y = "https://farris-de
63
63
  type: "boolean",
64
64
  default: !0
65
65
  }
66
- }, ee = [
66
+ }, te = [
67
67
  "id",
68
68
  "type"
69
- ], te = {
70
- $schema: X,
71
- $id: Y,
72
- title: Z,
73
- description: I,
74
- type: K,
75
- properties: x,
76
- required: ee
77
- }, q = {}, _ = {};
69
+ ], ne = {
70
+ $schema: Y,
71
+ $id: Z,
72
+ title: I,
73
+ description: K,
74
+ type: x,
75
+ properties: ee,
76
+ required: te
77
+ }, _ = {}, J = {};
78
78
  function W(n) {
79
- const { properties: e, title: r } = n, l = Object.keys(e).reduce((u, o) => (u[o] = e[o].type === "object" && e[o].properties ? W(e[o]) : Q(e[o].default), u), {});
80
- return l.id = `${r}-${Date.now()}`, l;
79
+ const { properties: e, title: u, ignore: l } = n, s = l && Array.isArray(l), o = Object.keys(e).reduce((i, g) => ((!s || !l.find((j) => j == g)) && (i[g] = e[g].type === "object" && e[g].properties ? W(e[g]) : U(e[g].default)), i), {});
80
+ return (!s || !l.find((i) => i == "id")) && (o.id = `${u}-${Date.now()}`), o;
81
81
  }
82
- function N(n, e = {}) {
83
- const r = q[n];
84
- if (r) {
85
- let l = W(r);
86
- const u = _[n];
87
- return l = u ? u({ getSchemaByType: N }, l, e) : l, l;
82
+ function N(n, e = {}, u) {
83
+ const l = _[n];
84
+ if (l) {
85
+ let s = W(l);
86
+ const o = J[n];
87
+ return s = o ? o({ getSchemaByType: N }, s, e, u) : s, s;
88
88
  }
89
89
  return null;
90
90
  }
91
- function ne(n, e) {
92
- const r = W(e);
93
- return Object.keys(n).reduce((l, u) => (l[u] && typeof l[u] == "object" ? Object.assign(l[u], n[u]) : l[u] = n[u], l), r), r;
94
- }
95
91
  function ae(n, e) {
96
- return Object.keys(n).filter((l) => n[l] != null).reduce((l, u) => {
97
- if (e.has(u)) {
98
- const o = e.get(u);
92
+ const u = W(e);
93
+ return Object.keys(n).reduce((l, s) => (l[s] && q(l[s]) && q(n[s]) ? Object.assign(l[s], n[s]) : l[s] = n[s], l), u), u;
94
+ }
95
+ function le(n, e) {
96
+ return Object.keys(n).filter((l) => n[l] != null).reduce((l, s) => {
97
+ if (e.has(s)) {
98
+ const o = e.get(s);
99
99
  if (typeof o == "string")
100
- l[o] = n[u];
100
+ l[o] = n[s];
101
101
  else {
102
- const d = o(u, n[u], n);
103
- Object.assign(l, d);
102
+ const i = o(s, n[s], n);
103
+ Object.assign(l, i);
104
104
  }
105
105
  } else
106
- l[u] = n[u];
106
+ l[s] = n[s];
107
107
  return l;
108
108
  }, {});
109
109
  }
110
- function le(n, e, r = /* @__PURE__ */ new Map()) {
111
- const l = ne(n, e);
112
- return ae(l, r);
110
+ function se(n, e, u = /* @__PURE__ */ new Map()) {
111
+ const l = ae(n, e);
112
+ return le(l, u);
113
113
  }
114
- function se(n = {}) {
115
- function e(s, p, i, f) {
116
- if (typeof i == "number")
117
- return f[s].length === i;
118
- if (typeof i == "object") {
119
- const h = Object.keys(i)[0], g = i[h];
114
+ function ce(n = {}) {
115
+ function e(r, f, p, d) {
116
+ if (typeof p == "number")
117
+ return d[r].length === p;
118
+ if (typeof p == "object") {
119
+ const h = Object.keys(p)[0], b = p[h];
120
120
  if (h === "not")
121
- return Number(f[s].length) !== Number(g);
121
+ return Number(d[r].length) !== Number(b);
122
122
  if (h === "moreThan")
123
- return Number(f[s].length) >= Number(g);
123
+ return Number(d[r].length) >= Number(b);
124
124
  if (h === "lessThan")
125
- return Number(f[s].length) <= Number(g);
125
+ return Number(d[r].length) <= Number(b);
126
126
  }
127
127
  return !1;
128
128
  }
129
- function r(s, p, i, f) {
130
- return f[s] && f[s].propertyValue && String(f[s].propertyValue.value) === String(i);
129
+ function u(r, f, p, d) {
130
+ return d[r] && d[r].propertyValue && String(d[r].propertyValue.value) === String(p);
131
131
  }
132
132
  const l = /* @__PURE__ */ new Map([
133
133
  ["length", e],
134
- ["getProperty", r]
134
+ ["getProperty", u]
135
135
  ]);
136
- Object.keys(n).reduce((s, p) => (s.set(p, n[p]), s), l);
137
- function u(s, p) {
138
- const i = s;
139
- return typeof p == "number" ? [{ target: i, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: i, operator: "getProperty", param: s, value: !!p }] : typeof p == "object" ? Object.keys(p).map((f) => {
140
- if (f === "length")
141
- return { target: i, operator: "length", param: null, value: p[f] };
142
- const h = f, g = p[f];
143
- return { target: i, operator: "getProperty", param: h, value: g };
136
+ Object.keys(n).reduce((r, f) => (r.set(f, n[f]), r), l);
137
+ function s(r, f) {
138
+ const p = r;
139
+ return typeof f == "number" ? [{ target: p, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: p, operator: "getProperty", param: r, value: !!f }] : typeof f == "object" ? Object.keys(f).map((d) => {
140
+ if (d === "length")
141
+ return { target: p, operator: "length", param: null, value: f[d] };
142
+ const h = d, b = f[d];
143
+ return { target: p, operator: "getProperty", param: h, value: b };
144
144
  }) : [];
145
145
  }
146
- function o(s) {
147
- return Object.keys(s).reduce((i, f) => {
148
- const h = u(f, s[f]);
149
- return i.push(...h), i;
146
+ function o(r) {
147
+ return Object.keys(r).reduce((p, d) => {
148
+ const h = s(d, r[d]);
149
+ return p.push(...h), p;
150
150
  }, []);
151
151
  }
152
- function d(s, p) {
153
- if (l.has(s.operator)) {
154
- const i = l.get(s.operator);
155
- return i && i(s.target, s.param, s.value, p) || !1;
152
+ function i(r, f) {
153
+ if (l.has(r.operator)) {
154
+ const p = l.get(r.operator);
155
+ return p && p(r.target, r.param, r.value, f) || !1;
156
156
  }
157
157
  return !1;
158
158
  }
159
- function j(s, p) {
160
- return o(s).reduce((h, g) => h && d(g, p), !0);
159
+ function g(r, f) {
160
+ return o(r).reduce((h, b) => h && i(b, f), !0);
161
161
  }
162
- function S(s, p) {
163
- const i = Object.keys(s), f = i.includes("allOf"), h = i.includes("anyOf"), g = f || h, V = (g ? s[g ? f ? "allOf" : "anyOf" : "allOf"] : [s]).map((C) => j(C, p));
164
- return f ? !V.includes(!1) : V.includes(!0);
162
+ function j(r, f) {
163
+ const p = Object.keys(r), d = p.includes("allOf"), h = p.includes("anyOf"), b = d || h, V = (b ? r[b ? d ? "allOf" : "anyOf" : "allOf"] : [r]).map((C) => g(C, f));
164
+ return d ? !V.includes(!1) : V.includes(!0);
165
165
  }
166
- return { parseValueSchema: S };
166
+ return { parseValueSchema: j };
167
167
  }
168
- const ce = {}, ue = {};
169
- se();
170
- function re(n, e, r = /* @__PURE__ */ new Map(), l = (d, j, S) => j, u = {}, o = (d) => d) {
171
- return q[e.title] = e, _[e.title] = l, ce[e.title] = u, ue[e.title] = o, (d = {}) => {
172
- const j = le(d, e, r), S = Object.keys(n).reduce((s, p) => (s[p] = n[p].default, s), {});
173
- return Object.assign(S, j);
168
+ const re = {}, ue = {};
169
+ ce();
170
+ function oe(n, e, u = /* @__PURE__ */ new Map(), l = (i, g, j) => g, s = {}, o = (i) => i) {
171
+ return _[e.title] = e, J[e.title] = l, re[e.title] = s, ue[e.title] = o, (i = {}) => {
172
+ const g = se(i, e, u), j = Object.keys(n).reduce((r, f) => (r[f] = n[f].default, r), {});
173
+ return Object.assign(j, g);
174
174
  };
175
175
  }
176
- function oe(n, e) {
176
+ function ie(n, e) {
177
177
  return { customClass: e.class, customStyle: e.style };
178
178
  }
179
- const ie = /* @__PURE__ */ new Map([
180
- ["appearance", oe]
179
+ const pe = /* @__PURE__ */ new Map([
180
+ ["appearance", ie]
181
181
  ]);
182
- function pe(n, e, r) {
182
+ function fe(n, e, u) {
183
183
  return e;
184
184
  }
185
- const fe = "capsule", de = "A Farris Component", ve = "object", me = {
185
+ const de = "capsule", ve = "A Farris Component", me = "object", ye = {
186
186
  basic: {
187
187
  description: "Basic Infomation",
188
188
  title: "基本信息",
@@ -204,11 +204,11 @@ const fe = "capsule", de = "A Farris Component", ve = "object", me = {
204
204
  }
205
205
  }
206
206
  }
207
- }, ye = {
208
- title: fe,
209
- description: de,
210
- type: ve,
211
- categories: me
207
+ }, he = {
208
+ title: de,
209
+ description: ve,
210
+ type: me,
211
+ categories: ye
212
212
  }, L = {
213
213
  items: {
214
214
  Type: Array,
@@ -222,7 +222,7 @@ const fe = "capsule", de = "A Farris Component", ve = "object", me = {
222
222
  */
223
223
  modelValue: { type: String, default: "" },
224
224
  type: { type: String, default: "primary" }
225
- }, he = {
225
+ }, ge = {
226
226
  name: { type: String, default: "" },
227
227
  value: { type: String, default: "" },
228
228
  isActive: { type: Boolean, default: !1 },
@@ -230,34 +230,34 @@ const fe = "capsule", de = "A Farris Component", ve = "object", me = {
230
230
  index: { type: Number, default: 0 },
231
231
  show: { type: Boolean, default: !0 },
232
232
  disabled: { type: Boolean, default: !1 }
233
- }, J = re(L, te, ie, pe, ye), z = /* @__PURE__ */ F({
233
+ }, z = oe(L, ne, pe, fe, he), G = /* @__PURE__ */ F({
234
234
  name: "FCapsuleItem",
235
- props: he,
235
+ props: ge,
236
236
  emits: ["mounted", "active"],
237
237
  setup(n, e) {
238
- const r = y(), l = y(n.isActive);
239
- D(() => n.isActive, (d) => {
240
- l.value = d;
238
+ const u = y(), l = y(n.isActive);
239
+ D(() => n.isActive, (i) => {
240
+ l.value = i;
241
241
  });
242
- const u = M(() => ({
242
+ const s = S(() => ({
243
243
  "f-capsule-item": !0,
244
244
  "f-capsule-active-item": l.value,
245
245
  "f-capsule-disabled": n.disabled
246
246
  }));
247
247
  P(() => {
248
- e.emit("mounted", r, n.value);
248
+ e.emit("mounted", u, n.value);
249
249
  });
250
- function o(d) {
251
- n.disabled || e.emit("active", d, {
250
+ function o(i) {
251
+ n.disabled || e.emit("active", i, {
252
252
  name: n.name,
253
253
  value: n.value
254
254
  });
255
255
  }
256
- return () => A("div", {
257
- ref: r,
258
- class: u.value,
259
- onClick: (d) => o(d)
260
- }, [n.icon && A("i", {
256
+ return () => w("div", {
257
+ ref: u,
258
+ class: s.value,
259
+ onClick: (i) => o(i)
260
+ }, [n.icon && w("i", {
261
261
  class: n.icon
262
262
  }, null), n.name]);
263
263
  }
@@ -266,59 +266,59 @@ const fe = "capsule", de = "A Farris Component", ve = "object", me = {
266
266
  props: L,
267
267
  emits: ["change", "update:modelValue"],
268
268
  setup(n, e) {
269
- const r = y(n.items), l = y(), u = 2, o = y(n.modelValue), d = y("none"), j = y(n.type), S = M(() => {
269
+ const u = y(n.items), l = y(), s = 2, o = y(n.modelValue), i = y("none"), g = y(n.type), j = S(() => {
270
270
  const a = {
271
271
  "f-capsule-container": !0
272
272
  };
273
- return j.value && (a[j.value] = !0), a;
274
- }), s = M(() => ({})), p = M(() => ({
273
+ return g.value && (a[g.value] = !0), a;
274
+ }), r = S(() => ({})), f = S(() => ({
275
275
  "f-capsule": !0
276
- })), i = y(u), f = y(0), h = y(0), g = M(() => ({
277
- left: `${i.value}px`,
278
- width: `${f.value}px`,
279
- transition: d.value
280
- })), R = M(() => ({
276
+ })), p = y(s), d = y(0), h = y(0), b = S(() => ({
277
+ left: `${p.value}px`,
278
+ width: `${d.value}px`,
279
+ transition: i.value
280
+ })), R = S(() => ({
281
281
  width: `${h.value}px`
282
- })), O = /* @__PURE__ */ new Map();
282
+ })), A = /* @__PURE__ */ new Map();
283
283
  function V(a) {
284
284
  var t;
285
- if (O.has(a.value)) {
286
- const c = (t = O.get(a.value)) == null ? void 0 : t.value;
285
+ if (A.has(a.value)) {
286
+ const c = (t = A.get(a.value)) == null ? void 0 : t.value;
287
287
  if (c) {
288
288
  const m = c.getBoundingClientRect(), B = l.value.getBoundingClientRect();
289
- i.value = m.left - B.left + u + l.value.scrollLeft, f.value = m.width - 2 * u;
289
+ p.value = m.left - B.left + s + l.value.scrollLeft, d.value = m.width - 2 * s;
290
290
  }
291
291
  }
292
292
  }
293
- function w(a, t) {
293
+ function M(a, t) {
294
294
  const c = a.value;
295
295
  o.value = c, e.emit("update:modelValue", c), V(a), t && e.emit("change", c);
296
296
  }
297
297
  function C(a) {
298
- const t = r.value.findIndex((c) => c.value === a);
299
- t > -1 && w(r.value[t], !1);
298
+ const t = u.value.findIndex((c) => c.value === a);
299
+ t > -1 && M(u.value[t], !1);
300
300
  }
301
301
  D(() => n.modelValue, (a) => {
302
302
  o.value = a, C(o.value);
303
303
  }), D(() => n.items, async (a) => {
304
304
  const t = a.filter((c) => c.show);
305
- v(t), r.value = t, await T(), C(o.value), h.value = Array.from(O.values()).reduce((c, m) => (c += m.value.clientWidth, c), 0);
305
+ v(t), u.value = t, await T(), C(o.value), h.value = Array.from(A.values()).reduce((c, m) => (c += m.value.clientWidth, c), 0);
306
306
  }), P(async () => {
307
- C(o.value), await T(), d.value = "0.1s ease-out all", h.value = Array.from(O.values()).reduce((a, t) => (a += t.value.clientWidth, a), 0);
307
+ C(o.value), await T(), i.value = "0.1s ease-out all", h.value = Array.from(A.values()).reduce((a, t) => (a += t.value.clientWidth, a), 0);
308
308
  });
309
309
  function $(a, t) {
310
- w(t, !0);
310
+ M(t, !0);
311
311
  }
312
312
  function E(a, t) {
313
- O.set(t, a);
313
+ A.set(t, a);
314
314
  }
315
315
  function v(a) {
316
- Array.from(O.keys()).forEach((t) => {
317
- a.find((m) => m.value === t) || O.delete(t);
316
+ Array.from(A.keys()).forEach((t) => {
317
+ a.find((m) => m.value === t) || A.delete(t);
318
318
  });
319
319
  }
320
- function b(a, t) {
321
- return A(z, {
320
+ function O(a, t) {
321
+ return w(G, {
322
322
  name: a.name,
323
323
  value: a.value,
324
324
  isActive: a.value === o.value,
@@ -329,69 +329,69 @@ const fe = "capsule", de = "A Farris Component", ve = "object", me = {
329
329
  onActive: $
330
330
  }, null);
331
331
  }
332
- return () => A("span", {
332
+ return () => w("span", {
333
333
  ref: l,
334
- class: S.value,
335
- style: s.value
336
- }, [A("span", {
334
+ class: j.value,
335
+ style: r.value
336
+ }, [w("span", {
337
337
  class: "f-capsule-pane"
338
- }, [r.value.map((a, t) => b(a, t))]), A("small", {
339
- class: p.value,
340
- style: g.value
341
- }, null), A("div", {
338
+ }, [u.value.map((a, t) => O(a, t))]), w("small", {
339
+ class: f.value,
340
+ style: b.value
341
+ }, null), w("div", {
342
342
  class: "f-capsule-board",
343
343
  style: R.value
344
344
  }, null)]);
345
345
  }
346
346
  });
347
- function ge(n, e, r) {
347
+ function be(n, e, u) {
348
348
  var E;
349
349
  function l() {
350
350
  }
351
- const u = "", o = "", d = y();
352
- function j() {
351
+ const s = "", o = "", i = y();
352
+ function g() {
353
353
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
354
354
  }
355
- function S() {
355
+ function j() {
356
356
  return !1;
357
357
  }
358
- function s() {
358
+ function r() {
359
359
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
360
360
  }
361
- function p() {
361
+ function f() {
362
362
  return (e == null ? void 0 : e.schema.componentType) === "frame";
363
363
  }
364
- function i(v) {
364
+ function p(v) {
365
365
  if (!v || !v.value)
366
366
  return null;
367
367
  if (v.value.schema && v.value.schema.type === "component")
368
368
  return v.value;
369
- const b = y(v == null ? void 0 : v.value.parent), a = i(b);
369
+ const O = y(v == null ? void 0 : v.value.parent), a = p(O);
370
370
  return a || null;
371
371
  }
372
- function f(v = e) {
373
- const { componentInstance: b, designerItemElementRef: a } = v;
374
- return !b || !b.value ? null : b.value.canMove ? a : f(v.parent);
372
+ function d(v = e) {
373
+ const { componentInstance: O, designerItemElementRef: a } = v;
374
+ return !O || !O.value ? null : O.value.canMove ? a : d(v.parent);
375
375
  }
376
376
  function h(v) {
377
- return !!r;
377
+ return !!u;
378
378
  }
379
- function g() {
379
+ function b() {
380
380
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
381
381
  }
382
382
  function R() {
383
383
  }
384
- function O(v, b) {
384
+ function A(v, O) {
385
385
  }
386
- function V(v) {
387
- const { componentType: b } = v;
388
- let a = N(b, v);
389
- const t = b.toLowerCase().replace("-", "_");
390
- return a && !a.id && a.type === b && (a.id = `${t}_${Math.random().toString().slice(2, 6)}`), a;
386
+ function V(v, O) {
387
+ const { componentType: a } = v;
388
+ let t = N(a, v, O);
389
+ const c = a.toLowerCase().replace("-", "_");
390
+ return t && !t.id && t.type === a && (t.id = `${c}_${Math.random().toString().slice(2, 6)}`), t;
391
391
  }
392
- function w(v, b) {
392
+ function M(v, O) {
393
393
  const a = String(v.getAttribute("data-controltype")), t = v.getAttribute("data-feature"), c = t ? JSON.parse(t) : {};
394
- c.parentComponentInstance = d.value;
394
+ c.parentComponentInstance = i.value;
395
395
  let m = N(a, c);
396
396
  const B = a.toLowerCase().replace("-", "_");
397
397
  return m && !m.id && m.type === a && (m.id = `${B}_${Math.random().toString().slice(2, 6)}`), m;
@@ -400,62 +400,62 @@ function ge(n, e, r) {
400
400
  }
401
401
  function $(...v) {
402
402
  }
403
- return d.value = {
404
- canMove: j(),
405
- canSelectParent: S(),
406
- canDelete: s(),
407
- canNested: !p(),
403
+ return i.value = {
404
+ canMove: g(),
405
+ canSelectParent: j(),
406
+ canDelete: r(),
407
+ canNested: !f(),
408
408
  contents: e == null ? void 0 : e.schema.contents,
409
409
  elementRef: n,
410
410
  parent: (E = e == null ? void 0 : e.parent) == null ? void 0 : E.componentInstance,
411
411
  schema: e == null ? void 0 : e.schema,
412
- styles: u,
412
+ styles: s,
413
413
  designerClass: o,
414
414
  canAccepts: h,
415
- getBelongedComponentInstance: i,
416
- getDraggableDesignItemElement: f,
417
- getDraggingDisplayText: g,
415
+ getBelongedComponentInstance: p,
416
+ getDraggableDesignItemElement: d,
417
+ getDraggingDisplayText: b,
418
418
  getPropConfig: $,
419
419
  getDragScopeElement: R,
420
- onAcceptMovedChildElement: O,
421
- onAcceptNewChildElement: w,
420
+ onAcceptMovedChildElement: A,
421
+ onAcceptNewChildElement: M,
422
422
  onChildElementMovedOut: C,
423
423
  addNewChildComponentSchema: V,
424
424
  updateDragAndDropRules: l,
425
425
  triggerBelongedComponentToMoveWhenMoved: y(!1),
426
426
  triggerBelongedComponentToDeleteWhenDeleted: y(!1)
427
- }, d;
427
+ }, i;
428
428
  }
429
- const be = /* @__PURE__ */ F({
429
+ const Oe = /* @__PURE__ */ F({
430
430
  name: "FCapsuleDesign",
431
431
  props: L,
432
432
  emits: ["change", "update:modelValue"],
433
433
  setup(n, e) {
434
- const r = y(n.items), l = y(), u = 2, o = y(n.modelValue), d = y("none"), j = y(n.type), S = H("design-item-context"), s = ge(l, S);
434
+ const u = y(n.items), l = y(), s = 2, o = y(n.modelValue), i = y("none"), g = y(n.type), j = Q("design-item-context"), r = be(l, j);
435
435
  P(() => {
436
- l.value.componentInstance = s;
437
- }), e.expose(s.value);
438
- const p = M(() => {
436
+ l.value.componentInstance = r;
437
+ }), e.expose(r.value);
438
+ const f = S(() => {
439
439
  const t = {
440
440
  "f-capsule-container": !0
441
441
  };
442
- return j.value && (t[j.value] = !0), t;
443
- }), i = M(() => ({})), f = M(() => ({
442
+ return g.value && (t[g.value] = !0), t;
443
+ }), p = S(() => ({})), d = S(() => ({
444
444
  "f-capsule": !0
445
- })), h = y(u), g = y(0), R = y(0), O = M(() => ({
445
+ })), h = y(s), b = y(0), R = y(0), A = S(() => ({
446
446
  left: `${h.value}px`,
447
- width: `${g.value}px`,
448
- transition: d.value
449
- })), V = M(() => ({
447
+ width: `${b.value}px`,
448
+ transition: i.value
449
+ })), V = S(() => ({
450
450
  width: `${R.value}px`
451
- })), w = /* @__PURE__ */ new Map();
451
+ })), M = /* @__PURE__ */ new Map();
452
452
  function C(t) {
453
453
  var c;
454
- if (w.has(t.value)) {
455
- const m = (c = w.get(t.value)) == null ? void 0 : c.value;
454
+ if (M.has(t.value)) {
455
+ const m = (c = M.get(t.value)) == null ? void 0 : c.value;
456
456
  if (m) {
457
- const B = m.getBoundingClientRect(), G = l.value.getBoundingClientRect();
458
- h.value = B.left - G.left + u + l.value.scrollLeft, g.value = B.width - 2 * u;
457
+ const B = m.getBoundingClientRect(), H = l.value.getBoundingClientRect();
458
+ h.value = B.left - H.left + s + l.value.scrollLeft, b.value = B.width - 2 * s;
459
459
  }
460
460
  }
461
461
  }
@@ -464,58 +464,58 @@ const be = /* @__PURE__ */ F({
464
464
  o.value = m, e.emit("update:modelValue", m), C(t), c && e.emit("change", m);
465
465
  }
466
466
  function E(t) {
467
- const c = r.value.findIndex((m) => m.value === t);
468
- c > -1 && $(r.value[c], !1);
467
+ const c = u.value.findIndex((m) => m.value === t);
468
+ c > -1 && $(u.value[c], !1);
469
469
  }
470
470
  D(() => n.modelValue, (t) => {
471
471
  o.value = t, E(o.value);
472
472
  }), D(() => n.items, async (t) => {
473
- r.value = t, await T(), E(o.value), R.value = Array.from(w.values()).reduce((c, m) => (c += m.value.clientWidth, c), 0);
473
+ u.value = t, await T(), E(o.value), R.value = Array.from(M.values()).reduce((c, m) => (c += m.value.clientWidth, c), 0);
474
474
  }), P(async () => {
475
- E(o.value), await T(), d.value = "0.1s ease-out all", R.value = Array.from(w.values()).reduce((t, c) => (t += c.value.clientWidth, t), 0);
475
+ E(o.value), await T(), i.value = "0.1s ease-out all", R.value = Array.from(M.values()).reduce((t, c) => (t += c.value.clientWidth, t), 0);
476
476
  });
477
477
  function v(t, c) {
478
478
  $(c, !0);
479
479
  }
480
- function b(t, c) {
481
- w.set(c, t);
480
+ function O(t, c) {
481
+ M.set(c, t);
482
482
  }
483
483
  function a(t, c) {
484
- return A(z, {
484
+ return w(G, {
485
485
  name: t.name,
486
486
  value: t.value,
487
487
  isActive: t.value === o.value,
488
488
  index: c,
489
- onMounted: b,
489
+ onMounted: O,
490
490
  onActive: v
491
491
  }, null);
492
492
  }
493
- return () => A("span", {
493
+ return () => w("span", {
494
494
  ref: l,
495
- class: p.value,
496
- style: i.value
497
- }, [A("span", {
498
- class: "f-capsule-pane"
499
- }, [r.value.map((t, c) => a(t, c))]), A("small", {
500
495
  class: f.value,
501
- style: O.value
502
- }, null), A("div", {
496
+ style: p.value
497
+ }, [w("span", {
498
+ class: "f-capsule-pane"
499
+ }, [u.value.map((t, c) => a(t, c))]), w("small", {
500
+ class: d.value,
501
+ style: A.value
502
+ }, null), w("div", {
503
503
  class: "f-capsule-board",
504
504
  style: V.value
505
505
  }, null)]);
506
506
  }
507
507
  });
508
- k.register = (n, e, r) => {
509
- n.capsule = k, e.capsule = J;
508
+ k.register = (n, e, u) => {
509
+ n.capsule = k, e.capsule = z;
510
510
  };
511
- k.registerDesigner = (n, e, r) => {
512
- n.capsule = be, e.capsule = J;
511
+ k.registerDesigner = (n, e, u) => {
512
+ n.capsule = Oe, e.capsule = z;
513
513
  };
514
- const we = U(k);
514
+ const Me = X(k);
515
515
  export {
516
516
  k as FCapsule,
517
- he as capsuleItemProps,
517
+ ge as capsuleItemProps,
518
518
  L as capsuleProps,
519
- we as default,
520
- J as propsResolver
519
+ Me as default,
520
+ z as propsResolver
521
521
  };