@farris/ui-vue 1.2.9 → 1.3.0

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 (236) hide show
  1. package/components/accordion/index.esm.js +63 -63
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +402 -323
  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 +98 -96
  7. package/components/button-edit/index.umd.cjs +1 -1
  8. package/components/calendar/index.esm.js +66 -66
  9. package/components/calendar/index.umd.cjs +1 -1
  10. package/components/capsule/index.esm.js +118 -118
  11. package/components/capsule/index.umd.cjs +1 -1
  12. package/components/checkbox/index.esm.js +539 -460
  13. package/components/checkbox/index.umd.cjs +1 -1
  14. package/components/color-picker/index.esm.js +135 -135
  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 +1007 -312
  18. package/components/combo-list/index.umd.cjs +1 -1
  19. package/components/combo-tree/index.esm.js +97 -97
  20. package/components/combo-tree/index.umd.cjs +1 -1
  21. package/components/common/index.esm.js +778 -700
  22. package/components/common/index.umd.cjs +1 -1
  23. package/components/component/index.esm.js +472 -329
  24. package/components/component/index.umd.cjs +1 -1
  25. package/components/condition/index.css +1 -0
  26. package/components/condition/index.esm.js +2231 -1055
  27. package/components/condition/index.umd.cjs +1 -1
  28. package/components/content-container/index.esm.js +79 -79
  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 +6408 -5034
  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 +4762 -3511
  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 +3442 -2742
  38. package/components/date-picker/index.umd.cjs +1 -1
  39. package/components/designer-outline/index.esm.js +14 -13
  40. package/components/designer-outline/index.umd.cjs +1 -1
  41. package/components/dropdown/index.esm.js +73 -73
  42. package/components/dropdown/index.umd.cjs +2 -2
  43. package/components/dynamic-form/index.css +1 -0
  44. package/components/dynamic-form/index.esm.js +2597 -1141
  45. package/components/dynamic-form/index.umd.cjs +1 -1
  46. package/components/dynamic-resolver/index.esm.js +114 -71
  47. package/components/dynamic-resolver/index.umd.cjs +1 -1
  48. package/components/dynamic-view/index.esm.js +303 -290
  49. package/components/dynamic-view/index.umd.cjs +1 -1
  50. package/components/events-editor/index.esm.js +171 -171
  51. package/components/events-editor/index.umd.cjs +1 -1
  52. package/components/expression-editor/index.esm.js +65 -65
  53. package/components/expression-editor/index.umd.cjs +1 -1
  54. package/components/external-container/index.css +1 -1
  55. package/components/external-container/index.esm.js +3075 -2586
  56. package/components/external-container/index.umd.cjs +1 -1
  57. package/components/field-selector/index.css +1 -1
  58. package/components/field-selector/index.esm.js +5272 -8511
  59. package/components/field-selector/index.umd.cjs +1 -1
  60. package/components/filter-bar/index.css +1 -1
  61. package/components/filter-bar/index.esm.js +1726 -1822
  62. package/components/filter-bar/index.umd.cjs +1 -1
  63. package/components/image-cropper/index.esm.js +126 -126
  64. package/components/image-cropper/index.umd.cjs +1 -1
  65. package/components/input-group/index.esm.js +620 -540
  66. package/components/input-group/index.umd.cjs +1 -1
  67. package/components/layout/index.esm.js +88 -88
  68. package/components/layout/index.umd.cjs +1 -1
  69. package/components/list-nav/index.esm.js +71 -71
  70. package/components/list-nav/index.umd.cjs +1 -1
  71. package/components/list-view/index.css +1 -1
  72. package/components/list-view/index.esm.js +3582 -2356
  73. package/components/list-view/index.umd.cjs +1 -1
  74. package/components/lookup/index.css +1 -1
  75. package/components/lookup/index.esm.js +10752 -8972
  76. package/components/lookup/index.umd.cjs +1 -1
  77. package/components/mapping-editor/index.css +1 -1
  78. package/components/mapping-editor/index.esm.js +5601 -5329
  79. package/components/mapping-editor/index.umd.cjs +1 -1
  80. package/components/message-box/index.css +1 -1
  81. package/components/message-box/index.esm.js +511 -471
  82. package/components/message-box/index.umd.cjs +1 -1
  83. package/components/modal/index.css +1 -1
  84. package/components/modal/index.esm.js +438 -398
  85. package/components/modal/index.umd.cjs +1 -1
  86. package/components/nav/index.esm.js +535 -452
  87. package/components/nav/index.umd.cjs +2 -2
  88. package/components/notify/index.esm.js +59 -53
  89. package/components/notify/index.umd.cjs +1 -1
  90. package/components/number-range/index.esm.js +556 -477
  91. package/components/number-range/index.umd.cjs +1 -1
  92. package/components/number-spinner/index.esm.js +504 -425
  93. package/components/number-spinner/index.umd.cjs +1 -1
  94. package/components/order/index.css +1 -1
  95. package/components/order/index.esm.js +1833 -1054
  96. package/components/order/index.umd.cjs +1 -1
  97. package/components/page-footer/index.esm.js +100 -100
  98. package/components/page-footer/index.umd.cjs +1 -1
  99. package/components/page-header/index.esm.js +899 -870
  100. package/components/page-header/index.umd.cjs +1 -1
  101. package/components/pagination/index.esm.js +576 -487
  102. package/components/pagination/index.umd.cjs +1 -1
  103. package/components/popover/index.esm.js +71 -70
  104. package/components/popover/index.umd.cjs +1 -1
  105. package/components/progress/index.esm.js +73 -73
  106. package/components/progress/index.umd.cjs +2 -2
  107. package/components/property-editor/index.css +1 -1
  108. package/components/property-editor/index.esm.js +1916 -1220
  109. package/components/property-editor/index.umd.cjs +3 -3
  110. package/components/property-panel/index.esm.js +783 -886
  111. package/components/property-panel/index.umd.cjs +1 -1
  112. package/components/query-solution/index.css +1 -1
  113. package/components/query-solution/index.esm.js +3632 -2556
  114. package/components/query-solution/index.umd.cjs +1 -1
  115. package/components/radio-button/index.esm.js +72 -72
  116. package/components/radio-button/index.umd.cjs +1 -1
  117. package/components/radio-group/index.esm.js +484 -405
  118. package/components/radio-group/index.umd.cjs +1 -1
  119. package/components/rate/index.esm.js +152 -152
  120. package/components/rate/index.umd.cjs +1 -1
  121. package/components/response-layout/index.esm.js +73 -73
  122. package/components/response-layout/index.umd.cjs +1 -1
  123. package/components/response-layout-editor/index.css +1 -1
  124. package/components/response-layout-editor/index.esm.js +1081 -1043
  125. package/components/response-layout-editor/index.umd.cjs +1 -1
  126. package/components/response-toolbar/index.esm.js +753 -738
  127. package/components/response-toolbar/index.umd.cjs +1 -1
  128. package/components/schema-selector/index.css +1 -1
  129. package/components/schema-selector/index.esm.js +4418 -4177
  130. package/components/schema-selector/index.umd.cjs +2 -2
  131. package/components/search-box/index.esm.js +119 -119
  132. package/components/search-box/index.umd.cjs +1 -1
  133. package/components/section/index.esm.js +92 -91
  134. package/components/section/index.umd.cjs +1 -1
  135. package/components/smoke-detector/index.esm.js +59 -59
  136. package/components/smoke-detector/index.umd.cjs +1 -1
  137. package/components/splitter/index.esm.js +103 -103
  138. package/components/splitter/index.umd.cjs +1 -1
  139. package/components/step/index.esm.js +85 -85
  140. package/components/step/index.umd.cjs +1 -1
  141. package/components/switch/index.esm.js +457 -378
  142. package/components/switch/index.umd.cjs +1 -1
  143. package/components/tabs/index.css +1 -1
  144. package/components/tabs/index.esm.js +1696 -1617
  145. package/components/tabs/index.umd.cjs +1 -1
  146. package/components/tags/index.esm.js +53 -53
  147. package/components/tags/index.umd.cjs +1 -1
  148. package/components/text/index.esm.js +268 -268
  149. package/components/text/index.umd.cjs +1 -1
  150. package/components/textarea/index.esm.js +420 -341
  151. package/components/textarea/index.umd.cjs +1 -1
  152. package/components/time-picker/index.css +1 -1
  153. package/components/time-picker/index.esm.js +1062 -981
  154. package/components/time-picker/index.umd.cjs +1 -1
  155. package/components/transfer/index.css +1 -1
  156. package/components/transfer/index.esm.js +381 -379
  157. package/components/transfer/index.umd.cjs +1 -1
  158. package/components/tree-grid/index.css +1 -1
  159. package/components/tree-grid/index.esm.js +5252 -9560
  160. package/components/tree-grid/index.umd.cjs +1 -1
  161. package/components/tree-view/index.css +1 -0
  162. package/components/tree-view/index.esm.js +3920 -2692
  163. package/components/tree-view/index.umd.cjs +1 -1
  164. package/components/uploader/index.esm.js +373 -367
  165. package/components/uploader/index.umd.cjs +2 -2
  166. package/components/verify-detail/index.esm.js +92 -92
  167. package/components/verify-detail/index.umd.cjs +1 -1
  168. package/components/video/index.esm.js +597 -417
  169. package/components/video/index.umd.cjs +1 -1
  170. package/components/weather/index.esm.js +251 -251
  171. package/components/weather/index.umd.cjs +4 -4
  172. package/farris.all.esm.js +17125 -16176
  173. package/farris.all.umd.cjs +8 -8
  174. package/index.css +1 -1
  175. package/package.json +1 -1
  176. package/types/capsule/src/capsule.props.d.ts +2 -2
  177. package/types/combo-list/src/components/list-container.component.d.ts +0 -3
  178. package/types/combo-list/src/components/list-container.props.d.ts +0 -4
  179. package/types/common/index.d.ts +1 -0
  180. package/types/common/types.d.ts +1 -1
  181. package/types/common/utils/encrypt.d.ts +2 -0
  182. package/types/component/src/component.props.d.ts +7 -0
  183. package/types/component/src/designer/use-designer-rules.d.ts +1 -1
  184. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  185. package/types/components.d.ts +1 -0
  186. package/types/data-grid/index.d.ts +5 -2
  187. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  188. package/types/data-grid/src/data-grid.props.d.ts +1 -0
  189. package/types/data-view/composition/types.d.ts +18 -1
  190. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  191. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  192. package/types/designer-canvas/src/composition/types.d.ts +1 -1
  193. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  194. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  195. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  196. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  197. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  198. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  199. package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
  200. package/types/dynamic-form/src/types.d.ts +12 -1
  201. package/types/dynamic-resolver/index.d.ts +1 -0
  202. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  203. package/types/dynamic-resolver/src/types.d.ts +9 -0
  204. package/types/dynamic-view/index.d.ts +1 -0
  205. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  206. package/types/index.d.ts +2 -0
  207. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  208. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  209. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  210. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  211. package/types/lookup/src/composition/types.d.ts +8 -0
  212. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  213. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  214. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  215. package/types/lookup/src/composition/use-http.d.ts +9 -5
  216. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  217. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  218. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  219. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  220. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  221. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  222. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  223. package/types/modal/src/modal.component.d.ts +3 -0
  224. package/types/modal/src/modal.props.d.ts +4 -0
  225. package/types/page-header/src/page-header.props.d.ts +1 -0
  226. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  227. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  228. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  229. package/types/response-layout-editor/src/type.d.ts +21 -0
  230. package/types/tabs/src/tabs.props.d.ts +1 -0
  231. package/types/tree-grid/index.d.ts +8 -2
  232. package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
  233. package/types/data-grid/src/designer/use-group-column.d.ts +0 -20
  234. package/types/modal/src/composition/use-esc.d.ts +0 -1
  235. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  236. package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
