@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,104 @@
1
- import { ref as w, computed as T, createVNode as M, defineComponent as G, watch as R, onMounted as _, inject as I } from "vue";
2
- import { isPlainObject as W, cloneDeep as K } from "lodash-es";
3
- import ee from "../response-toolbar/index.esm.js";
1
+ import { ref as C, computed as b, createVNode as v, defineComponent as z, watch as _, onMounted as V, inject as O } from "vue";
2
+ import { isPlainObject as N, cloneDeep as U } from "lodash-es";
3
+ import Q from "../response-toolbar/index.esm.js";
4
4
  import "bignumber.js";
5
- import { withInstall as te } from "../common/index.esm.js";
6
- const J = {}, U = {};
7
- function H(t) {
8
- const { properties: e, title: n, ignore: o } = t, s = o && Array.isArray(o), i = Object.keys(e).reduce((y, m) => ((!s || !o.find((C) => C == m)) && (y[m] = e[m].type === "object" && e[m].properties ? H(e[m]) : K(e[m].default)), y), {});
9
- return (!s || !o.find((y) => y == "id")) && (i.id = `${n}-${Date.now()}`), i;
5
+ import { withInstall as Z } from "../common/index.esm.js";
6
+ const q = {}, R = {};
7
+ function j(n) {
8
+ const { properties: e, title: t, ignore: a } = n, i = a && Array.isArray(a), r = Object.keys(e).reduce((o, f) => ((!i || !a.find((p) => p === f)) && (o[f] = e[f].type === "object" && e[f].properties ? j(e[f]) : U(e[f].default)), o), {});
9
+ if (t && (!i || !a.find((o) => o === "id"))) {
10
+ const o = t.toLowerCase().replace(/-/g, "_");
11
+ r.id = `${o}_${Math.random().toString().slice(2, 6)}`;
12
+ }
13
+ return r;
10
14
  }
11
- function $(t, e = {}, n) {
12
- const o = J[t];
13
- if (o) {
14
- let s = H(o);
15
- const i = U[t];
16
- return s = i ? i({ getSchemaByType: $ }, s, e, n) : s, s;
15
+ function $(n, e = {}, t) {
16
+ const a = q[n];
17
+ if (a) {
18
+ let i = j(a);
19
+ const r = R[n];
20
+ return i = r ? r({ getSchemaByType: $ }, i, e, t) : i, i;
17
21
  }
18
22
  return null;
19
23
  }
20
- function ne(t, e) {
21
- const n = H(e);
22
- return Object.keys(t).reduce((o, s) => (o[s] && W(o[s]) && W(t[s]) ? Object.assign(o[s], t[s]) : o[s] = t[s], o), n), n;
24
+ function J(n, e) {
25
+ const t = j(e);
26
+ return Object.keys(t).reduce((a, i) => (a[i] && N(a[i]) && N(n[i] || !n[i]) ? Object.assign(a[i], n[i] || {}) : a[i] = n[i], a), t), t;
23
27
  }
24
- function oe(t, e) {
25
- return Object.keys(t).filter((o) => t[o] != null).reduce((o, s) => {
26
- if (e.has(s)) {
27
- const i = e.get(s);
28
- if (typeof i == "string")
29
- o[i] = t[s];
28
+ function X(n, e) {
29
+ return Object.keys(n).filter((a) => n[a] != null).reduce((a, i) => {
30
+ if (e.has(i)) {
31
+ const r = e.get(i);
32
+ if (typeof r == "string")
33
+ a[r] = n[i];
30
34
  else {
31
- const y = i(s, t[s], t);
32
- Object.assign(o, y);
35
+ const o = r(i, n[i], n);
36
+ Object.assign(a, o);
33
37
  }
34
38
  } else
35
- o[s] = t[s];
36
- return o;
39
+ a[i] = n[i];
40
+ return a;
37
41
  }, {});
38
42
  }
39
- function re(t, e, n = /* @__PURE__ */ new Map()) {
40
- const o = ne(t, e);
41
- return oe(o, n);
43
+ function Y(n, e, t = /* @__PURE__ */ new Map()) {
44
+ const a = J(n, e);
45
+ return X(a, t);
42
46
  }
43
- function ae(t = {}) {
44
- function e(c, b, f, u) {
45
- if (typeof f == "number")
46
- return u[c].length === f;
47
- if (typeof f == "object") {
48
- const g = Object.keys(f)[0], r = f[g];
49
- if (g === "not")
50
- return Number(u[c].length) !== Number(r);
51
- if (g === "moreThan")
52
- return Number(u[c].length) >= Number(r);
53
- if (g === "lessThan")
54
- return Number(u[c].length) <= Number(r);
47
+ function x(n = {}) {
48
+ function e(s, c, l, u) {
49
+ if (typeof l == "number")
50
+ return u[s].length === l;
51
+ if (typeof l == "object") {
52
+ const m = Object.keys(l)[0], y = l[m];
53
+ if (m === "not")
54
+ return Number(u[s].length) !== Number(y);
55
+ if (m === "moreThan")
56
+ return Number(u[s].length) >= Number(y);
57
+ if (m === "lessThan")
58
+ return Number(u[s].length) <= Number(y);
55
59
  }
56
60
  return !1;
57
61
  }
58
- function n(c, b, f, u) {
59
- return u[c] && u[c].propertyValue && String(u[c].propertyValue.value) === String(f);
62
+ function t(s, c, l, u) {
63
+ return u[s] && u[s].propertyValue && String(u[s].propertyValue.value) === String(l);
60
64
  }
61
- const o = /* @__PURE__ */ new Map([
65
+ const a = /* @__PURE__ */ new Map([
62
66
  ["length", e],
63
- ["getProperty", n]
67
+ ["getProperty", t]
64
68
  ]);
65
- Object.keys(t).reduce((c, b) => (c.set(b, t[b]), c), o);
66
- function s(c, b) {
67
- const f = c;
68
- return typeof b == "number" ? [{ target: f, operator: "length", param: null, value: Number(b) }] : typeof b == "boolean" ? [{ target: f, operator: "getProperty", param: c, value: !!b }] : typeof b == "object" ? Object.keys(b).map((u) => {
69
+ Object.keys(n).reduce((s, c) => (s.set(c, n[c]), s), a);
70
+ function i(s, c) {
71
+ const l = s;
72
+ return typeof c == "number" ? [{ target: l, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: l, operator: "getProperty", param: s, value: !!c }] : typeof c == "object" ? Object.keys(c).map((u) => {
69
73
  if (u === "length")
70
- return { target: f, operator: "length", param: null, value: b[u] };
71
- const g = u, r = b[u];
72
- return { target: f, operator: "getProperty", param: g, value: r };
74
+ return { target: l, operator: "length", param: null, value: c[u] };
75
+ const m = u, y = c[u];
76
+ return { target: l, operator: "getProperty", param: m, value: y };
73
77
  }) : [];
74
78
  }
75
- function i(c) {
76
- return Object.keys(c).reduce((f, u) => {
77
- const g = s(u, c[u]);
78
- return f.push(...g), f;
79
+ function r(s) {
80
+ return Object.keys(s).reduce((l, u) => {
81
+ const m = i(u, s[u]);
82
+ return l.push(...m), l;
79
83
  }, []);
80
84
  }
81
- function y(c, b) {
82
- if (o.has(c.operator)) {
83
- const f = o.get(c.operator);
84
- return f && f(c.target, c.param, c.value, b) || !1;
85
+ function o(s, c) {
86
+ if (a.has(s.operator)) {
87
+ const l = a.get(s.operator);
88
+ return l && l(s.target, s.param, s.value, c) || !1;
85
89
  }
86
90
  return !1;
87
91
  }
88
- function m(c, b) {
89
- return i(c).reduce((g, r) => g && y(r, b), !0);
92
+ function f(s, c) {
93
+ return r(s).reduce((m, y) => m && o(y, c), !0);
90
94
  }
91
- function C(c, b) {
92
- const f = Object.keys(c), u = f.includes("allOf"), g = f.includes("anyOf"), r = u || g, p = (r ? c[r ? u ? "allOf" : "anyOf" : "allOf"] : [c]).map((d) => m(d, b));
93
- return u ? !p.includes(!1) : p.includes(!0);
95
+ function p(s, c) {
96
+ const l = Object.keys(s), u = l.includes("allOf"), m = l.includes("anyOf"), y = u || m, M = (y ? s[y ? u ? "allOf" : "anyOf" : "allOf"] : [s]).map((S) => f(S, c));
97
+ return u ? !M.includes(!1) : M.includes(!0);
94
98
  }
95
- return { parseValueSchema: C };
99
+ return { parseValueSchema: p };
96
100
  }
97
- const se = {
101
+ const P = {
98
102
  button: { type: "button", name: "按钮", icon: "Button" },
99
103
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
100
104
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -132,66 +136,65 @@ const se = {
132
136
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
133
137
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
134
138
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
135
- fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
136
- }, ce = {}, ie = {};
137
- ae();
138
- function le(t, e, n = /* @__PURE__ */ new Map(), o = (y, m, C) => m, s = {}, i = (y) => y) {
139
- return J[e.title] = e, U[e.title] = o, ce[e.title] = s, ie[e.title] = i, (y = {}) => {
140
- const m = re(y, e, n), C = Object.keys(t).reduce((c, b) => (c[b] = t[b].default, c), {});
141
- return Object.assign(C, m);
139
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
140
+ "query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
141
+ }, K = {}, I = {};
142
+ x();
143
+ function ee(n, e, t = /* @__PURE__ */ new Map(), a = (o, f, p, s) => f, i = {}, r = (o) => o) {
144
+ return q[e.title] = e, R[e.title] = a, K[e.title] = i, I[e.title] = r, (o = {}) => {
145
+ const f = Y(o, e, t), p = Object.keys(n).reduce((s, c) => (s[c] = n[c].default, s), {});
146
+ return Object.assign(p, f);
142
147
  };
143
148
  }
144
- function pe(t, e) {
149
+ function te(n, e) {
145
150
  return { customClass: e.class, customStyle: e.style };
146
151
  }
147
- function ue(t, e, n) {
148
- return e ? { enableAccordion: n.accordionMode } : { enableAccordion: "" };
152
+ function ne(n, e, t) {
153
+ return e ? { enableAccordion: t.accordionMode } : { enableAccordion: "" };
149
154
  }
150
- function fe(t, e) {
151
- return e && e.contents && e.contents.length && e.contents.forEach((n) => {
152
- n.title && (n.text = n.title);
153
- }), {
154
- buttons: e.contents,
155
+ function oe(n, e) {
156
+ return {
157
+ buttons: e.buttons,
155
158
  buttonPosition: e.position
156
159
  };
157
160
  }
158
- const de = /* @__PURE__ */ new Map([
159
- ["appearance", pe],
161
+ const ae = /* @__PURE__ */ new Map([
162
+ ["appearance", te],
160
163
  ["expanded", "expandStatus"],
161
- ["enableAccordion", ue],
162
- ["toolbar", fe]
164
+ ["enableAccordion", ne],
165
+ ["toolbar", oe]
163
166
  ]);
164
- function ye(t, e, n, o) {
165
- const s = Math.random().toString().slice(2, 6), i = n.parentComponentInstance;
167
+ function re(n, e, t) {
168
+ const a = Math.random().toString().slice(2, 6), i = t.parentComponentInstance;
166
169
  Object.assign(e, {
167
- id: `section-${s}`,
170
+ id: `section-${a}`,
168
171
  appearance: {
169
172
  class: "f-section-in-mainsubcard"
170
173
  },
171
174
  enableAccordion: !1,
172
- mainTitle: e.mainTitle || "标题"
175
+ mainTitle: t.mainTitle || e.mainTitle || "标题"
173
176
  });
174
- const y = t.getSchemaByType("content-container");
175
- Object.assign(y, {
176
- id: `container-${s}`,
177
+ const r = n.getSchemaByType("content-container");
178
+ Object.assign(r, {
179
+ id: `container-${a}`,
177
180
  appearance: {
178
181
  class: "f-struct-wrapper"
179
182
  },
180
183
  contents: [e]
181
184
  });
182
- const m = i.schema;
183
- switch (m && m.type) {
184
- case se.splitter.type: {
185
+ const o = i.schema;
186
+ switch (o && o.type) {
187
+ case P["splitter-pane"].type: {
185
188
  e.appearance.class = "f-section-in-main";
186
189
  break;
187
190
  }
188
191
  }
189
- return y;
192
+ return r;
190
193
  }
191
- function be(t, e, n, o) {
192
- return n.parentComponentInstance ? ye(t, e, n) : e;
194
+ function ie(n, e, t) {
195
+ return t.parentComponentInstance ? re(n, e, t) : e;
193
196
  }
194
- const me = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-design.gitee.io/section.schema.json", ge = "section", Ce = "A Farris Container Component", ve = "object", je = {
197
+ const se = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-design.gitee.io/section.schema.json", le = "section", ue = "A Farris Container Component", pe = "object", fe = {
195
198
  id: {
196
199
  description: "The unique identifier for a Section",
197
200
  type: "string"
@@ -309,30 +312,31 @@ const me = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-
309
312
  type: "string",
310
313
  default: "inHead"
311
314
  },
312
- contents: {
315
+ buttons: {
313
316
  type: "array",
314
317
  default: []
315
318
  }
316
319
  },
317
320
  default: null
318
321
  }
319
- }, Te = [
322
+ }, de = [
320
323
  "id",
321
324
  "type",
322
325
  "contents"
323
- ], Ae = {
324
- $schema: me,
325
- $id: he,
326
- title: ge,
327
- description: Ce,
328
- type: ve,
329
- properties: je,
330
- required: Te
331
- }, L = {
326
+ ], me = {
327
+ $schema: se,
328
+ $id: ce,
329
+ title: le,
330
+ description: ue,
331
+ type: pe,
332
+ properties: fe,
333
+ required: de
334
+ }, B = {
332
335
  /** 设置内容区域样式 */
333
336
  contentClass: { type: String, default: "" },
334
337
  /** 自定义样式 */
335
338
  customClass: { type: String, default: "" },
339
+ customStyle: { type: String, default: "" },
336
340
  /** 设置是否启用収折功能。支持:空字符串,不启用収折 | default 默认収折方式 || custom自定义収折方式 */
337
341
  enableAccordion: { type: String, default: "" },
338
342
  /** 设置初始是否处于展开状态,支持:true 内容区域被展开|false 内容区域被収折 */
@@ -372,25 +376,11 @@ const me = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-
372
376
  // toolbarPosition: { type: String, default: '' },
373
377
  // toolbarButtons: { type: Array<object>, default: [] },
374
378
  // toolbar: { type: Object as PropType<ToolbarConfig>, default: {} }
375
- }, Z = le(L, Ae, de, be);
376
- function we(t, e, n) {
377
- let o;
378
- function s() {
379
- !t || !e.value || (n.value = !n.value, n.value ? i() : y());
380
- }
381
- function i() {
382
- o = t.value.nextElementSibling;
383
- const C = document && document.querySelector("body");
384
- C && (C.appendChild(t.value), t.value.style.zIndex = m());
385
- }
386
- function y() {
387
- o ? e.value.insertBefore(
388
- t.value,
389
- o
390
- ) : e.value.appendChild(t.value), t.value.style.zIndex = null;
391
- }
392
- function m(C = 1) {
393
- const c = [
379
+ }, H = ee(B, me, ae, ie);
380
+ function ye(n, e, t) {
381
+ let a;
382
+ function i(p = 1) {
383
+ const s = [
394
384
  "body>.f-datagrid-settings-simple-host",
395
385
  "body>div",
396
386
  "body>farris-dialog>.farris-modal.show",
@@ -400,915 +390,185 @@ function we(t, e, n) {
400
390
  "body>.popover.show",
401
391
  "body>filter-row-panel>.f-datagrid-filter-panel",
402
392
  "body>.f-section-maximize"
403
- ], b = Array.from(document.body.querySelectorAll(c.join(","))).filter((u) => u).map((u) => {
404
- const { display: g, zIndex: r } = window.getComputedStyle(u);
405
- return g === "none" ? 0 : parseInt(r, 10);
393
+ ], c = Array.from(document.body.querySelectorAll(s.join(","))).filter((u) => u).map((u) => {
394
+ const { display: m, zIndex: y } = window.getComputedStyle(u);
395
+ return m === "none" ? 0 : parseInt(y, 10);
406
396
  }).filter((u) => u);
407
- let f = Math.max(...b);
408
- return f < 1040 && (f = 1040), f + C;
397
+ let l = Math.max(...c);
398
+ return l < 1040 && (l = 1040), l + p;
409
399
  }
410
- return { onClickMaxMinIcon: s };
411
- }
412
- function z(t, e) {
413
- const n = w(t.buttons), o = T(() => t.buttonPosition === "inHead" ? "right" : "left"), s = T(() => "f-section-toolbar" + (t.buttonPosition === "inHead" ? " f-section-header--toolbar" : " f-section-content--toolbar")), i = T(() => {
414
- t.buttons && t.buttons.length > 0 && t.buttonPosition;
415
- });
416
- function y(m) {
417
- e.emit("Click", m);
400
+ function r() {
401
+ a = n.value.nextElementSibling;
402
+ const p = document && document.querySelector("body");
403
+ p && (p.appendChild(n.value), n.value.style.zIndex = i());
418
404
  }
419
- return () => i && M(ee, {
420
- customClass: s.value,
421
- items: n.value,
422
- onClick: y,
423
- alignment: o.value
405
+ function o() {
406
+ a ? e.value.insertBefore(
407
+ n.value,
408
+ a
409
+ ) : e.value.appendChild(n.value), n.value.style.zIndex = null;
410
+ }
411
+ function f() {
412
+ !n || !e.value || (t.value = !t.value, t.value ? r() : o());
413
+ }
414
+ return { onClickMaxMinIcon: f };
415
+ }
416
+ function F(n, e) {
417
+ const t = C(n.buttons), a = b(() => n.buttonPosition === "inHead" ? "right" : "left"), i = b(() => "f-section-toolbar" + (n.buttonPosition === "inHead" ? " f-section-header--toolbar" : " f-section-content--toolbar")), r = b(() => n.buttons && n.buttons.length > 0 && n.buttonPosition === "inHead");
418
+ function o(f) {
419
+ e.emit("Click", f);
420
+ }
421
+ return () => r.value && v(Q, {
422
+ customClass: i.value,
423
+ items: t.value,
424
+ onClick: o,
425
+ alignment: a.value
424
426
  }, null);
425
427
  }
426
- function Q(t, e, n, o, s, i) {
427
- w(t.subTitle);
428
- const y = T(() => t.buttonPosition), m = z(t, e), {
429
- onClickMaxMinIcon: C
430
- } = we(o, s, i), c = T(() => !!t.subTitle), b = T(() => t.enableMaximize), f = T(() => t.enableAccordion != ""), u = T(() => {
431
- const d = {
428
+ function G(n, e, t, a, i, r) {
429
+ C(n.subTitle);
430
+ const o = b(() => n.buttonPosition), f = F(n, e), {
431
+ onClickMaxMinIcon: p
432
+ } = ye(a, i, r), s = b(() => !!n.subTitle), c = b(() => n.enableMaximize), l = b(() => n.enableAccordion !== ""), u = b(() => {
433
+ const S = {
432
434
  "f-section-header": !0
433
435
  };
434
- return e.slots.header && t.headerClass.split(" ").reduce((S, h) => (S[h] = !0, S), d), d;
436
+ return e.slots.header && n.headerClass.split(" ").reduce((d, h) => (d[h] = !0, d), S), S;
435
437
  });
436
- function g(d) {
437
- d.stopPropagation(), t.enableAccordion !== "" && (n.value = !n.value);
438
+ function m(S) {
439
+ S.stopPropagation(), n.enableAccordion !== "" && (t.value = !t.value);
438
440
  }
439
- function r() {
440
- const d = T(() => ({
441
+ function y() {
442
+ const S = b(() => ({
441
443
  btn: !0,
442
444
  "f-btn-collapse-expand": !0,
443
445
  "f-btn-mx": !0,
444
- "f-state-expand": n.value
445
- })), v = T(() => ({
446
+ "f-state-expand": t.value
447
+ })), D = b(() => ({
446
448
  "f-icon": !0,
447
- "f-icon-maximize": !i.value,
448
- "f-icon-minimize": i.value
449
+ "f-icon-maximize": !r.value,
450
+ "f-icon-minimize": r.value
449
451
  }));
450
- return M("div", {
452
+ return v("div", {
451
453
  class: "f-max-accordion"
452
- }, [b.value ? M("span", {
453
- class: v.value,
454
- onClick: C
455
- }, null) : "", f.value ? M("button", {
456
- class: d.value,
457
- onClick: g
458
- }, [M("span", null, [n.value ? t.collapseLabel : t.expandLabel])]) : ""]);
459
- }
460
- function l() {
461
- return e.slots.header ? M("div", {
454
+ }, [c.value ? v("span", {
455
+ class: D.value,
456
+ onClick: p
457
+ }, null) : "", l.value ? v("button", {
458
+ class: S.value,
459
+ onClick: m
460
+ }, [v("span", null, [t.value ? n.collapseLabel : n.expandLabel])]) : ""]);
461
+ }
462
+ function w() {
463
+ return e.slots.header ? v("div", {
462
464
  class: u.value
463
465
  }, [e.slots.header()]) : "";
464
466
  }
465
- function a() {
466
- return M("div", {
467
+ function g() {
468
+ return v("div", {
467
469
  class: "f-title",
468
- onClick: g
469
- }, [M("h4", {
470
+ onClick: m
471
+ }, [v("h4", {
470
472
  class: "f-title-text"
471
- }, [t.mainTitle]), c.value && M("span", null, [t.subTitle])]);
473
+ }, [n.mainTitle]), s.value && v("span", null, [n.subTitle])]);
472
474
  }
473
- function p() {
474
- const d = T(() => {
475
- const v = {
475
+ function M() {
476
+ const S = b(() => {
477
+ const D = {
476
478
  "f-content": !0
477
479
  };
478
- return t.headerContentClass && t.headerContentClass.split(" ").reduce((h, P) => (h[P] = !0, h), v), v;
480
+ return n.headerContentClass && n.headerContentClass.split(" ").reduce((h, T) => (h[T] = !0, h), D), D;
479
481
  });
480
- return e.slots.headerContent ? M("div", {
481
- class: d.value
482
+ return e.slots.headerContent ? v("div", {
483
+ class: S.value
482
484
  }, [e.slots.headerContent()]) : "";
483
485
  }
484
- function j() {
485
- return M("div", {
486
+ function A() {
487
+ return v("div", {
486
488
  class: u.value
487
- }, [e.slots.headerTitle ? e.slots.headerTitle() : a(), p(), y.value === "inHead" && m(), (b.value || f.value) && r()]);
489
+ }, [e.slots.headerTitle ? e.slots.headerTitle() : g(), M(), o.value === "inHead" && f(), (c.value || l.value) && y()]);
488
490
  }
489
- return () => t.showHeader && (e.slots.header ? l() : j());
491
+ return () => n.showHeader && (e.slots.header ? w() : A());
490
492
  }
491
- const Se = ["moz", "ms", "webkit"];
492
- function Pe() {
493
- let t = 0;
493
+ const be = ["moz", "ms", "webkit"];
494
+ function he() {
495
+ let n = 0;
494
496
  return (e) => {
495
- const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - t)), s = setTimeout(() => {
496
- e(n + o);
497
- }, o);
498
- return t = n + o, s;
497
+ const t = (/* @__PURE__ */ new Date()).getTime(), a = Math.max(0, 16 - (t - n)), i = setTimeout(() => {
498
+ e(t + a);
499
+ }, a);
500
+ return n = t + a, i;
499
501
  };
500
502
  }
501
- function Me() {
503
+ function ve() {
502
504
  if (typeof window > "u")
503
505
  return () => 0;
504
506
  if (window.requestAnimationFrame)
505
507
  return window.requestAnimationFrame.bind(window);
506
- const t = Se.filter((e) => `${e}RequestAnimationFrame` in window)[0];
507
- return t ? window[`${t}RequestAnimationFrame`] : Pe();
508
+ const n = be.filter((e) => `${e}RequestAnimationFrame` in window)[0];
509
+ return n ? window[`${n}RequestAnimationFrame`] : he();
508
510
  }
509
- Me();
510
- function O(t, e) {
511
- return ((e == null ? void 0 : e.split(" ")) || []).reduce((o, s) => (s && (o[s] = !0), o), t), t;
511
+ ve();
512
+ function L(n, e) {
513
+ return ((e == null ? void 0 : e.split(" ")) || []).reduce((a, i) => (i && (a[i] = !0), a), n), n;
512
514
  }
513
- const x = /* @__PURE__ */ G({
515
+ const E = /* @__PURE__ */ z({
514
516
  name: "FSection",
515
- props: L,
517
+ props: B,
516
518
  emits: [],
517
- setup(t, e) {
518
- const n = w();
519
- let o = w();
520
- const s = w(t.customClass), i = T(() => t.enableAccordion), y = w(t.expandStatus), m = T(() => t.buttonPosition), C = w(!1), c = Q(t, e, y, n, o, C), b = z(t, e), f = T(() => {
521
- const a = {
519
+ setup(n, e) {
520
+ const t = C(), a = C(), i = C(n.customClass), r = b(() => n.enableAccordion), o = C(n.expandStatus), f = b(() => n.buttonPosition), p = C(!1), s = G(n, e, o, t, a, p), c = F(n, e), l = b(() => {
521
+ const g = {
522
522
  "f-section": !0,
523
- "f-section-accordion": i.value === "default",
524
- "f-state-collapse": (i.value === "default" || i.value === "custom") && !y.value,
525
- "f-section-custom-accordion": i.value === "custom",
526
- "f-section-fill": t.fill,
527
- "f-section-maximize": C.value
523
+ "f-section-accordion": r.value === "default",
524
+ "f-state-collapse": (r.value === "default" || r.value === "custom") && !o.value,
525
+ "f-section-custom-accordion": r.value === "custom",
526
+ "f-section-fill": n.fill,
527
+ "f-section-maximize": p.value
528
528
  };
529
- return O(a, s.value);
530
- }), u = T(() => O({
529
+ return L(g, i.value);
530
+ }), u = b(() => L({
531
531
  "f-section-content": !0
532
- }, t.contentClass)), g = T(() => O({
532
+ }, n.contentClass)), m = b(() => L({
533
533
  "f-section-extend": !0
534
- }, g.value));
535
- function r() {
536
- return e.slots.extend && M("div", {
537
- class: g.value
534
+ }, m.value));
535
+ function y() {
536
+ return e.slots.extend && v("div", {
537
+ class: m.value
538
538
  }, [e.slots.extend()]);
539
539
  }
540
- function l() {
541
- return M("div", {
540
+ function w() {
541
+ return v("div", {
542
542
  class: u.value
543
- }, [m.value === "inContent" && b(), e.slots.default && e.slots.default()]);
543
+ }, [f.value === "inContent" && c(), e.slots.default && e.slots.default()]);
544
544
  }
545
- return R(() => t.expandStatus, (a, p) => {
546
- a !== p && (y.value = a);
547
- }), _(() => {
548
- n && n.value && (o.value = n.value.parentElement);
549
- }), () => M("div", {
550
- class: f.value,
551
- ref: n
552
- }, [c(), r(), l()]);
545
+ return _(() => n.expandStatus, (g, M) => {
546
+ g !== M && (o.value = g);
547
+ }), V(() => {
548
+ t.value && t.value && (a.value = t.value.parentElement);
549
+ }), () => v("div", {
550
+ class: l.value,
551
+ ref: t,
552
+ style: n.customStyle
553
+ }, [s(), y(), w()]);
553
554
  }
554
555
  });
555
- function ke() {
556
- function t(e) {
557
- var s, i;
556
+ function Ce() {
557
+ function n(e, t) {
558
+ var o;
558
559
  if (!e)
559
560
  return !1;
560
- const n = ((s = e.targetContainer) == null ? void 0 : s.componentInstance) && e.targetContainer.componentInstance.value;
561
- if (!n)
561
+ const a = ((o = e.targetContainer) == null ? void 0 : o.componentInstance) && e.targetContainer.componentInstance.value;
562
+ if (!a)
562
563
  return !1;
563
- const o = (i = n.schema.appearance) == null ? void 0 : i.class;
564
- if (e.controlCategory === "input" || e.controlType === "form-group") {
565
- const y = n.schema.type, m = (y === "response-form" || y === "content-container") && o && o.includes("farris-form");
566
- if (n.schema.type !== "response-layout-item" && !m)
567
- return !1;
568
- }
569
- return e.controlType !== "field-set";
564
+ const i = a.schema.type, r = t == null ? void 0 : t.formSchemaUtils.getComponentById(a.belongedComponentId);
565
+ return !((e.componentCategory === "input" || e.componentType === "form-group") && ![P["response-layout-item"].type, P["response-form"].type].includes(i) || (e.componentType === P.tabs.type || e.componentType === P.section.type) && ((r == null ? void 0 : r.componentType) !== "frame" || ![P["content-container"].type, P["splitter-pane"].type, P["response-layout-item"].type].includes(i)));
570
566
  }
571
567
  return {
572
- basalDragulaRuleForContainer: t
568
+ basalDragulaRuleForContainer: n
573
569
  };
574
570
  }
575
- const De = "https://json-schema.org/draft/2020-12/schema", Ee = "https://farris-design.gitee.io/dragging-rules.schema.json", Oe = "Dragging Rules", xe = "The rules of designer canvas", Ne = "object", Fe = {
576
- "f-page": {
577
- description: "The root class of page designed by farris.",
578
- type: "object",
579
- properties: {
580
- contents: {
581
- type: "object",
582
- properties: {
583
- "f-page-header": {
584
- description: "The class of page header designed by farris.",
585
- type: "string"
586
- },
587
- "f-page-main": {
588
- description: "The class of page body designed by farris.",
589
- type: "object",
590
- properties: {
591
- contents: {
592
- type: "object",
593
- properties: {
594
- "f-struct-like-card": {
595
- description: "",
596
- type: "object",
597
- properties: {
598
- contents: {
599
- type: "object",
600
- properties: {
601
- "f-struct-form": {
602
- description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
603
- type: "object",
604
- properties: {
605
- contents: {
606
- type: "object",
607
- properties: {
608
- "f-section-form": {
609
- description: "The class of section which has wrapped a reponse-form component.",
610
- type: "object",
611
- properties: {
612
- contents: {
613
- type: "object",
614
- properties: {
615
- "f-form-layout": {
616
- description: "The class of reponse form",
617
- type: "object",
618
- properties: {
619
- rules: {
620
- type: "object",
621
- properties: {
622
- canAccept: {
623
- type: "boolean",
624
- const: !0
625
- },
626
- fixed: {
627
- type: "boolean",
628
- const: !0
629
- },
630
- hidePadding: {
631
- type: "boolean",
632
- const: !1
633
- }
634
- }
635
- }
636
- }
637
- }
638
- }
639
- },
640
- rules: {
641
- type: "object",
642
- properties: {
643
- canAccept: {
644
- type: "boolean",
645
- const: !1
646
- },
647
- fixed: {
648
- type: "boolean",
649
- const: !0
650
- },
651
- hidePadding: {
652
- type: "boolean",
653
- const: !0
654
- }
655
- }
656
- }
657
- }
658
- }
659
- }
660
- },
661
- rules: {
662
- type: "object",
663
- properties: {
664
- canAccept: {
665
- type: "boolean",
666
- const: !1
667
- },
668
- fixed: {
669
- type: "boolean",
670
- const: !1
671
- },
672
- hidePadding: {
673
- type: "boolean",
674
- const: !0
675
- }
676
- }
677
- }
678
- }
679
- },
680
- "f-struct-wrapper": {
681
- description: "",
682
- type: "object",
683
- properties: {
684
- contents: {
685
- type: "object",
686
- properties: {
687
- "f-section-tabs": {
688
- description: "The class of section which has wrapped sub-grid tabs.",
689
- type: "object",
690
- properties: {
691
- contents: {
692
- type: "object",
693
- properties: {
694
- "f-tabs-in-card": {
695
- description: "The class of tabs which contains sub-grid.",
696
- type: "object",
697
- properties: {
698
- contents: {
699
- type: "object",
700
- properties: {
701
- "f-struct-data-grid-in-card": {
702
- description: "The class of sub-grid component",
703
- type: "object",
704
- properties: {
705
- contents: {
706
- type: "object",
707
- properties: {
708
- "f-grid-is-sub": {
709
- description: "The class of sub-grid",
710
- type: "object",
711
- properties: {
712
- rules: {
713
- type: "object",
714
- properties: {
715
- canAccept: {
716
- type: "boolean",
717
- const: !0
718
- },
719
- fixed: {
720
- type: "boolean",
721
- const: !0
722
- },
723
- hidePadding: {
724
- type: "boolean",
725
- const: !1
726
- }
727
- }
728
- }
729
- }
730
- }
731
- }
732
- },
733
- rules: {
734
- type: "object",
735
- properties: {
736
- canAccept: {
737
- type: "boolean",
738
- const: !1
739
- },
740
- fixed: {
741
- type: "boolean",
742
- const: !1
743
- },
744
- hidePadding: {
745
- type: "boolean",
746
- const: !0
747
- }
748
- }
749
- }
750
- }
751
- }
752
- }
753
- },
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
- }
774
- },
775
- rules: {
776
- type: "object",
777
- properties: {
778
- canAccept: {
779
- type: "boolean",
780
- const: !1
781
- },
782
- fixed: {
783
- type: "boolean",
784
- const: !0
785
- },
786
- hidePadding: {
787
- type: "boolean",
788
- const: !0
789
- }
790
- }
791
- }
792
- }
793
- },
794
- "f-section-in-main": {
795
- description: "The class of section which has wrapped a reponse-form component.",
796
- type: "object",
797
- properties: {
798
- rules: {
799
- type: "object",
800
- properties: {
801
- canAccept: {
802
- type: "boolean",
803
- const: !0
804
- },
805
- fixed: {
806
- type: "boolean",
807
- const: !0
808
- },
809
- hidePadding: {
810
- type: "boolean",
811
- const: !1
812
- }
813
- }
814
- }
815
- }
816
- }
817
- }
818
- },
819
- rules: {
820
- type: "object",
821
- properties: {
822
- canAccept: {
823
- type: "boolean",
824
- const: !1
825
- },
826
- fixed: {
827
- type: "boolean",
828
- const: !1
829
- },
830
- hidePadding: {
831
- type: "boolean",
832
- const: !0
833
- }
834
- }
835
- }
836
- }
837
- }
838
- }
839
- },
840
- rules: {
841
- type: "object",
842
- properties: {
843
- canAccept: {
844
- type: "boolean",
845
- const: !0
846
- },
847
- fixed: {
848
- type: "boolean",
849
- const: !0
850
- },
851
- hidePadding: {
852
- type: "object",
853
- const: {
854
- allOf: [
855
- {
856
- sibling: 0,
857
- parent: {
858
- "f-page-main": !0
859
- }
860
- }
861
- ]
862
- }
863
- }
864
- }
865
- }
866
- }
867
- },
868
- "f-struct-data-grid": {
869
- description: "",
870
- type: "object",
871
- properties: {
872
- rules: {
873
- type: "object",
874
- properties: {
875
- canAccept: {
876
- type: "object",
877
- const: !0
878
- },
879
- fixed: {
880
- type: "boolean",
881
- const: !0
882
- },
883
- hidePadding: {
884
- type: "boolean",
885
- const: !0
886
- }
887
- }
888
- }
889
- }
890
- },
891
- "f-page-main-content": {
892
- description: "",
893
- type: "object",
894
- properties: {
895
- contents: {
896
- type: "object",
897
- properties: {
898
- "f-page-content-nav": {
899
- description: "",
900
- type: "object",
901
- properties: {
902
- contents: {
903
- type: "object",
904
- properties: {
905
- "f-struct-data-grid-in-nav": {
906
- description: "",
907
- type: "object",
908
- properties: {
909
- contents: {
910
- type: "object",
911
- properties: {
912
- "f-page-content-nav-extend": {
913
- description: "",
914
- type: "object"
915
- },
916
- "f-section-in-nav": {
917
- description: "",
918
- type: "object",
919
- properties: {
920
- rules: {
921
- type: "object",
922
- properties: {
923
- canAccept: {
924
- type: "boolean",
925
- const: !1
926
- },
927
- fixed: {
928
- type: "boolean",
929
- const: !0
930
- },
931
- hidePadding: {
932
- type: "boolean",
933
- const: !1
934
- }
935
- }
936
- }
937
- }
938
- }
939
- }
940
- },
941
- rules: {
942
- type: "object",
943
- properties: {
944
- canAccept: {
945
- type: "boolean",
946
- const: !0
947
- },
948
- fixed: {
949
- type: "boolean",
950
- const: !1
951
- },
952
- hidePadding: {
953
- type: "boolean",
954
- const: !0
955
- }
956
- }
957
- }
958
- }
959
- }
960
- }
961
- }
962
- }
963
- },
964
- "f-page-content-main": {
965
- description: "",
966
- type: "object",
967
- properties: {}
968
- }
969
- }
970
- }
971
- }
972
- },
973
- "f-page-content": {
974
- description: "",
975
- type: "object",
976
- properties: {
977
- contents: {
978
- type: "object",
979
- properties: {
980
- "f-page-content-nav": {
981
- description: "",
982
- type: "object",
983
- properties: {
984
- contents: {
985
- type: "object",
986
- properties: {
987
- "f-list-nav": {
988
- description: "",
989
- type: "object"
990
- },
991
- "f-list-nav-left": {
992
- description: "",
993
- type: "object"
994
- },
995
- "f-struct-data-grid-in-nav": {
996
- description: "",
997
- type: "object",
998
- properties: {
999
- contents: {
1000
- type: "object",
1001
- properties: {
1002
- "f-section-form": {
1003
- description: "",
1004
- type: "object",
1005
- properties: {
1006
- rules: {
1007
- type: "object",
1008
- properties: {
1009
- canAccept: {
1010
- type: "boolean",
1011
- const: !1
1012
- },
1013
- fixed: {
1014
- type: "boolean",
1015
- const: !0
1016
- },
1017
- hidePadding: {
1018
- type: "boolean",
1019
- const: !0
1020
- }
1021
- }
1022
- }
1023
- }
1024
- },
1025
- "f-section-grid": {
1026
- description: "",
1027
- type: "object",
1028
- properties: {
1029
- rules: {
1030
- type: "object",
1031
- properties: {
1032
- canAccept: {
1033
- type: "boolean",
1034
- const: !1
1035
- },
1036
- fixed: {
1037
- type: "boolean",
1038
- const: !0
1039
- },
1040
- hidePadding: {
1041
- type: "boolean",
1042
- const: !0
1043
- }
1044
- }
1045
- }
1046
- }
1047
- }
1048
- }
1049
- },
1050
- rules: {
1051
- type: "object",
1052
- properties: {
1053
- canAccept: {
1054
- type: "boolean",
1055
- const: !1
1056
- },
1057
- fixed: {
1058
- type: "boolean",
1059
- const: !0
1060
- },
1061
- hidePadding: {
1062
- type: "boolean",
1063
- const: !0
1064
- }
1065
- }
1066
- }
1067
- }
1068
- }
1069
- }
1070
- }
1071
- },
1072
- rules: {
1073
- type: "object",
1074
- properties: {
1075
- canAccept: {
1076
- type: "boolean",
1077
- const: !1
1078
- },
1079
- fixed: {
1080
- type: "boolean",
1081
- const: !0
1082
- },
1083
- hidePadding: {
1084
- type: "boolean",
1085
- const: !0
1086
- }
1087
- }
1088
- }
1089
- },
1090
- "f-page-content-main": {
1091
- description: "",
1092
- type: "object",
1093
- properties: {
1094
- rules: {
1095
- type: "object",
1096
- properties: {
1097
- canAccept: {
1098
- type: "boolean",
1099
- const: !1
1100
- },
1101
- fixed: {
1102
- type: "boolean",
1103
- const: !1
1104
- },
1105
- hidePadding: {
1106
- type: "boolean",
1107
- const: !0
1108
- }
1109
- }
1110
- }
1111
- }
1112
- }
1113
- }
1114
- },
1115
- rules: {
1116
- type: "object",
1117
- properties: {
1118
- canAccept: {
1119
- type: "boolean",
1120
- const: !1
1121
- },
1122
- fixed: {
1123
- type: "boolean",
1124
- const: !0
1125
- },
1126
- hidePadding: {
1127
- type: "boolean",
1128
- const: !0
1129
- }
1130
- }
1131
- }
1132
- }
1133
- }
1134
- }
1135
- },
1136
- rules: {
1137
- type: "object",
1138
- properties: {
1139
- canAccept: {
1140
- type: "object",
1141
- const: {
1142
- anyOf: [
1143
- {
1144
- children: 0
1145
- },
1146
- {
1147
- children: {
1148
- length: {
1149
- not: 1
1150
- },
1151
- "f-struct-like-card": !0
1152
- }
1153
- },
1154
- {
1155
- children: {
1156
- "scroll-spy": !1,
1157
- "f-page-content": !1,
1158
- "f-struct-like-card": !1
1159
- }
1160
- }
1161
- ]
1162
- }
1163
- },
1164
- fixed: {
1165
- type: "boolean",
1166
- const: !0
1167
- },
1168
- hidePadding: {
1169
- type: "boolean",
1170
- const: !0
1171
- }
1172
- }
1173
- }
1174
- }
1175
- },
1176
- "f-page-footer": {
1177
- description: "The class of page footer designed by farris.",
1178
- type: "string"
1179
- }
1180
- }
1181
- },
1182
- rules: {
1183
- type: "object",
1184
- properties: {
1185
- canAccept: {
1186
- type: "boolean",
1187
- const: !1
1188
- },
1189
- fixed: {
1190
- type: "boolean",
1191
- const: !0
1192
- },
1193
- hidePadding: {
1194
- type: "boolean",
1195
- const: !0
1196
- }
1197
- }
1198
- }
1199
- }
1200
- },
1201
- "f-page-is-managelist": {
1202
- description: "The root class of mangement list page.",
1203
- type: "string"
1204
- },
1205
- "f-page-card": {
1206
- description: "",
1207
- type: "object"
1208
- },
1209
- "f-page-is-mainsubcard": {
1210
- description: "",
1211
- type: "object"
1212
- }
1213
- }, Be = {
1214
- $schema: De,
1215
- $id: Ee,
1216
- title: Oe,
1217
- description: xe,
1218
- type: Ne,
1219
- properties: Fe
1220
- }, B = /* @__PURE__ */ new Map();
1221
- function $e() {
1222
- function t(r, l, a, p) {
1223
- var j;
1224
- if (typeof a == "number")
1225
- return ((j = p[r]) == null ? void 0 : j.length) === a;
1226
- if (typeof a == "object") {
1227
- const d = Object.keys(a)[0], v = a[d];
1228
- if (d === "not")
1229
- return Number(p[r].length) !== Number(v);
1230
- if (d === "moreThan")
1231
- return Number(p[r].length) >= Number(v);
1232
- if (d === "lessThan")
1233
- return Number(p[r].length) <= Number(v);
1234
- }
1235
- return !1;
1236
- }
1237
- function e(r, l, a, p) {
1238
- return typeof a == "boolean" ? p.childrenClassList.includes(l) === !!a : !1;
1239
- }
1240
- function n(r, l, a, p) {
1241
- return typeof a == "boolean" ? p.parentClassList.includes(l) === !!a : !1;
1242
- }
1243
- function o(r, l, a, p) {
1244
- return typeof a == "boolean" ? p.parentClassList.includes(l) === !!a : !1;
1245
- }
1246
- const s = /* @__PURE__ */ new Map([
1247
- ["length", t],
1248
- ["hasChildren", e],
1249
- ["hasSibling", o],
1250
- ["hasParent", n]
1251
- ]);
1252
- function i(r, l) {
1253
- const a = r;
1254
- return typeof l == "number" ? [{ target: a, operator: "length", param: null, value: Number(l) }] : typeof l == "object" ? Object.keys(l).map((p) => {
1255
- if (p === "length")
1256
- return { target: a, operator: "length", param: null, value: l[p] };
1257
- const j = p, d = l[p];
1258
- return { target: a, operator: r === "children" ? "hasChildren" : r === "parent" ? "hasParent" : "hasSibling", param: j, value: d };
1259
- }) : [];
1260
- }
1261
- function y(r, l) {
1262
- if (s.has(r.operator)) {
1263
- const a = s.get(r.operator);
1264
- return a && a(r.target, r.param, r.value, l) || !1;
1265
- }
1266
- return !1;
1267
- }
1268
- function m(r, l) {
1269
- return Object.keys(r).reduce((d, v) => {
1270
- const S = i(v, r[v]);
1271
- return d.push(...S), d;
1272
- }, []).reduce((d, v) => d && y(v, l), !0);
1273
- }
1274
- function C(r, l) {
1275
- const a = Object.keys(r), p = a.includes("allOf"), j = a.includes("anyOf"), d = p || j, h = (d ? r[d ? p ? "allOf" : "anyOf" : "allOf"] : [r]).map((A) => m(A, l));
1276
- return p ? !h.includes(!1) : h.includes(!0);
1277
- }
1278
- function c(r, l) {
1279
- const a = r.const;
1280
- return a ? typeof a == "boolean" ? a : typeof a == "object" ? C(a, l) : !1 : !1;
1281
- }
1282
- function b(r) {
1283
- return (l) => {
1284
- const a = { canAccept: !0, fixed: !1, hidePadding: !1 };
1285
- return r && r.properties && Object.keys(r.properties).reduce((p, j) => {
1286
- const d = r.properties[j];
1287
- return p[j] = c(d, l), p;
1288
- }, a), a;
1289
- };
1290
- }
1291
- function f(r, l, a) {
1292
- if (l.type === "object" && l.properties) {
1293
- const { rules: p, contents: j } = l.properties;
1294
- a.set(r, b(p)), j && Object.keys(j.properties).forEach(
1295
- (d) => f(d, j.properties[d], a)
1296
- );
1297
- }
1298
- }
1299
- function u() {
1300
- const { properties: r } = Be;
1301
- Object.keys(r).forEach((l) => {
1302
- f(l, r[l], B);
1303
- });
1304
- }
1305
- function g(r, l) {
1306
- const a = { canAccept: !0, fixed: !1, hidePadding: !0 };
1307
- return B.has(r) ? B.get(r)(l) : a;
1308
- }
1309
- return u(), { getRuleValue: g };
1310
- }
1311
- const He = {
571
+ const ge = {
1312
572
  title: "section",
1313
573
  description: "A Farris Container Component",
1314
574
  type: "object",
@@ -1338,36 +598,11 @@ const He = {
1338
598
  }
1339
599
  ]
1340
600
  }
1341
- },
1342
- mainTitle: {
1343
- title: "主标题",
1344
- type: "string",
1345
- description: "",
1346
- visible: {
1347
- showHeader: !0
1348
- }
1349
- },
1350
- subTitle: {
1351
- title: "副标题",
1352
- type: "string",
1353
- description: "",
1354
- visible: {
1355
- showHeader: !0
1356
- }
1357
601
  }
1358
- },
1359
- setPropertyRelates(t, e) {
1360
- if (t)
1361
- switch (t && t.propertyID) {
1362
- case "mainTitle": {
1363
- t.needRefreshControlTree = !0;
1364
- break;
1365
- }
1366
- }
1367
602
  }
1368
603
  },
1369
604
  appearance: {
1370
- title: "样式",
605
+ title: "外观",
1371
606
  description: "Appearance",
1372
607
  properties: {
1373
608
  class: {
@@ -1383,10 +618,26 @@ const He = {
1383
618
  type: "boolean",
1384
619
  description: ""
1385
620
  },
621
+ mainTitle: {
622
+ title: "主标题",
623
+ type: "string",
624
+ description: "",
625
+ visible: {
626
+ showHeader: !0
627
+ }
628
+ },
629
+ subTitle: {
630
+ title: "副标题",
631
+ type: "string",
632
+ description: "",
633
+ visible: {
634
+ showHeader: !0
635
+ }
636
+ },
1386
637
  fill: {
1387
638
  title: "填充内容区域",
1388
639
  type: "boolean",
1389
- description: "To fill the space of parent container in flex layout."
640
+ description: ""
1390
641
  },
1391
642
  enableAccordion: {
1392
643
  title: "允许收折",
@@ -1396,6 +647,15 @@ const He = {
1396
647
  showHeader: !0
1397
648
  }
1398
649
  }
650
+ },
651
+ setPropertyRelates(n, e) {
652
+ if (n)
653
+ switch (n && n.propertyID) {
654
+ case "mainTitle": {
655
+ n.needRefreshControlTree = !0;
656
+ break;
657
+ }
658
+ }
1399
659
  }
1400
660
  },
1401
661
  extends: {
@@ -1411,207 +671,270 @@ const He = {
1411
671
  }
1412
672
  }
1413
673
  };
1414
- function Le(t, e) {
1415
- const n = w(!1), o = w(!1), s = $e();
1416
- let i = !0, y = !1, m, C = !1;
1417
- function c(a) {
1418
- return He;
1419
- }
1420
- function b(a) {
1421
- return !(!ke().basalDragulaRuleForContainer(a) || !i);
674
+ class Te {
675
+ getTemplateRule(e, t) {
676
+ const a = t == null ? void 0 : t.formSchemaUtils, i = a == null ? void 0 : a.getFormTemplateRule(), r = { canAccept: !0, canDelete: !0, canMove: !0 };
677
+ if (!i)
678
+ return r;
679
+ const o = this.getComponentContext(e), { componentClassList: f } = o;
680
+ return f.forEach((p) => {
681
+ if (!p || !i[p])
682
+ return;
683
+ const { canMove: s, canDelete: c, canAccept: l } = i[p];
684
+ r.canMove = r.canMove && this.resolveRuleValue(s, o), r.canDelete = r.canDelete && this.resolveRuleValue(c, o), r.canAccept = r.canAccept && this.resolveRuleValue(l, o);
685
+ }), r;
686
+ }
687
+ resolveRuleValue(e, t) {
688
+ return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, t);
689
+ }
690
+ parseRuleValueSchema(e, t) {
691
+ const a = e.invalidContext || [];
692
+ let i = !0;
693
+ for (const r of a) {
694
+ if (r.firstLevelChild) {
695
+ if (r.firstLevelChild.class) {
696
+ const { firstLevelChildClassList: o } = t;
697
+ if (o && !o.includes(r.firstLevelChild.class)) {
698
+ i = !1;
699
+ continue;
700
+ }
701
+ }
702
+ if (r.firstLevelChild.type) {
703
+ const { firstLevelChildSchema: o } = t;
704
+ if (!o || o.type !== r.firstLevelChild.type) {
705
+ i = !1;
706
+ continue;
707
+ }
708
+ }
709
+ }
710
+ if (r.secondLevelChild) {
711
+ if (r.secondLevelChild.class) {
712
+ const { secondLevelChildClassList: o } = t;
713
+ if (o && !o.includes(r.secondLevelChild.class)) {
714
+ i = !1;
715
+ continue;
716
+ }
717
+ }
718
+ if (r.secondLevelChild.type) {
719
+ const { secondLevelChildSchema: o } = t;
720
+ if (!o || o.type !== r.secondLevelChild.type) {
721
+ i = !1;
722
+ continue;
723
+ }
724
+ }
725
+ }
726
+ if (r.parent) {
727
+ if (r.parent.class) {
728
+ const { parentClassList: o } = t;
729
+ if (o && !o.includes(r.parent.class)) {
730
+ i = !1;
731
+ continue;
732
+ }
733
+ }
734
+ if (r.parent.type) {
735
+ const { parentSchema: o } = t;
736
+ if (o && o.type !== r.parent.type) {
737
+ i = !1;
738
+ continue;
739
+ }
740
+ }
741
+ }
742
+ i = !0;
743
+ break;
744
+ }
745
+ return !i;
746
+ }
747
+ getComponentContext(e) {
748
+ var w, g, M, A;
749
+ const t = e.schema, a = t.appearance && t.appearance.class || "", i = a.split(" ") || [], r = t.contents || [], o = r.length ? r[0] : null, f = o && o.appearance ? o.appearance.class : "", p = f ? f.split(" ") : [], s = (w = o == null ? void 0 : o.contents) != null && w.length ? o == null ? void 0 : o.contents[0] : null, c = s && s.appearance ? s.appearance.class : "", l = c ? c.split(" ") : [], u = t.type === "component" ? (M = (g = e.parent) == null ? void 0 : g.parent) == null ? void 0 : M.schema : (A = e.parent) == null ? void 0 : A.schema, m = u && u.appearance && u.appearance.class || "", y = m ? m.split(" ") : [];
750
+ return {
751
+ componentClass: a,
752
+ componentClassList: i,
753
+ childContents: r,
754
+ firstLevelChildSchema: o,
755
+ firstLevelChildClass: f,
756
+ firstLevelChildClassList: p,
757
+ secondLevelChildSchema: s,
758
+ secondLevelChildClass: c,
759
+ secondLevelChildClassList: l,
760
+ parentSchema: u,
761
+ parentClass: m,
762
+ parentClassList: y
763
+ };
1422
764
  }
1423
- function f() {
1424
- return !C;
765
+ }
766
+ function Se(n, e) {
767
+ const t = new Te();
768
+ function a(p) {
769
+ return ge;
1425
770
  }
1426
- function u() {
1427
- return !C;
771
+ function i(p) {
772
+ if (!Ce().basalDragulaRuleForContainer(p, e))
773
+ return !1;
774
+ const { canAccept: c } = t.getTemplateRule(n, e);
775
+ return c;
1428
776
  }
1429
- function g() {
1430
- return y;
777
+ function r() {
778
+ const { canDelete: p } = t.getTemplateRule(n, e);
779
+ return p;
1431
780
  }
1432
- function r(a) {
781
+ function o() {
782
+ const { canMove: p } = t.getTemplateRule(n, e);
783
+ return p;
1433
784
  }
1434
- function l() {
1435
- n.value = !1, o.value = !1, C = !1, i = !0;
1436
- const a = t, p = a.appearance && a.appearance.class || "", j = p ? p.split(" ") : [], d = a.contents || [], v = d.length ? d[0] : null, S = v && v.appearance && v.appearance.class || "", h = S ? S.split(" ") : [], P = d.length ? d.reduce((V, F) => {
1437
- const q = F && F.appearance ? F.appearance.class : "", Y = q ? q.split(" ") : [];
1438
- return V.push(...Y), V;
1439
- }, []) : [], A = e, k = A && A.appearance && A.appearance.class || "", E = k ? k.split(" ") : [];
1440
- m = {
1441
- componentClass: p,
1442
- componentClassList: j,
1443
- childContents: d,
1444
- firstChildContent: v,
1445
- firstChildClass: S,
1446
- firstChildClassList: h,
1447
- parent: A,
1448
- parentClass: k,
1449
- parentClassList: E,
1450
- children: d,
1451
- childrenClassList: P
1452
- };
1453
- const { canAccept: D, fixed: N, hidePadding: X } = s.getRuleValue(j[0], m);
1454
- return i = D, y = X, C = N, !0;
785
+ function f() {
786
+ const { canMove: p, canDelete: s } = t.getTemplateRule(n, e);
787
+ return !p && !s;
1455
788
  }
1456
789
  return {
1457
- canAccepts: b,
1458
- checkCanDeleteComponent: f,
1459
- checkCanMoveComponent: u,
1460
- hideNestedPaddingInDesginerView: g,
1461
- onAcceptMovedChildElement: r,
1462
- resolveComponentContext: l,
1463
- triggerBelongedComponentToMoveWhenMoved: n,
1464
- triggerBelongedComponentToDeleteWhenDeleted: o,
1465
- getPropsConfig: c
790
+ canAccepts: i,
791
+ checkCanDeleteComponent: r,
792
+ checkCanMoveComponent: o,
793
+ hideNestedPaddingInDesginerView: f,
794
+ getPropsConfig: a
1466
795
  };
1467
796
  }
1468
- function ze(t, e, n) {
1469
- var S;
797
+ function Me(n, e, t) {
798
+ var D;
799
+ const a = t && t.getStyles && t.getStyles() || "", i = t && t.getDesignerClass && t.getDesignerClass() || "", r = C();
1470
800
  function o() {
1471
- n != null && n.resolveComponentContext && n.resolveComponentContext();
801
+ return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
1472
802
  }
1473
- o();
1474
- const s = n && n.getStyles && n.getStyles() || "", i = n && n.getDesignerClass && n.getDesignerClass() || "", y = w();
1475
- function m() {
1476
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
1477
- }
1478
- function C() {
803
+ function f() {
1479
804
  return !1;
1480
805
  }
1481
- function c() {
1482
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
806
+ function p() {
807
+ return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
1483
808
  }
1484
- function b() {
1485
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
809
+ function s() {
810
+ return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
1486
811
  }
1487
- function f(h) {
1488
- if (!h || !h.value)
812
+ function c(d) {
813
+ if (!d || !d.value)
1489
814
  return null;
1490
- if (h.value.schema && h.value.schema.type === "component")
1491
- return h.value;
1492
- const P = w(h == null ? void 0 : h.value.parent), A = f(P);
1493
- return A || null;
815
+ if (d.value.schema && d.value.schema.type === "component")
816
+ return d.value;
817
+ const h = C(d == null ? void 0 : d.value.parent), T = c(h);
818
+ return T || null;
1494
819
  }
1495
- function u(h = e) {
1496
- const { componentInstance: P, designerItemElementRef: A } = h;
1497
- return !P || !P.value ? null : P.value.canMove ? A : u(h.parent);
820
+ function l(d = e) {
821
+ const { componentInstance: h, designerItemElementRef: T } = d;
822
+ return !h || !h.value ? null : h.value.canMove ? T : l(d.parent);
1498
823
  }
1499
- function g(h) {
1500
- return !!n && n.canAccepts(h);
824
+ function u(d) {
825
+ return !!t && t.canAccepts(d);
1501
826
  }
1502
- function r() {
827
+ function m() {
1503
828
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
1504
829
  }
1505
- function l() {
1506
- }
1507
- function a(h, P) {
1508
- P && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(P);
1509
- }
1510
- function p(h, P) {
1511
- const { componentType: A } = h;
1512
- let k = $(A, h, P);
1513
- n && n.onResolveNewComponentSchema && (k = n.onResolveNewComponentSchema(h, k));
1514
- const E = A.toLowerCase().replace("-", "_");
1515
- return k && !k.id && k.type === A && (k.id = `${E}_${Math.random().toString().slice(2, 6)}`), k;
1516
- }
1517
- function j(h, P) {
1518
- const A = String(h.getAttribute("data-controltype")), k = h.getAttribute("data-feature"), E = k ? JSON.parse(k) : {};
1519
- E.parentComponentInstance = y.value;
1520
- let D = $(A, E);
1521
- n && n.onAcceptNewChildElement && (D = n.onAcceptNewChildElement(h, P, D));
1522
- const N = A.toLowerCase().replace("-", "_");
1523
- return D && !D.id && D.type === A && (D.id = `${N}_${Math.random().toString().slice(2, 6)}`), D;
1524
- }
1525
- function d(h) {
830
+ function y() {
1526
831
  }
1527
- function v(...h) {
1528
- if (n && n.getPropsConfig)
1529
- return n.getPropsConfig(...h);
832
+ function w(d, h) {
833
+ h && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(h);
834
+ }
835
+ function g(d, h) {
836
+ const { componentType: T } = d;
837
+ let k = $(T, d, h);
838
+ t && t.onResolveNewComponentSchema && (k = t.onResolveNewComponentSchema(d, k));
839
+ const W = T.toLowerCase().replace(/-/g, "_");
840
+ return k && !k.id && k.type === T && (k.id = `${W}_${Math.random().toString().slice(2, 6)}`), k;
841
+ }
842
+ function M(d) {
843
+ }
844
+ function A(...d) {
845
+ if (t && t.getPropsConfig)
846
+ return t.getPropsConfig(...d);
847
+ }
848
+ function S() {
849
+ t && t.onRemoveComponent && t.onRemoveComponent(), e != null && e.schema.contents && e.schema.contents.map((d) => {
850
+ var k;
851
+ let h = d.id;
852
+ d.type === "component-ref" && (h = d.component);
853
+ const T = n.value.querySelector(`#${h}-design-item`);
854
+ (k = T == null ? void 0 : T.componentInstance) != null && k.value.onRemoveComponent && T.componentInstance.value.onRemoveComponent();
855
+ });
1530
856
  }
1531
- return y.value = {
1532
- canMove: m(),
1533
- canSelectParent: C(),
1534
- canDelete: c(),
1535
- canNested: !b(),
857
+ return r.value = {
858
+ canMove: o(),
859
+ canSelectParent: f(),
860
+ canDelete: p(),
861
+ canNested: !s(),
1536
862
  contents: e == null ? void 0 : e.schema.contents,
1537
- elementRef: t,
1538
- parent: (S = e == null ? void 0 : e.parent) == null ? void 0 : S.componentInstance,
863
+ elementRef: n,
864
+ parent: (D = e == null ? void 0 : e.parent) == null ? void 0 : D.componentInstance,
1539
865
  schema: e == null ? void 0 : e.schema,
1540
- styles: s,
866
+ styles: a,
1541
867
  designerClass: i,
1542
- canAccepts: g,
1543
- getBelongedComponentInstance: f,
1544
- getDraggableDesignItemElement: u,
1545
- getDraggingDisplayText: r,
1546
- getPropConfig: v,
1547
- getDragScopeElement: l,
1548
- onAcceptMovedChildElement: a,
1549
- onAcceptNewChildElement: j,
1550
- onChildElementMovedOut: d,
1551
- addNewChildComponentSchema: p,
1552
- updateDragAndDropRules: o,
1553
- triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || w(!1),
1554
- triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || w(!1)
1555
- }, y;
868
+ canAccepts: u,
869
+ getBelongedComponentInstance: c,
870
+ getDraggableDesignItemElement: l,
871
+ getDraggingDisplayText: m,
872
+ getPropConfig: A,
873
+ getDragScopeElement: y,
874
+ onAcceptMovedChildElement: w,
875
+ onChildElementMovedOut: M,
876
+ addNewChildComponentSchema: g,
877
+ triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || C(!1),
878
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || C(!1),
879
+ onRemoveComponent: S
880
+ }, r;
1556
881
  }
1557
- const Ve = /* @__PURE__ */ G({
882
+ const we = /* @__PURE__ */ z({
1558
883
  name: "FSectionDesign",
1559
- props: L,
884
+ props: B,
1560
885
  emits: [],
1561
- setup(t, e) {
1562
- var v;
1563
- const n = w(), o = w();
1564
- let s = w();
1565
- const i = I("design-item-context"), y = Le(i.schema, (v = i.parent) == null ? void 0 : v.schema), m = ze(n, i, y);
1566
- m.value.styles = "display: inherit;", _(() => {
1567
- n.value.componentInstance = m;
1568
- }), e.expose(m.value);
1569
- const C = w(t.customClass), c = T(() => t.enableAccordion), b = w(t.expandStatus), f = T(() => t.buttonPosition), u = w(!1), g = Q(t, e, b, o, s, u), r = z(t, e), l = T(() => {
1570
- const S = {
886
+ setup(n, e) {
887
+ const t = C(), a = C(), i = C(), r = O("designer-host-service"), o = O("design-item-context"), f = Se(o, r), p = Me(t, o, f);
888
+ p.value.styles = "display: inherit;", V(() => {
889
+ t.value.componentInstance = p;
890
+ }), e.expose(p.value);
891
+ const s = C(n.customClass), c = b(() => n.enableAccordion), l = C(n.expandStatus), u = b(() => n.buttonPosition), m = C(!1), y = G(n, e, l, a, i, m), w = F(n, e), g = b(() => {
892
+ const d = {
1571
893
  "f-section": !0,
1572
894
  "f-section-accordion": c.value === "default",
1573
- "f-state-collapse": (c.value === "default" || c.value === "custom") && !b.value,
895
+ "f-state-collapse": (c.value === "default" || c.value === "custom") && !l.value,
1574
896
  "f-section-custom-accordion": c.value === "custom",
1575
- "f-section-fill": t.fill,
1576
- "f-section-maximize": u.value,
897
+ "f-section-fill": n.fill,
898
+ "f-section-maximize": m.value,
1577
899
  "f-utils-fill": !0,
1578
900
  "p-0": !0
1579
901
  };
1580
- return O(S, C.value);
1581
- }), a = T(() => O({
902
+ return L(d, s.value);
903
+ }), M = b(() => L({
1582
904
  "f-section-content": !0,
1583
905
  "drag-container": !0
1584
- }, t.contentClass)), p = T(() => O({
906
+ }, n.contentClass)), A = b(() => L({
1585
907
  "f-section-extend": !0
1586
- }, p.value));
1587
- function j() {
1588
- return e.slots.extend && M("div", {
1589
- class: p.value
908
+ }, A.value));
909
+ function S() {
910
+ return e.slots.extend && v("div", {
911
+ class: A.value
1590
912
  }, [e.slots.extend()]);
1591
913
  }
1592
- function d() {
1593
- return M("div", {
1594
- class: a.value,
1595
- ref: n,
1596
- "data-dragref": `${i.schema.id}-container`
1597
- }, [f.value === "inContent" && r(), e.slots.default && e.slots.default()]);
914
+ function D() {
915
+ return v("div", {
916
+ class: M.value,
917
+ ref: t,
918
+ "data-dragref": `${o.schema.id}-container`
919
+ }, [u.value === "inContent" && w(), e.slots.default && e.slots.default()]);
1598
920
  }
1599
- return () => M("div", {
1600
- class: l.value,
1601
- ref: o
1602
- }, [g(), j(), d()]);
921
+ return () => v("div", {
922
+ class: g.value,
923
+ ref: a,
924
+ style: n.customStyle
925
+ }, [y(), S(), D()]);
1603
926
  }
1604
927
  });
1605
- x.register = (t, e, n, o) => {
1606
- t.section = x, e.section = Z;
928
+ E.register = (n, e, t, a) => {
929
+ n.section = E, e.section = H;
1607
930
  };
1608
- x.registerDesigner = (t, e, n) => {
1609
- t.section = Ve, e.section = Z;
931
+ E.registerDesigner = (n, e, t) => {
932
+ n.section = we, e.section = H;
1610
933
  };
1611
- const Ue = te(x);
934
+ const Ee = Z(E);
1612
935
  export {
1613
- x as Section,
1614
- Ue as default,
1615
- Z as propsResolver,
1616
- L as sectionProps
936
+ E as Section,
937
+ Ee as default,
938
+ H as propsResolver,
939
+ B as sectionProps
1617
940
  };