@farris/ui-vue 1.2.9 → 1.3.1

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 (287) hide show
  1. package/components/accordion/index.esm.js +64 -64
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +521 -336
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.css +1 -1
  6. package/components/button-edit/index.esm.js +99 -97
  7. package/components/button-edit/index.umd.cjs +1 -1
  8. package/components/calendar/index.esm.js +496 -504
  9. package/components/calendar/index.umd.cjs +1 -1
  10. package/components/capsule/index.esm.js +251 -259
  11. package/components/capsule/index.umd.cjs +1 -1
  12. package/components/checkbox/index.esm.js +696 -519
  13. package/components/checkbox/index.umd.cjs +1 -1
  14. package/components/color-picker/index.esm.js +368 -376
  15. package/components/color-picker/index.umd.cjs +2 -2
  16. package/components/combo-list/index.css +1 -0
  17. package/components/combo-list/index.esm.js +1141 -340
  18. package/components/combo-list/index.umd.cjs +1 -1
  19. package/components/combo-tree/index.esm.js +116 -116
  20. package/components/combo-tree/index.umd.cjs +1 -1
  21. package/components/common/index.esm.js +986 -798
  22. package/components/common/index.umd.cjs +1 -1
  23. package/components/component/index.esm.js +463 -998
  24. package/components/component/index.umd.cjs +1 -1
  25. package/components/condition/index.css +1 -0
  26. package/components/condition/index.esm.js +2233 -1057
  27. package/components/condition/index.umd.cjs +1 -1
  28. package/components/content-container/index.esm.js +335 -1002
  29. package/components/content-container/index.umd.cjs +1 -1
  30. package/components/data-grid/index.css +1 -1
  31. package/components/data-grid/index.esm.js +6193 -4702
  32. package/components/data-grid/index.umd.cjs +1 -1
  33. package/components/data-view/index.css +1 -0
  34. package/components/data-view/index.esm.js +4562 -3294
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.css +1 -1
  37. package/components/date-picker/index.esm.js +3420 -2623
  38. package/components/date-picker/index.umd.cjs +1 -1
  39. package/components/designer-canvas/index.css +1 -1
  40. package/components/designer-canvas/index.esm.js +914 -883
  41. package/components/designer-canvas/index.umd.cjs +1 -1
  42. package/components/designer-outline/index.esm.js +14 -13
  43. package/components/designer-outline/index.umd.cjs +1 -1
  44. package/components/dropdown/index.esm.js +204 -212
  45. package/components/dropdown/index.umd.cjs +2 -2
  46. package/components/dynamic-form/index.css +1 -0
  47. package/components/dynamic-form/index.esm.js +2795 -1835
  48. package/components/dynamic-form/index.umd.cjs +1 -1
  49. package/components/dynamic-resolver/index.esm.js +180 -130
  50. package/components/dynamic-resolver/index.umd.cjs +1 -1
  51. package/components/dynamic-view/index.esm.js +303 -290
  52. package/components/dynamic-view/index.umd.cjs +1 -1
  53. package/components/events-editor/index.esm.js +328 -336
  54. package/components/events-editor/index.umd.cjs +1 -1
  55. package/components/expression-editor/index.esm.js +65 -65
  56. package/components/expression-editor/index.umd.cjs +1 -1
  57. package/components/external-container/index.css +1 -1
  58. package/components/external-container/index.esm.js +3349 -3626
  59. package/components/external-container/index.umd.cjs +1 -1
  60. package/components/field-selector/index.css +1 -1
  61. package/components/field-selector/index.esm.js +5344 -8588
  62. package/components/field-selector/index.umd.cjs +1 -1
  63. package/components/filter-bar/index.css +1 -1
  64. package/components/filter-bar/index.esm.js +2179 -2227
  65. package/components/filter-bar/index.umd.cjs +1 -1
  66. package/components/flow-canvas/index.css +1 -1
  67. package/components/flow-canvas/index.esm.js +684 -675
  68. package/components/flow-canvas/index.umd.cjs +1 -1
  69. package/components/image-cropper/index.esm.js +482 -490
  70. package/components/image-cropper/index.umd.cjs +1 -1
  71. package/components/input-group/index.esm.js +746 -569
  72. package/components/input-group/index.umd.cjs +1 -1
  73. package/components/layout/index.esm.js +409 -385
  74. package/components/layout/index.umd.cjs +1 -1
  75. package/components/list-nav/index.esm.js +348 -1019
  76. package/components/list-nav/index.umd.cjs +1 -1
  77. package/components/list-view/index.css +1 -1
  78. package/components/list-view/index.esm.js +3606 -2388
  79. package/components/list-view/index.umd.cjs +1 -1
  80. package/components/lookup/index.css +1 -1
  81. package/components/lookup/index.esm.js +10871 -8970
  82. package/components/lookup/index.umd.cjs +1 -1
  83. package/components/mapping-editor/index.css +1 -1
  84. package/components/mapping-editor/index.esm.js +6019 -5631
  85. package/components/mapping-editor/index.umd.cjs +1 -1
  86. package/components/message-box/index.css +1 -1
  87. package/components/message-box/index.esm.js +511 -471
  88. package/components/message-box/index.umd.cjs +1 -1
  89. package/components/modal/index.css +1 -1
  90. package/components/modal/index.esm.js +438 -398
  91. package/components/modal/index.umd.cjs +1 -1
  92. package/components/nav/index.esm.js +912 -1281
  93. package/components/nav/index.umd.cjs +3 -3
  94. package/components/notify/index.esm.js +59 -53
  95. package/components/notify/index.umd.cjs +1 -1
  96. package/components/number-range/index.esm.js +660 -484
  97. package/components/number-range/index.umd.cjs +1 -1
  98. package/components/number-spinner/index.esm.js +682 -506
  99. package/components/number-spinner/index.umd.cjs +1 -1
  100. package/components/order/index.css +1 -1
  101. package/components/order/index.esm.js +1848 -1658
  102. package/components/order/index.umd.cjs +1 -1
  103. package/components/page-footer/index.esm.js +100 -100
  104. package/components/page-footer/index.umd.cjs +1 -1
  105. package/components/page-header/index.esm.js +1120 -1923
  106. package/components/page-header/index.umd.cjs +1 -1
  107. package/components/pagination/index.esm.js +875 -1214
  108. package/components/pagination/index.umd.cjs +1 -1
  109. package/components/popover/index.esm.js +71 -70
  110. package/components/popover/index.umd.cjs +1 -1
  111. package/components/progress/index.esm.js +229 -237
  112. package/components/progress/index.umd.cjs +3 -3
  113. package/components/property-editor/index.css +1 -1
  114. package/components/property-editor/index.esm.js +2314 -1521
  115. package/components/property-editor/index.umd.cjs +3 -3
  116. package/components/property-panel/index.esm.js +867 -868
  117. package/components/property-panel/index.umd.cjs +1 -1
  118. package/components/query-solution/index.css +1 -1
  119. package/components/query-solution/index.esm.js +4332 -3623
  120. package/components/query-solution/index.umd.cjs +1 -1
  121. package/components/radio-button/index.esm.js +72 -72
  122. package/components/radio-button/index.umd.cjs +1 -1
  123. package/components/radio-group/index.esm.js +613 -437
  124. package/components/radio-group/index.umd.cjs +1 -1
  125. package/components/rate/index.esm.js +255 -263
  126. package/components/rate/index.umd.cjs +1 -1
  127. package/components/response-layout/index.esm.js +144 -152
  128. package/components/response-layout/index.umd.cjs +1 -1
  129. package/components/response-layout-editor/index.css +1 -1
  130. package/components/response-layout-editor/index.esm.js +1101 -1038
  131. package/components/response-layout-editor/index.umd.cjs +1 -1
  132. package/components/response-toolbar/index.esm.js +935 -1750
  133. package/components/response-toolbar/index.umd.cjs +1 -1
  134. package/components/schema-selector/index.css +1 -1
  135. package/components/schema-selector/index.esm.js +5264 -5677
  136. package/components/schema-selector/index.umd.cjs +2 -2
  137. package/components/search-box/index.esm.js +151 -154
  138. package/components/search-box/index.umd.cjs +1 -1
  139. package/components/section/index.esm.js +438 -1125
  140. package/components/section/index.umd.cjs +1 -1
  141. package/components/smoke-detector/index.esm.js +93 -101
  142. package/components/smoke-detector/index.umd.cjs +1 -1
  143. package/components/splitter/index.esm.js +563 -1202
  144. package/components/splitter/index.umd.cjs +1 -1
  145. package/components/splitter/style.js +2 -0
  146. package/components/step/index.esm.js +248 -256
  147. package/components/step/index.umd.cjs +1 -1
  148. package/components/switch/index.esm.js +549 -373
  149. package/components/switch/index.umd.cjs +1 -1
  150. package/components/tabs/index.css +1 -1
  151. package/components/tabs/index.esm.js +2436 -3110
  152. package/components/tabs/index.umd.cjs +1 -1
  153. package/components/tags/index.esm.js +328 -336
  154. package/components/tags/index.umd.cjs +1 -1
  155. package/components/text/index.esm.js +339 -347
  156. package/components/text/index.umd.cjs +1 -1
  157. package/components/textarea/index.esm.js +554 -378
  158. package/components/textarea/index.umd.cjs +1 -1
  159. package/components/time-picker/index.css +1 -1
  160. package/components/time-picker/index.esm.js +1322 -1144
  161. package/components/time-picker/index.umd.cjs +1 -1
  162. package/components/transfer/index.css +1 -1
  163. package/components/transfer/index.esm.js +537 -543
  164. package/components/transfer/index.umd.cjs +1 -1
  165. package/components/tree-grid/index.css +1 -1
  166. package/components/tree-grid/index.esm.js +5113 -9426
  167. package/components/tree-grid/index.umd.cjs +1 -1
  168. package/components/tree-view/index.css +1 -0
  169. package/components/tree-view/index.esm.js +3900 -2677
  170. package/components/tree-view/index.umd.cjs +1 -1
  171. package/components/uploader/index.esm.js +568 -570
  172. package/components/uploader/index.umd.cjs +2 -2
  173. package/components/verify-detail/index.esm.js +266 -274
  174. package/components/verify-detail/index.umd.cjs +1 -1
  175. package/components/video/index.esm.js +553 -1052
  176. package/components/video/index.umd.cjs +1 -1
  177. package/components/weather/index.esm.js +558 -566
  178. package/components/weather/index.umd.cjs +5 -5
  179. package/farris.all.esm.js +22009 -22688
  180. package/farris.all.umd.cjs +9 -9
  181. package/index.css +1 -1
  182. package/package.json +1 -1
  183. package/types/capsule/src/capsule.props.d.ts +2 -2
  184. package/types/combo-list/src/components/list-container.component.d.ts +0 -3
  185. package/types/combo-list/src/components/list-container.props.d.ts +0 -4
  186. package/types/common/directive/area-response.d.ts +10 -0
  187. package/types/common/index.d.ts +9 -0
  188. package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
  189. package/types/common/types.d.ts +1 -1
  190. package/types/common/utils/encrypt.d.ts +2 -0
  191. package/types/common/utils/resolve-field.d.ts +2 -0
  192. package/types/common/utils/use-class.d.ts +7 -0
  193. package/types/component/src/component.props.d.ts +7 -0
  194. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  195. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  196. package/types/components.d.ts +1 -0
  197. package/types/condition/src/types.d.ts +2 -1
  198. package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
  199. package/types/data-grid/index.d.ts +11 -5
  200. package/types/data-grid/src/data-grid.component.d.ts +4 -2
  201. package/types/data-grid/src/data-grid.props.d.ts +1 -0
  202. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  203. package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
  204. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  205. package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
  206. package/types/data-view/composition/types.d.ts +19 -4
  207. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  208. package/types/designer-canvas/index.d.ts +2 -1
  209. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  210. package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
  211. package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
  212. package/types/designer-canvas/src/composition/types.d.ts +2 -3
  213. package/types/designer-canvas/src/types.d.ts +2 -1
  214. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  215. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  216. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  217. package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
  218. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +1 -1
  219. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  220. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  221. package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
  222. package/types/dynamic-form/src/types.d.ts +12 -1
  223. package/types/dynamic-resolver/index.d.ts +1 -0
  224. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
  225. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  226. package/types/dynamic-resolver/src/types.d.ts +9 -0
  227. package/types/dynamic-view/index.d.ts +1 -0
  228. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  229. package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
  230. package/types/index.d.ts +2 -0
  231. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
  232. package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
  233. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  234. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  235. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  236. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  237. package/types/lookup/src/composition/types.d.ts +8 -0
  238. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  239. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  240. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  241. package/types/lookup/src/composition/use-http.d.ts +9 -5
  242. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  243. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  244. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  245. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  246. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  247. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  248. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  249. package/types/modal/src/modal.component.d.ts +3 -0
  250. package/types/modal/src/modal.props.d.ts +4 -0
  251. package/types/page-header/src/page-header.props.d.ts +1 -0
  252. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
  253. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
  254. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
  255. package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
  256. package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
  257. package/types/property-panel/index.d.ts +2 -1
  258. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  259. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  260. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
  261. package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
  262. package/types/{data-grid/src/designer/use-group-column.d.ts → query-solution/src/designer/query-solution-config/composition/use-property.d.ts} +4 -5
  263. package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
  264. package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
  265. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
  266. package/types/query-solution/src/solutions.d.ts +108 -509
  267. package/types/response-layout-editor/index.d.ts +3 -1
  268. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  269. package/types/response-layout-editor/src/type.d.ts +21 -0
  270. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
  271. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
  272. package/types/section/src/designer/use-designer-rules.d.ts +3 -3
  273. package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
  274. package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
  275. package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
  276. package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
  277. package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
  278. package/types/tabs/src/tabs.props.d.ts +1 -0
  279. package/types/tree-grid/index.d.ts +8 -2
  280. package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
  281. package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
  282. package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
  283. package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
  284. package/types/modal/src/composition/use-esc.d.ts +0 -1
  285. package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
  286. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  287. package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