@@ -1,25 +1,25 @@
1
- import { ref as P, computed as S, defineComponent as M, provide as X, createVNode as T, inject as R, onMounted as Y } from "vue";
2
- import { cloneDeep as ee } from "lodash-es";
1
+ import { ref as P, computed as S, defineComponent as M, provide as Y, createVNode as T, inject as R, onMounted as _ } from "vue";
2
+ import { isPlainObject as x, cloneDeep as te } from "lodash-es";
3
3
  import "bignumber.js";
4
- const _ = {}, J = {};
4
+ const J = {}, G = {};
5
5
  function L(t) {
6
- const { properties: e, title: n, ignore: o } = t, r = o && Array.isArray(o), d = Object.keys(e).reduce((c, m) => ((!r || !o.find((j) => j == m)) && (c[m] = e[m].type === "object" && e[m].properties ? L(e[m]) : ee(e[m].default)), c), {});
6
+ const { properties: e, title: n, ignore: o } = t, r = o && Array.isArray(o), d = Object.keys(e).reduce((c, m) => ((!r || !o.find((j) => j == m)) && (c[m] = e[m].type === "object" && e[m].properties ? L(e[m]) : te(e[m].default)), c), {});
7
7
  return (!r || !o.find((c) => c == "id")) && (d.id = `${n}-${Date.now()}`), d;
8
8
  }
9
9
  function $(t, e = {}, n) {
10
- const o = _[t];
10
+ const o = J[t];
11
11
  if (o) {
12
12
  let r = L(o);
13
- const d = J[t];
13
+ const d = G[t];
14
14
  return r = d ? d({ getSchemaByType: $ }, r, e, n) : r, r;
15
15
  }
16
16
  return null;
17
17
  }
