@farris/ui-vue 1.3.0 → 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 (305) 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 +454 -398
  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 +479 -476
  13. package/components/calendar/index.umd.cjs +1 -1
  14. package/components/capsule/index.esm.js +255 -252
  15. package/components/capsule/index.umd.cjs +1 -1
  16. package/components/checkbox/index.esm.js +652 -567
  17. package/components/checkbox/index.umd.cjs +1 -1
  18. package/components/color-picker/index.esm.js +518 -521
  19. package/components/color-picker/index.umd.cjs +2 -2
  20. package/components/combo-list/index.esm.js +659 -553
  21. package/components/combo-list/index.umd.cjs +1 -1
  22. package/components/combo-tree/index.esm.js +162 -155
  23. package/components/combo-tree/index.umd.cjs +1 -1
  24. package/components/common/index.esm.js +866 -747
  25. package/components/common/index.umd.cjs +1 -1
  26. package/components/component/index.esm.js +371 -998
  27. package/components/component/index.umd.cjs +1 -1
  28. package/components/condition/index.esm.js +1174 -1280
  29. package/components/condition/index.umd.cjs +1 -1
  30. package/components/content-container/index.esm.js +340 -991
  31. package/components/content-container/index.umd.cjs +1 -1
  32. package/components/data-grid/index.esm.js +6066 -5847
  33. package/components/data-grid/index.umd.cjs +1 -1
  34. package/components/data-view/index.esm.js +3400 -3486
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.esm.js +2328 -2446
  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 +9551 -1200
  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 +234 -231
  46. package/components/dropdown/index.umd.cjs +2 -2
  47. package/components/dynamic-form/index.esm.js +1996 -2630
  48. package/components/dynamic-form/index.umd.cjs +1 -1
  49. package/components/dynamic-resolver/index.esm.js +138 -123
  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 +548 -586
  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 +2871 -3736
  62. package/components/external-container/index.umd.cjs +1 -1
  63. package/components/field-selector/index.esm.js +3380 -3645
  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 +10543 -3207
  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 +9775 -1312
  70. package/components/flow-canvas/index.umd.cjs +1 -1
  71. package/components/image-cropper/index.esm.js +442 -438
  72. package/components/image-cropper/index.umd.cjs +1 -1
  73. package/components/input-group/index.esm.js +587 -807
  74. package/components/input-group/index.umd.cjs +1 -1
  75. package/components/layout/index.esm.js +415 -381
  76. package/components/layout/index.umd.cjs +1 -1
  77. package/components/list-nav/index.esm.js +361 -1024
  78. package/components/list-nav/index.umd.cjs +1 -1
  79. package/components/list-view/index.esm.js +2265 -2371
  80. package/components/list-view/index.umd.cjs +1 -1
  81. package/components/lookup/index.esm.js +6425 -6257
  82. package/components/lookup/index.umd.cjs +1 -1
  83. package/components/mapping-editor/index.esm.js +6164 -5946
  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 +524 -1474
  90. package/components/nav/index.umd.cjs +3 -3
  91. package/components/number-range/index.esm.js +547 -502
  92. package/components/number-range/index.umd.cjs +1 -1
  93. package/components/number-spinner/index.esm.js +646 -574
  94. package/components/number-spinner/index.umd.cjs +1 -1
  95. package/components/order/index.esm.js +1181 -2028
  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 +1185 -2027
  100. package/components/page-header/index.umd.cjs +1 -1
  101. package/components/pagination/index.esm.js +442 -1368
  102. package/components/pagination/index.umd.cjs +1 -1
  103. package/components/progress/index.esm.js +238 -235
  104. package/components/progress/index.umd.cjs +3 -3
  105. package/components/property-editor/index.esm.js +1635 -1713
  106. package/components/property-editor/index.umd.cjs +2 -2
  107. package/components/property-panel/index.esm.js +791 -716
  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 +12203 -5274
  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 +1873 -520
  116. package/components/radio-group/index.umd.cjs +1 -1
  117. package/components/rate/index.esm.js +299 -300
  118. package/components/rate/index.umd.cjs +1 -1
  119. package/components/response-layout/index.esm.js +176 -173
  120. package/components/response-layout/index.umd.cjs +1 -1
  121. package/components/response-layout-editor/index.esm.js +715 -659
  122. package/components/response-layout-editor/index.umd.cjs +1 -1
  123. package/components/response-toolbar/index.esm.js +1032 -1883
  124. package/components/response-toolbar/index.umd.cjs +1 -1
  125. package/components/schema-selector/index.esm.js +4767 -5693
  126. package/components/schema-selector/index.umd.cjs +2 -2
  127. package/components/search-box/index.esm.js +169 -161
  128. package/components/search-box/index.umd.cjs +1 -1
  129. package/components/section/index.esm.js +490 -1167
  130. package/components/section/index.umd.cjs +1 -1
  131. package/components/smoke-detector/index.esm.js +154 -151
  132. package/components/smoke-detector/index.umd.cjs +1 -1
  133. package/components/splitter/index.esm.js +575 -1204
  134. package/components/splitter/index.umd.cjs +1 -1
  135. package/components/splitter/style.js +2 -0
  136. package/components/step/index.esm.js +279 -276
  137. package/components/step/index.umd.cjs +1 -1
  138. package/components/switch/index.esm.js +478 -428
  139. package/components/switch/index.umd.cjs +1 -1
  140. package/components/tabs/index.esm.js +2591 -3326
  141. package/components/tabs/index.umd.cjs +1 -1
  142. package/components/tags/index.esm.js +442 -439
  143. package/components/tags/index.umd.cjs +1 -1
  144. package/components/text/index.esm.js +309 -307
  145. package/components/text/index.umd.cjs +1 -1
  146. package/components/textarea/index.esm.js +500 -430
  147. package/components/textarea/index.umd.cjs +1 -1
  148. package/components/time-picker/index.esm.js +1391 -1341
  149. package/components/time-picker/index.umd.cjs +1 -1
  150. package/components/transfer/index.esm.js +574 -575
  151. package/components/transfer/index.umd.cjs +1 -1
  152. package/components/tree-grid/index.esm.js +3422 -3536
  153. package/components/tree-grid/index.umd.cjs +1 -1
  154. package/components/tree-view/index.esm.js +2661 -2764
  155. package/components/tree-view/index.umd.cjs +1 -1
  156. package/components/uploader/index.esm.js +675 -674
  157. package/components/uploader/index.umd.cjs +2 -2
  158. package/components/verify-detail/index.esm.js +300 -297
  159. package/components/verify-detail/index.umd.cjs +1 -1
  160. package/components/video/index.esm.js +454 -1089
  161. package/components/video/index.umd.cjs +1 -1
  162. package/components/weather/index.esm.js +709 -706
  163. package/components/weather/index.umd.cjs +5 -5
  164. package/farris.all.esm.js +54780 -52757
  165. package/farris.all.umd.cjs +14 -9
  166. package/index.css +1 -1
  167. package/package.json +1 -1
  168. package/types/binding-selector/index.d.ts +55 -0
  169. package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
  170. package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
  171. package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
  172. package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
  173. package/types/combo-list/src/components/list-container.component.d.ts +6 -6
  174. package/types/combo-list/src/components/list-container.props.d.ts +1 -1
  175. package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
  176. package/types/common/directive/area-response.d.ts +10 -0
  177. package/types/common/entity/entity-schema.d.ts +26 -11
  178. package/types/common/index.d.ts +9 -0
  179. package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
  180. package/types/common/types.d.ts +2 -2
  181. package/types/common/utils/resolve-field.d.ts +2 -0
  182. package/types/common/utils/use-class.d.ts +7 -0
  183. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  184. package/types/condition/src/condition-fields.design.component.d.ts +18 -0
  185. package/types/condition/src/types.d.ts +5 -4
  186. package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
  187. package/types/data-grid/index.d.ts +8 -5
  188. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
  189. package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
  190. package/types/data-grid/src/data-grid.component.d.ts +3 -2
  191. package/types/data-grid/src/data-grid.props.d.ts +2 -2
  192. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  193. package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
  194. package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
  195. package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
  196. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  197. package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
  198. package/types/data-view/composition/types.d.ts +9 -11
  199. package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
  200. package/types/date-picker/src/components/month/month.component.d.ts +3 -3
  201. package/types/date-picker/src/components/year/year.component.d.ts +3 -3
  202. package/types/designer-canvas/index.d.ts +3 -1
  203. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  204. package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
  205. package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
  206. package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
  207. package/types/designer-canvas/src/composition/types.d.ts +49 -41
  208. package/types/designer-canvas/src/types.d.ts +10 -21
  209. package/types/dynamic-form/index.d.ts +1 -1
  210. package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
  211. package/types/dynamic-form/src/designer/response-form-use-designer-rules.d.ts +3 -0
  212. package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
  213. package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +1 -1
  214. package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
  215. package/types/dynamic-form/src/types.d.ts +1 -1
  216. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +6 -1
  217. package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
  218. package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
  219. package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
  220. package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
  221. package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
  222. package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
  223. package/types/event-parameter/index.d.ts +31 -0
  224. package/types/event-parameter/src/composition/type.d.ts +77 -0
  225. package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
  226. package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
  227. package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
  228. package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
  229. package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
  230. package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
  231. package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
  232. package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
  233. package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
  234. package/types/field-selector/src/field-selector.component.d.ts +1 -2
  235. package/types/field-selector/src/field-selector.props.d.ts +0 -9
  236. package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
  237. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
  238. package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
  239. package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
  240. package/types/list-view/src/list-view-table.component.d.ts +15 -0
  241. package/types/lookup/src/composition/use-user-data.d.ts +2 -2
  242. package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
  243. package/types/modal/src/composition/modal.service.d.ts +2 -1
  244. package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
  245. package/types/page-header/src/page-header.component.d.ts +1 -1
  246. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
  247. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
  248. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
  249. package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
  250. package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
  251. package/types/property-panel/index.d.ts +3 -1
  252. package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
  253. package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
  254. package/types/property-panel/src/composition/type.d.ts +0 -13
  255. package/types/query-solution/src/composition/types.d.ts +35 -4
  256. package/types/query-solution/src/composition/use-header.d.ts +21 -0
  257. package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
  258. package/types/query-solution/src/composition/use-solution.d.ts +20 -0
  259. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +43 -35
  260. package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
  261. package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
  262. package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
  263. package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
  264. package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
  265. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +12 -0
  266. package/types/query-solution/src/query-solution.d.ts +10 -2
  267. package/types/query-solution/src/solutions.d.ts +108 -509
  268. package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
  269. package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
  270. package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
  271. package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
  272. package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
  273. package/types/response-layout-editor/index.d.ts +3 -1
  274. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
  275. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
  276. package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
  277. package/types/section/src/designer/use-designer-rules.d.ts +3 -3
  278. package/types/section/src/property-config/section.property-config.d.ts +17 -17
  279. package/types/section/src/schema/schema-resolver.d.ts +1 -2
  280. package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
  281. package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
  282. package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
  283. package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
  284. package/types/tabs/src/composition/types.d.ts +4 -1
  285. package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
  286. package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
  287. package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
  288. package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
  289. package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
  290. package/types/text/src/composition/types.d.ts +4 -4
  291. package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
  292. package/types/tree-grid/index.d.ts +3 -3
  293. package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
  294. package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
  295. package/types/weather/src/composition/use-weather-color.d.ts +15 -0
  296. package/types/weather/src/composition/use-weather-data.d.ts +15 -0
  297. package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
  298. package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
  299. package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
  300. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +0 -3
  301. package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
  302. package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
  303. package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
  304. package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
  305. package/types/weather/src/composition/types.d.ts +0 -2
