@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
- var x = Object.defineProperty;
2
- var K = (n, e, t) => e in n ? x(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var M = (n, e, t) => K(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as Y, ref as E, onUnmounted as J, createVNode as k, createTextVNode as Q, watch as I, inject as ee, onMounted as te } from "vue";
5
- import { isPlainObject as _, cloneDeep as R } from "lodash-es";
6
- const X = {}, Z = {};
7
- function $(n) {
8
- const { properties: e, title: t, ignore: r } = n, s = r && Array.isArray(r), l = Object.keys(e).reduce((u, m) => ((!s || !r.find((g) => g == m)) && (u[m] = e[m].type === "object" && e[m].properties ? $(e[m]) : R(e[m].default)), u), {});
9
- return (!s || !r.find((u) => u == "id")) && (l.id = `${t}-${Date.now()}`), l;
1
+ var _ = Object.defineProperty;
2
+ var z = (o, e, t) => e in o ? _(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
3
+ var V = (o, e, t) => z(o, typeof e != "symbol" ? e + "" : e, t);
4
+ import { defineComponent as j, ref as T, onUnmounted as $, createVNode as k, createTextVNode as S, watch as Y, inject as F, onMounted as Q } from "vue";
5
+ import { isPlainObject as N, cloneDeep as R } from "lodash-es";
6
+ const q = {}, G = {};
7
+ function U(o) {
8
+ const { properties: e, title: t, ignore: n } = o, r = n && Array.isArray(n), i = Object.keys(e).reduce((a, f) => ((!r || !n.find((h) => h === f)) && (a[f] = e[f].type === "object" && e[f].properties ? U(e[f]) : R(e[f].default)), a), {});
9
+ if (t && (!r || !n.find((a) => a === "id"))) {
10
+ const a = t.toLowerCase().replace(/-/g, "_");
11
+ i.id = `${a}_${Math.random().toString().slice(2, 6)}`;
12
+ }
13
+ return i;
10
14
  }
11
- function F(n, e = {}, t) {
12
- const r = X[n];
13
- if (r) {
14
- let s = $(r);
15
- const l = Z[n];
16
- return s = l ? l({ getSchemaByType: F }, s, e, t) : s, s;
15
+ function W(o, e = {}, t) {
16
+ const n = q[o];
17
+ if (n) {
18
+ let r = U(n);
19
+ const i = G[o];
20
+ return r = i ? i({ getSchemaByType: W }, r, e, t) : r, r;
17
21
  }
18
22
  return null;
19
23
  }
20
- function oe(n, e) {
21
- const t = $(e);
22
- return Object.keys(n).reduce((r, s) => (r[s] && _(r[s]) && _(n[s]) ? Object.assign(r[s], n[s]) : r[s] = n[s], r), t), t;
24
+ function J(o, e) {
25
+ const t = U(e);
26
+ return Object.keys(t).reduce((n, r) => (n[r] && N(n[r]) && N(o[r] || !o[r]) ? Object.assign(n[r], o[r] || {}) : n[r] = o[r], n), t), t;
23
27
  }
24
- function ne(n, e) {
25
- return Object.keys(n).filter((r) => n[r] != null).reduce((r, s) => {
26
- if (e.has(s)) {
27
- const l = e.get(s);
28
- if (typeof l == "string")
29
- r[l] = n[s];
28
+ function X(o, e) {
29
+ return Object.keys(o).filter((n) => o[n] != null).reduce((n, r) => {
30
+ if (e.has(r)) {
31
+ const i = e.get(r);
32
+ if (typeof i == "string")
33
+ n[i] = o[r];
30
34
  else {
31
- const u = l(s, n[s], n);
32
- Object.assign(r, u);
35
+ const a = i(r, o[r], o);
36
+ Object.assign(n, a);
33
37
  }
34
38
  } else
35
- r[s] = n[s];
36
- return r;
39
+ n[r] = o[r];
40
+ return n;
37
41
  }, {});
38
42
  }
39
- function re(n, e, t = /* @__PURE__ */ new Map()) {
40
- const r = oe(n, e);
41
- return ne(r, t);
43
+ function Z(o, e, t = /* @__PURE__ */ new Map()) {
44
+ const n = J(o, e);
45
+ return X(n, t);
42
46
  }
43
- function ae(n = {}) {
44
- function e(c, f, d, y) {
45
- if (typeof d == "number")
46
- return y[c].length === d;
47
- if (typeof d == "object") {
48
- const j = Object.keys(d)[0], i = d[j];
49
- if (j === "not")
50
- return Number(y[c].length) !== Number(i);
51
- if (j === "moreThan")
52
- return Number(y[c].length) >= Number(i);
53
- if (j === "lessThan")
54
- return Number(y[c].length) <= Number(i);
47
+ function K(o = {}) {
48
+ function e(c, p, u, d) {
49
+ if (typeof u == "number")
50
+ return d[c].length === u;
51
+ if (typeof u == "object") {
52
+ const y = Object.keys(u)[0], v = u[y];
53
+ if (y === "not")
54
+ return Number(d[c].length) !== Number(v);
55
+ if (y === "moreThan")
56
+ return Number(d[c].length) >= Number(v);
57
+ if (y === "lessThan")
58
+ return Number(d[c].length) <= Number(v);
55
59
  }
56
60
  return !1;
57
61
  }
58
- function t(c, f, d, y) {
59
- return y[c] && y[c].propertyValue && String(y[c].propertyValue.value) === String(d);
62
+ function t(c, p, u, d) {
63
+ return d[c] && d[c].propertyValue && String(d[c].propertyValue.value) === String(u);
60
64
  }
61
- const r = /* @__PURE__ */ new Map([
65
+ const n = /* @__PURE__ */ new Map([
62
66
  ["length", e],
63
67
  ["getProperty", t]
64
68
  ]);
65
- Object.keys(n).reduce((c, f) => (c.set(f, n[f]), c), r);
66
- function s(c, f) {
67
- const d = c;
68
- return typeof f == "number" ? [{ target: d, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: d, operator: "getProperty", param: c, value: !!f }] : typeof f == "object" ? Object.keys(f).map((y) => {
69
- if (y === "length")
70
- return { target: d, operator: "length", param: null, value: f[y] };
71
- const j = y, i = f[y];
72
- return { target: d, operator: "getProperty", param: j, value: i };
69
+ Object.keys(o).reduce((c, p) => (c.set(p, o[p]), c), n);
70
+ function r(c, p) {
71
+ const u = c;
72
+ return typeof p == "number" ? [{ target: u, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: u, operator: "getProperty", param: c, value: !!p }] : typeof p == "object" ? Object.keys(p).map((d) => {
73
+ if (d === "length")
74
+ return { target: u, operator: "length", param: null, value: p[d] };
75
+ const y = d, v = p[d];
76
+ return { target: u, operator: "getProperty", param: y, value: v };
73
77
  }) : [];
74
78
  }
75
- function l(c) {
76
- return Object.keys(c).reduce((d, y) => {
77
- const j = s(y, c[y]);
78
- return d.push(...j), d;
79
+ function i(c) {
80
+ return Object.keys(c).reduce((u, d) => {
81
+ const y = r(d, c[d]);
82
+ return u.push(...y), u;
79
83
  }, []);
80
84
  }
81
- function u(c, f) {
82
- if (r.has(c.operator)) {
83
- const d = r.get(c.operator);
84
- return d && d(c.target, c.param, c.value, f) || !1;
85
+ function a(c, p) {
86
+ if (n.has(c.operator)) {
87
+ const u = n.get(c.operator);
88
+ return u && u(c.target, c.param, c.value, p) || !1;
85
89
  }
86
90
  return !1;
87
91
  }
88
- function m(c, f) {
89
- return l(c).reduce((j, i) => j && u(i, f), !0);
92
+ function f(c, p) {
93
+ return i(c).reduce((y, v) => y && a(v, p), !0);
90
94
  }
91
- function g(c, f) {
92
- const d = Object.keys(c), y = d.includes("allOf"), j = d.includes("anyOf"), i = y || j, a = (i ? c[i ? y ? "allOf" : "anyOf" : "allOf"] : [c]).map((b) => m(b, f));
93
- return y ? !a.includes(!1) : a.includes(!0);
95
+ function h(c, p) {
96
+ const u = Object.keys(c), d = u.includes("allOf"), y = u.includes("anyOf"), v = d || y, l = (v ? c[v ? d ? "allOf" : "anyOf" : "allOf"] : [c]).map((C) => f(C, p));
97
+ return d ? !l.includes(!1) : l.includes(!0);
94
98
  }
95
- return { parseValueSchema: g };
99
+ return { parseValueSchema: h };
96
100
  }
97
- const ie = {
101
+ const I = {
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,19 +136,20 @@ const ie = {
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
- }, se = {}, ce = {};
137
- ae();
138
- function pe(n, e, t = /* @__PURE__ */ new Map(), r = (u, m, g) => m, s = {}, l = (u) => u) {
139
- return X[e.title] = e, Z[e.title] = r, se[e.title] = s, ce[e.title] = l, (u = {}) => {
140
- const m = re(u, e, t), g = Object.keys(n).reduce((c, f) => (c[f] = n[f].default, c), {});
141
- return Object.assign(g, m);
139
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
140
+ "query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
141
+ }, H = {}, x = {};
142
+ K();
143
+ function ee(o, e, t = /* @__PURE__ */ new Map(), n = (a, f, h, c) => f, r = {}, i = (a) => a) {
144
+ return q[e.title] = e, G[e.title] = n, H[e.title] = r, x[e.title] = i, (a = {}) => {
145
+ const f = Z(a, e, t), h = Object.keys(o).reduce((c, p) => (c[p] = o[p].default, c), {});
146
+ return Object.assign(h, f);
142
147
  };
143
148
  }
144
- function le(n, e) {
149
+ function te(o, e) {
145
150
  return { customClass: e.class, customStyle: e.style };
146
151
  }
147
- const ue = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-design.gitee.io/video.schema.json", fe = "video", ye = "A Farris Video Component", he = "object", me = {
152
+ const oe = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-design.gitee.io/video.schema.json", ae = "video", re = "A Farris Video Component", ie = "object", ce = {
148
153
  id: {
149
154
  description: "The unique identifier for a Video",
150
155
  type: "string"
@@ -172,24 +177,24 @@ const ue = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-
172
177
  type: "boolean",
173
178
  default: !0
174
179
  }
175
- }, be = [
180
+ }, se = [
176
181
  "id",
177
182
  "type"
178
- ], ge = {
179
- $schema: ue,
180
- $id: de,
181
- title: fe,
182
- description: ye,
183
- type: he,
184
- properties: me,
185
- required: be
186
- }, je = /* @__PURE__ */ new Map([
187
- ["appearance", le]
183
+ ], le = {
184
+ $schema: oe,
185
+ $id: ne,
186
+ title: ae,
187
+ description: re,
188
+ type: ie,
189
+ properties: ce,
190
+ required: se
191
+ }, pe = /* @__PURE__ */ new Map([
192
+ ["appearance", te]
188
193
  ]);
189
- function ve(n, e, t) {
194
+ function ue(o, e, t) {
190
195
  return e;
191
196
  }
192
- const Pe = "verify-detail", Ce = "A Farris Component", we = "object", Me = {
197
+ const de = "verify-detail", fe = "A Farris Component", me = "object", he = {
193
198
  basic: {
194
199
  description: "Basic Infomation",
195
200
  title: "基本信息",
@@ -211,12 +216,12 @@ const Pe = "verify-detail", Ce = "A Farris Component", we = "object", Me = {
211
216
  }
212
217
  }
213
218
  }
214
- }, Ae = {
215
- title: Pe,
216
- description: Ce,
217
- type: we,
218
- categories: Me
219
- }, L = {
219
+ }, ye = {
220
+ title: de,
221
+ description: fe,
222
+ type: me,
223
+ categories: he
224
+ }, A = {
220
225
  src: {
221
226
  type: String,
222
227
  required: !0,
@@ -253,973 +258,326 @@ const Pe = "verify-detail", Ce = "A Farris Component", we = "object", Me = {
253
258
  type: [String, Number],
254
259
  default: 168
255
260
  }
256
- }, z = pe(L, ge, je, ve, Ae);
257
- function Te(n, e) {
258
- function t(o) {
259
- o.stopPropagation(), e.emit("abort");
261
+ }, O = ee(A, le, pe, ue, ye);
262
+ function ge(o, e) {
263
+ function t(s) {
264
+ s.stopPropagation(), e.emit("abort");
260
265
  }
261
- function r(o) {
262
- o.stopPropagation(), e.emit("play");
266
+ function n(s) {
267
+ s.stopPropagation(), e.emit("play");
263
268
  }
264
- function s(o) {
265
- o.stopPropagation(), e.emit("pause");
269
+ function r(s) {
270
+ s.stopPropagation(), e.emit("pause");
266
271
  }
267
- function l(o) {
268
- o.stopPropagation(), e.emit("ended");
272
+ function i(s) {
273
+ s.stopPropagation(), e.emit("ended");
269
274
  }
270
- function u(o) {
271
- o.stopPropagation(), e.emit("durationchange");
275
+ function a(s) {
276
+ s.stopPropagation(), e.emit("durationchange");
272
277
  }
273
- function m(o) {
274
- o.stopPropagation(), e.emit("error");
278
+ function f(s) {
279
+ s.stopPropagation(), e.emit("error");
275
280
  }
276
- function g(o) {
277
- o.stopPropagation(), e.emit("loadeddata");
281
+ function h(s) {
282
+ s.stopPropagation(), e.emit("loadeddata");
278
283
  }
279
- function c(o) {
280
- o.stopPropagation(), e.emit("loadedmetadata");
284
+ function c(s) {
285
+ s.stopPropagation(), e.emit("loadedmetadata");
281
286
  }
282
- function f(o) {
283
- o.stopPropagation(), e.emit("loadstart");
287
+ function p(s) {
288
+ s.stopPropagation(), e.emit("loadstart");
284
289
  }
285
- function d(o) {
286
- o.stopPropagation(), e.emit("playing");
290
+ function u(s) {
291
+ s.stopPropagation(), e.emit("playing");
287
292
  }
288
- function y(o) {
289
- o.stopPropagation(), e.emit("progress");
293
+ function d(s) {
294
+ s.stopPropagation(), e.emit("progress");
290
295
  }
291
- function j(o) {
292
- o.stopPropagation(), e.emit("timeupdate");
296
+ function y(s) {
297
+ s.stopPropagation(), e.emit("timeupdate");
293
298
  }
294
- function i(o) {
295
- o.stopPropagation(), e.emit("volumechange");
299
+ function v(s) {
300
+ s.stopPropagation(), e.emit("volumechange");
296
301
  }
297
- function p(o) {
298
- o.stopPropagation(), e.emit("canplay");
302
+ function g(s) {
303
+ s.stopPropagation(), e.emit("canplay");
299
304
  }
300
305
  return {
301
306
  onAbort: t,
302
- onPlay: r,
303
- onPause: s,
304
- onEnded: l,
305
- onDurationchange: u,
306
- onError: m,
307
- onLoadeddata: g,
307
+ onPlay: n,
308
+ onPause: r,
309
+ onEnded: i,
310
+ onDurationchange: a,
311
+ onError: f,
312
+ onLoadeddata: h,
308
313
  onLoadedmetadata: c,
309
- onLoadstart: f,
310
- onPlaying: d,
311
- onProgress: y,
312
- onTimeupdate: j,
313
- onVolumechange: i,
314
- onCanplay: p
314
+ onLoadstart: p,
315
+ onPlaying: u,
316
+ onProgress: d,
317
+ onTimeupdate: y,
318
+ onVolumechange: v,
319
+ onCanplay: g
315
320
  };
316
321
  }
317
- const N = /* @__PURE__ */ Y({
322
+ const B = /* @__PURE__ */ j({
318
323
  name: "FVideo",
319
- props: L,
324
+ props: A,
320
325
  emits: ["abort", "play", "pause", "ended", "durationchange", "canplay", "error", "loadeddata", "loadedmetadata", "loadstart", "playing", "progress", "timeupdate", "volumechange"],
321
- setup(n, e) {
322
- const t = E(), {
323
- onAbort: r,
324
- onPlay: s,
325
- onPause: l,
326
- onEnded: u,
327
- onDurationchange: m,
328
- onError: g,
326
+ setup(o, e) {
327
+ const t = T(), {
328
+ onAbort: n,
329
+ onPlay: r,
330
+ onPause: i,
331
+ onEnded: a,
332
+ onDurationchange: f,
333
+ onError: h,
329
334
  onLoadeddata: c,
330
- onLoadedmetadata: f,
331
- onLoadstart: d,
332
- onPlaying: y,
333
- onProgress: j,
334
- onTimeupdate: i,
335
- onVolumechange: p,
336
- onCanplay: o
337
- } = Te(n, e);
338
- return J(() => {
335
+ onLoadedmetadata: p,
336
+ onLoadstart: u,
337
+ onPlaying: d,
338
+ onProgress: y,
339
+ onTimeupdate: v,
340
+ onVolumechange: g,
341
+ onCanplay: s
342
+ } = ge(o, e);
343
+ return $(() => {
339
344
  }), () => k("video", {
340
345
  ref: t,
341
- src: n.src,
342
- autoplay: n.autoplay,
343
- controls: n.controls,
344
- loop: n.loop,
345
- muted: n.muted,
346
- width: n.width,
347
- height: n.height,
348
- poster: n.poster,
349
- onAbort: (a) => r(a),
350
- onPlay: (a) => s(a),
351
- onPause: (a) => l(a),
352
- onEnded: (a) => u(a),
353
- onDurationchange: (a) => m(a),
354
- onError: (a) => g(a),
355
- onLoadeddata: (a) => c(a),
356
- onLoadedmetadata: (a) => f(a),
357
- onLoadstart: (a) => d(a),
358
- onPlaying: (a) => y(a),
359
- onProgress: (a) => j(a),
360
- onTimeupdate: (a) => i(a),
361
- onVolumechange: (a) => p(a),
362
- onCanplay: (a) => o(a)
363
- }, [Q("Your browser does not support the video tag.")]);
346
+ src: o.src,
347
+ autoplay: o.autoplay,
348
+ controls: o.controls,
349
+ loop: o.loop,
350
+ muted: o.muted,
351
+ width: o.width,
352
+ height: o.height,
353
+ poster: o.poster,
354
+ onAbort: (l) => n(l),
355
+ onPlay: (l) => r(l),
356
+ onPause: (l) => i(l),
357
+ onEnded: (l) => a(l),
358
+ onDurationchange: (l) => f(l),
359
+ onError: (l) => h(l),
360
+ onLoadeddata: (l) => c(l),
361
+ onLoadedmetadata: (l) => p(l),
362
+ onLoadstart: (l) => u(l),
363
+ onPlaying: (l) => d(l),
364
+ onProgress: (l) => y(l),
365
+ onTimeupdate: (l) => v(l),
366
+ onVolumechange: (l) => g(l),
367
+ onCanplay: (l) => s(l)
368
+ }, [S("Your browser does not support the video tag.")]);
364
369
  }
365
370
  });
366
- function Ee(n, e, t) {
367
- var V;
368
- function r() {
369
- t != null && t.resolveComponentContext && t.resolveComponentContext();
370
- }
371
- r();
372
- const s = t && t.getStyles && t.getStyles() || "", l = t && t.getDesignerClass && t.getDesignerClass() || "", u = E();
373
- function m() {
371
+ function ve(o, e, t) {
372
+ var E;
373
+ const n = t && t.getStyles && t.getStyles() || "", r = t && t.getDesignerClass && t.getDesignerClass() || "", i = T();
374
+ function a() {
374
375
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
375
376
  }
376
- function g() {
377
+ function f() {
377
378
  return !1;
378
379
  }
379
- function c() {
380
+ function h() {
380
381
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
381
382
  }
382
- function f() {
383
+ function c() {
383
384
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
384
385
  }
385
- function d(h) {
386
- if (!h || !h.value)
386
+ function p(m) {
387
+ if (!m || !m.value)
387
388
  return null;
388
- if (h.value.schema && h.value.schema.type === "component")
389
- return h.value;
390
- const P = E(h == null ? void 0 : h.value.parent), C = d(P);
391
- return C || null;
389
+ if (m.value.schema && m.value.schema.type === "component")
390
+ return m.value;
391
+ const w = T(m == null ? void 0 : m.value.parent), M = p(w);
392
+ return M || null;
392
393
  }
393
- function y(h = e) {
394
- const { componentInstance: P, designerItemElementRef: C } = h;
395
- return !P || !P.value ? null : P.value.canMove ? C : y(h.parent);
394
+ function u(m = e) {
395
+ const { componentInstance: w, designerItemElementRef: M } = m;
396
+ return !w || !w.value ? null : w.value.canMove ? M : u(m.parent);
396
397
  }
397
- function j(h) {
398
- return !!t && t.canAccepts(h);
398
+ function d(m) {
399
+ return !!t && t.canAccepts(m);
399
400
  }
400
- function i() {
401
+ function y() {
401
402
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
402
403
  }
403
- function p() {
404
+ function v() {
404
405
  }
405
- function o(h, P) {
406
- P && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(P);
406
+ function g(m, w) {
407
+ w && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(w);
407
408
  }
408
- function a(h, P) {
409
- const { componentType: C } = h;
410
- let A = F(C, h, P);
411
- t && t.onResolveNewComponentSchema && (A = t.onResolveNewComponentSchema(h, A));
412
- const O = C.toLowerCase().replace("-", "_");
413
- return A && !A.id && A.type === C && (A.id = `${O}_${Math.random().toString().slice(2, 6)}`), A;
409
+ function s(m, w) {
410
+ const { componentType: M } = m;
411
+ let P = W(M, m, w);
412
+ t && t.onResolveNewComponentSchema && (P = t.onResolveNewComponentSchema(m, P));
413
+ const D = M.toLowerCase().replace(/-/g, "_");
414
+ return P && !P.id && P.type === M && (P.id = `${D}_${Math.random().toString().slice(2, 6)}`), P;
414
415
  }
415
- function v(h, P) {
416
- const C = String(h.getAttribute("data-controltype")), A = h.getAttribute("data-feature"), O = A ? JSON.parse(A) : {};
417
- O.parentComponentInstance = u.value;
418
- let T = F(C, O);
419
- t && t.onAcceptNewChildElement && (T = t.onAcceptNewChildElement(h, P, T));
420
- const D = C.toLowerCase().replace("-", "_");
421
- return T && !T.id && T.type === C && (T.id = `${D}_${Math.random().toString().slice(2, 6)}`), T;
416
+ function l(m) {
422
417
  }
423
- function b(h) {
424
- }
425
- function w(...h) {
418
+ function b(...m) {
426
419
  if (t && t.getPropsConfig)
427
- return t.getPropsConfig(...h);
420
+ return t.getPropsConfig(...m);
421
+ }
422
+ function C() {
423
+ t && t.onRemoveComponent && t.onRemoveComponent(), e != null && e.schema.contents && e.schema.contents.map((m) => {
424
+ var P;
425
+ let w = m.id;
426
+ m.type === "component-ref" && (w = m.component);
427
+ const M = o.value.querySelector(`#${w}-design-item`);
428
+ (P = M == null ? void 0 : M.componentInstance) != null && P.value.onRemoveComponent && M.componentInstance.value.onRemoveComponent();
429
+ });
428
430
  }
429
- return u.value = {
430
- canMove: m(),
431
- canSelectParent: g(),
432
- canDelete: c(),
433
- canNested: !f(),
431
+ return i.value = {
432
+ canMove: a(),
433
+ canSelectParent: f(),
434
+ canDelete: h(),
435
+ canNested: !c(),
434
436
  contents: e == null ? void 0 : e.schema.contents,
435
- elementRef: n,
436
- parent: (V = e == null ? void 0 : e.parent) == null ? void 0 : V.componentInstance,
437
+ elementRef: o,
438
+ parent: (E = e == null ? void 0 : e.parent) == null ? void 0 : E.componentInstance,
437
439
  schema: e == null ? void 0 : e.schema,
438
- styles: s,
439
- designerClass: l,
440
- canAccepts: j,
441
- getBelongedComponentInstance: d,
442
- getDraggableDesignItemElement: y,
443
- getDraggingDisplayText: i,
444
- getPropConfig: w,
445
- getDragScopeElement: p,
446
- onAcceptMovedChildElement: o,
447
- onAcceptNewChildElement: v,
448
- onChildElementMovedOut: b,
449
- addNewChildComponentSchema: a,
450
- updateDragAndDropRules: r,
451
- triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || E(!1),
452
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || E(!1)
453
- }, u;
440
+ styles: n,
441
+ designerClass: r,
442
+ canAccepts: d,
443
+ getBelongedComponentInstance: p,
444
+ getDraggableDesignItemElement: u,
445
+ getDraggingDisplayText: y,
446
+ getPropConfig: b,
447
+ getDragScopeElement: v,
448
+ onAcceptMovedChildElement: g,
449
+ onChildElementMovedOut: l,
450
+ addNewChildComponentSchema: s,
451
+ triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || T(!1),
452
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || T(!1),
453
+ onRemoveComponent: C
454
+ }, i;
454
455
  }
455
- const Ve = "https://json-schema.org/draft/2020-12/schema", Oe = "https://farris-design.gitee.io/dragging-rules.schema.json", De = "Dragging Rules", Se = "The rules of designer canvas", Ne = "object", Be = {
456
- "f-page": {
457
- description: "The root class of page designed by farris.",
458
- type: "object",
459
- properties: {
460
- contents: {
461
- type: "object",
462
- properties: {
463
- "f-page-header": {
464
- description: "The class of page header designed by farris.",
465
- type: "string"
466
- },
467
- "f-page-main": {
468
- description: "The class of page body designed by farris.",
469
- type: "object",
470
- properties: {
471
- contents: {
472
- type: "object",
473
- properties: {
474
- "f-struct-like-card": {
475
- description: "",
476
- type: "object",
477
- properties: {
478
- contents: {
479
- type: "object",
480
- properties: {
481
- "f-struct-form": {
482
- description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
483
- type: "object",
484
- properties: {
485
- contents: {
486
- type: "object",
487
- properties: {
488
- "f-section-form": {
489
- description: "The class of section which has wrapped a reponse-form component.",
490
- type: "object",
491
- properties: {
492
- contents: {
493
- type: "object",
494
- properties: {
495
- "f-form-layout": {
496
- description: "The class of reponse form",
497
- type: "object",
498
- properties: {
499
- rules: {
500
- type: "object",
501
- properties: {
502
- canAccept: {
503
- type: "boolean",
504
- const: !0
505
- },
506
- fixed: {
507
- type: "boolean",
508
- const: !0
509
- },
510
- hidePadding: {
511
- type: "boolean",
512
- const: !1
513
- }
514
- }
515
- }
516
- }
517
- }
518
- }
519
- },
520
- rules: {
521
- type: "object",
522
- properties: {
523
- canAccept: {
524
- type: "boolean",
525
- const: !1
526
- },
527
- fixed: {
528
- type: "boolean",
529
- const: !0
530
- },
531
- hidePadding: {
532
- type: "boolean",
533
- const: !0
534
- }
535
- }
536
- }
537
- }
538
- }
539
- }
540
- },
541
- rules: {
542
- type: "object",
543
- properties: {
544
- canAccept: {
545
- type: "boolean",
546
- const: !1
547
- },
548
- fixed: {
549
- type: "boolean",
550
- const: !1
551
- },
552
- hidePadding: {
553
- type: "boolean",
554
- const: !0
555
- }
556
- }
557
- }
558
- }
559
- },
560
- "f-struct-wrapper": {
561
- description: "",
562
- type: "object",
563
- properties: {
564
- contents: {
565
- type: "object",
566
- properties: {
567
- "f-section-tabs": {
568
- description: "The class of section which has wrapped sub-grid tabs.",
569
- type: "object",
570
- properties: {
571
- contents: {
572
- type: "object",
573
- properties: {
574
- "f-tabs-in-card": {
575
- description: "The class of tabs which contains sub-grid.",
576
- type: "object",
577
- properties: {
578
- contents: {
579
- type: "object",
580
- properties: {
581
- "f-struct-data-grid-in-card": {
582
- description: "The class of sub-grid component",
583
- type: "object",
584
- properties: {
585
- contents: {
586
- type: "object",
587
- properties: {
588
- "f-grid-is-sub": {
589
- description: "The class of sub-grid",
590
- type: "object",
591
- properties: {
592
- rules: {
593
- type: "object",
594
- properties: {
595
- canAccept: {
596
- type: "boolean",
597
- const: !0
598
- },
599
- fixed: {
600
- type: "boolean",
601
- const: !0
602
- },
603
- hidePadding: {
604
- type: "boolean",
605
- const: !1
606
- }
607
- }
608
- }
609
- }
610
- }
611
- }
612
- },
613
- rules: {
614
- type: "object",
615
- properties: {
616
- canAccept: {
617
- type: "boolean",
618
- const: !1
619
- },
620
- fixed: {
621
- type: "boolean",
622
- const: !1
623
- },
624
- hidePadding: {
625
- type: "boolean",
626
- const: !0
627
- }
628
- }
629
- }
630
- }
631
- }
632
- }
633
- },
634
- rules: {
635
- type: "object",
636
- properties: {
637
- canAccept: {
638
- type: "boolean",
639
- const: !1
640
- },
641
- fixed: {
642
- type: "boolean",
643
- const: !0
644
- },
645
- hidePadding: {
646
- type: "boolean",
647
- const: !0
648
- }
649
- }
650
- }
651
- }
652
- }
653
- }
654
- },
655
- rules: {
656
- type: "object",
657
- properties: {
658
- canAccept: {
659
- type: "boolean",
660
- const: !1
661
- },
662
- fixed: {
663
- type: "boolean",
664
- const: !0
665
- },
666
- hidePadding: {
667
- type: "boolean",
668
- const: !0
669
- }
670
- }
671
- }
672
- }
673
- },
674
- "f-section-in-main": {
675
- description: "The class of section which has wrapped a reponse-form component.",
676
- type: "object",
677
- properties: {
678
- rules: {
679
- type: "object",
680
- properties: {
681
- canAccept: {
682
- type: "boolean",
683
- const: !0
684
- },
685
- fixed: {
686
- type: "boolean",
687
- const: !0
688
- },
689
- hidePadding: {
690
- type: "boolean",
691
- const: !1
692
- }
693
- }
694
- }
695
- }
696
- }
697
- }
698
- },
699
- rules: {
700
- type: "object",
701
- properties: {
702
- canAccept: {
703
- type: "boolean",
704
- const: !1
705
- },
706
- fixed: {
707
- type: "boolean",
708
- const: !1
709
- },
710
- hidePadding: {
711
- type: "boolean",
712
- const: !0
713
- }
714
- }
715
- }
716
- }
717
- }
718
- }
719
- },
720
- rules: {
721
- type: "object",
722
- properties: {
723
- canAccept: {
724
- type: "boolean",
725
- const: !0
726
- },
727
- fixed: {
728
- type: "boolean",
729
- const: !0
730
- },
731
- hidePadding: {
732
- type: "object",
733
- const: {
734
- allOf: [
735
- {
736
- sibling: 0,
737
- parent: {
738
- "f-page-main": !0
739
- }
740
- }
741
- ]
742
- }
743
- }
744
- }
745
- }
746
- }
747
- },
748
- "f-struct-data-grid": {
749
- description: "",
750
- type: "object",
751
- properties: {
752
- rules: {
753
- type: "object",
754
- properties: {
755
- canAccept: {
756
- type: "object",
757
- const: !0
758
- },
759
- fixed: {
760
- type: "boolean",
761
- const: !0
762
- },
763
- hidePadding: {
764
- type: "boolean",
765
- const: !0
766
- }
767
- }
768
- }
769
- }
770
- },
771
- "f-page-main-content": {
772
- description: "",
773
- type: "object",
774
- properties: {
775
- contents: {
776
- type: "object",
777
- properties: {
778
- "f-page-content-nav": {
779
- description: "",
780
- type: "object",
781
- properties: {
782
- contents: {
783
- type: "object",
784
- properties: {
785
- "f-struct-data-grid-in-nav": {
786
- description: "",
787
- type: "object",
788
- properties: {
789
- contents: {
790
- type: "object",
791
- properties: {
792
- "f-page-content-nav-extend": {
793
- description: "",
794
- type: "object"
795
- },
796
- "f-section-in-nav": {
797
- description: "",
798
- type: "object",
799
- properties: {
800
- rules: {
801
- type: "object",
802
- properties: {
803
- canAccept: {
804
- type: "boolean",
805
- const: !1
806
- },
807
- fixed: {
808
- type: "boolean",
809
- const: !0
810
- },
811
- hidePadding: {
812
- type: "boolean",
813
- const: !1
814
- }
815
- }
816
- }
817
- }
818
- }
819
- }
820
- },
821
- rules: {
822
- type: "object",
823
- properties: {
824
- canAccept: {
825
- type: "boolean",
826
- const: !0
827
- },
828
- fixed: {
829
- type: "boolean",
830
- const: !1
831
- },
832
- hidePadding: {
833
- type: "boolean",
834
- const: !0
835
- }
836
- }
837
- }
838
- }
839
- }
840
- }
841
- }
842
- }
843
- },
844
- "f-page-content-main": {
845
- description: "",
846
- type: "object",
847
- properties: {}
848
- }
849
- }
850
- }
851
- }
852
- },
853
- "f-page-content": {
854
- description: "",
855
- type: "object",
856
- properties: {
857
- contents: {
858
- type: "object",
859
- properties: {
860
- "f-page-content-nav": {
861
- description: "",
862
- type: "object",
863
- properties: {
864
- contents: {
865
- type: "object",
866
- properties: {
867
- "f-list-nav": {
868
- description: "",
869
- type: "object"
870
- },
871
- "f-list-nav-left": {
872
- description: "",
873
- type: "object"
874
- },
875
- "f-struct-data-grid-in-nav": {
876
- description: "",
877
- type: "object",
878
- properties: {
879
- contents: {
880
- type: "object",
881
- properties: {
882
- "f-section-form": {
883
- description: "",
884
- type: "object",
885
- properties: {
886
- rules: {
887
- type: "object",
888
- properties: {
889
- canAccept: {
890
- type: "boolean",
891
- const: !1
892
- },
893
- fixed: {
894
- type: "boolean",
895
- const: !0
896
- },
897
- hidePadding: {
898
- type: "boolean",
899
- const: !0
900
- }
901
- }
902
- }
903
- }
904
- },
905
- "f-section-grid": {
906
- description: "",
907
- type: "object",
908
- properties: {
909
- rules: {
910
- type: "object",
911
- properties: {
912
- canAccept: {
913
- type: "boolean",
914
- const: !1
915
- },
916
- fixed: {
917
- type: "boolean",
918
- const: !0
919
- },
920
- hidePadding: {
921
- type: "boolean",
922
- const: !0
923
- }
924
- }
925
- }
926
- }
927
- }
928
- }
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
944
- }
945
- }
946
- }
947
- }
948
- }
949
- }
950
- }
951
- },
952
- rules: {
953
- type: "object",
954
- properties: {
955
- canAccept: {
956
- type: "boolean",
957
- const: !1
958
- },
959
- fixed: {
960
- type: "boolean",
961
- const: !0
962
- },
963
- hidePadding: {
964
- type: "boolean",
965
- const: !0
966
- }
967
- }
968
- }
969
- },
970
- "f-page-content-main": {
971
- description: "",
972
- type: "object",
973
- properties: {
974
- rules: {
975
- type: "object",
976
- properties: {
977
- canAccept: {
978
- type: "boolean",
979
- const: !1
980
- },
981
- fixed: {
982
- type: "boolean",
983
- const: !1
984
- },
985
- hidePadding: {
986
- type: "boolean",
987
- const: !0
988
- }
989
- }
990
- }
991
- }
992
- }
993
- }
994
- },
995
- rules: {
996
- type: "object",
997
- properties: {
998
- canAccept: {
999
- type: "boolean",
1000
- const: !1
1001
- },
1002
- fixed: {
1003
- type: "boolean",
1004
- const: !0
1005
- },
1006
- hidePadding: {
1007
- type: "boolean",
1008
- const: !0
1009
- }
1010
- }
1011
- }
1012
- }
1013
- }
1014
- }
1015
- },
1016
- rules: {
1017
- type: "object",
1018
- properties: {
1019
- canAccept: {
1020
- type: "object",
1021
- const: {
1022
- anyOf: [
1023
- {
1024
- children: 0
1025
- },
1026
- {
1027
- children: {
1028
- length: {
1029
- not: 1
1030
- },
1031
- "f-struct-like-card": !0
1032
- }
1033
- },
1034
- {
1035
- children: {
1036
- "scroll-spy": !1,
1037
- "f-page-content": !1,
1038
- "f-struct-like-card": !1
1039
- }
1040
- }
1041
- ]
1042
- }
1043
- },
1044
- fixed: {
1045
- type: "boolean",
1046
- const: !0
1047
- },
1048
- hidePadding: {
1049
- type: "boolean",
1050
- const: !0
1051
- }
1052
- }
1053
- }
1054
- }
1055
- },
1056
- "f-page-footer": {
1057
- description: "The class of page footer designed by farris.",
1058
- type: "string"
456
+ class be {
457
+ getTemplateRule(e, t) {
458
+ const n = t == null ? void 0 : t.formSchemaUtils, r = n == null ? void 0 : n.getFormTemplateRule(), i = { canAccept: !0, canDelete: !0, canMove: !0 };
459
+ if (!r)
460
+ return i;
461
+ const a = this.getComponentContext(e), { componentClassList: f } = a;
462
+ return f.forEach((h) => {
463
+ if (!h || !r[h])
464
+ return;
465
+ const { canMove: c, canDelete: p, canAccept: u } = r[h];
466
+ i.canMove = i.canMove && this.resolveRuleValue(c, a), i.canDelete = i.canDelete && this.resolveRuleValue(p, a), i.canAccept = i.canAccept && this.resolveRuleValue(u, a);
467
+ }), i;
468
+ }
469
+ resolveRuleValue(e, t) {
470
+ return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, t);
471
+ }
472
+ parseRuleValueSchema(e, t) {
473
+ const n = e.invalidContext || [];
474
+ let r = !0;
475
+ for (const i of n) {
476
+ if (i.firstLevelChild) {
477
+ if (i.firstLevelChild.class) {
478
+ const { firstLevelChildClassList: a } = t;
479
+ if (a && !a.includes(i.firstLevelChild.class)) {
480
+ r = !1;
481
+ continue;
1059
482
  }
1060
483
  }
1061
- },
1062
- rules: {
1063
- type: "object",
1064
- properties: {
1065
- canAccept: {
1066
- type: "boolean",
1067
- const: !1
1068
- },
1069
- fixed: {
1070
- type: "boolean",
1071
- const: !0
1072
- },
1073
- hidePadding: {
1074
- type: "boolean",
1075
- const: !0
484
+ if (i.firstLevelChild.type) {
485
+ const { firstLevelChildSchema: a } = t;
486
+ if (!a || a.type !== i.firstLevelChild.type) {
487
+ r = !1;
488
+ continue;
1076
489
  }
1077
490
  }
1078
491
  }
492
+ if (i.secondLevelChild) {
493
+ if (i.secondLevelChild.class) {
494
+ const { secondLevelChildClassList: a } = t;
495
+ if (a && !a.includes(i.secondLevelChild.class)) {
496
+ r = !1;
497
+ continue;
498
+ }
499
+ }
500
+ if (i.secondLevelChild.type) {
501
+ const { secondLevelChildSchema: a } = t;
502
+ if (!a || a.type !== i.secondLevelChild.type) {
503
+ r = !1;
504
+ continue;
505
+ }
506
+ }
507
+ }
508
+ if (i.parent) {
509
+ if (i.parent.class) {
510
+ const { parentClassList: a } = t;
511
+ if (a && !a.includes(i.parent.class)) {
512
+ r = !1;
513
+ continue;
514
+ }
515
+ }
516
+ if (i.parent.type) {
517
+ const { parentSchema: a } = t;
518
+ if (a && a.type !== i.parent.type) {
519
+ r = !1;
520
+ continue;
521
+ }
522
+ }
523
+ }
524
+ r = !0;
525
+ break;
1079
526
  }
1080
- },
1081
- "f-page-is-managelist": {
1082
- description: "The root class of mangement list page.",
1083
- type: "string"
1084
- },
1085
- "f-page-card": {
1086
- description: "",
1087
- type: "object"
1088
- },
1089
- "f-page-is-mainsubcard": {
1090
- description: "",
1091
- type: "object"
1092
- }
1093
- }, ke = {
1094
- $schema: Ve,
1095
- $id: Oe,
1096
- title: De,
1097
- description: Se,
1098
- type: Ne,
1099
- properties: Be
1100
- }, B = /* @__PURE__ */ new Map();
1101
- function Fe() {
1102
- function n(i, p, o, a) {
1103
- var v;
1104
- if (typeof o == "number")
1105
- return ((v = a[i]) == null ? void 0 : v.length) === o;
1106
- if (typeof o == "object") {
1107
- const b = Object.keys(o)[0], w = o[b];
1108
- if (b === "not")
1109
- return Number(a[i].length) !== Number(w);
1110
- if (b === "moreThan")
1111
- return Number(a[i].length) >= Number(w);
1112
- if (b === "lessThan")
1113
- return Number(a[i].length) <= Number(w);
1114
- }
1115
- return !1;
1116
- }
1117
- function e(i, p, o, a) {
1118
- return typeof o == "boolean" ? a.childrenClassList.includes(p) === !!o : !1;
1119
- }
1120
- function t(i, p, o, a) {
1121
- return typeof o == "boolean" ? a.parentClassList.includes(p) === !!o : !1;
1122
- }
1123
- function r(i, p, o, a) {
1124
- return typeof o == "boolean" ? a.parentClassList.includes(p) === !!o : !1;
1125
- }
1126
- const s = /* @__PURE__ */ new Map([
1127
- ["length", n],
1128
- ["hasChildren", e],
1129
- ["hasSibling", r],
1130
- ["hasParent", t]
1131
- ]);
1132
- function l(i, p) {
1133
- const o = i;
1134
- return typeof p == "number" ? [{ target: o, operator: "length", param: null, value: Number(p) }] : typeof p == "object" ? Object.keys(p).map((a) => {
1135
- if (a === "length")
1136
- return { target: o, operator: "length", param: null, value: p[a] };
1137
- const v = a, b = p[a];
1138
- return { target: o, operator: i === "children" ? "hasChildren" : i === "parent" ? "hasParent" : "hasSibling", param: v, value: b };
1139
- }) : [];
1140
- }
1141
- function u(i, p) {
1142
- if (s.has(i.operator)) {
1143
- const o = s.get(i.operator);
1144
- return o && o(i.target, i.param, i.value, p) || !1;
1145
- }
1146
- return !1;
527
+ return !r;
1147
528
  }
1148
- function m(i, p) {
1149
- return Object.keys(i).reduce((b, w) => {
1150
- const V = l(w, i[w]);
1151
- return b.push(...V), b;
1152
- }, []).reduce((b, w) => b && u(w, p), !0);
1153
- }
1154
- function g(i, p) {
1155
- const o = Object.keys(i), a = o.includes("allOf"), v = o.includes("anyOf"), b = a || v, h = (b ? i[b ? a ? "allOf" : "anyOf" : "allOf"] : [i]).map((C) => m(C, p));
1156
- return a ? !h.includes(!1) : h.includes(!0);
1157
- }
1158
- function c(i, p) {
1159
- const o = i.const;
1160
- return o ? typeof o == "boolean" ? o : typeof o == "object" ? g(o, p) : !1 : !1;
1161
- }
1162
- function f(i) {
1163
- return (p) => {
1164
- const o = { canAccept: !0, fixed: !1, hidePadding: !1 };
1165
- return i && i.properties && Object.keys(i.properties).reduce((a, v) => {
1166
- const b = i.properties[v];
1167
- return a[v] = c(b, p), a;
1168
- }, o), o;
529
+ getComponentContext(e) {
530
+ var g, s, l, b;
531
+ const t = e.schema, n = t.appearance && t.appearance.class || "", r = n.split(" ") || [], i = t.contents || [], a = i.length ? i[0] : null, f = a && a.appearance ? a.appearance.class : "", h = f ? f.split(" ") : [], c = (g = a == null ? void 0 : a.contents) != null && g.length ? a == null ? void 0 : a.contents[0] : null, p = c && c.appearance ? c.appearance.class : "", u = p ? p.split(" ") : [], d = t.type === "component" ? (l = (s = e.parent) == null ? void 0 : s.parent) == null ? void 0 : l.schema : (b = e.parent) == null ? void 0 : b.schema, y = d && d.appearance && d.appearance.class || "", v = y ? y.split(" ") : [];
532
+ return {
533
+ componentClass: n,
534
+ componentClassList: r,
535
+ childContents: i,
536
+ firstLevelChildSchema: a,
537
+ firstLevelChildClass: f,
538
+ firstLevelChildClassList: h,
539
+ secondLevelChildSchema: c,
540
+ secondLevelChildClass: p,
541
+ secondLevelChildClassList: u,
542
+ parentSchema: d,
543
+ parentClass: y,
544
+ parentClassList: v
1169
545
  };
1170
546
  }
1171
- function d(i, p, o) {
1172
- if (p.type === "object" && p.properties) {
1173
- const { rules: a, contents: v } = p.properties;
1174
- o.set(i, f(a)), v && Object.keys(v.properties).forEach(
1175
- (b) => d(b, v.properties[b], o)
1176
- );
1177
- }
1178
- }
1179
- function y() {
1180
- const { properties: i } = ke;
1181
- Object.keys(i).forEach((p) => {
1182
- d(p, i[p], B);
1183
- });
1184
- }
1185
- function j(i, p) {
1186
- const o = { canAccept: !0, fixed: !1, hidePadding: !0 };
1187
- return B.has(i) ? B.get(i)(p) : o;
1188
- }
1189
- return y(), { getRuleValue: j };
1190
547
  }
1191
- class $e {
548
+ class Me {
1192
549
  constructor(e, t) {
1193
- M(this, "componentId");
1194
- M(this, "viewModelId");
1195
- M(this, "eventsEditorUtils");
1196
- M(this, "formSchemaUtils");
1197
- M(this, "formMetadataConverter");
1198
- M(this, "designViewModelUtils");
1199
- M(this, "designViewModelField");
1200
- M(this, "controlCreatorUtils");
1201
- M(this, "designerHostService");
1202
- M(this, "schemaService", null);
1203
- M(this, "metadataService", null);
1204
- M(this, "propertyConfig", {
550
+ V(this, "componentId");
551
+ V(this, "viewModelId");
552
+ V(this, "eventsEditorUtils");
553
+ V(this, "formSchemaUtils");
554
+ V(this, "formMetadataConverter");
555
+ V(this, "designViewModelUtils");
556
+ V(this, "designViewModelField");
557
+ V(this, "controlCreatorUtils");
558
+ V(this, "designerHostService");
559
+ V(this, "schemaService", null);
560
+ V(this, "metadataService", null);
561
+ V(this, "propertyConfig", {
1205
562
  type: "object",
1206
563
  categories: {}
1207
564
  });
1208
- var r;
1209
- this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
565
+ var n;
566
+ 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;
1210
567
  }
1211
568
  getTableInfo() {
1212
569
  var e;
1213
570
  return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
1214
571
  }
1215
572
  setDesignViewModelField(e) {
573
+ var n;
1216
574
  const t = e.binding && e.binding.type === "Form" && e.binding.field;
1217
575
  if (t) {
1218
576
  if (!this.designViewModelField) {
1219
577
  const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1220
- this.designViewModelField = r.fields.find((s) => s.id === t);
578
+ this.designViewModelField = r.fields.find((i) => i.id === t);
1221
579
  }
1222
- e.updateOn = this.designViewModelField.updateOn;
580
+ e.updateOn = (n = this.designViewModelField) == null ? void 0 : n.updateOn;
1223
581
  }
1224
582
  }
1225
583
  changeFieldEditorType(e, t) {
@@ -1243,7 +601,7 @@ class $e {
1243
601
  type: "combo-list",
1244
602
  textField: "name",
1245
603
  valueField: "value",
1246
- data: [{ value: e.type, name: ie[e.type].name }]
604
+ data: [{ value: e.type, name: I[e.type].name }]
1247
605
  }
1248
606
  }
1249
607
  }
@@ -1276,14 +634,14 @@ class $e {
1276
634
  * @returns
1277
635
  */
1278
636
  updateElementByParentContainer(e, t) {
1279
- const r = t && t.parent && t.parent.schema;
1280
- if (!r)
637
+ const n = t && t.parent && t.parent.schema;
638
+ if (!n)
1281
639
  return;
1282
- const s = r.contents.findIndex((u) => u.id === e), l = R(r.contents[s]);
1283
- r.contents.splice(s, 1), r.contents.splice(s, 0, l);
640
+ const r = n.contents.findIndex((a) => a.id === e), i = R(n.contents[r]);
641
+ n.contents.splice(r, 1), n.contents.splice(r, 0, i);
1284
642
  }
1285
643
  }
1286
- class Le extends $e {
644
+ class we extends Me {
1287
645
  constructor(e, t) {
1288
646
  super(e, t);
1289
647
  }
@@ -1300,140 +658,147 @@ class Le extends $e {
1300
658
  label: "onAfterViewInit",
1301
659
  name: "视图初始化后事件"
1302
660
  }
1303
- ];
1304
- var r = this;
1305
- const s = r.eventsEditorUtils.formProperties(e, r.viewModelId, t), l = {};
1306
- l[r.viewModelId] = {
661
+ ], n = this, r = n.eventsEditorUtils.formProperties(e, n.viewModelId, t), i = {};
662
+ i[n.viewModelId] = {
1307
663
  type: "events-editor",
1308
664
  editor: {
1309
- initialData: s
665
+ initialData: r
1310
666
  }
1311
667
  }, this.propertyConfig.categories.eventsEditor = {
1312
668
  title: "事件",
1313
669
  hideTitle: !0,
1314
- properties: l,
670
+ properties: i,
1315
671
  // 这个属性,标记当属性变更得时候触发重新更新属性
1316
672
  refreshPanelAfterChanged: !0,
1317
673
  tabId: "commands",
1318
674
  tabName: "交互",
1319
- setPropertyRelates(u, m) {
1320
- const g = u.propertyValue;
1321
- delete e[r.viewModelId], g && (g.setPropertyRelates = this.setPropertyRelates, r.eventsEditorUtils.saveRelatedParameters(e, r.viewModelId, g.events, g));
675
+ setPropertyRelates(a, f) {
676
+ const h = a.propertyValue;
677
+ delete e[n.viewModelId], h && (h.setPropertyRelates = this.setPropertyRelates, n.eventsEditorUtils.saveRelatedParameters(e, n.viewModelId, h.events, h));
1322
678
  }
1323
679
  };
1324
680
  }
1325
681
  }
1326
- function Ue(n, e) {
1327
- const t = Fe();
1328
- let r = !1, s, l = !1;
1329
- const u = !1, m = n.schema;
1330
- function g() {
682
+ function Pe(o, e) {
683
+ const t = new be(), { canMove: n, canDelete: r } = t.getTemplateRule(o, e);
684
+ function i() {
1331
685
  return !1;
1332
686
  }
1333
- function c() {
1334
- return u || !l;
687
+ function a() {
688
+ return r;
1335
689
  }
1336
690
  function f() {
1337
- return !l;
691
+ return n;
1338
692
  }
1339
- function d() {
1340
- var U, G;
1341
- l = !1;
1342
- const i = n.schema, p = i.appearance && i.appearance.class || "", o = p.split(" "), a = i.contents || [], v = a.length ? a[0] : null, b = v && v.appearance ? v.appearance.class : "", w = b ? b.split(" ") : [], V = a.length ? a.reduce((W, S) => {
1343
- const q = S && S.appearance ? S.appearance.class : "", H = q ? q.split(" ") : [];
1344
- return W.push(...H), W;
1345
- }, []) : [];
1346
- if (((G = (U = n.parent) == null ? void 0 : U.schema) == null ? void 0 : G.type) !== "component-ref") {
1347
- r = !0, l = !0;
693
+ function h() {
694
+ return !1;
695
+ }
696
+ function c() {
697
+ return " display: inherit;flex-direction: inherit;margin-bottom:10px";
698
+ }
699
+ function p(g) {
700
+ const s = new we(g, e), { schema: l } = o;
701
+ return s.getPropertyConfig(l);
702
+ }
703
+ function u() {
704
+ var C, E, m, w;
705
+ const g = o == null ? void 0 : o.schema, l = (e == null ? void 0 : e.formSchemaUtils).getViewModelIdByComponentId(g.id);
706
+ if (g.componentType !== "data-grid" && g.componentType !== "form" || !((C = o.componentInstance) != null && C.value.parent))
1348
707
  return;
708
+ const b = (E = o.componentInstance) == null ? void 0 : E.value.parent.schema;
709
+ if ((m = b == null ? void 0 : b.toolbar) != null && m.buttons && b.toolbar.buttons.length) {
710
+ b.toolbar.buttons.forEach((P) => {
711
+ const D = P.onClick, L = D && D.split(".");
712
+ if (!L || L.length < 3)
713
+ return;
714
+ L[L.length - 2] === l && (P.needRemove = !0);
715
+ }), b.toolbar.buttons = b.toolbar.buttons.filter((P) => !P.needRemove);
716
+ const M = (w = o.componentInstance) == null ? void 0 : w.value.parent;
717
+ M.parent && M.parent.updateToolbarItems && M.parent.updateToolbarItems();
718
+ }
719
+ }
720
+ function d() {
721
+ const g = e == null ? void 0 : e.designViewModelUtils, s = e == null ? void 0 : e.formSchemaUtils, l = o == null ? void 0 : o.schema;
722
+ if (g && s) {
723
+ const b = s.getViewModelIdByComponentId(l.id);
724
+ g.deleteViewModelById(b), s.deleteComponent(l.id);
1349
725
  }
1350
- const h = n.parent.parent, P = h && h.schema, C = P && P.appearance ? P.appearance.class : "", A = C ? C.split(" ") : [];
1351
- s = {
1352
- componentClass: p,
1353
- componentClassList: o,
1354
- childContents: a,
1355
- firstChildContent: v,
1356
- firstChildClass: b,
1357
- firstChildClassList: w,
1358
- parent: P,
1359
- parentClass: C,
1360
- parentClassList: A,
1361
- children: a,
1362
- childrenClassList: V
1363
- };
1364
- const { canAccept: O, fixed: T, hidePadding: D } = t.getRuleValue(o[0], s);
1365
- r = D, l = T;
1366
726
  }
1367
727
  function y() {
1368
- return r;
728
+ const g = e == null ? void 0 : e.designViewModelUtils, s = e == null ? void 0 : e.formSchemaUtils, l = o == null ? void 0 : o.schema, b = s.getViewModelIdByComponentId(l.id);
729
+ g.getDgViewModel(b).fields.forEach((C) => {
730
+ if (s.getExpressions() && s.getExpressions().length) {
731
+ const E = s.getExpressions().findIndex((m) => m.fieldId === C.id);
732
+ E > -1 && s.getExpressions().splice(E, 1);
733
+ }
734
+ });
1369
735
  }
1370
- function j(i) {
1371
- return new Le(i, e).getPropertyConfig(m);
736
+ function v() {
737
+ u(), y(), d();
1372
738
  }
1373
- return { canAccepts: g, checkCanDeleteComponent: c, checkCanMoveComponent: f, resolveComponentContext: d, hideNestedPaddingInDesginerView: y, getPropsConfig: j };
739
+ return { canAccepts: i, checkCanDeleteComponent: a, checkCanMoveComponent: f, hideNestedPaddingInDesginerView: h, getStyles: c, getPropsConfig: p, onRemoveComponent: v };
1374
740
  }
1375
- function Ge(n, e) {
1376
- const t = E(n.width), r = E(n.height);
1377
- let s;
1378
- I(e, (u) => {
1379
- u && (t.value = u.clientWidth, s = new ResizeObserver((m) => {
1380
- if (!m || m.length < 1)
741
+ function Ve(o, e) {
742
+ const t = T(o.width), n = T(o.height);
743
+ let r;
744
+ Y(e, (a) => {
745
+ a && (t.value = a.clientWidth, r = new ResizeObserver((f) => {
746
+ if (!f || f.length < 1)
1381
747
  return;
1382
- const c = m[0].contentRect;
748
+ const c = f[0].contentRect;
1383
749
  c && (t.value = c.width);
1384
- }), s.observe(u));
750
+ }), r.observe(a));
1385
751
  });
1386
- function l() {
1387
- s && s.disconnect();
752
+ function i() {
753
+ r && r.disconnect();
1388
754
  }
1389
755
  return {
1390
- destory: l,
756
+ destory: i,
1391
757
  width: t,
1392
- height: r
758
+ height: n
1393
759
  };
1394
760
  }
1395
- const We = /* @__PURE__ */ Y({
761
+ const Ce = /* @__PURE__ */ j({
1396
762
  name: "FVideoDesign",
1397
- props: L,
1398
- setup(n, e) {
1399
- var c;
1400
- const t = E(), r = ee("design-item-context"), s = Ue(r.schema, (c = r.parent) == null ? void 0 : c.schema), l = Ee(t, r, s), {
1401
- width: u,
1402
- height: m,
1403
- destory: g
1404
- } = Ge(n, t);
1405
- return te(() => {
1406
- t.value.componentInstance = l;
1407
- }), J(() => {
1408
- g();
1409
- }), e.expose(l.value), () => k("div", {
763
+ props: A,
764
+ setup(o, e) {
765
+ const t = T(), n = F("design-item-context"), r = F("designer-host-service"), i = Pe(n, r), a = ve(t, n, i), {
766
+ width: f,
767
+ height: h,
768
+ destory: c
769
+ } = Ve(o, t);
770
+ return Q(() => {
771
+ t.value.componentInstance = a;
772
+ }), $(() => {
773
+ c();
774
+ }), e.expose(a.value), () => k("div", {
1410
775
  ref: t,
1411
776
  class: "drag-container",
1412
- "data-dragref": `${r.schema.id}-container`
777
+ "data-dragref": `${n.schema.id}-container`
1413
778
  }, [k("video", {
1414
- src: n.src,
1415
- autoplay: n.autoplay,
1416
- controls: n.controls,
1417
- loop: n.loop,
1418
- muted: n.muted,
1419
- width: u.value,
1420
- height: m.value
1421
- }, [Q("Your browser does not support the video tag.")])]);
1422
- }
1423
- }), Ye = {
1424
- install(n) {
1425
- n.component(N.name, N);
779
+ src: o.src,
780
+ autoplay: o.autoplay,
781
+ controls: o.controls,
782
+ loop: o.loop,
783
+ muted: o.muted,
784
+ width: f.value,
785
+ height: h.value
786
+ }, [S("Your browser does not support the video tag.")])]);
787
+ }
788
+ }), Be = {
789
+ install(o) {
790
+ o.component(B.name, B);
1426
791
  },
1427
- register(n, e, t, r) {
1428
- n.video = N, e.video = z;
792
+ register(o, e, t, n) {
793
+ o.video = B, e.video = O;
1429
794
  },
1430
- registerDesigner(n, e, t) {
1431
- n.video = We, e.video = z;
795
+ registerDesigner(o, e, t) {
796
+ o.video = Ce, e.video = O;
1432
797
  }
1433
798
  };
1434
799
  export {
1435
- N as FVideo,
1436
- Ye as default,
1437
- z as propsResolver,
1438
- L as videoProps
800
+ B as FVideo,
801
+ Be as default,
802
+ O as propsResolver,
803
+ A as videoProps
1439
804
  };