18
- function te(t, e) {
18
+ function ne(t, e) {
19
19
  const n = L(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;
20
+ return Object.keys(t).reduce((o, r) => (o[r] && x(o[r]) && x(t[r]) ? Object.assign(o[r], t[r]) : o[r] = t[r], o), n), n;
21
21
  }
22
- function ne(t, e) {
22
+ function oe(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 d = e.get(r);
@@ -34,11 +34,11 @@ function ne(t, e) {
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 se(t, e, n = /* @__PURE__ */ new Map()) {
38
+ const o = ne(t, e);
39
+ return oe(o, n);
40
40
  }
41
- function se(t = {}) {
41
+ function re(t = {}) {
42
42
  function e(p, i, l, u) {
43
43
  if (typeof l == "number")
44
44
  return u[p].length === l;
@@ -92,37 +92,37 @@ function se(t = {}) {
92
92
  }
93
93
  return { parseValueSchema: j };
94
94
  }
95
- const re = {}, ie = {};
96
- se();
97
- function G(t, e, n = /* @__PURE__ */ new Map(), o = (c, m, j) => m, r = {}, d = (c) => c) {
98
- return _[e.title] = e, J[e.title] = o, re[e.title] = r, ie[e.title] = d, (c = {}) => {
99
- const m = oe(c, e, n), j = Object.keys(t).reduce((p, i) => (p[i] = t[i].default, p), {});
95
+ const ie = {}, ae = {};
96
+ re();
97
+ function Q(t, e, n = /* @__PURE__ */ new Map(), o = (c, m, j) => m, r = {}, d = (c) => c) {
98
+ return J[e.title] = e, G[e.title] = o, ie[e.title] = r, ae[e.title] = d, (c = {}) => {
99
+ const m = se(c, e, n), j = Object.keys(t).reduce((p, i) => (p[i] = t[i].default, p), {});
100
100
  return Object.assign(j, m);
101
101
  };
102
102
  }
103
- function Q(t, e) {
103
+ function U(t, e) {
104
104
  return { customClass: e.class, customStyle: e.style };
105
105
  }
106
- const ae = /* @__PURE__ */ new Map([
107
- ["appearance", Q]
106
+ const ce = /* @__PURE__ */ new Map([
107
+ ["appearance", U]
108
108
  ]);
109
- function ce(t, e, n) {
109
+ function le(t, e, n) {
110
110
  const o = t.getSchemaByType("splitter-pane");
111
111
  return o.appearance = {
112
112
  class: "f-col-w6 f-page-content-nav"
113
113
  }, o.position = "left", e.contents.unshift(o), e;
114
114
  }
115
- function le(t, e, n) {
115
+ function pe(t, e, n) {
116
116
  const o = t.getSchemaByType("splitter-pane");
117
117
  return o.appearance = {
118
118
  class: "f-page-content-main"
119
119
  }, o.position = "main", e.contents.push(o), e;
120
120
  }
121
- function pe(t, e, n) {
121
+ function ue(t, e, n) {
122
122
  const o = n.parentComponentInstance;
123
- return String(o.schema.appearance.class || "").split(" ").includes("f-page-main") && (e.appearance = { class: "f-page-content" }), ce(t, e), le(t, e), e;
123
+ return String(o.schema.appearance.class || "").split(" ").includes("f-page-main") && (e.appearance = { class: "f-page-content" }), le(t, e), pe(t, e), e;
124
124
  }
125
- const ue = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-design.gitee.io/splitter.schema.json", de = "splitter", ye = "A Farris Container Component", be = "object", me = {
125
+ const fe = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-design.gitee.io/splitter.schema.json", ye = "splitter", be = "A Farris Container Component", me = "object", he = {
126
126
  id: {
127
127
  description: "The unique identifier for a splitter",
128
128
  type: "string"
@@ -159,14 +159,14 @@ const ue = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-
159
159
  "row"
160
160
  ]
161
161
  }
162
- }, he = {
163
- $schema: ue,
164
- $id: fe,
165
- title: de,
166
- description: ye,
167
- type: be,
168
- properties: me
169
- }, ge = "splitter", ve = "A Farris Container Component", je = "object", Ce = {
162
+ }, ge = {
163
+ $schema: fe,
164
+ $id: de,
165
+ title: ye,
166
+ description: be,
167
+ type: me,
168
+ properties: he
169
+ }, ve = "splitter", je = "A Farris Container Component", Ce = "object", Pe = {
170
170
  basic: {
171
171
  description: "Basic Infomation",
172
172
  title: "基本信息",
@@ -220,17 +220,17 @@ const ue = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-
220
220
  }
221
221
  }
222
222
  }
223
- }, Pe = {
224
- title: ge,
225
- description: ve,
226
- type: je,
227
- categories: Ce
223
+ }, we = {
224
+ title: ve,
225
+ description: je,
226
+ type: Ce,
227
+ categories: Pe
228
228
  }, V = {
229
229
  customStyle: { type: String, default: "" },
230
230
  customClass: { type: String, default: "" },
231
231
  direction: { Type: String, default: "column" }
232
- }, x = G(V, he, ae, pe, Pe);
233
- function U(t) {
232
+ }, q = Q(V, ge, ce, ue, we);
233
+ function Z(t) {
234
234
  const e = P(-1), n = P(-1), o = P(0), r = P(0), d = P(!1), c = P(!1), m = S(() => ({
235
235
  display: d.value ? "block" : "none",
236
236
  left: `${o.value}px`
@@ -268,8 +268,8 @@ function U(t) {
268
268
  draggingVerticalResizeHandle: l
269
269
  };
270
270
  }
271
- const we = ["moz", "ms", "webkit"];
272
- function ze() {
271
+ const ze = ["moz", "ms", "webkit"];
272
+ function Oe() {
273
273
  let t = 0;
274
274
  return (e) => {
275
275
  const n = (/* @__PURE__ */ new Date()).getTime(), o = Math.max(0, 16 - (n - t)), r = setTimeout(() => {
@@ -278,15 +278,15 @@ function ze() {
278
278
  return t = n + o, r;
279
279
  };
280
280
  }
281
- function Oe() {
281
+ function Ae() {
282
282
  if (typeof window > "u")
283
283
  return () => 0;
284
284
  if (window.requestAnimationFrame)
285
285
  return window.requestAnimationFrame.bind(window);
286
- const t = we.filter((e) => `${e}RequestAnimationFrame` in window)[0];
287
- return t ? window[`${t}RequestAnimationFrame`] : ze();
286
+ const t = ze.filter((e) => `${e}RequestAnimationFrame` in window)[0];
287
+ return t ? window[`${t}RequestAnimationFrame`] : Oe();
288
288
  }
289
- Oe();
289
+ Ae();
290
290
  function H(t, e) {
291
291
  return ((e == null ? void 0 : e.split(" ")) || []).reduce((o, r) => (r && (o[r] = !0), o), t), t;
292
292
  }
@@ -304,12 +304,12 @@ const N = /* @__PURE__ */ M({
304
304
  props: V,
305
305
  emits: [],
306
306
  setup(t, e) {
307
- const n = P(), o = U(n), {
307
+ const n = P(), o = Z(n), {
308
308
  horizontalResizeHandleStyle: r,
309
309
  verticalResizeHandleStyle: d,
310
310
  resizeOverlayStyle: c
311
311
  } = o;
312
- X("splitter", {
312
+ Y("splitter", {
313
313
  useResizeHandleComposition: o
314
314
  });
315
315
  const m = S(() => H({
@@ -335,9 +335,9 @@ const N = /* @__PURE__ */ M({
335
335
  style: d.value
336
336
  }, null)]);
337
337
  }
338
- }), Ae = /* @__PURE__ */ new Map([
339
- ["appearance", Q]
340
- ]), Se = "https://json-schema.org/draft/2020-12/schema", Te = "https://farris-design.gitee.io/splitter-pane.schema.json", Ee = "splitter-pane", $e = "A Farris Container Component", De = "object", Re = {
338
+ }), Se = /* @__PURE__ */ new Map([
339
+ ["appearance", U]
340
+ ]), Te = "https://json-schema.org/draft/2020-12/schema", Ee = "https://farris-design.gitee.io/splitter-pane.schema.json", $e = "splitter-pane", De = "A Farris Container Component", Re = "object", Me = {
341
341
  id: {
342
342
  description: "The unique identifier for a splitter",
343
343
  type: "string"
@@ -413,14 +413,14 @@ const N = /* @__PURE__ */ M({
413
413
  type: "number",
414
414
  default: !0
415
415
  }
416
- }, Me = {
417
- $schema: Se,
418
- $id: Te,
419
- title: Ee,
420
- description: $e,
421
- type: De,
422
- properties: Re
423
- }, He = "splitter-pane", Be = "A Farris Container Component", Ne = "object", ke = {
416
+ }, He = {
417
+ $schema: Te,
418
+ $id: Ee,
419
+ title: $e,
420
+ description: De,
421
+ type: Re,
422
+ properties: Me
423
+ }, Be = "splitter-pane", Ne = "A Farris Container Component", ke = "object", Fe = {
424
424
  basic: {
425
425
  description: "Basic Infomation",
426
426
  title: "基本信息",
@@ -516,11 +516,11 @@ const N = /* @__PURE__ */ M({
516
516
  }
517
517
  }
518
518
  }
519
- }, Fe = {
520
- title: He,
521
- description: Be,
522
- type: Ne,
523
- categories: ke
519
+ }, Le = {
520
+ title: Be,
521
+ description: Ne,
522
+ type: ke,
523
+ categories: Fe
524
524
  }, W = {
525
525
  customClass: { type: String, defaut: "" },
526
526
  customStyle: { type: String, default: "" },
@@ -540,14 +540,14 @@ const N = /* @__PURE__ */ M({
540
540
  minWidth: { type: Number, default: 200 },
541
541
  /** 面板最小高度 */
542
542
  minHeight: { type: Number, default: 200 }
543
- }, q = G(
543
+ }, X = Q(
544
544
  W,
545
- Me,
546
- Ae,
545
+ He,
546
+ Se,
547
547
  void 0,
548
- Fe
548
+ Le
549
549
  );
550
- function Z(t, e) {
550
+ function K(t, e) {
551
551
  const n = P(t.width), o = P(t.height), {
552
552
  horizontalResizeBarPosition: r,
553
553
  horizontalResizeHandleOffset: d,
@@ -596,7 +596,7 @@ const k = /* @__PURE__ */ M({
596
596
  setup(t, e) {
597
597
  const n = P(), o = R("splitter"), {
598
598
  useResizeHandleComposition: r
599
- } = o, d = Z(t, r), {
599
+ } = o, d = K(t, r), {
600
600
  actualHeight: c,
601
601
  actualWidth: m,
602
602
  onClickSplitterHorizontalResizeBar: j,
@@ -632,7 +632,7 @@ const k = /* @__PURE__ */ M({
632
632
  }, null)]);
633
633
  }
634
634
  });
635
- function K(t, e, n) {
635
+ function I(t, e, n) {
636
636
  var O;
637
637
  function o() {
638
638
  n != null && n.resolveComponentContext && n.resolveComponentContext();
@@ -686,8 +686,8 @@ function K(t, e, n) {
686
686
  D.parentComponentInstance = c.value;
687
687
  let E = $(z, D);
688
688
  n && n.onAcceptNewChildElement && (E = n.onAcceptNewChildElement(y, w, E));
689
- const I = z.toLowerCase().replace("-", "_");
690
- return E && !E.id && E.type === z && (E.id = `${I}_${Math.random().toString().slice(2, 6)}`), E;
689
+ const ee = z.toLowerCase().replace("-", "_");
690
+ return E && !E.id && E.type === z && (E.id = `${ee}_${Math.random().toString().slice(2, 6)}`), E;
691
691
  }
692
692
  function g(y) {
693
693
  }
@@ -721,7 +721,7 @@ function K(t, e, n) {
721
721
  triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || P(!1)
722
722
  }, c;
723
723
  }
724
- const Le = "https://json-schema.org/draft/2020-12/schema", Ve = "https://farris-design.gitee.io/dragging-rules.schema.json", We = "Dragging Rules", xe = "The rules of designer canvas", qe = "object", Xe = {
724
+ const Ve = "https://json-schema.org/draft/2020-12/schema", We = "https://farris-design.gitee.io/dragging-rules.schema.json", xe = "Dragging Rules", qe = "The rules of designer canvas", Xe = "object", Ye = {
725
725
  "f-page": {
726
726
  description: "The root class of page designed by farris.",
727
727
  type: "object",
@@ -1359,15 +1359,15 @@ const Le = "https://json-schema.org/draft/2020-12/schema", Ve = "https://farris-
1359
1359
  description: "",
1360
1360
  type: "object"
1361
1361
  }
1362
- }, Ye = {
1363
- $schema: Le,
1364
- $id: Ve,
1365
- title: We,
1366
- description: xe,
1367
- type: qe,
1368
- properties: Xe
1362
+ }, _e = {
1363
+ $schema: Ve,
1364
+ $id: We,
1365
+ title: xe,
1366
+ description: qe,
1367
+ type: Xe,
1368
+ properties: Ye
1369
1369
  }, F = /* @__PURE__ */ new Map();
1370
- function _e() {
1370
+ function Je() {
1371
1371
  function t(s, a, f, h) {
1372
1372
  var v;
1373
1373
  if (typeof f == "number")
@@ -1446,7 +1446,7 @@ function _e() {
1446
1446
  }
1447
1447
  }
1448
1448
  function u() {
1449
- const { properties: s } = Ye;
1449
+ const { properties: s } = _e;
1450
1450
  Object.keys(s).forEach((a) => {
1451
1451
  l(a, s[a], F);
1452
1452
  });
@@ -1457,8 +1457,8 @@ function _e() {
1457
1457
  }
1458
1458
  return u(), { getRuleValue: b };
1459
1459
  }
1460
- function Je(t, e) {
1461
- const n = _e();
1460
+ function Ge(t, e) {
1461
+ const n = Je();
1462
1462
  let o, r = !1;
1463
1463
  function d() {
1464
1464
  return !1;
@@ -1496,20 +1496,20 @@ function Je(t, e) {
1496
1496
  }
1497
1497
  return { canAccepts: d, checkCanDeleteComponent: c, checkCanMoveComponent: m, resolveComponentContext: j, hideNestedPaddingInDesginerView: p };
1498
1498
  }
1499
- const Ge = /* @__PURE__ */ M({
1499
+ const Qe = /* @__PURE__ */ M({
1500
1500
  name: "FSplitterDesign",
1501
1501
  props: V,
1502
1502
  emits: [],
1503
1503
  setup(t, e) {
1504
1504
  var u;
1505
- const n = P(), o = R("design-item-context"), r = Je(o.schema, (u = o.parent) == null ? void 0 : u.schema), d = K(n, o, r);
1505
+ const n = P(), o = R("design-item-context"), r = Ge(o.schema, (u = o.parent) == null ? void 0 : u.schema), d = I(n, o, r);
1506
1506
  d.value.canNested = !1;
1507
- const c = U(n), {
1507
+ const c = Z(n), {
1508
1508
  horizontalResizeHandleStyle: m,
1509
1509
  verticalResizeHandleStyle: j,
1510
1510
  resizeOverlayStyle: p
1511
1511
  } = c;
1512
- X("splitter", {
1512
+ Y("splitter", {
1513
1513
  useResizeHandleComposition: c
1514
1514
  });
1515
1515
  const i = S(() => H({
@@ -1520,7 +1520,7 @@ const Ge = /* @__PURE__ */ M({
1520
1520
  };
1521
1521
  return B(b, t == null ? void 0 : t.customStyle);
1522
1522
  });
1523
- return Y(() => {
1523
+ return _(() => {
1524
1524
  n.value.componentInstance = d;
1525
1525
  }), e.expose(d.value), () => T("div", {
1526
1526
  class: i.value,
@@ -1538,7 +1538,7 @@ const Ge = /* @__PURE__ */ M({
1538
1538
  }, null)]);
1539
1539
  }
1540
1540
  });
1541
- function Qe() {
1541
+ function Ue() {
1542
1542
  function t(e) {
1543
1543
  var r, d;
1544
1544
  if (!e)
@@ -1558,10 +1558,10 @@ function Qe() {
1558
1558
  basalDragulaRuleForContainer: t
1559
1559
  };
1560
1560
  }
1561
- function Ue(t, e) {
1561
+ function Ze(t, e) {
1562
1562
  function n(r) {
1563
1563
  var j;
1564
- if (!Qe().basalDragulaRuleForContainer(r))
1564
+ if (!Ue().basalDragulaRuleForContainer(r))
1565
1565
  return !1;
1566
1566
  if (((((j = t.appearance) == null ? void 0 : j.class) || "").split(" ") || []).includes("f-page-content-nav")) {
1567
1567
  const p = t.contents && t.contents[0];
@@ -1591,19 +1591,19 @@ function Ue(t, e) {
1591
1591
  }
1592
1592
  return { canAccepts: n, onAcceptNewChildElement: o };
1593
1593
  }
1594
- const Ze = /* @__PURE__ */ M({
1594
+ const Ke = /* @__PURE__ */ M({
1595
1595
  name: "FSplitterPaneDesign",
1596
1596
  props: W,
1597
1597
  emits: [],
1598
1598
  setup(t, e) {
1599
1599
  var s;
1600
- const n = P(), o = R("design-item-context"), r = Ue(o.schema, (s = o.parent) == null ? void 0 : s.schema), d = K(n, o, r);
1601
- d.value.styles = "padding:0;box-shadow:none;", d.value.canNested = !1, d.value.canMove = !1, d.value.canDelete = !1, Y(() => {
1600
+ const n = P(), o = R("design-item-context"), r = Ze(o.schema, (s = o.parent) == null ? void 0 : s.schema), d = I(n, o, r);
1601
+ d.value.styles = "padding:0;box-shadow:none;", d.value.canNested = !1, d.value.canMove = !1, d.value.canDelete = !1, _(() => {
1602
1602
  n.value.componentInstance = d;
1603
1603
  }), e.expose(d.value);
1604
1604
  const c = R("splitter"), {
1605
1605
  useResizeHandleComposition: m
1606
- } = c, j = Z(t, m), {
1606
+ } = c, j = K(t, m), {
1607
1607
  actualHeight: p,
1608
1608
  actualWidth: i
1609
1609
  } = j, l = P(t.position), u = S(() => {
@@ -1627,21 +1627,21 @@ const Ze = /* @__PURE__ */ M({
1627
1627
  style: b.value
1628
1628
  }, [e.slots.default && e.slots.default()]);
1629
1629
  }
1630
- }), tt = {
1630
+ }), nt = {
1631
1631
  install(t) {
1632
1632
  t.component(N.name, N), t.component(k.name, k);
1633
1633
  },
1634
1634
  register(t, e, n, o) {
1635
- t.splitter = N, e.splitter = x, t["splitter-pane"] = k, e["splitter-pane"] = q;
1635
+ t.splitter = N, e.splitter = q, t["splitter-pane"] = k, e["splitter-pane"] = X;
1636
1636
  },
1637
1637
  registerDesigner(t, e, n) {
1638
- t.splitter = Ge, e.splitter = x, t["splitter-pane"] = Ze, e["splitter-pane"] = q;
1638
+ t.splitter = Qe, e.splitter = q, t["splitter-pane"] = Ke, e["splitter-pane"] = X;
1639
1639
  }
1640
1640
  };
1641
1641
  export {
1642
1642
  N as FSplitter,
1643
1643
  k as FSplitterPane,
1644
- tt as default,
1644
+ nt as default,
1645
1645
  V as splitterProps,
1646
- x as splitterPropsResolver
1646
+ q as splitterPropsResolver
1647
1647
  };
@@ -1 +1 @@
1
- (function(O,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("vue"),require("lodash-es"),require("bignumber.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","bignumber.js"],f):(O=typeof globalThis<"u"?globalThis:O||self,f(O.splitter={},O.Vue,O.LodashES))})(this,function(O,f,G){"use strict";const L={},W={};function B(t){const{properties:e,title:n,ignore:o}=t,r=o&&Array.isArray(o),y=Object.keys(e).reduce((c,h)=>((!r||!o.find(C=>C==h))&&(c[h]=e[h].type==="object"&&e[h].properties?B(e[h]):G.cloneDeep(e[h].default)),c),{});return(!r||!o.find(c=>c=="id"))&&(y.id=`${n}-${Date.now()}`),y}function T(t,e={},n){const o=L[t];if(o){let r=B(o);const y=W[t];return r=y?y({getSchemaByType:T},r,e,n):r,r}return null}function Q(t,e){const n=B(e);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}function U(t,e){return Object.keys(t).filter(o=>t[o]!=null).reduce((o,r)=>{if(e.has(r)){const y=e.get(r);if(typeof y=="string")o[y]=t[r];else{const c=y(r,t[r],t);Object.assign(o,c)}}else o[r]=t[r];return o},{})}function Z(t,e,n=new Map){const o=Q(t,e);return U(o,n)}function K(t={}){function e(p,i,l,u){if(typeof l=="number")return u[p].length===l;if(typeof l=="object"){const m=Object.keys(l)[0],s=l[m];if(m==="not")return Number(u[p].length)!==Number(s);if(m==="moreThan")return Number(u[p].length)>=Number(s);if(m==="lessThan")return Number(u[p].length)<=Number(s)}return!1}function n(p,i,l,u){return u[p]&&u[p].propertyValue&&String(u[p].propertyValue.value)===String(l)}const o=new Map([["length",e],["getProperty",n]]);Object.keys(t).reduce((p,i)=>(p.set(i,t[i]),p),o);function r(p,i){const l=p;return typeof i=="number"?[{target:l,operator:"length",param:null,value:Number(i)}]:typeof i=="boolean"?[{target:l,operator:"getProperty",param:p,value:!!i}]:typeof i=="object"?Object.keys(i).map(u=>{if(u==="length")return{target:l,operator:"length",param:null,value:i[u]};const m=u,s=i[u];return{target:l,operator:"getProperty",param:m,value:s}}):[]}function y(p){return Object.keys(p).reduce((l,u)=>{const m=r(u,p[u]);return l.push(...m),l},[])}function c(p,i){if(o.has(p.operator)){const l=o.get(p.operator);return l&&l(p.target,p.param,p.value,i)||!1}return!1}function h(p,i){return y(p).reduce((m,s)=>m&&c(s,i),!0)}function C(p,i){const l=Object.keys(p),u=l.includes("allOf"),m=l.includes("anyOf"),s=u||m,g=(s?p[s?u?"allOf":"anyOf":"allOf"]:[p]).map(j=>h(j,i));return u?!g.includes(!1):g.includes(!0)}return{parseValueSchema:C}}const I={},ee={};K();function q(t,e,n=new Map,o=(c,h,C)=>h,r={},y=c=>c){return L[e.title]=e,W[e.title]=o,I[e.title]=r,ee[e.title]=y,(c={})=>{const h=Z(c,e,n),C=Object.keys(t).reduce((p,i)=>(p[i]=t[i].default,p),{});return Object.assign(C,h)}}function x(t,e){return{customClass:e.class,customStyle:e.style}}const te=new Map([["appearance",x]]);function ne(t,e,n){const o=t.getSchemaByType("splitter-pane");return o.appearance={class:"f-col-w6 f-page-content-nav"},o.position="left",e.contents.unshift(o),e}function oe(t,e,n){const o=t.getSchemaByType("splitter-pane");return o.appearance={class:"f-page-content-main"},o.position="main",e.contents.push(o),e}function se(t,e,n){const o=n.parentComponentInstance;return String(o.schema.appearance.class||"").split(" ").includes("f-page-main")&&(e.appearance={class:"f-page-content"}),ne(t,e),oe(t,e),e}const re={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/splitter.schema.json",title:"splitter",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a splitter",type:"string"},type:{description:"The type string of splitter component",type:"string",default:"splitter"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},direction:{description:"",type:"string",default:"column",enum:["column","row"]}}},ie={title:"splitter",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"combo-list",textField:"value",valueField:"key",data:[{key:"splitter",value:"分栏面板"}]}}}},appearance:{description:"",title:"外观",properties:{class:{description:"组件的CSS样式",title:"class样式"},style:{description:"组件的内容样式",title:"style样式"}}},behavior:{description:"",title:"行为",properties:{visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见"}}}}},E={customStyle:{type:String,default:""},customClass:{type:String,default:""},direction:{Type:String,default:"column"}},V=q(E,re,te,se,ie);function _(t){const e=f.ref(-1),n=f.ref(-1),o=f.ref(0),r=f.ref(0),y=f.ref(!1),c=f.ref(!1),h=f.computed(()=>({display:y.value?"block":"none",left:`${o.value}px`})),C=f.computed(()=>({display:c.value?"block":"none",top:`${r.value}px`})),p=f.computed(()=>({display:c.value||y.value?"block":"none"}));function i(u){const m=t.value;if(m){const{left:s}=m.getBoundingClientRect();o.value=u.clientX-s}}function l(u){const m=t.value;if(m){const{top:s}=m.getBoundingClientRect();r.value=u.clientY-s}}return{horizontalResizeHandleStyle:h,verticalResizeHandleStyle:C,resizeOverlayStyle:p,showHorizontalResizeHandle:y,showVerticalResizeHandle:c,horizontalResizeBarPosition:e,verticalResizeBarPosition:n,verticalResizeHandleOffset:r,horizontalResizeHandleOffset:o,draggingHorizontalResizeHandle:i,draggingVerticalResizeHandle:l}}const ae=["moz","ms","webkit"];function ce(){let t=0;return e=>{const n=new Date().getTime(),o=Math.max(0,16-(n-t)),r=setTimeout(()=>{e(n+o)},o);return t=n+o,r}}function le(){if(typeof window>"u")return()=>0;if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);const t=ae.filter(e=>`${e}RequestAnimationFrame`in window)[0];return t?window[`${t}RequestAnimationFrame`]:ce()}le();function N(t,e){return((e==null?void 0:e.split(" "))||[]).reduce((o,r)=>(r&&(o[r]=!0),o),t),t}function D(t,e){return((e==null?void 0:e.split(";"))||[]).reduce((o,r)=>{if(r){const y=r.split(":");o[y[0]]=y[1]}return o},t),t}const R=f.defineComponent({name:"FSplitter",props:E,emits:[],setup(t,e){const n=f.ref(),o=_(n),{horizontalResizeHandleStyle:r,verticalResizeHandleStyle:y,resizeOverlayStyle:c}=o;f.provide("splitter",{useResizeHandleComposition:o});const h=f.computed(()=>N({"f-splitter":!0},t==null?void 0:t.customClass)),C=f.computed(()=>{const p={"flex-direction":t.direction==="row"?"column":"row"};return D(p,t==null?void 0:t.customStyle)});return()=>f.createVNode("div",{class:h.value,ref:n,style:C.value},[e.slots.default&&e.slots.default(),f.createVNode("div",{class:"f-splitter-resize-overlay",style:c.value},null),f.createVNode("div",{class:"f-splitter-horizontal-resize-proxy",style:r.value},null),f.createVNode("div",{class:"f-splitter-vertical-resize-proxy",style:y.value},null)])}}),pe=new Map([["appearance",x]]),ue={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/splitter-pane.schema.json",title:"splitter-pane",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a splitter",type:"string"},type:{description:"The type string of splitter component",type:"string",default:"splitter-pane"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"strnumbering"}},default:{}},collapsable:{description:"",type:"boolean",default:!1},contents:{description:"",type:"array",default:[]},"min-height":{description:"",type:"number"},"min-width":{description:"",type:"number"},position:{description:"",type:"string",default:"left",enum:["left","center","right","top","bottom"]},resizeable:{description:"",type:"boolean",default:!0},visible:{description:"",type:"number",default:!0}}},fe={title:"splitter-pane",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"Splitter",enum:[]}}}},appearance:{description:"",title:"外观",properties:{class:{description:"组件的CSS样式",title:"class样式"},style:{description:"组件的内容样式",title:"style样式"},width:{description:"组件的宽度",title:"宽度(px)",type:"number"},height:{description:"组件的高度",title:"高度(px)",type:"number"},"min-width":{description:"面板最小宽度",title:"最小宽度(px)",type:"number"},"min-height":{description:"面板最小高度",title:"最小高度(px)",type:"number"}}},behavior:{description:"",title:"行为",properties:{visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见"},position:{description:"",title:"位置",editor:{type:"combo-list",data:[{value:"left",name:"左侧"},{value:"center",name:"居中"},{value:"right",name:"右侧"},{value:"top",name:"顶部"},{value:"bottom",name:"底部"}]}}}}}},k={customClass:{type:String,defaut:""},customStyle:{type:String,default:""},width:{type:Number},height:{type:Number},position:{type:String,default:"left"},visible:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},collapsable:{type:Boolean,default:!1},minWidth:{type:Number,default:200},minHeight:{type:Number,default:200}},X=q(k,ue,pe,void 0,fe);function Y(t,e){const n=f.ref(t.width),o=f.ref(t.height),{horizontalResizeBarPosition:r,horizontalResizeHandleOffset:y,showHorizontalResizeHandle:c,showVerticalResizeHandle:h,verticalResizeBarPosition:C,verticalResizeHandleOffset:p,draggingHorizontalResizeHandle:i,draggingVerticalResizeHandle:l}=e;let u="",m,s;function a(v){if((u==="left"||u==="right")&&s){const{left:j}=s.getBoundingClientRect(),{width:P}=m.getBoundingClientRect(),z=v.clientX-j,b=u==="left"?(P||0)+(z-r.value):(P||0)-(z-r.value);n.value=t.minWidth>0?Math.max(t.minWidth,b):b}if((u==="top"||u==="bottom")&&s){const{top:j}=s.getBoundingClientRect(),{height:P}=m.getBoundingClientRect(),z=v.clientY-j,b=u==="top"?(P||0)+(z-C.value):(P||0)-(z-C.value);o.value=t.minHeight>0?Math.max(t.minHeight,b):b}y.value=0,p.value=0,r.value=-1,C.value=-1,c.value=!1,h.value=!1,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a),document.body.style.userSelect="",u="",m=null,s=null}function d(v,j,P){if(u=j,m=P,c.value=!0,s=v.composedPath().find(b=>b.className.split(" ")[0]==="f-splitter"),s){const{left:b}=s.getBoundingClientRect();y.value=v.clientX-b,r.value=v.clientX-b,document.addEventListener("mousemove",i),document.addEventListener("mouseup",a),document.body.style.userSelect="none"}}function g(v,j,P){if(u=j,m=P,h.value=!0,s=v.composedPath().find(b=>b.className.split(" ")[0]==="f-splitter"),s){const{top:b}=s.getBoundingClientRect();p.value=v.clientY-b,C.value=v.clientY-b,document.addEventListener("mousemove",l),document.addEventListener("mouseup",a),document.body.style.userSelect="none"}}return{actualWidth:n,actualHeight:o,onClickSplitterHorizontalResizeBar:d,onClickSplitterVerticalResizeBar:g}}const M=f.defineComponent({name:"FSplitterPane",props:k,emits:[],setup(t,e){const n=f.ref(),o=f.inject("splitter"),{useResizeHandleComposition:r}=o,y=Y(t,r),{actualHeight:c,actualWidth:h,onClickSplitterHorizontalResizeBar:C,onClickSplitterVerticalResizeBar:p}=y,i=f.ref(t.position),l=f.computed(()=>{const a={"f-splitter-pane":!0,"f-splitter-pane-column":i.value==="left"||i.value==="right","f-splitter-pane-row":i.value==="bottom"||i.value==="top","f-splitter-pane-main":i.value==="center"};return N(a,t==null?void 0:t.customClass)}),u=f.computed(()=>{const a={};return(h.value&&i.value==="left"||i.value==="right")&&(a.width=`${h.value}px`),(c.value&&i.value==="bottom"||i.value==="top")&&(a.height=`${c.value}px`),D(a,t==null?void 0:t.customStyle)}),m=f.computed(()=>({"f-splitter-resize-bar":!0,"f-splitter-resize-bar-e":i.value==="left","f-splitter-resize-bar-n":i.value==="bottom","f-splitter-resize-bar-s":i.value==="top","f-splitter-resize-bar-w":i.value==="right"}));function s(a,d){(d==="left"||d==="right")&&C(a,d,n.value),(d==="top"||d==="bottom")&&p(a,d,n.value)}return()=>f.createVNode("div",{ref:n,class:l.value,style:u.value},[e.slots.default&&e.slots.default(),f.createVNode("span",{class:m.value,onMousedown:a=>s(a,i.value)},null)])}});function J(t,e,n){var z;function o(){n!=null&&n.resolveComponentContext&&n.resolveComponentContext()}o();const r=n&&n.getStyles&&n.getStyles()||"",y=n&&n.getDesignerClass&&n.getDesignerClass()||"",c=f.ref();function h(){return(e==null?void 0:e.schema.componentType)==="frame"?!1:n&&n.checkCanMoveComponent?n.checkCanMoveComponent():!0}function C(){return!1}function p(){return(e==null?void 0:e.schema.componentType)==="frame"?!1:n&&n.checkCanDeleteComponent?n.checkCanDeleteComponent():!0}function i(){return(e==null?void 0:e.schema.componentType)==="frame"?!0:n&&n.hideNestedPaddingInDesginerView?n.hideNestedPaddingInDesginerView():!1}function l(b){if(!b||!b.value)return null;if(b.value.schema&&b.value.schema.type==="component")return b.value;const w=f.ref(b==null?void 0:b.value.parent),$=l(w);return $||null}function u(b=e){const{componentInstance:w,designerItemElementRef:$}=b;return!w||!w.value?null:w.value.canMove?$:u(b.parent)}function m(b){return!!n&&n.canAccepts(b)}function s(){return(e==null?void 0:e.schema.label)||(e==null?void 0:e.schema.title)||(e==null?void 0:e.schema.name)}function a(){}function d(b,w){w&&n!=null&&n.onAcceptMovedChildElement&&n.onAcceptMovedChildElement(w)}function g(b,w){const{componentType:$}=b;let S=T($,b,w);n&&n.onResolveNewComponentSchema&&(S=n.onResolveNewComponentSchema(b,S));const H=$.toLowerCase().replace("-","_");return S&&!S.id&&S.type===$&&(S.id=`${H}_${Math.random().toString().slice(2,6)}`),S}function v(b,w){const $=String(b.getAttribute("data-controltype")),S=b.getAttribute("data-feature"),H=S?JSON.parse(S):{};H.parentComponentInstance=c.value;let A=T($,H);n&&n.onAcceptNewChildElement&&(A=n.onAcceptNewChildElement(b,w,A));const Ce=$.toLowerCase().replace("-","_");return A&&!A.id&&A.type===$&&(A.id=`${Ce}_${Math.random().toString().slice(2,6)}`),A}function j(b){}function P(...b){if(n&&n.getPropsConfig)return n.getPropsConfig(...b)}return c.value={canMove:h(),canSelectParent:C(),canDelete:p(),canNested:!i(),contents:e==null?void 0:e.schema.contents,elementRef:t,parent:(z=e==null?void 0:e.parent)==null?void 0:z.componentInstance,schema:e==null?void 0:e.schema,styles:r,designerClass:y,canAccepts:m,getBelongedComponentInstance:l,getDraggableDesignItemElement:u,getDraggingDisplayText:s,getPropConfig:P,getDragScopeElement:a,onAcceptMovedChildElement:d,onAcceptNewChildElement:v,onChildElementMovedOut:j,addNewChildComponentSchema:g,updateDragAndDropRules:o,triggerBelongedComponentToMoveWhenMoved:!!n&&n.triggerBelongedComponentToMoveWhenMoved||f.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:!!n&&n.triggerBelongedComponentToDeleteWhenDeleted||f.ref(!1)},c}const de={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/dragging-rules.schema.json",title:"Dragging Rules",description:"The rules of designer canvas",type:"object",properties:{"f-page":{description:"The root class of page designed by farris.",type:"object",properties:{contents:{type:"object",properties:{"f-page-header":{description:"The class of page header designed by farris.",type:"string"},"f-page-main":{description:"The class of page body designed by farris.",type:"object",properties:{contents:{type:"object",properties:{"f-struct-like-card":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-struct-form":{description:"The class of form component which has a hierarchical structure of component -> section -> respnse-form.",type:"object",properties:{contents:{type:"object",properties:{"f-section-form":{description:"The class of section which has wrapped a reponse-form component.",type:"object",properties:{contents:{type:"object",properties:{"f-form-layout":{description:"The class of reponse form",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}},"f-struct-wrapper":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-section-tabs":{description:"The class of section which has wrapped sub-grid tabs.",type:"object",properties:{contents:{type:"object",properties:{"f-tabs-in-card":{description:"The class of tabs which contains sub-grid.",type:"object",properties:{contents:{type:"object",properties:{"f-struct-data-grid-in-card":{description:"The class of sub-grid component",type:"object",properties:{contents:{type:"object",properties:{"f-grid-is-sub":{description:"The class of sub-grid",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-section-in-main":{description:"The class of section which has wrapped a reponse-form component.",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"object",const:{allOf:[{sibling:0,parent:{"f-page-main":!0}}]}}}}}},"f-struct-data-grid":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"object",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-main-content":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-struct-data-grid-in-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav-extend":{description:"",type:"object"},"f-section-in-nav":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}}}},"f-page-content-main":{description:"",type:"object",properties:{}}}}}},"f-page-content":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-list-nav":{description:"",type:"object"},"f-list-nav-left":{description:"",type:"object"},"f-struct-data-grid-in-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-section-form":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-section-grid":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}},"f-page-content-main":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"object",const:{anyOf:[{children:0},{children:{length:{not:1},"f-struct-like-card":!0}},{children:{"scroll-spy":!1,"f-page-content":!1,"f-struct-like-card":!1}}]}},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-footer":{description:"The class of page footer designed by farris.",type:"string"}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-is-managelist":{description:"The root class of mangement list page.",type:"string"},"f-page-card":{description:"",type:"object"},"f-page-is-mainsubcard":{description:"",type:"object"}}},F=new Map;function ye(){function t(s,a,d,g){var v;if(typeof d=="number")return((v=g[s])==null?void 0:v.length)===d;if(typeof d=="object"){const j=Object.keys(d)[0],P=d[j];if(j==="not")return Number(g[s].length)!==Number(P);if(j==="moreThan")return Number(g[s].length)>=Number(P);if(j==="lessThan")return Number(g[s].length)<=Number(P)}return!1}function e(s,a,d,g){return typeof d=="boolean"?g.childrenClassList.includes(a)===!!d:!1}function n(s,a,d,g){return typeof d=="boolean"?g.parentClassList.includes(a)===!!d:!1}function o(s,a,d,g){return typeof d=="boolean"?g.parentClassList.includes(a)===!!d:!1}const r=new Map([["length",t],["hasChildren",e],["hasSibling",o],["hasParent",n]]);function y(s,a){const d=s;return typeof a=="number"?[{target:d,operator:"length",param:null,value:Number(a)}]:typeof a=="object"?Object.keys(a).map(g=>{if(g==="length")return{target:d,operator:"length",param:null,value:a[g]};const v=g,j=a[g];return{target:d,operator:s==="children"?"hasChildren":s==="parent"?"hasParent":"hasSibling",param:v,value:j}}):[]}function c(s,a){if(r.has(s.operator)){const d=r.get(s.operator);return d&&d(s.target,s.param,s.value,a)||!1}return!1}function h(s,a){return Object.keys(s).reduce((j,P)=>{const z=y(P,s[P]);return j.push(...z),j},[]).reduce((j,P)=>j&&c(P,a),!0)}function C(s,a){const d=Object.keys(s),g=d.includes("allOf"),v=d.includes("anyOf"),j=g||v,b=(j?s[j?g?"allOf":"anyOf":"allOf"]:[s]).map($=>h($,a));return g?!b.includes(!1):b.includes(!0)}function p(s,a){const d=s.const;return d?typeof d=="boolean"?d:typeof d=="object"?C(d,a):!1:!1}function i(s){return a=>{const d={canAccept:!0,fixed:!1,hidePadding:!1};return s&&s.properties&&Object.keys(s.properties).reduce((g,v)=>{const j=s.properties[v];return g[v]=p(j,a),g},d),d}}function l(s,a,d){if(a.type==="object"&&a.properties){const{rules:g,contents:v}=a.properties;d.set(s,i(g)),v&&Object.keys(v.properties).forEach(j=>l(j,v.properties[j],d))}}function u(){const{properties:s}=de;Object.keys(s).forEach(a=>{l(a,s[a],F)})}function m(s,a){const d={canAccept:!0,fixed:!1,hidePadding:!0};return F.has(s)?F.get(s)(a):d}return u(),{getRuleValue:m}}function be(t,e){const n=ye();let o,r=!1;function y(){return!1}function c(){return!r}function h(){return!r}function C(){r=!1;const i=t,l=i.appearance&&i.appearance.class||"",u=l.split(" "),m=i.contents||[],s=m.length?m[0]:null,a=s&&s.appearance?s.appearance.class:"",d=a?a.split(" "):[],g=m.length?m.reduce((b,w)=>{const $=w&&w.appearance?w.appearance.class:"",S=$?$.split(" "):[];return b.push(...S),b},[]):[],v=e,j=v&&v.appearance&&v.appearance.class||"",P=j?j.split(" "):[];o={componentClass:l,componentClassList:u,childContents:m,firstChildContent:s,firstChildClass:a,firstChildClassList:d,parent:v,parentClass:j,parentClassList:P,children:m,childrenClassList:g};const{fixed:z}=n.getRuleValue(u[0],o);return r=z,!0}function p(){return!0}return{canAccepts:y,checkCanDeleteComponent:c,checkCanMoveComponent:h,resolveComponentContext:C,hideNestedPaddingInDesginerView:p}}const me=f.defineComponent({name:"FSplitterDesign",props:E,emits:[],setup(t,e){var u;const n=f.ref(),o=f.inject("design-item-context"),r=be(o.schema,(u=o.parent)==null?void 0:u.schema),y=J(n,o,r);y.value.canNested=!1;const c=_(n),{horizontalResizeHandleStyle:h,verticalResizeHandleStyle:C,resizeOverlayStyle:p}=c;f.provide("splitter",{useResizeHandleComposition:c});const i=f.computed(()=>N({"f-splitter":!0},t==null?void 0:t.customClass)),l=f.computed(()=>{const m={"flex-direction":t.direction==="row"?"column":"row"};return D(m,t==null?void 0:t.customStyle)});return f.onMounted(()=>{n.value.componentInstance=y}),e.expose(y.value),()=>f.createVNode("div",{class:i.value,ref:n,style:l.value},[e.slots.default&&e.slots.default(),f.createVNode("div",{class:"f-splitter-resize-overlay",style:p.value},null),f.createVNode("div",{class:"f-splitter-horizontal-resize-proxy",style:h.value},null),f.createVNode("div",{class:"f-splitter-vertical-resize-proxy",style:C.value},null)])}});function he(){function t(e){var r,y;if(!e)return!1;const n=((r=e.targetContainer)==null?void 0:r.componentInstance)&&e.targetContainer.componentInstance.value;if(!n)return!1;const o=(y=n.schema.appearance)==null?void 0:y.class;if(e.controlCategory==="input"||e.controlType==="form-group"){const c=n.schema.type,h=(c==="response-form"||c==="content-container")&&o&&o.includes("farris-form");if(n.schema.type!=="response-layout-item"&&!h)return!1}return e.controlType!=="field-set"}return{basalDragulaRuleForContainer:t}}function ge(t,e){function n(r){var C;if(!he().basalDragulaRuleForContainer(r))return!1;if(((((C=t.appearance)==null?void 0:C.class)||"").split(" ")||[]).includes("f-page-content-nav")){const p=t.contents&&t.contents[0];return!(p&&p.type==="component")}return!0}function o(r,y,c){const h=t,p=(h.appearance&&h.appearance.class||"").split(" ");if(h.position==="main"&&p.includes("f-page-content-main")){if(c.type==="tabs"){const i=c.appearance&&c.appearance.class?String(c.appearance.class).split(" "):[];i.unshift("f-tabs-in-card"),c.appearance={class:i.join(" ")};const l=T("section");l.id=`${c.id}-section`,l.appearance={class:"f-section-tabs f-section-in-mainsubcard"},l.contents=[c];const u=T("content-container");return u.id=`${c.id}-struct-wrapper`,u.appearance={class:"f-struct-wrapper"},u.contents=[l],u}if(c.type==="section"){const i=c.appearance&&c.appearance.class?String(c.appearance.class).split(" "):[];i.unshift("f-section-in-main"),c.appearance={class:i.join(" ")},c.title=String(r.innerText);const l=T("content-container");return l.id=`${c.id}-struct-wrapper`,l.appearance={class:"f-struct-wrapper"},l.contents=[c],l}}return c}return{canAccepts:n,onAcceptNewChildElement:o}}const je=f.defineComponent({name:"FSplitterPaneDesign",props:k,emits:[],setup(t,e){var s;const n=f.ref(),o=f.inject("design-item-context"),r=ge(o.schema,(s=o.parent)==null?void 0:s.schema),y=J(n,o,r);y.value.styles="padding:0;box-shadow:none;",y.value.canNested=!1,y.value.canMove=!1,y.value.canDelete=!1,f.onMounted(()=>{n.value.componentInstance=y}),e.expose(y.value);const c=f.inject("splitter"),{useResizeHandleComposition:h}=c,C=Y(t,h),{actualHeight:p,actualWidth:i}=C,l=f.ref(t.position),u=f.computed(()=>{const a={"f-splitter-pane":!0,"f-splitter-pane-column":l.value==="left"||l.value==="right","f-splitter-pane-row":l.value==="bottom"||l.value==="top","f-splitter-pane-main":l.value==="center","f-component-splitter-pane":!0,"drag-container":!0};return N(a,t==null?void 0:t.customClass)}),m=f.computed(()=>{const a={};return(i.value&&l.value==="left"||l.value==="right")&&(a.width=`${i.value}px`),(p.value&&l.value==="bottom"||l.value==="top")&&(a.height=`${p.value}px`),D(a,t==null?void 0:t.customStyle)});return()=>f.createVNode("div",{ref:n,"data-dragref":`${o.schema.id}-container`,class:u.value,style:m.value},[e.slots.default&&e.slots.default()])}}),ve={install(t){t.component(R.name,R),t.component(M.name,M)},register(t,e,n,o){t.splitter=R,e.splitter=V,t["splitter-pane"]=M,e["splitter-pane"]=X},registerDesigner(t,e,n){t.splitter=me,e.splitter=V,t["splitter-pane"]=je,e["splitter-pane"]=X}};O.FSplitter=R,O.FSplitterPane=M,O.default=ve,O.splitterProps=E,O.splitterPropsResolver=V,Object.defineProperties(O,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(O,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("vue"),require("lodash-es"),require("bignumber.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","bignumber.js"],f):(O=typeof globalThis<"u"?globalThis:O||self,f(O.splitter={},O.Vue,O.LodashES))})(this,function(O,f,B){"use strict";const W={},q={};function V(t){const{properties:e,title:n,ignore:o}=t,s=o&&Array.isArray(o),y=Object.keys(e).reduce((c,h)=>((!s||!o.find(C=>C==h))&&(c[h]=e[h].type==="object"&&e[h].properties?V(e[h]):B.cloneDeep(e[h].default)),c),{});return(!s||!o.find(c=>c=="id"))&&(y.id=`${n}-${Date.now()}`),y}function T(t,e={},n){const o=W[t];if(o){let s=V(o);const y=q[t];return s=y?y({getSchemaByType:T},s,e,n):s,s}return null}function Q(t,e){const n=V(e);return Object.keys(t).reduce((o,s)=>(o[s]&&B.isPlainObject(o[s])&&B.isPlainObject(t[s])?Object.assign(o[s],t[s]):o[s]=t[s],o),n),n}function U(t,e){return Object.keys(t).filter(o=>t[o]!=null).reduce((o,s)=>{if(e.has(s)){const y=e.get(s);if(typeof y=="string")o[y]=t[s];else{const c=y(s,t[s],t);Object.assign(o,c)}}else o[s]=t[s];return o},{})}function Z(t,e,n=new Map){const o=Q(t,e);return U(o,n)}function K(t={}){function e(p,i,l,u){if(typeof l=="number")return u[p].length===l;if(typeof l=="object"){const m=Object.keys(l)[0],r=l[m];if(m==="not")return Number(u[p].length)!==Number(r);if(m==="moreThan")return Number(u[p].length)>=Number(r);if(m==="lessThan")return Number(u[p].length)<=Number(r)}return!1}function n(p,i,l,u){return u[p]&&u[p].propertyValue&&String(u[p].propertyValue.value)===String(l)}const o=new Map([["length",e],["getProperty",n]]);Object.keys(t).reduce((p,i)=>(p.set(i,t[i]),p),o);function s(p,i){const l=p;return typeof i=="number"?[{target:l,operator:"length",param:null,value:Number(i)}]:typeof i=="boolean"?[{target:l,operator:"getProperty",param:p,value:!!i}]:typeof i=="object"?Object.keys(i).map(u=>{if(u==="length")return{target:l,operator:"length",param:null,value:i[u]};const m=u,r=i[u];return{target:l,operator:"getProperty",param:m,value:r}}):[]}function y(p){return Object.keys(p).reduce((l,u)=>{const m=s(u,p[u]);return l.push(...m),l},[])}function c(p,i){if(o.has(p.operator)){const l=o.get(p.operator);return l&&l(p.target,p.param,p.value,i)||!1}return!1}function h(p,i){return y(p).reduce((m,r)=>m&&c(r,i),!0)}function C(p,i){const l=Object.keys(p),u=l.includes("allOf"),m=l.includes("anyOf"),r=u||m,g=(r?p[r?u?"allOf":"anyOf":"allOf"]:[p]).map(j=>h(j,i));return u?!g.includes(!1):g.includes(!0)}return{parseValueSchema:C}}const I={},ee={};K();function x(t,e,n=new Map,o=(c,h,C)=>h,s={},y=c=>c){return W[e.title]=e,q[e.title]=o,I[e.title]=s,ee[e.title]=y,(c={})=>{const h=Z(c,e,n),C=Object.keys(t).reduce((p,i)=>(p[i]=t[i].default,p),{});return Object.assign(C,h)}}function _(t,e){return{customClass:e.class,customStyle:e.style}}const te=new Map([["appearance",_]]);function ne(t,e,n){const o=t.getSchemaByType("splitter-pane");return o.appearance={class:"f-col-w6 f-page-content-nav"},o.position="left",e.contents.unshift(o),e}function oe(t,e,n){const o=t.getSchemaByType("splitter-pane");return o.appearance={class:"f-page-content-main"},o.position="main",e.contents.push(o),e}function re(t,e,n){const o=n.parentComponentInstance;return String(o.schema.appearance.class||"").split(" ").includes("f-page-main")&&(e.appearance={class:"f-page-content"}),ne(t,e),oe(t,e),e}const se={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/splitter.schema.json",title:"splitter",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a splitter",type:"string"},type:{description:"The type string of splitter component",type:"string",default:"splitter"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},direction:{description:"",type:"string",default:"column",enum:["column","row"]}}},ie={title:"splitter",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"combo-list",textField:"value",valueField:"key",data:[{key:"splitter",value:"分栏面板"}]}}}},appearance:{description:"",title:"外观",properties:{class:{description:"组件的CSS样式",title:"class样式"},style:{description:"组件的内容样式",title:"style样式"}}},behavior:{description:"",title:"行为",properties:{visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见"}}}}},N={customStyle:{type:String,default:""},customClass:{type:String,default:""},direction:{Type:String,default:"column"}},k=x(N,se,te,re,ie);function X(t){const e=f.ref(-1),n=f.ref(-1),o=f.ref(0),s=f.ref(0),y=f.ref(!1),c=f.ref(!1),h=f.computed(()=>({display:y.value?"block":"none",left:`${o.value}px`})),C=f.computed(()=>({display:c.value?"block":"none",top:`${s.value}px`})),p=f.computed(()=>({display:c.value||y.value?"block":"none"}));function i(u){const m=t.value;if(m){const{left:r}=m.getBoundingClientRect();o.value=u.clientX-r}}function l(u){const m=t.value;if(m){const{top:r}=m.getBoundingClientRect();s.value=u.clientY-r}}return{horizontalResizeHandleStyle:h,verticalResizeHandleStyle:C,resizeOverlayStyle:p,showHorizontalResizeHandle:y,showVerticalResizeHandle:c,horizontalResizeBarPosition:e,verticalResizeBarPosition:n,verticalResizeHandleOffset:s,horizontalResizeHandleOffset:o,draggingHorizontalResizeHandle:i,draggingVerticalResizeHandle:l}}const ae=["moz","ms","webkit"];function ce(){let t=0;return e=>{const n=new Date().getTime(),o=Math.max(0,16-(n-t)),s=setTimeout(()=>{e(n+o)},o);return t=n+o,s}}function le(){if(typeof window>"u")return()=>0;if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);const t=ae.filter(e=>`${e}RequestAnimationFrame`in window)[0];return t?window[`${t}RequestAnimationFrame`]:ce()}le();function E(t,e){return((e==null?void 0:e.split(" "))||[]).reduce((o,s)=>(s&&(o[s]=!0),o),t),t}function D(t,e){return((e==null?void 0:e.split(";"))||[]).reduce((o,s)=>{if(s){const y=s.split(":");o[y[0]]=y[1]}return o},t),t}const R=f.defineComponent({name:"FSplitter",props:N,emits:[],setup(t,e){const n=f.ref(),o=X(n),{horizontalResizeHandleStyle:s,verticalResizeHandleStyle:y,resizeOverlayStyle:c}=o;f.provide("splitter",{useResizeHandleComposition:o});const h=f.computed(()=>E({"f-splitter":!0},t==null?void 0:t.customClass)),C=f.computed(()=>{const p={"flex-direction":t.direction==="row"?"column":"row"};return D(p,t==null?void 0:t.customStyle)});return()=>f.createVNode("div",{class:h.value,ref:n,style:C.value},[e.slots.default&&e.slots.default(),f.createVNode("div",{class:"f-splitter-resize-overlay",style:c.value},null),f.createVNode("div",{class:"f-splitter-horizontal-resize-proxy",style:s.value},null),f.createVNode("div",{class:"f-splitter-vertical-resize-proxy",style:y.value},null)])}}),pe=new Map([["appearance",_]]),ue={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/splitter-pane.schema.json",title:"splitter-pane",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a splitter",type:"string"},type:{description:"The type string of splitter component",type:"string",default:"splitter-pane"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},size:{description:"",type:"object",properties:{width:{type:"number"},height:{type:"strnumbering"}},default:{}},collapsable:{description:"",type:"boolean",default:!1},contents:{description:"",type:"array",default:[]},"min-height":{description:"",type:"number"},"min-width":{description:"",type:"number"},position:{description:"",type:"string",default:"left",enum:["left","center","right","top","bottom"]},resizeable:{description:"",type:"boolean",default:!0},visible:{description:"",type:"number",default:!0}}},fe={title:"splitter-pane",description:"A Farris Container Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"Splitter",enum:[]}}}},appearance:{description:"",title:"外观",properties:{class:{description:"组件的CSS样式",title:"class样式"},style:{description:"组件的内容样式",title:"style样式"},width:{description:"组件的宽度",title:"宽度(px)",type:"number"},height:{description:"组件的高度",title:"高度(px)",type:"number"},"min-width":{description:"面板最小宽度",title:"最小宽度(px)",type:"number"},"min-height":{description:"面板最小高度",title:"最小高度(px)",type:"number"}}},behavior:{description:"",title:"行为",properties:{visible:{description:"运行时组件是否可见",type:"boolean",title:"是否可见"},position:{description:"",title:"位置",editor:{type:"combo-list",data:[{value:"left",name:"左侧"},{value:"center",name:"居中"},{value:"right",name:"右侧"},{value:"top",name:"顶部"},{value:"bottom",name:"底部"}]}}}}}},F={customClass:{type:String,defaut:""},customStyle:{type:String,default:""},width:{type:Number},height:{type:Number},position:{type:String,default:"left"},visible:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},collapsable:{type:Boolean,default:!1},minWidth:{type:Number,default:200},minHeight:{type:Number,default:200}},Y=x(F,ue,pe,void 0,fe);function J(t,e){const n=f.ref(t.width),o=f.ref(t.height),{horizontalResizeBarPosition:s,horizontalResizeHandleOffset:y,showHorizontalResizeHandle:c,showVerticalResizeHandle:h,verticalResizeBarPosition:C,verticalResizeHandleOffset:p,draggingHorizontalResizeHandle:i,draggingVerticalResizeHandle:l}=e;let u="",m,r;function a(v){if((u==="left"||u==="right")&&r){const{left:j}=r.getBoundingClientRect(),{width:P}=m.getBoundingClientRect(),z=v.clientX-j,b=u==="left"?(P||0)+(z-s.value):(P||0)-(z-s.value);n.value=t.minWidth>0?Math.max(t.minWidth,b):b}if((u==="top"||u==="bottom")&&r){const{top:j}=r.getBoundingClientRect(),{height:P}=m.getBoundingClientRect(),z=v.clientY-j,b=u==="top"?(P||0)+(z-C.value):(P||0)-(z-C.value);o.value=t.minHeight>0?Math.max(t.minHeight,b):b}y.value=0,p.value=0,s.value=-1,C.value=-1,c.value=!1,h.value=!1,document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",a),document.body.style.userSelect="",u="",m=null,r=null}function d(v,j,P){if(u=j,m=P,c.value=!0,r=v.composedPath().find(b=>b.className.split(" ")[0]==="f-splitter"),r){const{left:b}=r.getBoundingClientRect();y.value=v.clientX-b,s.value=v.clientX-b,document.addEventListener("mousemove",i),document.addEventListener("mouseup",a),document.body.style.userSelect="none"}}function g(v,j,P){if(u=j,m=P,h.value=!0,r=v.composedPath().find(b=>b.className.split(" ")[0]==="f-splitter"),r){const{top:b}=r.getBoundingClientRect();p.value=v.clientY-b,C.value=v.clientY-b,document.addEventListener("mousemove",l),document.addEventListener("mouseup",a),document.body.style.userSelect="none"}}return{actualWidth:n,actualHeight:o,onClickSplitterHorizontalResizeBar:d,onClickSplitterVerticalResizeBar:g}}const M=f.defineComponent({name:"FSplitterPane",props:F,emits:[],setup(t,e){const n=f.ref(),o=f.inject("splitter"),{useResizeHandleComposition:s}=o,y=J(t,s),{actualHeight:c,actualWidth:h,onClickSplitterHorizontalResizeBar:C,onClickSplitterVerticalResizeBar:p}=y,i=f.ref(t.position),l=f.computed(()=>{const a={"f-splitter-pane":!0,"f-splitter-pane-column":i.value==="left"||i.value==="right","f-splitter-pane-row":i.value==="bottom"||i.value==="top","f-splitter-pane-main":i.value==="center"};return E(a,t==null?void 0:t.customClass)}),u=f.computed(()=>{const a={};return(h.value&&i.value==="left"||i.value==="right")&&(a.width=`${h.value}px`),(c.value&&i.value==="bottom"||i.value==="top")&&(a.height=`${c.value}px`),D(a,t==null?void 0:t.customStyle)}),m=f.computed(()=>({"f-splitter-resize-bar":!0,"f-splitter-resize-bar-e":i.value==="left","f-splitter-resize-bar-n":i.value==="bottom","f-splitter-resize-bar-s":i.value==="top","f-splitter-resize-bar-w":i.value==="right"}));function r(a,d){(d==="left"||d==="right")&&C(a,d,n.value),(d==="top"||d==="bottom")&&p(a,d,n.value)}return()=>f.createVNode("div",{ref:n,class:l.value,style:u.value},[e.slots.default&&e.slots.default(),f.createVNode("span",{class:m.value,onMousedown:a=>r(a,i.value)},null)])}});function G(t,e,n){var z;function o(){n!=null&&n.resolveComponentContext&&n.resolveComponentContext()}o();const s=n&&n.getStyles&&n.getStyles()||"",y=n&&n.getDesignerClass&&n.getDesignerClass()||"",c=f.ref();function h(){return(e==null?void 0:e.schema.componentType)==="frame"?!1:n&&n.checkCanMoveComponent?n.checkCanMoveComponent():!0}function C(){return!1}function p(){return(e==null?void 0:e.schema.componentType)==="frame"?!1:n&&n.checkCanDeleteComponent?n.checkCanDeleteComponent():!0}function i(){return(e==null?void 0:e.schema.componentType)==="frame"?!0:n&&n.hideNestedPaddingInDesginerView?n.hideNestedPaddingInDesginerView():!1}function l(b){if(!b||!b.value)return null;if(b.value.schema&&b.value.schema.type==="component")return b.value;const w=f.ref(b==null?void 0:b.value.parent),$=l(w);return $||null}function u(b=e){const{componentInstance:w,designerItemElementRef:$}=b;return!w||!w.value?null:w.value.canMove?$:u(b.parent)}function m(b){return!!n&&n.canAccepts(b)}function r(){return(e==null?void 0:e.schema.label)||(e==null?void 0:e.schema.title)||(e==null?void 0:e.schema.name)}function a(){}function d(b,w){w&&n!=null&&n.onAcceptMovedChildElement&&n.onAcceptMovedChildElement(w)}function g(b,w){const{componentType:$}=b;let S=T($,b,w);n&&n.onResolveNewComponentSchema&&(S=n.onResolveNewComponentSchema(b,S));const H=$.toLowerCase().replace("-","_");return S&&!S.id&&S.type===$&&(S.id=`${H}_${Math.random().toString().slice(2,6)}`),S}function v(b,w){const $=String(b.getAttribute("data-controltype")),S=b.getAttribute("data-feature"),H=S?JSON.parse(S):{};H.parentComponentInstance=c.value;let A=T($,H);n&&n.onAcceptNewChildElement&&(A=n.onAcceptNewChildElement(b,w,A));const Ce=$.toLowerCase().replace("-","_");return A&&!A.id&&A.type===$&&(A.id=`${Ce}_${Math.random().toString().slice(2,6)}`),A}function j(b){}function P(...b){if(n&&n.getPropsConfig)return n.getPropsConfig(...b)}return c.value={canMove:h(),canSelectParent:C(),canDelete:p(),canNested:!i(),contents:e==null?void 0:e.schema.contents,elementRef:t,parent:(z=e==null?void 0:e.parent)==null?void 0:z.componentInstance,schema:e==null?void 0:e.schema,styles:s,designerClass:y,canAccepts:m,getBelongedComponentInstance:l,getDraggableDesignItemElement:u,getDraggingDisplayText:r,getPropConfig:P,getDragScopeElement:a,onAcceptMovedChildElement:d,onAcceptNewChildElement:v,onChildElementMovedOut:j,addNewChildComponentSchema:g,updateDragAndDropRules:o,triggerBelongedComponentToMoveWhenMoved:!!n&&n.triggerBelongedComponentToMoveWhenMoved||f.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:!!n&&n.triggerBelongedComponentToDeleteWhenDeleted||f.ref(!1)},c}const de={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/dragging-rules.schema.json",title:"Dragging Rules",description:"The rules of designer canvas",type:"object",properties:{"f-page":{description:"The root class of page designed by farris.",type:"object",properties:{contents:{type:"object",properties:{"f-page-header":{description:"The class of page header designed by farris.",type:"string"},"f-page-main":{description:"The class of page body designed by farris.",type:"object",properties:{contents:{type:"object",properties:{"f-struct-like-card":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-struct-form":{description:"The class of form component which has a hierarchical structure of component -> section -> respnse-form.",type:"object",properties:{contents:{type:"object",properties:{"f-section-form":{description:"The class of section which has wrapped a reponse-form component.",type:"object",properties:{contents:{type:"object",properties:{"f-form-layout":{description:"The class of reponse form",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}},"f-struct-wrapper":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-section-tabs":{description:"The class of section which has wrapped sub-grid tabs.",type:"object",properties:{contents:{type:"object",properties:{"f-tabs-in-card":{description:"The class of tabs which contains sub-grid.",type:"object",properties:{contents:{type:"object",properties:{"f-struct-data-grid-in-card":{description:"The class of sub-grid component",type:"object",properties:{contents:{type:"object",properties:{"f-grid-is-sub":{description:"The class of sub-grid",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-section-in-main":{description:"The class of section which has wrapped a reponse-form component.",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"object",const:{allOf:[{sibling:0,parent:{"f-page-main":!0}}]}}}}}},"f-struct-data-grid":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"object",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-main-content":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-struct-data-grid-in-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav-extend":{description:"",type:"object"},"f-section-in-nav":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}}}},"f-page-content-main":{description:"",type:"object",properties:{}}}}}},"f-page-content":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-list-nav":{description:"",type:"object"},"f-list-nav-left":{description:"",type:"object"},"f-struct-data-grid-in-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-section-form":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-section-grid":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}},"f-page-content-main":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"object",const:{anyOf:[{children:0},{children:{length:{not:1},"f-struct-like-card":!0}},{children:{"scroll-spy":!1,"f-page-content":!1,"f-struct-like-card":!1}}]}},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-footer":{description:"The class of page footer designed by farris.",type:"string"}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-is-managelist":{description:"The root class of mangement list page.",type:"string"},"f-page-card":{description:"",type:"object"},"f-page-is-mainsubcard":{description:"",type:"object"}}},L=new Map;function ye(){function t(r,a,d,g){var v;if(typeof d=="number")return((v=g[r])==null?void 0:v.length)===d;if(typeof d=="object"){const j=Object.keys(d)[0],P=d[j];if(j==="not")return Number(g[r].length)!==Number(P);if(j==="moreThan")return Number(g[r].length)>=Number(P);if(j==="lessThan")return Number(g[r].length)<=Number(P)}return!1}function e(r,a,d,g){return typeof d=="boolean"?g.childrenClassList.includes(a)===!!d:!1}function n(r,a,d,g){return typeof d=="boolean"?g.parentClassList.includes(a)===!!d:!1}function o(r,a,d,g){return typeof d=="boolean"?g.parentClassList.includes(a)===!!d:!1}const s=new Map([["length",t],["hasChildren",e],["hasSibling",o],["hasParent",n]]);function y(r,a){const d=r;return typeof a=="number"?[{target:d,operator:"length",param:null,value:Number(a)}]:typeof a=="object"?Object.keys(a).map(g=>{if(g==="length")return{target:d,operator:"length",param:null,value:a[g]};const v=g,j=a[g];return{target:d,operator:r==="children"?"hasChildren":r==="parent"?"hasParent":"hasSibling",param:v,value:j}}):[]}function c(r,a){if(s.has(r.operator)){const d=s.get(r.operator);return d&&d(r.target,r.param,r.value,a)||!1}return!1}function h(r,a){return Object.keys(r).reduce((j,P)=>{const z=y(P,r[P]);return j.push(...z),j},[]).reduce((j,P)=>j&&c(P,a),!0)}function C(r,a){const d=Object.keys(r),g=d.includes("allOf"),v=d.includes("anyOf"),j=g||v,b=(j?r[j?g?"allOf":"anyOf":"allOf"]:[r]).map($=>h($,a));return g?!b.includes(!1):b.includes(!0)}function p(r,a){const d=r.const;return d?typeof d=="boolean"?d:typeof d=="object"?C(d,a):!1:!1}function i(r){return a=>{const d={canAccept:!0,fixed:!1,hidePadding:!1};return r&&r.properties&&Object.keys(r.properties).reduce((g,v)=>{const j=r.properties[v];return g[v]=p(j,a),g},d),d}}function l(r,a,d){if(a.type==="object"&&a.properties){const{rules:g,contents:v}=a.properties;d.set(r,i(g)),v&&Object.keys(v.properties).forEach(j=>l(j,v.properties[j],d))}}function u(){const{properties:r}=de;Object.keys(r).forEach(a=>{l(a,r[a],L)})}function m(r,a){const d={canAccept:!0,fixed:!1,hidePadding:!0};return L.has(r)?L.get(r)(a):d}return u(),{getRuleValue:m}}function be(t,e){const n=ye();let o,s=!1;function y(){return!1}function c(){return!s}function h(){return!s}function C(){s=!1;const i=t,l=i.appearance&&i.appearance.class||"",u=l.split(" "),m=i.contents||[],r=m.length?m[0]:null,a=r&&r.appearance?r.appearance.class:"",d=a?a.split(" "):[],g=m.length?m.reduce((b,w)=>{const $=w&&w.appearance?w.appearance.class:"",S=$?$.split(" "):[];return b.push(...S),b},[]):[],v=e,j=v&&v.appearance&&v.appearance.class||"",P=j?j.split(" "):[];o={componentClass:l,componentClassList:u,childContents:m,firstChildContent:r,firstChildClass:a,firstChildClassList:d,parent:v,parentClass:j,parentClassList:P,children:m,childrenClassList:g};const{fixed:z}=n.getRuleValue(u[0],o);return s=z,!0}function p(){return!0}return{canAccepts:y,checkCanDeleteComponent:c,checkCanMoveComponent:h,resolveComponentContext:C,hideNestedPaddingInDesginerView:p}}const me=f.defineComponent({name:"FSplitterDesign",props:N,emits:[],setup(t,e){var u;const n=f.ref(),o=f.inject("design-item-context"),s=be(o.schema,(u=o.parent)==null?void 0:u.schema),y=G(n,o,s);y.value.canNested=!1;const c=X(n),{horizontalResizeHandleStyle:h,verticalResizeHandleStyle:C,resizeOverlayStyle:p}=c;f.provide("splitter",{useResizeHandleComposition:c});const i=f.computed(()=>E({"f-splitter":!0},t==null?void 0:t.customClass)),l=f.computed(()=>{const m={"flex-direction":t.direction==="row"?"column":"row"};return D(m,t==null?void 0:t.customStyle)});return f.onMounted(()=>{n.value.componentInstance=y}),e.expose(y.value),()=>f.createVNode("div",{class:i.value,ref:n,style:l.value},[e.slots.default&&e.slots.default(),f.createVNode("div",{class:"f-splitter-resize-overlay",style:p.value},null),f.createVNode("div",{class:"f-splitter-horizontal-resize-proxy",style:h.value},null),f.createVNode("div",{class:"f-splitter-vertical-resize-proxy",style:C.value},null)])}});function he(){function t(e){var s,y;if(!e)return!1;const n=((s=e.targetContainer)==null?void 0:s.componentInstance)&&e.targetContainer.componentInstance.value;if(!n)return!1;const o=(y=n.schema.appearance)==null?void 0:y.class;if(e.controlCategory==="input"||e.controlType==="form-group"){const c=n.schema.type,h=(c==="response-form"||c==="content-container")&&o&&o.includes("farris-form");if(n.schema.type!=="response-layout-item"&&!h)return!1}return e.controlType!=="field-set"}return{basalDragulaRuleForContainer:t}}function ge(t,e){function n(s){var C;if(!he().basalDragulaRuleForContainer(s))return!1;if(((((C=t.appearance)==null?void 0:C.class)||"").split(" ")||[]).includes("f-page-content-nav")){const p=t.contents&&t.contents[0];return!(p&&p.type==="component")}return!0}function o(s,y,c){const h=t,p=(h.appearance&&h.appearance.class||"").split(" ");if(h.position==="main"&&p.includes("f-page-content-main")){if(c.type==="tabs"){const i=c.appearance&&c.appearance.class?String(c.appearance.class).split(" "):[];i.unshift("f-tabs-in-card"),c.appearance={class:i.join(" ")};const l=T("section");l.id=`${c.id}-section`,l.appearance={class:"f-section-tabs f-section-in-mainsubcard"},l.contents=[c];const u=T("content-container");return u.id=`${c.id}-struct-wrapper`,u.appearance={class:"f-struct-wrapper"},u.contents=[l],u}if(c.type==="section"){const i=c.appearance&&c.appearance.class?String(c.appearance.class).split(" "):[];i.unshift("f-section-in-main"),c.appearance={class:i.join(" ")},c.title=String(s.innerText);const l=T("content-container");return l.id=`${c.id}-struct-wrapper`,l.appearance={class:"f-struct-wrapper"},l.contents=[c],l}}return c}return{canAccepts:n,onAcceptNewChildElement:o}}const je=f.defineComponent({name:"FSplitterPaneDesign",props:F,emits:[],setup(t,e){var r;const n=f.ref(),o=f.inject("design-item-context"),s=ge(o.schema,(r=o.parent)==null?void 0:r.schema),y=G(n,o,s);y.value.styles="padding:0;box-shadow:none;",y.value.canNested=!1,y.value.canMove=!1,y.value.canDelete=!1,f.onMounted(()=>{n.value.componentInstance=y}),e.expose(y.value);const c=f.inject("splitter"),{useResizeHandleComposition:h}=c,C=J(t,h),{actualHeight:p,actualWidth:i}=C,l=f.ref(t.position),u=f.computed(()=>{const a={"f-splitter-pane":!0,"f-splitter-pane-column":l.value==="left"||l.value==="right","f-splitter-pane-row":l.value==="bottom"||l.value==="top","f-splitter-pane-main":l.value==="center","f-component-splitter-pane":!0,"drag-container":!0};return E(a,t==null?void 0:t.customClass)}),m=f.computed(()=>{const a={};return(i.value&&l.value==="left"||l.value==="right")&&(a.width=`${i.value}px`),(p.value&&l.value==="bottom"||l.value==="top")&&(a.height=`${p.value}px`),D(a,t==null?void 0:t.customStyle)});return()=>f.createVNode("div",{ref:n,"data-dragref":`${o.schema.id}-container`,class:u.value,style:m.value},[e.slots.default&&e.slots.default()])}}),ve={install(t){t.component(R.name,R),t.component(M.name,M)},register(t,e,n,o){t.splitter=R,e.splitter=k,t["splitter-pane"]=M,e["splitter-pane"]=Y},registerDesigner(t,e,n){t.splitter=me,e.splitter=k,t["splitter-pane"]=je,e["splitter-pane"]=Y}};O.FSplitter=R,O.FSplitterPane=M,O.default=ve,O.splitterProps=N,O.splitterPropsResolver=k,Object.defineProperties(O,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});