@@ -1,5 +1,5 @@
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";
1
+ import { defineComponent as F, ref as m, watch as P, computed as S, onMounted as T, createVNode as w, nextTick as k, inject as Q } from "vue";
2
+ import { isPlainObject as L, cloneDeep as U } from "lodash-es";
3
3
  import { withInstall as X } from "../common/index.esm.js";
4
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: {
@@ -74,115 +74,119 @@ const Y = "https://json-schema.org/draft/2020-12/schema", Z = "https://farris-de
74
74
  type: x,
75
75
  properties: ee,
76
76
  required: te
77
- }, _ = {}, J = {};
78
- function W(n) {
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;
77
+ }, q = {}, _ = {};
78
+ function C(t) {
79
+ const { properties: e, title: r, ignore: l } = t, s = l && Array.isArray(l), o = Object.keys(e).reduce((i, h) => ((!s || !l.find((A) => A === h)) && (i[h] = e[h].type === "object" && e[h].properties ? C(e[h]) : U(e[h].default)), i), {});
80
+ if (r && (!s || !l.find((i) => i === "id"))) {
81
+ const i = r.toLowerCase().replace(/-/g, "_");
82
+ o.id = `${i}_${Math.random().toString().slice(2, 6)}`;
83
+ }
84
+ return o;
81
85
  }
