@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,100 +1,105 @@
1
- var ee = Object.defineProperty;
2
- var te = (r, e, t) => e in r ? ee(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var M = (r, e, t) => te(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as z, onBeforeMount as ne, onMounted as Q, createVNode as X, ref as E, inject as W } from "vue";
5
- import { isPlainObject as _, cloneDeep as Y } from "lodash-es";
6
- const Z = {}, x = {};
7
- function F(r) {
8
- const { properties: e, title: t, ignore: n } = r, s = n && Array.isArray(n), u = Object.keys(e).reduce((y, g) => ((!s || !n.find((P) => P == g)) && (y[g] = e[g].type === "object" && e[g].properties ? F(e[g]) : Y(e[g].default)), y), {});
9
- return (!s || !n.find((y) => y == "id")) && (u.id = `${t}-${Date.now()}`), u;
1
+ var z = Object.defineProperty;
2
+ var J = (n, e, t) => e in n ? z(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var V = (n, e, t) => J(n, typeof e != "symbol" ? e + "" : e, t);
4
+ import { defineComponent as O, onBeforeMount as X, onMounted as j, createVNode as S, ref as D, inject as A, computed as Y } from "vue";
5
+ import { isPlainObject as $, cloneDeep as N } from "lodash-es";
6
+ import { getCustomClass as Z } from "../common/index.esm.js";
7
+ const R = {}, q = {};
8
+ function U(n) {
9
+ const { properties: e, title: t, ignore: o } = n, a = o && Array.isArray(o), c = Object.keys(e).reduce((r, f) => ((!a || !o.find((m) => m === f)) && (r[f] = e[f].type === "object" && e[f].properties ? U(e[f]) : N(e[f].default)), r), {});
10
+ if (t && (!a || !o.find((r) => r === "id"))) {
11
+ const r = t.toLowerCase().replace(/-/g, "_");
12
+ c.id = `${r}_${Math.random().toString().slice(2, 6)}`;
13
+ }
14
+ return c;
10
15
  }
11
- function B(r, e = {}, t) {
12
- const n = Z[r];
13
- if (n) {
14
- let s = F(n);
15
- const u = x[r];
16
- return s = u ? u({ getSchemaByType: B }, s, e, t) : s, s;
16
+ function G(n, e = {}, t) {
17
+ const o = R[n];
18
+ if (o) {
19
+ let a = U(o);
20
+ const c = q[n];
21
+ return a = c ? c({ getSchemaByType: G }, a, e, t) : a, a;
17
22
  }
18
23
  return null;
19
24
  }
20
- function oe(r, e) {
21
- const t = F(e);
22
- return Object.keys(r).reduce((n, s) => (n[s] && _(n[s]) && _(r[s]) ? Object.assign(n[s], r[s]) : n[s] = r[s], n), t), t;
25
+ function I(n, e) {
26
+ const t = U(e);
27
+ return Object.keys(t).reduce((o, a) => (o[a] && $(o[a]) && $(n[a] || !n[a]) ? Object.assign(o[a], n[a] || {}) : o[a] = n[a], o), t), t;
23
28
  }
24
- function re(r, e) {
25
- return Object.keys(r).filter((n) => r[n] != null).reduce((n, s) => {
26
- if (e.has(s)) {
27
- const u = e.get(s);
28
- if (typeof u == "string")
29
- n[u] = r[s];
29
+ function K(n, e) {
30
+ return Object.keys(n).filter((o) => n[o] != null).reduce((o, a) => {
31
+ if (e.has(a)) {
32
+ const c = e.get(a);
33
+ if (typeof c == "string")
34
+ o[c] = n[a];
30
35
  else {
31
- const y = u(s, r[s], r);
32
- Object.assign(n, y);
36
+ const r = c(a, n[a], n);
37
+ Object.assign(o, r);
33
38
  }
34
39
  } else
35
- n[s] = r[s];
36
- return n;
40
+ o[a] = n[a];
41
+ return o;
37
42
  }, {});
38
43
  }
39
- function se(r, e, t = /* @__PURE__ */ new Map()) {
40
- const n = oe(r, e);
41
- return re(n, t);
44
+ function H(n, e, t = /* @__PURE__ */ new Map()) {
45
+ const o = I(n, e);
46
+ return K(o, t);
42
47
  }
43
- function ce(r = {}) {
44
- function e(a, d, f, m) {
45
- if (typeof f == "number")
46
- return m[a].length === f;
47
- if (typeof f == "object") {
48
- const j = Object.keys(f)[0], o = f[j];
49
- if (j === "not")
50
- return Number(m[a].length) !== Number(o);
51
- if (j === "moreThan")
52
- return Number(m[a].length) >= Number(o);
53
- if (j === "lessThan")
54
- return Number(m[a].length) <= Number(o);
48
+ function x(n = {}) {
49
+ function e(i, s, l, p) {
50
+ if (typeof l == "number")
51
+ return p[i].length === l;
52
+ if (typeof l == "object") {
53
+ const d = Object.keys(l)[0], v = l[d];
54
+ if (d === "not")
55
+ return Number(p[i].length) !== Number(v);
56
+ if (d === "moreThan")
57
+ return Number(p[i].length) >= Number(v);
58
+ if (d === "lessThan")
59
+ return Number(p[i].length) <= Number(v);
55
60
  }
56
61
  return !1;
57
62
  }
58
- function t(a, d, f, m) {
59
- return m[a] && m[a].propertyValue && String(m[a].propertyValue.value) === String(f);
63
+ function t(i, s, l, p) {
64
+ return p[i] && p[i].propertyValue && String(p[i].propertyValue.value) === String(l);
60
65
  }
61
- const n = /* @__PURE__ */ new Map([
66
+ const o = /* @__PURE__ */ new Map([
62
67
  ["length", e],
63
68
  ["getProperty", t]
64
69
  ]);
65
- Object.keys(r).reduce((a, d) => (a.set(d, r[d]), a), n);
66
- function s(a, d) {
67
- const f = a;
68
- return typeof d == "number" ? [{ target: f, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: f, operator: "getProperty", param: a, value: !!d }] : typeof d == "object" ? Object.keys(d).map((m) => {
69
- if (m === "length")
70
- return { target: f, operator: "length", param: null, value: d[m] };
71
- const j = m, o = d[m];
72
- return { target: f, operator: "getProperty", param: j, value: o };
70
+ Object.keys(n).reduce((i, s) => (i.set(s, n[s]), i), o);
71
+ function a(i, s) {
72
+ const l = i;
73
+ return typeof s == "number" ? [{ target: l, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: l, operator: "getProperty", param: i, value: !!s }] : typeof s == "object" ? Object.keys(s).map((p) => {
74
+ if (p === "length")
75
+ return { target: l, operator: "length", param: null, value: s[p] };
76
+ const d = p, v = s[p];
77
+ return { target: l, operator: "getProperty", param: d, value: v };
73
78
  }) : [];
74
79
  }
75
- function u(a) {
76
- return Object.keys(a).reduce((f, m) => {
77
- const j = s(m, a[m]);
78
- return f.push(...j), f;
80
+ function c(i) {
81
+ return Object.keys(i).reduce((l, p) => {
82
+ const d = a(p, i[p]);
83
+ return l.push(...d), l;
79
84
  }, []);
80
85
  }
81
- function y(a, d) {
82
- if (n.has(a.operator)) {
83
- const f = n.get(a.operator);
84
- return f && f(a.target, a.param, a.value, d) || !1;
86
+ function r(i, s) {
87
+ if (o.has(i.operator)) {
88
+ const l = o.get(i.operator);
89
+ return l && l(i.target, i.param, i.value, s) || !1;
85
90
  }
86
91
  return !1;
87
92
  }
88
- function g(a, d) {
89
- return u(a).reduce((j, o) => j && y(o, d), !0);
93
+ function f(i, s) {
94
+ return c(i).reduce((d, v) => d && r(v, s), !0);
90
95
  }
91
- function P(a, d) {
92
- const f = Object.keys(a), m = f.includes("allOf"), j = f.includes("anyOf"), o = m || j, p = (o ? a[o ? m ? "allOf" : "anyOf" : "allOf"] : [a]).map((h) => g(h, d));
93
- return m ? !p.includes(!1) : p.includes(!0);
96
+ function m(i, s) {
97
+ const l = Object.keys(i), p = l.includes("allOf"), d = l.includes("anyOf"), v = p || d, M = (v ? i[v ? p ? "allOf" : "anyOf" : "allOf"] : [i]).map((P) => f(P, s));
98
+ return p ? !M.includes(!1) : M.includes(!0);
94
99
  }
95
- return { parseValueSchema: P };
100
+ return { parseValueSchema: m };
96
101
  }
97
- const ie = {
102
+ const ee = {
98
103
  button: { type: "button", name: "按钮", icon: "Button" },
99
104
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
100
105
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -132,21 +137,22 @@ const ie = {
132
137
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
133
138
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
134
139
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
135
- fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
136
- }, ae = {}, pe = {};
137
- ce();
138
- function H(r, e, t = /* @__PURE__ */ new Map(), n = (y, g, P) => g, s = {}, u = (y) => y) {
139
- return Z[e.title] = e, x[e.title] = n, ae[e.title] = s, pe[e.title] = u, (y = {}) => {
140
- const g = se(y, e, t), P = Object.keys(r).reduce((a, d) => (a[d] = r[d].default, a), {});
141
- return Object.assign(P, g);
140
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
141
+ "query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
142
+ }, te = {}, ne = {};
143
+ x();
144
+ function W(n, e, t = /* @__PURE__ */ new Map(), o = (r, f, m, i) => f, a = {}, c = (r) => r) {
145
+ return R[e.title] = e, q[e.title] = o, te[e.title] = a, ne[e.title] = c, (r = {}) => {
146
+ const f = H(r, e, t), m = Object.keys(n).reduce((i, s) => (i[s] = n[s].default, i), {});
147
+ return Object.assign(m, f);
142
148
  };
143
149
  }
144
- function le(r, e) {
150
+ function oe(n, e) {
145
151
  return { customClass: e.class, customStyle: e.style };
146
152
  }
147
- const R = /* @__PURE__ */ new Map([
148
- ["appearance", le]
149
- ]), ue = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-design.gitee.io/component.schema.json", de = "component", ye = "A Farris Visual Component", me = "object", he = {
153
+ const _ = /* @__PURE__ */ new Map([
154
+ ["appearance", oe]
155
+ ]), ae = "https://json-schema.org/draft/2020-12/schema", re = "https://farris-design.gitee.io/component.schema.json", ce = "component", ie = "A Farris Visual Component", se = "object", le = {
150
156
  id: {
151
157
  description: "The unique identifier for a component",
152
158
  type: "string"
@@ -197,897 +203,252 @@ const R = /* @__PURE__ */ new Map([
197
203
  type: "string",
198
204
  default: ""
199
205
  }
200
- }, be = [
206
+ }, pe = [
201
207
  "id",
202
208
  "type",
203
209
  "contents"
204
- ], ge = {
205
- $schema: ue,
206
- $id: fe,
207
- title: de,
208
- description: ye,
209
- type: me,
210
- properties: he,
211
- required: be
210
+ ], ue = {
211
+ $schema: ae,
212
+ $id: re,
213
+ title: ce,
214
+ description: ie,
215
+ type: se,
216
+ properties: le,
217
+ required: pe
212
218
  };
213
- function I(r, e, t) {
219
+ function Q(n, e, t) {
214
220
  return e;
215
221
  }
216
- const D = {
222
+ const L = {
217
223
  id: { type: String },
218
224
  customClass: { type: String, default: "" },
219
- componentType: { type: String, default: "" }
220
- }, J = H(D, ge, R, I), Qe = Object.assign({}, D, { componentId: { type: String, default: "" } }), k = /* @__PURE__ */ z({
225
+ customStyle: { type: String, default: "" },
226
+ componentType: { type: String, default: "" },
227
+ formColumns: { type: Number, default: 4 }
228
+ }, F = W(L, ue, _, Q), $e = Object.assign({}, L, { componentId: { type: String, default: "" } }), B = /* @__PURE__ */ O({
221
229
  name: "FComponent",
222
- props: D,
230
+ props: L,
223
231
  emits: ["init", "afterViewInit"],
224
- setup(r, e) {
225
- return ne(() => {
226
- e.emit("init", r.id);
227
- }), Q(() => {
228
- e.emit("afterViewInit", r.id);
229
- }), () => X("div", {
230
- class: r.customClass
232
+ setup(n, e) {
233
+ return X(() => {
234
+ e.emit("init", n.id);
235
+ }), j(() => {
236
+ e.emit("afterViewInit", n.id);
237
+ }), () => S("div", {
238
+ class: n.customClass
231
239
  }, [e.slots.default && e.slots.default()]);
232
240
  }
233
241
  });
234
- function je(r, e, t) {
235
- var S;
236
- function n() {
237
- t != null && t.resolveComponentContext && t.resolveComponentContext();
238
- }
239
- n();
240
- const s = t && t.getStyles && t.getStyles() || "", u = t && t.getDesignerClass && t.getDesignerClass() || "", y = E();
241
- function g() {
242
+ function fe(n, e, t) {
243
+ var T;
244
+ const o = t && t.getStyles && t.getStyles() || "", a = t && t.getDesignerClass && t.getDesignerClass() || "", c = D();
245
+ function r() {
242
246
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
243
247
  }
244
- function P() {
248
+ function f() {
245
249
  return !1;
246
250
  }
247
- function a() {
251
+ function m() {
248
252
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
249
253
  }
250
- function d() {
254
+ function i() {
251
255
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
252
256
  }
253
- function f(l) {
254
- if (!l || !l.value)
257
+ function s(u) {
258
+ if (!u || !u.value)
255
259
  return null;
256
- if (l.value.schema && l.value.schema.type === "component")
257
- return l.value;
258
- const v = E(l == null ? void 0 : l.value.parent), C = f(v);
259
- return C || null;
260
+ if (u.value.schema && u.value.schema.type === "component")
261
+ return u.value;
262
+ const w = D(u == null ? void 0 : u.value.parent), b = s(w);
263
+ return b || null;
260
264
  }
261
- function m(l = e) {
262
- const { componentInstance: v, designerItemElementRef: C } = l;
263
- return !v || !v.value ? null : v.value.canMove ? C : m(l.parent);
265
+ function l(u = e) {
266
+ const { componentInstance: w, designerItemElementRef: b } = u;
267
+ return !w || !w.value ? null : w.value.canMove ? b : l(u.parent);
264
268
  }
265
- function j(l) {
266
- return !!t && t.canAccepts(l);
269
+ function p(u) {
270
+ return !!t && t.canAccepts(u);
267
271
  }
268
- function o() {
272
+ function d() {
269
273
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
270
274
  }
271
- function i() {
272
- }
273
- function c(l, v) {
274
- v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
275
+ function v() {
275
276
  }
276
- function p(l, v) {
277
- const { componentType: C } = l;
278
- let T = B(C, l, v);
279
- t && t.onResolveNewComponentSchema && (T = t.onResolveNewComponentSchema(l, T));
280
- const O = C.toLowerCase().replace("-", "_");
281
- return T && !T.id && T.type === C && (T.id = `${O}_${Math.random().toString().slice(2, 6)}`), T;
277
+ function y(u, w) {
278
+ w && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(w);
282
279
  }
283
- function b(l, v) {
284
- const C = String(l.getAttribute("data-controltype")), T = l.getAttribute("data-feature"), O = T ? JSON.parse(T) : {};
285
- O.parentComponentInstance = y.value;
286
- let A = B(C, O);
287
- t && t.onAcceptNewChildElement && (A = t.onAcceptNewChildElement(l, v, A));
288
- const V = C.toLowerCase().replace("-", "_");
289
- return A && !A.id && A.type === C && (A.id = `${V}_${Math.random().toString().slice(2, 6)}`), A;
280
+ function h(u, w) {
281
+ const { componentType: b } = u;
282
+ let C = G(b, u, w);
283
+ t && t.onResolveNewComponentSchema && (C = t.onResolveNewComponentSchema(u, C));
284
+ const E = b.toLowerCase().replace(/-/g, "_");
285
+ return C && !C.id && C.type === b && (C.id = `${E}_${Math.random().toString().slice(2, 6)}`), C;
290
286
  }
291
- function h(l) {
287
+ function M(u) {
292
288
  }
293
- function w(...l) {
289
+ function g(...u) {
294
290
  if (t && t.getPropsConfig)
295
- return t.getPropsConfig(...l);
291
+ return t.getPropsConfig(...u);
296
292
  }
297
- return y.value = {
298
- canMove: g(),
299
- canSelectParent: P(),
300
- canDelete: a(),
301
- canNested: !d(),
293
+ function P() {
294
+ t && t.onRemoveComponent && t.onRemoveComponent(), e != null && e.schema.contents && e.schema.contents.map((u) => {
295
+ var C;
296
+ let w = u.id;
297
+ u.type === "component-ref" && (w = u.component);
298
+ const b = n.value.querySelector(`#${w}-design-item`);
299
+ (C = b == null ? void 0 : b.componentInstance) != null && C.value.onRemoveComponent && b.componentInstance.value.onRemoveComponent();
300
+ });
301
+ }
302
+ return c.value = {
303
+ canMove: r(),
304
+ canSelectParent: f(),
305
+ canDelete: m(),
306
+ canNested: !i(),
302
307
  contents: e == null ? void 0 : e.schema.contents,
303
- elementRef: r,
304
- parent: (S = e == null ? void 0 : e.parent) == null ? void 0 : S.componentInstance,
308
+ elementRef: n,
309
+ parent: (T = e == null ? void 0 : e.parent) == null ? void 0 : T.componentInstance,
305
310
  schema: e == null ? void 0 : e.schema,
306
- styles: s,
307
- designerClass: u,
308
- canAccepts: j,
309
- getBelongedComponentInstance: f,
310
- getDraggableDesignItemElement: m,
311
- getDraggingDisplayText: o,
312
- getPropConfig: w,
313
- getDragScopeElement: i,
314
- onAcceptMovedChildElement: c,
315
- onAcceptNewChildElement: b,
316
- onChildElementMovedOut: h,
317
- addNewChildComponentSchema: p,
318
- updateDragAndDropRules: n,
319
- triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || E(!1),
320
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || E(!1)
321
- }, y;
311
+ styles: o,
312
+ designerClass: a,
313
+ canAccepts: p,
314
+ getBelongedComponentInstance: s,
315
+ getDraggableDesignItemElement: l,
316
+ getDraggingDisplayText: d,
317
+ getPropConfig: g,
318
+ getDragScopeElement: v,
319
+ onAcceptMovedChildElement: y,
320
+ onChildElementMovedOut: M,
321
+ addNewChildComponentSchema: h,
322
+ triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || D(!1),
323
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || D(!1),
324
+ onRemoveComponent: P
325
+ }, c;
322
326
  }
323
- const ve = "https://json-schema.org/draft/2020-12/schema", Ce = "https://farris-design.gitee.io/dragging-rules.schema.json", Pe = "Dragging Rules", we = "The rules of designer canvas", Me = "object", Te = {
324
- "f-page": {
325
- description: "The root class of page designed by farris.",
326
- type: "object",
327
- properties: {
328
- contents: {
329
- type: "object",
330
- properties: {
331
- "f-page-header": {
332
- description: "The class of page header designed by farris.",
333
- type: "string"
334
- },
335
- "f-page-main": {
336
- description: "The class of page body designed by farris.",
337
- type: "object",
338
- properties: {
339
- contents: {
340
- type: "object",
341
- properties: {
342
- "f-struct-like-card": {
343
- description: "",
344
- type: "object",
345
- properties: {
346
- contents: {
347
- type: "object",
348
- properties: {
349
- "f-struct-form": {
350
- description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
351
- type: "object",
352
- properties: {
353
- contents: {
354
- type: "object",
355
- properties: {
356
- "f-section-form": {
357
- description: "The class of section which has wrapped a reponse-form component.",
358
- type: "object",
359
- properties: {
360
- contents: {
361
- type: "object",
362
- properties: {
363
- "f-form-layout": {
364
- description: "The class of reponse form",
365
- type: "object",
366
- properties: {
367
- rules: {
368
- type: "object",
369
- properties: {
370
- canAccept: {
371
- type: "boolean",
372
- const: !0
373
- },
374
- fixed: {
375
- type: "boolean",
376
- const: !0
377
- },
378
- hidePadding: {
379
- type: "boolean",
380
- const: !1
381
- }
382
- }
383
- }
384
- }
385
- }
386
- }
387
- },
388
- rules: {
389
- type: "object",
390
- properties: {
391
- canAccept: {
392
- type: "boolean",
393
- const: !1
394
- },
395
- fixed: {
396
- type: "boolean",
397
- const: !0
398
- },
399
- hidePadding: {
400
- type: "boolean",
401
- const: !0
402
- }
403
- }
404
- }
405
- }
406
- }
407
- }
408
- },
409
- rules: {
410
- type: "object",
411
- properties: {
412
- canAccept: {
413
- type: "boolean",
414
- const: !1
415
- },
416
- fixed: {
417
- type: "boolean",
418
- const: !1
419
- },
420
- hidePadding: {
421
- type: "boolean",
422
- const: !0
423
- }
424
- }
425
- }
426
- }
427
- },
428
- "f-struct-wrapper": {
429
- description: "",
430
- type: "object",
431
- properties: {
432
- contents: {
433
- type: "object",
434
- properties: {
435
- "f-section-tabs": {
436
- description: "The class of section which has wrapped sub-grid tabs.",
437
- type: "object",
438
- properties: {
439
- contents: {
440
- type: "object",
441
- properties: {
442
- "f-tabs-in-card": {
443
- description: "The class of tabs which contains sub-grid.",
444
- type: "object",
445
- properties: {
446
- contents: {
447
- type: "object",
448
- properties: {
449
- "f-struct-data-grid-in-card": {
450
- description: "The class of sub-grid component",
451
- type: "object",
452
- properties: {
453
- contents: {
454
- type: "object",
455
- properties: {
456
- "f-grid-is-sub": {
457
- description: "The class of sub-grid",
458
- type: "object",
459
- properties: {
460
- rules: {
461
- type: "object",
462
- properties: {
463
- canAccept: {
464
- type: "boolean",
465
- const: !0
466
- },
467
- fixed: {
468
- type: "boolean",
469
- const: !0
470
- },
471
- hidePadding: {
472
- type: "boolean",
473
- const: !1
474
- }
475
- }
476
- }
477
- }
478
- }
479
- }
480
- },
481
- rules: {
482
- type: "object",
483
- properties: {
484
- canAccept: {
485
- type: "boolean",
486
- const: !1
487
- },
488
- fixed: {
489
- type: "boolean",
490
- const: !1
491
- },
492
- hidePadding: {
493
- type: "boolean",
494
- const: !0
495
- }
496
- }
497
- }
498
- }
499
- }
500
- }
501
- },
502
- rules: {
503
- type: "object",
504
- properties: {
505
- canAccept: {
506
- type: "boolean",
507
- const: !1
508
- },
509
- fixed: {
510
- type: "boolean",
511
- const: !0
512
- },
513
- hidePadding: {
514
- type: "boolean",
515
- const: !0
516
- }
517
- }
518
- }
519
- }
520
- }
521
- }
522
- },
523
- rules: {
524
- type: "object",
525
- properties: {
526
- canAccept: {
527
- type: "boolean",
528
- const: !1
529
- },
530
- fixed: {
531
- type: "boolean",
532
- const: !0
533
- },
534
- hidePadding: {
535
- type: "boolean",
536
- const: !0
537
- }
538
- }
539
- }
540
- }
541
- },
542
- "f-section-in-main": {
543
- description: "The class of section which has wrapped a reponse-form component.",
544
- type: "object",
545
- properties: {
546
- rules: {
547
- type: "object",
548
- properties: {
549
- canAccept: {
550
- type: "boolean",
551
- const: !0
552
- },
553
- fixed: {
554
- type: "boolean",
555
- const: !0
556
- },
557
- hidePadding: {
558
- type: "boolean",
559
- const: !1
560
- }
561
- }
562
- }
563
- }
564
- }
565
- }
566
- },
567
- rules: {
568
- type: "object",
569
- properties: {
570
- canAccept: {
571
- type: "boolean",
572
- const: !1
573
- },
574
- fixed: {
575
- type: "boolean",
576
- const: !1
577
- },
578
- hidePadding: {
579
- type: "boolean",
580
- const: !0
581
- }
582
- }
583
- }
584
- }
585
- }
586
- }
587
- },
588
- rules: {
589
- type: "object",
590
- properties: {
591
- canAccept: {
592
- type: "boolean",
593
- const: !0
594
- },
595
- fixed: {
596
- type: "boolean",
597
- const: !0
598
- },
599
- hidePadding: {
600
- type: "object",
601
- const: {
602
- allOf: [
603
- {
604
- sibling: 0,
605
- parent: {
606
- "f-page-main": !0
607
- }
608
- }
609
- ]
610
- }
611
- }
612
- }
613
- }
614
- }
615
- },
616
- "f-struct-data-grid": {
617
- description: "",
618
- type: "object",
619
- properties: {
620
- rules: {
621
- type: "object",
622
- properties: {
623
- canAccept: {
624
- type: "object",
625
- const: !0
626
- },
627
- fixed: {
628
- type: "boolean",
629
- const: !0
630
- },
631
- hidePadding: {
632
- type: "boolean",
633
- const: !0
634
- }
635
- }
636
- }
637
- }
638
- },
639
- "f-page-main-content": {
640
- description: "",
641
- type: "object",
642
- properties: {
643
- contents: {
644
- type: "object",
645
- properties: {
646
- "f-page-content-nav": {
647
- description: "",
648
- type: "object",
649
- properties: {
650
- contents: {
651
- type: "object",
652
- properties: {
653
- "f-struct-data-grid-in-nav": {
654
- description: "",
655
- type: "object",
656
- properties: {
657
- contents: {
658
- type: "object",
659
- properties: {
660
- "f-page-content-nav-extend": {
661
- description: "",
662
- type: "object"
663
- },
664
- "f-section-in-nav": {
665
- description: "",
666
- type: "object",
667
- properties: {
668
- rules: {
669
- type: "object",
670
- properties: {
671
- canAccept: {
672
- type: "boolean",
673
- const: !1
674
- },
675
- fixed: {
676
- type: "boolean",
677
- const: !0
678
- },
679
- hidePadding: {
680
- type: "boolean",
681
- const: !1
682
- }
683
- }
684
- }
685
- }
686
- }
687
- }
688
- },
689
- rules: {
690
- type: "object",
691
- properties: {
692
- canAccept: {
693
- type: "boolean",
694
- const: !0
695
- },
696
- fixed: {
697
- type: "boolean",
698
- const: !1
699
- },
700
- hidePadding: {
701
- type: "boolean",
702
- const: !0
703
- }
704
- }
705
- }
706
- }
707
- }
708
- }
709
- }
710
- }
711
- },
712
- "f-page-content-main": {
713
- description: "",
714
- type: "object",
715
- properties: {}
716
- }
717
- }
718
- }
719
- }
720
- },
721
- "f-page-content": {
722
- description: "",
723
- type: "object",
724
- properties: {
725
- contents: {
726
- type: "object",
727
- properties: {
728
- "f-page-content-nav": {
729
- description: "",
730
- type: "object",
731
- properties: {
732
- contents: {
733
- type: "object",
734
- properties: {
735
- "f-list-nav": {
736
- description: "",
737
- type: "object"
738
- },
739
- "f-list-nav-left": {
740
- description: "",
741
- type: "object"
742
- },
743
- "f-struct-data-grid-in-nav": {
744
- description: "",
745
- type: "object",
746
- properties: {
747
- contents: {
748
- type: "object",
749
- properties: {
750
- "f-section-form": {
751
- description: "",
752
- type: "object",
753
- properties: {
754
- rules: {
755
- type: "object",
756
- properties: {
757
- canAccept: {
758
- type: "boolean",
759
- const: !1
760
- },
761
- fixed: {
762
- type: "boolean",
763
- const: !0
764
- },
765
- hidePadding: {
766
- type: "boolean",
767
- const: !0
768
- }
769
- }
770
- }
771
- }
772
- },
773
- "f-section-grid": {
774
- description: "",
775
- type: "object",
776
- properties: {
777
- rules: {
778
- type: "object",
779
- properties: {
780
- canAccept: {
781
- type: "boolean",
782
- const: !1
783
- },
784
- fixed: {
785
- type: "boolean",
786
- const: !0
787
- },
788
- hidePadding: {
789
- type: "boolean",
790
- const: !0
791
- }
792
- }
793
- }
794
- }
795
- }
796
- }
797
- },
798
- rules: {
799
- type: "object",
800
- properties: {
801
- canAccept: {
802
- type: "boolean",
803
- const: !1
804
- },
805
- fixed: {
806
- type: "boolean",
807
- const: !0
808
- },
809
- hidePadding: {
810
- type: "boolean",
811
- const: !0
812
- }
813
- }
814
- }
815
- }
816
- }
817
- }
818
- }
819
- },
820
- rules: {
821
- type: "object",
822
- properties: {
823
- canAccept: {
824
- type: "boolean",
825
- const: !1
826
- },
827
- fixed: {
828
- type: "boolean",
829
- const: !0
830
- },
831
- hidePadding: {
832
- type: "boolean",
833
- const: !0
834
- }
835
- }
836
- }
837
- },
838
- "f-page-content-main": {
839
- description: "",
840
- type: "object",
841
- properties: {
842
- rules: {
843
- type: "object",
844
- properties: {
845
- canAccept: {
846
- type: "boolean",
847
- const: !1
848
- },
849
- fixed: {
850
- type: "boolean",
851
- const: !1
852
- },
853
- hidePadding: {
854
- type: "boolean",
855
- const: !0
856
- }
857
- }
858
- }
859
- }
860
- }
861
- }
862
- },
863
- rules: {
864
- type: "object",
865
- properties: {
866
- canAccept: {
867
- type: "boolean",
868
- const: !1
869
- },
870
- fixed: {
871
- type: "boolean",
872
- const: !0
873
- },
874
- hidePadding: {
875
- type: "boolean",
876
- const: !0
877
- }
878
- }
879
- }
880
- }
881
- }
882
- }
883
- },
884
- rules: {
885
- type: "object",
886
- properties: {
887
- canAccept: {
888
- type: "object",
889
- const: {
890
- anyOf: [
891
- {
892
- children: 0
893
- },
894
- {
895
- children: {
896
- length: {
897
- not: 1
898
- },
899
- "f-struct-like-card": !0
900
- }
901
- },
902
- {
903
- children: {
904
- "scroll-spy": !1,
905
- "f-page-content": !1,
906
- "f-struct-like-card": !1
907
- }
908
- }
909
- ]
910
- }
911
- },
912
- fixed: {
913
- type: "boolean",
914
- const: !0
915
- },
916
- hidePadding: {
917
- type: "boolean",
918
- const: !0
919
- }
920
- }
921
- }
922
- }
923
- },
924
- "f-page-footer": {
925
- description: "The class of page footer designed by farris.",
926
- type: "string"
327
+ class me {
328
+ getTemplateRule(e, t) {
329
+ const o = t == null ? void 0 : t.formSchemaUtils, a = o == null ? void 0 : o.getFormTemplateRule(), c = { canAccept: !0, canDelete: !0, canMove: !0 };
330
+ if (!a)
331
+ return c;
332
+ const r = this.getComponentContext(e), { componentClassList: f } = r;
333
+ return f.forEach((m) => {
334
+ if (!m || !a[m])
335
+ return;
336
+ const { canMove: i, canDelete: s, canAccept: l } = a[m];
337
+ c.canMove = c.canMove && this.resolveRuleValue(i, r), c.canDelete = c.canDelete && this.resolveRuleValue(s, r), c.canAccept = c.canAccept && this.resolveRuleValue(l, r);
338
+ }), c;
339
+ }
340
+ resolveRuleValue(e, t) {
341
+ return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, t);
342
+ }
343
+ parseRuleValueSchema(e, t) {
344
+ const o = e.invalidContext || [];
345
+ let a = !0;
346
+ for (const c of o) {
347
+ if (c.firstLevelChild) {
348
+ if (c.firstLevelChild.class) {
349
+ const { firstLevelChildClassList: r } = t;
350
+ if (r && !r.includes(c.firstLevelChild.class)) {
351
+ a = !1;
352
+ continue;
927
353
  }
928
354
  }
929
- },
930
- rules: {
931
- type: "object",
932
- properties: {
933
- canAccept: {
934
- type: "boolean",
935
- const: !1
936
- },
937
- fixed: {
938
- type: "boolean",
939
- const: !0
940
- },
941
- hidePadding: {
942
- type: "boolean",
943
- const: !0
355
+ if (c.firstLevelChild.type) {
356
+ const { firstLevelChildSchema: r } = t;
357
+ if (!r || r.type !== c.firstLevelChild.type) {
358
+ a = !1;
359
+ continue;
944
360
  }
945
361
  }
946
362
  }
363
+ if (c.secondLevelChild) {
364
+ if (c.secondLevelChild.class) {
365
+ const { secondLevelChildClassList: r } = t;
366
+ if (r && !r.includes(c.secondLevelChild.class)) {
367
+ a = !1;
368
+ continue;
369
+ }
370
+ }
371
+ if (c.secondLevelChild.type) {
372
+ const { secondLevelChildSchema: r } = t;
373
+ if (!r || r.type !== c.secondLevelChild.type) {
374
+ a = !1;
375
+ continue;
376
+ }
377
+ }
378
+ }
379
+ if (c.parent) {
380
+ if (c.parent.class) {
381
+ const { parentClassList: r } = t;
382
+ if (r && !r.includes(c.parent.class)) {
383
+ a = !1;
384
+ continue;
385
+ }
386
+ }
387
+ if (c.parent.type) {
388
+ const { parentSchema: r } = t;
389
+ if (r && r.type !== c.parent.type) {
390
+ a = !1;
391
+ continue;
392
+ }
393
+ }
394
+ }
395
+ a = !0;
396
+ break;
947
397
  }
948
- },
949
- "f-page-is-managelist": {
950
- description: "The root class of mangement list page.",
951
- type: "string"
952
- },
953
- "f-page-card": {
954
- description: "",
955
- type: "object"
956
- },
957
- "f-page-is-mainsubcard": {
958
- description: "",
959
- type: "object"
960
- }
961
- }, Ae = {
962
- $schema: ve,
963
- $id: Ce,
964
- title: Pe,
965
- description: we,
966
- type: Me,
967
- properties: Te
968
- }, N = /* @__PURE__ */ new Map();
969
- function Se() {
970
- function r(o, i, c, p) {
971
- var b;
972
- if (typeof c == "number")
973
- return ((b = p[o]) == null ? void 0 : b.length) === c;
974
- if (typeof c == "object") {
975
- const h = Object.keys(c)[0], w = c[h];
976
- if (h === "not")
977
- return Number(p[o].length) !== Number(w);
978
- if (h === "moreThan")
979
- return Number(p[o].length) >= Number(w);
980
- if (h === "lessThan")
981
- return Number(p[o].length) <= Number(w);
982
- }
983
- return !1;
984
- }
985
- function e(o, i, c, p) {
986
- return typeof c == "boolean" ? p.childrenClassList.includes(i) === !!c : !1;
987
- }
988
- function t(o, i, c, p) {
989
- return typeof c == "boolean" ? p.parentClassList.includes(i) === !!c : !1;
990
- }
991
- function n(o, i, c, p) {
992
- return typeof c == "boolean" ? p.parentClassList.includes(i) === !!c : !1;
993
- }
994
- const s = /* @__PURE__ */ new Map([
995
- ["length", r],
996
- ["hasChildren", e],
997
- ["hasSibling", n],
998
- ["hasParent", t]
999
- ]);
1000
- function u(o, i) {
1001
- const c = o;
1002
- return typeof i == "number" ? [{ target: c, operator: "length", param: null, value: Number(i) }] : typeof i == "object" ? Object.keys(i).map((p) => {
1003
- if (p === "length")
1004
- return { target: c, operator: "length", param: null, value: i[p] };
1005
- const b = p, h = i[p];
1006
- return { target: c, operator: o === "children" ? "hasChildren" : o === "parent" ? "hasParent" : "hasSibling", param: b, value: h };
1007
- }) : [];
1008
- }
1009
- function y(o, i) {
1010
- if (s.has(o.operator)) {
1011
- const c = s.get(o.operator);
1012
- return c && c(o.target, o.param, o.value, i) || !1;
1013
- }
1014
- return !1;
1015
- }
1016
- function g(o, i) {
1017
- return Object.keys(o).reduce((h, w) => {
1018
- const S = u(w, o[w]);
1019
- return h.push(...S), h;
1020
- }, []).reduce((h, w) => h && y(w, i), !0);
398
+ return !a;
1021
399
  }
1022
- function P(o, i) {
1023
- const c = Object.keys(o), p = c.includes("allOf"), b = c.includes("anyOf"), h = p || b, l = (h ? o[h ? p ? "allOf" : "anyOf" : "allOf"] : [o]).map((C) => g(C, i));
1024
- return p ? !l.includes(!1) : l.includes(!0);
1025
- }
1026
- function a(o, i) {
1027
- const c = o.const;
1028
- return c ? typeof c == "boolean" ? c : typeof c == "object" ? P(c, i) : !1 : !1;
1029
- }
1030
- function d(o) {
1031
- return (i) => {
1032
- const c = { canAccept: !0, fixed: !1, hidePadding: !1 };
1033
- return o && o.properties && Object.keys(o.properties).reduce((p, b) => {
1034
- const h = o.properties[b];
1035
- return p[b] = a(h, i), p;
1036
- }, c), c;
400
+ getComponentContext(e) {
401
+ var y, h, M, g;
402
+ const t = e.schema, o = t.appearance && t.appearance.class || "", a = o.split(" ") || [], c = t.contents || [], r = c.length ? c[0] : null, f = r && r.appearance ? r.appearance.class : "", m = f ? f.split(" ") : [], i = (y = r == null ? void 0 : r.contents) != null && y.length ? r == null ? void 0 : r.contents[0] : null, s = i && i.appearance ? i.appearance.class : "", l = s ? s.split(" ") : [], p = t.type === "component" ? (M = (h = e.parent) == null ? void 0 : h.parent) == null ? void 0 : M.schema : (g = e.parent) == null ? void 0 : g.schema, d = p && p.appearance && p.appearance.class || "", v = d ? d.split(" ") : [];
403
+ return {
404
+ componentClass: o,
405
+ componentClassList: a,
406
+ childContents: c,
407
+ firstLevelChildSchema: r,
408
+ firstLevelChildClass: f,
409
+ firstLevelChildClassList: m,
410
+ secondLevelChildSchema: i,
411
+ secondLevelChildClass: s,
412
+ secondLevelChildClassList: l,
413
+ parentSchema: p,
414
+ parentClass: d,
415
+ parentClassList: v
1037
416
  };
1038
417
  }
1039
- function f(o, i, c) {
1040
- if (i.type === "object" && i.properties) {
1041
- const { rules: p, contents: b } = i.properties;
1042
- c.set(o, d(p)), b && Object.keys(b.properties).forEach(
1043
- (h) => f(h, b.properties[h], c)
1044
- );
1045
- }
1046
- }
1047
- function m() {
1048
- const { properties: o } = Ae;
1049
- Object.keys(o).forEach((i) => {
1050
- f(i, o[i], N);
1051
- });
1052
- }
1053
- function j(o, i) {
1054
- const c = { canAccept: !0, fixed: !1, hidePadding: !0 };
1055
- return N.has(o) ? N.get(o)(i) : c;
1056
- }
1057
- return m(), { getRuleValue: j };
1058
418
  }
1059
- class Oe {
419
+ class de {
1060
420
  constructor(e, t) {
1061
- M(this, "componentId");
1062
- M(this, "viewModelId");
1063
- M(this, "eventsEditorUtils");
1064
- M(this, "formSchemaUtils");
1065
- M(this, "formMetadataConverter");
1066
- M(this, "designViewModelUtils");
1067
- M(this, "designViewModelField");
1068
- M(this, "controlCreatorUtils");
1069
- M(this, "designerHostService");
1070
- M(this, "schemaService", null);
1071
- M(this, "metadataService", null);
1072
- M(this, "propertyConfig", {
421
+ V(this, "componentId");
422
+ V(this, "viewModelId");
423
+ V(this, "eventsEditorUtils");
424
+ V(this, "formSchemaUtils");
425
+ V(this, "formMetadataConverter");
426
+ V(this, "designViewModelUtils");
427
+ V(this, "designViewModelField");
428
+ V(this, "controlCreatorUtils");
429
+ V(this, "designerHostService");
430
+ V(this, "schemaService", null);
431
+ V(this, "metadataService", null);
432
+ V(this, "propertyConfig", {
1073
433
  type: "object",
1074
434
  categories: {}
1075
435
  });
1076
- var n;
1077
- this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((n = this.formSchemaUtils) == null ? void 0 : n.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
436
+ var o;
437
+ this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
1078
438
  }
1079
439
  getTableInfo() {
1080
440
  var e;
1081
441
  return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
1082
442
  }
1083
443
  setDesignViewModelField(e) {
444
+ var o;
1084
445
  const t = e.binding && e.binding.type === "Form" && e.binding.field;
1085
446
  if (t) {
1086
447
  if (!this.designViewModelField) {
1087
- const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1088
- this.designViewModelField = n.fields.find((s) => s.id === t);
448
+ const a = this.designViewModelUtils.getDgViewModel(this.viewModelId);
449
+ this.designViewModelField = a.fields.find((c) => c.id === t);
1089
450
  }
1090
- e.updateOn = this.designViewModelField.updateOn;
451
+ e.updateOn = (o = this.designViewModelField) == null ? void 0 : o.updateOn;
1091
452
  }
1092
453
  }
1093
454
  changeFieldEditorType(e, t) {
@@ -1111,7 +472,7 @@ class Oe {
1111
472
  type: "combo-list",
1112
473
  textField: "name",
1113
474
  valueField: "value",
1114
- data: [{ value: e.type, name: ie[e.type].name }]
475
+ data: [{ value: e.type, name: ee[e.type].name }]
1115
476
  }
1116
477
  }
1117
478
  }
@@ -1144,14 +505,14 @@ class Oe {
1144
505
  * @returns
1145
506
  */
1146
507
  updateElementByParentContainer(e, t) {
1147
- const n = t && t.parent && t.parent.schema;
1148
- if (!n)
508
+ const o = t && t.parent && t.parent.schema;
509
+ if (!o)
1149
510
  return;
1150
- const s = n.contents.findIndex((y) => y.id === e), u = Y(n.contents[s]);
1151
- n.contents.splice(s, 1), n.contents.splice(s, 0, u);
511
+ const a = o.contents.findIndex((r) => r.id === e), c = N(o.contents[a]);
512
+ o.contents.splice(a, 1), o.contents.splice(a, 0, c);
1152
513
  }
1153
514
  }
1154
- class Ee extends Oe {
515
+ class he extends de {
1155
516
  constructor(e, t) {
1156
517
  super(e, t);
1157
518
  }
@@ -1168,93 +529,105 @@ class Ee extends Oe {
1168
529
  label: "onAfterViewInit",
1169
530
  name: "视图初始化后事件"
1170
531
  }
1171
- ];
1172
- var n = this;
1173
- const s = n.eventsEditorUtils.formProperties(e, n.viewModelId, t), u = {};
1174
- u[n.viewModelId] = {
532
+ ], o = this, a = o.eventsEditorUtils.formProperties(e, o.viewModelId, t), c = {};
533
+ c[o.viewModelId] = {
1175
534
  type: "events-editor",
1176
535
  editor: {
1177
- initialData: s
536
+ initialData: a
1178
537
  }
1179
538
  }, this.propertyConfig.categories.eventsEditor = {
1180
539
  title: "事件",
1181
540
  hideTitle: !0,
1182
- properties: u,
541
+ properties: c,
1183
542
  // 这个属性,标记当属性变更得时候触发重新更新属性
1184
543
  refreshPanelAfterChanged: !0,
1185
544
  tabId: "commands",
1186
545
  tabName: "交互",
1187
- setPropertyRelates(y, g) {
1188
- const P = y.propertyValue;
1189
- delete e[n.viewModelId], P && (P.setPropertyRelates = this.setPropertyRelates, n.eventsEditorUtils.saveRelatedParameters(e, n.viewModelId, P.events, P));
546
+ setPropertyRelates(r, f) {
547
+ const m = r.propertyValue;
548
+ delete e[o.viewModelId], m && (m.setPropertyRelates = this.setPropertyRelates, o.eventsEditorUtils.saveRelatedParameters(e, o.viewModelId, m.events, m));
1190
549
  }
1191
550
  };
1192
551
  }
1193
552
  }
1194
- function De(r, e) {
1195
- const t = Se();
1196
- let n = !1, s, u = !1;
1197
- const y = !1, g = r.schema;
1198
- function P() {
553
+ function ye(n, e) {
554
+ const t = new me(), { canMove: o, canDelete: a } = t.getTemplateRule(n, e);
555
+ function c() {
1199
556
  return !1;
1200
557
  }
1201
- function a() {
1202
- return y || !u;
1203
- }
1204
- function d() {
1205
- return !u;
558
+ function r() {
559
+ return a;
1206
560
  }
1207
561
  function f() {
1208
- var U, L;
1209
- u = !1;
1210
- const o = r.schema, i = o.appearance && o.appearance.class || "", c = i.split(" "), p = o.contents || [], b = p.length ? p[0] : null, h = b && b.appearance ? b.appearance.class : "", w = h ? h.split(" ") : [], S = p.length ? p.reduce((q, $) => {
1211
- const G = $ && $.appearance ? $.appearance.class : "", K = G ? G.split(" ") : [];
1212
- return q.push(...K), q;
1213
- }, []) : [];
1214
- if (((L = (U = r.parent) == null ? void 0 : U.schema) == null ? void 0 : L.type) !== "component-ref") {
1215
- n = !0, u = !0;
562
+ return o;
563
+ }
564
+ function m() {
565
+ return !1;
566
+ }
567
+ function i() {
568
+ return " display: inherit;flex-direction: inherit;margin-bottom:10px";
569
+ }
570
+ function s(y) {
571
+ const h = new he(y, e), { schema: M } = n;
572
+ return h.getPropertyConfig(M);
573
+ }
574
+ function l() {
575
+ var P, T, u, w;
576
+ const y = n == null ? void 0 : n.schema, M = (e == null ? void 0 : e.formSchemaUtils).getViewModelIdByComponentId(y.id);
577
+ if (y.componentType !== "data-grid" && y.componentType !== "form" || !((P = n.componentInstance) != null && P.value.parent))
1216
578
  return;
579
+ const g = (T = n.componentInstance) == null ? void 0 : T.value.parent.schema;
580
+ if ((u = g == null ? void 0 : g.toolbar) != null && u.buttons && g.toolbar.buttons.length) {
581
+ g.toolbar.buttons.forEach((C) => {
582
+ const E = C.onClick, k = E && E.split(".");
583
+ if (!k || k.length < 3)
584
+ return;
585
+ k[k.length - 2] === M && (C.needRemove = !0);
586
+ }), g.toolbar.buttons = g.toolbar.buttons.filter((C) => !C.needRemove);
587
+ const b = (w = n.componentInstance) == null ? void 0 : w.value.parent;
588
+ b.parent && b.parent.updateToolbarItems && b.parent.updateToolbarItems();
1217
589
  }
1218
- const l = r.parent.parent, v = l && l.schema, C = v && v.appearance ? v.appearance.class : "", T = C ? C.split(" ") : [];
1219
- s = {
1220
- componentClass: i,
1221
- componentClassList: c,
1222
- childContents: p,
1223
- firstChildContent: b,
1224
- firstChildClass: h,
1225
- firstChildClassList: w,
1226
- parent: v,
1227
- parentClass: C,
1228
- parentClassList: T,
1229
- children: p,
1230
- childrenClassList: S
1231
- };
1232
- const { canAccept: O, fixed: A, hidePadding: V } = t.getRuleValue(c[0], s);
1233
- n = V, u = A;
1234
590
  }
1235
- function m() {
1236
- return n;
591
+ function p() {
592
+ const y = e == null ? void 0 : e.designViewModelUtils, h = e == null ? void 0 : e.formSchemaUtils, M = n == null ? void 0 : n.schema;
593
+ if (y && h) {
594
+ const g = h.getViewModelIdByComponentId(M.id);
595
+ y.deleteViewModelById(g), h.deleteComponent(M.id);
596
+ }
1237
597
  }
1238
- function j(o) {
1239
- return new Ee(o, e).getPropertyConfig(g);
598
+ function d() {
599
+ const y = e == null ? void 0 : e.designViewModelUtils, h = e == null ? void 0 : e.formSchemaUtils, M = n == null ? void 0 : n.schema, g = h.getViewModelIdByComponentId(M.id);
600
+ y.getDgViewModel(g).fields.forEach((P) => {
601
+ if (h.getExpressions() && h.getExpressions().length) {
602
+ const T = h.getExpressions().findIndex((u) => u.fieldId === P.id);
603
+ T > -1 && h.getExpressions().splice(T, 1);
604
+ }
605
+ });
1240
606
  }
1241
- return { canAccepts: P, checkCanDeleteComponent: a, checkCanMoveComponent: d, resolveComponentContext: f, hideNestedPaddingInDesginerView: m, getPropsConfig: j };
607
+ function v() {
608
+ l(), d(), p();
609
+ }
610
+ return { canAccepts: c, checkCanDeleteComponent: r, checkCanMoveComponent: f, hideNestedPaddingInDesginerView: m, getStyles: i, getPropsConfig: s, onRemoveComponent: v };
1242
611
  }
1243
- const Ve = /* @__PURE__ */ z({
612
+ const ge = /* @__PURE__ */ O({
1244
613
  name: "FComponetDesign",
1245
- props: D,
614
+ props: L,
1246
615
  emits: [],
1247
- setup(r, e) {
1248
- const t = E(), n = W("designer-host-service"), s = W("design-item-context"), u = De(s, n), y = je(t, s, u);
1249
- return Q(() => {
1250
- t.value.componentInstance = y;
1251
- }), e.expose(y.value), () => X("div", {
616
+ setup(n, e) {
617
+ const t = D(), o = A("designer-host-service"), a = A("design-item-context"), c = ye(a, o), r = fe(t, a, c), f = Y(() => Z({
618
+ "drag-container": !0
619
+ }, n == null ? void 0 : n.customClass));
620
+ return j(() => {
621
+ var m, i, s, l;
622
+ t.value.componentInstance = r, ((i = (m = a.parent) == null ? void 0 : m.schema) == null ? void 0 : i.type) === "component-ref" && (r.value.parent = (l = (s = a.parent) == null ? void 0 : s.parent) == null ? void 0 : l.componentInstance);
623
+ }), e.expose(r.value), () => S("div", {
1252
624
  ref: t,
1253
- class: "drag-container",
1254
- "data-dragref": `${s.schema.id}-container`
625
+ class: f.value,
626
+ style: n.customStyle,
627
+ "data-dragref": `${a.schema.id}-container`
1255
628
  }, [e.slots.default && e.slots.default()]);
1256
629
  }
1257
- }), $e = "https://json-schema.org/draft/2020-12/schema", ke = "https://farris-design.gitee.io/component.schema.json", Ne = "component-ref", Be = "A Farris Visual Component", Fe = "object", Ue = {
630
+ }), be = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-design.gitee.io/component.schema.json", Me = "component-ref", we = "A Farris Visual Component", Ce = "object", Ve = {
1258
631
  id: {
1259
632
  description: "The unique identifier for a Section",
1260
633
  type: "string"
@@ -1269,37 +642,37 @@ const Ve = /* @__PURE__ */ z({
1269
642
  type: "string",
1270
643
  default: ""
1271
644
  }
1272
- }, Le = [
645
+ }, Pe = [
1273
646
  "id",
1274
647
  "type",
1275
648
  "component"
1276
- ], qe = {
1277
- $schema: $e,
1278
- $id: ke,
1279
- title: Ne,
1280
- description: Be,
1281
- type: Fe,
1282
- properties: Ue,
1283
- required: Le
1284
- }, Ge = {
649
+ ], Te = {
650
+ $schema: be,
651
+ $id: ve,
652
+ title: Me,
653
+ description: we,
654
+ type: Ce,
655
+ properties: Ve,
656
+ required: Pe
657
+ }, De = {
1285
658
  id: { type: String },
1286
659
  component: { type: String, default: "" }
1287
- }, We = H(Ge, qe, R, I), Xe = {
1288
- install(r) {
1289
- r.component(k.name, k);
660
+ }, Ee = W(De, Te, _, Q), Fe = {
661
+ install(n) {
662
+ n.component(B.name, B);
1290
663
  },
1291
- register(r, e, t, n) {
1292
- r.component = k, e.component = J;
664
+ register(n, e, t, o) {
665
+ n.component = B, e.component = F;
1293
666
  },
1294
- registerDesigner(r, e) {
1295
- r.component = Ve, e.component = J, e["component-ref"] = We;
667
+ registerDesigner(n, e) {
668
+ n.component = ge, e.component = F, e["component-ref"] = Ee;
1296
669
  }
1297
670
  };
1298
671
  export {
1299
- k as Component,
1300
- Ve as ComponentDesign,
1301
- Qe as componentDesignProps,
1302
- D as componentProps,
1303
- Xe as default,
1304
- J as propsResolver
672
+ B as Component,
673
+ ge as ComponentDesign,
674
+ $e as componentDesignProps,
675
+ L as componentProps,
676
+ Fe as default,
677
+ F as propsResolver
1305
678
  };