@@ -1,101 +1,101 @@
1
- var Oe = Object.defineProperty;
2
- var $e = (n, e, t) => e in n ? Oe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var O = (n, e, t) => $e(n, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as z, ref as M, computed as F, watch as G, createVNode as b, createTextVNode as Q, getCurrentInstance as ve, onMounted as H, onUnmounted as ie, inject as V, provide as Ne, onBeforeUnmount as _e, withModifiers as Fe } from "vue";
5
- import { cloneDeep as Le } from "lodash-es";
6
- import Ve from "../response-toolbar/index.esm.js";
7
- import { getCustomClass as Y, withInstall as We } from "../common/index.esm.js";
1
+ var je = Object.defineProperty;
2
+ var $e = (n, e, t) => e in n ? je(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var R = (n, e, t) => $e(n, typeof e != "symbol" ? e + "" : e, t);
4
+ import { defineComponent as U, ref as S, computed as N, watch as q, createVNode as g, createTextVNode as J, getCurrentInstance as be, onMounted as H, onUnmounted as ye, inject as V, provide as _e, onBeforeUnmount as Ne, withModifiers as Fe } from "vue";
5
+ import { isPlainObject as ue, cloneDeep as ve } from "lodash-es";
6
+ import Le from "../response-toolbar/index.esm.js";
7
+ import { getCustomClass as Y, withInstall as Ve } from "../common/index.esm.js";
8
8
  import { useDesignerInnerComponent as Ce } from "../designer-canvas/index.esm.js";
9
- const ae = {}, we = {};
10
- function ce(n) {
11
- const { properties: e, title: t, ignore: r } = n, u = r && Array.isArray(r), h = Object.keys(e).reduce((g, D) => ((!u || !r.find((S) => S == D)) && (g[D] = e[D].type === "object" && e[D].properties ? ce(e[D]) : Le(e[D].default)), g), {});
12
- return (!u || !r.find((g) => g == "id")) && (h.id = `${t}-${Date.now()}`), h;
9
+ const se = {}, we = {};
10
+ function re(n) {
11
+ const { properties: e, title: t, ignore: s } = n, i = s && Array.isArray(s), p = Object.keys(e).reduce((u, y) => ((!i || !s.find((w) => w == y)) && (u[y] = e[y].type === "object" && e[y].properties ? re(e[y]) : ve(e[y].default)), u), {});
12
+ return t && (!i || !s.find((u) => u == "id")) && (p.id = `${t}-${Date.now()}`), p;
13
13
  }
14
- function U(n, e = {}, t) {
15
- const r = ae[n];
16
- if (r) {
17
- let u = ce(r);
18
- const h = we[n];
19
- return u = h ? h({ getSchemaByType: U }, u, e, t) : u, u;
14
+ function Q(n, e = {}, t) {
15
+ const s = se[n];
16
+ if (s) {
17
+ let i = re(s);
18
+ const p = we[n];
19
+ return i = p ? p({ getSchemaByType: Q }, i, e, t) : i, i;
20
20
  }
21
21
  return null;
22
22
  }
23
23
  function Ue(n, e) {
24
- const t = ce(e);
25
- return Object.keys(n).reduce((r, u) => (r[u] && typeof r[u] == "object" ? Object.assign(r[u], n[u]) : r[u] = n[u], r), t), t;
24
+ const t = re(e);
25
+ return Object.keys(n).reduce((s, i) => (s[i] && ue(s[i]) && ue(n[i]) ? Object.assign(s[i], n[i]) : s[i] = n[i], s), t), t;
26
26
  }
27
- function qe(n, e) {
28
- return Object.keys(n).filter((r) => n[r] != null).reduce((r, u) => {
29
- if (e.has(u)) {
30
- const h = e.get(u);
31
- if (typeof h == "string")
32
- r[h] = n[u];
27
+ function We(n, e) {
28
+ return Object.keys(n).filter((s) => n[s] != null).reduce((s, i) => {
29
+ if (e.has(i)) {
30
+ const p = e.get(i);
31
+ if (typeof p == "string")
32
+ s[p] = n[i];
33
33
  else {
34
- const g = h(u, n[u], n);
35
- Object.assign(r, g);
34
+ const u = p(i, n[i], n);
35
+ Object.assign(s, u);
36
36
  }
37
37
  } else
38
- r[u] = n[u];
39
- return r;
38
+ s[i] = n[i];
39
+ return s;
40
40
  }, {});
41
41
  }
42
- function He(n, e, t = /* @__PURE__ */ new Map()) {
43
- const r = Ue(n, e);
44
- return qe(r, t);
42
+ function qe(n, e, t = /* @__PURE__ */ new Map()) {
43
+ const s = Ue(n, e);
44
+ return We(s, t);
45
45
  }
46
- function ze(n = {}) {
47
- function e(y, T, l, i) {
46
+ function He(n = {}) {
47
+ function e(h, b, l, c) {
48
48
  if (typeof l == "number")
49
- return i[y].length === l;
49
+ return c[h].length === l;
50
50
  if (typeof l == "object") {
51
- const d = Object.keys(l)[0], c = l[d];
52
- if (d === "not")
53
- return Number(i[y].length) !== Number(c);
54
- if (d === "moreThan")
55
- return Number(i[y].length) >= Number(c);
56
- if (d === "lessThan")
57
- return Number(i[y].length) <= Number(c);
51
+ const f = Object.keys(l)[0], v = l[f];
52
+ if (f === "not")
53
+ return Number(c[h].length) !== Number(v);
54
+ if (f === "moreThan")
55
+ return Number(c[h].length) >= Number(v);
56
+ if (f === "lessThan")
57
+ return Number(c[h].length) <= Number(v);
58
58
  }
59
59
  return !1;
60
60
  }
61
- function t(y, T, l, i) {
62
- return i[y] && i[y].propertyValue && String(i[y].propertyValue.value) === String(l);
61
+ function t(h, b, l, c) {
62
+ return c[h] && c[h].propertyValue && String(c[h].propertyValue.value) === String(l);
63
63
  }
64
- const r = /* @__PURE__ */ new Map([
64
+ const s = /* @__PURE__ */ new Map([
65
65
  ["length", e],
66
66
  ["getProperty", t]
67
67
  ]);
68
- Object.keys(n).reduce((y, T) => (y.set(T, n[T]), y), r);
69
- function u(y, T) {
70
- const l = y;
71
- return typeof T == "number" ? [{ target: l, operator: "length", param: null, value: Number(T) }] : typeof T == "boolean" ? [{ target: l, operator: "getProperty", param: y, value: !!T }] : typeof T == "object" ? Object.keys(T).map((i) => {
72
- if (i === "length")
73
- return { target: l, operator: "length", param: null, value: T[i] };
74
- const d = i, c = T[i];
75
- return { target: l, operator: "getProperty", param: d, value: c };
68
+ Object.keys(n).reduce((h, b) => (h.set(b, n[b]), h), s);
69
+ function i(h, b) {
70
+ const l = h;
71
+ return typeof b == "number" ? [{ target: l, operator: "length", param: null, value: Number(b) }] : typeof b == "boolean" ? [{ target: l, operator: "getProperty", param: h, value: !!b }] : typeof b == "object" ? Object.keys(b).map((c) => {
72
+ if (c === "length")
73
+ return { target: l, operator: "length", param: null, value: b[c] };
74
+ const f = c, v = b[c];
75
+ return { target: l, operator: "getProperty", param: f, value: v };
76
76
  }) : [];
77
77
  }
78
- function h(y) {
79
- return Object.keys(y).reduce((l, i) => {
80
- const d = u(i, y[i]);
81
- return l.push(...d), l;
78
+ function p(h) {
79
+ return Object.keys(h).reduce((l, c) => {
80
+ const f = i(c, h[c]);
81
+ return l.push(...f), l;
82
82
  }, []);
83
83
  }
84
- function g(y, T) {
85
- if (r.has(y.operator)) {
86
- const l = r.get(y.operator);
87
- return l && l(y.target, y.param, y.value, T) || !1;
84
+ function u(h, b) {
85
+ if (s.has(h.operator)) {
86
+ const l = s.get(h.operator);
87
+ return l && l(h.target, h.param, h.value, b) || !1;
88
88
  }
89
89
  return !1;
90
90
  }
91
- function D(y, T) {
92
- return h(y).reduce((d, c) => d && g(c, T), !0);
91
+ function y(h, b) {
92
+ return p(h).reduce((f, v) => f && u(v, b), !0);
93
93
  }
94
- function S(y, T) {
95
- const l = Object.keys(y), i = l.includes("allOf"), d = l.includes("anyOf"), c = i || d, j = (c ? y[c ? i ? "allOf" : "anyOf" : "allOf"] : [y]).map((P) => D(P, T));
96
- return i ? !j.includes(!1) : j.includes(!0);
94
+ function w(h, b) {
95
+ const l = Object.keys(h), c = l.includes("allOf"), f = l.includes("anyOf"), v = c || f, $ = (v ? h[v ? c ? "allOf" : "anyOf" : "allOf"] : [h]).map((T) => y(T, b));
96
+ return c ? !$.includes(!1) : $.includes(!0);
97
97
  }
98
- return { parseValueSchema: S };
98
+ return { parseValueSchema: w };
99
99
  }
100
100
  const K = {
101
101
  button: { type: "button", name: "按钮", icon: "Button" },
@@ -134,24 +134,45 @@ const K = {
134
134
  uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
135
135
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
136
136
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
137
- "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
138
- }, Te = {}, Ge = {};
139
- ze();
140
- function le(n, e, t = /* @__PURE__ */ new Map(), r = (g, D, S) => D, u = {}, h = (g) => g) {
141
- return ae[e.title] = e, we[e.title] = r, Te[e.title] = u, Ge[e.title] = h, (g = {}) => {
142
- const D = He(g, e, t), S = Object.keys(n).reduce((y, T) => (y[T] = n[T].default, y), {});
143
- return Object.assign(S, D);
137
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
138
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
139
+ }, Pe = {}, ze = {};
140
+ He();
141
+ function ie(n, e, t = /* @__PURE__ */ new Map(), s = (u, y, w) => y, i = {}, p = (u) => u) {
142
+ return se[e.title] = e, we[e.title] = s, Pe[e.title] = i, ze[e.title] = p, (u = {}) => {
143
+ const y = qe(u, e, t), w = Object.keys(n).reduce((h, b) => (h[b] = n[b].default, h), {});
144
+ return Object.assign(w, y);
144
145
  };
145
146
  }
146
- function Pe(n, e) {
147
+ function De(n, e) {
147
148
  return { customClass: e.class, customStyle: e.style };
148
149
  }
149
- function Je(n, e) {
150
- return { buttons: e.buttons };
150
+ function Ge(n, e) {
151
+ const t = [];
152
+ return e == null || e.buttons.map((s) => {
153
+ const i = {};
154
+ Object.keys(s).map((p) => {
155
+ var u;
156
+ p == "appearance" ? i.class = ((u = s[p]) == null ? void 0 : u.class) || "" : i[p] = s[p];
157
+ }), t.push(i);
158
+ }), { buttons: t };
159
+ }
160
+ function Je() {
161
+ function n(e, t) {
162
+ var y;
163
+ const s = (y = e.toolbar) == null ? void 0 : y.buttons;
164
+ if (!s || s.length < 1)
165
+ return null;
166
+ const [i, p] = t.payloads, u = s.find((w) => w.id === p);
167
+ return u ? u.onClick || u.click : null;
168
+ }
169
+ return {
170
+ resolve: n
171
+ };
151
172
  }
152
173
  const Qe = /* @__PURE__ */ new Map([
153
- ["appearance", Pe],
154
- ["toolbar", Je]
174
+ ["appearance", De],
175
+ ["toolbar", Ge]
155
176
  ]), Xe = "https://json-schema.org/draft/2020-12/schema", Ye = "https://farris-design.gitee.io/page-header.schema.json", Ze = "page-header", Ke = "A Farris Container Component", et = "object", tt = {
156
177
  id: {
157
178
  description: "The unique identifier for a Page Header",
@@ -271,7 +292,7 @@ const Qe = /* @__PURE__ */ new Map([
271
292
  function ot(n, e, t) {
272
293
  return e.title = "标题", e;
273
294
  }
274
- const pe = {
295
+ const ae = {
275
296
  /** 组件自定义样式 */
276
297
  customClass: { type: String, default: "" },
277
298
  /** 是否显示图标 */
@@ -300,222 +321,213 @@ const pe = {
300
321
  prePaginationDisabled: { type: Boolean, default: !0 },
301
322
  /** 向后翻页是否禁用 */
302
323
  nextPaginationDisabled: { type: Boolean, default: !1 }
303
- }, st = Object.assign({}, pe, {
324
+ }, st = Object.assign({}, ae, {
304
325
  componentId: { type: String, default: "" }
305
- }), ge = le(pe, nt, Qe, ot), oe = /* @__PURE__ */ z({
326
+ }), pe = ie(ae, nt, Qe, ot), rt = Je(), ne = /* @__PURE__ */ U({
306
327
  name: "FPageHeader",
307
- props: pe,
328
+ props: ae,
308
329
  emits: ["Click", "PrePaginationClick", "NextPaginationClick"],
309
330
  setup(n, e) {
310
- const t = M(n.buttons), r = (P, A) => {
311
- e.emit("Click", P, A);
331
+ const t = S(n.buttons), s = (T, B) => {
332
+ e.emit("Click", T, B);
312
333
  };
313
- function u(P, A) {
314
- P && A && A.split(" ").reduce((v, f) => (v[f] = !0, v), P);
334
+ function i(T, B) {
335
+ T && B && B.split(" ").reduce((x, C) => (x[C] = !0, x), T);
315
336
  }
316
- const h = F(() => {
317
- const P = {
337
+ const p = N(() => {
338
+ const T = {
318
339
  "f-page-header": !0
319
340
  };
320
- return u(P, n.customClass), P;
321
- }), g = F(() => {
322
- const P = {
341
+ return i(T, n.customClass), T;
342
+ }), u = N(() => {
343
+ const T = {
323
344
  "f-title-icon": !0
324
345
  };
325
- return u(P, n.iconClass), P;
326
- }), D = F(() => {
327
- const P = {
346
+ return i(T, n.iconClass), T;
347
+ }), y = N(() => {
348
+ const T = {
328
349
  "f-icon": !0
329
350
  };
330
- return u(P, n.icon), P;
331
- }), S = F(() => {
332
- const P = {
351
+ return i(T, n.icon), T;
352
+ }), w = N(() => {
353
+ const T = {
333
354
  "f-title": !0
334
355
  };
335
- return u(P, n.titleContentClass), P;
336
- }), y = F(() => {
337
- const P = {
356
+ return i(T, n.titleContentClass), T;
357
+ }), h = N(() => {
358
+ const T = {
338
359
  "f-content": !0
339
360
  };
340
- return u(P, n.contentClass), P;
341
- }), T = F(() => {
342
- const P = {
361
+ return i(T, n.contentClass), T;
362
+ }), b = N(() => {
363
+ const T = {
343
364
  "f-content": !0
344
365
  };
345
- return u(P, n.downContentClass), P;
346
- }), l = F(() => ({
366
+ return i(T, n.downContentClass), T;
367
+ }), l = N(() => ({
347
368
  "f-icon f-icon-arrow-w": !0,
348
369
  "f-state-disabled": n.prePaginationDisabled
349
- })), i = F(() => ({
370
+ })), c = N(() => ({
350
371
  "f-icon f-icon-arrow-e": !0,
351
372
  "f-state-disabled": n.nextPaginationDisabled
352
373
  }));
353
- function d(P) {
354
- n.prePaginationDisabled || e.emit("PrePaginationClick", P);
374
+ function f(T) {
375
+ n.prePaginationDisabled || e.emit("PrePaginationClick", T);
355
376
  }
356
- function c(P) {
357
- n.nextPaginationDisabled || e.emit("NextPaginationClick", P);
377
+ function v(T) {
378
+ n.nextPaginationDisabled || e.emit("NextPaginationClick", T);
358
379
  }
359
- function C() {
360
- return e.slots.titleContent ? b("div", {
361
- class: S.value
362
- }, [Q(" "), e.slots.titleContent()]) : b("div", {
380
+ function k() {
381
+ return e.slots.titleContent ? g("div", {
382
+ class: w.value
383
+ }, [J(" "), e.slots.titleContent()]) : g("div", {
363
384
  class: "f-title"
364
- }, [n.showIcon && n.icon ? b("span", {
365
- class: g.value
366
- }, [b("i", {
367
- class: D.value
368
- }, null)]) : "", b("h4", {
385
+ }, [n.showIcon && n.icon ? g("span", {
386
+ class: u.value
387
+ }, [g("i", {
388
+ class: y.value
389
+ }, null)]) : "", g("h4", {
369
390
  class: "f-title-text"
370
- }, [n.title]), n.subTitle ? b("h5", {
391
+ }, [n.title]), n.subTitle ? g("h5", {
371
392
  class: "f-title-subtitle"
372
- }, [n.subTitle]) : "", n.showPagination ? b("div", {
393
+ }, [n.subTitle]) : "", n.showPagination ? g("div", {
373
394
  class: "f-title-pagination"
374
- }, [b("span", {
395
+ }, [g("span", {
375
396
  class: l.value,
376
- onClick: d
377
- }, null), b("span", {
378
- class: i.value,
379
- onClick: c
397
+ onClick: f
398
+ }, null), g("span", {
399
+ class: c.value,
400
+ onClick: v
380
401
  }, null)]) : ""]);
381
402
  }
382
- function w() {
383
- return e.slots.content ? b("div", {
384
- class: y.value
385
- }, [Q(" "), e.slots.content()]) : "";
403
+ function A() {
404
+ return e.slots.content ? g("div", {
405
+ class: h.value
406
+ }, [J(" "), e.slots.content()]) : "";
386
407
  }
387
- function j() {
408
+ function $() {
388
409
  if (n.buttons && n.buttons.length > 0)
389
- return b(Ve, {
410
+ return g(Le, {
390
411
  customClass: n.buttonClass,
391
412
  items: t.value,
392
- onClick: r
413
+ onClick: s
393
414
  }, null);
394
415
  }
395
- function I() {
396
- return e.slots.downContent ? b("div", {
397
- class: T.value
398
- }, [Q(" "), e.slots.downContent()]) : "";
416
+ function _() {
417
+ return e.slots.downContent ? g("div", {
418
+ class: b.value
419
+ }, [J(" "), e.slots.downContent()]) : "";
399
420
  }
400
- return G(() => n.buttons, (P) => {
401
- t.value = P;
421
+ return q(() => n.buttons, (T) => {
422
+ t.value = T;
402
423
  }, {
403
424
  deep: !0
404
- }), () => b("div", {
405
- class: h.value
406
- }, [b("nav", {
425
+ }), () => g("div", {
426
+ class: p.value
427
+ }, [g("nav", {
407
428
  class: "f-page-header-base"
408
- }, [C(), w(), j()]), I()]);
429
+ }, [k(), A(), $()]), _()]);
409
430
  }
410
431
  });
411
- function rt(n, e, t) {
412
- var $;
413
- function r() {
432
+ function it(n, e, t) {
433
+ var B;
434
+ function s() {
414
435
  t != null && t.resolveComponentContext && t.resolveComponentContext();
415
436
  }
416
- r();
417
- const u = t && t.getStyles && t.getStyles() || "", h = t && t.getDesignerClass && t.getDesignerClass() || "", g = M();
418
- function D() {
437
+ s();
438
+ const i = t && t.getStyles && t.getStyles() || "", p = t && t.getDesignerClass && t.getDesignerClass() || "", u = S();
439
+ function y() {
419
440
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
420
441
  }
421
- function S() {
442
+ function w() {
422
443
  return !1;
423
444
  }
424
- function y() {
445
+ function h() {
425
446
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
426
447
  }
427
- function T() {
448
+ function b() {
428
449
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
429
450
  }
430
- function l(v) {
431
- if (!v || !v.value)
451
+ function l(P) {
452
+ if (!P || !P.value)
432
453
  return null;
433
- if (v.value.schema && v.value.schema.type === "component")
434
- return v.value;
435
- const f = M(v == null ? void 0 : v.value.parent), x = l(f);
436
- return x || null;
454
+ if (P.value.schema && P.value.schema.type === "component")
455
+ return P.value;
456
+ const x = S(P == null ? void 0 : P.value.parent), C = l(x);
457
+ return C || null;
437
458
  }
438
- function i(v = e) {
439
- const { componentInstance: f, designerItemElementRef: x } = v;
440
- return !f || !f.value ? null : f.value.canMove ? x : i(v.parent);
459
+ function c(P = e) {
460
+ const { componentInstance: x, designerItemElementRef: C } = P;
461
+ return !x || !x.value ? null : x.value.canMove ? C : c(P.parent);
441
462
  }
442
- function d(v) {
443
- return !!t && t.canAccepts(v);
463
+ function f(P) {
464
+ return !!t && t.canAccepts(P);
444
465
  }
445
- function c() {
466
+ function v() {
446
467
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
447
468
  }
448
- function C() {
449
- }
450
- function w(v, f) {
451
- f && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(f);
469
+ function k() {
452
470
  }
453
- function j(v, f) {
454
- const { componentType: x } = v;
455
- let k = U(x, v, f);
456
- t && t.onResolveNewComponentSchema && (k = t.onResolveNewComponentSchema(v, k));
457
- const p = x.toLowerCase().replace("-", "_");
458
- return k && !k.id && k.type === x && (k.id = `${p}_${Math.random().toString().slice(2, 6)}`), k;
471
+ function A(P, x) {
472
+ x && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(x);
459
473
  }
460
- function I(v, f) {
461
- const x = String(v.getAttribute("data-controltype")), k = v.getAttribute("data-feature"), p = k ? JSON.parse(k) : {};
462
- p.parentComponentInstance = g.value;
463
- let s = U(x, p);
464
- t && t.onAcceptNewChildElement && (s = t.onAcceptNewChildElement(v, f, s));
465
- const o = x.toLowerCase().replace("-", "_");
466
- return s && !s.id && s.type === x && (s.id = `${o}_${Math.random().toString().slice(2, 6)}`), s;
474
+ function $(P, x) {
475
+ const { componentType: C } = P;
476
+ let I = Q(C, P, x);
477
+ t && t.onResolveNewComponentSchema && (I = t.onResolveNewComponentSchema(P, I));
478
+ const O = C.toLowerCase().replace("-", "_");
479
+ return I && !I.id && I.type === C && (I.id = `${O}_${Math.random().toString().slice(2, 6)}`), I;
467
480
  }
468
- function P(v) {
481
+ function _(P) {
469
482
  }
470
- function A(...v) {
483
+ function T(...P) {
471
484
  if (t && t.getPropsConfig)
472
- return t.getPropsConfig(...v);
485
+ return t.getPropsConfig(...P);
473
486
  }
474
- return g.value = {
475
- canMove: D(),
476
- canSelectParent: S(),
477
- canDelete: y(),
478
- canNested: !T(),
487
+ return u.value = {
488
+ canMove: y(),
489
+ canSelectParent: w(),
490
+ canDelete: h(),
491
+ canNested: !b(),
479
492
  contents: e == null ? void 0 : e.schema.contents,
480
493
  elementRef: n,
481
- parent: ($ = e == null ? void 0 : e.parent) == null ? void 0 : $.componentInstance,
494
+ parent: (B = e == null ? void 0 : e.parent) == null ? void 0 : B.componentInstance,
482
495
  schema: e == null ? void 0 : e.schema,
483
- styles: u,
484
- designerClass: h,
485
- canAccepts: d,
496
+ styles: i,
497
+ designerClass: p,
498
+ canAccepts: f,
486
499
  getBelongedComponentInstance: l,
487
- getDraggableDesignItemElement: i,
488
- getDraggingDisplayText: c,
489
- getPropConfig: A,
490
- getDragScopeElement: C,
491
- onAcceptMovedChildElement: w,
492
- onAcceptNewChildElement: I,
493
- onChildElementMovedOut: P,
494
- addNewChildComponentSchema: j,
495
- updateDragAndDropRules: r,
496
- triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || M(!1),
497
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || M(!1)
498
- }, g;
500
+ getDraggableDesignItemElement: c,
501
+ getDraggingDisplayText: v,
502
+ getPropConfig: T,
503
+ getDragScopeElement: k,
504
+ onAcceptMovedChildElement: A,
505
+ onChildElementMovedOut: _,
506
+ addNewChildComponentSchema: $,
507
+ updateDragAndDropRules: s,
508
+ triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || S(!1),
509
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || S(!1)
510
+ }, u;
499
511
  }
500
512
  class ee {
501
513
  constructor(e, t) {
502
- O(this, "componentId");
503
- O(this, "viewModelId");
504
- O(this, "eventsEditorUtils");
505
- O(this, "formSchemaUtils");
506
- O(this, "formMetadataConverter");
507
- O(this, "designViewModelUtils");
508
- O(this, "designViewModelField");
509
- O(this, "controlCreatorUtils");
510
- O(this, "designerHostService");
511
- O(this, "schemaService", null);
512
- O(this, "metadataService", null);
513
- O(this, "propertyConfig", {
514
+ R(this, "componentId");
515
+ R(this, "viewModelId");
516
+ R(this, "eventsEditorUtils");
517
+ R(this, "formSchemaUtils");
518
+ R(this, "formMetadataConverter");
519
+ R(this, "designViewModelUtils");
520
+ R(this, "designViewModelField");
521
+ R(this, "controlCreatorUtils");
522
+ R(this, "designerHostService");
523
+ R(this, "schemaService", null);
524
+ R(this, "metadataService", null);
525
+ R(this, "propertyConfig", {
514
526
  type: "object",
515
527
  categories: {}
516
528
  });
517
- var r;
518
- 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;
529
+ var s;
530
+ this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((s = this.formSchemaUtils) == null ? void 0 : s.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
519
531
  }
520
532
  getTableInfo() {
521
533
  var e;
@@ -525,8 +537,8 @@ class ee {
525
537
  const t = e.binding && e.binding.type === "Form" && e.binding.field;
526
538
  if (t) {
527
539
  if (!this.designViewModelField) {
528
- const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
529
- this.designViewModelField = r.fields.find((u) => u.id === t);
540
+ const s = this.designViewModelUtils.getDgViewModel(this.viewModelId);
541
+ this.designViewModelField = s.fields.find((i) => i.id === t);
530
542
  }
531
543
  e.updateOn = this.designViewModelField.updateOn;
532
544
  }
@@ -578,8 +590,21 @@ class ee {
578
590
  }
579
591
  };
580
592
  }
593
+ /**
594
+ *
595
+ * @param propertyId
596
+ * @param componentInstance
597
+ * @returns
598
+ */
599
+ updateElementByParentContainer(e, t) {
600
+ const s = t && t.parent && t.parent.schema;
601
+ if (!s)
602
+ return;
603
+ const i = s.contents.findIndex((u) => u.id === e), p = ve(s.contents[i]);
604
+ s.contents.splice(i, 1), s.contents.splice(i, 0, p);
605
+ }
581
606
  }
582
- class it extends ee {
607
+ class at extends ee {
583
608
  constructor(e, t) {
584
609
  super(e, t);
585
610
  }
@@ -619,7 +644,7 @@ class it extends ee {
619
644
  description: "标题"
620
645
  }
621
646
  },
622
- setPropertyRelates(t, r) {
647
+ setPropertyRelates(t, s) {
623
648
  if (t)
624
649
  switch (t && t.propertyID) {
625
650
  case "title": {
@@ -654,7 +679,7 @@ class it extends ee {
654
679
  label: "click",
655
680
  name: "点击事件"
656
681
  }
657
- ], r = this, u = r.eventsEditorUtils.formProperties(e, r.viewModelId, t);
682
+ ], s = this, i = s.eventsEditorUtils.formProperties(e, s.viewModelId, t);
658
683
  this.propertyConfig.categories.eventsEditor = {
659
684
  title: "事件",
660
685
  hideTitle: !0,
@@ -662,7 +687,7 @@ class it extends ee {
662
687
  "data-grid-component-viewmodel": {
663
688
  type: "events-editor",
664
689
  editor: {
665
- initialData: u
690
+ initialData: i
666
691
  }
667
692
  }
668
693
  },
@@ -670,65 +695,65 @@ class it extends ee {
670
695
  refreshPanelAfterChanged: !0,
671
696
  tabId: "commands",
672
697
  tabName: "交互",
673
- setPropertyRelates(h, g) {
674
- const D = h.propertyValue;
675
- delete e[r.viewModelId], D && (D.setPropertyRelates = this.setPropertyRelates, r.eventsEditorUtils.saveRelatedParameters(e, r.viewModelId, D.events, D));
698
+ setPropertyRelates(p, u) {
699
+ const y = p.propertyValue;
700
+ delete e[s.viewModelId], y && (y.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, y.events, y));
676
701
  }
677
702
  };
678
703
  }
679
704
  }
680
- function at(n, e) {
681
- function t(D) {
705
+ function lt(n, e) {
706
+ function t(y) {
682
707
  return !1;
683
708
  }
684
- function r() {
709
+ function s() {
685
710
  return !1;
686
711
  }
687
- function u() {
712
+ function i() {
688
713
  return !1;
689
714
  }
690
- function h() {
715
+ function p() {
691
716
  return !0;
692
717
  }
693
- function g(D) {
694
- return new it(D, e).getPropertyConfig(n);
718
+ function u(y) {
719
+ return new at(y, e).getPropertyConfig(n);
695
720
  }
696
721
  return {
697
722
  canAccepts: t,
698
- hideNestedPaddingInDesginerView: h,
699
- getPropsConfig: g,
700
- checkCanDeleteComponent: r,
701
- checkCanMoveComponent: u
723
+ hideNestedPaddingInDesginerView: p,
724
+ getPropsConfig: u,
725
+ checkCanDeleteComponent: s,
726
+ checkCanMoveComponent: i
702
727
  };
703
728
  }
704
- class De {
729
+ class Te {
705
730
  constructor(e) {
706
731
  /** 工具栏项标识 */
707
- O(this, "id", "");
732
+ R(this, "id", "");
708
733
  /** 工具栏项自定义样式 */
709
- O(this, "class", "btn-secondary");
734
+ R(this, "class", "btn-secondary");
710
735
  /** 图标 */
711
- O(this, "icon", "");
736
+ R(this, "icon", "");
712
737
  /** 所属分组 */
713
- O(this, "groupId", "");
738
+ R(this, "groupId", "");
714
739
  /** 收藏顺序 */
715
- O(this, "order", -1);
740
+ R(this, "order", -1);
716
741
  /** 是否作为下拉菜单的顶层按钮 */
717
- O(this, "asDropDownTop", !1);
742
+ R(this, "asDropDownTop", !1);
718
743
  /** 文本 */
719
- O(this, "text", "");
744
+ R(this, "text", "");
720
745
  /** 是否可见 */
721
- O(this, "visible", !0);
722
- O(this, "responsed", !1);
746
+ R(this, "visible", !0);
747
+ R(this, "responsed", !1);
723
748
  /** 是否启用提示消息 */
724
- O(this, "tipsEnable", !1);
749
+ R(this, "tipsEnable", !1);
725
750
  /** 提示消息内容 */
726
- O(this, "tipsText", "");
751
+ R(this, "tipsText", "");
727
752
  /** 记录宽度 */
728
- O(this, "width", 0);
729
- O(this, "onClick", () => {
753
+ R(this, "width", 0);
754
+ R(this, "onClick", () => {
730
755
  });
731
- O(this, "options");
756
+ R(this, "options");
732
757
  this.options = e;
733
758
  const t = [
734
759
  "id",
@@ -746,13 +771,13 @@ class De {
746
771
  "tipsText",
747
772
  "onClick"
748
773
  ];
749
- Object.keys(e).filter((r) => t.indexOf(r) > -1).forEach((r) => {
750
- this[r] = e[r];
774
+ Object.keys(e).filter((s) => t.indexOf(s) > -1).forEach((s) => {
775
+ this[s] = e[s];
751
776
  });
752
777
  }
753
778
  /** 是否可用 */
754
779
  get enable() {
755
- return Object.keys(this.options).indexOf("enable") > -1 ? this.options.enable : F(() => !0);
780
+ return Object.keys(this.options).indexOf("disabled") > -1 ? !this.options.disabled : N(() => !0);
756
781
  }
757
782
  /** 设置宽度 */
758
783
  setWidth(e) {
@@ -763,7 +788,7 @@ class De {
763
788
  return this.visible ? this.width : !1;
764
789
  }
765
790
  }
766
- class ct extends De {
791
+ class ct extends Te {
767
792
  constructor(e) {
768
793
  super(e);
769
794
  }
@@ -771,43 +796,43 @@ class ct extends De {
771
796
  function Se() {
772
797
  function n(e) {
773
798
  const t = [];
774
- return e.reduce((r, u) => (u.children && u.children.length > 0 ? r.push(new J(u)) : r.push(new ct(u)), r), t), t;
799
+ return e.reduce((s, i) => (i.children && i.children.length > 0 ? s.push(new z(i)) : s.push(new ct(i)), s), t), t;
775
800
  }
776
801
  return { buildResponseToolbarItems: n };
777
802
  }
778
- const { buildResponseToolbarItems: lt } = Se();
779
- class J extends De {
803
+ const { buildResponseToolbarItems: dt } = Se();
804
+ class z extends Te {
780
805
  constructor(t) {
781
806
  super(t);
782
- O(this, "placement", "");
807
+ R(this, "placement", "");
783
808
  // 下拉位置
784
809
  /** 下拉class */
785
- O(this, "dropdownClass", "");
810
+ R(this, "dropdownClass", "");
786
811
  /** 下拉菜单class */
787
- O(this, "menuClass", "");
812
+ R(this, "menuClass", "");
788
813
  /** 是否用分开的下拉按钮 */
789
- O(this, "split", !1);
790
- O(this, "children", []);
791
- O(this, "expanded", !1);
792
- const r = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
793
- Object.keys(t).filter((u) => r.indexOf(u) > -1).forEach((u) => {
794
- this[u] = t[u];
795
- }), t.children && t.children.length && (this.children = lt(t.children));
814
+ R(this, "split", !1);
815
+ R(this, "children", []);
816
+ R(this, "expanded", !1);
817
+ const s = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
818
+ Object.keys(t).filter((i) => s.indexOf(i) > -1).forEach((i) => {
819
+ this[i] = t[i];
820
+ }), t.children && t.children.length && (this.children = dt(t.children));
796
821
  }
797
822
  }
798
- const pt = /* @__PURE__ */ new Map([
823
+ const ut = /* @__PURE__ */ new Map([
799
824
  ["buttons", "items"],
800
- ["appearance", Pe]
801
- ]), ut = /* @__PURE__ */ new Map([
802
- ["appearance", dt]
825
+ ["appearance", De]
826
+ ]), pt = /* @__PURE__ */ new Map([
827
+ ["appearance", ft]
803
828
  ]);
804
- function dt(n, e) {
829
+ function ft(n, e) {
805
830
  return { class: e.class, style: e.style };
806
831
  }
807
- function je(n, e, t) {
832
+ function ke(n, e, t) {
808
833
  return e;
809
834
  }
810
- const ft = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-design.gitee.io/response-toolbar.schema.json", mt = "response-toolbar", ht = "A Farris Toolbar Component", bt = "object", yt = {
835
+ const gt = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-design.gitee.io/response-toolbar.schema.json", ht = "response-toolbar", bt = "A Farris Toolbar Component", yt = "object", vt = {
811
836
  id: {
812
837
  description: "The unique identifier for a Response Toolbar",
813
838
  type: "string"
@@ -823,9 +848,6 @@ const ft = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-
823
848
  properties: {
824
849
  class: {
825
850
  type: "string"
826
- },
827
- style: {
828
- type: "string"
829
851
  }
830
852
  },
831
853
  default: {}
@@ -840,19 +862,19 @@ const ft = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-
840
862
  type: "array",
841
863
  default: []
842
864
  }
843
- }, vt = [
865
+ }, Ct = [
844
866
  "id",
845
867
  "type",
846
868
  "buttons"
847
- ], Ct = {
848
- $schema: ft,
849
- $id: gt,
850
- title: mt,
851
- description: ht,
852
- type: bt,
853
- properties: yt,
854
- required: vt
855
- }, wt = "https://json-schema.org/draft/2020-12/schema", Tt = "https://farris-design.gitee.io/response-toolbar-item.schema.json", Pt = "response-toolbar-item", Dt = "A Farris Toolbar Item Component", St = "object", jt = {
869
+ ], wt = {
870
+ $schema: gt,
871
+ $id: mt,
872
+ title: ht,
873
+ description: bt,
874
+ type: yt,
875
+ properties: vt,
876
+ required: Ct
877
+ }, Pt = "https://json-schema.org/draft/2020-12/schema", Dt = "https://farris-design.gitee.io/response-toolbar-item.schema.json", Tt = "response-toolbar-item", St = "A Farris Toolbar Item Component", kt = "object", Mt = {
856
878
  id: {
857
879
  description: "The unique identifier for a Response Toolbar",
858
880
  type: "string"
@@ -868,31 +890,33 @@ const ft = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-
868
890
  properties: {
869
891
  class: {
870
892
  type: "string",
871
- default: "btn-primary"
872
- },
873
- style: {
874
- type: "string"
893
+ default: "btn-secondary"
875
894
  }
876
895
  },
877
896
  default: {}
878
897
  },
879
898
  alignment: {
880
- description: "The alignment of Response Toolbar Button.",
899
+ description: "对齐",
881
900
  type: "string",
882
901
  default: "right"
883
902
  },
884
903
  text: {
885
- description: "The items of Response Toolbar.",
904
+ description: "文本",
886
905
  type: "string",
887
- default: "新增"
906
+ default: "按钮"
888
907
  },
889
908
  icon: {
890
- description: "The icon of response toolbar item.",
909
+ description: "图标",
891
910
  type: "string",
892
911
  default: ""
893
912
  },
894
- click: {
895
- description: "The event of response toolbar item.",
913
+ disabled: {
914
+ description: "禁用",
915
+ type: "boolean",
916
+ default: !1
917
+ },
918
+ onClick: {
919
+ description: "点击事件",
896
920
  type: "string",
897
921
  default: ""
898
922
  }
@@ -900,15 +924,15 @@ const ft = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-
900
924
  "id",
901
925
  "type",
902
926
  "text"
903
- ], re = {
904
- $schema: wt,
905
- $id: Tt,
906
- title: Pt,
907
- description: Dt,
908
- type: St,
909
- properties: jt,
927
+ ], oe = {
928
+ $schema: Pt,
929
+ $id: Dt,
930
+ title: Tt,
931
+ description: St,
932
+ type: kt,
933
+ properties: Mt,
910
934
  required: xt
911
- }, Et = "response-toolbar-item", Mt = "A Farris Container Component", kt = "object", At = {
935
+ }, Et = "response-toolbar-item", Bt = "A Farris Container Component", It = "object", Rt = {
912
936
  basic: {
913
937
  title: "基本信息",
914
938
  description: "Basic Infomation",
@@ -941,12 +965,12 @@ const ft = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-
941
965
  }
942
966
  }
943
967
  }
944
- }, me = {
968
+ }, fe = {
945
969
  title: Et,
946
- description: Mt,
947
- type: kt,
948
- categories: At
949
- }, ue = {
970
+ description: Bt,
971
+ type: It,
972
+ categories: Rt
973
+ }, le = {
950
974
  /** 组件自定义样式 */
951
975
  customClass: { type: String, default: "" },
952
976
  alignment: { Type: String, default: "right" },
@@ -955,16 +979,16 @@ const ft = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-
955
979
  default: []
956
980
  }
957
981
  };
958
- ae[re.title] = re;
959
- Te[me.title] = me;
960
- const Bt = Object.assign({}, ue, {
982
+ se[oe.title] = oe;
983
+ Pe[fe.title] = fe;
984
+ const At = Object.assign({}, le, {
961
985
  componentId: { type: String, default: "" }
962
- }), de = le(
963
- ue,
964
- Ct,
965
- pt,
966
- je
967
- ), xe = {
986
+ }), ce = ie(
987
+ le,
988
+ wt,
989
+ ut,
990
+ ke
991
+ ), Me = {
968
992
  id: { type: String, default: "" },
969
993
  items: { type: Object, default: {} },
970
994
  class: { type: String, default: "" },
@@ -973,1493 +997,738 @@ const Bt = Object.assign({}, ue, {
973
997
  icon: { type: String, default: "" },
974
998
  componentId: { type: String, default: "" },
975
999
  alignment: { Type: String, default: "right" }
976
- }, Rt = le(
977
- xe,
978
- re,
979
- ut,
980
- je
1000
+ }, Ot = ie(
1001
+ Me,
1002
+ oe,
1003
+ pt,
1004
+ ke
981
1005
  );
982
- function Ee() {
1006
+ function xe() {
983
1007
  function n(t) {
984
- const r = {
1008
+ const s = {
985
1009
  "f-icon": !0
986
1010
  };
987
1011
  if (t.icon) {
988
- const u = t.icon.trim().split(" ");
989
- u && u.length && u.reduce((h, g) => (h[g] = !0, h), r);
1012
+ const i = t.icon.trim().split(" ");
1013
+ i && i.length && i.reduce((p, u) => (p[u] = !0, p), s);
990
1014
  }
991
- return r;
1015
+ return s;
992
1016
  }
993
1017
  function e(t) {
994
1018
  return !!(t.icon && t.icon.trim());
995
1019
  }
996
1020
  return { iconClass: n, shouldShowIcon: e };
997
1021
  }
998
- function It(n) {
1022
+ function jt(n) {
999
1023
  function e(l) {
1000
- const i = {
1024
+ const c = {
1001
1025
  "dropdown-menu": !0
1002
1026
  };
1003
1027
  if (l.class) {
1004
- const d = l.menuClass.split(" ");
1005
- d && d.length && d.reduce((c, C) => (c[C] = !0, c), i);
1028
+ const f = l.menuClass.split(" ");
1029
+ f && f.length && f.reduce((v, k) => (v[k] = !0, v), c);
1006
1030
  }
1007
- return i;
1031
+ return c;
1008
1032
  }
1009
1033
  function t(l) {
1010
- const i = {
1034
+ const c = {
1011
1035
  disabled: !l.enable,
1012
1036
  "dropdown-submenu": !0,
1013
1037
  "f-rt-dropdown": !0
1014
- }, d = l.dropdownClass.split(" ");
1015
- return d && d.length && d.reduce((c, C) => (c[C] = !0, c), i), i;
1038
+ }, f = l.dropdownClass.split(" ");
1039
+ return f && f.length && f.reduce((v, k) => (v[k] = !0, v), c), c;
1016
1040
  }
1017
- function r(l) {
1018
- const i = {
1041
+ function s(l) {
1042
+ const c = {
1019
1043
  disabled: !l.enable,
1020
1044
  "dropdown-item": !0,
1021
1045
  "f-rt-btn": !0
1022
- }, d = l.class.split(" ");
1023
- return d && d.length && d.reduce((c, C) => (c[C] = !0, c), i), i;
1024
- }
1025
- let u;
1026
- const h = /* @__PURE__ */ new Map();
1027
- function g(l, i, d) {
1028
- var C;
1029
- ((C = l.target) == null ? void 0 : C.id) === i.id && l.stopPropagation();
1030
- const c = d ? d.id : "__top_item__";
1031
- if (i.children && i.children.length && (i.expanded = !i.expanded, i.expanded ? h.set(c, i) : h.delete(c)), h.has(c) && h.get(c) !== i) {
1032
- const w = h.get(c);
1033
- w && (w.expanded = !1);
1046
+ }, f = l.class.split(" ");
1047
+ return f && f.length && f.reduce((v, k) => (v[k] = !0, v), c), c;
1048
+ }
1049
+ let i;
1050
+ const p = /* @__PURE__ */ new Map();
1051
+ function u(l, c, f) {
1052
+ var k;
1053
+ ((k = l.target) == null ? void 0 : k.id) === c.id && l.stopPropagation();
1054
+ const v = f ? f.id : "__top_item__";
1055
+ if (c.children && c.children.length && (c.expanded = !c.expanded, c.expanded ? p.set(v, c) : p.delete(v)), p.has(v) && p.get(v) !== c) {
1056
+ const A = p.get(v);
1057
+ A && (A.expanded = !1);
1034
1058
  }
1035
1059
  }
1036
- function D(l, i) {
1037
- document.body.click(), i.enable && i.onClick(l, i.id);
1038
- }
1039
- function S(l) {
1040
- return l.children.map((i) => i.children && i.children.length ? b("li", {
1041
- class: t(i),
1042
- id: i.id,
1043
- onClick: (d) => i.enable && g(d, i, l)
1044
- }, [b("span", {
1045
- id: i.id,
1046
- class: r(i),
1047
- onMouseover: (d) => i.enable && g(d, i, l)
1048
- }, [i.text, b("i", {
1060
+ function y(l, c) {
1061
+ document.body.click(), c.enable && c.onClick(l, c.id);
1062
+ }
1063
+ function w(l) {
1064
+ return l.children.map((c) => c.children && c.children.length ? g("li", {
1065
+ class: t(c),
1066
+ id: c.id,
1067
+ onClick: (f) => c.enable && u(f, c, l)
1068
+ }, [g("span", {
1069
+ id: c.id,
1070
+ class: s(c),
1071
+ onMouseover: (f) => c.enable && u(f, c, l)
1072
+ }, [c.text, g("i", {
1049
1073
  class: "f-icon f-icon-arrow-chevron-right",
1050
1074
  style: "display: inline-block;float: right;line-height: 1.25rem;"
1051
- }, null)]), u(i, i)]) : b("li", {
1052
- class: r(i),
1053
- id: i.id,
1054
- onClick: (d) => D(d, i),
1055
- onMouseover: (d) => i.enable && g(d, i, l)
1056
- }, [n.shouldShowIcon(i) && b("i", {
1057
- class: n.iconClass(i)
1058
- }, null), i.text]));
1059
- }
1060
- function y(l, i, d) {
1061
- const c = {
1075
+ }, null)]), i(c, c)]) : g("li", {
1076
+ class: s(c),
1077
+ id: c.id,
1078
+ onClick: (f) => y(f, c),
1079
+ onMouseover: (f) => c.enable && u(f, c, l)
1080
+ }, [n.shouldShowIcon(c) && g("i", {
1081
+ class: n.iconClass(c)
1082
+ }, null), c.text]));
1083
+ }
1084
+ function h(l, c, f) {
1085
+ const v = {
1062
1086
  display: l.expanded ? "block" : "none",
1063
1087
  position: "fixed",
1064
1088
  maxWidth: "300px",
1065
1089
  width: "auto",
1066
1090
  minWidth: "120px"
1067
- }, C = document.getElementsByTagName("body")[0].getClientRects()[0].width, w = i, j = w == null ? void 0 : w.getClientRects();
1068
- if (w && j && j.length) {
1091
+ }, k = document.getElementsByTagName("body")[0].getClientRects()[0].width, A = c, $ = A == null ? void 0 : A.getClientRects();
1092
+ if (A && $ && $.length) {
1069
1093
  const {
1070
- top: I,
1071
- width: P,
1072
- left: A,
1073
- right: $,
1074
- height: v
1075
- } = j[0], f = Math.ceil(v + I);
1076
- c.top = `${f}px`, c.left = `${A}px`;
1077
- const x = l.id + "_menu", k = i ? i.querySelector("#" + x) : null;
1078
- if (k) {
1079
- c.display === "block" && (k.style.display = "block");
1080
- const p = k.getBoundingClientRect();
1081
- if (d) {
1082
- c.top = `${I - 6}px`;
1083
- const s = Math.ceil(P + A);
1084
- c.left = `${s}px`;
1094
+ top: _,
1095
+ width: T,
1096
+ left: B,
1097
+ right: P,
1098
+ height: x
1099
+ } = $[0], C = Math.ceil(x + _);
1100
+ v.top = `${C}px`, v.left = `${B}px`;
1101
+ const I = l.id + "_menu", O = c ? c.querySelector("#" + I) : null;
1102
+ if (O) {
1103
+ v.display === "block" && (O.style.display = "block");
1104
+ const d = O.getBoundingClientRect();
1105
+ if (f) {
1106
+ v.top = `${_ - 6}px`;
1107
+ const r = Math.ceil(T + B);
1108
+ v.left = `${r}px`;
1085
1109
  }
1086
- C - A - P < p.width && (c.left = `${(d ? A : $) - p.width}px`);
1110
+ k - B - T < d.width && (v.left = `${(f ? B : P) - d.width}px`);
1087
1111
  }
1088
1112
  }
1089
- return c;
1113
+ return v;
1090
1114
  }
1091
- u = function(l, i) {
1092
- var w, j;
1093
- const d = ve(), c = i ? i.id : l.id, C = (j = (w = d == null ? void 0 : d.exposed) == null ? void 0 : w.elementRef.value) == null ? void 0 : j.querySelector("#" + c);
1094
- return b("ul", {
1115
+ i = function(l, c) {
1116
+ var A, $;
1117
+ const f = be(), v = c ? c.id : l.id, k = ($ = (A = f == null ? void 0 : f.exposed) == null ? void 0 : A.elementRef.value) == null ? void 0 : $.querySelector("#" + v);
1118
+ return g("ul", {
1095
1119
  class: e(l),
1096
- style: y(l, C, i),
1120
+ style: h(l, k, c),
1097
1121
  id: l.id + "_menu"
1098
- }, [S(l)]);
1122
+ }, [w(l)]);
1099
1123
  };
1100
- function T() {
1101
- h.forEach((l) => {
1124
+ function b() {
1125
+ p.forEach((l) => {
1102
1126
  l.expanded = !1;
1103
- }), h.clear();
1127
+ }), p.clear();
1104
1128
  }
1105
1129
  return {
1106
- renderDropdownMenu: u,
1107
- clearAllDropDownMenu: T
1130
+ renderDropdownMenu: i,
1131
+ clearAllDropDownMenu: b
1108
1132
  };
1109
1133
  }
1110
- function Ot(n, e) {
1111
- const t = M(n.alignment), {
1112
- renderDropdownMenu: r,
1113
- clearAllDropDownMenu: u
1114
- } = It(e);
1115
- function h(T) {
1134
+ function $t(n, e) {
1135
+ const t = S(n.alignment), {
1136
+ renderDropdownMenu: s,
1137
+ clearAllDropDownMenu: i
1138
+ } = jt(e);
1139
+ function p(b) {
1116
1140
  const l = {
1117
1141
  "btn-group": !0,
1118
1142
  "f-rt-dropdown": !0,
1119
1143
  "f-btn-ml": t.value === "right",
1120
1144
  "f-btn-mr": t.value === "left"
1121
- }, i = T.dropdownClass.split(" ");
1122
- return i && i.length && i.reduce((d, c) => (d[c] = !0, d), l), l;
1145
+ }, c = b.dropdownClass.split(" ");
1146
+ return c && c.length && c.reduce((f, v) => (f[v] = !0, f), l), l;
1123
1147
  }
1124
- function g(T) {
1148
+ function u(b) {
1125
1149
  const l = {
1126
1150
  btn: !0,
1127
- disabled: !T.enable,
1151
+ disabled: !b.enable,
1128
1152
  "f-rt-btn": !0,
1129
- "btn-icontext": !!(T.icon && T.icon.trim())
1153
+ "btn-icontext": !!(b.icon && b.icon.trim())
1130
1154
  };
1131
- if (T.class) {
1132
- const i = T.class.split(" ");
1133
- i && i.length && i.reduce((d, c) => (d[c] = !0, d), l);
1155
+ if (b.class) {
1156
+ const c = b.class.split(" ");
1157
+ c && c.length && c.reduce((f, v) => (f[v] = !0, f), l);
1134
1158
  }
1135
1159
  return l;
1136
1160
  }
1137
- function D(T, l) {
1138
- T.stopPropagation();
1139
- const i = l.expanded;
1140
- document.body.click(), l.expanded = !i;
1141
- }
1142
- function S(T) {
1143
- return b("div", {
1144
- id: T.id,
1145
- class: h(T)
1146
- }, [b("div", {
1147
- class: g(T),
1161
+ function y(b, l) {
1162
+ b.stopPropagation();
1163
+ const c = l.expanded;
1164
+ document.body.click(), l.expanded = !c;
1165
+ }
1166
+ function w(b) {
1167
+ return g("div", {
1168
+ id: b.id,
1169
+ class: p(b)
1170
+ }, [g("div", {
1171
+ class: u(b),
1148
1172
  style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
1149
- onClick: (l) => T.enable && D(l, T)
1150
- }, [e.shouldShowIcon(T) && b("i", {
1151
- class: e.iconClass(T)
1152
- }, null), b("span", null, [T.text]), b("i", {
1173
+ onClick: (l) => b.enable && y(l, b)
1174
+ }, [e.shouldShowIcon(b) && g("i", {
1175
+ class: e.iconClass(b)
1176
+ }, null), g("span", null, [b.text]), g("i", {
1153
1177
  class: "f-icon f-icon-arrow-chevron-down",
1154
1178
  style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
1155
- }, null)]), r(T)]);
1179
+ }, null)]), s(b)]);
1156
1180
  }
1157
- function y() {
1158
- u();
1181
+ function h() {
1182
+ i();
1159
1183
  }
1160
1184
  return {
1161
- renderToolbarDropdown: S,
1162
- clearAllDropDown: y
1185
+ renderToolbarDropdown: w,
1186
+ clearAllDropDown: h
1163
1187
  };
1164
1188
  }
1165
1189
  const {
1166
- buildResponseToolbarItems: he
1167
- } = Se(), Z = /* @__PURE__ */ z({
1190
+ buildResponseToolbarItems: ge
1191
+ } = Se(), Z = /* @__PURE__ */ U({
1168
1192
  name: "FResponseToolbar",
1169
- props: ue,
1193
+ props: le,
1170
1194
  emits: ["click"],
1171
1195
  setup(n, e) {
1172
- const t = M(he(n.items)), r = M(), u = M(), h = M(), g = M(n.alignment), D = {
1196
+ const t = S(ge(n.items)), s = S(), i = S(), p = S(), u = S(n.alignment), y = {
1173
1197
  id: "__more_buttons__",
1174
1198
  text: "更多"
1175
- }, S = M(new J(D)), y = Ee(), T = F(() => S.value.children.length > 0), l = F(() => Y({
1199
+ }, w = S(new z(y)), h = xe(), b = N(() => w.value.children.length > 0), l = N(() => Y({
1176
1200
  "f-toolbar": !0,
1177
1201
  "f-response-toolbar": !0,
1178
1202
  "position-relative": !0
1179
- }, n.customClass)), i = F(() => ({
1203
+ }, n.customClass)), c = N(() => ({
1204
+ "w-100": !0,
1180
1205
  "d-flex": !0,
1181
1206
  "flex-nowrap": !0,
1182
- "justify-content-end": g.value === "right",
1183
- "justify-content-start": g.value === "left"
1207
+ "justify-content-end": u.value === "right",
1208
+ "justify-content-start": u.value === "left"
1184
1209
  })), {
1185
- renderToolbarDropdown: d,
1186
- clearAllDropDown: c
1187
- } = Ot(n, y);
1188
- function C() {
1189
- t.value.filter((f) => f.children && f.children.length > 0).forEach((f) => {
1190
- f.expanded = !1;
1191
- }), S.value.expanded = !1, c();
1210
+ renderToolbarDropdown: f,
1211
+ clearAllDropDown: v
1212
+ } = $t(n, h);
1213
+ function k() {
1214
+ t.value.filter((C) => C.children && C.children.length > 0).forEach((C) => {
1215
+ C.expanded = !1;
1216
+ }), w.value.expanded = !1, v();
1192
1217
  }
1193
- function w(f) {
1194
- const x = {
1218
+ function A(C) {
1219
+ const I = {
1195
1220
  btn: !0,
1196
1221
  "f-rt-btn": !0,
1197
- "f-btn-ml": g.value === "right",
1198
- "f-btn-mr": g.value === "left",
1199
- "btn-icontext": !!(f.icon && f.icon.trim())
1222
+ "f-btn-ml": u.value === "right",
1223
+ "f-btn-mr": u.value === "left",
1224
+ "btn-icontext": !!(C.icon && C.icon.trim())
1200
1225
  };
1201
- if (f.class) {
1202
- const k = f.class.split(" ");
1203
- k && k.length && k.reduce((p, s) => (p[s] = !0, p), x);
1226
+ if (C.class) {
1227
+ const O = C.class.split(" ");
1228
+ O && O.length && O.reduce((d, r) => (d[r] = !0, d), I);
1204
1229
  }
1205
- return x;
1230
+ return I;
1206
1231
  }
1207
- function j(f, x) {
1208
- document.body.click(), x.onClick(f, x.id), e.emit("click", f, x.id);
1232
+ function $(C, I) {
1233
+ document.body.click(), typeof I.onClick == "function" && I.onClick(C, I.id), e.emit("click", C, I.id);
1209
1234
  }
1210
- function I(f) {
1211
- return b("button", {
1235
+ function _(C) {
1236
+ return g("button", {
1212
1237
  type: "button",
1213
- class: w(f),
1214
- id: f.id,
1215
- disabled: !f.enable,
1216
- onClick: (x) => j(x, f)
1217
- }, [y.shouldShowIcon(f) && b("i", {
1218
- class: y.iconClass(f)
1219
- }, null), f.text]);
1238
+ class: A(C),
1239
+ id: C.id,
1240
+ disabled: !C.enable,
1241
+ onClick: (I) => $(I, C)
1242
+ }, [h.shouldShowIcon(C) && g("i", {
1243
+ class: h.iconClass(C)
1244
+ }, null), C.text]);
1220
1245
  }
1221
- const P = /* @__PURE__ */ new Map(), A = [];
1222
- function $(f) {
1223
- const x = h.value;
1224
- let k = f;
1225
- const p = Array.from(x.children), s = p[p.length - 1].id === "__more_buttons__" ? p[p.length - 1] : null;
1226
- if (s) {
1227
- const E = s.computedStyleMap().get("margin-left"), R = s.computedStyleMap().get("margin-right"), L = (E ? E.value : 0) + s.getBoundingClientRect().width + (R ? R.value : 0);
1228
- k -= L;
1246
+ const T = /* @__PURE__ */ new Map(), B = [];
1247
+ function P(C) {
1248
+ const I = p.value;
1249
+ let O = C;
1250
+ const d = Array.from(I.children), r = d[d.length - 1].id === "__more_buttons__" ? d[d.length - 1] : null;
1251
+ if (r) {
1252
+ const D = r.computedStyleMap().get("margin-left"), E = r.computedStyleMap().get("margin-right"), L = (D ? D.value : 0) + r.getBoundingClientRect().width + (E ? E.value : 0);
1253
+ O -= L;
1229
1254
  }
1230
- const o = p.filter((E) => E.id !== "__more_buttons__");
1231
- for (const E of o) {
1232
- const R = E.computedStyleMap().get("margin-left"), L = E.computedStyleMap().get("margin-right"), N = (R ? R.value : 0) + E.getBoundingClientRect().width + (L ? L.value : 0);
1233
- k < N ? (P.set(E.id, !0), A.push({
1234
- id: E.id,
1235
- width: N
1236
- })) : k -= N;
1255
+ const o = d.filter((D) => D.id !== "__more_buttons__");
1256
+ for (const D of o) {
1257
+ const E = D.computedStyleMap().get("margin-left"), L = D.computedStyleMap().get("margin-right"), j = (E ? E.value : 0) + D.getBoundingClientRect().width + (L ? L.value : 0);
1258
+ O < j ? (T.set(D.id, !0), B.push({
1259
+ id: D.id,
1260
+ width: j
1261
+ })) : O -= j;
1237
1262
  }
1238
- if (A.length)
1239
- for (let E = A.length - 1; E >= 0; E--) {
1240
- const R = A[E].width;
1241
- if (k >= R)
1242
- k -= R, P.delete(A[E].id), A.pop();
1263
+ if (B.length)
1264
+ for (let D = B.length - 1; D >= 0; D--) {
1265
+ const E = B[D].width;
1266
+ if (O >= E)
1267
+ O -= E, T.delete(B[D].id), B.pop();
1243
1268
  else
1244
1269
  break;
1245
1270
  }
1246
- const a = Object.assign({}, S.value);
1271
+ const a = Object.assign({}, w.value);
1247
1272
  a.children = [];
1248
- const m = new J(a), B = t.value.reduce((E, R) => (P.has(R.id) && m.children.push(R), R.visible = !P.has(R.id), E.push(R), E), []);
1249
- S.value = m, t.value = B;
1273
+ const m = new z(a), M = t.value.reduce((D, E) => (T.has(E.id) && m.children.push(E), E.visible = !T.has(E.id), D.push(E), D), []);
1274
+ w.value = m, t.value = M;
1250
1275
  }
1251
- const v = new ResizeObserver((f) => {
1252
- if (f.length) {
1253
- const k = f[0].contentRect.width, s = h.value.getBoundingClientRect().width;
1254
- (k < s || A.length) && ($(k), C());
1276
+ const x = new ResizeObserver((C) => {
1277
+ if (C.length) {
1278
+ const O = C[0].contentRect.width, r = p.value.getBoundingClientRect().width;
1279
+ (O < r || B.length) && (P(O), k());
1255
1280
  }
1256
1281
  });
1257
1282
  return H(() => {
1258
- const f = u.value;
1259
- v.observe(f), document.body.addEventListener("click", C), document.body.addEventListener("wheel", C);
1260
- }), ie(() => {
1261
- v.disconnect(), document.body.removeEventListener("click", C), document.body.removeEventListener("wheel", C);
1262
- }), G(() => n.items, () => {
1263
- t.value = he(n.items);
1283
+ const C = i.value;
1284
+ x.observe(C), document.body.addEventListener("click", k), document.body.addEventListener("wheel", k);
1285
+ }), ye(() => {
1286
+ x.disconnect(), document.body.removeEventListener("click", k), document.body.removeEventListener("wheel", k);
1287
+ }), q(() => n.items, () => {
1288
+ t.value = ge(n.items);
1264
1289
  }, {
1265
1290
  deep: !0
1266
1291
  }), e.expose({
1267
- elementRef: r
1268
- }), () => b("div", {
1292
+ elementRef: s
1293
+ }), () => g("div", {
1269
1294
  class: l.value,
1270
- ref: r
1271
- }, [b("div", {
1272
- ref: u,
1273
- class: i.value
1274
- }, [b("div", {
1275
- ref: h,
1295
+ ref: s
1296
+ }, [g("div", {
1297
+ ref: i,
1298
+ class: c.value
1299
+ }, [g("div", {
1300
+ ref: p,
1276
1301
  class: "d-inline-block f-response-content",
1277
1302
  style: "white-space: nowrap;"
1278
- }, [t.value.filter((f) => f.visible).map((f) => f.children && f.children.length > 0 ? d(f) : I(f)), T.value && d(S.value)])])]);
1303
+ }, [t.value.filter((C) => C.visible).map((C) => C.children && C.children.length > 0 ? f(C) : _(C)), b.value && f(w.value)])])]);
1279
1304
  }
1280
1305
  });
1281
- function $t(n, e) {
1282
- const t = V("design-item-context"), r = V("toolbar-item-handler", () => {
1306
+ function _t(n, e) {
1307
+ const t = V("design-item-context"), s = V("toolbar-item-handler", () => {
1283
1308
  });
1284
- function u() {
1285
- r && r();
1309
+ function i() {
1310
+ s && s();
1286
1311
  }
1287
- function h(s) {
1312
+ function p(r) {
1288
1313
  const o = {
1289
1314
  "dropdown-menu": !0
1290
1315
  };
1291
- if (s.class) {
1292
- const a = s.menuClass.split(" ");
1293
- a && a.length && a.reduce((m, B) => (m[B] = !0, m), o);
1316
+ if (r.class) {
1317
+ const a = r.menuClass.split(" ");
1318
+ a && a.length && a.reduce((m, M) => (m[M] = !0, m), o);
1294
1319
  }
1295
1320
  return o;
1296
1321
  }
1297
- function g(s) {
1322
+ function u(r) {
1298
1323
  const o = {
1299
- disabled: !s.enable,
1324
+ disabled: !r.enable,
1300
1325
  "dropdown-submenu": !0,
1301
1326
  "f-rt-dropdown": !0
1302
- }, a = s.dropdownClass.split(" ");
1303
- return a && a.length && a.reduce((m, B) => (m[B] = !0, m), o), o;
1327
+ }, a = r.dropdownClass.split(" ");
1328
+ return a && a.length && a.reduce((m, M) => (m[M] = !0, m), o), o;
1304
1329
  }
1305
- function D(s) {
1330
+ function y(r) {
1306
1331
  const o = {
1307
- disabled: !s.enable,
1332
+ disabled: !r.enable,
1308
1333
  "dropdown-item": !0,
1309
1334
  "f-rt-btn": !0,
1310
1335
  "position-relative": !0,
1311
1336
  "farris-component": !0
1312
- }, a = s.class.split(" ");
1313
- return a && a.length && a.reduce((m, B) => (m[B] = !0, m), o), o;
1314
- }
1315
- let S;
1316
- const y = /* @__PURE__ */ new Map();
1317
- function T(s, o, a) {
1318
- var B;
1319
- ((B = s.target) == null ? void 0 : B.id) === o.id && s.stopPropagation();
1337
+ }, a = r.class.split(" ");
1338
+ return a && a.length && a.reduce((m, M) => (m[M] = !0, m), o), o;
1339
+ }
1340
+ let w;
1341
+ const h = /* @__PURE__ */ new Map();
1342
+ function b(r, o, a) {
1343
+ var M;
1344
+ ((M = r.target) == null ? void 0 : M.id) === o.id && r.stopPropagation();
1320
1345
  const m = a ? a.id : "__top_item__";
1321
- if (o.children && o.children.length && (o.expanded = !o.expanded, o.expanded ? y.set(m, o) : y.delete(m)), y.has(m) && y.get(m) !== o) {
1322
- const E = y.get(m);
1323
- E && (E.expanded = !1);
1346
+ if (o.children && o.children.length && (o.expanded = !o.expanded, o.expanded ? h.set(m, o) : h.delete(m)), h.has(m) && h.get(m) !== o) {
1347
+ const D = h.get(m);
1348
+ D && (D.expanded = !1);
1324
1349
  }
1325
1350
  }
1326
- function l(s) {
1327
- s && (s.stopPropagation(), s.preventDefault());
1351
+ function l(r) {
1352
+ r && (r.stopPropagation(), r.preventDefault());
1328
1353
  }
1329
- function i() {
1354
+ function c() {
1330
1355
  Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
1331
- const s = document.getElementsByClassName("dgComponentSelected");
1332
- Array.from(s).forEach((o) => o.classList.remove("dgComponentSelected"));
1356
+ const r = document.getElementsByClassName("dgComponentSelected");
1357
+ Array.from(r).forEach((o) => o.classList.remove("dgComponentSelected"));
1333
1358
  }
1334
- function d(s) {
1335
- s.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
1359
+ function f(r) {
1360
+ r.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
1336
1361
  }
1337
- function c(s) {
1362
+ function v(r) {
1338
1363
  const {
1339
1364
  buttons: o = []
1340
1365
  } = t.schema;
1341
1366
  let a = [];
1342
- o.forEach((E) => {
1343
- a = a.concat(E.children || []);
1367
+ o.forEach((D) => {
1368
+ a = a.concat(D.children || []);
1344
1369
  });
1345
- const m = a.findIndex((E) => E.id === s), B = m === -1 ? null : a[m];
1370
+ const m = a.findIndex((D) => D.id === r), M = m === -1 ? null : a[m];
1346
1371
  return {
1347
1372
  index: m,
1348
- item: B
1373
+ item: M
1349
1374
  };
1350
1375
  }
1351
- function C(s) {
1376
+ function k(r) {
1352
1377
  const {
1353
1378
  buttons: o = []
1354
- } = t.schema, a = o.findIndex((B) => B.id === s), m = a === -1 ? null : o[a];
1379
+ } = t.schema, a = o.findIndex((M) => M.id === r), m = a === -1 ? null : o[a];
1355
1380
  return {
1356
1381
  index: a,
1357
1382
  item: m
1358
1383
  };
1359
1384
  }
1360
- function w(s) {
1385
+ function A(r) {
1361
1386
  var m;
1362
1387
  t.schema;
1363
1388
  const {
1364
1389
  index: o,
1365
1390
  item: a
1366
- } = c(s);
1391
+ } = v(r);
1367
1392
  (m = t == null ? void 0 : t.setupContext) == null || m.emit("selectionChange", a == null ? void 0 : a.type, a);
1368
1393
  }
1369
- const j = function(s) {
1394
+ const $ = function(r) {
1370
1395
  const {
1371
1396
  componentType: o
1372
- } = s, a = U(o, s), m = o.toLowerCase().replace("-", "_");
1397
+ } = r, a = Q(o, r), m = o.toLowerCase().replace("-", "_");
1373
1398
  return a && !a.id && a.type === o && (a.id = `${m}_${Math.random().toString().slice(2, 6)}`), a;
1374
- }, I = function() {
1375
- const s = {
1399
+ }, _ = function() {
1400
+ const r = {
1376
1401
  componentType: "response-toolbar-item",
1377
1402
  parentComponentInstance: e.value,
1378
1403
  targetPosition: -1
1379
1404
  };
1380
- return j(s);
1405
+ return $(r);
1381
1406
  };
1382
- function P(s, o) {
1383
- l(s), i(), d(s), w(o.id);
1407
+ function T(r, o) {
1408
+ l(r), c(), f(r), A(o.id);
1384
1409
  }
1385
- function A(s, o, a) {
1386
- l(s);
1387
- const m = o.id, B = a && a.id, {
1388
- buttons: E = []
1410
+ function B(r, o, a) {
1411
+ l(r);
1412
+ const m = o.id, M = a && a.id, {
1413
+ buttons: D = []
1389
1414
  } = t.schema;
1390
- if (!B)
1415
+ if (!M)
1391
1416
  return;
1392
1417
  const {
1393
- index: R
1394
- } = C(B);
1395
- if (R === -1)
1418
+ index: E
1419
+ } = k(M);
1420
+ if (E === -1)
1396
1421
  return;
1397
1422
  const {
1398
1423
  index: L
1399
- } = c(m);
1400
- L !== -1 && (E[R].children.splice(L, 1), u());
1424
+ } = v(m);
1425
+ L !== -1 && (D[E].children.splice(L, 1), i());
1401
1426
  }
1402
- function $(s, o, a) {
1403
- l(s);
1427
+ function P(r, o, a) {
1428
+ l(r);
1404
1429
  const m = a && a.id, {
1405
- buttons: B = []
1430
+ buttons: M = []
1406
1431
  } = t.schema;
1407
1432
  if (!m)
1408
1433
  return;
1409
1434
  const {
1410
- index: E
1411
- } = C(m);
1412
- if (E === -1)
1435
+ index: D
1436
+ } = k(m);
1437
+ if (D === -1)
1413
1438
  return;
1414
- const R = I(), L = Object.assign({}, R, {
1439
+ const E = _(), L = Object.assign({}, E, {
1415
1440
  text: o.text
1416
1441
  });
1417
- B[E].children.push(L), u();
1442
+ M[D].children.push(L), i();
1418
1443
  }
1419
- function v(s, o, a) {
1420
- l(s);
1444
+ function x(r, o, a) {
1445
+ l(r);
1421
1446
  const m = a && a.id, {
1422
- buttons: B = []
1447
+ buttons: M = []
1423
1448
  } = t.schema;
1424
1449
  if (!m)
1425
1450
  return;
1426
1451
  const {
1427
- index: E
1428
- } = C(m);
1429
- if (E === -1)
1452
+ index: D
1453
+ } = k(m);
1454
+ if (D === -1)
1430
1455
  return;
1431
- const R = I(), L = Object.assign({}, R, {
1456
+ const E = _(), L = Object.assign({}, E, {
1432
1457
  text: "按钮"
1433
1458
  });
1434
- B[E].children.push(L), u();
1459
+ M[D].children.push(L), i();
1435
1460
  }
1436
- function f(s, o) {
1437
- return b("div", {
1461
+ function C(r, o) {
1462
+ return g("div", {
1438
1463
  class: "component-btn-group"
1439
- }, [b("div", null, [b("div", {
1464
+ }, [g("div", null, [g("div", {
1440
1465
  role: "button",
1441
1466
  class: "btn component-settings-button",
1442
1467
  title: "删除",
1443
1468
  ref: "removeButton",
1444
1469
  style: "position:static;",
1445
- onClick: (a) => A(a, s, o)
1446
- }, [b("i", {
1470
+ onClick: (a) => B(a, r, o)
1471
+ }, [g("i", {
1447
1472
  class: "f-icon f-icon-yxs_delete"
1448
- }, null)]), b("div", {
1473
+ }, null)]), g("div", {
1449
1474
  role: "button",
1450
1475
  class: "btn component-settings-button",
1451
1476
  title: "复制",
1452
1477
  ref: "copyButton",
1453
1478
  style: "position:static;",
1454
- onClick: (a) => $(a, s, o)
1455
- }, [b("i", {
1479
+ onClick: (a) => P(a, r, o)
1480
+ }, [g("i", {
1456
1481
  class: "f-icon f-icon-yxs_copy"
1457
- }, null)]), b("div", {
1482
+ }, null)]), g("div", {
1458
1483
  role: "button",
1459
1484
  class: "btn component-settings-button",
1460
1485
  title: "新增同级",
1461
1486
  ref: "appendSame",
1462
1487
  style: "width:85px!important;padding:0 5px;position:static;",
1463
- onClick: (a) => v(a, s, o)
1464
- }, [b("i", {
1488
+ onClick: (a) => x(a, r, o)
1489
+ }, [g("i", {
1465
1490
  class: "f-icon f-icon-plus-circle text-white mr-1"
1466
- }, null), b("span", {
1491
+ }, null), g("span", {
1467
1492
  style: "font-size:13px;margin:auto"
1468
- }, [Q("新增同级")])])])]);
1493
+ }, [J("新增同级")])])])]);
1469
1494
  }
1470
- function x(s) {
1471
- return s.children.map((o) => o.children && o.children.length ? b("li", {
1472
- class: g(o),
1495
+ function I(r) {
1496
+ return r.children.map((o) => o.children && o.children.length ? g("li", {
1497
+ class: u(o),
1473
1498
  id: o.id,
1474
- onClick: (a) => o.enable && T(a, o, s)
1475
- }, [b("span", {
1499
+ onClick: (a) => o.enable && b(a, o, r)
1500
+ }, [g("span", {
1476
1501
  id: o.id,
1477
- class: D(o),
1478
- onMouseover: (a) => o.enable && T(a, o, s)
1479
- }, [o.text, b("i", {
1502
+ class: y(o),
1503
+ onMouseover: (a) => o.enable && b(a, o, r)
1504
+ }, [o.text, g("i", {
1480
1505
  class: "f-icon f-icon-arrow-chevron-right",
1481
1506
  style: "display: inline-block;float: right;line-height: 1.25rem;"
1482
- }, null)]), S(o, o)]) : b("li", {
1483
- class: D(o),
1507
+ }, null)]), w(o, o)]) : g("li", {
1508
+ class: y(o),
1484
1509
  id: o.id,
1485
- onClick: (a) => P(a, o)
1486
- }, [f(o, s), n.shouldShowIcon(o) && b("i", {
1510
+ onClick: (a) => T(a, o)
1511
+ }, [C(o, r), n.shouldShowIcon(o) && g("i", {
1487
1512
  class: n.iconClass(o)
1488
1513
  }, null), o.text]));
1489
1514
  }
1490
- function k(s, o, a) {
1515
+ function O(r, o, a) {
1491
1516
  const m = {
1492
- display: s.expanded ? "block" : "none",
1517
+ display: r.expanded ? "block" : "none",
1493
1518
  position: "fixed",
1494
1519
  maxWidth: "300px",
1495
1520
  width: "auto",
1496
1521
  minWidth: "120px"
1497
- }, B = document.getElementsByTagName("body")[0].getClientRects()[0].width, E = o, R = E == null ? void 0 : E.getClientRects();
1498
- if (E && R && R.length) {
1522
+ }, M = document.getElementsByTagName("body")[0].getClientRects()[0].width, D = o, E = D == null ? void 0 : D.getClientRects();
1523
+ if (D && E && E.length) {
1499
1524
  const {
1500
1525
  top: L,
1501
- width: N,
1502
- left: _,
1526
+ width: j,
1527
+ left: F,
1503
1528
  right: W,
1504
- height: q
1505
- } = R[0], te = Math.ceil(q + L);
1506
- m.top = `${te}px`, m.left = `${_}px`;
1507
- const Re = s.id + "_menu", ne = o ? o.querySelector("#" + Re) : null;
1508
- if (ne) {
1509
- m.display === "block" && (ne.style.display = "block");
1510
- const fe = ne.getBoundingClientRect();
1529
+ height: G
1530
+ } = E[0], Re = Math.ceil(G + L);
1531
+ m.top = `${Re}px`, m.left = `${F}px`;
1532
+ const Ae = r.id + "_menu", te = o ? o.querySelector("#" + Ae) : null;
1533
+ if (te) {
1534
+ m.display === "block" && (te.style.display = "block");
1535
+ const de = te.getBoundingClientRect();
1511
1536
  if (a) {
1512
1537
  m.top = `${L - 6}px`;
1513
- const Ie = Math.ceil(N + _);
1514
- m.left = `${Ie}px`;
1538
+ const Oe = Math.ceil(j + F);
1539
+ m.left = `${Oe}px`;
1515
1540
  }
1516
- B - _ - N < fe.width && (m.left = `${(a ? _ : W) - fe.width}px`);
1541
+ M - F - j < de.width && (m.left = `${(a ? F : W) - de.width}px`);
1517
1542
  }
1518
1543
  }
1519
1544
  return m;
1520
1545
  }
1521
- S = function(s, o) {
1522
- var E, R;
1523
- const a = ve(), m = o ? o.id : s.id, B = (R = (E = a == null ? void 0 : a.exposed) == null ? void 0 : E.elementRef.value) == null ? void 0 : R.querySelector("#" + m);
1524
- return b("ul", {
1525
- class: h(s),
1526
- style: k(s, B, o),
1527
- id: s.id + "_menu"
1528
- }, [x(s)]);
1546
+ w = function(r, o) {
1547
+ var D, E;
1548
+ const a = be(), m = o ? o.id : r.id, M = (E = (D = a == null ? void 0 : a.exposed) == null ? void 0 : D.elementRef.value) == null ? void 0 : E.querySelector("#" + m);
1549
+ return g("ul", {
1550
+ class: p(r),
1551
+ style: O(r, M, o),
1552
+ id: r.id + "_menu"
1553
+ }, [I(r)]);
1529
1554
  };
1530
- function p() {
1531
- y.forEach((s) => {
1532
- s.expanded = !1;
1533
- }), y.clear();
1555
+ function d() {
1556
+ h.forEach((r) => {
1557
+ r.expanded = !1;
1558
+ }), h.clear();
1534
1559
  }
1535
1560
  return {
1536
- renderDropdownMenu: S,
1537
- clearAllDropDownMenu: p
1561
+ renderDropdownMenu: w,
1562
+ clearAllDropDownMenu: d
1538
1563
  };
1539
1564
  }
1540
1565
  function Nt(n, e, t) {
1541
- const r = M(n.alignment), {
1542
- renderDropdownMenu: u,
1543
- clearAllDropDownMenu: h
1544
- } = $t(e, t), g = V("design-item-context"), D = V("toolbar-item-handler", () => {
1566
+ const s = S(n.alignment), {
1567
+ renderDropdownMenu: i,
1568
+ clearAllDropDownMenu: p
1569
+ } = _t(e, t), u = V("design-item-context"), y = V("toolbar-item-handler", () => {
1545
1570
  });
1546
- function S() {
1547
- D && D();
1571
+ function w() {
1572
+ y && y();
1548
1573
  }
1549
- function y(p) {
1550
- const s = {
1574
+ function h(d) {
1575
+ const r = {
1551
1576
  "btn-group": !0,
1552
1577
  "f-rt-dropdown": !0,
1553
- "f-btn-ml": r.value === "right",
1554
- "f-btn-mr": r.value === "left"
1555
- }, o = p.dropdownClass.split(" ");
1556
- return o && o.length && o.reduce((a, m) => (a[m] = !0, a), s), s;
1578
+ "f-btn-ml": s.value === "right",
1579
+ "f-btn-mr": s.value === "left"
1580
+ }, o = d.dropdownClass.split(" ");
1581
+ return o && o.length && o.reduce((a, m) => (a[m] = !0, a), r), r;
1557
1582
  }
1558
- function T(p) {
1559
- const s = {
1583
+ function b(d) {
1584
+ const r = {
1560
1585
  btn: !0,
1561
- disabled: !p.enable,
1586
+ disabled: !d.enable,
1562
1587
  "position-relative": !0,
1563
1588
  "farris-component": !0,
1564
1589
  "f-rt-btn": !0,
1565
- "btn-icontext": !!(p.icon && p.icon.trim())
1590
+ "btn-icontext": !!(d.icon && d.icon.trim())
1566
1591
  };
1567
- if (p.class) {
1568
- const o = p.class.split(" ");
1569
- o && o.length && o.reduce((a, m) => (a[m] = !0, a), s);
1592
+ if (d.class) {
1593
+ const o = d.class.split(" ");
1594
+ o && o.length && o.reduce((a, m) => (a[m] = !0, a), r);
1570
1595
  }
1571
- return s;
1596
+ return r;
1572
1597
  }
1573
- function l(p) {
1574
- p && (p.stopPropagation(), p.preventDefault());
1598
+ function l(d) {
1599
+ d && (d.stopPropagation(), d.preventDefault());
1575
1600
  }
1576
- function i(p, s) {
1577
- l(p);
1578
- const o = s.expanded;
1579
- document.body.click(), s.expanded = !o;
1601
+ function c(d, r) {
1602
+ l(d);
1603
+ const o = r.expanded;
1604
+ document.body.click(), r.expanded = !o;
1580
1605
  }
1581
- const d = function(p) {
1606
+ const f = function(d) {
1582
1607
  const {
1583
- componentType: s
1584
- } = p, o = U(s, p), a = s.toLowerCase().replace("-", "_");
1585
- return o && !o.id && o.type === s && (o.id = `${a}_${Math.random().toString().slice(2, 6)}`), o;
1586
- }, c = function() {
1587
- const p = {
1608
+ componentType: r
1609
+ } = d, o = Q(r, d), a = r.toLowerCase().replace("-", "_");
1610
+ return o && !o.id && o.type === r && (o.id = `${a}_${Math.random().toString().slice(2, 6)}`), o;
1611
+ }, v = function() {
1612
+ const d = {
1588
1613
  componentType: "response-toolbar-item",
1589
1614
  parentComponentInstance: t.value,
1590
1615
  targetPosition: -1
1591
1616
  };
1592
- return d(p);
1617
+ return f(d);
1593
1618
  };
1594
- function C(p) {
1595
- const s = g.schema.buttons || g.schema.contents, o = s == null ? void 0 : s.findIndex((m) => m.id === p), a = o === -1 ? null : s[o];
1619
+ function k(d) {
1620
+ const r = u.schema.buttons || u.schema.contents, o = r == null ? void 0 : r.findIndex((m) => m.id === d), a = o === -1 ? null : r[o];
1596
1621
  return {
1597
1622
  index: o,
1598
1623
  toolbarItem: a
1599
1624
  };
1600
1625
  }
1601
- function w(p, s) {
1602
- var R;
1626
+ function A(d, r) {
1627
+ var E;
1603
1628
  const {
1604
1629
  index: o,
1605
1630
  toolbarItem: a
1606
- } = C(s);
1631
+ } = k(r);
1607
1632
  if (o === -1)
1608
1633
  return;
1609
- const m = a.text || "按钮", B = c(), E = Object.assign({}, B, {
1634
+ const m = a.text || "按钮", M = v(), D = Object.assign({}, M, {
1610
1635
  text: m
1611
1636
  });
1612
- (R = g.schema.buttons) == null || R.push(E), S();
1637
+ (E = u.schema.buttons) == null || E.push(D), w();
1613
1638
  }
1614
- function j(p, s) {
1639
+ function $(d, r) {
1615
1640
  const {
1616
1641
  index: o,
1617
1642
  toolbarItem: a
1618
- } = C(s);
1643
+ } = k(r);
1619
1644
  if (o === -1)
1620
1645
  return;
1621
- const m = a.text || "按钮", B = c(), E = Object.assign({}, B, {
1646
+ const m = a.text || "按钮", M = v(), D = Object.assign({}, M, {
1622
1647
  text: m
1623
- }), R = g.schema.buttons[o].children || [];
1624
- R.push(E), g.schema.buttons[o].children = R, S();
1648
+ }), E = u.schema.buttons[o].children || [];
1649
+ E.push(D), u.schema.buttons[o].children = E, w();
1625
1650
  }
1626
- function I(p, s) {
1627
- const o = g.schema.buttons || g.schema.contents, a = o == null ? void 0 : o.findIndex((m) => m.id === s);
1628
- a !== -1 && (o.splice(a, 1), S());
1651
+ function _(d, r) {
1652
+ const o = u.schema.buttons || u.schema.contents, a = o == null ? void 0 : o.findIndex((m) => m.id === r);
1653
+ a !== -1 && (o.splice(a, 1), w());
1629
1654
  }
1630
- function P(p) {
1631
- return b("div", {
1655
+ function T(d) {
1656
+ return g("div", {
1632
1657
  class: "component-btn-group"
1633
- }, [b("div", null, [b("div", {
1658
+ }, [g("div", null, [g("div", {
1634
1659
  role: "button",
1635
1660
  class: "btn component-settings-button",
1636
1661
  title: "删除",
1637
1662
  ref: "removeButton",
1638
1663
  style: "position:static;",
1639
- onClick: (s) => I(s, p)
1640
- }, [b("i", {
1664
+ onClick: (r) => _(r, d)
1665
+ }, [g("i", {
1641
1666
  class: "f-icon f-icon-yxs_delete"
1642
- }, null)]), b("div", {
1667
+ }, null)]), g("div", {
1643
1668
  role: "button",
1644
1669
  class: "btn component-settings-button",
1645
1670
  title: "复制",
1646
1671
  ref: "copyButton",
1647
1672
  style: "position:static;",
1648
- onClick: (s) => w(s, p)
1649
- }, [b("i", {
1673
+ onClick: (r) => A(r, d)
1674
+ }, [g("i", {
1650
1675
  class: "f-icon f-icon-yxs_copy"
1651
- }, null)]), b("div", {
1676
+ }, null)]), g("div", {
1652
1677
  role: "button",
1653
1678
  class: "btn component-settings-button",
1654
1679
  title: "新增子级",
1655
1680
  ref: "appendChildButton",
1656
1681
  style: "width:85px!important;padding:0 5px;position:static;",
1657
- onClick: (s) => j(s, p)
1658
- }, [b("i", {
1682
+ onClick: (r) => $(r, d)
1683
+ }, [g("i", {
1659
1684
  class: "f-icon f-icon-plus-circle text-white mr-1"
1660
- }, null), b("span", {
1685
+ }, null), g("span", {
1661
1686
  style: "font-size:13px;margin:auto"
1662
- }, [Q("新增子级")])])])]);
1687
+ }, [J("新增子级")])])])]);
1663
1688
  }
1664
- function A() {
1665
- Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((s) => s.classList.remove("dgComponentFocused"));
1666
- const p = document.getElementsByClassName("dgComponentSelected");
1667
- Array.from(p).forEach((s) => s.classList.remove("dgComponentSelected"));
1689
+ function B() {
1690
+ Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((r) => r.classList.remove("dgComponentFocused"));
1691
+ const d = document.getElementsByClassName("dgComponentSelected");
1692
+ Array.from(d).forEach((r) => r.classList.remove("dgComponentSelected"));
1668
1693
  }
1669
- function $(p) {
1670
- p.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
1694
+ function P(d) {
1695
+ d.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
1671
1696
  }
1672
- function v(p) {
1697
+ function x(d) {
1673
1698
  var m;
1674
- const s = g.schema.buttons || g.schema.contents, o = s == null ? void 0 : s.findIndex((B) => B.id === p);
1699
+ const r = u.schema.buttons || u.schema.contents, o = r == null ? void 0 : r.findIndex((M) => M.id === d);
1675
1700
  if (o === -1)
1676
1701
  return;
1677
- const a = s[o];
1678
- (m = g == null ? void 0 : g.setupContext) == null || m.emit("selectionChange", "response-toolbar-item", a);
1679
- }
1680
- function f(p, s) {
1681
- l(p), A(), $(p), l(p), i(p, s), v(s.id);
1682
- }
1683
- function x(p) {
1684
- return b("div", {
1685
- id: p.id,
1686
- class: y(p)
1687
- }, [b("div", {
1688
- class: T(p),
1702
+ const a = r[o];
1703
+ (m = u == null ? void 0 : u.setupContext) == null || m.emit("selectionChange", "response-toolbar-item", a);
1704
+ }
1705
+ function C(d, r) {
1706
+ l(d), B(), P(d), l(d), c(d, r), x(r.id);
1707
+ }
1708
+ function I(d) {
1709
+ return g("div", {
1710
+ id: d.id,
1711
+ class: h(d)
1712
+ }, [g("div", {
1713
+ class: b(d),
1689
1714
  style: "display: flex;padding-right: 0.1rem;",
1690
- onClick: (s) => p.enable && f(s, p)
1691
- }, [P(p.id), e.shouldShowIcon(p) && b("i", {
1692
- class: e.iconClass(p)
1693
- }, null), b("span", null, [p.text]), b("i", {
1715
+ onClick: (r) => d.enable && C(r, d)
1716
+ }, [T(d.id), e.shouldShowIcon(d) && g("i", {
1717
+ class: e.iconClass(d)
1718
+ }, null), g("span", null, [d.text]), g("i", {
1694
1719
  class: "f-icon f-icon-arrow-chevron-down",
1695
1720
  style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
1696
- }, null)]), u(p)]);
1697
- }
1698
- function k() {
1699
- h();
1721
+ }, null)]), i(d)]);
1700
1722
  }
1701
- return {
1702
- renderToolbarDropdown: x,
1703
- clearAllDropDown: k
1704
- };
1705
- }
1706
- function _t() {
1707
- function n(e) {
1708
- var u, h;
1709
- if (!e)
1710
- return !1;
1711
- const t = ((u = e.targetContainer) == null ? void 0 : u.componentInstance) && e.targetContainer.componentInstance.value;
1712
- if (!t)
1713
- return !1;
1714
- const r = (h = t.schema.appearance) == null ? void 0 : h.class;
1715
- if (e.controlCategory === "input" || e.controlType === "form-group") {
1716
- const g = t.schema.type, D = (g === "response-form" || g === "content-container") && r && r.includes("farris-form");
1717
- if (t.schema.type !== "response-layout-item" && !D)
1718
- return !1;
1719
- }
1720
- return e.controlType !== "field-set";
1723
+ function O() {
1724
+ p();
1721
1725
  }
1722
1726
  return {
1723
- basalDragulaRuleForContainer: n
1727
+ renderToolbarDropdown: I,
1728
+ clearAllDropDown: O
1724
1729
  };
1725
1730
  }
1726
- const Ft = "https://json-schema.org/draft/2020-12/schema", Lt = "https://farris-design.gitee.io/dragging-rules.schema.json", Vt = "Dragging Rules", Wt = "The rules of designer canvas", Ut = "object", qt = {
1727
- "f-page": {
1728
- description: "The root class of page designed by farris.",
1729
- type: "object",
1730
- properties: {
1731
- contents: {
1732
- type: "object",
1733
- properties: {
1734
- "f-page-header": {
1735
- description: "The class of page header designed by farris.",
1736
- type: "string"
1737
- },
1738
- "f-page-main": {
1739
- description: "The class of page body designed by farris.",
1740
- type: "object",
1741
- properties: {
1742
- contents: {
1743
- type: "object",
1744
- properties: {
1745
- "f-struct-like-card": {
1746
- description: "",
1747
- type: "object",
1748
- properties: {
1749
- contents: {
1750
- type: "object",
1751
- properties: {
1752
- "f-struct-form": {
1753
- description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
1754
- type: "object",
1755
- properties: {
1756
- contents: {
1757
- type: "object",
1758
- properties: {
1759
- "f-section-form": {
1760
- description: "The class of section which has wrapped a reponse-form component.",
1761
- type: "object",
1762
- properties: {
1763
- contents: {
1764
- type: "object",
1765
- properties: {
1766
- "f-form-layout": {
1767
- description: "The class of reponse form",
1768
- type: "object",
1769
- properties: {
1770
- rules: {
1771
- type: "object",
1772
- properties: {
1773
- canAccept: {
1774
- type: "boolean",
1775
- const: !0
1776
- },
1777
- fixed: {
1778
- type: "boolean",
1779
- const: !0
1780
- },
1781
- hidePadding: {
1782
- type: "boolean",
1783
- const: !1
1784
- }
1785
- }
1786
- }
1787
- }
1788
- }
1789
- }
1790
- },
1791
- rules: {
1792
- type: "object",
1793
- properties: {
1794
- canAccept: {
1795
- type: "boolean",
1796
- const: !1
1797
- },
1798
- fixed: {
1799
- type: "boolean",
1800
- const: !0
1801
- },
1802
- hidePadding: {
1803
- type: "boolean",
1804
- const: !0
1805
- }
1806
- }
1807
- }
1808
- }
1809
- }
1810
- }
1811
- },
1812
- rules: {
1813
- type: "object",
1814
- properties: {
1815
- canAccept: {
1816
- type: "boolean",
1817
- const: !1
1818
- },
1819
- fixed: {
1820
- type: "boolean",
1821
- const: !1
1822
- },
1823
- hidePadding: {
1824
- type: "boolean",
1825
- const: !0
1826
- }
1827
- }
1828
- }
1829
- }
1830
- },
1831
- "f-struct-wrapper": {
1832
- description: "",
1833
- type: "object",
1834
- properties: {
1835
- contents: {
1836
- type: "object",
1837
- properties: {
1838
- "f-section-tabs": {
1839
- description: "The class of section which has wrapped sub-grid tabs.",
1840
- type: "object",
1841
- properties: {
1842
- contents: {
1843
- type: "object",
1844
- properties: {
1845
- "f-tabs-in-card": {
1846
- description: "The class of tabs which contains sub-grid.",
1847
- type: "object",
1848
- properties: {
1849
- contents: {
1850
- type: "object",
1851
- properties: {
1852
- "f-struct-data-grid-in-card": {
1853
- description: "The class of sub-grid component",
1854
- type: "object",
1855
- properties: {
1856
- contents: {
1857
- type: "object",
1858
- properties: {
1859
- "f-grid-is-sub": {
1860
- description: "The class of sub-grid",
1861
- type: "object",
1862
- properties: {
1863
- rules: {
1864
- type: "object",
1865
- properties: {
1866
- canAccept: {
1867
- type: "boolean",
1868
- const: !0
1869
- },
1870
- fixed: {
1871
- type: "boolean",
1872
- const: !0
1873
- },
1874
- hidePadding: {
1875
- type: "boolean",
1876
- const: !1
1877
- }
1878
- }
1879
- }
1880
- }
1881
- }
1882
- }
1883
- },
1884
- rules: {
1885
- type: "object",
1886
- properties: {
1887
- canAccept: {
1888
- type: "boolean",
1889
- const: !1
1890
- },
1891
- fixed: {
1892
- type: "boolean",
1893
- const: !1
1894
- },
1895
- hidePadding: {
1896
- type: "boolean",
1897
- const: !0
1898
- }
1899
- }
1900
- }
1901
- }
1902
- }
1903
- }
1904
- },
1905
- rules: {
1906
- type: "object",
1907
- properties: {
1908
- canAccept: {
1909
- type: "boolean",
1910
- const: !1
1911
- },
1912
- fixed: {
1913
- type: "boolean",
1914
- const: !0
1915
- },
1916
- hidePadding: {
1917
- type: "boolean",
1918
- const: !0
1919
- }
1920
- }
1921
- }
1922
- }
1923
- }
1924
- }
1925
- },
1926
- rules: {
1927
- type: "object",
1928
- properties: {
1929
- canAccept: {
1930
- type: "boolean",
1931
- const: !1
1932
- },
1933
- fixed: {
1934
- type: "boolean",
1935
- const: !0
1936
- },
1937
- hidePadding: {
1938
- type: "boolean",
1939
- const: !0
1940
- }
1941
- }
1942
- }
1943
- }
1944
- },
1945
- "f-section-in-main": {
1946
- description: "The class of section which has wrapped a reponse-form component.",
1947
- type: "object",
1948
- properties: {
1949
- rules: {
1950
- type: "object",
1951
- properties: {
1952
- canAccept: {
1953
- type: "boolean",
1954
- const: !0
1955
- },
1956
- fixed: {
1957
- type: "boolean",
1958
- const: !0
1959
- },
1960
- hidePadding: {
1961
- type: "boolean",
1962
- const: !1
1963
- }
1964
- }
1965
- }
1966
- }
1967
- }
1968
- }
1969
- },
1970
- rules: {
1971
- type: "object",
1972
- properties: {
1973
- canAccept: {
1974
- type: "boolean",
1975
- const: !1
1976
- },
1977
- fixed: {
1978
- type: "boolean",
1979
- const: !1
1980
- },
1981
- hidePadding: {
1982
- type: "boolean",
1983
- const: !0
1984
- }
1985
- }
1986
- }
1987
- }
1988
- }
1989
- }
1990
- },
1991
- rules: {
1992
- type: "object",
1993
- properties: {
1994
- canAccept: {
1995
- type: "boolean",
1996
- const: !0
1997
- },
1998
- fixed: {
1999
- type: "boolean",
2000
- const: !0
2001
- },
2002
- hidePadding: {
2003
- type: "object",
2004
- const: {
2005
- allOf: [
2006
- {
2007
- sibling: 0,
2008
- parent: {
2009
- "f-page-main": !0
2010
- }
2011
- }
2012
- ]
2013
- }
2014
- }
2015
- }
2016
- }
2017
- }
2018
- },
2019
- "f-struct-data-grid": {
2020
- description: "",
2021
- type: "object",
2022
- properties: {
2023
- rules: {
2024
- type: "object",
2025
- properties: {
2026
- canAccept: {
2027
- type: "object",
2028
- const: !0
2029
- },
2030
- fixed: {
2031
- type: "boolean",
2032
- const: !0
2033
- },
2034
- hidePadding: {
2035
- type: "boolean",
2036
- const: !0
2037
- }
2038
- }
2039
- }
2040
- }
2041
- },
2042
- "f-page-main-content": {
2043
- description: "",
2044
- type: "object",
2045
- properties: {
2046
- contents: {
2047
- type: "object",
2048
- properties: {
2049
- "f-page-content-nav": {
2050
- description: "",
2051
- type: "object",
2052
- properties: {
2053
- contents: {
2054
- type: "object",
2055
- properties: {
2056
- "f-struct-data-grid-in-nav": {
2057
- description: "",
2058
- type: "object",
2059
- properties: {
2060
- contents: {
2061
- type: "object",
2062
- properties: {
2063
- "f-page-content-nav-extend": {
2064
- description: "",
2065
- type: "object"
2066
- },
2067
- "f-section-in-nav": {
2068
- description: "",
2069
- type: "object",
2070
- properties: {
2071
- rules: {
2072
- type: "object",
2073
- properties: {
2074
- canAccept: {
2075
- type: "boolean",
2076
- const: !1
2077
- },
2078
- fixed: {
2079
- type: "boolean",
2080
- const: !0
2081
- },
2082
- hidePadding: {
2083
- type: "boolean",
2084
- const: !1
2085
- }
2086
- }
2087
- }
2088
- }
2089
- }
2090
- }
2091
- },
2092
- rules: {
2093
- type: "object",
2094
- properties: {
2095
- canAccept: {
2096
- type: "boolean",
2097
- const: !0
2098
- },
2099
- fixed: {
2100
- type: "boolean",
2101
- const: !1
2102
- },
2103
- hidePadding: {
2104
- type: "boolean",
2105
- const: !0
2106
- }
2107
- }
2108
- }
2109
- }
2110
- }
2111
- }
2112
- }
2113
- }
2114
- },
2115
- "f-page-content-main": {
2116
- description: "",
2117
- type: "object",
2118
- properties: {}
2119
- }
2120
- }
2121
- }
2122
- }
2123
- },
2124
- "f-page-content": {
2125
- description: "",
2126
- type: "object",
2127
- properties: {
2128
- contents: {
2129
- type: "object",
2130
- properties: {
2131
- "f-page-content-nav": {
2132
- description: "",
2133
- type: "object",
2134
- properties: {
2135
- contents: {
2136
- type: "object",
2137
- properties: {
2138
- "f-list-nav": {
2139
- description: "",
2140
- type: "object"
2141
- },
2142
- "f-list-nav-left": {
2143
- description: "",
2144
- type: "object"
2145
- },
2146
- "f-struct-data-grid-in-nav": {
2147
- description: "",
2148
- type: "object",
2149
- properties: {
2150
- contents: {
2151
- type: "object",
2152
- properties: {
2153
- "f-section-form": {
2154
- description: "",
2155
- type: "object",
2156
- properties: {
2157
- rules: {
2158
- type: "object",
2159
- properties: {
2160
- canAccept: {
2161
- type: "boolean",
2162
- const: !1
2163
- },
2164
- fixed: {
2165
- type: "boolean",
2166
- const: !0
2167
- },
2168
- hidePadding: {
2169
- type: "boolean",
2170
- const: !0
2171
- }
2172
- }
2173
- }
2174
- }
2175
- },
2176
- "f-section-grid": {
2177
- description: "",
2178
- type: "object",
2179
- properties: {
2180
- rules: {
2181
- type: "object",
2182
- properties: {
2183
- canAccept: {
2184
- type: "boolean",
2185
- const: !1
2186
- },
2187
- fixed: {
2188
- type: "boolean",
2189
- const: !0
2190
- },
2191
- hidePadding: {
2192
- type: "boolean",
2193
- const: !0
2194
- }
2195
- }
2196
- }
2197
- }
2198
- }
2199
- }
2200
- },
2201
- rules: {
2202
- type: "object",
2203
- properties: {
2204
- canAccept: {
2205
- type: "boolean",
2206
- const: !1
2207
- },
2208
- fixed: {
2209
- type: "boolean",
2210
- const: !0
2211
- },
2212
- hidePadding: {
2213
- type: "boolean",
2214
- const: !0
2215
- }
2216
- }
2217
- }
2218
- }
2219
- }
2220
- }
2221
- }
2222
- },
2223
- rules: {
2224
- type: "object",
2225
- properties: {
2226
- canAccept: {
2227
- type: "boolean",
2228
- const: !1
2229
- },
2230
- fixed: {
2231
- type: "boolean",
2232
- const: !0
2233
- },
2234
- hidePadding: {
2235
- type: "boolean",
2236
- const: !0
2237
- }
2238
- }
2239
- }
2240
- },
2241
- "f-page-content-main": {
2242
- description: "",
2243
- type: "object",
2244
- properties: {
2245
- rules: {
2246
- type: "object",
2247
- properties: {
2248
- canAccept: {
2249
- type: "boolean",
2250
- const: !1
2251
- },
2252
- fixed: {
2253
- type: "boolean",
2254
- const: !1
2255
- },
2256
- hidePadding: {
2257
- type: "boolean",
2258
- const: !0
2259
- }
2260
- }
2261
- }
2262
- }
2263
- }
2264
- }
2265
- },
2266
- rules: {
2267
- type: "object",
2268
- properties: {
2269
- canAccept: {
2270
- type: "boolean",
2271
- const: !1
2272
- },
2273
- fixed: {
2274
- type: "boolean",
2275
- const: !0
2276
- },
2277
- hidePadding: {
2278
- type: "boolean",
2279
- const: !0
2280
- }
2281
- }
2282
- }
2283
- }
2284
- }
2285
- }
2286
- },
2287
- rules: {
2288
- type: "object",
2289
- properties: {
2290
- canAccept: {
2291
- type: "object",
2292
- const: {
2293
- anyOf: [
2294
- {
2295
- children: 0
2296
- },
2297
- {
2298
- children: {
2299
- length: {
2300
- not: 1
2301
- },
2302
- "f-struct-like-card": !0
2303
- }
2304
- },
2305
- {
2306
- children: {
2307
- "scroll-spy": !1,
2308
- "f-page-content": !1,
2309
- "f-struct-like-card": !1
2310
- }
2311
- }
2312
- ]
2313
- }
2314
- },
2315
- fixed: {
2316
- type: "boolean",
2317
- const: !0
2318
- },
2319
- hidePadding: {
2320
- type: "boolean",
2321
- const: !0
2322
- }
2323
- }
2324
- }
2325
- }
2326
- },
2327
- "f-page-footer": {
2328
- description: "The class of page footer designed by farris.",
2329
- type: "string"
2330
- }
2331
- }
2332
- },
2333
- rules: {
2334
- type: "object",
2335
- properties: {
2336
- canAccept: {
2337
- type: "boolean",
2338
- const: !1
2339
- },
2340
- fixed: {
2341
- type: "boolean",
2342
- const: !0
2343
- },
2344
- hidePadding: {
2345
- type: "boolean",
2346
- const: !0
2347
- }
2348
- }
2349
- }
2350
- }
2351
- },
2352
- "f-page-is-managelist": {
2353
- description: "The root class of mangement list page.",
2354
- type: "string"
2355
- },
2356
- "f-page-card": {
2357
- description: "",
2358
- type: "object"
2359
- },
2360
- "f-page-is-mainsubcard": {
2361
- description: "",
2362
- type: "object"
2363
- }
2364
- }, Ht = {
2365
- $schema: Ft,
2366
- $id: Lt,
2367
- title: Vt,
2368
- description: Wt,
2369
- type: Ut,
2370
- properties: qt
2371
- }, se = /* @__PURE__ */ new Map();
2372
- function Me() {
2373
- function n(c, C, w, j) {
2374
- var I;
2375
- if (typeof w == "number")
2376
- return ((I = j[c]) == null ? void 0 : I.length) === w;
2377
- if (typeof w == "object") {
2378
- const P = Object.keys(w)[0], A = w[P];
2379
- if (P === "not")
2380
- return Number(j[c].length) !== Number(A);
2381
- if (P === "moreThan")
2382
- return Number(j[c].length) >= Number(A);
2383
- if (P === "lessThan")
2384
- return Number(j[c].length) <= Number(A);
2385
- }
2386
- return !1;
2387
- }
2388
- function e(c, C, w, j) {
2389
- return typeof w == "boolean" ? j.childrenClassList.includes(C) === !!w : !1;
2390
- }
2391
- function t(c, C, w, j) {
2392
- return typeof w == "boolean" ? j.parentClassList.includes(C) === !!w : !1;
2393
- }
2394
- function r(c, C, w, j) {
2395
- return typeof w == "boolean" ? j.parentClassList.includes(C) === !!w : !1;
2396
- }
2397
- const u = /* @__PURE__ */ new Map([
2398
- ["length", n],
2399
- ["hasChildren", e],
2400
- ["hasSibling", r],
2401
- ["hasParent", t]
2402
- ]);
2403
- function h(c, C) {
2404
- const w = c;
2405
- return typeof C == "number" ? [{ target: w, operator: "length", param: null, value: Number(C) }] : typeof C == "object" ? Object.keys(C).map((j) => {
2406
- if (j === "length")
2407
- return { target: w, operator: "length", param: null, value: C[j] };
2408
- const I = j, P = C[j];
2409
- return { target: w, operator: c === "children" ? "hasChildren" : c === "parent" ? "hasParent" : "hasSibling", param: I, value: P };
2410
- }) : [];
2411
- }
2412
- function g(c, C) {
2413
- if (u.has(c.operator)) {
2414
- const w = u.get(c.operator);
2415
- return w && w(c.target, c.param, c.value, C) || !1;
2416
- }
2417
- return !1;
2418
- }
2419
- function D(c, C) {
2420
- return Object.keys(c).reduce((P, A) => {
2421
- const $ = h(A, c[A]);
2422
- return P.push(...$), P;
2423
- }, []).reduce((P, A) => P && g(A, C), !0);
2424
- }
2425
- function S(c, C) {
2426
- const w = Object.keys(c), j = w.includes("allOf"), I = w.includes("anyOf"), P = j || I, v = (P ? c[P ? j ? "allOf" : "anyOf" : "allOf"] : [c]).map((x) => D(x, C));
2427
- return j ? !v.includes(!1) : v.includes(!0);
2428
- }
2429
- function y(c, C) {
2430
- const w = c.const;
2431
- return w ? typeof w == "boolean" ? w : typeof w == "object" ? S(w, C) : !1 : !1;
2432
- }
2433
- function T(c) {
2434
- return (C) => {
2435
- const w = { canAccept: !0, fixed: !1, hidePadding: !1 };
2436
- return c && c.properties && Object.keys(c.properties).reduce((j, I) => {
2437
- const P = c.properties[I];
2438
- return j[I] = y(P, C), j;
2439
- }, w), w;
2440
- };
2441
- }
2442
- function l(c, C, w) {
2443
- if (C.type === "object" && C.properties) {
2444
- const { rules: j, contents: I } = C.properties;
2445
- w.set(c, T(j)), I && Object.keys(I.properties).forEach(
2446
- (P) => l(P, I.properties[P], w)
2447
- );
2448
- }
2449
- }
2450
- function i() {
2451
- const { properties: c } = Ht;
2452
- Object.keys(c).forEach((C) => {
2453
- l(C, c[C], se);
2454
- });
2455
- }
2456
- function d(c, C) {
2457
- const w = { canAccept: !0, fixed: !1, hidePadding: !0 };
2458
- return se.has(c) ? se.get(c)(C) : w;
2459
- }
2460
- return i(), { getRuleValue: d };
2461
- }
2462
- class zt extends ee {
1731
+ class Ft extends ee {
2463
1732
  constructor(e, t) {
2464
1733
  super(e, t);
2465
1734
  }
@@ -2528,85 +1797,40 @@ class zt extends ee {
2528
1797
  };
2529
1798
  }
2530
1799
  }
2531
- function Gt(n, e, t, r) {
2532
- const u = Me(), h = M(!1), g = M(!1);
2533
- let D = !0, S = !1, y;
2534
- function T(v) {
2535
- return y && y.componentClassList && y.componentClassList.includes("f-form-layout") && y.componentClassList.includes("farris-form") ? v.sourceType === "control" && v.controlCategory === "input" || v.sourceType === "move" && v.controlType === "form-group" : !0;
2536
- }
2537
- function l(v) {
2538
- return !_t().basalDragulaRuleForContainer(v) || !D || !T(v), !1;
2539
- }
2540
- function i() {
2541
- h.value = !1, g.value = !1;
2542
- const v = n, f = v.appearance && v.appearance.class || "", x = f.split(" "), k = v.buttons || [], p = k.length ? k[0] : null, s = p && p.appearance ? p.appearance.class : "", o = s ? s.split(" ") : [], a = k.length ? k.reduce((_, W) => {
2543
- const q = W && W.appearance ? W.appearance.class : "", te = q ? q.split(" ") : [];
2544
- return _.push(...te), _;
2545
- }, []) : [], m = t == null ? void 0 : t.schema, B = m && m.appearance && m.appearance.class || "", E = B ? B.split(" ") : [];
2546
- y = {
2547
- componentClass: f,
2548
- componentClassList: x,
2549
- childContents: k,
2550
- firstChildContent: p,
2551
- firstChildClass: s,
2552
- firstChildClassList: o,
2553
- parent: m,
2554
- parentClass: B,
2555
- parentClassList: E,
2556
- children: k,
2557
- childrenClassList: a
2558
- };
2559
- const { canAccept: R, fixed: L, hidePadding: N } = u.getRuleValue(x[0], y);
2560
- return D = R, S = N, !0;
2561
- }
2562
- function d(v) {
2563
- }
2564
- function c() {
2565
- return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
2566
- }
2567
- function C(v, f) {
2568
- return f.text = v.label, f;
1800
+ function Lt(n, e) {
1801
+ const t = n.schema;
1802
+ function s(b) {
1803
+ return !1;
2569
1804
  }
2570
- function w(v, f, x) {
2571
- const k = n;
2572
- if ((k.appearance && k.appearance.class || "").split(" ").includes("f-form-layout")) {
2573
- const o = String(v.innerText), a = U("form-group");
2574
- return a.editor = x, a.label = o, a;
2575
- }
2576
- return x;
1805
+ function i(b, l) {
1806
+ return l.text = b.label, l;
2577
1807
  }
2578
- function j() {
1808
+ function p() {
2579
1809
  return !1;
2580
1810
  }
2581
- function I() {
1811
+ function u() {
2582
1812
  return !1;
2583
1813
  }
2584
- function P() {
1814
+ function y() {
2585
1815
  return !0;
2586
1816
  }
2587
- function A() {
2588
- return S;
1817
+ function w() {
1818
+ return !0;
2589
1819
  }
2590
- function $(v) {
2591
- return new zt(v, e).getPropertyConfig(n);
1820
+ function h(b) {
1821
+ return new Ft(b, e).getPropertyConfig(t);
2592
1822
  }
2593
1823
  return {
2594
- canAccepts: l,
2595
- checkCanAddComponent: P,
2596
- checkCanDeleteComponent: I,
2597
- checkCanMoveComponent: j,
2598
- getStyles: c,
2599
- hideNestedPaddingInDesginerView: A,
2600
- onAcceptNewChildElement: w,
2601
- onAcceptMovedChildElement: d,
2602
- onResolveNewComponentSchema: C,
2603
- resolveComponentContext: i,
2604
- getPropsConfig: $,
2605
- triggerBelongedComponentToMoveWhenMoved: h,
2606
- triggerBelongedComponentToDeleteWhenDeleted: g
1824
+ canAccepts: s,
1825
+ checkCanAddComponent: y,
1826
+ checkCanDeleteComponent: u,
1827
+ checkCanMoveComponent: p,
1828
+ hideNestedPaddingInDesginerView: w,
1829
+ onResolveNewComponentSchema: i,
1830
+ getPropsConfig: h
2607
1831
  };
2608
1832
  }
2609
- const Jt = {
1833
+ const Vt = {
2610
1834
  id: { type: String, default: "" },
2611
1835
  componentId: { type: String, default: "" },
2612
1836
  canAdd: { type: Boolean, default: !1 },
@@ -2619,12 +1843,12 @@ const Jt = {
2619
1843
  * 组件值
2620
1844
  */
2621
1845
  modelValue: { type: Object }
2622
- }, X = M(0);
2623
- function Qt(n, e) {
2624
- const t = e.getBoundingClientRect(), r = n.getBoundingClientRect(), u = r.top >= t.top, h = r.top <= t.bottom;
2625
- return u && h;
1846
+ }, X = S(0);
1847
+ function Ut(n, e) {
1848
+ const t = e.getBoundingClientRect(), s = n.getBoundingClientRect(), i = s.top >= t.top, p = s.top <= t.bottom;
1849
+ return i && p;
2626
1850
  }
2627
- function Xt(n) {
1851
+ function Wt(n) {
2628
1852
  if (!n)
2629
1853
  return;
2630
1854
  let e;
@@ -2633,240 +1857,232 @@ function Xt(n) {
2633
1857
  const t = e.getBoundingClientRect();
2634
1858
  if (t.width === 0 && t.height === 0)
2635
1859
  return;
2636
- const r = e.querySelector(".component-btn-group");
2637
- if (r) {
2638
- if (!Qt(e, n)) {
2639
- r.style.display = "none";
1860
+ const s = e.querySelector(".component-btn-group");
1861
+ if (s) {
1862
+ if (!Ut(e, n)) {
1863
+ s.style.display = "none";
2640
1864
  return;
2641
1865
  }
2642
- r.style.display = "";
2643
- const h = r.getBoundingClientRect(), g = r.querySelector("div");
2644
- if (g) {
2645
- const D = g.getBoundingClientRect();
2646
- g.style.top = h.top + "px", g.style.left = h.left - D.width + "px";
1866
+ s.style.display = "";
1867
+ const p = s.getBoundingClientRect(), u = s.querySelector("div");
1868
+ if (u) {
1869
+ const y = u.getBoundingClientRect();
1870
+ u.style.top = p.top + "px", u.style.left = p.left - y.width + "px";
2647
1871
  }
2648
1872
  }
2649
1873
  }
2650
- function Yt(n, e, t) {
2651
- var $;
2652
- function r() {
1874
+ function qt(n, e, t) {
1875
+ var B;
1876
+ function s() {
2653
1877
  }
2654
- const u = "", h = M();
2655
- function g() {
1878
+ const i = "", p = S();
1879
+ function u() {
2656
1880
  return !0;
2657
1881
  }
2658
- function D() {
1882
+ function y() {
2659
1883
  return !1;
2660
1884
  }
2661
- function S() {
1885
+ function w() {
2662
1886
  return !0;
2663
1887
  }
2664
- function y() {
1888
+ function h() {
2665
1889
  return !0;
2666
1890
  }
2667
- function T() {
1891
+ function b() {
2668
1892
  return !0;
2669
1893
  }
2670
- function l(v) {
2671
- if (!v || !v.value)
1894
+ function l(P) {
1895
+ if (!P || !P.value)
2672
1896
  return null;
2673
- const f = M(v == null ? void 0 : v.value.parent), x = l(f);
2674
- return x || null;
1897
+ const x = S(P == null ? void 0 : P.value.parent), C = l(x);
1898
+ return C || null;
2675
1899
  }
2676
- function i(v = e) {
2677
- const { componentInstance: f, designerItemElementRef: x } = v;
2678
- return !f || !f.value ? null : f.value.canMove || f.value.canAdd || f.value.canDelete ? x : i(v.parent);
1900
+ function c(P = e) {
1901
+ const { componentInstance: x, designerItemElementRef: C } = P;
1902
+ return !x || !x.value ? null : x.value.canMove || x.value.canAdd || x.value.canDelete ? C : c(P.parent);
2679
1903
  }
2680
- function d(v) {
1904
+ function f(P) {
2681
1905
  return !!t;
2682
1906
  }
2683
- function c() {
1907
+ function v() {
2684
1908
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
2685
1909
  }
2686
- function C() {
2687
- }
2688
- function w(v, f) {
1910
+ function k() {
2689
1911
  }
2690
- function j(v) {
2691
- const { componentType: f } = v;
2692
- let x = U(f, v);
2693
- const k = f.toLowerCase().replace("-", "_");
2694
- return x && !x.id && x.type === f && (x.id = `${k}_${Math.random().toString().slice(2, 6)}`), x;
1912
+ function A(P, x) {
2695
1913
  }
2696
- function I(v, f) {
2697
- const x = String(v.getAttribute("data-controltype")), k = v.getAttribute("data-feature"), p = k ? JSON.parse(k) : {};
2698
- p.parentComponentInstance = h.value;
2699
- let s = U(x, p);
2700
- const o = x.toLowerCase().replace("-", "_");
2701
- return s && !s.id && s.type === x && (s.id = `${o}_${Math.random().toString().slice(2, 6)}`), s;
1914
+ function $(P) {
1915
+ const { componentType: x } = P;
1916
+ let C = Q(x, P);
1917
+ const I = x.toLowerCase().replace("-", "_");
1918
+ return C && !C.id && C.type === x && (C.id = `${I}_${Math.random().toString().slice(2, 6)}`), C;
2702
1919
  }
2703
- function P(v) {
1920
+ function _(P) {
2704
1921
  }
2705
- function A(...v) {
1922
+ function T(...P) {
2706
1923
  return [];
2707
1924
  }
2708
- return h.value = {
2709
- canMove: g(),
2710
- canSelectParent: D(),
2711
- canAdd: y(),
2712
- canDelete: S(),
2713
- canNested: !T(),
1925
+ return p.value = {
1926
+ canMove: u(),
1927
+ canSelectParent: y(),
1928
+ canAdd: h(),
1929
+ canDelete: w(),
1930
+ canNested: !b(),
2714
1931
  contents: [],
2715
1932
  elementRef: n,
2716
- parent: ($ = e.parent) == null ? void 0 : $.componentInstance,
1933
+ parent: (B = e.parent) == null ? void 0 : B.componentInstance,
2717
1934
  schema: e.schema,
2718
- styles: u,
2719
- canAccepts: d,
1935
+ styles: i,
1936
+ canAccepts: f,
2720
1937
  getBelongedComponentInstance: l,
2721
- getDraggableDesignItemElement: i,
2722
- getDraggingDisplayText: c,
2723
- getPropConfig: A,
2724
- getDragScopeElement: C,
2725
- onAcceptMovedChildElement: w,
2726
- onAcceptNewChildElement: I,
2727
- onChildElementMovedOut: P,
2728
- addNewChildComponentSchema: j,
2729
- updateDragAndDropRules: r,
2730
- triggerBelongedComponentToMoveWhenMoved: M(!1),
2731
- triggerBelongedComponentToDeleteWhenDeleted: M(!1)
2732
- }, h;
1938
+ getDraggableDesignItemElement: c,
1939
+ getDraggingDisplayText: v,
1940
+ getPropConfig: T,
1941
+ getDragScopeElement: k,
1942
+ onAcceptMovedChildElement: A,
1943
+ onChildElementMovedOut: _,
1944
+ addNewChildComponentSchema: $,
1945
+ updateDragAndDropRules: s,
1946
+ triggerBelongedComponentToMoveWhenMoved: S(!1),
1947
+ triggerBelongedComponentToDeleteWhenDeleted: S(!1)
1948
+ }, p;
2733
1949
  }
2734
- const ke = /* @__PURE__ */ z({
1950
+ const Ee = /* @__PURE__ */ U({
2735
1951
  name: "FDesignerInnerItem",
2736
- props: Jt,
1952
+ props: Vt,
2737
1953
  emits: ["selectionChange", "addComponent", "removeComponent"],
2738
1954
  setup(n, e) {
2739
- const t = M(n.canMove), r = M(n.canAdd), u = M(n.canDelete), h = M(!1), g = M(n.contentKey), D = M(n.childType), S = M(n.childLabel), y = M(n.modelValue), T = M(""), l = M(), i = V("canvas-dragula"), d = M(), c = V("design-item-context"), C = {
1955
+ const t = S(n.canMove), s = S(n.canAdd), i = S(n.canDelete), p = S(!1), u = S(n.contentKey), y = S(n.childType), w = S(n.childLabel), h = S(n.modelValue), b = S(""), l = S(), c = V("canvas-dragula"), f = S(), v = V("design-item-context"), k = {
2740
1956
  designerItemElementRef: l,
2741
- componentInstance: d,
2742
- schema: y.value,
2743
- parent: c,
1957
+ componentInstance: f,
1958
+ schema: h.value,
1959
+ parent: v,
2744
1960
  setupContext: e
2745
1961
  };
2746
- Ne("design-item-context", C);
2747
- const w = F(() => ({
1962
+ _e("design-item-context", k);
1963
+ const A = N(() => ({
2748
1964
  "farris-component": !0,
2749
1965
  // 受position-relative影响,整个容器的高度不能被撑起
2750
1966
  "flex-fill": n.id == "root-component",
2751
- "position-relative": t.value || u.value,
2752
- "farris-nested": h.value,
1967
+ "position-relative": t.value || i.value,
1968
+ "farris-nested": p.value,
2753
1969
  "can-move": t.value,
2754
1970
  "d-none": l.value && l.value.classList.contains("d-none")
2755
- })), j = F(() => {
1971
+ })), $ = N(() => {
2756
1972
  const o = {};
2757
- return T.value && T.value.split(";").reduce((a, m) => {
2758
- const [B, E] = m.split(":");
2759
- return B && (a[B] = E), a;
1973
+ return b.value && b.value.split(";").reduce((a, m) => {
1974
+ const [M, D] = m.split(":");
1975
+ return M && (a[M] = D), a;
2760
1976
  }, o), o;
2761
1977
  });
2762
- function I(o, a) {
2763
- if (c && c.schema[g.value]) {
2764
- const m = c.schema[g.value].findIndex((B) => B.id === a.id);
1978
+ function _(o, a) {
1979
+ if (v && v.schema[u.value]) {
1980
+ const m = v.schema[u.value].findIndex((M) => M.id === a.id);
2765
1981
  if (m > -1) {
2766
- const B = c.schema[g.value].length, E = c.schema[g.value][m % B];
2767
- c.designerItemElementRef.value.querySelector(`#${E.id}-design-item`), c.schema[g.value].splice(m, 1), c.componentInstance.value.updateDragAndDropRules(), X.value++, e.emit("removeComponent");
1982
+ const M = v.schema[u.value].length, D = v.schema[u.value][m % M];
1983
+ v.designerItemElementRef.value.querySelector(`#${D.id}-design-item`), v.schema[u.value].splice(m, 1), v.componentInstance.value.updateDragAndDropRules(), X.value++, e.emit("removeComponent");
2768
1984
  }
2769
1985
  }
2770
1986
  }
2771
- function P(o) {
2772
- if (d.value.addNewChildComponentSchema) {
1987
+ function T(o) {
1988
+ if (f.value.addNewChildComponentSchema) {
2773
1989
  const a = {
2774
- componentType: D.value,
2775
- label: S.value,
2776
- parentComponentInstance: d.value,
1990
+ componentType: y.value,
1991
+ label: w.value,
1992
+ parentComponentInstance: f.value,
2777
1993
  targetPosition: -1
2778
- }, m = d.value.addNewChildComponentSchema(a);
2779
- y.value[g.value].push(m), e.emit("addComponent");
1994
+ }, m = f.value.addNewChildComponentSchema(a);
1995
+ h.value[u.value].push(m), e.emit("addComponent");
2780
1996
  }
2781
1997
  }
2782
- function A() {
2783
- return r.value && b("div", {
1998
+ function B() {
1999
+ return s.value && g("div", {
2784
2000
  role: "button",
2785
2001
  class: "btn component-settings-button",
2786
2002
  title: "新增",
2787
2003
  ref: "removeComponent",
2788
2004
  onClick: (o) => {
2789
- P();
2005
+ T();
2790
2006
  }
2791
- }, [b("i", {
2007
+ }, [g("i", {
2792
2008
  class: "f-icon f-icon-plus-circle"
2793
2009
  }, null)]);
2794
2010
  }
2795
- function $(o) {
2796
- return u.value && b("div", {
2011
+ function P(o) {
2012
+ return i.value && g("div", {
2797
2013
  role: "button",
2798
2014
  class: "btn component-settings-button",
2799
2015
  title: "删除",
2800
2016
  ref: "removeComponent",
2801
- onClick: Fe((a) => I(a, o), ["stop"])
2802
- }, [b("i", {
2017
+ onClick: Fe((a) => _(a, o), ["stop"])
2018
+ }, [g("i", {
2803
2019
  class: "f-icon f-icon-yxs_delete"
2804
2020
  }, null)]);
2805
2021
  }
2806
- function v() {
2807
- return t.value && b("div", {
2022
+ function x() {
2023
+ return t.value && g("div", {
2808
2024
  role: "button",
2809
2025
  class: "btn component-settings-button",
2810
2026
  title: "移动",
2811
2027
  ref: "moveComponent"
2812
- }, [b("i", {
2028
+ }, [g("i", {
2813
2029
  "data-dragging-icon": "true",
2814
2030
  class: "cmp_move f-icon f-icon-yxs_move"
2815
2031
  }, null)]);
2816
2032
  }
2817
- function f(o) {
2818
- return b("div", {
2033
+ function C(o) {
2034
+ return g("div", {
2819
2035
  class: "component-btn-group",
2820
2036
  "data-noattach": "true"
2821
- }, [b("div", null, [A(), v(), $(o)])]);
2037
+ }, [g("div", null, [B(), x(), P(o)])]);
2822
2038
  }
2823
- G(() => n.modelValue, (o) => {
2824
- y.value = o, C.schema = o;
2039
+ q(() => n.modelValue, (o) => {
2040
+ h.value = o, k.schema = o;
2825
2041
  });
2826
- function x(o) {
2042
+ function I(o) {
2827
2043
  const a = o.target;
2828
- Xt(a);
2044
+ Wt(a);
2829
2045
  }
2830
- function k() {
2046
+ function O() {
2831
2047
  var o, a;
2832
- (a = (o = y.value) == null ? void 0 : o.contents) != null && a.length && l.value && l.value.addEventListener("scroll", x);
2048
+ (a = (o = h.value) == null ? void 0 : o.contents) != null && a.length && l.value && l.value.addEventListener("scroll", I);
2833
2049
  }
2834
- function p() {
2835
- const o = l.value, a = M(o.children[1]);
2836
- return Yt(a, C).value;
2050
+ function d() {
2051
+ const o = l.value, a = S(o.children[1]);
2052
+ return qt(a, k).value;
2837
2053
  }
2838
2054
  H(() => {
2839
2055
  if (l.value) {
2840
- const o = l.value.querySelector(`[data-dragref='${y.value.id}-container']`);
2841
- d.value = o && o.componentInstance ? o.componentInstance.value : p(), i && o && i.attachComponents(o, y.value), h.value = d.value.canNested !== void 0 ? d.value.canNested : h.value, r.value = d.value.canAdd !== void 0 ? d.value.canAdd : r.value, u.value = d.value.canDelete !== void 0 ? d.value.canDelete : u.value, t.value = d.value.canMove !== void 0 ? d.value.canMove : t.value, T.value = d.value.styles || "", l.value && (l.value.componentInstance = d, l.value.designItemContext = C);
2056
+ const o = l.value.querySelector(`[data-dragref='${h.value.id}-container']`);
2057
+ f.value = o && o.componentInstance ? o.componentInstance.value : d(), c && o && c.attachComponents(o, h.value), p.value = f.value.canNested !== void 0 ? f.value.canNested : p.value, s.value = f.value.canAdd !== void 0 ? f.value.canAdd : s.value, i.value = f.value.canDelete !== void 0 ? f.value.canDelete : i.value, t.value = f.value.canMove !== void 0 ? f.value.canMove : t.value, b.value = f.value.styles || "", l.value && (l.value.componentInstance = f, l.value.designItemContext = k);
2842
2058
  }
2843
- k(), X.value++;
2844
- }), _e(() => {
2845
- l.value && l.value.removeEventListener("scroll", x);
2059
+ O(), X.value++;
2060
+ }), Ne(() => {
2061
+ l.value && l.value.removeEventListener("scroll", I);
2846
2062
  });
2847
- function s(o) {
2063
+ function r(o) {
2848
2064
  Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((m) => m.classList.remove("dgComponentFocused")), o && (o.preventDefault(), o.stopPropagation());
2849
2065
  const a = l.value;
2850
2066
  if (a) {
2851
2067
  const m = document.getElementsByClassName("dgComponentSelected");
2852
2068
  if (!(m && m.length === 1 && m[0] === l.value)) {
2853
- Array.from(m).forEach((R) => R.classList.remove("dgComponentSelected")), a.classList.add("dgComponentFocused"), e.emit("selectionChange", y.value.type, y.value, n.componentId, d.value);
2854
- const E = d.value.getDraggableDesignItemElement(C);
2855
- E && E.value && E.value.classList.add("dgComponentSelected");
2069
+ Array.from(m).forEach((E) => E.classList.remove("dgComponentSelected")), a.classList.add("dgComponentFocused"), e.emit("selectionChange", h.value.type, h.value, n.componentId, f.value);
2070
+ const D = f.value.getDraggableDesignItemElement(k);
2071
+ D && D.value && D.value.classList.add("dgComponentSelected");
2856
2072
  }
2857
2073
  }
2858
2074
  X.value++;
2859
2075
  }
2860
- return () => b("div", {
2076
+ return () => g("div", {
2861
2077
  id: `${n.id}-design-item`,
2862
2078
  ref: l,
2863
- class: w.value,
2864
- style: j.value,
2865
- onClick: s
2866
- }, [f(y.value), e.slots.default && e.slots.default()]);
2079
+ class: A.value,
2080
+ style: $.value,
2081
+ onClick: r
2082
+ }, [C(h.value), e.slots.default && e.slots.default()]);
2867
2083
  }
2868
2084
  });
2869
- class Zt extends ee {
2085
+ class Ht extends ee {
2870
2086
  constructor(e, t) {
2871
2087
  super(e, t);
2872
2088
  }
@@ -2917,45 +2133,45 @@ class Zt extends ee {
2917
2133
  title: "style样式"
2918
2134
  }
2919
2135
  },
2920
- setPropertyRelates(t, r) {
2136
+ setPropertyRelates(t, s) {
2921
2137
  }
2922
2138
  };
2923
2139
  }
2924
2140
  getEventPropConfig(e) {
2925
2141
  const t = [
2926
2142
  {
2927
- label: "click",
2143
+ label: "onClick",
2928
2144
  name: "点击事件"
2929
2145
  }
2930
2146
  ];
2931
- var r = this;
2932
- const u = r.eventsEditorUtils.formProperties(e, r.viewModelId, t), h = {};
2933
- h[r.viewModelId] = {
2147
+ var s = this;
2148
+ const i = s.eventsEditorUtils.formProperties(e, s.viewModelId, t), p = {};
2149
+ p[s.viewModelId] = {
2934
2150
  type: "events-editor",
2935
2151
  editor: {
2936
- initialData: u
2152
+ initialData: i
2937
2153
  }
2938
2154
  }, this.propertyConfig.categories.eventsEditor = {
2939
2155
  title: "事件",
2940
2156
  hideTitle: !0,
2941
- properties: h,
2157
+ properties: p,
2942
2158
  // 这个属性,标记当属性变更得时候触发重新更新属性
2943
2159
  refreshPanelAfterChanged: !0,
2944
2160
  tabId: "commands",
2945
2161
  tabName: "交互",
2946
- setPropertyRelates(g, D) {
2947
- const S = g.propertyValue;
2948
- delete e[r.viewModelId], S && (S.setPropertyRelates = this.setPropertyRelates, r.eventsEditorUtils.saveRelatedParameters(e, r.viewModelId, S.events, S));
2162
+ setPropertyRelates(u, y) {
2163
+ const w = u.propertyValue;
2164
+ delete e[s.viewModelId], w && (w.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, w.events, w));
2949
2165
  }
2950
2166
  };
2951
2167
  }
2952
2168
  }
2953
- class Kt extends ee {
2169
+ class zt extends ee {
2954
2170
  constructor(e, t) {
2955
2171
  super(e, t);
2956
2172
  }
2957
2173
  getPropertyConfig(e) {
2958
- return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
2174
+ return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getbBehaviorConfig(), this.getEventPropConfig(e), this.propertyConfig;
2959
2175
  }
2960
2176
  getBasicPropConfig() {
2961
2177
  this.propertyConfig.categories.basic = {
@@ -2993,6 +2209,20 @@ class Kt extends ee {
2993
2209
  }
2994
2210
  };
2995
2211
  }
2212
+ getbBehaviorConfig() {
2213
+ this.propertyConfig.categories.behavior = {
2214
+ title: "行为",
2215
+ description: "Behavior",
2216
+ properties: {
2217
+ disabled: {
2218
+ title: "禁用状态",
2219
+ type: "boolean",
2220
+ description: "按钮禁用状态",
2221
+ refreshPanelAfterChanged: !0
2222
+ }
2223
+ }
2224
+ };
2225
+ }
2996
2226
  getAppearanceProperties(e) {
2997
2227
  this.propertyConfig.categories.appearance = {
2998
2228
  title: "样式",
@@ -3001,12 +2231,8 @@ class Kt extends ee {
3001
2231
  class: {
3002
2232
  title: "class",
3003
2233
  type: "string",
3004
- description: ""
3005
- },
3006
- style: {
3007
- title: "style",
3008
- type: "string",
3009
- description: ""
2234
+ description: "",
2235
+ $converter: "/converter/appearance.converter"
3010
2236
  }
3011
2237
  }
3012
2238
  };
@@ -3014,280 +2240,250 @@ class Kt extends ee {
3014
2240
  getEventPropConfig(e) {
3015
2241
  const t = [
3016
2242
  {
3017
- label: "click",
2243
+ label: "onClick",
3018
2244
  name: "点击事件"
3019
2245
  }
3020
- ], r = this, u = r.eventsEditorUtils.formProperties(e, r.viewModelId, t), h = {};
3021
- h[r.viewModelId] = {
2246
+ ], s = this, i = s.eventsEditorUtils.formProperties(e, s.viewModelId, t), p = {};
2247
+ p[s.viewModelId] = {
3022
2248
  type: "events-editor",
3023
2249
  editor: {
3024
- initialData: u
2250
+ initialData: i
3025
2251
  }
3026
2252
  }, this.propertyConfig.categories.eventsEditor = {
3027
2253
  title: "事件",
3028
2254
  hideTitle: !0,
3029
- properties: h,
2255
+ properties: p,
3030
2256
  // 这个属性,标记当属性变更得时候触发重新更新属性
3031
2257
  refreshPanelAfterChanged: !0,
3032
2258
  tabId: "commands",
3033
2259
  tabName: "交互",
3034
- setPropertyRelates(g, D) {
3035
- const S = g.propertyValue;
3036
- delete e[r.viewModelId], S && (S.setPropertyRelates = this.setPropertyRelates, r.eventsEditorUtils.saveRelatedParameters(e, r.viewModelId, S.events, S));
2260
+ setPropertyRelates(u, y) {
2261
+ const w = u.propertyValue;
2262
+ delete e[s.viewModelId], w && (w.setPropertyRelates = this.setPropertyRelates, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, w.events, w));
3037
2263
  }
3038
2264
  };
3039
2265
  }
3040
2266
  }
3041
- function en(n, e) {
3042
- Me();
3043
- const t = M(!1), r = M(!1);
3044
- let u = !1, h = !1;
3045
- function g(w) {
2267
+ function Gt(n, e) {
2268
+ function t(y) {
3046
2269
  return !1;
3047
2270
  }
3048
- function D(w) {
3049
- }
3050
- function S() {
3051
- return "";
3052
- }
3053
- function y(w, j) {
3054
- return j.text = w.label, j;
3055
- }
3056
- function T(w, j, I) {
3057
- const P = n.schema;
3058
- if ((P.appearance && P.appearance.class || "").split(" ").includes("f-form-layout")) {
3059
- const v = String(w.innerText), f = U("form-group");
3060
- return f.editor = I, f.label = v, f;
3061
- }
3062
- return I;
3063
- }
3064
- function l() {
2271
+ function s() {
3065
2272
  return !1;
3066
2273
  }
3067
2274
  function i() {
3068
- return !h;
2275
+ return !0;
3069
2276
  }
3070
- function d() {
2277
+ function p() {
3071
2278
  return !1;
3072
2279
  }
3073
- function c() {
3074
- return u;
3075
- }
3076
- function C(w) {
3077
- let j;
2280
+ function u(y) {
2281
+ let w;
3078
2282
  switch (n.schema.type) {
3079
2283
  case "tab-toolbar-item":
3080
- j = new Zt(w, e);
2284
+ w = new Ht(y, e);
3081
2285
  break;
3082
2286
  default:
3083
- j = new Kt(w, e);
2287
+ w = new zt(y, e);
3084
2288
  }
3085
- return j.getPropertyConfig(n.schema);
2289
+ return w.getPropertyConfig(n.schema);
3086
2290
  }
3087
2291
  return {
3088
- canAccepts: g,
3089
- checkCanAddComponent: d,
2292
+ canAccepts: t,
2293
+ checkCanMoveComponent: s,
3090
2294
  checkCanDeleteComponent: i,
3091
- checkCanMoveComponent: l,
3092
- getStyles: S,
3093
- hideNestedPaddingInDesginerView: c,
3094
- onAcceptNewChildElement: T,
3095
- onAcceptMovedChildElement: D,
3096
- onResolveNewComponentSchema: y,
3097
- getPropsConfig: C,
3098
- triggerBelongedComponentToMoveWhenMoved: t,
3099
- triggerBelongedComponentToDeleteWhenDeleted: r
2295
+ checkCanAddComponent: p,
2296
+ getPropsConfig: u
3100
2297
  };
3101
2298
  }
3102
- const Ae = /* @__PURE__ */ z({
2299
+ const Be = /* @__PURE__ */ U({
3103
2300
  name: "FResponseToolbarItemDesign",
3104
- props: xe,
2301
+ props: Me,
3105
2302
  emits: ["Click"],
3106
2303
  setup(n, e) {
3107
- M(), M();
3108
- const t = M(n.alignment), r = {
2304
+ S(), S();
2305
+ const t = S(n.alignment), s = {
3109
2306
  id: "__more_buttons__",
3110
2307
  text: "More"
3111
- }, u = M(new J(r));
3112
- F(() => u.value.children.length > 0);
3113
- const h = M(), g = V("designer-host-service"), D = V("design-item-context"), S = en(D, g), y = Ce(h, D, S);
2308
+ }, i = S(new z(s));
2309
+ N(() => i.value.children.length > 0);
2310
+ const p = S(), u = V("designer-host-service"), y = V("design-item-context"), w = Gt(y, u), h = Ce(p, y, w);
3114
2311
  V("toolbar-item-handler", () => {
3115
2312
  }), H(() => {
3116
- h.value.componentInstance = y;
3117
- }), e.expose(y.value);
3118
- function T() {
3119
- const d = {
2313
+ p.value.componentInstance = h;
2314
+ }), e.expose(h.value);
2315
+ function b() {
2316
+ const f = {
3120
2317
  "f-icon": !0
3121
- }, c = n.icon ? n.icon.trim() : "";
3122
- return Y(d, c);
2318
+ }, v = n.icon ? n.icon.trim() : "";
2319
+ return Y(f, v);
3123
2320
  }
3124
2321
  function l() {
3125
2322
  return !!(n.icon && n.icon.trim());
3126
2323
  }
3127
- function i() {
3128
- const d = {
2324
+ function c() {
2325
+ const f = {
3129
2326
  btn: !0,
3130
2327
  "f-rt-btn": !0,
3131
2328
  "f-btn-ml": t.value === "right",
3132
2329
  "f-btn-mr": t.value === "left",
3133
- "btn-icontext": !!(n.icon && n.icon.trim())
2330
+ "btn-icontext": !!(n.icon && n.icon.trim()),
2331
+ disabled: n.disabled === !0
3134
2332
  };
3135
- return Y(d, n.class);
2333
+ return Y(f, n.class);
3136
2334
  }
3137
- return H(() => {
3138
- }), ie(() => {
3139
- }), () => b("div", {
3140
- ref: h,
3141
- "data-dragref": `${D.schema.id}-container`,
2335
+ return () => g("div", {
2336
+ ref: p,
2337
+ "data-dragref": `${y.schema.id}-container`,
3142
2338
  class: "farris-component position-relative",
3143
2339
  style: "display:inline-block!important;"
3144
- }, [b("button", {
2340
+ }, [g("button", {
3145
2341
  type: "button",
3146
- class: i(),
2342
+ class: c(),
3147
2343
  id: n.id
3148
- }, [l() && b("i", {
3149
- class: T()
2344
+ }, [l() && g("i", {
2345
+ class: b()
3150
2346
  }, null), n.text])]);
3151
2347
  }
3152
- }), Be = /* @__PURE__ */ z({
2348
+ }), Ie = /* @__PURE__ */ U({
3153
2349
  name: "FResponseToolbarDesign",
3154
- props: Bt,
2350
+ props: At,
3155
2351
  emits: ["Click"],
3156
2352
  setup(n, e) {
3157
- const t = M(n.items);
3158
- let r = new Array(t.value.length).fill(M());
3159
- const u = M(), h = M(), g = M(n.alignment), D = {
2353
+ const t = S(n.items);
2354
+ let s = new Array(t.value.length).fill(S());
2355
+ const i = S(), p = S(), u = S(n.alignment), y = {
3160
2356
  id: "__more_buttons__",
3161
2357
  text: "More"
3162
- }, S = M(new J(D)), y = Ee();
3163
- F(() => S.value.children.length > 0);
3164
- const T = M(), l = V("designer-host-service"), i = V("design-item-context"), d = Gt(i.schema, l, i), c = Ce(T, i, d);
2358
+ }, w = S(new z(y)), h = xe();
2359
+ N(() => w.value.children.length > 0);
2360
+ const b = S(), l = V("designer-host-service"), c = V("design-item-context"), f = Lt(c, l), v = Ce(b, c, f);
3165
2361
  V("toolbar-item-handler", () => {
3166
2362
  }), H(() => {
3167
- T.value.componentInstance = c;
3168
- }), e.expose(c.value);
3169
- const C = F(() => Y({
2363
+ b.value.componentInstance = v;
2364
+ }), e.expose(v.value);
2365
+ const k = N(() => Y({
3170
2366
  "f-toolbar": !0,
3171
2367
  "f-response-toolbar": !0,
3172
2368
  "position-relative": !0
3173
- }, n.customClass)), w = F(() => ({
2369
+ }, n.customClass)), A = N(() => ({
3174
2370
  "d-flex": !0,
3175
2371
  "flex-nowrap": !0,
3176
- "justify-content-end": g.value === "right",
3177
- "justify-content-start": g.value === "left"
2372
+ "justify-content-end": u.value === "right",
2373
+ "justify-content-start": u.value === "left"
3178
2374
  })), {
3179
- renderToolbarDropdown: j,
3180
- clearAllDropDown: I
3181
- } = Nt(n, y, c);
3182
- function P() {
3183
- t.value.filter((p) => p.children && p.children.length > 0).forEach((p) => {
3184
- p.expanded = !1;
3185
- }), S.value.expanded = !1, I();
2375
+ renderToolbarDropdown: $,
2376
+ clearAllDropDown: _
2377
+ } = Nt(n, h, v);
2378
+ function T() {
2379
+ t.value.filter((d) => d.children && d.children.length > 0).forEach((d) => {
2380
+ d.expanded = !1;
2381
+ }), w.value.expanded = !1, _();
3186
2382
  }
3187
- const A = /* @__PURE__ */ new Map(), $ = [];
3188
- function v(p) {
3189
- const s = h.value;
3190
- let o = p;
3191
- const a = Array.from(s.children), m = a[a.length - 1].id === "__more_buttons__" ? a[a.length - 1] : null;
2383
+ const B = /* @__PURE__ */ new Map(), P = [];
2384
+ function x(d) {
2385
+ const r = p.value;
2386
+ let o = d;
2387
+ const a = Array.from(r.children), m = a[a.length - 1].id === "__more_buttons__" ? a[a.length - 1] : null;
3192
2388
  if (m) {
3193
- const N = m.computedStyleMap().get("margin-left"), _ = m.computedStyleMap().get("margin-right"), W = (N ? N.value : 0) + m.getBoundingClientRect().width + (_ ? _.value : 0);
2389
+ const j = m.computedStyleMap().get("margin-left"), F = m.computedStyleMap().get("margin-right"), W = (j ? j.value : 0) + m.getBoundingClientRect().width + (F ? F.value : 0);
3194
2390
  o -= W;
3195
2391
  }
3196
- const B = a.filter((N) => N.id !== "__more_buttons__");
3197
- for (const N of B) {
3198
- const _ = N.computedStyleMap().get("margin-left"), W = N.computedStyleMap().get("margin-right"), q = (_ ? _.value : 0) + N.getBoundingClientRect().width + (W ? W.value : 0);
3199
- o < q ? (A.set(N.id, !0), $.push({
3200
- id: N.id,
3201
- width: q
3202
- })) : o -= q;
2392
+ const M = a.filter((j) => j.id !== "__more_buttons__");
2393
+ for (const j of M) {
2394
+ const F = j.computedStyleMap().get("margin-left"), W = j.computedStyleMap().get("margin-right"), G = (F ? F.value : 0) + j.getBoundingClientRect().width + (W ? W.value : 0);
2395
+ o < G ? (B.set(j.id, !0), P.push({
2396
+ id: j.id,
2397
+ width: G
2398
+ })) : o -= G;
3203
2399
  }
3204
- if ($.length)
3205
- for (let N = $.length - 1; N >= 0; N--) {
3206
- const _ = $[N].width;
3207
- if (o >= _)
3208
- o -= _, A.delete($[N].id), $.pop();
2400
+ if (P.length)
2401
+ for (let j = P.length - 1; j >= 0; j--) {
2402
+ const F = P[j].width;
2403
+ if (o >= F)
2404
+ o -= F, B.delete(P[j].id), P.pop();
3209
2405
  else
3210
2406
  break;
3211
2407
  }
3212
- const E = Object.assign({}, S.value);
3213
- E.children = [];
3214
- const R = new J(E), L = t.value.reduce((N, _) => (A.has(_.id) && R.children.push(_), _.visible = !A.has(_.id), N.push(_), N), []);
3215
- S.value = R, t.value = L;
2408
+ const D = Object.assign({}, w.value);
2409
+ D.children = [];
2410
+ const E = new z(D), L = t.value.reduce((j, F) => (B.has(F.id) && E.children.push(F), F.visible = !B.has(F.id), j.push(F), j), []);
2411
+ w.value = E, t.value = L;
3216
2412
  }
3217
- const f = new ResizeObserver((p) => {
3218
- if (p.length) {
3219
- const o = p[0].contentRect.width, m = h.value.getBoundingClientRect().width;
3220
- (o < m || $.length) && v(o);
2413
+ const C = new ResizeObserver((d) => {
2414
+ if (d.length) {
2415
+ const o = d[0].contentRect.width, m = p.value.getBoundingClientRect().width;
2416
+ (o < m || P.length) && x(o);
3221
2417
  }
3222
2418
  });
3223
2419
  H(() => {
3224
- const p = u.value;
3225
- f.observe(p), document.body.addEventListener("click", P);
3226
- }), ie(() => {
3227
- f.disconnect(), document.body.removeEventListener("click", P);
3228
- }), G(() => n.items, () => {
2420
+ const d = i.value;
2421
+ C.observe(d), document.body.addEventListener("click", T);
2422
+ }), ye(() => {
2423
+ C.disconnect(), document.body.removeEventListener("click", T);
2424
+ }), q(() => n.items, () => {
3229
2425
  t.value = n.items;
3230
2426
  }, {
3231
2427
  deep: !0
3232
- }), G(t, (p) => {
3233
- r = new Array(t.value.length).fill(M());
2428
+ }), q(t, (d) => {
2429
+ s = new Array(t.value.length).fill(S());
3234
2430
  });
3235
- function x(p, s, o, a) {
3236
- i && i.setupContext && i.setupContext.emit("selectionChange", p, s, o, a);
2431
+ function I(d, r, o, a) {
2432
+ c && c.setupContext && c.setupContext.emit("selectionChange", d, r, o, a);
3237
2433
  }
3238
- function k() {
3239
- const p = h.value.querySelector(".dgComponentFocused.dgComponentSelected");
3240
- p == null || p.classList.remove("dgComponentSelected"), p == null || p.classList.remove("dgComponentFocused");
2434
+ function O() {
2435
+ const d = p.value.querySelector(".dgComponentFocused.dgComponentSelected");
2436
+ d == null || d.classList.remove("dgComponentSelected"), d == null || d.classList.remove("dgComponentFocused");
3241
2437
  }
3242
- return () => b("div", {
3243
- ref: T,
3244
- "data-dragref": `${i.schema.id}-container`,
3245
- class: C.value
3246
- }, [b("div", {
3247
- ref: u,
3248
- class: w.value
3249
- }, [b("div", {
3250
- ref: h,
2438
+ return () => g("div", {
2439
+ ref: b,
2440
+ "data-dragref": `${c.schema.id}-container`,
2441
+ class: k.value
2442
+ }, [g("div", {
2443
+ ref: i,
2444
+ class: A.value
2445
+ }, [g("div", {
2446
+ ref: p,
3251
2447
  class: "d-inline-block f-response-content",
3252
2448
  style: "white-space: nowrap;"
3253
- }, [t.value.map((p, s) => b(ke, {
3254
- ref: r[s],
2449
+ }, [t.value.map((d, r) => g(Ee, {
2450
+ ref: s[r],
3255
2451
  class: "p-0 display-inline-block",
3256
- modelValue: p,
3257
- "onUpdate:modelValue": (o) => p = o,
2452
+ modelValue: d,
2453
+ "onUpdate:modelValue": (o) => d = o,
3258
2454
  canMove: !0,
3259
2455
  childType: "response-toolbar-item",
3260
2456
  childLabel: "按钮",
3261
2457
  contentKey: "buttons",
3262
2458
  componentId: n.componentId,
3263
- id: p.id,
2459
+ id: d.id,
3264
2460
  style: "padding:0 !important;display:inline-block",
3265
- onSelectionChange: x,
3266
- onRemoveComponent: k
2461
+ onSelectionChange: I,
2462
+ onRemoveComponent: O
3267
2463
  }, {
3268
2464
  default: () => {
3269
2465
  var o;
3270
- return [b(Ae, {
3271
- id: p.id,
3272
- disable: p.disable,
3273
- text: p.text,
3274
- icon: p.icon,
3275
- class: ((o = p.appearance) == null ? void 0 : o.class) || "btn-secondary",
2466
+ return [g(Be, {
2467
+ id: d.id,
2468
+ disabled: d.disabled,
2469
+ text: d.text,
2470
+ icon: d.icon,
2471
+ class: ((o = d.appearance) == null ? void 0 : o.class) || "btn-secondary",
3276
2472
  alignment: n.alignment || "right",
3277
2473
  componentId: n.componentId
3278
2474
  }, null)];
3279
2475
  }
3280
2476
  }))])])]);
3281
2477
  }
3282
- }), be = de;
2478
+ }), me = ce;
3283
2479
  Z.register = (n, e, t) => {
3284
- n["response-toolbar"] = Z, e["response-toolbar"] = de;
2480
+ n["response-toolbar"] = Z, e["response-toolbar"] = ce;
3285
2481
  };
3286
2482
  Z.registerDesigner = (n, e, t) => {
3287
- n["response-toolbar"] = Be, e["response-toolbar"] = de, n["response-toolbar-item"] = Ae, e["response-toolbar-item"] = Rt;
2483
+ n["response-toolbar"] = Ie, e["response-toolbar"] = ce, n["response-toolbar-item"] = Be, e["response-toolbar-item"] = Ot;
3288
2484
  };
3289
- We(Z);
3290
- const tn = {
2485
+ Ve(Z);
2486
+ const Jt = {
3291
2487
  id: { type: String, default: "" },
3292
2488
  componentId: { type: String, default: "" },
3293
2489
  type: { type: String, default: "" },
@@ -3302,103 +2498,104 @@ const tn = {
3302
2498
  */
3303
2499
  modelValue: { type: Object },
3304
2500
  ignore: { type: Boolean, default: !1 }
3305
- }, ye = /* @__PURE__ */ z({
2501
+ }, he = /* @__PURE__ */ U({
3306
2502
  name: "FDesignerTemplateItem",
3307
- props: tn,
2503
+ props: Jt,
3308
2504
  emits: ["selectionChange"],
3309
2505
  setup(n, e) {
3310
- const t = M(), r = F(() => ({
2506
+ const t = S(), s = N(() => ({
3311
2507
  "farris-component": !0
3312
2508
  }));
3313
- function u(h) {
3314
- Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((D) => D.classList.remove("dgComponentFocused")), h && (h.preventDefault(), h.stopPropagation());
3315
- const g = t.value;
3316
- if (g) {
3317
- const D = document.getElementsByClassName("dgComponentSelected");
3318
- D && D.length === 1 && D[0] === t.value || (Array.from(D).forEach((y) => y.classList.remove("dgComponentSelected")), g.classList.add("dgComponentFocused"));
2509
+ function i(p) {
2510
+ Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((y) => y.classList.remove("dgComponentFocused")), p && (p.preventDefault(), p.stopPropagation());
2511
+ const u = t.value;
2512
+ if (u) {
2513
+ const y = document.getElementsByClassName("dgComponentSelected");
2514
+ y && y.length === 1 && y[0] === t.value || (Array.from(y).forEach((h) => h.classList.remove("dgComponentSelected")), u.classList.add("dgComponentFocused"));
3319
2515
  }
3320
2516
  X.value++;
3321
2517
  }
3322
- return () => b("div", {
2518
+ return () => g("div", {
3323
2519
  id: `${n.id}-design-item`,
3324
2520
  ref: t,
3325
- class: r.value,
3326
- onClick: u
2521
+ class: s.value,
2522
+ onClick: i
3327
2523
  }, [e.slots.default && e.slots.default()]);
3328
2524
  }
3329
- }), nn = /* @__PURE__ */ z({
2525
+ }), Qt = /* @__PURE__ */ U({
3330
2526
  name: "FPageHeaderDesign",
3331
2527
  props: st,
3332
2528
  emits: ["Click"],
3333
2529
  setup(n, e) {
3334
- const t = M(), r = V("designer-host-service"), u = V("design-item-context"), h = at(u.schema, r), g = rt(t, u, h), D = M(u.schema.toolbar || {
2530
+ const t = S(), s = V("designer-host-service"), i = V("design-item-context"), p = lt(i.schema, s), u = it(t, i, p), y = S(i.schema.toolbar || {
3335
2531
  type: "response-toolbar",
3336
2532
  buttons: []
3337
- }), S = M(be(D.value));
2533
+ }), w = S(me(y.value));
3338
2534
  H(() => {
3339
- t.value.componentInstance = g;
3340
- }), G(() => u.schema.toolbar, () => {
3341
- D.value = u.schema.toolbar || {
2535
+ t.value.componentInstance = u;
2536
+ }), q(() => i.schema.toolbar, () => {
2537
+ y.value = i.schema.toolbar || {
3342
2538
  type: "response-toolbar",
3343
2539
  buttons: []
3344
- }, S.value = be(D.value);
2540
+ }, w.value = me(y.value);
3345
2541
  }, {
3346
2542
  deep: !0
3347
2543
  });
3348
- const y = F(() => [...S.value.items]);
3349
- function T(l, i, d, c) {
3350
- u && u.setupContext && u.setupContext.emit("selectionChange", l, i, d, c);
2544
+ const h = N(() => [...w.value.items]);
2545
+ function b(l, c, f, v) {
2546
+ i && i.setupContext && i.setupContext.emit("selectionChange", l, c, f, v);
3351
2547
  }
3352
- return e.expose(g.value), () => b("div", {
2548
+ return e.expose(u.value), () => g("div", {
3353
2549
  ref: t
3354
- }, [b("nav", {
2550
+ }, [g("nav", {
3355
2551
  class: "f-page-header-base"
3356
- }, [b("div", {
2552
+ }, [g("div", {
3357
2553
  class: "f-title"
3358
- }, [b(ye, null, {
3359
- default: () => [b("span", {
2554
+ }, [g(he, null, {
2555
+ default: () => [g("span", {
3360
2556
  class: "f-title-icon f-text-orna-manage"
3361
- }, [b("i", {
2557
+ }, [g("i", {
3362
2558
  class: n.icon
3363
2559
  }, null)])]
3364
- }), b(ye, null, {
3365
- default: () => [b("h4", {
2560
+ }), g(he, null, {
2561
+ default: () => [g("h4", {
3366
2562
  class: "f-title-text"
3367
2563
  }, [n.title])]
3368
- })]), b(ke, {
2564
+ })]), g(Ee, {
3369
2565
  class: "col-6 text-right",
3370
- modelValue: D.value,
3371
- "onUpdate:modelValue": (l) => D.value = l,
2566
+ modelValue: y.value,
2567
+ "onUpdate:modelValue": (l) => y.value = l,
3372
2568
  canAdd: !0,
3373
2569
  childType: "response-toolbar-item",
3374
2570
  childLabel: "按钮",
3375
2571
  contentKey: "buttons",
3376
- id: D.value.id,
2572
+ id: y.value.id,
3377
2573
  componentId: n.componentId,
3378
- onSelectionChange: T
2574
+ onSelectionChange: b
3379
2575
  }, {
3380
- default: () => [b(Be, {
2576
+ default: () => [g(Ie, {
3381
2577
  customClass: "w-100",
3382
- items: y.value,
2578
+ items: h.value,
3383
2579
  componentId: n.componentId
3384
2580
  }, null)]
3385
2581
  })])]);
3386
2582
  }
3387
- }), pn = {
2583
+ }), nn = {
3388
2584
  install(n) {
3389
- n.component(oe.name, oe);
2585
+ n.component(ne.name, ne);
3390
2586
  },
3391
- register(n, e, t, r) {
3392
- n["page-header"] = oe, e["page-header"] = ge;
2587
+ register(n, e, t, s) {
2588
+ n["page-header"] = ne, e["page-header"] = pe, s["page-header"] = { eventHandlerResolver: rt };
3393
2589
  },
3394
2590
  registerDesigner(n, e, t) {
3395
- n["page-header"] = nn, e["page-header"] = ge;
2591
+ n["page-header"] = Qt, e["page-header"] = pe;
3396
2592
  }
3397
2593
  };
3398
2594
  export {
3399
- oe as PageHeader,
3400
- pn as default,
2595
+ ne as PageHeader,
2596
+ nn as default,
2597
+ rt as eventHandlerResolver,
3401
2598
  st as pageHeaderDesignerProps,
3402
- pe as pageHeaderProps,
3403
- ge as propsResolver
2599
+ ae as pageHeaderProps,
2600
+ pe as propsResolver
3404
2601
  };