82
- function N(n, e = {}, u) {
83
- const l = _[n];
86
+ function H(t, e = {}, r) {
87
+ const l = q[t];
84
88
  if (l) {
85
- let s = W(l);
86
- const o = J[n];
87
- return s = o ? o({ getSchemaByType: N }, s, e, u) : s, s;
89
+ let s = C(l);
90
+ const o = _[t];
91
+ return s = o ? o({ getSchemaByType: H }, s, e, r) : s, s;
88
92
  }
89
93
  return null;
90
94
  }
91
- function ae(n, e) {
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;
95
+ function ae(t, e) {
96
+ const r = C(e);
97
+ return Object.keys(r).reduce((l, s) => (l[s] && L(l[s]) && L(t[s] || !t[s]) ? Object.assign(l[s], t[s] || {}) : l[s] = t[s], l), r), r;
94
98
  }
95
- function le(n, e) {
96
- return Object.keys(n).filter((l) => n[l] != null).reduce((l, s) => {
99
+ function le(t, e) {
100
+ return Object.keys(t).filter((l) => t[l] != null).reduce((l, s) => {
97
101
  if (e.has(s)) {
98
102
  const o = e.get(s);
99
103
  if (typeof o == "string")
100
- l[o] = n[s];
104
+ l[o] = t[s];
101
105
  else {
102
- const i = o(s, n[s], n);
106
+ const i = o(s, t[s], t);
103
107
  Object.assign(l, i);
104
108
  }
105
109
  } else
106
- l[s] = n[s];
110
+ l[s] = t[s];
107
111
  return l;
108
112
  }, {});
109
113
  }
110
- function se(n, e, u = /* @__PURE__ */ new Map()) {
111
- const l = ae(n, e);
112
- return le(l, u);
114
+ function se(t, e, r = /* @__PURE__ */ new Map()) {
115
+ const l = ae(t, e);
116
+ return le(l, r);
113
117
  }
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
- if (h === "not")
121
- return Number(d[r].length) !== Number(b);
122
- if (h === "moreThan")
123
- return Number(d[r].length) >= Number(b);
124
- if (h === "lessThan")
125
- return Number(d[r].length) <= Number(b);
118
+ function ce(t = {}) {
119
+ function e(c, p, f, v) {
120
+ if (typeof f == "number")
121
+ return v[c].length === f;
122
+ if (typeof f == "object") {
123
+ const y = Object.keys(f)[0], b = f[y];
124
+ if (y === "not")
125
+ return Number(v[c].length) !== Number(b);
126
+ if (y === "moreThan")
127
+ return Number(v[c].length) >= Number(b);
128
+ if (y === "lessThan")
129
+ return Number(v[c].length) <= Number(b);
126
130
  }
127
131
  return !1;
128
132
  }
129
- function u(r, f, p, d) {
130
- return d[r] && d[r].propertyValue && String(d[r].propertyValue.value) === String(p);
133
+ function r(c, p, f, v) {
134
+ return v[c] && v[c].propertyValue && String(v[c].propertyValue.value) === String(f);
131
135
  }
132
136
  const l = /* @__PURE__ */ new Map([
133
137
  ["length", e],
134
- ["getProperty", u]
138
+ ["getProperty", r]
135
139
  ]);
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 };
140
+ Object.keys(t).reduce((c, p) => (c.set(p, t[p]), c), l);
141
+ function s(c, p) {
142
+ const f = c;
143
+ return typeof p == "number" ? [{ target: f, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: f, operator: "getProperty", param: c, value: !!p }] : typeof p == "object" ? Object.keys(p).map((v) => {
144
+ if (v === "length")
145
+ return { target: f, operator: "length", param: null, value: p[v] };
146
+ const y = v, b = p[v];
147
+ return { target: f, operator: "getProperty", param: y, value: b };
144
148
  }) : [];
145
149
  }
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
+ function o(c) {
151
+ return Object.keys(c).reduce((f, v) => {
152
+ const y = s(v, c[v]);
153
+ return f.push(...y), f;
150
154
  }, []);
151
155
  }
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
+ function i(c, p) {
157
+ if (l.has(c.operator)) {
158
+ const f = l.get(c.operator);
159
+ return f && f(c.target, c.param, c.value, p) || !1;
156
160
  }
157
161
  return !1;
158
162
  }
159
- function g(r, f) {
160
- return o(r).reduce((h, b) => h && i(b, f), !0);
163
+ function h(c, p) {
164
+ return o(c).reduce((y, b) => y && i(b, p), !0);
161
165
  }
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);
166
+ function A(c, p) {
167
+ const f = Object.keys(c), v = f.includes("allOf"), y = f.includes("anyOf"), b = v || y, $ = (b ? c[b ? v ? "allOf" : "anyOf" : "allOf"] : [c]).map((B) => h(B, p));
168
+ return v ? !$.includes(!1) : $.includes(!0);
165
169
  }
166
- return { parseValueSchema: j };
170
+ return { parseValueSchema: A };
167
171
  }
168
- const re = {}, ue = {};
172
+ const ue = {}, re = {};
169
173
  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
+ function oe(t, e, r = /* @__PURE__ */ new Map(), l = (i, h, A, c) => h, s = {}, o = (i) => i) {
175
+ return q[e.title] = e, _[e.title] = l, ue[e.title] = s, re[e.title] = o, (i = {}) => {
176
+ const h = se(i, e, r), A = Object.keys(t).reduce((c, p) => (c[p] = t[p].default, c), {});
177
+ return Object.assign(A, h);
174
178
  };
175
179
  }
176
- function ie(n, e) {
180
+ function ie(t, e) {
177
181
  return { customClass: e.class, customStyle: e.style };
178
182
  }
179
183
  const pe = /* @__PURE__ */ new Map([
180
184
  ["appearance", ie]
181
185
  ]);
182
- function fe(n, e, u) {
186
+ function fe(t, e, r) {
183
187
  return e;
184
188
  }
185
- const de = "capsule", ve = "A Farris Component", me = "object", ye = {
189
+ const ve = "capsule", de = "A Farris Component", me = "object", ye = {
186
190
  basic: {
187
191
  description: "Basic Infomation",
188
192
  title: "基本信息",
@@ -205,11 +209,11 @@ const de = "capsule", ve = "A Farris Component", me = "object", ye = {
205
209
  }
206
210
  }
207
211
  }, he = {
208
- title: de,
209
- description: ve,
212
+ title: ve,
213
+ description: de,
210
214
  type: me,
211
215
  categories: ye
212
- }, L = {
216
+ }, W = {
213
217
  items: {
214
218
  Type: Array,
215
219
  default: [
@@ -222,7 +226,7 @@ const de = "capsule", ve = "A Farris Component", me = "object", ye = {
222
226
  */
223
227
  modelValue: { type: String, default: "" },
224
228
  type: { type: String, default: "primary" }
225
- }, ge = {
229
+ }, be = {
226
230
  name: { type: String, default: "" },
227
231
  value: { type: String, default: "" },
228
232
  isActive: { type: Boolean, default: !1 },
@@ -230,292 +234,291 @@ const de = "capsule", ve = "A Farris Component", me = "object", ye = {
230
234
  index: { type: Number, default: 0 },
231
235
  show: { type: Boolean, default: !0 },
232
236
  disabled: { type: Boolean, default: !1 }
233
- }, z = oe(L, ne, pe, fe, he), G = /* @__PURE__ */ F({
237
+ }, z = oe(W, ne, pe, fe, he), G = /* @__PURE__ */ F({
234
238
  name: "FCapsuleItem",
235
- props: ge,
239
+ props: be,
236
240
  emits: ["mounted", "active"],
237
- setup(n, e) {
238
- const u = y(), l = y(n.isActive);
239
- D(() => n.isActive, (i) => {
241
+ setup(t, e) {
242
+ const r = m(), l = m(t.isActive);
243
+ P(() => t.isActive, (i) => {
240
244
  l.value = i;
241
245
  });
242
246
  const s = S(() => ({
243
247
  "f-capsule-item": !0,
244
248
  "f-capsule-active-item": l.value,
245
- "f-capsule-disabled": n.disabled
249
+ "f-capsule-disabled": t.disabled
246
250
  }));
247
- P(() => {
248
- e.emit("mounted", u, n.value);
251
+ T(() => {
252
+ e.emit("mounted", r, t.value);
249
253
  });
250
254
  function o(i) {
251
- n.disabled || e.emit("active", i, {
252
- name: n.name,
253
- value: n.value
255
+ t.disabled || e.emit("active", i, {
256
+ name: t.name,
257
+ value: t.value
254
258
  });
255
259
  }
256
260
  return () => w("div", {
257
- ref: u,
261
+ ref: r,
258
262
  class: s.value,
259
263
  onClick: (i) => o(i)
260
- }, [n.icon && w("i", {
261
- class: n.icon
262
- }, null), n.name]);
264
+ }, [t.icon && w("i", {
265
+ class: t.icon
266
+ }, null), t.name]);
263
267
  }
264
- }), k = /* @__PURE__ */ F({
268
+ }), N = /* @__PURE__ */ F({
265
269
  name: "FCapsule",
266
- props: L,
270
+ props: W,
267
271
  emits: ["change", "update:modelValue"],
268
- setup(n, e) {
269
- const u = y(n.items), l = y(), s = 2, o = y(n.modelValue), i = y("none"), g = y(n.type), j = S(() => {
272
+ setup(t, e) {
273
+ const r = m(t.items), l = m(), s = 2, o = m(t.modelValue), i = m("none"), h = m(t.type), A = S(() => {
270
274
  const a = {
271
275
  "f-capsule-container": !0
272
276
  };
273
- return g.value && (a[g.value] = !0), a;
274
- }), r = S(() => ({})), f = S(() => ({
277
+ return h.value && (a[h.value] = !0), a;
278
+ }), c = S(() => ({})), p = S(() => ({
275
279
  "f-capsule": !0
276
- })), p = y(s), d = y(0), h = y(0), b = S(() => ({
277
- left: `${p.value}px`,
278
- width: `${d.value}px`,
280
+ })), f = m(s), v = m(0), y = m(0), b = S(() => ({
281
+ left: `${f.value}px`,
282
+ width: `${v.value}px`,
279
283
  transition: i.value
280
- })), R = S(() => ({
281
- width: `${h.value}px`
282
- })), A = /* @__PURE__ */ new Map();
283
- function V(a) {
284
- var t;
285
- if (A.has(a.value)) {
286
- const c = (t = A.get(a.value)) == null ? void 0 : t.value;
287
- if (c) {
288
- const m = c.getBoundingClientRect(), B = l.value.getBoundingClientRect();
289
- p.value = m.left - B.left + s + l.value.scrollLeft, d.value = m.width - 2 * s;
284
+ })), V = S(() => ({
285
+ width: `${y.value}px`
286
+ })), M = /* @__PURE__ */ new Map();
287
+ function $(a) {
288
+ var n;
289
+ if (M.has(a.value)) {
290
+ const u = (n = M.get(a.value)) == null ? void 0 : n.value;
291
+ if (u) {
292
+ const j = u.getBoundingClientRect(), D = l.value.getBoundingClientRect();
293
+ f.value = j.left - D.left + s + l.value.scrollLeft, v.value = j.width - 2 * s;
290
294
  }
291
295
  }
292
296
  }
293
- function M(a, t) {
294
- const c = a.value;
295
- o.value = c, e.emit("update:modelValue", c), V(a), t && e.emit("change", c);
297
+ function R(a, n) {
298
+ const u = a.value;
299
+ o.value = u, e.emit("update:modelValue", u), $(a), n && e.emit("change", u);
296
300
  }
297
- function C(a) {
298
- const t = u.value.findIndex((c) => c.value === a);
299
- t > -1 && M(u.value[t], !1);
301
+ function B(a) {
302
+ const n = r.value.findIndex((u) => u.value === a);
303
+ n > -1 && R(r.value[n], !1);
300
304
  }
301
- D(() => n.modelValue, (a) => {
302
- o.value = a, C(o.value);
303
- }), D(() => n.items, async (a) => {
304
- const t = a.filter((c) => c.show);
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
- }), P(async () => {
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);
305
+ P(() => t.modelValue, (a) => {
306
+ o.value = a, B(o.value);
307
+ }), T(async () => {
308
+ B(o.value), await k(), i.value = "0.1s ease-out all", y.value = Array.from(M.values()).reduce((a, n) => (a += n.value.clientWidth, a), 0);
308
309
  });
309
- function $(a, t) {
310
- M(t, !0);
310
+ function E(a, n) {
311
+ R(n, !0);
311
312
  }
312
- function E(a, t) {
313
- A.set(t, a);
313
+ function d(a, n) {
314
+ M.set(n, a);
314
315
  }
315
- function v(a) {
316
- Array.from(A.keys()).forEach((t) => {
317
- a.find((m) => m.value === t) || A.delete(t);
316
+ function O(a) {
317
+ Array.from(M.keys()).forEach((n) => {
318
+ a.find((j) => j.value === n) || M.delete(n);
318
319
  });
319
320
  }
320
- function O(a, t) {
321
+ function g(a, n) {
321
322
  return w(G, {
322
323
  name: a.name,
323
324
  value: a.value,
324
325
  isActive: a.value === o.value,
325
- index: t,
326
+ index: n,
326
327
  disabled: a.disabled,
327
328
  key: a.value,
328
- onMounted: E,
329
- onActive: $
329
+ onMounted: d,
330
+ onActive: E
330
331
  }, null);
331
332
  }
332
- return () => w("span", {
333
+ return P(() => t.items, async (a) => {
334
+ const n = a.filter((u) => u.show);
335
+ O(n), r.value = n, await k(), B(o.value), y.value = Array.from(M.values()).reduce((u, j) => (u += j.value.clientWidth, u), 0);
336
+ }), () => w("span", {
333
337
  ref: l,
334
- class: j.value,
335
- style: r.value
338
+ class: A.value,
339
+ style: c.value
336
340
  }, [w("span", {
337
341
  class: "f-capsule-pane"
338
- }, [u.value.map((a, t) => O(a, t))]), w("small", {
339
- class: f.value,
342
+ }, [r.value.map((a, n) => g(a, n))]), w("small", {
343
+ class: p.value,
340
344
  style: b.value
341
345
  }, null), w("div", {
342
346
  class: "f-capsule-board",
343
- style: R.value
347
+ style: V.value
344
348
  }, null)]);
345
349
  }
346
350
  });
347
- function be(n, e, u) {
351
+ function ge(t, e, r) {
348
352
  var E;
349
- function l() {
350
- }
351
- const s = "", o = "", i = y();
352
- function g() {
353
+ const l = "", s = "", o = m();
354
+ function i() {
353
355
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
354
356
  }
355
- function j() {
357
+ function h() {
356
358
  return !1;
357
359
  }
358
- function r() {
360
+ function A() {
359
361
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
360
362
  }
361
- function f() {
363
+ function c() {
362
364
  return (e == null ? void 0 : e.schema.componentType) === "frame";
363
365
  }
364
- function p(v) {
365
- if (!v || !v.value)
366
+ function p(d) {
367
+ if (!d || !d.value)
366
368
  return null;
367
- if (v.value.schema && v.value.schema.type === "component")
368
- return v.value;
369
- const O = y(v == null ? void 0 : v.value.parent), a = p(O);
370
- return a || null;
369
+ if (d.value.schema && d.value.schema.type === "component")
370
+ return d.value;
371
+ const O = m(d == null ? void 0 : d.value.parent), g = p(O);
372
+ return g || null;
371
373
  }
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);
374
+ function f(d = e) {
375
+ const { componentInstance: O, designerItemElementRef: g } = d;
376
+ return !O || !O.value ? null : O.value.canMove ? g : f(d.parent);
375
377
  }
376
- function h(v) {
377
- return !!u;
378
+ function v(d) {
379
+ return !!r;
378
380
  }
379
- function b() {
381
+ function y() {
380
382
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
381
383
  }
382
- function R() {
384
+ function b() {
383
385
  }
384
- function A(v, O) {
386
+ function V(d, O) {
385
387
  }
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;
388
+ function M(d, O) {
389
+ const { componentType: g } = d;
390
+ let a = H(g, d, O);
391
+ const n = g.toLowerCase().replace(/-/g, "_");
392
+ return a && !a.id && a.type === g && (a.id = `${n}_${Math.random().toString().slice(2, 6)}`), a;
391
393
  }
392
- function M(v, O) {
393
- const a = String(v.getAttribute("data-controltype")), t = v.getAttribute("data-feature"), c = t ? JSON.parse(t) : {};
394
- c.parentComponentInstance = i.value;
395
- let m = N(a, c);
396
- const B = a.toLowerCase().replace("-", "_");
397
- return m && !m.id && m.type === a && (m.id = `${B}_${Math.random().toString().slice(2, 6)}`), m;
394
+ function $(d) {
398
395
  }
399
- function C(v) {
396
+ function R(...d) {
400
397
  }
401
- function $(...v) {
398
+ function B() {
399
+ e != null && e.schema.contents && e.schema.contents.map((d) => {
400
+ var a;
401
+ let O = d.id;
402
+ d.type === "component-ref" && (O = d.component);
403
+ const g = t.value.querySelector(`#${O}-design-item`);
404
+ (a = g == null ? void 0 : g.componentInstance) != null && a.value.onRemoveComponent && g.componentInstance.value.onRemoveComponent();
405
+ });
402
406
  }
403
- return i.value = {
404
- canMove: g(),
405
- canSelectParent: j(),
406
- canDelete: r(),
407
- canNested: !f(),
407
+ return o.value = {
408
+ canMove: i(),
409
+ canSelectParent: h(),
410
+ canDelete: A(),
411
+ canNested: !c(),
408
412
  contents: e == null ? void 0 : e.schema.contents,
409
- elementRef: n,
413
+ elementRef: t,
410
414
  parent: (E = e == null ? void 0 : e.parent) == null ? void 0 : E.componentInstance,
411
415
  schema: e == null ? void 0 : e.schema,
412
- styles: s,
413
- designerClass: o,
414
- canAccepts: h,
416
+ styles: l,
417
+ designerClass: s,
418
+ canAccepts: v,
415
419
  getBelongedComponentInstance: p,
416
- getDraggableDesignItemElement: d,
417
- getDraggingDisplayText: b,
418
- getPropConfig: $,
419
- getDragScopeElement: R,
420
- onAcceptMovedChildElement: A,
421
- onAcceptNewChildElement: M,
422
- onChildElementMovedOut: C,
423
- addNewChildComponentSchema: V,
424
- updateDragAndDropRules: l,
425
- triggerBelongedComponentToMoveWhenMoved: y(!1),
426
- triggerBelongedComponentToDeleteWhenDeleted: y(!1)
427
- }, i;
420
+ getDraggableDesignItemElement: f,
421
+ getDraggingDisplayText: y,
422
+ getPropConfig: R,
423
+ getDragScopeElement: b,
424
+ onAcceptMovedChildElement: V,
425
+ onChildElementMovedOut: $,
426
+ addNewChildComponentSchema: M,
427
+ triggerBelongedComponentToMoveWhenMoved: m(!1),
428
+ triggerBelongedComponentToDeleteWhenDeleted: m(!1),
429
+ onRemoveComponent: B
430
+ }, o;
428
431
  }
429
- const Oe = /* @__PURE__ */ F({
432
+ const je = /* @__PURE__ */ F({
430
433
  name: "FCapsuleDesign",
431
- props: L,
434
+ props: W,
432
435
  emits: ["change", "update:modelValue"],
433
- setup(n, e) {
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
- P(() => {
436
- l.value.componentInstance = r;
437
- }), e.expose(r.value);
438
- const f = S(() => {
439
- const t = {
436
+ setup(t, e) {
437
+ const r = m(t.items), l = m(), s = 2, o = m(t.modelValue), i = m("none"), h = m(t.type), A = Q("design-item-context"), c = ge(l, A);
438
+ T(() => {
439
+ l.value.componentInstance = c;
440
+ }), e.expose(c.value);
441
+ const p = S(() => {
442
+ const n = {
440
443
  "f-capsule-container": !0
441
444
  };
442
- return g.value && (t[g.value] = !0), t;
443
- }), p = S(() => ({})), d = S(() => ({
445
+ return h.value && (n[h.value] = !0), n;
446
+ }), f = S(() => ({})), v = S(() => ({
444
447
  "f-capsule": !0
445
- })), h = y(s), b = y(0), R = y(0), A = S(() => ({
446
- left: `${h.value}px`,
448
+ })), y = m(s), b = m(0), V = m(0), M = S(() => ({
449
+ left: `${y.value}px`,
447
450
  width: `${b.value}px`,
448
451
  transition: i.value
449
- })), V = S(() => ({
450
- width: `${R.value}px`
451
- })), M = /* @__PURE__ */ new Map();
452
- function C(t) {
453
- var c;
454
- if (M.has(t.value)) {
455
- const m = (c = M.get(t.value)) == null ? void 0 : c.value;
456
- if (m) {
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;
452
+ })), $ = S(() => ({
453
+ width: `${V.value}px`
454
+ })), R = /* @__PURE__ */ new Map();
455
+ function B(n) {
456
+ var u;
457
+ if (R.has(n.value)) {
458
+ const j = (u = R.get(n.value)) == null ? void 0 : u.value;
459
+ if (j) {
460
+ const D = j.getBoundingClientRect(), J = l.value.getBoundingClientRect();
461
+ y.value = D.left - J.left + s + l.value.scrollLeft, b.value = D.width - 2 * s;
459
462
  }
460
463
  }
461
464
  }
462
- function $(t, c) {
463
- const m = t.value;
464
- o.value = m, e.emit("update:modelValue", m), C(t), c && e.emit("change", m);
465
+ function E(n, u) {
466
+ const j = n.value;
467
+ o.value = j, e.emit("update:modelValue", j), B(n), u && e.emit("change", j);
465
468
  }
466
- function E(t) {
467
- const c = u.value.findIndex((m) => m.value === t);
468
- c > -1 && $(u.value[c], !1);
469
+ function d(n) {
470
+ const u = r.value.findIndex((j) => j.value === n);
471
+ u > -1 && E(r.value[u], !1);
469
472
  }
470
- D(() => n.modelValue, (t) => {
471
- o.value = t, E(o.value);
472
- }), D(() => n.items, async (t) => {
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
- }), P(async () => {
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);
473
+ P(() => t.modelValue, (n) => {
474
+ o.value = n, d(o.value);
475
+ }), P(() => t.items, async (n) => {
476
+ r.value = n, await k(), d(o.value), V.value = Array.from(R.values()).reduce((u, j) => (u += j.value.clientWidth, u), 0);
477
+ }), T(async () => {
478
+ d(o.value), await k(), i.value = "0.1s ease-out all", V.value = Array.from(R.values()).reduce((n, u) => (n += u.value.clientWidth, n), 0);
476
479
  });
477
- function v(t, c) {
478
- $(c, !0);
480
+ function O(n, u) {
481
+ E(u, !0);
479
482
  }
480
- function O(t, c) {
481
- M.set(c, t);
483
+ function g(n, u) {
484
+ R.set(u, n);
482
485
  }
483
- function a(t, c) {
486
+ function a(n, u) {
484
487
  return w(G, {
485
- name: t.name,
486
- value: t.value,
487
- isActive: t.value === o.value,
488
- index: c,
489
- onMounted: O,
490
- onActive: v
488
+ name: n.name,
489
+ value: n.value,
490
+ isActive: n.value === o.value,
491
+ index: u,
492
+ onMounted: g,
493
+ onActive: O
491
494
  }, null);
492
495
  }
493
496
  return () => w("span", {
494
497
  ref: l,
495
- class: f.value,
496
- style: p.value
498
+ class: p.value,
499
+ style: f.value
497
500
  }, [w("span", {
498
501
  class: "f-capsule-pane"
499
- }, [u.value.map((t, c) => a(t, c))]), w("small", {
500
- class: d.value,
501
- style: A.value
502
+ }, [r.value.map((n, u) => a(n, u))]), w("small", {
503
+ class: v.value,
504
+ style: M.value
502
505
  }, null), w("div", {
503
506
  class: "f-capsule-board",
504
- style: V.value
507
+ style: $.value
505
508
  }, null)]);
506
509
  }
507
510
  });
508
- k.register = (n, e, u) => {
509
- n.capsule = k, e.capsule = z;
511
+ N.register = (t, e, r) => {
512
+ t.capsule = N, e.capsule = z;
510
513
  };
511
- k.registerDesigner = (n, e, u) => {
512
- n.capsule = Oe, e.capsule = z;
514
+ N.registerDesigner = (t, e, r) => {
515
+ t.capsule = je, e.capsule = z;
513
516
  };
514
- const Me = X(k);
517
+ const we = X(N);
515
518
  export {
516
- k as FCapsule,
517
- ge as capsuleItemProps,
518
- L as capsuleProps,
519
- Me as default,
519
+ N as FCapsule,
520
+ be as capsuleItemProps,
521
+ W as capsuleProps,
522
+ we as default,
520
523
  z as propsResolver
521
524
  };