@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,115 +1,154 @@
1
- import { ref as C, computed as D, defineComponent as $, provide as V, createVNode as B, watch as I, inject as E, onMounted as W } from "vue";
2
- import { cloneDeep as ee } from "lodash-es";
1
+ import { ref as g, computed as R, defineComponent as E, provide as W, createVNode as M, watch as te, inject as H, onMounted as q } from "vue";
2
+ import { isPlainObject as V, cloneDeep as ne } from "lodash-es";
3
3
  import "bignumber.js";
4
- const q = {}, Y = {};
5
- function N(t) {
6
- const { properties: e, title: n, ignore: o } = t, r = o && Array.isArray(o), l = Object.keys(e).reduce((s, m) => ((!r || !o.find((w) => w == m)) && (s[m] = e[m].type === "object" && e[m].properties ? N(e[m]) : ee(e[m].default)), s), {});
7
- return (!r || !o.find((s) => s == "id")) && (l.id = `${n}-${Date.now()}`), l;
4
+ const G = {}, Y = {};
5
+ function L(t) {
6
+ const { properties: e, title: n, ignore: o } = t, r = o && Array.isArray(o), l = Object.keys(e).reduce((u, b) => ((!r || !o.find((z) => z == b)) && (u[b] = e[b].type === "object" && e[b].properties ? L(e[b]) : ne(e[b].default)), u), {});
7
+ return n && (!r || !o.find((u) => u == "id")) && (l.id = `${n}-${Date.now()}`), l;
8
8
  }
9
- function T(t, e = {}, n) {
10
- const o = q[t];
9
+ function X(t, e = {}, n) {
10
+ const o = G[t];
11
11
  if (o) {
12
- let r = N(o);
12
+ let r = L(o);
13
13
  const l = Y[t];
14
- return r = l ? l({ getSchemaByType: T }, r, e, n) : r, r;
14
+ return r = l ? l({ getSchemaByType: X }, r, e, n) : r, r;
15
15
  }
16
16
  return null;
17
17
  }
18
- function te(t, e) {
19
- const n = N(e);
20
- return Object.keys(t).reduce((o, r) => (o[r] && typeof o[r] == "object" ? Object.assign(o[r], t[r]) : o[r] = t[r], o), n), n;
18
+ function oe(t, e) {
19
+ const n = L(e);
20
+ return Object.keys(t).reduce((o, r) => (o[r] && V(o[r]) && V(t[r]) ? Object.assign(o[r], t[r]) : o[r] = t[r], o), n), n;
21
21
  }
22
- function ne(t, e) {
22
+ function ae(t, e) {
23
23
  return Object.keys(t).filter((o) => t[o] != null).reduce((o, r) => {
24
24
  if (e.has(r)) {
25
25
  const l = e.get(r);
26
26
  if (typeof l == "string")
27
27
  o[l] = t[r];
28
28
  else {
29
- const s = l(r, t[r], t);
30
- Object.assign(o, s);
29
+ const u = l(r, t[r], t);
30
+ Object.assign(o, u);
31
31
  }
32
32
  } else
33
33
  o[r] = t[r];
34
34
  return o;
35
35
  }, {});
36
36
  }
37
- function oe(t, e, n = /* @__PURE__ */ new Map()) {
38
- const o = te(t, e);
39
- return ne(o, n);
37
+ function ie(t, e, n = /* @__PURE__ */ new Map()) {
38
+ const o = oe(t, e);
39
+ return ae(o, n);
40
40
  }
41
- function ae(t = {}) {
42
- function e(a, p, c, g) {
43
- if (typeof c == "number")
44
- return g[a].length === c;
45
- if (typeof c == "object") {
46
- const O = Object.keys(c)[0], S = c[O];
47
- if (O === "not")
48
- return Number(g[a].length) !== Number(S);
49
- if (O === "moreThan")
50
- return Number(g[a].length) >= Number(S);
51
- if (O === "lessThan")
52
- return Number(g[a].length) <= Number(S);
41
+ function re(t = {}) {
42
+ function e(i, f, s, h) {
43
+ if (typeof s == "number")
44
+ return h[i].length === s;
45
+ if (typeof s == "object") {
46
+ const P = Object.keys(s)[0], k = s[P];
47
+ if (P === "not")
48
+ return Number(h[i].length) !== Number(k);
49
+ if (P === "moreThan")
50
+ return Number(h[i].length) >= Number(k);
51
+ if (P === "lessThan")
52
+ return Number(h[i].length) <= Number(k);
53
53
  }
54
54
  return !1;
55
55
  }
56
- function n(a, p, c, g) {
57
- return g[a] && g[a].propertyValue && String(g[a].propertyValue.value) === String(c);
56
+ function n(i, f, s, h) {
57
+ return h[i] && h[i].propertyValue && String(h[i].propertyValue.value) === String(s);
58
58
  }
59
59
  const o = /* @__PURE__ */ new Map([
60
60
  ["length", e],
61
61
  ["getProperty", n]
62
62
  ]);
63
- Object.keys(t).reduce((a, p) => (a.set(p, t[p]), a), o);
64
- function r(a, p) {
65
- const c = a;
66
- return typeof p == "number" ? [{ target: c, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: c, operator: "getProperty", param: a, value: !!p }] : typeof p == "object" ? Object.keys(p).map((g) => {
67
- if (g === "length")
68
- return { target: c, operator: "length", param: null, value: p[g] };
69
- const O = g, S = p[g];
70
- return { target: c, operator: "getProperty", param: O, value: S };
63
+ Object.keys(t).reduce((i, f) => (i.set(f, t[f]), i), o);
64
+ function r(i, f) {
65
+ const s = i;
66
+ return typeof f == "number" ? [{ target: s, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: s, operator: "getProperty", param: i, value: !!f }] : typeof f == "object" ? Object.keys(f).map((h) => {
67
+ if (h === "length")
68
+ return { target: s, operator: "length", param: null, value: f[h] };
69
+ const P = h, k = f[h];
70
+ return { target: s, operator: "getProperty", param: P, value: k };
71
71
  }) : [];
72
72
  }
73
- function l(a) {
74
- return Object.keys(a).reduce((c, g) => {
75
- const O = r(g, a[g]);
76
- return c.push(...O), c;
73
+ function l(i) {
74
+ return Object.keys(i).reduce((s, h) => {
75
+ const P = r(h, i[h]);
76
+ return s.push(...P), s;
77
77
  }, []);
78
78
  }
79
- function s(a, p) {
80
- if (o.has(a.operator)) {
81
- const c = o.get(a.operator);
82
- return c && c(a.target, a.param, a.value, p) || !1;
79
+ function u(i, f) {
80
+ if (o.has(i.operator)) {
81
+ const s = o.get(i.operator);
82
+ return s && s(i.target, i.param, i.value, f) || !1;
83
83
  }
84
84
  return !1;
85
85
  }
86
- function m(a, p) {
87
- return l(a).reduce((O, S) => O && s(S, p), !0);
86
+ function b(i, f) {
87
+ return l(i).reduce((P, k) => P && u(k, f), !0);
88
88
  }
89
- function w(a, p) {
90
- const c = Object.keys(a), g = c.includes("allOf"), O = c.includes("anyOf"), S = g || O, u = (S ? a[S ? g ? "allOf" : "anyOf" : "allOf"] : [a]).map((h) => m(h, p));
91
- return g ? !u.includes(!1) : u.includes(!0);
89
+ function z(i, f) {
90
+ const s = Object.keys(i), h = s.includes("allOf"), P = s.includes("anyOf"), k = h || P, p = (k ? i[k ? h ? "allOf" : "anyOf" : "allOf"] : [i]).map((m) => b(m, f));
91
+ return h ? !p.includes(!1) : p.includes(!0);
92
92
  }
93
- return { parseValueSchema: w };
93
+ return { parseValueSchema: z };
94
94
  }
95
- const ie = {}, re = {};
96
- ae();
97
- function X(t, e, n = /* @__PURE__ */ new Map(), o = (s, m, w) => m, r = {}, l = (s) => s) {
98
- return q[e.title] = e, Y[e.title] = o, ie[e.title] = r, re[e.title] = l, (s = {}) => {
99
- const m = oe(s, e, n), w = Object.keys(t).reduce((a, p) => (a[p] = t[p].default, a), {});
100
- return Object.assign(w, m);
95
+ const S = {
96
+ button: { type: "button", name: "按钮", icon: "Button" },
97
+ "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
98
+ "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
99
+ "content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
100
+ "input-group": { type: "input-group", name: "文本", icon: "TextBox" },
101
+ textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
102
+ lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
103
+ "number-spinner": { type: "number-spinner", name: "数值", icon: "NumericBox" },
104
+ "date-picker": { type: "date-picker", name: "日期", icon: "DateBox" },
105
+ switch: { type: "switch", name: "开关", icon: "SwitchField" },
106
+ "radio-group": { type: "radio-group", name: "单选组", icon: "RadioGroup" },
107
+ "check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
108
+ "check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
109
+ "combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
110
+ "response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
111
+ "response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
112
+ "response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
113
+ "tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
114
+ "tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
115
+ "data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
116
+ "data-grid-column": { type: "data-grid-column", name: "表格列" },
117
+ module: { type: "Module", name: "模块", icon: "Module" },
118
+ component: { type: "component", name: "组件", icon: "Component" },
119
+ tabs: { type: "tabs", name: "标签页", icon: "Tab" },
120
+ "tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
121
+ "tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
122
+ "time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
123
+ section: { type: "section", name: "分组面板", icon: "Section" },
124
+ "section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
125
+ "section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
126
+ splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
127
+ "splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
128
+ "component-ref": { type: "component-ref", name: "组件引用节点" },
129
+ uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
130
+ "page-header": { type: "page-header", name: "页头", icon: "Header" },
131
+ "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
132
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
133
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
134
+ }, le = {}, se = {};
135
+ re();
136
+ function U(t, e, n = /* @__PURE__ */ new Map(), o = (u, b, z) => b, r = {}, l = (u) => u) {
137
+ return G[e.title] = e, Y[e.title] = o, le[e.title] = r, se[e.title] = l, (u = {}) => {
138
+ const b = ie(u, e, n), z = Object.keys(t).reduce((i, f) => (i[f] = t[f].default, i), {});
139
+ return Object.assign(z, b);
101
140
  };
102
141
  }
103
- function le(t, e) {
142
+ function ce(t, e) {
104
143
  return { customClass: e.class, customStyle: e.style };
105
144
  }
106
145
  const _ = /* @__PURE__ */ new Map([
107
- ["appearance", le]
146
+ ["appearance", ce]
108
147
  ]);
109
148
  function J(t, e, n) {
110
149
  return e;
111
150
  }
112
- const se = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-design.gitee.io/layout.schema.json", ue = "layout", fe = "A Farris Container Component", pe = "object", ye = {
151
+ const ue = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-design.gitee.io/layout.schema.json", fe = "layout", ye = "A Farris Container Component", me = "object", de = {
113
152
  id: {
114
153
  description: "The unique identifier for layout component",
115
154
  type: "string"
@@ -152,19 +191,19 @@ const se = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-
152
191
  type: "boolean",
153
192
  default: !0
154
193
  }
155
- }, me = [
194
+ }, he = [
156
195
  "id",
157
196
  "type",
158
197
  "contents"
159
- ], de = {
160
- $schema: se,
161
- $id: ce,
162
- title: ue,
163
- description: fe,
164
- type: pe,
165
- properties: ye,
166
- required: me
167
- }, he = "layout", ve = "A Farris Component", ge = "object", be = {
198
+ ], ve = {
199
+ $schema: ue,
200
+ $id: pe,
201
+ title: fe,
202
+ description: ye,
203
+ type: me,
204
+ properties: de,
205
+ required: he
206
+ }, be = "layout", ge = "A Farris Component", ze = "object", Ce = {
168
207
  basic: {
169
208
  description: "Basic Infomation",
170
209
  title: "基本信息",
@@ -199,96 +238,96 @@ const se = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-
199
238
  }
200
239
  }
201
240
  }
202
- }, ze = {
203
- title: he,
204
- description: ve,
205
- type: ge,
206
- categories: be
207
- }, L = {
241
+ }, Pe = {
242
+ title: be,
243
+ description: ge,
244
+ type: ze,
245
+ categories: Ce
246
+ }, F = {
208
247
  customStyle: { type: String, defaut: "" },
209
248
  customClass: { type: String, defaut: "" }
210
- }, G = X(L, de, _, J, ze);
211
- function Q(t) {
212
- const e = C(-1), n = C(-1), o = C(0), r = C(0), l = C(!1), s = C(!1), m = D(() => ({
249
+ }, Q = U(F, ve, _, J, Pe);
250
+ function Z(t) {
251
+ const e = g(-1), n = g(-1), o = g(0), r = g(0), l = g(!1), u = g(!1), b = R(() => ({
213
252
  display: l.value ? "block" : "none",
214
253
  left: `${o.value}px`,
215
254
  cursor: "e-resize"
216
- })), w = D(() => ({
217
- display: s.value ? "block" : "none",
255
+ })), z = R(() => ({
256
+ display: u.value ? "block" : "none",
218
257
  top: `${r.value}px`,
219
258
  cursor: "n-resize"
220
- })), a = D(() => ({
221
- display: s.value || l.value ? "block" : "none"
259
+ })), i = R(() => ({
260
+ display: u.value || l.value ? "block" : "none"
222
261
  }));
223
- function p(b, u, d, h) {
224
- const H = t.value;
225
- if (H) {
226
- const { left: v, right: i, width: y } = H.getBoundingClientRect();
227
- let f = b.clientX - v;
228
- h === "right" && (f = i - b.clientX), f > u && (f = u), f < d && (f = d), h === "right" && (f = y - f), o.value = f;
262
+ function f(v, p, y, m) {
263
+ const O = t.value;
264
+ if (O) {
265
+ const { left: a, right: c, width: w } = O.getBoundingClientRect();
266
+ let d = v.clientX - a;
267
+ m === "right" && (d = c - v.clientX), d > p && (d = p), d < y && (d = y), m === "right" && (d = w - d), o.value = d;
229
268
  }
230
269
  }
231
- function c(b, u, d, h) {
232
- const H = t.value;
233
- if (H) {
234
- const { top: v, bottom: i, height: y } = H.getBoundingClientRect();
235
- let f = b.clientY - v;
236
- h === "bottom" && (f = i - b.clientY), f > u && (f = u), f < d && (f = d), h === "bottom" && (f = y - f), r.value = f;
270
+ function s(v, p, y, m) {
271
+ const O = t.value;
272
+ if (O) {
273
+ const { top: a, bottom: c, height: w } = O.getBoundingClientRect();
274
+ let d = v.clientY - a;
275
+ m === "bottom" && (d = c - v.clientY), d > p && (d = p), d < y && (d = y), m === "bottom" && (d = w - d), r.value = d;
237
276
  }
238
277
  }
239
- function g() {
240
- const b = t.value;
241
- if (b) {
242
- const { width: u, height: d } = b.getBoundingClientRect();
243
- return { width: u, height: d };
278
+ function h() {
279
+ const v = t.value;
280
+ if (v) {
281
+ const { width: p, height: y } = v.getBoundingClientRect();
282
+ return { width: p, height: y };
244
283
  }
245
284
  return null;
246
285
  }
247
- function O() {
248
- const b = t.value;
249
- return b ? Array.from(b.querySelectorAll("[data-position]")).reduce((u, d) => {
250
- const h = d.getAttribute("data-position");
251
- return u = Object.assign(u, { [h]: d }), u;
286
+ function P() {
287
+ const v = t.value;
288
+ return v ? Array.from(v.querySelectorAll("[data-position]")).reduce((p, y) => {
289
+ const m = y.getAttribute("data-position");
290
+ return p = Object.assign(p, { [m]: y }), p;
252
291
  }, {}) : null;
253
292
  }
254
- function S(b, u) {
255
- const d = g(), h = O();
256
- if (d && h) {
257
- const H = h == null ? void 0 : h.right, v = h == null ? void 0 : h.left;
258
- if (b === "left" && v)
259
- return H ? d.width - H.clientWidth - u : d.width - u;
260
- if (b === "right" && H)
261
- return v ? d.width - v.clientWidth - u : d.width - u;
293
+ function k(v, p) {
294
+ const y = h(), m = P();
295
+ if (y && m) {
296
+ const O = m == null ? void 0 : m.right, a = m == null ? void 0 : m.left;
297
+ if (v === "left" && a)
298
+ return O ? y.width - O.clientWidth - p : y.width - p;
299
+ if (v === "right" && O)
300
+ return a ? y.width - a.clientWidth - p : y.width - p;
262
301
  }
263
302
  }
264
- function P(b, u) {
265
- const d = g(), h = O();
266
- if (d && h) {
267
- const H = h == null ? void 0 : h.bottom, v = h == null ? void 0 : h.top;
268
- if (b === "top" && v)
269
- return H ? d.height - H.clientHeight - u : d.height - u;
270
- if (b === "bottom" && H)
271
- return v ? d.height - v.clientHeight - u : d.height - u;
303
+ function C(v, p) {
304
+ const y = h(), m = P();
305
+ if (y && m) {
306
+ const O = m == null ? void 0 : m.bottom, a = m == null ? void 0 : m.top;
307
+ if (v === "top" && a)
308
+ return O ? y.height - O.clientHeight - p : y.height - p;
309
+ if (v === "bottom" && O)
310
+ return a ? y.height - a.clientHeight - p : y.height - p;
272
311
  }
273
312
  }
274
313
  return {
275
- horizontalResizeHandleStyle: m,
276
- verticalResizeHandleStyle: w,
277
- resizeOverlayStyle: a,
314
+ horizontalResizeHandleStyle: b,
315
+ verticalResizeHandleStyle: z,
316
+ resizeOverlayStyle: i,
278
317
  showHorizontalResizeHandle: l,
279
- showVerticalResizeHandle: s,
318
+ showVerticalResizeHandle: u,
280
319
  horizontalResizeBarPosition: e,
281
320
  verticalResizeBarPosition: n,
282
321
  verticalResizeHandleOffset: r,
283
322
  horizontalResizeHandleOffset: o,
284
- draggingHorizontalResizeHandle: p,
285
- draggingVerticalResizeHandle: c,
286
- getPanelMaxHeight: P,
287
- getPanelMaxWidth: S
323
+ draggingHorizontalResizeHandle: f,
324
+ draggingVerticalResizeHandle: s,
325
+ getPanelMaxHeight: C,
326
+ getPanelMaxWidth: k
288
327
  };
289
328
  }
290
- const Ce = ["moz", "ms", "webkit"];
291
- function we() {
329
+ const we = ["moz", "ms", "webkit"];
330
+ function Be() {
292
331
  let t = 0;
293
332
  return (e) => {
294
333
  const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - t)), r = setTimeout(() => {
@@ -297,19 +336,19 @@ function we() {
297
336
  return t = n + o, r;
298
337
  };
299
338
  }
300
- function Pe() {
339
+ function Oe() {
301
340
  if (typeof window > "u")
302
341
  return () => 0;
303
342
  if (window.requestAnimationFrame)
304
343
  return window.requestAnimationFrame.bind(window);
305
- const t = Ce.filter((e) => `${e}RequestAnimationFrame` in window)[0];
306
- return t ? window[`${t}RequestAnimationFrame`] : we();
344
+ const t = we.filter((e) => `${e}RequestAnimationFrame` in window)[0];
345
+ return t ? window[`${t}RequestAnimationFrame`] : Be();
307
346
  }
308
- Pe();
309
- function Oe(t, e) {
347
+ Oe();
348
+ function ke(t, e) {
310
349
  return ((e == null ? void 0 : e.split(" ")) || []).reduce((o, r) => (r && (o[r] = !0), o), t), t;
311
350
  }
312
- function Se(t, e) {
351
+ function Me(t, e) {
313
352
  return ((e == null ? void 0 : e.split(";")) || []).reduce((o, r) => {
314
353
  if (r) {
315
354
  const l = r.split(":");
@@ -318,38 +357,38 @@ function Se(t, e) {
318
357
  return o;
319
358
  }, t), t;
320
359
  }
321
- const A = /* @__PURE__ */ $({
360
+ const j = /* @__PURE__ */ E({
322
361
  name: "FLayout",
323
- props: L,
362
+ props: F,
324
363
  emits: [],
325
364
  setup(t, e) {
326
- const n = C(), o = Q(n), {
365
+ const n = g(), o = Z(n), {
327
366
  horizontalResizeHandleStyle: r,
328
367
  verticalResizeHandleStyle: l,
329
- resizeOverlayStyle: s
368
+ resizeOverlayStyle: u
330
369
  } = o;
331
- V("layout", {
370
+ W("layout", {
332
371
  useResizeHandleComposition: o
333
372
  });
334
- const m = D(() => Oe({
373
+ const b = R(() => ke({
335
374
  "f-layout": !0
336
- }, t == null ? void 0 : t.customClass)), w = D(() => Se({}, t == null ? void 0 : t.customStyle));
337
- return () => B("div", {
338
- class: m.value,
339
- style: w.value,
375
+ }, t == null ? void 0 : t.customClass)), z = R(() => Me({}, t == null ? void 0 : t.customStyle));
376
+ return () => M("div", {
377
+ class: b.value,
378
+ style: z.value,
340
379
  ref: n
341
- }, [e.slots.default && e.slots.default(), B("div", {
380
+ }, [e.slots.default && e.slots.default(), M("div", {
342
381
  class: "f-layout-resize-overlay",
343
- style: s.value
344
- }, null), B("div", {
382
+ style: u.value
383
+ }, null), M("div", {
345
384
  class: "f-layout-horizontal-resize-proxy",
346
385
  style: r.value
347
- }, null), B("div", {
386
+ }, null), M("div", {
348
387
  class: "f-layout-vertical-resize-proxy",
349
388
  style: l.value
350
389
  }, null)]);
351
390
  }
352
- }), He = "https://json-schema.org/draft/2020-12/schema", Me = "https://farris-design.gitee.io/layout-pane.schema.json", je = "layout-pane", Be = "A Farris Container Component", De = "object", Ae = {
391
+ }), Te = "https://json-schema.org/draft/2020-12/schema", Re = "https://farris-design.gitee.io/layout-pane.schema.json", De = "layout-pane", Se = "A Farris Container Component", je = "object", He = {
353
392
  id: {
354
393
  description: "The unique identifier for a layout pane",
355
394
  type: "string"
@@ -412,14 +451,14 @@ const A = /* @__PURE__ */ $({
412
451
  type: "number",
413
452
  default: !0
414
453
  }
415
- }, Re = {
416
- $schema: He,
417
- $id: Me,
418
- title: je,
419
- description: Be,
420
- type: De,
421
- properties: Ae
422
- }, Ee = "layout-pane", $e = "A Farris Container Component", Te = "object", ke = {
454
+ }, Ee = {
455
+ $schema: Te,
456
+ $id: Re,
457
+ title: De,
458
+ description: Se,
459
+ type: je,
460
+ properties: He
461
+ }, Ae = "layout-pane", $e = "A Farris Container Component", Le = "object", Fe = {
423
462
  basic: {
424
463
  description: "Basic Infomation",
425
464
  title: "基本信息",
@@ -515,11 +554,11 @@ const A = /* @__PURE__ */ $({
515
554
  }
516
555
  }
517
556
  }, Ne = {
518
- title: Ee,
557
+ title: Ae,
519
558
  description: $e,
520
- type: Te,
521
- categories: ke
522
- }, F = {
559
+ type: Le,
560
+ categories: Fe
561
+ }, N = {
523
562
  customClass: { type: String, defaut: "" },
524
563
  customStyle: { type: String, defaut: "" },
525
564
  /** 记录原始定义宽度 */
@@ -538,327 +577,312 @@ const A = /* @__PURE__ */ $({
538
577
  minWidth: { type: Number, default: 100 },
539
578
  /** 面板最小高度 */
540
579
  minHeight: { type: Number, default: 100 }
541
- }, U = X(F, Re, _, J, Ne);
542
- function Z(t, e, n, o, r) {
580
+ }, x = U(N, Ee, _, J, Ne);
581
+ function K(t, e, n, o, r) {
543
582
  const {
544
583
  horizontalResizeBarPosition: l,
545
- horizontalResizeHandleOffset: s,
546
- showHorizontalResizeHandle: m,
547
- showVerticalResizeHandle: w,
548
- verticalResizeBarPosition: a,
549
- verticalResizeHandleOffset: p,
550
- draggingHorizontalResizeHandle: c,
551
- draggingVerticalResizeHandle: g,
552
- getPanelMaxHeight: O,
553
- getPanelMaxWidth: S
584
+ horizontalResizeHandleOffset: u,
585
+ showHorizontalResizeHandle: b,
586
+ showVerticalResizeHandle: z,
587
+ verticalResizeBarPosition: i,
588
+ verticalResizeHandleOffset: f,
589
+ draggingHorizontalResizeHandle: s,
590
+ draggingVerticalResizeHandle: h,
591
+ getPanelMaxHeight: P,
592
+ getPanelMaxWidth: k
554
593
  } = r;
555
- let P = "", b, u, d;
556
- function h(i) {
557
- if ((P === "left" || P === "right") && u) {
558
- const { left: y } = u.getBoundingClientRect(), { width: f } = b.getBoundingClientRect(), j = i.clientX - y;
559
- let z = P === "left" ? (f || 0) + (j - l.value) : (f || 0) - (j - l.value);
560
- z = n.value > 0 ? Math.max(n.value, z) : z;
561
- const M = S(P, n.value);
562
- M != null && (z = M > z ? z : M), t.value = z;
594
+ let C = "", v, p, y;
595
+ function m(c) {
596
+ if ((C === "left" || C === "right") && p) {
597
+ const { left: w } = p.getBoundingClientRect(), { width: d } = v.getBoundingClientRect(), D = c.clientX - w;
598
+ let B = C === "left" ? (d || 0) + (D - l.value) : (d || 0) - (D - l.value);
599
+ B = n.value > 0 ? Math.max(n.value, B) : B;
600
+ const T = k(C, n.value);
601
+ T != null && (B = T > B ? B : T), t.value = B;
563
602
  }
564
- if ((P === "top" || P === "bottom") && u) {
565
- const { top: y } = u.getBoundingClientRect(), { height: f } = b.getBoundingClientRect(), j = i.clientY - y;
566
- let z = P === "top" ? (f || 0) + (j - a.value) : (f || 0) - (j - a.value);
567
- z = o.value > 0 ? Math.max(o.value, z) : z;
568
- const M = O(P, o.value);
569
- M != null && (z = M > z ? z : M), e.value = z;
603
+ if ((C === "top" || C === "bottom") && p) {
604
+ const { top: w } = p.getBoundingClientRect(), { height: d } = v.getBoundingClientRect(), D = c.clientY - w;
605
+ let B = C === "top" ? (d || 0) + (D - i.value) : (d || 0) - (D - i.value);
606
+ B = o.value > 0 ? Math.max(o.value, B) : B;
607
+ const T = P(C, o.value);
608
+ T != null && (B = T > B ? B : T), e.value = B;
570
609
  }
571
- s.value = 0, p.value = 0, l.value = -1, a.value = -1, m.value = !1, w.value = !1, document.removeEventListener("mousemove", d), document.removeEventListener("mouseup", h), document.body.style.userSelect = "", P = "", b = null, u = null;
572
- }
573
- function H(i, y, f) {
574
- if (P = y, b = f, m.value = !0, u = i.composedPath().find((z) => (z.className || "").split(" ")[0] === "f-layout"), u) {
575
- const { left: z } = u.getBoundingClientRect(), M = i.clientX - z;
576
- s.value = M, l.value = M;
577
- const R = S(P, n.value) || 0;
578
- d = (K) => c(K, R, n.value, P), document.addEventListener("mousemove", d), document.addEventListener("mouseup", h), document.body.style.userSelect = "none";
610
+ u.value = 0, f.value = 0, l.value = -1, i.value = -1, b.value = !1, z.value = !1, document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", m), document.body.style.userSelect = "", C = "", v = null, p = null;
611
+ }
612
+ function O(c, w, d) {
613
+ if (C = w, v = d, b.value = !0, p = c.composedPath().find((B) => (B.className || "").split(" ")[0] === "f-layout"), p) {
614
+ const { left: B } = p.getBoundingClientRect(), T = c.clientX - B;
615
+ u.value = T, l.value = T;
616
+ const A = k(C, n.value) || 0;
617
+ y = (ee) => s(ee, A, n.value, C), document.addEventListener("mousemove", y), document.addEventListener("mouseup", m), document.body.style.userSelect = "none";
579
618
  }
580
619
  }
581
- function v(i, y, f) {
582
- if (P = y, b = f, w.value = !0, u = i.composedPath().find((z) => (z.className || "").split(" ")[0] === "f-layout"), u) {
583
- const { top: z } = u.getBoundingClientRect();
584
- p.value = i.clientY - z, a.value = i.clientY - z;
585
- const M = O(P, o.value) || 0;
586
- d = (R) => g(R, M, o.value, P), document.addEventListener("mousemove", d), document.addEventListener("mouseup", h), document.body.style.userSelect = "none";
620
+ function a(c, w, d) {
621
+ if (C = w, v = d, z.value = !0, p = c.composedPath().find((B) => (B.className || "").split(" ")[0] === "f-layout"), p) {
622
+ const { top: B } = p.getBoundingClientRect();
623
+ f.value = c.clientY - B, i.value = c.clientY - B;
624
+ const T = P(C, o.value) || 0;
625
+ y = (A) => h(A, T, o.value, C), document.addEventListener("mousemove", y), document.addEventListener("mouseup", m), document.body.style.userSelect = "none";
587
626
  }
588
627
  }
589
- return { onClickHorizontalResizeBar: H, onClickVerticalResizeBar: v };
628
+ return { onClickHorizontalResizeBar: O, onClickVerticalResizeBar: a };
590
629
  }
591
- const k = /* @__PURE__ */ $({
630
+ const $ = /* @__PURE__ */ E({
592
631
  name: "FLayoutPane",
593
- props: F,
632
+ props: N,
594
633
  emits: [],
595
634
  setup(t, e) {
596
- const n = C(t.minHeight <= 0 ? 100 : t.minHeight), o = C(t.minWidth <= 0 ? 100 : t.minWidth), r = C(t.width <= 0 ? 100 : t.width), l = C(t.height <= 100 ? 100 : t.height), s = C(Math.max(n.value, l.value)), m = C(Math.max(o.value, r.value)), w = C(), a = C(t.position), p = C(t.resizable);
597
- I(() => t.resizable, (v) => {
598
- p.value = v;
635
+ const n = g(t.minHeight <= 0 ? 100 : t.minHeight), o = g(t.minWidth <= 0 ? 100 : t.minWidth), r = g(t.width <= 0 ? 100 : t.width), l = g(t.height <= 100 ? 100 : t.height), u = g(Math.max(n.value, l.value)), b = g(Math.max(o.value, r.value)), z = g(), i = g(t.position), f = g(t.resizable);
636
+ te(() => t.resizable, (a) => {
637
+ f.value = a;
599
638
  });
600
- const c = E("layout"), {
601
- useResizeHandleComposition: g
602
- } = c, O = Z(m, s, o, n, g), {
603
- onClickHorizontalResizeBar: S,
604
- onClickVerticalResizeBar: P
605
- } = O, b = D(() => ({
639
+ const s = H("layout"), {
640
+ useResizeHandleComposition: h
641
+ } = s, P = K(b, u, o, n, h), {
642
+ onClickHorizontalResizeBar: k,
643
+ onClickVerticalResizeBar: C
644
+ } = P, v = R(() => ({
606
645
  "f-layout-resize-bar": !0,
607
- "f-layout-resize-bar-e": a.value === "left",
608
- "f-layout-resize-bar-n": a.value === "bottom",
609
- "f-layout-resize-bar-s": a.value === "top",
610
- "f-layout-resize-bar-w": a.value === "right"
611
- })), u = D(() => a.value !== "center" && p.value);
612
- function d(v, i) {
613
- (i === "left" || i === "right") && S(v, i, w.value), (i === "top" || i === "bottom") && P(v, i, w.value);
646
+ "f-layout-resize-bar-e": i.value === "left",
647
+ "f-layout-resize-bar-n": i.value === "bottom",
648
+ "f-layout-resize-bar-s": i.value === "top",
649
+ "f-layout-resize-bar-w": i.value === "right"
650
+ })), p = R(() => i.value !== "center" && f.value);
651
+ function y(a, c) {
652
+ (c === "left" || c === "right") && k(a, c, z.value), (c === "top" || c === "bottom") && C(a, c, z.value);
614
653
  }
615
- const h = D(() => {
616
- const v = {
654
+ const m = R(() => {
655
+ const a = {
617
656
  "f-layout-pane": !0,
618
- "f-page-content-nav": a.value === "left" || a.value === "right",
619
- "f-page-content-main": a.value === "center"
657
+ "f-page-content-nav": i.value === "left" || i.value === "right",
658
+ "f-page-content-main": i.value === "center"
620
659
  };
621
- return t.customClass && String(t.customClass).split(" ").reduce((i, y) => (i[y] = !0, i), v), v;
622
- }), H = D(() => {
623
- const v = {};
624
- return (m.value && a.value === "left" || a.value === "right") && (v.width = `${m.value}px`), (s.value && a.value === "bottom" || a.value === "top") && (v.height = `${s.value}px`), t.visible || (v.display = "none"), v;
660
+ return t.customClass && String(t.customClass).split(" ").reduce((c, w) => (c[w] = !0, c), a), a;
661
+ }), O = R(() => {
662
+ const a = {};
663
+ return (b.value && i.value === "left" || i.value === "right") && (a.width = `${b.value}px`), (u.value && i.value === "bottom" || i.value === "top") && (a.height = `${u.value}px`), t.visible || (a.display = "none"), a;
625
664
  });
626
- return () => B("div", {
627
- ref: w,
628
- class: h.value,
629
- style: H.value,
630
- "data-position": a.value
631
- }, [e.slots.default && e.slots.default(), u.value && B("span", {
632
- class: b.value,
633
- onMousedown: (v) => d(v, a.value)
665
+ return () => M("div", {
666
+ ref: z,
667
+ class: m.value,
668
+ style: O.value,
669
+ "data-position": i.value
670
+ }, [e.slots.default && e.slots.default(), p.value && M("span", {
671
+ class: v.value,
672
+ onMousedown: (a) => y(a, i.value)
634
673
  }, null)]);
635
674
  }
636
675
  });
637
- function Le(t, e) {
676
+ function Ve(t, e) {
638
677
  function n() {
639
678
  return !1;
640
679
  }
641
680
  return { canAccepts: n };
642
681
  }
643
- function x(t, e, n) {
644
- var v;
682
+ function I(t, e, n) {
683
+ var O;
645
684
  function o() {
646
685
  n != null && n.resolveComponentContext && n.resolveComponentContext();
647
686
  }
648
687
  o();
649
- const r = n && n.getStyles && n.getStyles() || "", l = n && n.getDesignerClass && n.getDesignerClass() || "", s = C();
650
- function m() {
688
+ const r = n && n.getStyles && n.getStyles() || "", l = n && n.getDesignerClass && n.getDesignerClass() || "", u = g();
689
+ function b() {
651
690
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
652
691
  }
653
- function w() {
692
+ function z() {
654
693
  return !1;
655
694
  }
656
- function a() {
695
+ function i() {
657
696
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
658
697
  }
659
- function p() {
698
+ function f() {
660
699
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
661
700
  }
662
- function c(i) {
663
- if (!i || !i.value)
701
+ function s(a) {
702
+ if (!a || !a.value)
664
703
  return null;
665
- if (i.value.schema && i.value.schema.type === "component")
666
- return i.value;
667
- const y = C(i == null ? void 0 : i.value.parent), f = c(y);
668
- return f || null;
704
+ if (a.value.schema && a.value.schema.type === "component")
705
+ return a.value;
706
+ const c = g(a == null ? void 0 : a.value.parent), w = s(c);
707
+ return w || null;
669
708
  }
670
- function g(i = e) {
671
- const { componentInstance: y, designerItemElementRef: f } = i;
672
- return !y || !y.value ? null : y.value.canMove ? f : g(i.parent);
709
+ function h(a = e) {
710
+ const { componentInstance: c, designerItemElementRef: w } = a;
711
+ return !c || !c.value ? null : c.value.canMove ? w : h(a.parent);
673
712
  }
674
- function O(i) {
675
- return !!n && n.canAccepts(i);
713
+ function P(a) {
714
+ return !!n && n.canAccepts(a);
676
715
  }
677
- function S() {
716
+ function k() {
678
717
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
679
718
  }
680
- function P() {
719
+ function C() {
681
720
  }
682
- function b(i, y) {
683
- y && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(y);
721
+ function v(a, c) {
722
+ c && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(c);
684
723
  }
685
- function u(i, y) {
686
- const { componentType: f } = i;
687
- let j = T(f, i, y);
688
- n && n.onResolveNewComponentSchema && (j = n.onResolveNewComponentSchema(i, j));
689
- const z = f.toLowerCase().replace("-", "_");
690
- return j && !j.id && j.type === f && (j.id = `${z}_${Math.random().toString().slice(2, 6)}`), j;
724
+ function p(a, c) {
725
+ const { componentType: w } = a;
726
+ let d = X(w, a, c);
727
+ n && n.onResolveNewComponentSchema && (d = n.onResolveNewComponentSchema(a, d));
728
+ const D = w.toLowerCase().replace("-", "_");
729
+ return d && !d.id && d.type === w && (d.id = `${D}_${Math.random().toString().slice(2, 6)}`), d;
691
730
  }
692
- function d(i, y) {
693
- const f = String(i.getAttribute("data-controltype")), j = i.getAttribute("data-feature"), z = j ? JSON.parse(j) : {};
694
- z.parentComponentInstance = s.value;
695
- let M = T(f, z);
696
- n && n.onAcceptNewChildElement && (M = n.onAcceptNewChildElement(i, y, M));
697
- const R = f.toLowerCase().replace("-", "_");
698
- return M && !M.id && M.type === f && (M.id = `${R}_${Math.random().toString().slice(2, 6)}`), M;
731
+ function y(a) {
699
732
  }
700
- function h(i) {
701
- }
702
- function H(...i) {
733
+ function m(...a) {
703
734
  if (n && n.getPropsConfig)
704
- return n.getPropsConfig(...i);
735
+ return n.getPropsConfig(...a);
705
736
  }
706
- return s.value = {
707
- canMove: m(),
708
- canSelectParent: w(),
709
- canDelete: a(),
710
- canNested: !p(),
737
+ return u.value = {
738
+ canMove: b(),
739
+ canSelectParent: z(),
740
+ canDelete: i(),
741
+ canNested: !f(),
711
742
  contents: e == null ? void 0 : e.schema.contents,
712
743
  elementRef: t,
713
- parent: (v = e == null ? void 0 : e.parent) == null ? void 0 : v.componentInstance,
744
+ parent: (O = e == null ? void 0 : e.parent) == null ? void 0 : O.componentInstance,
714
745
  schema: e == null ? void 0 : e.schema,
715
746
  styles: r,
716
747
  designerClass: l,
717
- canAccepts: O,
718
- getBelongedComponentInstance: c,
719
- getDraggableDesignItemElement: g,
720
- getDraggingDisplayText: S,
721
- getPropConfig: H,
722
- getDragScopeElement: P,
723
- onAcceptMovedChildElement: b,
724
- onAcceptNewChildElement: d,
725
- onChildElementMovedOut: h,
726
- addNewChildComponentSchema: u,
748
+ canAccepts: P,
749
+ getBelongedComponentInstance: s,
750
+ getDraggableDesignItemElement: h,
751
+ getDraggingDisplayText: k,
752
+ getPropConfig: m,
753
+ getDragScopeElement: C,
754
+ onAcceptMovedChildElement: v,
755
+ onChildElementMovedOut: y,
756
+ addNewChildComponentSchema: p,
727
757
  updateDragAndDropRules: o,
728
- triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || C(!1),
729
- triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || C(!1)
730
- }, s;
758
+ triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || g(!1),
759
+ triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || g(!1)
760
+ }, u;
731
761
  }
732
- const Fe = /* @__PURE__ */ $({
762
+ const We = /* @__PURE__ */ E({
733
763
  name: "FLayoutDesign",
734
- props: L,
764
+ props: F,
735
765
  emits: [],
736
766
  setup(t, e) {
737
- var p;
738
- const n = C(), o = E("design-item-context"), r = Le(o.schema, (p = o.parent) == null ? void 0 : p.schema), l = x(n, o, r);
767
+ var f;
768
+ const n = g(), o = H("design-item-context"), r = Ve(o.schema, (f = o.parent) == null ? void 0 : f.schema), l = I(n, o, r);
739
769
  l.value.canNested = !1;
740
- const s = Q(n), {
741
- horizontalResizeHandleStyle: m,
742
- verticalResizeHandleStyle: w,
743
- resizeOverlayStyle: a
744
- } = s;
745
- return V("layout", {
746
- useResizeHandleComposition: s
747
- }), W(() => {
770
+ const u = Z(n), {
771
+ horizontalResizeHandleStyle: b,
772
+ verticalResizeHandleStyle: z,
773
+ resizeOverlayStyle: i
774
+ } = u;
775
+ return W("layout", {
776
+ useResizeHandleComposition: u
777
+ }), q(() => {
748
778
  n.value.componentInstance = l;
749
- }), e.expose(l.value), () => B("div", {
779
+ }), e.expose(l.value), () => M("div", {
750
780
  class: "f-layout f-page-content",
751
781
  ref: n
752
- }, [e.slots.default && e.slots.default(), B("div", {
782
+ }, [e.slots.default && e.slots.default(), M("div", {
753
783
  class: "f-layout-resize-overlay",
754
- style: a.value
755
- }, null), B("div", {
784
+ style: i.value
785
+ }, null), M("div", {
756
786
  class: "f-layout-horizontal-resize-proxy",
757
- style: m.value
758
- }, null), B("div", {
787
+ style: b.value
788
+ }, null), M("div", {
759
789
  class: "f-layout-vertical-resize-proxy",
760
- style: w.value
790
+ style: z.value
761
791
  }, null)]);
762
792
  }
763
793
  });
764
- function Ve() {
765
- function t(e) {
766
- var r, l;
794
+ function qe() {
795
+ function t(e, n) {
796
+ var u;
767
797
  if (!e)
768
798
  return !1;
769
- const n = ((r = e.targetContainer) == null ? void 0 : r.componentInstance) && e.targetContainer.componentInstance.value;
770
- if (!n)
799
+ const o = ((u = e.targetContainer) == null ? void 0 : u.componentInstance) && e.targetContainer.componentInstance.value;
800
+ if (!o)
771
801
  return !1;
772
- const o = (l = n.schema.appearance) == null ? void 0 : l.class;
773
- if (e.controlCategory === "input" || e.controlType === "form-group") {
774
- const s = n.schema.type, m = (s === "response-form" || s === "content-container") && o && o.includes("farris-form");
775
- if (n.schema.type !== "response-layout-item" && !m)
776
- return !1;
777
- }
778
- return e.controlType !== "field-set";
802
+ const r = o.schema.type, l = n == null ? void 0 : n.formSchemaUtils.getComponentById(o.belongedComponentId);
803
+ return !((e.controlCategory === "input" || e.controlType === "form-group") && ![S["response-layout-item"].type, S["response-form"].type].includes(r) || (e.controlType === S.tabs.type || e.controlType === S.section.type) && ((l == null ? void 0 : l.componentType) !== "frame" || ![S["content-container"].type, S["splitter-pane"].type, S["response-layout-item"].type].includes(r)));
779
804
  }
780
805
  return {
781
806
  basalDragulaRuleForContainer: t
782
807
  };
783
808
  }
784
- function We(t, e) {
785
- function n(l) {
786
- return !!Ve().basalDragulaRuleForContainer(l);
787
- }
788
- function o(l, s, m) {
789
- return m;
809
+ function Ge(t, e) {
810
+ const n = t.schema;
811
+ function o(l) {
812
+ return !!qe().basalDragulaRuleForContainer(l);
790
813
  }
791
814
  function r() {
792
815
  const l = ["f-layout-pane"];
793
- return (t.position === "left" || t.position === "right") && l.push("f-page-content-nav"), t.position === "center" && l.push("f-page-content-main"), l.join(" ");
816
+ return (n.position === "left" || n.position === "right") && l.push("f-page-content-nav"), n.position === "center" && l.push("f-page-content-main"), l.join(" ");
794
817
  }
795
- return { canAccepts: n, getDesignerClass: r, onAcceptNewChildElement: o };
818
+ return { canAccepts: o, getDesignerClass: r };
796
819
  }
797
- const qe = /* @__PURE__ */ $({
820
+ const Ye = /* @__PURE__ */ E({
798
821
  name: "FLayoutPaneDesign",
799
- props: F,
822
+ props: N,
800
823
  emits: [],
801
824
  setup(t, e) {
802
- var v;
803
- const n = C(), o = C(), r = E("design-item-context"), l = We(r.schema, (v = r.parent) == null ? void 0 : v.schema), s = x(o, r, l);
804
- s.value.canNested = !1, s.value.canMove = !1, s.value.canDelete = !1, W(() => {
805
- o.value.componentInstance = s;
806
- }), e.expose(s.value);
807
- const m = C(Math.max(t.minHeight, t.height)), w = C(Math.max(t.minWidth, t.width)), a = C(t.minHeight), p = C(t.minWidth), c = C(t.position), g = E("layout"), {
808
- useResizeHandleComposition: O
809
- } = g, S = Z(w, m, p, a, O), {
810
- onClickHorizontalResizeBar: P,
811
- onClickVerticalResizeBar: b
812
- } = S, u = D(() => ({
825
+ const n = g(), o = g();
826
+ H("designer-host-service");
827
+ const r = H("design-item-context"), l = Ge(r), u = I(o, r, l);
828
+ u.value.canNested = !1, u.value.canMove = !1, u.value.canDelete = !1, q(() => {
829
+ o.value.componentInstance = u;
830
+ }), e.expose(u.value);
831
+ const b = g(Math.max(t.minHeight, t.height)), z = g(Math.max(t.minWidth, t.width)), i = g(t.minHeight), f = g(t.minWidth), s = g(t.position), h = H("layout"), {
832
+ useResizeHandleComposition: P
833
+ } = h, k = K(z, b, f, i, P), {
834
+ onClickHorizontalResizeBar: C,
835
+ onClickVerticalResizeBar: v
836
+ } = k, p = R(() => ({
813
837
  "f-layout-resize-bar": !0,
814
- "f-layout-resize-bar-e": c.value === "left",
815
- "f-layout-resize-bar-n": c.value === "bottom",
816
- "f-layout-resize-bar-s": c.value === "top",
817
- "f-layout-resize-bar-w": c.value === "right"
838
+ "f-layout-resize-bar-e": s.value === "left",
839
+ "f-layout-resize-bar-n": s.value === "bottom",
840
+ "f-layout-resize-bar-s": s.value === "top",
841
+ "f-layout-resize-bar-w": s.value === "right"
818
842
  }));
819
- function d(i, y) {
820
- (y === "left" || y === "right") && P(i, y, n.value), (y === "top" || y === "bottom") && b(i, y, n.value);
843
+ function y(a, c) {
844
+ (c === "left" || c === "right") && C(a, c, n.value), (c === "top" || c === "bottom") && v(a, c, n.value);
821
845
  }
822
- const h = D(() => {
823
- const i = {
846
+ const m = R(() => {
847
+ const a = {
824
848
  "f-layout-pane": !0,
825
- "f-page-content-nav": c.value === "left" || c.value === "right",
826
- "f-page-content-main": c.value === "center"
849
+ "f-page-content-nav": s.value === "left" || s.value === "right",
850
+ "f-page-content-main": s.value === "center"
827
851
  };
828
- return t.customClass && String(t.customClass).split(" ").reduce((y, f) => (y[f] = !0, y), i), i;
829
- }), H = D(() => {
830
- const i = {
852
+ return t.customClass && String(t.customClass).split(" ").reduce((c, w) => (c[w] = !0, c), a), a;
853
+ }), O = R(() => {
854
+ const a = {
831
855
  flex: "1"
832
856
  };
833
- return (w.value && c.value === "left" || c.value === "right") && (i.width = `${w.value}px`), (m.value && c.value === "bottom" || c.value === "top") && (i.height = `${m.value}px`), i;
857
+ return (z.value && s.value === "left" || s.value === "right") && (a.width = `${z.value}px`), (b.value && s.value === "bottom" || s.value === "top") && (a.height = `${b.value}px`), a;
834
858
  });
835
- return () => B("div", {
859
+ return () => M("div", {
836
860
  ref: n,
837
- class: h.value,
838
- style: H.value
839
- }, [B("div", {
861
+ class: m.value,
862
+ style: O.value
863
+ }, [M("div", {
840
864
  ref: o,
841
865
  class: "drag-container",
842
866
  "data-dragref": `${r.schema.id}-container`
843
- }, [e.slots.default && e.slots.default()]), B("span", {
844
- class: u.value,
845
- onMousedown: (i) => d(i, c.value)
867
+ }, [e.slots.default && e.slots.default()]), M("span", {
868
+ class: p.value,
869
+ onMousedown: (a) => y(a, s.value)
846
870
  }, null)]);
847
871
  }
848
872
  });
849
- A.install = (t) => {
850
- t.component(A.name, A), t.component(k.name, k);
873
+ j.install = (t) => {
874
+ t.component(j.name, j), t.component($.name, $);
851
875
  };
852
- A.register = (t, e, n, o) => {
853
- t.layout = A, e.layout = G, t["layout-pane"] = k, e["layout-pane"] = U;
876
+ j.register = (t, e, n, o) => {
877
+ t.layout = j, e.layout = Q, t["layout-pane"] = $, e["layout-pane"] = x;
854
878
  };
855
- A.registerDesigner = (t, e, n) => {
856
- t.layout = Fe, e.layout = G, t["layout-pane"] = qe, e["layout-pane"] = U;
879
+ j.registerDesigner = (t, e, n) => {
880
+ t.layout = We, e.layout = Q, t["layout-pane"] = Ye, e["layout-pane"] = x;
857
881
  };
858
882
  export {
859
- A as FLayout,
860
- k as FLayoutPane,
861
- A as default,
862
- L as layoutProps,
863
- G as layoutPropsResolver
883
+ j as FLayout,
884
+ $ as FLayoutPane,
885
+ j as default,
886
+ F as layoutProps,
887
+ Q as layoutPropsResolver
864
888
  };