@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,40 +1,40 @@
1
- var Pe = Object.defineProperty;
2
- var Re = (s, e, o) => e in s ? Pe(s, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[e] = o;
3
- var B = (s, e, o) => Re(s, typeof e != "symbol" ? e + "" : e, o);
4
- import { computed as W, getCurrentInstance as ue, createVNode as w, ref as S, defineComponent as X, onMounted as z, onUnmounted as ne, watch as H, inject as L, createTextVNode as fe, provide as Ee, onBeforeUnmount as Se, withModifiers as Me } from "vue";
5
- import { cloneDeep as ke } from "lodash-es";
6
- import { getCustomClass as J, withInstall as Ae } from "../common/index.esm.js";
1
+ var Me = Object.defineProperty;
2
+ var Ee = (s, e, n) => e in s ? Me(s, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : s[e] = n;
3
+ var D = (s, e, n) => Ee(s, typeof e != "symbol" ? e + "" : e, n);
4
+ import { computed as V, getCurrentInstance as de, createVNode as y, ref as S, defineComponent as Q, onMounted as z, onUnmounted as ue, watch as G, inject as L, createTextVNode as pe, provide as Re, onBeforeUnmount as ke, withModifiers as Pe } from "vue";
5
+ import { isPlainObject as ce, cloneDeep as fe } from "lodash-es";
6
+ import { getCustomClass as H, withInstall as Be } from "../common/index.esm.js";
7
7
  import { useDesignerInnerComponent as ge } from "../designer-canvas/index.esm.js";
8
8
  class me {
9
9
  constructor(e) {
10
10
  /** 工具栏项标识 */
11
- B(this, "id", "");
11
+ D(this, "id", "");
12
12
  /** 工具栏项自定义样式 */
13
- B(this, "class", "btn-secondary");
13
+ D(this, "class", "btn-secondary");
14
14
  /** 图标 */
15
- B(this, "icon", "");
15
+ D(this, "icon", "");
16
16
  /** 所属分组 */
17
- B(this, "groupId", "");
17
+ D(this, "groupId", "");
18
18
  /** 收藏顺序 */
19
- B(this, "order", -1);
19
+ D(this, "order", -1);
20
20
  /** 是否作为下拉菜单的顶层按钮 */
21
- B(this, "asDropDownTop", !1);
21
+ D(this, "asDropDownTop", !1);
22
22
  /** 文本 */
23
- B(this, "text", "");
23
+ D(this, "text", "");
24
24
  /** 是否可见 */
25
- B(this, "visible", !0);
26
- B(this, "responsed", !1);
25
+ D(this, "visible", !0);
26
+ D(this, "responsed", !1);
27
27
  /** 是否启用提示消息 */
28
- B(this, "tipsEnable", !1);
28
+ D(this, "tipsEnable", !1);
29
29
  /** 提示消息内容 */
30
- B(this, "tipsText", "");
30
+ D(this, "tipsText", "");
31
31
  /** 记录宽度 */
32
- B(this, "width", 0);
33
- B(this, "onClick", () => {
32
+ D(this, "width", 0);
33
+ D(this, "onClick", () => {
34
34
  });
35
- B(this, "options");
35
+ D(this, "options");
36
36
  this.options = e;
37
- const o = [
37
+ const n = [
38
38
  "id",
39
39
  "class",
40
40
  "icon",
@@ -50,13 +50,13 @@ class me {
50
50
  "tipsText",
51
51
  "onClick"
52
52
  ];
53
- Object.keys(e).filter((p) => o.indexOf(p) > -1).forEach((p) => {
54
- this[p] = e[p];
53
+ Object.keys(e).filter((i) => n.indexOf(i) > -1).forEach((i) => {
54
+ this[i] = e[i];
55
55
  });
56
56
  }
57
57
  /** 是否可用 */
58
58
  get enable() {
59
- return Object.keys(this.options).indexOf("enable") > -1 ? this.options.enable : W(() => !0);
59
+ return Object.keys(this.options).indexOf("disabled") > -1 ? !this.options.disabled : V(() => !0);
60
60
  }
61
61
  /** 设置宽度 */
62
62
  setWidth(e) {
@@ -67,49 +67,49 @@ class me {
67
67
  return this.visible ? this.width : !1;
68
68
  }
69
69
  }
70
- class Be extends me {
70
+ class Ae extends me {
71
71
  constructor(e) {
72
72
  super(e);
73
73
  }
74
74
  }
75
75
  function he() {
76
76
  function s(e) {
77
- const o = [];
78
- return e.reduce((p, u) => (u.children && u.children.length > 0 ? p.push(new G(u)) : p.push(new Be(u)), p), o), o;
77
+ const n = [];
78
+ return e.reduce((i, d) => (d.children && d.children.length > 0 ? i.push(new W(d)) : i.push(new Ae(d)), i), n), n;
79
79
  }
80
80
  return { buildResponseToolbarItems: s };
81
81
  }
82
82
  const { buildResponseToolbarItems: Oe } = he();
83
- class G extends me {
84
- constructor(o) {
85
- super(o);
86
- B(this, "placement", "");
83
+ class W extends me {
84
+ constructor(n) {
85
+ super(n);
86
+ D(this, "placement", "");
87
87
  // 下拉位置
88
88
  /** 下拉class */
89
- B(this, "dropdownClass", "");
89
+ D(this, "dropdownClass", "");
90
90
  /** 下拉菜单class */
91
- B(this, "menuClass", "");
91
+ D(this, "menuClass", "");
92
92
  /** 是否用分开的下拉按钮 */
93
- B(this, "split", !1);
94
- B(this, "children", []);
95
- B(this, "expanded", !1);
96
- const p = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
97
- Object.keys(o).filter((u) => p.indexOf(u) > -1).forEach((u) => {
98
- this[u] = o[u];
99
- }), o.children && o.children.length && (this.children = Oe(o.children));
93
+ D(this, "split", !1);
94
+ D(this, "children", []);
95
+ D(this, "expanded", !1);
96
+ const i = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
97
+ Object.keys(n).filter((d) => i.indexOf(d) > -1).forEach((d) => {
98
+ this[d] = n[d];
99
+ }), n.children && n.children.length && (this.children = Oe(n.children));
100
100
  }
101
101
  }
102
- class Lt {
103
- constructor(e, o) {
104
- B(this, "id");
105
- B(this, "name");
102
+ class Pt {
103
+ constructor(e, n) {
104
+ D(this, "id");
105
+ D(this, "name");
106
106
  /** 记录元素的Id */
107
- B(this, "presetId", []);
107
+ D(this, "presetId", []);
108
108
  /** 记录转变为下拉时元素的位置 */
109
- B(this, "responsedIndex", []);
109
+ D(this, "responsedIndex", []);
110
110
  /** 记录宽度 */
111
- B(this, "width");
112
- this.id = e, this.name = o, this.width = 0;
111
+ D(this, "width");
112
+ this.id = e, this.name = n, this.width = 0;
113
113
  }
114
114
  // 设置宽度
115
115
  setWidth(e) {
@@ -144,98 +144,98 @@ class Lt {
144
144
  return this.presetId.length === this.responsedIndex.length;
145
145
  }
146
146
  }
147
- const oe = {}, be = {};
148
- function se(s) {
149
- const { properties: e, title: o, ignore: p } = s, u = p && Array.isArray(p), v = Object.keys(e).reduce((h, D) => ((!u || !p.find((I) => I == D)) && (h[D] = e[D].type === "object" && e[D].properties ? se(e[D]) : ke(e[D].default)), h), {});
150
- return (!u || !p.find((h) => h == "id")) && (v.id = `${o}-${Date.now()}`), v;
147
+ const ee = {}, be = {};
148
+ function te(s) {
149
+ const { properties: e, title: n, ignore: i } = s, d = i && Array.isArray(i), h = Object.keys(e).reduce((f, x) => ((!d || !i.find((w) => w == x)) && (f[x] = e[x].type === "object" && e[x].properties ? te(e[x]) : fe(e[x].default)), f), {});
150
+ return n && (!d || !i.find((f) => f == "id")) && (h.id = `${n}-${Date.now()}`), h;
151
151
  }
152
- function q(s, e = {}, o) {
153
- const p = oe[s];
154
- if (p) {
155
- let u = se(p);
156
- const v = be[s];
157
- return u = v ? v({ getSchemaByType: q }, u, e, o) : u, u;
152
+ function X(s, e = {}, n) {
153
+ const i = ee[s];
154
+ if (i) {
155
+ let d = te(i);
156
+ const h = be[s];
157
+ return d = h ? h({ getSchemaByType: X }, d, e, n) : d, d;
158
158
  }
159
159
  return null;
160
160
  }
161
- function _e(s, e) {
162
- const o = se(e);
163
- return Object.keys(s).reduce((p, u) => (p[u] && typeof p[u] == "object" ? Object.assign(p[u], s[u]) : p[u] = s[u], p), o), o;
161
+ function je(s, e) {
162
+ const n = te(e);
163
+ return Object.keys(s).reduce((i, d) => (i[d] && ce(i[d]) && ce(s[d]) ? Object.assign(i[d], s[d]) : i[d] = s[d], i), n), n;
164
164
  }
165
- function Ne(s, e) {
166
- return Object.keys(s).filter((p) => s[p] != null).reduce((p, u) => {
167
- if (e.has(u)) {
168
- const v = e.get(u);
169
- if (typeof v == "string")
170
- p[v] = s[u];
165
+ function _e(s, e) {
166
+ return Object.keys(s).filter((i) => s[i] != null).reduce((i, d) => {
167
+ if (e.has(d)) {
168
+ const h = e.get(d);
169
+ if (typeof h == "string")
170
+ i[h] = s[d];
171
171
  else {
172
- const h = v(u, s[u], s);
173
- Object.assign(p, h);
172
+ const f = h(d, s[d], s);
173
+ Object.assign(i, f);
174
174
  }
175
175
  } else
176
- p[u] = s[u];
177
- return p;
176
+ i[d] = s[d];
177
+ return i;
178
178
  }, {});
179
179
  }
180
- function $e(s, e, o = /* @__PURE__ */ new Map()) {
181
- const p = _e(s, e);
182
- return Ne(p, o);
180
+ function $e(s, e, n = /* @__PURE__ */ new Map()) {
181
+ const i = je(s, e);
182
+ return _e(i, n);
183
183
  }
184
184
  function Fe(s = {}) {
185
- function e(g, C, l, i) {
185
+ function e(g, m, l, c) {
186
186
  if (typeof l == "number")
187
- return i[g].length === l;
187
+ return c[g].length === l;
188
188
  if (typeof l == "object") {
189
- const f = Object.keys(l)[0], c = l[f];
190
- if (f === "not")
191
- return Number(i[g].length) !== Number(c);
192
- if (f === "moreThan")
193
- return Number(i[g].length) >= Number(c);
194
- if (f === "lessThan")
195
- return Number(i[g].length) <= Number(c);
189
+ const p = Object.keys(l)[0], b = l[p];
190
+ if (p === "not")
191
+ return Number(c[g].length) !== Number(b);
192
+ if (p === "moreThan")
193
+ return Number(c[g].length) >= Number(b);
194
+ if (p === "lessThan")
195
+ return Number(c[g].length) <= Number(b);
196
196
  }
197
197
  return !1;
198
198
  }
199
- function o(g, C, l, i) {
200
- return i[g] && i[g].propertyValue && String(i[g].propertyValue.value) === String(l);
199
+ function n(g, m, l, c) {
200
+ return c[g] && c[g].propertyValue && String(c[g].propertyValue.value) === String(l);
201
201
  }
202
- const p = /* @__PURE__ */ new Map([
202
+ const i = /* @__PURE__ */ new Map([
203
203
  ["length", e],
204
- ["getProperty", o]
204
+ ["getProperty", n]
205
205
  ]);
206
- Object.keys(s).reduce((g, C) => (g.set(C, s[C]), g), p);
207
- function u(g, C) {
206
+ Object.keys(s).reduce((g, m) => (g.set(m, s[m]), g), i);
207
+ function d(g, m) {
208
208
  const l = g;
209
- return typeof C == "number" ? [{ target: l, operator: "length", param: null, value: Number(C) }] : typeof C == "boolean" ? [{ target: l, operator: "getProperty", param: g, value: !!C }] : typeof C == "object" ? Object.keys(C).map((i) => {
210
- if (i === "length")
211
- return { target: l, operator: "length", param: null, value: C[i] };
212
- const f = i, c = C[i];
213
- return { target: l, operator: "getProperty", param: f, value: c };
209
+ return typeof m == "number" ? [{ target: l, operator: "length", param: null, value: Number(m) }] : typeof m == "boolean" ? [{ target: l, operator: "getProperty", param: g, value: !!m }] : typeof m == "object" ? Object.keys(m).map((c) => {
210
+ if (c === "length")
211
+ return { target: l, operator: "length", param: null, value: m[c] };
212
+ const p = c, b = m[c];
213
+ return { target: l, operator: "getProperty", param: p, value: b };
214
214
  }) : [];
215
215
  }
216
- function v(g) {
217
- return Object.keys(g).reduce((l, i) => {
218
- const f = u(i, g[i]);
219
- return l.push(...f), l;
216
+ function h(g) {
217
+ return Object.keys(g).reduce((l, c) => {
218
+ const p = d(c, g[c]);
219
+ return l.push(...p), l;
220
220
  }, []);
221
221
  }
222
- function h(g, C) {
223
- if (p.has(g.operator)) {
224
- const l = p.get(g.operator);
225
- return l && l(g.target, g.param, g.value, C) || !1;
222
+ function f(g, m) {
223
+ if (i.has(g.operator)) {
224
+ const l = i.get(g.operator);
225
+ return l && l(g.target, g.param, g.value, m) || !1;
226
226
  }
227
227
  return !1;
228
228
  }
229
- function D(g, C) {
230
- return v(g).reduce((f, c) => f && h(c, C), !0);
229
+ function x(g, m) {
230
+ return h(g).reduce((p, b) => p && f(b, m), !0);
231
231
  }
232
- function I(g, C) {
233
- const l = Object.keys(g), i = l.includes("allOf"), f = l.includes("anyOf"), c = i || f, T = (c ? g[c ? i ? "allOf" : "anyOf" : "allOf"] : [g]).map((P) => D(P, C));
234
- return i ? !T.includes(!1) : T.includes(!0);
232
+ function w(g, m) {
233
+ const l = Object.keys(g), c = l.includes("allOf"), p = l.includes("anyOf"), b = c || p, j = (b ? g[b ? c ? "allOf" : "anyOf" : "allOf"] : [g]).map((_) => x(_, m));
234
+ return c ? !j.includes(!1) : j.includes(!0);
235
235
  }
236
- return { parseValueSchema: I };
236
+ return { parseValueSchema: w };
237
237
  }
238
- const re = {
238
+ const ne = {
239
239
  button: { type: "button", name: "按钮", icon: "Button" },
240
240
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
241
241
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -272,31 +272,32 @@ const re = {
272
272
  uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
273
273
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
274
274
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
275
- "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
276
- }, ye = {}, Le = {};
275
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
276
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
277
+ }, ye = {}, Ne = {};
277
278
  Fe();
278
- function ve(s, e, o = /* @__PURE__ */ new Map(), p = (h, D, I) => D, u = {}, v = (h) => h) {
279
- return oe[e.title] = e, be[e.title] = p, ye[e.title] = u, Le[e.title] = v, (h = {}) => {
280
- const D = $e(h, e, o), I = Object.keys(s).reduce((g, C) => (g[C] = s[C].default, g), {});
281
- return Object.assign(I, D);
279
+ function ve(s, e, n = /* @__PURE__ */ new Map(), i = (f, x, w) => x, d = {}, h = (f) => f) {
280
+ return ee[e.title] = e, be[e.title] = i, ye[e.title] = d, Ne[e.title] = h, (f = {}) => {
281
+ const x = $e(f, e, n), w = Object.keys(s).reduce((g, m) => (g[m] = s[m].default, g), {});
282
+ return Object.assign(w, x);
282
283
  };
283
284
  }
284
- function Ve(s, e) {
285
+ function Le(s, e) {
285
286
  return { customClass: e.class, customStyle: e.style };
286
287
  }
287
- const We = /* @__PURE__ */ new Map([
288
+ const Ve = /* @__PURE__ */ new Map([
288
289
  ["buttons", "items"],
289
- ["appearance", Ve]
290
+ ["appearance", Le]
290
291
  ]), Ue = /* @__PURE__ */ new Map([
291
- ["appearance", qe]
292
+ ["appearance", We]
292
293
  ]);
293
- function qe(s, e) {
294
+ function We(s, e) {
294
295
  return { class: e.class, style: e.style };
295
296
  }
296
- function Ce(s, e, o) {
297
+ function Ce(s, e, n) {
297
298
  return e;
298
299
  }
299
- const ze = "https://json-schema.org/draft/2020-12/schema", Ge = "https://farris-design.gitee.io/response-toolbar.schema.json", He = "response-toolbar", Je = "A Farris Toolbar Component", Qe = "object", Xe = {
300
+ const qe = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-design.gitee.io/response-toolbar.schema.json", Ge = "response-toolbar", He = "A Farris Toolbar Component", Je = "object", Qe = {
300
301
  id: {
301
302
  description: "The unique identifier for a Response Toolbar",
302
303
  type: "string"
@@ -312,9 +313,6 @@ const ze = "https://json-schema.org/draft/2020-12/schema", Ge = "https://farris-
312
313
  properties: {
313
314
  class: {
314
315
  type: "string"
315
- },
316
- style: {
317
- type: "string"
318
316
  }
319
317
  },
320
318
  default: {}
@@ -329,19 +327,19 @@ const ze = "https://json-schema.org/draft/2020-12/schema", Ge = "https://farris-
329
327
  type: "array",
330
328
  default: []
331
329
  }
332
- }, Ye = [
330
+ }, Xe = [
333
331
  "id",
334
332
  "type",
335
333
  "buttons"
336
- ], Ze = {
337
- $schema: ze,
338
- $id: Ge,
339
- title: He,
340
- description: Je,
341
- type: Qe,
342
- properties: Xe,
343
- required: Ye
344
- }, Ke = "https://json-schema.org/draft/2020-12/schema", et = "https://farris-design.gitee.io/response-toolbar-item.schema.json", tt = "response-toolbar-item", nt = "A Farris Toolbar Item Component", ot = "object", st = {
334
+ ], Ye = {
335
+ $schema: qe,
336
+ $id: ze,
337
+ title: Ge,
338
+ description: He,
339
+ type: Je,
340
+ properties: Qe,
341
+ required: Xe
342
+ }, Ze = "https://json-schema.org/draft/2020-12/schema", Ke = "https://farris-design.gitee.io/response-toolbar-item.schema.json", et = "response-toolbar-item", tt = "A Farris Toolbar Item Component", nt = "object", ot = {
345
343
  id: {
346
344
  description: "The unique identifier for a Response Toolbar",
347
345
  type: "string"
@@ -357,47 +355,49 @@ const ze = "https://json-schema.org/draft/2020-12/schema", Ge = "https://farris-
357
355
  properties: {
358
356
  class: {
359
357
  type: "string",
360
- default: "btn-primary"
361
- },
362
- style: {
363
- type: "string"
358
+ default: "btn-secondary"
364
359
  }
365
360
  },
366
361
  default: {}
367
362
  },
368
363
  alignment: {
369
- description: "The alignment of Response Toolbar Button.",
364
+ description: "对齐",
370
365
  type: "string",
371
366
  default: "right"
372
367
  },
373
368
  text: {
374
- description: "The items of Response Toolbar.",
369
+ description: "文本",
375
370
  type: "string",
376
- default: "新增"
371
+ default: "按钮"
377
372
  },
378
373
  icon: {
379
- description: "The icon of response toolbar item.",
374
+ description: "图标",
380
375
  type: "string",
381
376
  default: ""
382
377
  },
383
- click: {
384
- description: "The event of response toolbar item.",
378
+ disabled: {
379
+ description: "禁用",
380
+ type: "boolean",
381
+ default: !1
382
+ },
383
+ onClick: {
384
+ description: "点击事件",
385
385
  type: "string",
386
386
  default: ""
387
387
  }
388
- }, rt = [
388
+ }, st = [
389
389
  "id",
390
390
  "type",
391
391
  "text"
392
- ], te = {
393
- $schema: Ke,
394
- $id: et,
395
- title: tt,
396
- description: nt,
397
- type: ot,
398
- properties: st,
399
- required: rt
400
- }, it = "response-toolbar-item", ct = "A Farris Container Component", at = "object", lt = {
392
+ ], K = {
393
+ $schema: Ze,
394
+ $id: Ke,
395
+ title: et,
396
+ description: tt,
397
+ type: nt,
398
+ properties: ot,
399
+ required: st
400
+ }, rt = "response-toolbar-item", it = "A Farris Container Component", ct = "object", lt = {
401
401
  basic: {
402
402
  title: "基本信息",
403
403
  description: "Basic Infomation",
@@ -430,12 +430,12 @@ const ze = "https://json-schema.org/draft/2020-12/schema", Ge = "https://farris-
430
430
  }
431
431
  }
432
432
  }
433
- }, pe = {
434
- title: it,
435
- description: ct,
436
- type: at,
433
+ }, le = {
434
+ title: rt,
435
+ description: it,
436
+ type: ct,
437
437
  categories: lt
438
- }, ie = {
438
+ }, oe = {
439
439
  /** 组件自定义样式 */
440
440
  customClass: { type: String, default: "" },
441
441
  alignment: { Type: String, default: "right" },
@@ -444,14 +444,14 @@ const ze = "https://json-schema.org/draft/2020-12/schema", Ge = "https://farris-
444
444
  default: []
445
445
  }
446
446
  };
447
- oe[te.title] = te;
448
- ye[pe.title] = pe;
449
- const pt = Object.assign({}, ie, {
447
+ ee[K.title] = K;
448
+ ye[le.title] = le;
449
+ const at = Object.assign({}, oe, {
450
450
  componentId: { type: String, default: "" }
451
- }), ce = ve(
452
- ie,
453
- Ze,
454
- We,
451
+ }), se = ve(
452
+ oe,
453
+ Ye,
454
+ Ve,
455
455
  Ce
456
456
  ), we = {
457
457
  id: { type: String, default: "" },
@@ -464,588 +464,589 @@ const pt = Object.assign({}, ie, {
464
464
  alignment: { Type: String, default: "right" }
465
465
  }, dt = ve(
466
466
  we,
467
- te,
467
+ K,
468
468
  Ue,
469
469
  Ce
470
470
  );
471
471
  function xe() {
472
- function s(o) {
473
- const p = {
472
+ function s(n) {
473
+ const i = {
474
474
  "f-icon": !0
475
475
  };
476
- if (o.icon) {
477
- const u = o.icon.trim().split(" ");
478
- u && u.length && u.reduce((v, h) => (v[h] = !0, v), p);
476
+ if (n.icon) {
477
+ const d = n.icon.trim().split(" ");
478
+ d && d.length && d.reduce((h, f) => (h[f] = !0, h), i);
479
479
  }
480
- return p;
480
+ return i;
481
481
  }
482
- function e(o) {
483
- return !!(o.icon && o.icon.trim());
482
+ function e(n) {
483
+ return !!(n.icon && n.icon.trim());
484
484
  }
485
485
  return { iconClass: s, shouldShowIcon: e };
486
486
  }
487
487
  function ut(s) {
488
488
  function e(l) {
489
- const i = {
489
+ const c = {
490
490
  "dropdown-menu": !0
491
491
  };
492
492
  if (l.class) {
493
- const f = l.menuClass.split(" ");
494
- f && f.length && f.reduce((c, b) => (c[b] = !0, c), i);
493
+ const p = l.menuClass.split(" ");
494
+ p && p.length && p.reduce((b, M) => (b[M] = !0, b), c);
495
495
  }
496
- return i;
496
+ return c;
497
497
  }
498
- function o(l) {
499
- const i = {
498
+ function n(l) {
499
+ const c = {
500
500
  disabled: !l.enable,
501
501
  "dropdown-submenu": !0,
502
502
  "f-rt-dropdown": !0
503
- }, f = l.dropdownClass.split(" ");
504
- return f && f.length && f.reduce((c, b) => (c[b] = !0, c), i), i;
503
+ }, p = l.dropdownClass.split(" ");
504
+ return p && p.length && p.reduce((b, M) => (b[M] = !0, b), c), c;
505
505
  }
506
- function p(l) {
507
- const i = {
506
+ function i(l) {
507
+ const c = {
508
508
  disabled: !l.enable,
509
509
  "dropdown-item": !0,
510
510
  "f-rt-btn": !0
511
- }, f = l.class.split(" ");
512
- return f && f.length && f.reduce((c, b) => (c[b] = !0, c), i), i;
513
- }
514
- let u;
515
- const v = /* @__PURE__ */ new Map();
516
- function h(l, i, f) {
517
- var b;
518
- ((b = l.target) == null ? void 0 : b.id) === i.id && l.stopPropagation();
519
- const c = f ? f.id : "__top_item__";
520
- if (i.children && i.children.length && (i.expanded = !i.expanded, i.expanded ? v.set(c, i) : v.delete(c)), v.has(c) && v.get(c) !== i) {
521
- const y = v.get(c);
522
- y && (y.expanded = !1);
511
+ }, p = l.class.split(" ");
512
+ return p && p.length && p.reduce((b, M) => (b[M] = !0, b), c), c;
513
+ }
514
+ let d;
515
+ const h = /* @__PURE__ */ new Map();
516
+ function f(l, c, p) {
517
+ var M;
518
+ ((M = l.target) == null ? void 0 : M.id) === c.id && l.stopPropagation();
519
+ const b = p ? p.id : "__top_item__";
520
+ if (c.children && c.children.length && (c.expanded = !c.expanded, c.expanded ? h.set(b, c) : h.delete(b)), h.has(b) && h.get(b) !== c) {
521
+ const O = h.get(b);
522
+ O && (O.expanded = !1);
523
523
  }
524
524
  }
525
- function D(l, i) {
526
- document.body.click(), i.enable && i.onClick(l, i.id);
527
- }
528
- function I(l) {
529
- return l.children.map((i) => i.children && i.children.length ? w("li", {
530
- class: o(i),
531
- id: i.id,
532
- onClick: (f) => i.enable && h(f, i, l)
533
- }, [w("span", {
534
- id: i.id,
535
- class: p(i),
536
- onMouseover: (f) => i.enable && h(f, i, l)
537
- }, [i.text, w("i", {
525
+ function x(l, c) {
526
+ document.body.click(), c.enable && c.onClick(l, c.id);
527
+ }
528
+ function w(l) {
529
+ return l.children.map((c) => c.children && c.children.length ? y("li", {
530
+ class: n(c),
531
+ id: c.id,
532
+ onClick: (p) => c.enable && f(p, c, l)
533
+ }, [y("span", {
534
+ id: c.id,
535
+ class: i(c),
536
+ onMouseover: (p) => c.enable && f(p, c, l)
537
+ }, [c.text, y("i", {
538
538
  class: "f-icon f-icon-arrow-chevron-right",
539
539
  style: "display: inline-block;float: right;line-height: 1.25rem;"
540
- }, null)]), u(i, i)]) : w("li", {
541
- class: p(i),
542
- id: i.id,
543
- onClick: (f) => D(f, i),
544
- onMouseover: (f) => i.enable && h(f, i, l)
545
- }, [s.shouldShowIcon(i) && w("i", {
546
- class: s.iconClass(i)
547
- }, null), i.text]));
548
- }
549
- function g(l, i, f) {
550
- const c = {
540
+ }, null)]), d(c, c)]) : y("li", {
541
+ class: i(c),
542
+ id: c.id,
543
+ onClick: (p) => x(p, c),
544
+ onMouseover: (p) => c.enable && f(p, c, l)
545
+ }, [s.shouldShowIcon(c) && y("i", {
546
+ class: s.iconClass(c)
547
+ }, null), c.text]));
548
+ }
549
+ function g(l, c, p) {
550
+ const b = {
551
551
  display: l.expanded ? "block" : "none",
552
552
  position: "fixed",
553
553
  maxWidth: "300px",
554
554
  width: "auto",
555
555
  minWidth: "120px"
556
- }, b = document.getElementsByTagName("body")[0].getClientRects()[0].width, y = i, T = y == null ? void 0 : y.getClientRects();
557
- if (y && T && T.length) {
556
+ }, M = document.getElementsByTagName("body")[0].getClientRects()[0].width, O = c, j = O == null ? void 0 : O.getClientRects();
557
+ if (O && j && j.length) {
558
558
  const {
559
- top: O,
560
- width: P,
561
- left: k,
562
- right: N,
563
- height: j
564
- } = T[0], m = Math.ceil(j + O);
565
- c.top = `${m}px`, c.left = `${k}px`;
566
- const R = l.id + "_menu", A = i ? i.querySelector("#" + R) : null;
559
+ top: F,
560
+ width: _,
561
+ left: R,
562
+ right: E,
563
+ height: k
564
+ } = j[0], v = Math.ceil(k + F);
565
+ b.top = `${v}px`, b.left = `${R}px`;
566
+ const P = l.id + "_menu", A = c ? c.querySelector("#" + P) : null;
567
567
  if (A) {
568
- c.display === "block" && (A.style.display = "block");
568
+ b.display === "block" && (A.style.display = "block");
569
569
  const a = A.getBoundingClientRect();
570
- if (f) {
571
- c.top = `${O - 6}px`;
572
- const n = Math.ceil(P + k);
573
- c.left = `${n}px`;
570
+ if (p) {
571
+ b.top = `${F - 6}px`;
572
+ const o = Math.ceil(_ + R);
573
+ b.left = `${o}px`;
574
574
  }
575
- b - k - P < a.width && (c.left = `${(f ? k : N) - a.width}px`);
575
+ M - R - _ < a.width && (b.left = `${(p ? R : E) - a.width}px`);
576
576
  }
577
577
  }
578
- return c;
578
+ return b;
579
579
  }
580
- u = function(l, i) {
581
- var y, T;
582
- const f = ue(), c = i ? i.id : l.id, b = (T = (y = f == null ? void 0 : f.exposed) == null ? void 0 : y.elementRef.value) == null ? void 0 : T.querySelector("#" + c);
583
- return w("ul", {
580
+ d = function(l, c) {
581
+ var O, j;
582
+ const p = de(), b = c ? c.id : l.id, M = (j = (O = p == null ? void 0 : p.exposed) == null ? void 0 : O.elementRef.value) == null ? void 0 : j.querySelector("#" + b);
583
+ return y("ul", {
584
584
  class: e(l),
585
- style: g(l, b, i),
585
+ style: g(l, M, c),
586
586
  id: l.id + "_menu"
587
- }, [I(l)]);
587
+ }, [w(l)]);
588
588
  };
589
- function C() {
590
- v.forEach((l) => {
589
+ function m() {
590
+ h.forEach((l) => {
591
591
  l.expanded = !1;
592
- }), v.clear();
592
+ }), h.clear();
593
593
  }
594
594
  return {
595
- renderDropdownMenu: u,
596
- clearAllDropDownMenu: C
595
+ renderDropdownMenu: d,
596
+ clearAllDropDownMenu: m
597
597
  };
598
598
  }
599
- function ft(s, e) {
600
- const o = S(s.alignment), {
601
- renderDropdownMenu: p,
602
- clearAllDropDownMenu: u
599
+ function pt(s, e) {
600
+ const n = S(s.alignment), {
601
+ renderDropdownMenu: i,
602
+ clearAllDropDownMenu: d
603
603
  } = ut(e);
604
- function v(C) {
604
+ function h(m) {
605
605
  const l = {
606
606
  "btn-group": !0,
607
607
  "f-rt-dropdown": !0,
608
- "f-btn-ml": o.value === "right",
609
- "f-btn-mr": o.value === "left"
610
- }, i = C.dropdownClass.split(" ");
611
- return i && i.length && i.reduce((f, c) => (f[c] = !0, f), l), l;
608
+ "f-btn-ml": n.value === "right",
609
+ "f-btn-mr": n.value === "left"
610
+ }, c = m.dropdownClass.split(" ");
611
+ return c && c.length && c.reduce((p, b) => (p[b] = !0, p), l), l;
612
612
  }
613
- function h(C) {
613
+ function f(m) {
614
614
  const l = {
615
615
  btn: !0,
616
- disabled: !C.enable,
616
+ disabled: !m.enable,
617
617
  "f-rt-btn": !0,
618
- "btn-icontext": !!(C.icon && C.icon.trim())
618
+ "btn-icontext": !!(m.icon && m.icon.trim())
619
619
  };
620
- if (C.class) {
621
- const i = C.class.split(" ");
622
- i && i.length && i.reduce((f, c) => (f[c] = !0, f), l);
620
+ if (m.class) {
621
+ const c = m.class.split(" ");
622
+ c && c.length && c.reduce((p, b) => (p[b] = !0, p), l);
623
623
  }
624
624
  return l;
625
625
  }
626
- function D(C, l) {
627
- C.stopPropagation();
628
- const i = l.expanded;
629
- document.body.click(), l.expanded = !i;
630
- }
631
- function I(C) {
632
- return w("div", {
633
- id: C.id,
634
- class: v(C)
635
- }, [w("div", {
636
- class: h(C),
626
+ function x(m, l) {
627
+ m.stopPropagation();
628
+ const c = l.expanded;
629
+ document.body.click(), l.expanded = !c;
630
+ }
631
+ function w(m) {
632
+ return y("div", {
633
+ id: m.id,
634
+ class: h(m)
635
+ }, [y("div", {
636
+ class: f(m),
637
637
  style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
638
- onClick: (l) => C.enable && D(l, C)
639
- }, [e.shouldShowIcon(C) && w("i", {
640
- class: e.iconClass(C)
641
- }, null), w("span", null, [C.text]), w("i", {
638
+ onClick: (l) => m.enable && x(l, m)
639
+ }, [e.shouldShowIcon(m) && y("i", {
640
+ class: e.iconClass(m)
641
+ }, null), y("span", null, [m.text]), y("i", {
642
642
  class: "f-icon f-icon-arrow-chevron-down",
643
643
  style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
644
- }, null)]), p(C)]);
644
+ }, null)]), i(m)]);
645
645
  }
646
646
  function g() {
647
- u();
647
+ d();
648
648
  }
649
649
  return {
650
- renderToolbarDropdown: I,
650
+ renderToolbarDropdown: w,
651
651
  clearAllDropDown: g
652
652
  };
653
653
  }
654
654
  const {
655
- buildResponseToolbarItems: de
656
- } = he(), Q = /* @__PURE__ */ X({
655
+ buildResponseToolbarItems: ae
656
+ } = he(), J = /* @__PURE__ */ Q({
657
657
  name: "FResponseToolbar",
658
- props: ie,
658
+ props: oe,
659
659
  emits: ["click"],
660
660
  setup(s, e) {
661
- const o = S(de(s.items)), p = S(), u = S(), v = S(), h = S(s.alignment), D = {
661
+ const n = S(ae(s.items)), i = S(), d = S(), h = S(), f = S(s.alignment), x = {
662
662
  id: "__more_buttons__",
663
663
  text: "更多"
664
- }, I = S(new G(D)), g = xe(), C = W(() => I.value.children.length > 0), l = W(() => J({
664
+ }, w = S(new W(x)), g = xe(), m = V(() => w.value.children.length > 0), l = V(() => H({
665
665
  "f-toolbar": !0,
666
666
  "f-response-toolbar": !0,
667
667
  "position-relative": !0
668
- }, s.customClass)), i = W(() => ({
668
+ }, s.customClass)), c = V(() => ({
669
+ "w-100": !0,
669
670
  "d-flex": !0,
670
671
  "flex-nowrap": !0,
671
- "justify-content-end": h.value === "right",
672
- "justify-content-start": h.value === "left"
672
+ "justify-content-end": f.value === "right",
673
+ "justify-content-start": f.value === "left"
673
674
  })), {
674
- renderToolbarDropdown: f,
675
- clearAllDropDown: c
676
- } = ft(s, g);
677
- function b() {
678
- o.value.filter((m) => m.children && m.children.length > 0).forEach((m) => {
679
- m.expanded = !1;
680
- }), I.value.expanded = !1, c();
675
+ renderToolbarDropdown: p,
676
+ clearAllDropDown: b
677
+ } = pt(s, g);
678
+ function M() {
679
+ n.value.filter((v) => v.children && v.children.length > 0).forEach((v) => {
680
+ v.expanded = !1;
681
+ }), w.value.expanded = !1, b();
681
682
  }
682
- function y(m) {
683
- const R = {
683
+ function O(v) {
684
+ const P = {
684
685
  btn: !0,
685
686
  "f-rt-btn": !0,
686
- "f-btn-ml": h.value === "right",
687
- "f-btn-mr": h.value === "left",
688
- "btn-icontext": !!(m.icon && m.icon.trim())
687
+ "f-btn-ml": f.value === "right",
688
+ "f-btn-mr": f.value === "left",
689
+ "btn-icontext": !!(v.icon && v.icon.trim())
689
690
  };
690
- if (m.class) {
691
- const A = m.class.split(" ");
692
- A && A.length && A.reduce((a, n) => (a[n] = !0, a), R);
691
+ if (v.class) {
692
+ const A = v.class.split(" ");
693
+ A && A.length && A.reduce((a, o) => (a[o] = !0, a), P);
693
694
  }
694
- return R;
695
+ return P;
695
696
  }
696
- function T(m, R) {
697
- document.body.click(), R.onClick(m, R.id), e.emit("click", m, R.id);
697
+ function j(v, P) {
698
+ document.body.click(), typeof P.onClick == "function" && P.onClick(v, P.id), e.emit("click", v, P.id);
698
699
  }
699
- function O(m) {
700
- return w("button", {
700
+ function F(v) {
701
+ return y("button", {
701
702
  type: "button",
702
- class: y(m),
703
- id: m.id,
704
- disabled: !m.enable,
705
- onClick: (R) => T(R, m)
706
- }, [g.shouldShowIcon(m) && w("i", {
707
- class: g.iconClass(m)
708
- }, null), m.text]);
703
+ class: O(v),
704
+ id: v.id,
705
+ disabled: !v.enable,
706
+ onClick: (P) => j(P, v)
707
+ }, [g.shouldShowIcon(v) && y("i", {
708
+ class: g.iconClass(v)
709
+ }, null), v.text]);
709
710
  }
710
- const P = /* @__PURE__ */ new Map(), k = [];
711
- function N(m) {
712
- const R = v.value;
713
- let A = m;
714
- const a = Array.from(R.children), n = a[a.length - 1].id === "__more_buttons__" ? a[a.length - 1] : null;
715
- if (n) {
716
- const x = n.computedStyleMap().get("margin-left"), M = n.computedStyleMap().get("margin-right"), F = (x ? x.value : 0) + n.getBoundingClientRect().width + (M ? M.value : 0);
717
- A -= F;
711
+ const _ = /* @__PURE__ */ new Map(), R = [];
712
+ function E(v) {
713
+ const P = h.value;
714
+ let A = v;
715
+ const a = Array.from(P.children), o = a[a.length - 1].id === "__more_buttons__" ? a[a.length - 1] : null;
716
+ if (o) {
717
+ const C = o.computedStyleMap().get("margin-left"), I = o.computedStyleMap().get("margin-right"), N = (C ? C.value : 0) + o.getBoundingClientRect().width + (I ? I.value : 0);
718
+ A -= N;
718
719
  }
719
- const t = a.filter((x) => x.id !== "__more_buttons__");
720
- for (const x of t) {
721
- const M = x.computedStyleMap().get("margin-left"), F = x.computedStyleMap().get("margin-right"), _ = (M ? M.value : 0) + x.getBoundingClientRect().width + (F ? F.value : 0);
722
- A < _ ? (P.set(x.id, !0), k.push({
723
- id: x.id,
724
- width: _
725
- })) : A -= _;
720
+ const t = a.filter((C) => C.id !== "__more_buttons__");
721
+ for (const C of t) {
722
+ const I = C.computedStyleMap().get("margin-left"), N = C.computedStyleMap().get("margin-right"), B = (I ? I.value : 0) + C.getBoundingClientRect().width + (N ? N.value : 0);
723
+ A < B ? (_.set(C.id, !0), R.push({
724
+ id: C.id,
725
+ width: B
726
+ })) : A -= B;
726
727
  }
727
- if (k.length)
728
- for (let x = k.length - 1; x >= 0; x--) {
729
- const M = k[x].width;
730
- if (A >= M)
731
- A -= M, P.delete(k[x].id), k.pop();
728
+ if (R.length)
729
+ for (let C = R.length - 1; C >= 0; C--) {
730
+ const I = R[C].width;
731
+ if (A >= I)
732
+ A -= I, _.delete(R[C].id), R.pop();
732
733
  else
733
734
  break;
734
735
  }
735
- const r = Object.assign({}, I.value);
736
+ const r = Object.assign({}, w.value);
736
737
  r.children = [];
737
- const d = new G(r), E = o.value.reduce((x, M) => (P.has(M.id) && d.children.push(M), M.visible = !P.has(M.id), x.push(M), x), []);
738
- I.value = d, o.value = E;
738
+ const u = new W(r), T = n.value.reduce((C, I) => (_.has(I.id) && u.children.push(I), I.visible = !_.has(I.id), C.push(I), C), []);
739
+ w.value = u, n.value = T;
739
740
  }
740
- const j = new ResizeObserver((m) => {
741
- if (m.length) {
742
- const A = m[0].contentRect.width, n = v.value.getBoundingClientRect().width;
743
- (A < n || k.length) && (N(A), b());
741
+ const k = new ResizeObserver((v) => {
742
+ if (v.length) {
743
+ const A = v[0].contentRect.width, o = h.value.getBoundingClientRect().width;
744
+ (A < o || R.length) && (E(A), M());
744
745
  }
745
746
  });
746
747
  return z(() => {
747
- const m = u.value;
748
- j.observe(m), document.body.addEventListener("click", b), document.body.addEventListener("wheel", b);
749
- }), ne(() => {
750
- j.disconnect(), document.body.removeEventListener("click", b), document.body.removeEventListener("wheel", b);
751
- }), H(() => s.items, () => {
752
- o.value = de(s.items);
748
+ const v = d.value;
749
+ k.observe(v), document.body.addEventListener("click", M), document.body.addEventListener("wheel", M);
750
+ }), ue(() => {
751
+ k.disconnect(), document.body.removeEventListener("click", M), document.body.removeEventListener("wheel", M);
752
+ }), G(() => s.items, () => {
753
+ n.value = ae(s.items);
753
754
  }, {
754
755
  deep: !0
755
756
  }), e.expose({
756
- elementRef: p
757
- }), () => w("div", {
757
+ elementRef: i
758
+ }), () => y("div", {
758
759
  class: l.value,
759
- ref: p
760
- }, [w("div", {
761
- ref: u,
762
- class: i.value
763
- }, [w("div", {
764
- ref: v,
760
+ ref: i
761
+ }, [y("div", {
762
+ ref: d,
763
+ class: c.value
764
+ }, [y("div", {
765
+ ref: h,
765
766
  class: "d-inline-block f-response-content",
766
767
  style: "white-space: nowrap;"
767
- }, [o.value.filter((m) => m.visible).map((m) => m.children && m.children.length > 0 ? f(m) : O(m)), C.value && f(I.value)])])]);
768
+ }, [n.value.filter((v) => v.visible).map((v) => v.children && v.children.length > 0 ? p(v) : F(v)), m.value && p(w.value)])])]);
768
769
  }
769
770
  });
770
- function gt(s, e) {
771
- const o = L("design-item-context"), p = L("toolbar-item-handler", () => {
771
+ function ft(s, e) {
772
+ const n = L("design-item-context"), i = L("toolbar-item-handler", () => {
772
773
  });
773
- function u() {
774
- p && p();
774
+ function d() {
775
+ i && i();
775
776
  }
776
- function v(n) {
777
+ function h(o) {
777
778
  const t = {
778
779
  "dropdown-menu": !0
779
780
  };
780
- if (n.class) {
781
- const r = n.menuClass.split(" ");
782
- r && r.length && r.reduce((d, E) => (d[E] = !0, d), t);
781
+ if (o.class) {
782
+ const r = o.menuClass.split(" ");
783
+ r && r.length && r.reduce((u, T) => (u[T] = !0, u), t);
783
784
  }
784
785
  return t;
785
786
  }
786
- function h(n) {
787
+ function f(o) {
787
788
  const t = {
788
- disabled: !n.enable,
789
+ disabled: !o.enable,
789
790
  "dropdown-submenu": !0,
790
791
  "f-rt-dropdown": !0
791
- }, r = n.dropdownClass.split(" ");
792
- return r && r.length && r.reduce((d, E) => (d[E] = !0, d), t), t;
792
+ }, r = o.dropdownClass.split(" ");
793
+ return r && r.length && r.reduce((u, T) => (u[T] = !0, u), t), t;
793
794
  }
794
- function D(n) {
795
+ function x(o) {
795
796
  const t = {
796
- disabled: !n.enable,
797
+ disabled: !o.enable,
797
798
  "dropdown-item": !0,
798
799
  "f-rt-btn": !0,
799
800
  "position-relative": !0,
800
801
  "farris-component": !0
801
- }, r = n.class.split(" ");
802
- return r && r.length && r.reduce((d, E) => (d[E] = !0, d), t), t;
802
+ }, r = o.class.split(" ");
803
+ return r && r.length && r.reduce((u, T) => (u[T] = !0, u), t), t;
803
804
  }
804
- let I;
805
+ let w;
805
806
  const g = /* @__PURE__ */ new Map();
806
- function C(n, t, r) {
807
- var E;
808
- ((E = n.target) == null ? void 0 : E.id) === t.id && n.stopPropagation();
809
- const d = r ? r.id : "__top_item__";
810
- if (t.children && t.children.length && (t.expanded = !t.expanded, t.expanded ? g.set(d, t) : g.delete(d)), g.has(d) && g.get(d) !== t) {
811
- const x = g.get(d);
812
- x && (x.expanded = !1);
807
+ function m(o, t, r) {
808
+ var T;
809
+ ((T = o.target) == null ? void 0 : T.id) === t.id && o.stopPropagation();
810
+ const u = r ? r.id : "__top_item__";
811
+ if (t.children && t.children.length && (t.expanded = !t.expanded, t.expanded ? g.set(u, t) : g.delete(u)), g.has(u) && g.get(u) !== t) {
812
+ const C = g.get(u);
813
+ C && (C.expanded = !1);
813
814
  }
814
815
  }
815
- function l(n) {
816
- n && (n.stopPropagation(), n.preventDefault());
816
+ function l(o) {
817
+ o && (o.stopPropagation(), o.preventDefault());
817
818
  }
818
- function i() {
819
+ function c() {
819
820
  Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((t) => t.classList.remove("dgComponentFocused"));
820
- const n = document.getElementsByClassName("dgComponentSelected");
821
- Array.from(n).forEach((t) => t.classList.remove("dgComponentSelected"));
821
+ const o = document.getElementsByClassName("dgComponentSelected");
822
+ Array.from(o).forEach((t) => t.classList.remove("dgComponentSelected"));
822
823
  }
823
- function f(n) {
824
- n.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
824
+ function p(o) {
825
+ o.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
825
826
  }
826
- function c(n) {
827
+ function b(o) {
827
828
  const {
828
829
  buttons: t = []
829
- } = o.schema;
830
+ } = n.schema;
830
831
  let r = [];
831
- t.forEach((x) => {
832
- r = r.concat(x.children || []);
832
+ t.forEach((C) => {
833
+ r = r.concat(C.children || []);
833
834
  });
834
- const d = r.findIndex((x) => x.id === n), E = d === -1 ? null : r[d];
835
+ const u = r.findIndex((C) => C.id === o), T = u === -1 ? null : r[u];
835
836
  return {
836
- index: d,
837
- item: E
837
+ index: u,
838
+ item: T
838
839
  };
839
840
  }
840
- function b(n) {
841
+ function M(o) {
841
842
  const {
842
843
  buttons: t = []
843
- } = o.schema, r = t.findIndex((E) => E.id === n), d = r === -1 ? null : t[r];
844
+ } = n.schema, r = t.findIndex((T) => T.id === o), u = r === -1 ? null : t[r];
844
845
  return {
845
846
  index: r,
846
- item: d
847
+ item: u
847
848
  };
848
849
  }
849
- function y(n) {
850
- var d;
851
- o.schema;
850
+ function O(o) {
851
+ var u;
852
+ n.schema;
852
853
  const {
853
854
  index: t,
854
855
  item: r
855
- } = c(n);
856
- (d = o == null ? void 0 : o.setupContext) == null || d.emit("selectionChange", r == null ? void 0 : r.type, r);
856
+ } = b(o);
857
+ (u = n == null ? void 0 : n.setupContext) == null || u.emit("selectionChange", r == null ? void 0 : r.type, r);
857
858
  }
858
- const T = function(n) {
859
+ const j = function(o) {
859
860
  const {
860
861
  componentType: t
861
- } = n, r = q(t, n), d = t.toLowerCase().replace("-", "_");
862
- return r && !r.id && r.type === t && (r.id = `${d}_${Math.random().toString().slice(2, 6)}`), r;
863
- }, O = function() {
864
- const n = {
862
+ } = o, r = X(t, o), u = t.toLowerCase().replace("-", "_");
863
+ return r && !r.id && r.type === t && (r.id = `${u}_${Math.random().toString().slice(2, 6)}`), r;
864
+ }, F = function() {
865
+ const o = {
865
866
  componentType: "response-toolbar-item",
866
867
  parentComponentInstance: e.value,
867
868
  targetPosition: -1
868
869
  };
869
- return T(n);
870
+ return j(o);
870
871
  };
871
- function P(n, t) {
872
- l(n), i(), f(n), y(t.id);
873
- }
874
- function k(n, t, r) {
875
- l(n);
876
- const d = t.id, E = r && r.id, {
877
- buttons: x = []
878
- } = o.schema;
879
- if (!E)
872
+ function _(o, t) {
873
+ l(o), c(), p(o), O(t.id);
874
+ }
875
+ function R(o, t, r) {
876
+ l(o);
877
+ const u = t.id, T = r && r.id, {
878
+ buttons: C = []
879
+ } = n.schema;
880
+ if (!T)
880
881
  return;
881
882
  const {
882
- index: M
883
- } = b(E);
884
- if (M === -1)
883
+ index: I
884
+ } = M(T);
885
+ if (I === -1)
885
886
  return;
886
887
  const {
887
- index: F
888
- } = c(d);
889
- F !== -1 && (x[M].children.splice(F, 1), u());
890
- }
891
- function N(n, t, r) {
892
- l(n);
893
- const d = r && r.id, {
894
- buttons: E = []
895
- } = o.schema;
896
- if (!d)
888
+ index: N
889
+ } = b(u);
890
+ N !== -1 && (C[I].children.splice(N, 1), d());
891
+ }
892
+ function E(o, t, r) {
893
+ l(o);
894
+ const u = r && r.id, {
895
+ buttons: T = []
896
+ } = n.schema;
897
+ if (!u)
897
898
  return;
898
899
  const {
899
- index: x
900
- } = b(d);
901
- if (x === -1)
900
+ index: C
901
+ } = M(u);
902
+ if (C === -1)
902
903
  return;
903
- const M = O(), F = Object.assign({}, M, {
904
+ const I = F(), N = Object.assign({}, I, {
904
905
  text: t.text
905
906
  });
906
- E[x].children.push(F), u();
907
- }
908
- function j(n, t, r) {
909
- l(n);
910
- const d = r && r.id, {
911
- buttons: E = []
912
- } = o.schema;
913
- if (!d)
907
+ T[C].children.push(N), d();
908
+ }
909
+ function k(o, t, r) {
910
+ l(o);
911
+ const u = r && r.id, {
912
+ buttons: T = []
913
+ } = n.schema;
914
+ if (!u)
914
915
  return;
915
916
  const {
916
- index: x
917
- } = b(d);
918
- if (x === -1)
917
+ index: C
918
+ } = M(u);
919
+ if (C === -1)
919
920
  return;
920
- const M = O(), F = Object.assign({}, M, {
921
+ const I = F(), N = Object.assign({}, I, {
921
922
  text: "按钮"
922
923
  });
923
- E[x].children.push(F), u();
924
+ T[C].children.push(N), d();
924
925
  }
925
- function m(n, t) {
926
- return w("div", {
926
+ function v(o, t) {
927
+ return y("div", {
927
928
  class: "component-btn-group"
928
- }, [w("div", null, [w("div", {
929
+ }, [y("div", null, [y("div", {
929
930
  role: "button",
930
931
  class: "btn component-settings-button",
931
932
  title: "删除",
932
933
  ref: "removeButton",
933
934
  style: "position:static;",
934
- onClick: (r) => k(r, n, t)
935
- }, [w("i", {
935
+ onClick: (r) => R(r, o, t)
936
+ }, [y("i", {
936
937
  class: "f-icon f-icon-yxs_delete"
937
- }, null)]), w("div", {
938
+ }, null)]), y("div", {
938
939
  role: "button",
939
940
  class: "btn component-settings-button",
940
941
  title: "复制",
941
942
  ref: "copyButton",
942
943
  style: "position:static;",
943
- onClick: (r) => N(r, n, t)
944
- }, [w("i", {
944
+ onClick: (r) => E(r, o, t)
945
+ }, [y("i", {
945
946
  class: "f-icon f-icon-yxs_copy"
946
- }, null)]), w("div", {
947
+ }, null)]), y("div", {
947
948
  role: "button",
948
949
  class: "btn component-settings-button",
949
950
  title: "新增同级",
950
951
  ref: "appendSame",
951
952
  style: "width:85px!important;padding:0 5px;position:static;",
952
- onClick: (r) => j(r, n, t)
953
- }, [w("i", {
953
+ onClick: (r) => k(r, o, t)
954
+ }, [y("i", {
954
955
  class: "f-icon f-icon-plus-circle text-white mr-1"
955
- }, null), w("span", {
956
+ }, null), y("span", {
956
957
  style: "font-size:13px;margin:auto"
957
- }, [fe("新增同级")])])])]);
958
+ }, [pe("新增同级")])])])]);
958
959
  }
959
- function R(n) {
960
- return n.children.map((t) => t.children && t.children.length ? w("li", {
961
- class: h(t),
960
+ function P(o) {
961
+ return o.children.map((t) => t.children && t.children.length ? y("li", {
962
+ class: f(t),
962
963
  id: t.id,
963
- onClick: (r) => t.enable && C(r, t, n)
964
- }, [w("span", {
964
+ onClick: (r) => t.enable && m(r, t, o)
965
+ }, [y("span", {
965
966
  id: t.id,
966
- class: D(t),
967
- onMouseover: (r) => t.enable && C(r, t, n)
968
- }, [t.text, w("i", {
967
+ class: x(t),
968
+ onMouseover: (r) => t.enable && m(r, t, o)
969
+ }, [t.text, y("i", {
969
970
  class: "f-icon f-icon-arrow-chevron-right",
970
971
  style: "display: inline-block;float: right;line-height: 1.25rem;"
971
- }, null)]), I(t, t)]) : w("li", {
972
- class: D(t),
972
+ }, null)]), w(t, t)]) : y("li", {
973
+ class: x(t),
973
974
  id: t.id,
974
- onClick: (r) => P(r, t)
975
- }, [m(t, n), s.shouldShowIcon(t) && w("i", {
975
+ onClick: (r) => _(r, t)
976
+ }, [v(t, o), s.shouldShowIcon(t) && y("i", {
976
977
  class: s.iconClass(t)
977
978
  }, null), t.text]));
978
979
  }
979
- function A(n, t, r) {
980
- const d = {
981
- display: n.expanded ? "block" : "none",
980
+ function A(o, t, r) {
981
+ const u = {
982
+ display: o.expanded ? "block" : "none",
982
983
  position: "fixed",
983
984
  maxWidth: "300px",
984
985
  width: "auto",
985
986
  minWidth: "120px"
986
- }, E = document.getElementsByTagName("body")[0].getClientRects()[0].width, x = t, M = x == null ? void 0 : x.getClientRects();
987
- if (x && M && M.length) {
987
+ }, T = document.getElementsByTagName("body")[0].getClientRects()[0].width, C = t, I = C == null ? void 0 : C.getClientRects();
988
+ if (C && I && I.length) {
988
989
  const {
989
- top: F,
990
- width: _,
990
+ top: N,
991
+ width: B,
991
992
  left: $,
992
- right: V,
993
- height: U
994
- } = M[0], Y = Math.ceil(U + F);
995
- d.top = `${Y}px`, d.left = `${$}px`;
996
- const Ie = n.id + "_menu", Z = t ? t.querySelector("#" + Ie) : null;
997
- if (Z) {
998
- d.display === "block" && (Z.style.display = "block");
999
- const le = Z.getBoundingClientRect();
993
+ right: U,
994
+ height: q
995
+ } = I[0], Ie = Math.ceil(q + N);
996
+ u.top = `${Ie}px`, u.left = `${$}px`;
997
+ const De = o.id + "_menu", Y = t ? t.querySelector("#" + De) : null;
998
+ if (Y) {
999
+ u.display === "block" && (Y.style.display = "block");
1000
+ const ie = Y.getBoundingClientRect();
1000
1001
  if (r) {
1001
- d.top = `${F - 6}px`;
1002
- const De = Math.ceil(_ + $);
1003
- d.left = `${De}px`;
1002
+ u.top = `${N - 6}px`;
1003
+ const Se = Math.ceil(B + $);
1004
+ u.left = `${Se}px`;
1004
1005
  }
1005
- E - $ - _ < le.width && (d.left = `${(r ? $ : V) - le.width}px`);
1006
+ T - $ - B < ie.width && (u.left = `${(r ? $ : U) - ie.width}px`);
1006
1007
  }
1007
1008
  }
1008
- return d;
1009
- }
1010
- I = function(n, t) {
1011
- var x, M;
1012
- const r = ue(), d = t ? t.id : n.id, E = (M = (x = r == null ? void 0 : r.exposed) == null ? void 0 : x.elementRef.value) == null ? void 0 : M.querySelector("#" + d);
1013
- return w("ul", {
1014
- class: v(n),
1015
- style: A(n, E, t),
1016
- id: n.id + "_menu"
1017
- }, [R(n)]);
1009
+ return u;
1010
+ }
1011
+ w = function(o, t) {
1012
+ var C, I;
1013
+ const r = de(), u = t ? t.id : o.id, T = (I = (C = r == null ? void 0 : r.exposed) == null ? void 0 : C.elementRef.value) == null ? void 0 : I.querySelector("#" + u);
1014
+ return y("ul", {
1015
+ class: h(o),
1016
+ style: A(o, T, t),
1017
+ id: o.id + "_menu"
1018
+ }, [P(o)]);
1018
1019
  };
1019
1020
  function a() {
1020
- g.forEach((n) => {
1021
- n.expanded = !1;
1021
+ g.forEach((o) => {
1022
+ o.expanded = !1;
1022
1023
  }), g.clear();
1023
1024
  }
1024
1025
  return {
1025
- renderDropdownMenu: I,
1026
+ renderDropdownMenu: w,
1026
1027
  clearAllDropDownMenu: a
1027
1028
  };
1028
1029
  }
1029
- function mt(s, e, o) {
1030
- const p = S(s.alignment), {
1031
- renderDropdownMenu: u,
1032
- clearAllDropDownMenu: v
1033
- } = gt(e, o), h = L("design-item-context"), D = L("toolbar-item-handler", () => {
1030
+ function gt(s, e, n) {
1031
+ const i = S(s.alignment), {
1032
+ renderDropdownMenu: d,
1033
+ clearAllDropDownMenu: h
1034
+ } = ft(e, n), f = L("design-item-context"), x = L("toolbar-item-handler", () => {
1034
1035
  });
1035
- function I() {
1036
- D && D();
1036
+ function w() {
1037
+ x && x();
1037
1038
  }
1038
1039
  function g(a) {
1039
- const n = {
1040
+ const o = {
1040
1041
  "btn-group": !0,
1041
1042
  "f-rt-dropdown": !0,
1042
- "f-btn-ml": p.value === "right",
1043
- "f-btn-mr": p.value === "left"
1043
+ "f-btn-ml": i.value === "right",
1044
+ "f-btn-mr": i.value === "left"
1044
1045
  }, t = a.dropdownClass.split(" ");
1045
- return t && t.length && t.reduce((r, d) => (r[d] = !0, r), n), n;
1046
+ return t && t.length && t.reduce((r, u) => (r[u] = !0, r), o), o;
1046
1047
  }
1047
- function C(a) {
1048
- const n = {
1048
+ function m(a) {
1049
+ const o = {
1049
1050
  btn: !0,
1050
1051
  disabled: !a.enable,
1051
1052
  "position-relative": !0,
@@ -1055,934 +1056,178 @@ function mt(s, e, o) {
1055
1056
  };
1056
1057
  if (a.class) {
1057
1058
  const t = a.class.split(" ");
1058
- t && t.length && t.reduce((r, d) => (r[d] = !0, r), n);
1059
+ t && t.length && t.reduce((r, u) => (r[u] = !0, r), o);
1059
1060
  }
1060
- return n;
1061
+ return o;
1061
1062
  }
1062
1063
  function l(a) {
1063
1064
  a && (a.stopPropagation(), a.preventDefault());
1064
1065
  }
1065
- function i(a, n) {
1066
+ function c(a, o) {
1066
1067
  l(a);
1067
- const t = n.expanded;
1068
- document.body.click(), n.expanded = !t;
1068
+ const t = o.expanded;
1069
+ document.body.click(), o.expanded = !t;
1069
1070
  }
1070
- const f = function(a) {
1071
+ const p = function(a) {
1071
1072
  const {
1072
- componentType: n
1073
- } = a, t = q(n, a), r = n.toLowerCase().replace("-", "_");
1074
- return t && !t.id && t.type === n && (t.id = `${r}_${Math.random().toString().slice(2, 6)}`), t;
1075
- }, c = function() {
1073
+ componentType: o
1074
+ } = a, t = X(o, a), r = o.toLowerCase().replace("-", "_");
1075
+ return t && !t.id && t.type === o && (t.id = `${r}_${Math.random().toString().slice(2, 6)}`), t;
1076
+ }, b = function() {
1076
1077
  const a = {
1077
1078
  componentType: "response-toolbar-item",
1078
- parentComponentInstance: o.value,
1079
+ parentComponentInstance: n.value,
1079
1080
  targetPosition: -1
1080
1081
  };
1081
- return f(a);
1082
+ return p(a);
1082
1083
  };
1083
- function b(a) {
1084
- const n = h.schema.buttons || h.schema.contents, t = n == null ? void 0 : n.findIndex((d) => d.id === a), r = t === -1 ? null : n[t];
1084
+ function M(a) {
1085
+ const o = f.schema.buttons || f.schema.contents, t = o == null ? void 0 : o.findIndex((u) => u.id === a), r = t === -1 ? null : o[t];
1085
1086
  return {
1086
1087
  index: t,
1087
1088
  toolbarItem: r
1088
1089
  };
1089
1090
  }
1090
- function y(a, n) {
1091
- var M;
1091
+ function O(a, o) {
1092
+ var I;
1092
1093
  const {
1093
1094
  index: t,
1094
1095
  toolbarItem: r
1095
- } = b(n);
1096
+ } = M(o);
1096
1097
  if (t === -1)
1097
1098
  return;
1098
- const d = r.text || "按钮", E = c(), x = Object.assign({}, E, {
1099
- text: d
1099
+ const u = r.text || "按钮", T = b(), C = Object.assign({}, T, {
1100
+ text: u
1100
1101
  });
1101
- (M = h.schema.buttons) == null || M.push(x), I();
1102
+ (I = f.schema.buttons) == null || I.push(C), w();
1102
1103
  }
1103
- function T(a, n) {
1104
+ function j(a, o) {
1104
1105
  const {
1105
1106
  index: t,
1106
1107
  toolbarItem: r
1107
- } = b(n);
1108
+ } = M(o);
1108
1109
  if (t === -1)
1109
1110
  return;
1110
- const d = r.text || "按钮", E = c(), x = Object.assign({}, E, {
1111
- text: d
1112
- }), M = h.schema.buttons[t].children || [];
1113
- M.push(x), h.schema.buttons[t].children = M, I();
1111
+ const u = r.text || "按钮", T = b(), C = Object.assign({}, T, {
1112
+ text: u
1113
+ }), I = f.schema.buttons[t].children || [];
1114
+ I.push(C), f.schema.buttons[t].children = I, w();
1114
1115
  }
1115
- function O(a, n) {
1116
- const t = h.schema.buttons || h.schema.contents, r = t == null ? void 0 : t.findIndex((d) => d.id === n);
1117
- r !== -1 && (t.splice(r, 1), I());
1116
+ function F(a, o) {
1117
+ const t = f.schema.buttons || f.schema.contents, r = t == null ? void 0 : t.findIndex((u) => u.id === o);
1118
+ r !== -1 && (t.splice(r, 1), w());
1118
1119
  }
1119
- function P(a) {
1120
- return w("div", {
1120
+ function _(a) {
1121
+ return y("div", {
1121
1122
  class: "component-btn-group"
1122
- }, [w("div", null, [w("div", {
1123
+ }, [y("div", null, [y("div", {
1123
1124
  role: "button",
1124
1125
  class: "btn component-settings-button",
1125
1126
  title: "删除",
1126
1127
  ref: "removeButton",
1127
1128
  style: "position:static;",
1128
- onClick: (n) => O(n, a)
1129
- }, [w("i", {
1129
+ onClick: (o) => F(o, a)
1130
+ }, [y("i", {
1130
1131
  class: "f-icon f-icon-yxs_delete"
1131
- }, null)]), w("div", {
1132
+ }, null)]), y("div", {
1132
1133
  role: "button",
1133
1134
  class: "btn component-settings-button",
1134
1135
  title: "复制",
1135
1136
  ref: "copyButton",
1136
1137
  style: "position:static;",
1137
- onClick: (n) => y(n, a)
1138
- }, [w("i", {
1138
+ onClick: (o) => O(o, a)
1139
+ }, [y("i", {
1139
1140
  class: "f-icon f-icon-yxs_copy"
1140
- }, null)]), w("div", {
1141
+ }, null)]), y("div", {
1141
1142
  role: "button",
1142
1143
  class: "btn component-settings-button",
1143
1144
  title: "新增子级",
1144
1145
  ref: "appendChildButton",
1145
1146
  style: "width:85px!important;padding:0 5px;position:static;",
1146
- onClick: (n) => T(n, a)
1147
- }, [w("i", {
1147
+ onClick: (o) => j(o, a)
1148
+ }, [y("i", {
1148
1149
  class: "f-icon f-icon-plus-circle text-white mr-1"
1149
- }, null), w("span", {
1150
+ }, null), y("span", {
1150
1151
  style: "font-size:13px;margin:auto"
1151
- }, [fe("新增子级")])])])]);
1152
+ }, [pe("新增子级")])])])]);
1152
1153
  }
1153
- function k() {
1154
- Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((n) => n.classList.remove("dgComponentFocused"));
1154
+ function R() {
1155
+ Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
1155
1156
  const a = document.getElementsByClassName("dgComponentSelected");
1156
- Array.from(a).forEach((n) => n.classList.remove("dgComponentSelected"));
1157
+ Array.from(a).forEach((o) => o.classList.remove("dgComponentSelected"));
1157
1158
  }
1158
- function N(a) {
1159
+ function E(a) {
1159
1160
  a.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
1160
1161
  }
1161
- function j(a) {
1162
- var d;
1163
- const n = h.schema.buttons || h.schema.contents, t = n == null ? void 0 : n.findIndex((E) => E.id === a);
1162
+ function k(a) {
1163
+ var u;
1164
+ const o = f.schema.buttons || f.schema.contents, t = o == null ? void 0 : o.findIndex((T) => T.id === a);
1164
1165
  if (t === -1)
1165
1166
  return;
1166
- const r = n[t];
1167
- (d = h == null ? void 0 : h.setupContext) == null || d.emit("selectionChange", "response-toolbar-item", r);
1167
+ const r = o[t];
1168
+ (u = f == null ? void 0 : f.setupContext) == null || u.emit("selectionChange", "response-toolbar-item", r);
1168
1169
  }
1169
- function m(a, n) {
1170
- l(a), k(), N(a), l(a), i(a, n), j(n.id);
1170
+ function v(a, o) {
1171
+ l(a), R(), E(a), l(a), c(a, o), k(o.id);
1171
1172
  }
1172
- function R(a) {
1173
- return w("div", {
1173
+ function P(a) {
1174
+ return y("div", {
1174
1175
  id: a.id,
1175
1176
  class: g(a)
1176
- }, [w("div", {
1177
- class: C(a),
1177
+ }, [y("div", {
1178
+ class: m(a),
1178
1179
  style: "display: flex;padding-right: 0.1rem;",
1179
- onClick: (n) => a.enable && m(n, a)
1180
- }, [P(a.id), e.shouldShowIcon(a) && w("i", {
1180
+ onClick: (o) => a.enable && v(o, a)
1181
+ }, [_(a.id), e.shouldShowIcon(a) && y("i", {
1181
1182
  class: e.iconClass(a)
1182
- }, null), w("span", null, [a.text]), w("i", {
1183
+ }, null), y("span", null, [a.text]), y("i", {
1183
1184
  class: "f-icon f-icon-arrow-chevron-down",
1184
1185
  style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
1185
- }, null)]), u(a)]);
1186
+ }, null)]), d(a)]);
1186
1187
  }
1187
1188
  function A() {
1188
- v();
1189
+ h();
1189
1190
  }
1190
1191
  return {
1191
- renderToolbarDropdown: R,
1192
+ renderToolbarDropdown: P,
1192
1193
  clearAllDropDown: A
1193
1194
  };
1194
1195
  }
1195
- function ht() {
1196
- function s(e) {
1197
- var u, v;
1198
- if (!e)
1199
- return !1;
1200
- const o = ((u = e.targetContainer) == null ? void 0 : u.componentInstance) && e.targetContainer.componentInstance.value;
1201
- if (!o)
1202
- return !1;
1203
- const p = (v = o.schema.appearance) == null ? void 0 : v.class;
1204
- if (e.controlCategory === "input" || e.controlType === "form-group") {
1205
- const h = o.schema.type, D = (h === "response-form" || h === "content-container") && p && p.includes("farris-form");
1206
- if (o.schema.type !== "response-layout-item" && !D)
1207
- return !1;
1208
- }
1209
- return e.controlType !== "field-set";
1210
- }
1211
- return {
1212
- basalDragulaRuleForContainer: s
1213
- };
1214
- }
1215
- const bt = "https://json-schema.org/draft/2020-12/schema", yt = "https://farris-design.gitee.io/dragging-rules.schema.json", vt = "Dragging Rules", Ct = "The rules of designer canvas", wt = "object", xt = {
1216
- "f-page": {
1217
- description: "The root class of page designed by farris.",
1218
- type: "object",
1219
- properties: {
1220
- contents: {
1221
- type: "object",
1222
- properties: {
1223
- "f-page-header": {
1224
- description: "The class of page header designed by farris.",
1225
- type: "string"
1226
- },
1227
- "f-page-main": {
1228
- description: "The class of page body designed by farris.",
1229
- type: "object",
1230
- properties: {
1231
- contents: {
1232
- type: "object",
1233
- properties: {
1234
- "f-struct-like-card": {
1235
- description: "",
1236
- type: "object",
1237
- properties: {
1238
- contents: {
1239
- type: "object",
1240
- properties: {
1241
- "f-struct-form": {
1242
- description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
1243
- type: "object",
1244
- properties: {
1245
- contents: {
1246
- type: "object",
1247
- properties: {
1248
- "f-section-form": {
1249
- description: "The class of section which has wrapped a reponse-form component.",
1250
- type: "object",
1251
- properties: {
1252
- contents: {
1253
- type: "object",
1254
- properties: {
1255
- "f-form-layout": {
1256
- description: "The class of reponse form",
1257
- type: "object",
1258
- properties: {
1259
- rules: {
1260
- type: "object",
1261
- properties: {
1262
- canAccept: {
1263
- type: "boolean",
1264
- const: !0
1265
- },
1266
- fixed: {
1267
- type: "boolean",
1268
- const: !0
1269
- },
1270
- hidePadding: {
1271
- type: "boolean",
1272
- const: !1
1273
- }
1274
- }
1275
- }
1276
- }
1277
- }
1278
- }
1279
- },
1280
- rules: {
1281
- type: "object",
1282
- properties: {
1283
- canAccept: {
1284
- type: "boolean",
1285
- const: !1
1286
- },
1287
- fixed: {
1288
- type: "boolean",
1289
- const: !0
1290
- },
1291
- hidePadding: {
1292
- type: "boolean",
1293
- const: !0
1294
- }
1295
- }
1296
- }
1297
- }
1298
- }
1299
- }
1300
- },
1301
- rules: {
1302
- type: "object",
1303
- properties: {
1304
- canAccept: {
1305
- type: "boolean",
1306
- const: !1
1307
- },
1308
- fixed: {
1309
- type: "boolean",
1310
- const: !1
1311
- },
1312
- hidePadding: {
1313
- type: "boolean",
1314
- const: !0
1315
- }
1316
- }
1317
- }
1318
- }
1319
- },
1320
- "f-struct-wrapper": {
1321
- description: "",
1322
- type: "object",
1323
- properties: {
1324
- contents: {
1325
- type: "object",
1326
- properties: {
1327
- "f-section-tabs": {
1328
- description: "The class of section which has wrapped sub-grid tabs.",
1329
- type: "object",
1330
- properties: {
1331
- contents: {
1332
- type: "object",
1333
- properties: {
1334
- "f-tabs-in-card": {
1335
- description: "The class of tabs which contains sub-grid.",
1336
- type: "object",
1337
- properties: {
1338
- contents: {
1339
- type: "object",
1340
- properties: {
1341
- "f-struct-data-grid-in-card": {
1342
- description: "The class of sub-grid component",
1343
- type: "object",
1344
- properties: {
1345
- contents: {
1346
- type: "object",
1347
- properties: {
1348
- "f-grid-is-sub": {
1349
- description: "The class of sub-grid",
1350
- type: "object",
1351
- properties: {
1352
- rules: {
1353
- type: "object",
1354
- properties: {
1355
- canAccept: {
1356
- type: "boolean",
1357
- const: !0
1358
- },
1359
- fixed: {
1360
- type: "boolean",
1361
- const: !0
1362
- },
1363
- hidePadding: {
1364
- type: "boolean",
1365
- const: !1
1366
- }
1367
- }
1368
- }
1369
- }
1370
- }
1371
- }
1372
- },
1373
- rules: {
1374
- type: "object",
1375
- properties: {
1376
- canAccept: {
1377
- type: "boolean",
1378
- const: !1
1379
- },
1380
- fixed: {
1381
- type: "boolean",
1382
- const: !1
1383
- },
1384
- hidePadding: {
1385
- type: "boolean",
1386
- const: !0
1387
- }
1388
- }
1389
- }
1390
- }
1391
- }
1392
- }
1393
- },
1394
- rules: {
1395
- type: "object",
1396
- properties: {
1397
- canAccept: {
1398
- type: "boolean",
1399
- const: !1
1400
- },
1401
- fixed: {
1402
- type: "boolean",
1403
- const: !0
1404
- },
1405
- hidePadding: {
1406
- type: "boolean",
1407
- const: !0
1408
- }
1409
- }
1410
- }
1411
- }
1412
- }
1413
- }
1414
- },
1415
- rules: {
1416
- type: "object",
1417
- properties: {
1418
- canAccept: {
1419
- type: "boolean",
1420
- const: !1
1421
- },
1422
- fixed: {
1423
- type: "boolean",
1424
- const: !0
1425
- },
1426
- hidePadding: {
1427
- type: "boolean",
1428
- const: !0
1429
- }
1430
- }
1431
- }
1432
- }
1433
- },
1434
- "f-section-in-main": {
1435
- description: "The class of section which has wrapped a reponse-form component.",
1436
- type: "object",
1437
- properties: {
1438
- rules: {
1439
- type: "object",
1440
- properties: {
1441
- canAccept: {
1442
- type: "boolean",
1443
- const: !0
1444
- },
1445
- fixed: {
1446
- type: "boolean",
1447
- const: !0
1448
- },
1449
- hidePadding: {
1450
- type: "boolean",
1451
- const: !1
1452
- }
1453
- }
1454
- }
1455
- }
1456
- }
1457
- }
1458
- },
1459
- rules: {
1460
- type: "object",
1461
- properties: {
1462
- canAccept: {
1463
- type: "boolean",
1464
- const: !1
1465
- },
1466
- fixed: {
1467
- type: "boolean",
1468
- const: !1
1469
- },
1470
- hidePadding: {
1471
- type: "boolean",
1472
- const: !0
1473
- }
1474
- }
1475
- }
1476
- }
1477
- }
1478
- }
1479
- },
1480
- rules: {
1481
- type: "object",
1482
- properties: {
1483
- canAccept: {
1484
- type: "boolean",
1485
- const: !0
1486
- },
1487
- fixed: {
1488
- type: "boolean",
1489
- const: !0
1490
- },
1491
- hidePadding: {
1492
- type: "object",
1493
- const: {
1494
- allOf: [
1495
- {
1496
- sibling: 0,
1497
- parent: {
1498
- "f-page-main": !0
1499
- }
1500
- }
1501
- ]
1502
- }
1503
- }
1504
- }
1505
- }
1506
- }
1507
- },
1508
- "f-struct-data-grid": {
1509
- description: "",
1510
- type: "object",
1511
- properties: {
1512
- rules: {
1513
- type: "object",
1514
- properties: {
1515
- canAccept: {
1516
- type: "object",
1517
- const: !0
1518
- },
1519
- fixed: {
1520
- type: "boolean",
1521
- const: !0
1522
- },
1523
- hidePadding: {
1524
- type: "boolean",
1525
- const: !0
1526
- }
1527
- }
1528
- }
1529
- }
1530
- },
1531
- "f-page-main-content": {
1532
- description: "",
1533
- type: "object",
1534
- properties: {
1535
- contents: {
1536
- type: "object",
1537
- properties: {
1538
- "f-page-content-nav": {
1539
- description: "",
1540
- type: "object",
1541
- properties: {
1542
- contents: {
1543
- type: "object",
1544
- properties: {
1545
- "f-struct-data-grid-in-nav": {
1546
- description: "",
1547
- type: "object",
1548
- properties: {
1549
- contents: {
1550
- type: "object",
1551
- properties: {
1552
- "f-page-content-nav-extend": {
1553
- description: "",
1554
- type: "object"
1555
- },
1556
- "f-section-in-nav": {
1557
- description: "",
1558
- type: "object",
1559
- properties: {
1560
- rules: {
1561
- type: "object",
1562
- properties: {
1563
- canAccept: {
1564
- type: "boolean",
1565
- const: !1
1566
- },
1567
- fixed: {
1568
- type: "boolean",
1569
- const: !0
1570
- },
1571
- hidePadding: {
1572
- type: "boolean",
1573
- const: !1
1574
- }
1575
- }
1576
- }
1577
- }
1578
- }
1579
- }
1580
- },
1581
- rules: {
1582
- type: "object",
1583
- properties: {
1584
- canAccept: {
1585
- type: "boolean",
1586
- const: !0
1587
- },
1588
- fixed: {
1589
- type: "boolean",
1590
- const: !1
1591
- },
1592
- hidePadding: {
1593
- type: "boolean",
1594
- const: !0
1595
- }
1596
- }
1597
- }
1598
- }
1599
- }
1600
- }
1601
- }
1602
- }
1603
- },
1604
- "f-page-content-main": {
1605
- description: "",
1606
- type: "object",
1607
- properties: {}
1608
- }
1609
- }
1610
- }
1611
- }
1612
- },
1613
- "f-page-content": {
1614
- description: "",
1615
- type: "object",
1616
- properties: {
1617
- contents: {
1618
- type: "object",
1619
- properties: {
1620
- "f-page-content-nav": {
1621
- description: "",
1622
- type: "object",
1623
- properties: {
1624
- contents: {
1625
- type: "object",
1626
- properties: {
1627
- "f-list-nav": {
1628
- description: "",
1629
- type: "object"
1630
- },
1631
- "f-list-nav-left": {
1632
- description: "",
1633
- type: "object"
1634
- },
1635
- "f-struct-data-grid-in-nav": {
1636
- description: "",
1637
- type: "object",
1638
- properties: {
1639
- contents: {
1640
- type: "object",
1641
- properties: {
1642
- "f-section-form": {
1643
- description: "",
1644
- type: "object",
1645
- properties: {
1646
- rules: {
1647
- type: "object",
1648
- properties: {
1649
- canAccept: {
1650
- type: "boolean",
1651
- const: !1
1652
- },
1653
- fixed: {
1654
- type: "boolean",
1655
- const: !0
1656
- },
1657
- hidePadding: {
1658
- type: "boolean",
1659
- const: !0
1660
- }
1661
- }
1662
- }
1663
- }
1664
- },
1665
- "f-section-grid": {
1666
- description: "",
1667
- type: "object",
1668
- properties: {
1669
- rules: {
1670
- type: "object",
1671
- properties: {
1672
- canAccept: {
1673
- type: "boolean",
1674
- const: !1
1675
- },
1676
- fixed: {
1677
- type: "boolean",
1678
- const: !0
1679
- },
1680
- hidePadding: {
1681
- type: "boolean",
1682
- const: !0
1683
- }
1684
- }
1685
- }
1686
- }
1687
- }
1688
- }
1689
- },
1690
- rules: {
1691
- type: "object",
1692
- properties: {
1693
- canAccept: {
1694
- type: "boolean",
1695
- const: !1
1696
- },
1697
- fixed: {
1698
- type: "boolean",
1699
- const: !0
1700
- },
1701
- hidePadding: {
1702
- type: "boolean",
1703
- const: !0
1704
- }
1705
- }
1706
- }
1707
- }
1708
- }
1709
- }
1710
- }
1711
- },
1712
- rules: {
1713
- type: "object",
1714
- properties: {
1715
- canAccept: {
1716
- type: "boolean",
1717
- const: !1
1718
- },
1719
- fixed: {
1720
- type: "boolean",
1721
- const: !0
1722
- },
1723
- hidePadding: {
1724
- type: "boolean",
1725
- const: !0
1726
- }
1727
- }
1728
- }
1729
- },
1730
- "f-page-content-main": {
1731
- description: "",
1732
- type: "object",
1733
- properties: {
1734
- rules: {
1735
- type: "object",
1736
- properties: {
1737
- canAccept: {
1738
- type: "boolean",
1739
- const: !1
1740
- },
1741
- fixed: {
1742
- type: "boolean",
1743
- const: !1
1744
- },
1745
- hidePadding: {
1746
- type: "boolean",
1747
- const: !0
1748
- }
1749
- }
1750
- }
1751
- }
1752
- }
1753
- }
1754
- },
1755
- rules: {
1756
- type: "object",
1757
- properties: {
1758
- canAccept: {
1759
- type: "boolean",
1760
- const: !1
1761
- },
1762
- fixed: {
1763
- type: "boolean",
1764
- const: !0
1765
- },
1766
- hidePadding: {
1767
- type: "boolean",
1768
- const: !0
1769
- }
1770
- }
1771
- }
1772
- }
1773
- }
1774
- }
1775
- },
1776
- rules: {
1777
- type: "object",
1778
- properties: {
1779
- canAccept: {
1780
- type: "object",
1781
- const: {
1782
- anyOf: [
1783
- {
1784
- children: 0
1785
- },
1786
- {
1787
- children: {
1788
- length: {
1789
- not: 1
1790
- },
1791
- "f-struct-like-card": !0
1792
- }
1793
- },
1794
- {
1795
- children: {
1796
- "scroll-spy": !1,
1797
- "f-page-content": !1,
1798
- "f-struct-like-card": !1
1799
- }
1800
- }
1801
- ]
1802
- }
1803
- },
1804
- fixed: {
1805
- type: "boolean",
1806
- const: !0
1807
- },
1808
- hidePadding: {
1809
- type: "boolean",
1810
- const: !0
1811
- }
1812
- }
1813
- }
1814
- }
1815
- },
1816
- "f-page-footer": {
1817
- description: "The class of page footer designed by farris.",
1818
- type: "string"
1819
- }
1820
- }
1821
- },
1822
- rules: {
1823
- type: "object",
1824
- properties: {
1825
- canAccept: {
1826
- type: "boolean",
1827
- const: !1
1828
- },
1829
- fixed: {
1830
- type: "boolean",
1831
- const: !0
1832
- },
1833
- hidePadding: {
1834
- type: "boolean",
1835
- const: !0
1836
- }
1837
- }
1838
- }
1839
- }
1840
- },
1841
- "f-page-is-managelist": {
1842
- description: "The root class of mangement list page.",
1843
- type: "string"
1844
- },
1845
- "f-page-card": {
1846
- description: "",
1847
- type: "object"
1848
- },
1849
- "f-page-is-mainsubcard": {
1850
- description: "",
1851
- type: "object"
1852
- }
1853
- }, Tt = {
1854
- $schema: bt,
1855
- $id: yt,
1856
- title: vt,
1857
- description: Ct,
1858
- type: wt,
1859
- properties: xt
1860
- }, K = /* @__PURE__ */ new Map();
1861
- function Te() {
1862
- function s(c, b, y, T) {
1863
- var O;
1864
- if (typeof y == "number")
1865
- return ((O = T[c]) == null ? void 0 : O.length) === y;
1866
- if (typeof y == "object") {
1867
- const P = Object.keys(y)[0], k = y[P];
1868
- if (P === "not")
1869
- return Number(T[c].length) !== Number(k);
1870
- if (P === "moreThan")
1871
- return Number(T[c].length) >= Number(k);
1872
- if (P === "lessThan")
1873
- return Number(T[c].length) <= Number(k);
1874
- }
1875
- return !1;
1876
- }
1877
- function e(c, b, y, T) {
1878
- return typeof y == "boolean" ? T.childrenClassList.includes(b) === !!y : !1;
1879
- }
1880
- function o(c, b, y, T) {
1881
- return typeof y == "boolean" ? T.parentClassList.includes(b) === !!y : !1;
1882
- }
1883
- function p(c, b, y, T) {
1884
- return typeof y == "boolean" ? T.parentClassList.includes(b) === !!y : !1;
1885
- }
1886
- const u = /* @__PURE__ */ new Map([
1887
- ["length", s],
1888
- ["hasChildren", e],
1889
- ["hasSibling", p],
1890
- ["hasParent", o]
1891
- ]);
1892
- function v(c, b) {
1893
- const y = c;
1894
- return typeof b == "number" ? [{ target: y, operator: "length", param: null, value: Number(b) }] : typeof b == "object" ? Object.keys(b).map((T) => {
1895
- if (T === "length")
1896
- return { target: y, operator: "length", param: null, value: b[T] };
1897
- const O = T, P = b[T];
1898
- return { target: y, operator: c === "children" ? "hasChildren" : c === "parent" ? "hasParent" : "hasSibling", param: O, value: P };
1899
- }) : [];
1900
- }
1901
- function h(c, b) {
1902
- if (u.has(c.operator)) {
1903
- const y = u.get(c.operator);
1904
- return y && y(c.target, c.param, c.value, b) || !1;
1905
- }
1906
- return !1;
1907
- }
1908
- function D(c, b) {
1909
- return Object.keys(c).reduce((P, k) => {
1910
- const N = v(k, c[k]);
1911
- return P.push(...N), P;
1912
- }, []).reduce((P, k) => P && h(k, b), !0);
1913
- }
1914
- function I(c, b) {
1915
- const y = Object.keys(c), T = y.includes("allOf"), O = y.includes("anyOf"), P = T || O, j = (P ? c[P ? T ? "allOf" : "anyOf" : "allOf"] : [c]).map((R) => D(R, b));
1916
- return T ? !j.includes(!1) : j.includes(!0);
1917
- }
1918
- function g(c, b) {
1919
- const y = c.const;
1920
- return y ? typeof y == "boolean" ? y : typeof y == "object" ? I(y, b) : !1 : !1;
1921
- }
1922
- function C(c) {
1923
- return (b) => {
1924
- const y = { canAccept: !0, fixed: !1, hidePadding: !1 };
1925
- return c && c.properties && Object.keys(c.properties).reduce((T, O) => {
1926
- const P = c.properties[O];
1927
- return T[O] = g(P, b), T;
1928
- }, y), y;
1929
- };
1930
- }
1931
- function l(c, b, y) {
1932
- if (b.type === "object" && b.properties) {
1933
- const { rules: T, contents: O } = b.properties;
1934
- y.set(c, C(T)), O && Object.keys(O.properties).forEach(
1935
- (P) => l(P, O.properties[P], y)
1936
- );
1937
- }
1938
- }
1939
- function i() {
1940
- const { properties: c } = Tt;
1941
- Object.keys(c).forEach((b) => {
1942
- l(b, c[b], K);
1943
- });
1944
- }
1945
- function f(c, b) {
1946
- const y = { canAccept: !0, fixed: !1, hidePadding: !0 };
1947
- return K.has(c) ? K.get(c)(b) : y;
1948
- }
1949
- return i(), { getRuleValue: f };
1950
- }
1951
- class ae {
1952
- constructor(e, o) {
1953
- B(this, "componentId");
1954
- B(this, "viewModelId");
1955
- B(this, "eventsEditorUtils");
1956
- B(this, "formSchemaUtils");
1957
- B(this, "formMetadataConverter");
1958
- B(this, "designViewModelUtils");
1959
- B(this, "designViewModelField");
1960
- B(this, "controlCreatorUtils");
1961
- B(this, "designerHostService");
1962
- B(this, "schemaService", null);
1963
- B(this, "metadataService", null);
1964
- B(this, "propertyConfig", {
1196
+ class re {
1197
+ constructor(e, n) {
1198
+ D(this, "componentId");
1199
+ D(this, "viewModelId");
1200
+ D(this, "eventsEditorUtils");
1201
+ D(this, "formSchemaUtils");
1202
+ D(this, "formMetadataConverter");
1203
+ D(this, "designViewModelUtils");
1204
+ D(this, "designViewModelField");
1205
+ D(this, "controlCreatorUtils");
1206
+ D(this, "designerHostService");
1207
+ D(this, "schemaService", null);
1208
+ D(this, "metadataService", null);
1209
+ D(this, "propertyConfig", {
1965
1210
  type: "object",
1966
1211
  categories: {}
1967
1212
  });
1968
- var p;
1969
- this.componentId = e, this.designerHostService = o, this.eventsEditorUtils = o.eventsEditorUtils, this.formSchemaUtils = o.formSchemaUtils, this.formMetadataConverter = o.formMetadataConverter, this.viewModelId = ((p = this.formSchemaUtils) == null ? void 0 : p.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = o.designViewModelUtils, this.controlCreatorUtils = o.controlCreatorUtils, this.metadataService = o.metadataService, this.schemaService = o.schemaService;
1213
+ var i;
1214
+ this.componentId = e, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((i = this.formSchemaUtils) == null ? void 0 : i.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
1970
1215
  }
1971
1216
  getTableInfo() {
1972
1217
  var e;
1973
1218
  return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
1974
1219
  }
1975
1220
  setDesignViewModelField(e) {
1976
- const o = e.binding && e.binding.type === "Form" && e.binding.field;
1977
- if (o) {
1221
+ const n = e.binding && e.binding.type === "Form" && e.binding.field;
1222
+ if (n) {
1978
1223
  if (!this.designViewModelField) {
1979
- const p = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1980
- this.designViewModelField = p.fields.find((u) => u.id === o);
1224
+ const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1225
+ this.designViewModelField = i.fields.find((d) => d.id === n);
1981
1226
  }
1982
1227
  e.updateOn = this.designViewModelField.updateOn;
1983
1228
  }
1984
1229
  }
1985
- changeFieldEditorType(e, o) {
1230
+ changeFieldEditorType(e, n) {
1986
1231
  }
1987
1232
  getBasicPropConfig(e) {
1988
1233
  return {
@@ -2003,7 +1248,7 @@ class ae {
2003
1248
  type: "combo-list",
2004
1249
  textField: "name",
2005
1250
  valueField: "value",
2006
- data: [{ value: e.type, name: re[e.type].name }]
1251
+ data: [{ value: e.type, name: ne[e.type].name }]
2007
1252
  }
2008
1253
  }
2009
1254
  }
@@ -2029,10 +1274,23 @@ class ae {
2029
1274
  }
2030
1275
  };
2031
1276
  }
1277
+ /**
1278
+ *
1279
+ * @param propertyId
1280
+ * @param componentInstance
1281
+ * @returns
1282
+ */
1283
+ updateElementByParentContainer(e, n) {
1284
+ const i = n && n.parent && n.parent.schema;
1285
+ if (!i)
1286
+ return;
1287
+ const d = i.contents.findIndex((f) => f.id === e), h = fe(i.contents[d]);
1288
+ i.contents.splice(d, 1), i.contents.splice(d, 0, h);
1289
+ }
2032
1290
  }
2033
- class jt extends ae {
2034
- constructor(e, o) {
2035
- super(e, o);
1291
+ class mt extends re {
1292
+ constructor(e, n) {
1293
+ super(e, n);
2036
1294
  }
2037
1295
  getPropertyConfig(e) {
2038
1296
  return this.getBasicPropConfig(e), this.getBehaviorProperties(e), this.propertyConfig;
@@ -2056,7 +1314,7 @@ class jt extends ae {
2056
1314
  type: "combo-list",
2057
1315
  textField: "value",
2058
1316
  valueField: "key",
2059
- data: [{ key: "response-toolbar", value: re["response-toolbar"].name }]
1317
+ data: [{ key: "response-toolbar", value: ne["response-toolbar"].name }]
2060
1318
  }
2061
1319
  }
2062
1320
  }
@@ -2099,85 +1357,40 @@ class jt extends ae {
2099
1357
  };
2100
1358
  }
2101
1359
  }
2102
- function It(s, e, o, p) {
2103
- const u = Te(), v = S(!1), h = S(!1);
2104
- let D = !0, I = !1, g;
2105
- function C(j) {
2106
- return g && g.componentClassList && g.componentClassList.includes("f-form-layout") && g.componentClassList.includes("farris-form") ? j.sourceType === "control" && j.controlCategory === "input" || j.sourceType === "move" && j.controlType === "form-group" : !0;
2107
- }
2108
- function l(j) {
2109
- return !ht().basalDragulaRuleForContainer(j) || !D || !C(j), !1;
2110
- }
2111
- function i() {
2112
- v.value = !1, h.value = !1;
2113
- const j = s, m = j.appearance && j.appearance.class || "", R = m.split(" "), A = j.buttons || [], a = A.length ? A[0] : null, n = a && a.appearance ? a.appearance.class : "", t = n ? n.split(" ") : [], r = A.length ? A.reduce(($, V) => {
2114
- const U = V && V.appearance ? V.appearance.class : "", Y = U ? U.split(" ") : [];
2115
- return $.push(...Y), $;
2116
- }, []) : [], d = o == null ? void 0 : o.schema, E = d && d.appearance && d.appearance.class || "", x = E ? E.split(" ") : [];
2117
- g = {
2118
- componentClass: m,
2119
- componentClassList: R,
2120
- childContents: A,
2121
- firstChildContent: a,
2122
- firstChildClass: n,
2123
- firstChildClassList: t,
2124
- parent: d,
2125
- parentClass: E,
2126
- parentClassList: x,
2127
- children: A,
2128
- childrenClassList: r
2129
- };
2130
- const { canAccept: M, fixed: F, hidePadding: _ } = u.getRuleValue(R[0], g);
2131
- return D = M, I = _, !0;
2132
- }
2133
- function f(j) {
2134
- }
2135
- function c() {
2136
- return s.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
2137
- }
2138
- function b(j, m) {
2139
- return m.text = j.label, m;
1360
+ function ht(s, e) {
1361
+ const n = s.schema;
1362
+ function i(m) {
1363
+ return !1;
2140
1364
  }
2141
- function y(j, m, R) {
2142
- const A = s;
2143
- if ((A.appearance && A.appearance.class || "").split(" ").includes("f-form-layout")) {
2144
- const t = String(j.innerText), r = q("form-group");
2145
- return r.editor = R, r.label = t, r;
2146
- }
2147
- return R;
1365
+ function d(m, l) {
1366
+ return l.text = m.label, l;
2148
1367
  }
2149
- function T() {
1368
+ function h() {
2150
1369
  return !1;
2151
1370
  }
2152
- function O() {
1371
+ function f() {
2153
1372
  return !1;
2154
1373
  }
2155
- function P() {
1374
+ function x() {
2156
1375
  return !0;
2157
1376
  }
2158
- function k() {
2159
- return I;
1377
+ function w() {
1378
+ return !0;
2160
1379
  }
2161
- function N(j) {
2162
- return new jt(j, e).getPropertyConfig(s);
1380
+ function g(m) {
1381
+ return new mt(m, e).getPropertyConfig(n);
2163
1382
  }
2164
1383
  return {
2165
- canAccepts: l,
2166
- checkCanAddComponent: P,
2167
- checkCanDeleteComponent: O,
2168
- checkCanMoveComponent: T,
2169
- getStyles: c,
2170
- hideNestedPaddingInDesginerView: k,
2171
- onAcceptNewChildElement: y,
2172
- onAcceptMovedChildElement: f,
2173
- onResolveNewComponentSchema: b,
2174
- resolveComponentContext: i,
2175
- getPropsConfig: N,
2176
- triggerBelongedComponentToMoveWhenMoved: v,
2177
- triggerBelongedComponentToDeleteWhenDeleted: h
1384
+ canAccepts: i,
1385
+ checkCanAddComponent: x,
1386
+ checkCanDeleteComponent: f,
1387
+ checkCanMoveComponent: h,
1388
+ hideNestedPaddingInDesginerView: w,
1389
+ onResolveNewComponentSchema: d,
1390
+ getPropsConfig: g
2178
1391
  };
2179
1392
  }
2180
- const Dt = {
1393
+ const bt = {
2181
1394
  id: { type: String, default: "" },
2182
1395
  componentId: { type: String, default: "" },
2183
1396
  canAdd: { type: Boolean, default: !1 },
@@ -2190,256 +1403,248 @@ const Dt = {
2190
1403
  * 组件值
2191
1404
  */
2192
1405
  modelValue: { type: Object }
2193
- }, ee = S(0);
2194
- function Pt(s, e) {
2195
- const o = e.getBoundingClientRect(), p = s.getBoundingClientRect(), u = p.top >= o.top, v = p.top <= o.bottom;
2196
- return u && v;
1406
+ }, Z = S(0);
1407
+ function yt(s, e) {
1408
+ const n = e.getBoundingClientRect(), i = s.getBoundingClientRect(), d = i.top >= n.top, h = i.top <= n.bottom;
1409
+ return d && h;
2197
1410
  }
2198
- function Rt(s) {
1411
+ function vt(s) {
2199
1412
  if (!s)
2200
1413
  return;
2201
1414
  let e;
2202
1415
  if (s.className.includes("dgComponentSelected") ? e = s : e = s.querySelector(".dgComponentSelected"), !e)
2203
1416
  return;
2204
- const o = e.getBoundingClientRect();
2205
- if (o.width === 0 && o.height === 0)
1417
+ const n = e.getBoundingClientRect();
1418
+ if (n.width === 0 && n.height === 0)
2206
1419
  return;
2207
- const p = e.querySelector(".component-btn-group");
2208
- if (p) {
2209
- if (!Pt(e, s)) {
2210
- p.style.display = "none";
1420
+ const i = e.querySelector(".component-btn-group");
1421
+ if (i) {
1422
+ if (!yt(e, s)) {
1423
+ i.style.display = "none";
2211
1424
  return;
2212
1425
  }
2213
- p.style.display = "";
2214
- const v = p.getBoundingClientRect(), h = p.querySelector("div");
2215
- if (h) {
2216
- const D = h.getBoundingClientRect();
2217
- h.style.top = v.top + "px", h.style.left = v.left - D.width + "px";
1426
+ i.style.display = "";
1427
+ const h = i.getBoundingClientRect(), f = i.querySelector("div");
1428
+ if (f) {
1429
+ const x = f.getBoundingClientRect();
1430
+ f.style.top = h.top + "px", f.style.left = h.left - x.width + "px";
2218
1431
  }
2219
1432
  }
2220
1433
  }
2221
- function Et(s, e, o) {
2222
- var N;
2223
- function p() {
1434
+ function Ct(s, e, n) {
1435
+ var R;
1436
+ function i() {
2224
1437
  }
2225
- const u = "", v = S();
2226
- function h() {
1438
+ const d = "", h = S();
1439
+ function f() {
2227
1440
  return !0;
2228
1441
  }
2229
- function D() {
1442
+ function x() {
2230
1443
  return !1;
2231
1444
  }
2232
- function I() {
1445
+ function w() {
2233
1446
  return !0;
2234
1447
  }
2235
1448
  function g() {
2236
1449
  return !0;
2237
1450
  }
2238
- function C() {
1451
+ function m() {
2239
1452
  return !0;
2240
1453
  }
2241
- function l(j) {
2242
- if (!j || !j.value)
1454
+ function l(E) {
1455
+ if (!E || !E.value)
2243
1456
  return null;
2244
- const m = S(j == null ? void 0 : j.value.parent), R = l(m);
2245
- return R || null;
2246
- }
2247
- function i(j = e) {
2248
- const { componentInstance: m, designerItemElementRef: R } = j;
2249
- return !m || !m.value ? null : m.value.canMove || m.value.canAdd || m.value.canDelete ? R : i(j.parent);
1457
+ const k = S(E == null ? void 0 : E.value.parent), v = l(k);
1458
+ return v || null;
2250
1459
  }
2251
- function f(j) {
2252
- return !!o;
1460
+ function c(E = e) {
1461
+ const { componentInstance: k, designerItemElementRef: v } = E;
1462
+ return !k || !k.value ? null : k.value.canMove || k.value.canAdd || k.value.canDelete ? v : c(E.parent);
2253
1463
  }
2254
- function c() {
2255
- return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
1464
+ function p(E) {
1465
+ return !!n;
2256
1466
  }
2257
1467
  function b() {
1468
+ return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
2258
1469
  }
2259
- function y(j, m) {
1470
+ function M() {
2260
1471
  }
2261
- function T(j) {
2262
- const { componentType: m } = j;
2263
- let R = q(m, j);
2264
- const A = m.toLowerCase().replace("-", "_");
2265
- return R && !R.id && R.type === m && (R.id = `${A}_${Math.random().toString().slice(2, 6)}`), R;
1472
+ function O(E, k) {
2266
1473
  }
2267
- function O(j, m) {
2268
- const R = String(j.getAttribute("data-controltype")), A = j.getAttribute("data-feature"), a = A ? JSON.parse(A) : {};
2269
- a.parentComponentInstance = v.value;
2270
- let n = q(R, a);
2271
- const t = R.toLowerCase().replace("-", "_");
2272
- return n && !n.id && n.type === R && (n.id = `${t}_${Math.random().toString().slice(2, 6)}`), n;
1474
+ function j(E) {
1475
+ const { componentType: k } = E;
1476
+ let v = X(k, E);
1477
+ const P = k.toLowerCase().replace("-", "_");
1478
+ return v && !v.id && v.type === k && (v.id = `${P}_${Math.random().toString().slice(2, 6)}`), v;
2273
1479
  }
2274
- function P(j) {
1480
+ function F(E) {
2275
1481
  }
2276
- function k(...j) {
1482
+ function _(...E) {
2277
1483
  return [];
2278
1484
  }
2279
- return v.value = {
2280
- canMove: h(),
2281
- canSelectParent: D(),
1485
+ return h.value = {
1486
+ canMove: f(),
1487
+ canSelectParent: x(),
2282
1488
  canAdd: g(),
2283
- canDelete: I(),
2284
- canNested: !C(),
1489
+ canDelete: w(),
1490
+ canNested: !m(),
2285
1491
  contents: [],
2286
1492
  elementRef: s,
2287
- parent: (N = e.parent) == null ? void 0 : N.componentInstance,
1493
+ parent: (R = e.parent) == null ? void 0 : R.componentInstance,
2288
1494
  schema: e.schema,
2289
- styles: u,
2290
- canAccepts: f,
1495
+ styles: d,
1496
+ canAccepts: p,
2291
1497
  getBelongedComponentInstance: l,
2292
- getDraggableDesignItemElement: i,
2293
- getDraggingDisplayText: c,
2294
- getPropConfig: k,
2295
- getDragScopeElement: b,
2296
- onAcceptMovedChildElement: y,
2297
- onAcceptNewChildElement: O,
2298
- onChildElementMovedOut: P,
2299
- addNewChildComponentSchema: T,
2300
- updateDragAndDropRules: p,
1498
+ getDraggableDesignItemElement: c,
1499
+ getDraggingDisplayText: b,
1500
+ getPropConfig: _,
1501
+ getDragScopeElement: M,
1502
+ onAcceptMovedChildElement: O,
1503
+ onChildElementMovedOut: F,
1504
+ addNewChildComponentSchema: j,
1505
+ updateDragAndDropRules: i,
2301
1506
  triggerBelongedComponentToMoveWhenMoved: S(!1),
2302
1507
  triggerBelongedComponentToDeleteWhenDeleted: S(!1)
2303
- }, v;
1508
+ }, h;
2304
1509
  }
2305
- const St = /* @__PURE__ */ X({
1510
+ const wt = /* @__PURE__ */ Q({
2306
1511
  name: "FDesignerInnerItem",
2307
- props: Dt,
1512
+ props: bt,
2308
1513
  emits: ["selectionChange", "addComponent", "removeComponent"],
2309
1514
  setup(s, e) {
2310
- const o = S(s.canMove), p = S(s.canAdd), u = S(s.canDelete), v = S(!1), h = S(s.contentKey), D = S(s.childType), I = S(s.childLabel), g = S(s.modelValue), C = S(""), l = S(), i = L("canvas-dragula"), f = S(), c = L("design-item-context"), b = {
1515
+ const n = S(s.canMove), i = S(s.canAdd), d = S(s.canDelete), h = S(!1), f = S(s.contentKey), x = S(s.childType), w = S(s.childLabel), g = S(s.modelValue), m = S(""), l = S(), c = L("canvas-dragula"), p = S(), b = L("design-item-context"), M = {
2311
1516
  designerItemElementRef: l,
2312
- componentInstance: f,
1517
+ componentInstance: p,
2313
1518
  schema: g.value,
2314
- parent: c,
1519
+ parent: b,
2315
1520
  setupContext: e
2316
1521
  };
2317
- Ee("design-item-context", b);
2318
- const y = W(() => ({
1522
+ Re("design-item-context", M);
1523
+ const O = V(() => ({
2319
1524
  "farris-component": !0,
2320
1525
  // 受position-relative影响,整个容器的高度不能被撑起
2321
1526
  "flex-fill": s.id == "root-component",
2322
- "position-relative": o.value || u.value,
2323
- "farris-nested": v.value,
2324
- "can-move": o.value,
1527
+ "position-relative": n.value || d.value,
1528
+ "farris-nested": h.value,
1529
+ "can-move": n.value,
2325
1530
  "d-none": l.value && l.value.classList.contains("d-none")
2326
- })), T = W(() => {
1531
+ })), j = V(() => {
2327
1532
  const t = {};
2328
- return C.value && C.value.split(";").reduce((r, d) => {
2329
- const [E, x] = d.split(":");
2330
- return E && (r[E] = x), r;
1533
+ return m.value && m.value.split(";").reduce((r, u) => {
1534
+ const [T, C] = u.split(":");
1535
+ return T && (r[T] = C), r;
2331
1536
  }, t), t;
2332
1537
  });
2333
- function O(t, r) {
2334
- if (c && c.schema[h.value]) {
2335
- const d = c.schema[h.value].findIndex((E) => E.id === r.id);
2336
- if (d > -1) {
2337
- const E = c.schema[h.value].length, x = c.schema[h.value][d % E];
2338
- c.designerItemElementRef.value.querySelector(`#${x.id}-design-item`), c.schema[h.value].splice(d, 1), c.componentInstance.value.updateDragAndDropRules(), ee.value++, e.emit("removeComponent");
1538
+ function F(t, r) {
1539
+ if (b && b.schema[f.value]) {
1540
+ const u = b.schema[f.value].findIndex((T) => T.id === r.id);
1541
+ if (u > -1) {
1542
+ const T = b.schema[f.value].length, C = b.schema[f.value][u % T];
1543
+ b.designerItemElementRef.value.querySelector(`#${C.id}-design-item`), b.schema[f.value].splice(u, 1), b.componentInstance.value.updateDragAndDropRules(), Z.value++, e.emit("removeComponent");
2339
1544
  }
2340
1545
  }
2341
1546
  }
2342
- function P(t) {
2343
- if (f.value.addNewChildComponentSchema) {
1547
+ function _(t) {
1548
+ if (p.value.addNewChildComponentSchema) {
2344
1549
  const r = {
2345
- componentType: D.value,
2346
- label: I.value,
2347
- parentComponentInstance: f.value,
1550
+ componentType: x.value,
1551
+ label: w.value,
1552
+ parentComponentInstance: p.value,
2348
1553
  targetPosition: -1
2349
- }, d = f.value.addNewChildComponentSchema(r);
2350
- g.value[h.value].push(d), e.emit("addComponent");
1554
+ }, u = p.value.addNewChildComponentSchema(r);
1555
+ g.value[f.value].push(u), e.emit("addComponent");
2351
1556
  }
2352
1557
  }
2353
- function k() {
2354
- return p.value && w("div", {
1558
+ function R() {
1559
+ return i.value && y("div", {
2355
1560
  role: "button",
2356
1561
  class: "btn component-settings-button",
2357
1562
  title: "新增",
2358
1563
  ref: "removeComponent",
2359
1564
  onClick: (t) => {
2360
- P();
1565
+ _();
2361
1566
  }
2362
- }, [w("i", {
1567
+ }, [y("i", {
2363
1568
  class: "f-icon f-icon-plus-circle"
2364
1569
  }, null)]);
2365
1570
  }
2366
- function N(t) {
2367
- return u.value && w("div", {
1571
+ function E(t) {
1572
+ return d.value && y("div", {
2368
1573
  role: "button",
2369
1574
  class: "btn component-settings-button",
2370
1575
  title: "删除",
2371
1576
  ref: "removeComponent",
2372
- onClick: Me((r) => O(r, t), ["stop"])
2373
- }, [w("i", {
1577
+ onClick: Pe((r) => F(r, t), ["stop"])
1578
+ }, [y("i", {
2374
1579
  class: "f-icon f-icon-yxs_delete"
2375
1580
  }, null)]);
2376
1581
  }
2377
- function j() {
2378
- return o.value && w("div", {
1582
+ function k() {
1583
+ return n.value && y("div", {
2379
1584
  role: "button",
2380
1585
  class: "btn component-settings-button",
2381
1586
  title: "移动",
2382
1587
  ref: "moveComponent"
2383
- }, [w("i", {
1588
+ }, [y("i", {
2384
1589
  "data-dragging-icon": "true",
2385
1590
  class: "cmp_move f-icon f-icon-yxs_move"
2386
1591
  }, null)]);
2387
1592
  }
2388
- function m(t) {
2389
- return w("div", {
1593
+ function v(t) {
1594
+ return y("div", {
2390
1595
  class: "component-btn-group",
2391
1596
  "data-noattach": "true"
2392
- }, [w("div", null, [k(), j(), N(t)])]);
1597
+ }, [y("div", null, [R(), k(), E(t)])]);
2393
1598
  }
2394
- H(() => s.modelValue, (t) => {
2395
- g.value = t, b.schema = t;
1599
+ G(() => s.modelValue, (t) => {
1600
+ g.value = t, M.schema = t;
2396
1601
  });
2397
- function R(t) {
1602
+ function P(t) {
2398
1603
  const r = t.target;
2399
- Rt(r);
1604
+ vt(r);
2400
1605
  }
2401
1606
  function A() {
2402
1607
  var t, r;
2403
- (r = (t = g.value) == null ? void 0 : t.contents) != null && r.length && l.value && l.value.addEventListener("scroll", R);
1608
+ (r = (t = g.value) == null ? void 0 : t.contents) != null && r.length && l.value && l.value.addEventListener("scroll", P);
2404
1609
  }
2405
1610
  function a() {
2406
1611
  const t = l.value, r = S(t.children[1]);
2407
- return Et(r, b).value;
1612
+ return Ct(r, M).value;
2408
1613
  }
2409
1614
  z(() => {
2410
1615
  if (l.value) {
2411
1616
  const t = l.value.querySelector(`[data-dragref='${g.value.id}-container']`);
2412
- f.value = t && t.componentInstance ? t.componentInstance.value : a(), i && t && i.attachComponents(t, g.value), v.value = f.value.canNested !== void 0 ? f.value.canNested : v.value, p.value = f.value.canAdd !== void 0 ? f.value.canAdd : p.value, u.value = f.value.canDelete !== void 0 ? f.value.canDelete : u.value, o.value = f.value.canMove !== void 0 ? f.value.canMove : o.value, C.value = f.value.styles || "", l.value && (l.value.componentInstance = f, l.value.designItemContext = b);
1617
+ p.value = t && t.componentInstance ? t.componentInstance.value : a(), c && t && c.attachComponents(t, g.value), h.value = p.value.canNested !== void 0 ? p.value.canNested : h.value, i.value = p.value.canAdd !== void 0 ? p.value.canAdd : i.value, d.value = p.value.canDelete !== void 0 ? p.value.canDelete : d.value, n.value = p.value.canMove !== void 0 ? p.value.canMove : n.value, m.value = p.value.styles || "", l.value && (l.value.componentInstance = p, l.value.designItemContext = M);
2413
1618
  }
2414
- A(), ee.value++;
2415
- }), Se(() => {
2416
- l.value && l.value.removeEventListener("scroll", R);
1619
+ A(), Z.value++;
1620
+ }), ke(() => {
1621
+ l.value && l.value.removeEventListener("scroll", P);
2417
1622
  });
2418
- function n(t) {
2419
- Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((d) => d.classList.remove("dgComponentFocused")), t && (t.preventDefault(), t.stopPropagation());
1623
+ function o(t) {
1624
+ Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((u) => u.classList.remove("dgComponentFocused")), t && (t.preventDefault(), t.stopPropagation());
2420
1625
  const r = l.value;
2421
1626
  if (r) {
2422
- const d = document.getElementsByClassName("dgComponentSelected");
2423
- if (!(d && d.length === 1 && d[0] === l.value)) {
2424
- Array.from(d).forEach((M) => M.classList.remove("dgComponentSelected")), r.classList.add("dgComponentFocused"), e.emit("selectionChange", g.value.type, g.value, s.componentId, f.value);
2425
- const x = f.value.getDraggableDesignItemElement(b);
2426
- x && x.value && x.value.classList.add("dgComponentSelected");
1627
+ const u = document.getElementsByClassName("dgComponentSelected");
1628
+ if (!(u && u.length === 1 && u[0] === l.value)) {
1629
+ Array.from(u).forEach((I) => I.classList.remove("dgComponentSelected")), r.classList.add("dgComponentFocused"), e.emit("selectionChange", g.value.type, g.value, s.componentId, p.value);
1630
+ const C = p.value.getDraggableDesignItemElement(M);
1631
+ C && C.value && C.value.classList.add("dgComponentSelected");
2427
1632
  }
2428
1633
  }
2429
- ee.value++;
1634
+ Z.value++;
2430
1635
  }
2431
- return () => w("div", {
1636
+ return () => y("div", {
2432
1637
  id: `${s.id}-design-item`,
2433
1638
  ref: l,
2434
- class: y.value,
2435
- style: T.value,
2436
- onClick: n
2437
- }, [m(g.value), e.slots.default && e.slots.default()]);
1639
+ class: O.value,
1640
+ style: j.value,
1641
+ onClick: o
1642
+ }, [v(g.value), e.slots.default && e.slots.default()]);
2438
1643
  }
2439
1644
  });
2440
- class Mt extends ae {
2441
- constructor(e, o) {
2442
- super(e, o);
1645
+ class xt extends re {
1646
+ constructor(e, n) {
1647
+ super(e, n);
2443
1648
  }
2444
1649
  getPropertyConfig(e) {
2445
1650
  return this.getBasicPropConfig(e), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
@@ -2488,45 +1693,45 @@ class Mt extends ae {
2488
1693
  title: "style样式"
2489
1694
  }
2490
1695
  },
2491
- setPropertyRelates(o, p) {
1696
+ setPropertyRelates(n, i) {
2492
1697
  }
2493
1698
  };
2494
1699
  }
2495
1700
  getEventPropConfig(e) {
2496
- const o = [
1701
+ const n = [
2497
1702
  {
2498
- label: "click",
1703
+ label: "onClick",
2499
1704
  name: "点击事件"
2500
1705
  }
2501
1706
  ];
2502
- var p = this;
2503
- const u = p.eventsEditorUtils.formProperties(e, p.viewModelId, o), v = {};
2504
- v[p.viewModelId] = {
1707
+ var i = this;
1708
+ const d = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), h = {};
1709
+ h[i.viewModelId] = {
2505
1710
  type: "events-editor",
2506
1711
  editor: {
2507
- initialData: u
1712
+ initialData: d
2508
1713
  }
2509
1714
  }, this.propertyConfig.categories.eventsEditor = {
2510
1715
  title: "事件",
2511
1716
  hideTitle: !0,
2512
- properties: v,
1717
+ properties: h,
2513
1718
  // 这个属性,标记当属性变更得时候触发重新更新属性
2514
1719
  refreshPanelAfterChanged: !0,
2515
1720
  tabId: "commands",
2516
1721
  tabName: "交互",
2517
- setPropertyRelates(h, D) {
2518
- const I = h.propertyValue;
2519
- delete e[p.viewModelId], I && (I.setPropertyRelates = this.setPropertyRelates, p.eventsEditorUtils.saveRelatedParameters(e, p.viewModelId, I.events, I));
1722
+ setPropertyRelates(f, x) {
1723
+ const w = f.propertyValue;
1724
+ delete e[i.viewModelId], w && (w.setPropertyRelates = this.setPropertyRelates, i.eventsEditorUtils.saveRelatedParameters(e, i.viewModelId, w.events, w));
2520
1725
  }
2521
1726
  };
2522
1727
  }
2523
1728
  }
2524
- class kt extends ae {
2525
- constructor(e, o) {
2526
- super(e, o);
1729
+ class Tt extends re {
1730
+ constructor(e, n) {
1731
+ super(e, n);
2527
1732
  }
2528
1733
  getPropertyConfig(e) {
2529
- return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
1734
+ return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getbBehaviorConfig(), this.getEventPropConfig(e), this.propertyConfig;
2530
1735
  }
2531
1736
  getBasicPropConfig() {
2532
1737
  this.propertyConfig.categories.basic = {
@@ -2547,7 +1752,7 @@ class kt extends ae {
2547
1752
  type: "combo-list",
2548
1753
  textField: "value",
2549
1754
  valueField: "key",
2550
- data: [{ key: "response-toolbar-item", value: re["response-toolbar-item"].name }]
1755
+ data: [{ key: "response-toolbar-item", value: ne["response-toolbar-item"].name }]
2551
1756
  }
2552
1757
  },
2553
1758
  text: {
@@ -2564,6 +1769,20 @@ class kt extends ae {
2564
1769
  }
2565
1770
  };
2566
1771
  }
1772
+ getbBehaviorConfig() {
1773
+ this.propertyConfig.categories.behavior = {
1774
+ title: "行为",
1775
+ description: "Behavior",
1776
+ properties: {
1777
+ disabled: {
1778
+ title: "禁用状态",
1779
+ type: "boolean",
1780
+ description: "按钮禁用状态",
1781
+ refreshPanelAfterChanged: !0
1782
+ }
1783
+ }
1784
+ };
1785
+ }
2567
1786
  getAppearanceProperties(e) {
2568
1787
  this.propertyConfig.categories.appearance = {
2569
1788
  title: "样式",
@@ -2572,257 +1791,223 @@ class kt extends ae {
2572
1791
  class: {
2573
1792
  title: "class",
2574
1793
  type: "string",
2575
- description: ""
2576
- },
2577
- style: {
2578
- title: "style",
2579
- type: "string",
2580
- description: ""
1794
+ description: "",
1795
+ $converter: "/converter/appearance.converter"
2581
1796
  }
2582
1797
  }
2583
1798
  };
2584
1799
  }
2585
1800
  getEventPropConfig(e) {
2586
- const o = [
1801
+ const n = [
2587
1802
  {
2588
- label: "click",
1803
+ label: "onClick",
2589
1804
  name: "点击事件"
2590
1805
  }
2591
- ], p = this, u = p.eventsEditorUtils.formProperties(e, p.viewModelId, o), v = {};
2592
- v[p.viewModelId] = {
1806
+ ], i = this, d = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), h = {};
1807
+ h[i.viewModelId] = {
2593
1808
  type: "events-editor",
2594
1809
  editor: {
2595
- initialData: u
1810
+ initialData: d
2596
1811
  }
2597
1812
  }, this.propertyConfig.categories.eventsEditor = {
2598
1813
  title: "事件",
2599
1814
  hideTitle: !0,
2600
- properties: v,
1815
+ properties: h,
2601
1816
  // 这个属性,标记当属性变更得时候触发重新更新属性
2602
1817
  refreshPanelAfterChanged: !0,
2603
1818
  tabId: "commands",
2604
1819
  tabName: "交互",
2605
- setPropertyRelates(h, D) {
2606
- const I = h.propertyValue;
2607
- delete e[p.viewModelId], I && (I.setPropertyRelates = this.setPropertyRelates, p.eventsEditorUtils.saveRelatedParameters(e, p.viewModelId, I.events, I));
1820
+ setPropertyRelates(f, x) {
1821
+ const w = f.propertyValue;
1822
+ delete e[i.viewModelId], w && (w.setPropertyRelates = this.setPropertyRelates, i.eventsEditorUtils.saveRelatedParameters(e, i.viewModelId, w.events, w));
2608
1823
  }
2609
1824
  };
2610
1825
  }
2611
1826
  }
2612
- function At(s, e) {
2613
- Te();
2614
- const o = S(!1), p = S(!1);
2615
- let u = !1, v = !1;
2616
- function h(y) {
1827
+ function It(s, e) {
1828
+ function n(x) {
2617
1829
  return !1;
2618
1830
  }
2619
- function D(y) {
2620
- }
2621
- function I() {
2622
- return "";
2623
- }
2624
- function g(y, T) {
2625
- return T.text = y.label, T;
2626
- }
2627
- function C(y, T, O) {
2628
- const P = s.schema;
2629
- if ((P.appearance && P.appearance.class || "").split(" ").includes("f-form-layout")) {
2630
- const j = String(y.innerText), m = q("form-group");
2631
- return m.editor = O, m.label = j, m;
2632
- }
2633
- return O;
2634
- }
2635
- function l() {
1831
+ function i() {
2636
1832
  return !1;
2637
1833
  }
2638
- function i() {
2639
- return !v;
1834
+ function d() {
1835
+ return !0;
2640
1836
  }
2641
- function f() {
1837
+ function h() {
2642
1838
  return !1;
2643
1839
  }
2644
- function c() {
2645
- return u;
2646
- }
2647
- function b(y) {
2648
- let T;
1840
+ function f(x) {
1841
+ let w;
2649
1842
  switch (s.schema.type) {
2650
1843
  case "tab-toolbar-item":
2651
- T = new Mt(y, e);
1844
+ w = new xt(x, e);
2652
1845
  break;
2653
1846
  default:
2654
- T = new kt(y, e);
1847
+ w = new Tt(x, e);
2655
1848
  }
2656
- return T.getPropertyConfig(s.schema);
1849
+ return w.getPropertyConfig(s.schema);
2657
1850
  }
2658
1851
  return {
2659
- canAccepts: h,
2660
- checkCanAddComponent: f,
2661
- checkCanDeleteComponent: i,
2662
- checkCanMoveComponent: l,
2663
- getStyles: I,
2664
- hideNestedPaddingInDesginerView: c,
2665
- onAcceptNewChildElement: C,
2666
- onAcceptMovedChildElement: D,
2667
- onResolveNewComponentSchema: g,
2668
- getPropsConfig: b,
2669
- triggerBelongedComponentToMoveWhenMoved: o,
2670
- triggerBelongedComponentToDeleteWhenDeleted: p
1852
+ canAccepts: n,
1853
+ checkCanMoveComponent: i,
1854
+ checkCanDeleteComponent: d,
1855
+ checkCanAddComponent: h,
1856
+ getPropsConfig: f
2671
1857
  };
2672
1858
  }
2673
- const je = /* @__PURE__ */ X({
1859
+ const Te = /* @__PURE__ */ Q({
2674
1860
  name: "FResponseToolbarItemDesign",
2675
1861
  props: we,
2676
1862
  emits: ["Click"],
2677
1863
  setup(s, e) {
2678
1864
  S(), S();
2679
- const o = S(s.alignment), p = {
1865
+ const n = S(s.alignment), i = {
2680
1866
  id: "__more_buttons__",
2681
1867
  text: "More"
2682
- }, u = S(new G(p));
2683
- W(() => u.value.children.length > 0);
2684
- const v = S(), h = L("designer-host-service"), D = L("design-item-context"), I = At(D, h), g = ge(v, D, I);
1868
+ }, d = S(new W(i));
1869
+ V(() => d.value.children.length > 0);
1870
+ const h = S(), f = L("designer-host-service"), x = L("design-item-context"), w = It(x, f), g = ge(h, x, w);
2685
1871
  L("toolbar-item-handler", () => {
2686
1872
  }), z(() => {
2687
- v.value.componentInstance = g;
1873
+ h.value.componentInstance = g;
2688
1874
  }), e.expose(g.value);
2689
- function C() {
2690
- const f = {
1875
+ function m() {
1876
+ const p = {
2691
1877
  "f-icon": !0
2692
- }, c = s.icon ? s.icon.trim() : "";
2693
- return J(f, c);
1878
+ }, b = s.icon ? s.icon.trim() : "";
1879
+ return H(p, b);
2694
1880
  }
2695
1881
  function l() {
2696
1882
  return !!(s.icon && s.icon.trim());
2697
1883
  }
2698
- function i() {
2699
- const f = {
1884
+ function c() {
1885
+ const p = {
2700
1886
  btn: !0,
2701
1887
  "f-rt-btn": !0,
2702
- "f-btn-ml": o.value === "right",
2703
- "f-btn-mr": o.value === "left",
2704
- "btn-icontext": !!(s.icon && s.icon.trim())
1888
+ "f-btn-ml": n.value === "right",
1889
+ "f-btn-mr": n.value === "left",
1890
+ "btn-icontext": !!(s.icon && s.icon.trim()),
1891
+ disabled: s.disabled === !0
2705
1892
  };
2706
- return J(f, s.class);
1893
+ return H(p, s.class);
2707
1894
  }
2708
- return z(() => {
2709
- }), ne(() => {
2710
- }), () => w("div", {
2711
- ref: v,
2712
- "data-dragref": `${D.schema.id}-container`,
1895
+ return () => y("div", {
1896
+ ref: h,
1897
+ "data-dragref": `${x.schema.id}-container`,
2713
1898
  class: "farris-component position-relative",
2714
1899
  style: "display:inline-block!important;"
2715
- }, [w("button", {
1900
+ }, [y("button", {
2716
1901
  type: "button",
2717
- class: i(),
1902
+ class: c(),
2718
1903
  id: s.id
2719
- }, [l() && w("i", {
2720
- class: C()
1904
+ }, [l() && y("i", {
1905
+ class: m()
2721
1906
  }, null), s.text])]);
2722
1907
  }
2723
- }), Bt = /* @__PURE__ */ X({
1908
+ }), Dt = /* @__PURE__ */ Q({
2724
1909
  name: "FResponseToolbarDesign",
2725
- props: pt,
1910
+ props: at,
2726
1911
  emits: ["Click"],
2727
1912
  setup(s, e) {
2728
- const o = S(s.items);
2729
- let p = new Array(o.value.length).fill(S());
2730
- const u = S(), v = S(), h = S(s.alignment), D = {
1913
+ const n = S(s.items);
1914
+ let i = new Array(n.value.length).fill(S());
1915
+ const d = S(), h = S(), f = S(s.alignment), x = {
2731
1916
  id: "__more_buttons__",
2732
1917
  text: "More"
2733
- }, I = S(new G(D)), g = xe();
2734
- W(() => I.value.children.length > 0);
2735
- const C = S(), l = L("designer-host-service"), i = L("design-item-context"), f = It(i.schema, l, i), c = ge(C, i, f);
1918
+ }, w = S(new W(x)), g = xe();
1919
+ V(() => w.value.children.length > 0);
1920
+ const m = S(), l = L("designer-host-service"), c = L("design-item-context"), p = ht(c, l), b = ge(m, c, p);
2736
1921
  L("toolbar-item-handler", () => {
2737
1922
  }), z(() => {
2738
- C.value.componentInstance = c;
2739
- }), e.expose(c.value);
2740
- const b = W(() => J({
1923
+ m.value.componentInstance = b;
1924
+ }), e.expose(b.value);
1925
+ const M = V(() => H({
2741
1926
  "f-toolbar": !0,
2742
1927
  "f-response-toolbar": !0,
2743
1928
  "position-relative": !0
2744
- }, s.customClass)), y = W(() => ({
1929
+ }, s.customClass)), O = V(() => ({
2745
1930
  "d-flex": !0,
2746
1931
  "flex-nowrap": !0,
2747
- "justify-content-end": h.value === "right",
2748
- "justify-content-start": h.value === "left"
1932
+ "justify-content-end": f.value === "right",
1933
+ "justify-content-start": f.value === "left"
2749
1934
  })), {
2750
- renderToolbarDropdown: T,
2751
- clearAllDropDown: O
2752
- } = mt(s, g, c);
2753
- function P() {
2754
- o.value.filter((a) => a.children && a.children.length > 0).forEach((a) => {
1935
+ renderToolbarDropdown: j,
1936
+ clearAllDropDown: F
1937
+ } = gt(s, g, b);
1938
+ function _() {
1939
+ n.value.filter((a) => a.children && a.children.length > 0).forEach((a) => {
2755
1940
  a.expanded = !1;
2756
- }), I.value.expanded = !1, O();
1941
+ }), w.value.expanded = !1, F();
2757
1942
  }
2758
- const k = /* @__PURE__ */ new Map(), N = [];
2759
- function j(a) {
2760
- const n = v.value;
1943
+ const R = /* @__PURE__ */ new Map(), E = [];
1944
+ function k(a) {
1945
+ const o = h.value;
2761
1946
  let t = a;
2762
- const r = Array.from(n.children), d = r[r.length - 1].id === "__more_buttons__" ? r[r.length - 1] : null;
2763
- if (d) {
2764
- const _ = d.computedStyleMap().get("margin-left"), $ = d.computedStyleMap().get("margin-right"), V = (_ ? _.value : 0) + d.getBoundingClientRect().width + ($ ? $.value : 0);
2765
- t -= V;
1947
+ const r = Array.from(o.children), u = r[r.length - 1].id === "__more_buttons__" ? r[r.length - 1] : null;
1948
+ if (u) {
1949
+ const B = u.computedStyleMap().get("margin-left"), $ = u.computedStyleMap().get("margin-right"), U = (B ? B.value : 0) + u.getBoundingClientRect().width + ($ ? $.value : 0);
1950
+ t -= U;
2766
1951
  }
2767
- const E = r.filter((_) => _.id !== "__more_buttons__");
2768
- for (const _ of E) {
2769
- const $ = _.computedStyleMap().get("margin-left"), V = _.computedStyleMap().get("margin-right"), U = ($ ? $.value : 0) + _.getBoundingClientRect().width + (V ? V.value : 0);
2770
- t < U ? (k.set(_.id, !0), N.push({
2771
- id: _.id,
2772
- width: U
2773
- })) : t -= U;
1952
+ const T = r.filter((B) => B.id !== "__more_buttons__");
1953
+ for (const B of T) {
1954
+ const $ = B.computedStyleMap().get("margin-left"), U = B.computedStyleMap().get("margin-right"), q = ($ ? $.value : 0) + B.getBoundingClientRect().width + (U ? U.value : 0);
1955
+ t < q ? (R.set(B.id, !0), E.push({
1956
+ id: B.id,
1957
+ width: q
1958
+ })) : t -= q;
2774
1959
  }
2775
- if (N.length)
2776
- for (let _ = N.length - 1; _ >= 0; _--) {
2777
- const $ = N[_].width;
1960
+ if (E.length)
1961
+ for (let B = E.length - 1; B >= 0; B--) {
1962
+ const $ = E[B].width;
2778
1963
  if (t >= $)
2779
- t -= $, k.delete(N[_].id), N.pop();
1964
+ t -= $, R.delete(E[B].id), E.pop();
2780
1965
  else
2781
1966
  break;
2782
1967
  }
2783
- const x = Object.assign({}, I.value);
2784
- x.children = [];
2785
- const M = new G(x), F = o.value.reduce((_, $) => (k.has($.id) && M.children.push($), $.visible = !k.has($.id), _.push($), _), []);
2786
- I.value = M, o.value = F;
1968
+ const C = Object.assign({}, w.value);
1969
+ C.children = [];
1970
+ const I = new W(C), N = n.value.reduce((B, $) => (R.has($.id) && I.children.push($), $.visible = !R.has($.id), B.push($), B), []);
1971
+ w.value = I, n.value = N;
2787
1972
  }
2788
- const m = new ResizeObserver((a) => {
1973
+ const v = new ResizeObserver((a) => {
2789
1974
  if (a.length) {
2790
- const t = a[0].contentRect.width, d = v.value.getBoundingClientRect().width;
2791
- (t < d || N.length) && j(t);
1975
+ const t = a[0].contentRect.width, u = h.value.getBoundingClientRect().width;
1976
+ (t < u || E.length) && k(t);
2792
1977
  }
2793
1978
  });
2794
1979
  z(() => {
2795
- const a = u.value;
2796
- m.observe(a), document.body.addEventListener("click", P);
2797
- }), ne(() => {
2798
- m.disconnect(), document.body.removeEventListener("click", P);
2799
- }), H(() => s.items, () => {
2800
- o.value = s.items;
1980
+ const a = d.value;
1981
+ v.observe(a), document.body.addEventListener("click", _);
1982
+ }), ue(() => {
1983
+ v.disconnect(), document.body.removeEventListener("click", _);
1984
+ }), G(() => s.items, () => {
1985
+ n.value = s.items;
2801
1986
  }, {
2802
1987
  deep: !0
2803
- }), H(o, (a) => {
2804
- p = new Array(o.value.length).fill(S());
1988
+ }), G(n, (a) => {
1989
+ i = new Array(n.value.length).fill(S());
2805
1990
  });
2806
- function R(a, n, t, r) {
2807
- i && i.setupContext && i.setupContext.emit("selectionChange", a, n, t, r);
1991
+ function P(a, o, t, r) {
1992
+ c && c.setupContext && c.setupContext.emit("selectionChange", a, o, t, r);
2808
1993
  }
2809
1994
  function A() {
2810
- const a = v.value.querySelector(".dgComponentFocused.dgComponentSelected");
1995
+ const a = h.value.querySelector(".dgComponentFocused.dgComponentSelected");
2811
1996
  a == null || a.classList.remove("dgComponentSelected"), a == null || a.classList.remove("dgComponentFocused");
2812
1997
  }
2813
- return () => w("div", {
2814
- ref: C,
2815
- "data-dragref": `${i.schema.id}-container`,
2816
- class: b.value
2817
- }, [w("div", {
2818
- ref: u,
2819
- class: y.value
2820
- }, [w("div", {
2821
- ref: v,
1998
+ return () => y("div", {
1999
+ ref: m,
2000
+ "data-dragref": `${c.schema.id}-container`,
2001
+ class: M.value
2002
+ }, [y("div", {
2003
+ ref: d,
2004
+ class: O.value
2005
+ }, [y("div", {
2006
+ ref: h,
2822
2007
  class: "d-inline-block f-response-content",
2823
2008
  style: "white-space: nowrap;"
2824
- }, [o.value.map((a, n) => w(St, {
2825
- ref: p[n],
2009
+ }, [n.value.map((a, o) => y(wt, {
2010
+ ref: i[o],
2826
2011
  class: "p-0 display-inline-block",
2827
2012
  modelValue: a,
2828
2013
  "onUpdate:modelValue": (t) => a = t,
@@ -2833,14 +2018,14 @@ const je = /* @__PURE__ */ X({
2833
2018
  componentId: s.componentId,
2834
2019
  id: a.id,
2835
2020
  style: "padding:0 !important;display:inline-block",
2836
- onSelectionChange: R,
2021
+ onSelectionChange: P,
2837
2022
  onRemoveComponent: A
2838
2023
  }, {
2839
2024
  default: () => {
2840
2025
  var t;
2841
- return [w(je, {
2026
+ return [y(Te, {
2842
2027
  id: a.id,
2843
- disable: a.disable,
2028
+ disabled: a.disabled,
2844
2029
  text: a.text,
2845
2030
  icon: a.icon,
2846
2031
  class: ((t = a.appearance) == null ? void 0 : t.class) || "btn-secondary",
@@ -2850,19 +2035,19 @@ const je = /* @__PURE__ */ X({
2850
2035
  }
2851
2036
  }))])])]);
2852
2037
  }
2853
- }), Vt = ce;
2854
- Q.register = (s, e, o) => {
2855
- s["response-toolbar"] = Q, e["response-toolbar"] = ce;
2038
+ }), Bt = se;
2039
+ J.register = (s, e, n) => {
2040
+ s["response-toolbar"] = J, e["response-toolbar"] = se;
2856
2041
  };
2857
- Q.registerDesigner = (s, e, o) => {
2858
- s["response-toolbar"] = Bt, e["response-toolbar"] = ce, s["response-toolbar-item"] = je, e["response-toolbar-item"] = dt;
2042
+ J.registerDesigner = (s, e, n) => {
2043
+ s["response-toolbar"] = Dt, e["response-toolbar"] = se, s["response-toolbar-item"] = Te, e["response-toolbar-item"] = dt;
2859
2044
  };
2860
- const Wt = Ae(Q);
2045
+ const At = Be(J);
2861
2046
  export {
2862
- Q as FResponseToolbar,
2863
- G as ResponseToolbarDropDownItem,
2864
- Lt as ResponseToolbarGroup,
2865
- Be as ResponseToolbarItem,
2866
- Wt as default,
2867
- Vt as responseToolbarResolver
2047
+ J as FResponseToolbar,
2048
+ W as ResponseToolbarDropDownItem,
2049
+ Pt as ResponseToolbarGroup,
2050
+ Ae as ResponseToolbarItem,
2051
+ At as default,
2052
+ Bt as responseToolbarResolver
2868
2053
  };