@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,111 +1,150 @@
1
- import { defineComponent as W, createVNode as _, ref as M, nextTick as Y, inject as Z, computed as R, onMounted as x } from "vue";
2
- import { cloneDeep as K } from "lodash-es";
1
+ import { defineComponent as j, createVNode as N, nextTick as G, ref as M, inject as S, computed as R, onMounted as W } from "vue";
2
+ import { isPlainObject as E, cloneDeep as U } from "lodash-es";
3
3
  import "bignumber.js";
4
- const z = {}, G = {};
5
- function k(n) {
6
- const { properties: e, title: t, ignore: r } = n, c = r && Array.isArray(r), h = Object.keys(e).reduce((m, y) => ((!c || !r.find((T) => T == y)) && (m[y] = e[y].type === "object" && e[y].properties ? k(e[y]) : K(e[y].default)), m), {});
7
- return (!c || !r.find((m) => m == "id")) && (h.id = `${t}-${Date.now()}`), h;
4
+ const O = {}, V = {};
5
+ function A(r) {
6
+ const { properties: e, title: t, ignore: a } = r, n = a && Array.isArray(a), c = Object.keys(e).reduce((o, u) => ((!n || !a.find((y) => y == u)) && (o[u] = e[u].type === "object" && e[u].properties ? A(e[u]) : U(e[u].default)), o), {});
7
+ return t && (!n || !a.find((o) => o == "id")) && (c.id = `${t}-${Date.now()}`), c;
8
8
  }
9
- function N(n, e = {}, t) {
10
- const r = z[n];
11
- if (r) {
12
- let c = k(r);
13
- const h = G[n];
14
- return c = h ? h({ getSchemaByType: N }, c, e, t) : c, c;
9
+ function $(r, e = {}, t) {
10
+ const a = O[r];
11
+ if (a) {
12
+ let n = A(a);
13
+ const c = V[r];
14
+ return n = c ? c({ getSchemaByType: $ }, n, e, t) : n, n;
15
15
  }
16
16
  return null;
17
17
  }
18
- function I(n, e) {
19
- const t = k(e);
20
- return Object.keys(n).reduce((r, c) => (r[c] && typeof r[c] == "object" ? Object.assign(r[c], n[c]) : r[c] = n[c], r), t), t;
18
+ function z(r, e) {
19
+ const t = A(e);
20
+ return Object.keys(r).reduce((a, n) => (a[n] && E(a[n]) && E(r[n]) ? Object.assign(a[n], r[n]) : a[n] = r[n], a), t), t;
21
21
  }
22
- function ee(n, e) {
23
- return Object.keys(n).filter((r) => n[r] != null).reduce((r, c) => {
24
- if (e.has(c)) {
25
- const h = e.get(c);
26
- if (typeof h == "string")
27
- r[h] = n[c];
22
+ function _(r, e) {
23
+ return Object.keys(r).filter((a) => r[a] != null).reduce((a, n) => {
24
+ if (e.has(n)) {
25
+ const c = e.get(n);
26
+ if (typeof c == "string")
27
+ a[c] = r[n];
28
28
  else {
29
- const m = h(c, n[c], n);
30
- Object.assign(r, m);
29
+ const o = c(n, r[n], r);
30
+ Object.assign(a, o);
31
31
  }
32
32
  } else
33
- r[c] = n[c];
34
- return r;
33
+ a[n] = r[n];
34
+ return a;
35
35
  }, {});
36
36
  }
37
- function te(n, e, t = /* @__PURE__ */ new Map()) {
38
- const r = I(n, e);
39
- return ee(r, t);
37
+ function J(r, e, t = /* @__PURE__ */ new Map()) {
38
+ const a = z(r, e);
39
+ return _(a, t);
40
40
  }
41
- function ne(n = {}) {
42
- function e(p, d, f, b) {
43
- if (typeof f == "number")
44
- return b[p].length === f;
45
- if (typeof f == "object") {
46
- const v = Object.keys(f)[0], o = f[v];
47
- if (v === "not")
48
- return Number(b[p].length) !== Number(o);
49
- if (v === "moreThan")
50
- return Number(b[p].length) >= Number(o);
51
- if (v === "lessThan")
52
- return Number(b[p].length) <= Number(o);
41
+ function Q(r = {}) {
42
+ function e(i, s, l, p) {
43
+ if (typeof l == "number")
44
+ return p[i].length === l;
45
+ if (typeof l == "object") {
46
+ const f = Object.keys(l)[0], h = l[f];
47
+ if (f === "not")
48
+ return Number(p[i].length) !== Number(h);
49
+ if (f === "moreThan")
50
+ return Number(p[i].length) >= Number(h);
51
+ if (f === "lessThan")
52
+ return Number(p[i].length) <= Number(h);
53
53
  }
54
54
  return !1;
55
55
  }
56
- function t(p, d, f, b) {
57
- return b[p] && b[p].propertyValue && String(b[p].propertyValue.value) === String(f);
56
+ function t(i, s, l, p) {
57
+ return p[i] && p[i].propertyValue && String(p[i].propertyValue.value) === String(l);
58
58
  }
59
- const r = /* @__PURE__ */ new Map([
59
+ const a = /* @__PURE__ */ new Map([
60
60
  ["length", e],
61
61
  ["getProperty", t]
62
62
  ]);
63
- Object.keys(n).reduce((p, d) => (p.set(d, n[d]), p), r);
64
- function c(p, d) {
65
- const f = p;
66
- return typeof d == "number" ? [{ target: f, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: f, operator: "getProperty", param: p, value: !!d }] : typeof d == "object" ? Object.keys(d).map((b) => {
67
- if (b === "length")
68
- return { target: f, operator: "length", param: null, value: d[b] };
69
- const v = b, o = d[b];
70
- return { target: f, operator: "getProperty", param: v, value: o };
63
+ Object.keys(r).reduce((i, s) => (i.set(s, r[s]), i), a);
64
+ function n(i, s) {
65
+ const l = i;
66
+ return typeof s == "number" ? [{ target: l, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: l, operator: "getProperty", param: i, value: !!s }] : typeof s == "object" ? Object.keys(s).map((p) => {
67
+ if (p === "length")
68
+ return { target: l, operator: "length", param: null, value: s[p] };
69
+ const f = p, h = s[p];
70
+ return { target: l, operator: "getProperty", param: f, value: h };
71
71
  }) : [];
72
72
  }
73
- function h(p) {
74
- return Object.keys(p).reduce((f, b) => {
75
- const v = c(b, p[b]);
76
- return f.push(...v), f;
73
+ function c(i) {
74
+ return Object.keys(i).reduce((l, p) => {
75
+ const f = n(p, i[p]);
76
+ return l.push(...f), l;
77
77
  }, []);
78
78
  }
79
- function m(p, d) {
80
- if (r.has(p.operator)) {
81
- const f = r.get(p.operator);
82
- return f && f(p.target, p.param, p.value, d) || !1;
79
+ function o(i, s) {
80
+ if (a.has(i.operator)) {
81
+ const l = a.get(i.operator);
82
+ return l && l(i.target, i.param, i.value, s) || !1;
83
83
  }
84
84
  return !1;
85
85
  }
86
- function y(p, d) {
87
- return h(p).reduce((v, o) => v && m(o, d), !0);
86
+ function u(i, s) {
87
+ return c(i).reduce((f, h) => f && o(h, s), !0);
88
88
  }
89
- function T(p, d) {
90
- const f = Object.keys(p), b = f.includes("allOf"), v = f.includes("anyOf"), o = b || v, u = (o ? p[o ? b ? "allOf" : "anyOf" : "allOf"] : [p]).map((a) => y(a, d));
91
- return b ? !u.includes(!1) : u.includes(!0);
89
+ function y(i, s) {
90
+ const l = Object.keys(i), p = l.includes("allOf"), f = l.includes("anyOf"), h = p || f, b = (h ? i[h ? p ? "allOf" : "anyOf" : "allOf"] : [i]).map((k) => u(k, s));
91
+ return p ? !b.includes(!1) : b.includes(!0);
92
92
  }
93
- return { parseValueSchema: T };
93
+ return { parseValueSchema: y };
94
94
  }
95
- const oe = {}, re = {};
96
- ne();
97
- function ce(n, e, t = /* @__PURE__ */ new Map(), r = (m, y, T) => y, c = {}, h = (m) => m) {
98
- return z[e.title] = e, G[e.title] = r, oe[e.title] = c, re[e.title] = h, (m = {}) => {
99
- const y = te(m, e, t), T = Object.keys(n).reduce((p, d) => (p[d] = n[d].default, p), {});
100
- return Object.assign(T, y);
95
+ const g = {
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
+ }, X = {}, Y = {};
135
+ Q();
136
+ function Z(r, e, t = /* @__PURE__ */ new Map(), a = (o, u, y) => u, n = {}, c = (o) => o) {
137
+ return O[e.title] = e, V[e.title] = a, X[e.title] = n, Y[e.title] = c, (o = {}) => {
138
+ const u = J(o, e, t), y = Object.keys(r).reduce((i, s) => (i[s] = r[s].default, i), {});
139
+ return Object.assign(y, u);
101
140
  };
102
141
  }
103
- function se(n, e) {
142
+ function H(r, e) {
104
143
  return { customClass: e.class, customStyle: e.style };
105
144
  }
106
- const ae = /* @__PURE__ */ new Map([
107
- ["appearance", se]
108
- ]), ie = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-design.gitee.io/content-container.schema.json", le = "content-container", ue = "A Farris Container Component", fe = "object", de = {
145
+ const K = /* @__PURE__ */ new Map([
146
+ ["appearance", H]
147
+ ]), x = "https://json-schema.org/draft/2020-12/schema", I = "https://farris-design.gitee.io/content-container.schema.json", ee = "content-container", te = "A Farris Container Component", ne = "object", oe = {
109
148
  id: {
110
149
  description: "The unique identifier for a Section",
111
150
  type: "string"
@@ -151,19 +190,19 @@ const ae = /* @__PURE__ */ new Map([
151
190
  type: "boolean",
152
191
  default: !0
153
192
  }
154
- }, ye = [
193
+ }, re = [
155
194
  "id",
156
195
  "type",
157
196
  "contents"
158
- ], be = {
159
- $schema: ie,
160
- $id: pe,
161
- title: le,
162
- description: ue,
163
- type: fe,
164
- properties: de,
165
- required: ye
166
- }, me = "content-container", he = "A Farris Container Component", ge = "object", je = {
197
+ ], ae = {
198
+ $schema: x,
199
+ $id: I,
200
+ title: ee,
201
+ description: te,
202
+ type: ne,
203
+ properties: oe,
204
+ required: re
205
+ }, ce = "content-container", ie = "A Farris Container Component", se = "object", le = {
167
206
  basic: {
168
207
  description: "Basic Infomation",
169
208
  title: "基本信息",
@@ -206,1005 +245,299 @@ const ae = /* @__PURE__ */ new Map([
206
245
  }
207
246
  }
208
247
  }
209
- }, Ce = {
210
- title: me,
211
- description: he,
212
- type: ge,
213
- categories: je
248
+ }, pe = {
249
+ title: ce,
250
+ description: ie,
251
+ type: se,
252
+ categories: le
214
253
  };
215
- function Ae(n, e, t) {
254
+ function ue(r, e, t) {
216
255
  return e;
217
256
  }
218
- const L = {
257
+ const P = {
219
258
  customClass: { type: String, default: "" },
220
259
  customStyle: { type: String, default: "" }
221
- }, q = ce(L, be, ae, Ae, Ce), $ = /* @__PURE__ */ W({
260
+ }, B = Z(P, ae, K, ue, pe), w = /* @__PURE__ */ j({
222
261
  name: "FContentContainer",
223
- props: L,
262
+ props: P,
224
263
  emits: [],
225
- setup(n, e) {
226
- return () => _("div", {
227
- class: n.customClass,
228
- style: n.customStyle
264
+ setup(r, e) {
265
+ return () => N("div", {
266
+ class: r.customClass,
267
+ style: r.customStyle
229
268
  }, [e.slots.default && e.slots.default()]);
230
269
  }
231
270
  });
232
- function ve() {
233
- function n(e) {
234
- var c, h;
271
+ function fe() {
272
+ function r(e, t) {
273
+ var o;
235
274
  if (!e)
236
275
  return !1;
237
- const t = ((c = e.targetContainer) == null ? void 0 : c.componentInstance) && e.targetContainer.componentInstance.value;
238
- if (!t)
276
+ const a = ((o = e.targetContainer) == null ? void 0 : o.componentInstance) && e.targetContainer.componentInstance.value;
277
+ if (!a)
239
278
  return !1;
240
- const r = (h = t.schema.appearance) == null ? void 0 : h.class;
241
- if (e.controlCategory === "input" || e.controlType === "form-group") {
242
- const m = t.schema.type, y = (m === "response-form" || m === "content-container") && r && r.includes("farris-form");
243
- if (t.schema.type !== "response-layout-item" && !y)
244
- return !1;
245
- }
246
- return e.controlType !== "field-set";
279
+ const n = a.schema.type, c = t == null ? void 0 : t.formSchemaUtils.getComponentById(a.belongedComponentId);
280
+ return !((e.controlCategory === "input" || e.controlType === "form-group") && ![g["response-layout-item"].type, g["response-form"].type].includes(n) || (e.controlType === g.tabs.type || e.controlType === g.section.type) && ((c == null ? void 0 : c.componentType) !== "frame" || ![g["content-container"].type, g["splitter-pane"].type, g["response-layout-item"].type].includes(n)));
247
281
  }
248
282
  return {
249
- basalDragulaRuleForContainer: n
283
+ basalDragulaRuleForContainer: r
250
284
  };
251
285
  }
252
- const Pe = "https://json-schema.org/draft/2020-12/schema", Te = "https://farris-design.gitee.io/dragging-rules.schema.json", we = "Dragging Rules", De = "The rules of designer canvas", Oe = "object", Me = {
253
- "f-page": {
254
- description: "The root class of page designed by farris.",
255
- type: "object",
256
- properties: {
257
- contents: {
258
- type: "object",
259
- properties: {
260
- "f-page-header": {
261
- description: "The class of page header designed by farris.",
262
- type: "string"
263
- },
264
- "f-page-main": {
265
- description: "The class of page body designed by farris.",
266
- type: "object",
267
- properties: {
268
- contents: {
269
- type: "object",
270
- properties: {
271
- "f-struct-like-card": {
272
- description: "",
273
- type: "object",
274
- properties: {
275
- contents: {
276
- type: "object",
277
- properties: {
278
- "f-struct-form": {
279
- description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
280
- type: "object",
281
- properties: {
282
- contents: {
283
- type: "object",
284
- properties: {
285
- "f-section-form": {
286
- description: "The class of section which has wrapped a reponse-form component.",
287
- type: "object",
288
- properties: {
289
- contents: {
290
- type: "object",
291
- properties: {
292
- "f-form-layout": {
293
- description: "The class of reponse form",
294
- type: "object",
295
- properties: {
296
- rules: {
297
- type: "object",
298
- properties: {
299
- canAccept: {
300
- type: "boolean",
301
- const: !0
302
- },
303
- fixed: {
304
- type: "boolean",
305
- const: !0
306
- },
307
- hidePadding: {
308
- type: "boolean",
309
- const: !1
310
- }
311
- }
312
- }
313
- }
314
- }
315
- }
316
- },
317
- rules: {
318
- type: "object",
319
- properties: {
320
- canAccept: {
321
- type: "boolean",
322
- const: !1
323
- },
324
- fixed: {
325
- type: "boolean",
326
- const: !0
327
- },
328
- hidePadding: {
329
- type: "boolean",
330
- const: !0
331
- }
332
- }
333
- }
334
- }
335
- }
336
- }
337
- },
338
- rules: {
339
- type: "object",
340
- properties: {
341
- canAccept: {
342
- type: "boolean",
343
- const: !1
344
- },
345
- fixed: {
346
- type: "boolean",
347
- const: !1
348
- },
349
- hidePadding: {
350
- type: "boolean",
351
- const: !0
352
- }
353
- }
354
- }
355
- }
356
- },
357
- "f-struct-wrapper": {
358
- description: "",
359
- type: "object",
360
- properties: {
361
- contents: {
362
- type: "object",
363
- properties: {
364
- "f-section-tabs": {
365
- description: "The class of section which has wrapped sub-grid tabs.",
366
- type: "object",
367
- properties: {
368
- contents: {
369
- type: "object",
370
- properties: {
371
- "f-tabs-in-card": {
372
- description: "The class of tabs which contains sub-grid.",
373
- type: "object",
374
- properties: {
375
- contents: {
376
- type: "object",
377
- properties: {
378
- "f-struct-data-grid-in-card": {
379
- description: "The class of sub-grid component",
380
- type: "object",
381
- properties: {
382
- contents: {
383
- type: "object",
384
- properties: {
385
- "f-grid-is-sub": {
386
- description: "The class of sub-grid",
387
- type: "object",
388
- properties: {
389
- rules: {
390
- type: "object",
391
- properties: {
392
- canAccept: {
393
- type: "boolean",
394
- const: !0
395
- },
396
- fixed: {
397
- type: "boolean",
398
- const: !0
399
- },
400
- hidePadding: {
401
- type: "boolean",
402
- const: !1
403
- }
404
- }
405
- }
406
- }
407
- }
408
- }
409
- },
410
- rules: {
411
- type: "object",
412
- properties: {
413
- canAccept: {
414
- type: "boolean",
415
- const: !1
416
- },
417
- fixed: {
418
- type: "boolean",
419
- const: !1
420
- },
421
- hidePadding: {
422
- type: "boolean",
423
- const: !0
424
- }
425
- }
426
- }
427
- }
428
- }
429
- }
430
- },
431
- rules: {
432
- type: "object",
433
- properties: {
434
- canAccept: {
435
- type: "boolean",
436
- const: !1
437
- },
438
- fixed: {
439
- type: "boolean",
440
- const: !0
441
- },
442
- hidePadding: {
443
- type: "boolean",
444
- const: !0
445
- }
446
- }
447
- }
448
- }
449
- }
450
- }
451
- },
452
- rules: {
453
- type: "object",
454
- properties: {
455
- canAccept: {
456
- type: "boolean",
457
- const: !1
458
- },
459
- fixed: {
460
- type: "boolean",
461
- const: !0
462
- },
463
- hidePadding: {
464
- type: "boolean",
465
- const: !0
466
- }
467
- }
468
- }
469
- }
470
- },
471
- "f-section-in-main": {
472
- description: "The class of section which has wrapped a reponse-form component.",
473
- type: "object",
474
- properties: {
475
- rules: {
476
- type: "object",
477
- properties: {
478
- canAccept: {
479
- type: "boolean",
480
- const: !0
481
- },
482
- fixed: {
483
- type: "boolean",
484
- const: !0
485
- },
486
- hidePadding: {
487
- type: "boolean",
488
- const: !1
489
- }
490
- }
491
- }
492
- }
493
- }
494
- }
495
- },
496
- rules: {
497
- type: "object",
498
- properties: {
499
- canAccept: {
500
- type: "boolean",
501
- const: !1
502
- },
503
- fixed: {
504
- type: "boolean",
505
- const: !1
506
- },
507
- hidePadding: {
508
- type: "boolean",
509
- const: !0
510
- }
511
- }
512
- }
513
- }
514
- }
515
- }
516
- },
517
- rules: {
518
- type: "object",
519
- properties: {
520
- canAccept: {
521
- type: "boolean",
522
- const: !0
523
- },
524
- fixed: {
525
- type: "boolean",
526
- const: !0
527
- },
528
- hidePadding: {
529
- type: "object",
530
- const: {
531
- allOf: [
532
- {
533
- sibling: 0,
534
- parent: {
535
- "f-page-main": !0
536
- }
537
- }
538
- ]
539
- }
540
- }
541
- }
542
- }
543
- }
544
- },
545
- "f-struct-data-grid": {
546
- description: "",
547
- type: "object",
548
- properties: {
549
- rules: {
550
- type: "object",
551
- properties: {
552
- canAccept: {
553
- type: "object",
554
- const: !0
555
- },
556
- fixed: {
557
- type: "boolean",
558
- const: !0
559
- },
560
- hidePadding: {
561
- type: "boolean",
562
- const: !0
563
- }
564
- }
565
- }
566
- }
567
- },
568
- "f-page-main-content": {
569
- description: "",
570
- type: "object",
571
- properties: {
572
- contents: {
573
- type: "object",
574
- properties: {
575
- "f-page-content-nav": {
576
- description: "",
577
- type: "object",
578
- properties: {
579
- contents: {
580
- type: "object",
581
- properties: {
582
- "f-struct-data-grid-in-nav": {
583
- description: "",
584
- type: "object",
585
- properties: {
586
- contents: {
587
- type: "object",
588
- properties: {
589
- "f-page-content-nav-extend": {
590
- description: "",
591
- type: "object"
592
- },
593
- "f-section-in-nav": {
594
- description: "",
595
- type: "object",
596
- properties: {
597
- rules: {
598
- type: "object",
599
- properties: {
600
- canAccept: {
601
- type: "boolean",
602
- const: !1
603
- },
604
- fixed: {
605
- type: "boolean",
606
- const: !0
607
- },
608
- hidePadding: {
609
- type: "boolean",
610
- const: !1
611
- }
612
- }
613
- }
614
- }
615
- }
616
- }
617
- },
618
- rules: {
619
- type: "object",
620
- properties: {
621
- canAccept: {
622
- type: "boolean",
623
- const: !0
624
- },
625
- fixed: {
626
- type: "boolean",
627
- const: !1
628
- },
629
- hidePadding: {
630
- type: "boolean",
631
- const: !0
632
- }
633
- }
634
- }
635
- }
636
- }
637
- }
638
- }
639
- }
640
- },
641
- "f-page-content-main": {
642
- description: "",
643
- type: "object",
644
- properties: {}
645
- }
646
- }
647
- }
648
- }
649
- },
650
- "f-page-content": {
651
- description: "",
652
- type: "object",
653
- properties: {
654
- contents: {
655
- type: "object",
656
- properties: {
657
- "f-page-content-nav": {
658
- description: "",
659
- type: "object",
660
- properties: {
661
- contents: {
662
- type: "object",
663
- properties: {
664
- "f-list-nav": {
665
- description: "",
666
- type: "object"
667
- },
668
- "f-list-nav-left": {
669
- description: "",
670
- type: "object"
671
- },
672
- "f-struct-data-grid-in-nav": {
673
- description: "",
674
- type: "object",
675
- properties: {
676
- contents: {
677
- type: "object",
678
- properties: {
679
- "f-section-form": {
680
- description: "",
681
- type: "object",
682
- properties: {
683
- rules: {
684
- type: "object",
685
- properties: {
686
- canAccept: {
687
- type: "boolean",
688
- const: !1
689
- },
690
- fixed: {
691
- type: "boolean",
692
- const: !0
693
- },
694
- hidePadding: {
695
- type: "boolean",
696
- const: !0
697
- }
698
- }
699
- }
700
- }
701
- },
702
- "f-section-grid": {
703
- description: "",
704
- type: "object",
705
- properties: {
706
- rules: {
707
- type: "object",
708
- properties: {
709
- canAccept: {
710
- type: "boolean",
711
- const: !1
712
- },
713
- fixed: {
714
- type: "boolean",
715
- const: !0
716
- },
717
- hidePadding: {
718
- type: "boolean",
719
- const: !0
720
- }
721
- }
722
- }
723
- }
724
- }
725
- }
726
- },
727
- rules: {
728
- type: "object",
729
- properties: {
730
- canAccept: {
731
- type: "boolean",
732
- const: !1
733
- },
734
- fixed: {
735
- type: "boolean",
736
- const: !0
737
- },
738
- hidePadding: {
739
- type: "boolean",
740
- const: !0
741
- }
742
- }
743
- }
744
- }
745
- }
746
- }
747
- }
748
- },
749
- rules: {
750
- type: "object",
751
- properties: {
752
- canAccept: {
753
- type: "boolean",
754
- const: !1
755
- },
756
- fixed: {
757
- type: "boolean",
758
- const: !0
759
- },
760
- hidePadding: {
761
- type: "boolean",
762
- const: !0
763
- }
764
- }
765
- }
766
- },
767
- "f-page-content-main": {
768
- description: "",
769
- type: "object",
770
- properties: {
771
- rules: {
772
- type: "object",
773
- properties: {
774
- canAccept: {
775
- type: "boolean",
776
- const: !1
777
- },
778
- fixed: {
779
- type: "boolean",
780
- const: !1
781
- },
782
- hidePadding: {
783
- type: "boolean",
784
- const: !0
785
- }
786
- }
787
- }
788
- }
789
- }
790
- }
791
- },
792
- rules: {
793
- type: "object",
794
- properties: {
795
- canAccept: {
796
- type: "boolean",
797
- const: !1
798
- },
799
- fixed: {
800
- type: "boolean",
801
- const: !0
802
- },
803
- hidePadding: {
804
- type: "boolean",
805
- const: !0
806
- }
807
- }
808
- }
809
- }
810
- }
811
- }
812
- },
813
- rules: {
814
- type: "object",
815
- properties: {
816
- canAccept: {
817
- type: "object",
818
- const: {
819
- anyOf: [
820
- {
821
- children: 0
822
- },
823
- {
824
- children: {
825
- length: {
826
- not: 1
827
- },
828
- "f-struct-like-card": !0
829
- }
830
- },
831
- {
832
- children: {
833
- "scroll-spy": !1,
834
- "f-page-content": !1,
835
- "f-struct-like-card": !1
836
- }
837
- }
838
- ]
839
- }
840
- },
841
- fixed: {
842
- type: "boolean",
843
- const: !0
844
- },
845
- hidePadding: {
846
- type: "boolean",
847
- const: !0
848
- }
849
- }
850
- }
851
- }
852
- },
853
- "f-page-footer": {
854
- description: "The class of page footer designed by farris.",
855
- type: "string"
286
+ class me {
287
+ getTemplateRule(e, t) {
288
+ const a = t == null ? void 0 : t.formSchemaUtils, n = a == null ? void 0 : a.getFormTemplateRule(), c = { canAccept: !0, canDelete: !0, canMove: !0 };
289
+ if (!n)
290
+ return c;
291
+ const o = this.getComponentContext(e);
292
+ return o.componentClassList.forEach((y) => {
293
+ if (!y || !n[y])
294
+ return;
295
+ const { canMove: i, canDelete: s, canAccept: l } = n[y];
296
+ c.canMove = c.canMove && this.resolveRuleValue(i, o), c.canDelete = c.canDelete && this.resolveRuleValue(s, o), c.canAccept = c.canAccept && this.resolveRuleValue(l, o);
297
+ }), c;
298
+ }
299
+ resolveRuleValue(e, t) {
300
+ return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, t);
301
+ }
302
+ parseRuleValueSchema(e, t) {
303
+ const a = e.invalidContext || [];
304
+ let n = !0;
305
+ for (const c of a) {
306
+ if (c.firstLevelChild) {
307
+ if (c.firstLevelChild.class) {
308
+ const o = t.firstLevelChildClassList;
309
+ if (o && !o.includes(c.firstLevelChild.class)) {
310
+ n = !1;
311
+ continue;
856
312
  }
857
313
  }
858
- },
859
- rules: {
860
- type: "object",
861
- properties: {
862
- canAccept: {
863
- type: "boolean",
864
- const: !1
865
- },
866
- fixed: {
867
- type: "boolean",
868
- const: !0
869
- },
870
- hidePadding: {
871
- type: "boolean",
872
- const: !0
314
+ if (c.firstLevelChild.type) {
315
+ const o = t.firstLevelChildSchema;
316
+ if (o && o.type !== c.firstLevelChild.type) {
317
+ n = !1;
318
+ continue;
873
319
  }
874
320
  }
875
321
  }
322
+ if (c.secondLevelChild) {
323
+ if (c.secondLevelChild.class) {
324
+ const o = t.secondLevelChildClassList;
325
+ if (o && !o.includes(c.secondLevelChild.class)) {
326
+ n = !1;
327
+ continue;
328
+ }
329
+ }
330
+ if (c.secondLevelChild.type) {
331
+ const o = t.secondLevelChildSchema;
332
+ if (o && o.type !== c.secondLevelChild.type) {
333
+ n = !1;
334
+ continue;
335
+ }
336
+ }
337
+ }
338
+ if (c.parent) {
339
+ if (c.parent.class) {
340
+ const o = t.parentClassList;
341
+ if (o && !o.includes(c.parent.class)) {
342
+ n = !1;
343
+ continue;
344
+ }
345
+ }
346
+ if (c.parent.type) {
347
+ const o = t.parentSchema;
348
+ if (o && o.type !== c.parent.type) {
349
+ n = !1;
350
+ continue;
351
+ }
352
+ }
353
+ }
354
+ n = !0;
355
+ break;
876
356
  }
877
- },
878
- "f-page-is-managelist": {
879
- description: "The root class of mangement list page.",
880
- type: "string"
881
- },
882
- "f-page-card": {
883
- description: "",
884
- type: "object"
885
- },
886
- "f-page-is-mainsubcard": {
887
- description: "",
888
- type: "object"
889
- }
890
- }, Ee = {
891
- $schema: Pe,
892
- $id: Te,
893
- title: we,
894
- description: De,
895
- type: Oe,
896
- properties: Me
897
- }, F = /* @__PURE__ */ new Map();
898
- function Ne() {
899
- function n(o, l, s, u) {
900
- var A;
901
- if (typeof s == "number")
902
- return ((A = u[o]) == null ? void 0 : A.length) === s;
903
- if (typeof s == "object") {
904
- const a = Object.keys(s)[0], j = s[a];
905
- if (a === "not")
906
- return Number(u[o].length) !== Number(j);
907
- if (a === "moreThan")
908
- return Number(u[o].length) >= Number(j);
909
- if (a === "lessThan")
910
- return Number(u[o].length) <= Number(j);
911
- }
912
- return !1;
913
- }
914
- function e(o, l, s, u) {
915
- return typeof s == "boolean" ? u.childrenClassList.includes(l) === !!s : !1;
916
- }
917
- function t(o, l, s, u) {
918
- return typeof s == "boolean" ? u.parentClassList.includes(l) === !!s : !1;
919
- }
920
- function r(o, l, s, u) {
921
- return typeof s == "boolean" ? u.parentClassList.includes(l) === !!s : !1;
922
- }
923
- const c = /* @__PURE__ */ new Map([
924
- ["length", n],
925
- ["hasChildren", e],
926
- ["hasSibling", r],
927
- ["hasParent", t]
928
- ]);
929
- function h(o, l) {
930
- const s = o;
931
- return typeof l == "number" ? [{ target: s, operator: "length", param: null, value: Number(l) }] : typeof l == "object" ? Object.keys(l).map((u) => {
932
- if (u === "length")
933
- return { target: s, operator: "length", param: null, value: l[u] };
934
- const A = u, a = l[u];
935
- return { target: s, operator: o === "children" ? "hasChildren" : o === "parent" ? "hasParent" : "hasSibling", param: A, value: a };
936
- }) : [];
937
- }
938
- function m(o, l) {
939
- if (c.has(o.operator)) {
940
- const s = c.get(o.operator);
941
- return s && s(o.target, o.param, o.value, l) || !1;
942
- }
943
- return !1;
944
- }
945
- function y(o, l) {
946
- return Object.keys(o).reduce((a, j) => {
947
- const w = h(j, o[j]);
948
- return a.push(...w), a;
949
- }, []).reduce((a, j) => a && m(j, l), !0);
950
- }
951
- function T(o, l) {
952
- const s = Object.keys(o), u = s.includes("allOf"), A = s.includes("anyOf"), a = u || A, i = (a ? o[a ? u ? "allOf" : "anyOf" : "allOf"] : [o]).map((g) => y(g, l));
953
- return u ? !i.includes(!1) : i.includes(!0);
954
- }
955
- function p(o, l) {
956
- const s = o.const;
957
- return s ? typeof s == "boolean" ? s : typeof s == "object" ? T(s, l) : !1 : !1;
958
- }
959
- function d(o) {
960
- return (l) => {
961
- const s = { canAccept: !0, fixed: !1, hidePadding: !1 };
962
- return o && o.properties && Object.keys(o.properties).reduce((u, A) => {
963
- const a = o.properties[A];
964
- return u[A] = p(a, l), u;
965
- }, s), s;
357
+ return !n;
358
+ }
359
+ getComponentContext(e) {
360
+ var D, T, b, L;
361
+ const t = e.schema, a = t.appearance && t.appearance.class || "", n = a.split(" ") || [], c = t.contents || [], o = c.length ? c[0] : null, u = o && o.appearance ? o.appearance.class : "", y = u ? u.split(" ") : [], i = (D = o == null ? void 0 : o.contents) != null && D.length ? o == null ? void 0 : o.contents[0] : null, s = i && i.appearance ? i.appearance.class : "", l = s ? s.split(" ") : [], p = t.type === "component" ? (b = (T = e.parent) == null ? void 0 : T.parent) == null ? void 0 : b.schema : (L = e.parent) == null ? void 0 : L.schema, f = p && p.appearance && p.appearance.class || "", h = f ? f.split(" ") : [];
362
+ return {
363
+ componentClass: a,
364
+ componentClassList: n,
365
+ childContents: c,
366
+ firstLevelChildSchema: o,
367
+ firstLevelChildClass: u,
368
+ firstLevelChildClassList: y,
369
+ secondLevelChildSchema: i,
370
+ secondLevelChildClass: s,
371
+ secondLevelChildClassList: l,
372
+ parentSchema: p,
373
+ parentClass: f,
374
+ parentClassList: h
966
375
  };
967
376
  }
968
- function f(o, l, s) {
969
- if (l.type === "object" && l.properties) {
970
- const { rules: u, contents: A } = l.properties;
971
- s.set(o, d(u)), A && Object.keys(A.properties).forEach(
972
- (a) => f(a, A.properties[a], s)
973
- );
974
- }
975
- }
976
- function b() {
977
- const { properties: o } = Ee;
978
- Object.keys(o).forEach((l) => {
979
- f(l, o[l], F);
980
- });
981
- }
982
- function v(o, l) {
983
- const s = { canAccept: !0, fixed: !1, hidePadding: !0 };
984
- return F.has(o) ? F.get(o)(l) : s;
985
- }
986
- return b(), { getRuleValue: v };
987
377
  }
988
- function Se(n, e) {
989
- const t = Ne(), r = M(!1), c = M(!1);
990
- let h = !0, m = !1, y, T = !1;
991
- function p(a) {
992
- return y && y.componentClassList && y.componentClassList.includes("f-form-layout") && y.componentClassList.includes("farris-form") ? a.sourceType === "control" && a.controlCategory === "input" || a.sourceType === "move" && a.controlType === "form-group" : !0;
993
- }
994
- function d(a) {
995
- return !(!ve().basalDragulaRuleForContainer(a) || !h || !p(a));
996
- }
997
- function f() {
998
- r.value = !1, c.value = !1;
999
- const a = n, j = a.appearance && a.appearance.class || "", w = j.split(" "), i = a.contents || [], C = i.length ? i[0] : null, g = C && C.appearance ? C.appearance.class : "", P = g ? g.split(" ") : [], O = i.length ? i.reduce((V, S) => {
1000
- const B = S && S.appearance ? S.appearance.class : "", X = B ? B.split(" ") : [];
1001
- return V.push(...X), V;
1002
- }, []) : [], D = e, E = D && D.appearance && D.appearance.class || "", J = E ? E.split(" ") : [];
1003
- y = {
1004
- componentClass: j,
1005
- componentClassList: w,
1006
- childContents: i,
1007
- firstChildContent: C,
1008
- firstChildClass: g,
1009
- firstChildClassList: P,
1010
- parent: D,
1011
- parentClass: E,
1012
- parentClassList: J,
1013
- children: i,
1014
- childrenClassList: O
1015
- };
1016
- const { canAccept: H, fixed: Q, hidePadding: U } = t.getRuleValue(w[0], y);
1017
- return h = H, m = U, T = Q, !0;
378
+ function ye(r, e) {
379
+ const t = r.schema, a = new me(), { canMove: n, canAccept: c, canDelete: o } = a.getTemplateRule(r, e);
380
+ function u(f) {
381
+ return fe().basalDragulaRuleForContainer(f, e) ? c : !1;
1018
382
  }
1019
- function b(a) {
1020
- Y();
383
+ function y(f) {
384
+ G();
1021
385
  }
1022
- function v() {
1023
- return n.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
1024
- }
1025
- function o(a, j) {
1026
- const w = n;
1027
- if ((w.appearance && w.appearance.class || "").split(" ").includes("f-form-layout")) {
1028
- const { label: g } = a, P = N("form-group");
1029
- return P.editor = j, P.label = g, P;
1030
- }
1031
- return j;
1032
- }
1033
- function l(a, j, w) {
1034
- const i = n;
1035
- if ((i.appearance && i.appearance.class || "").split(" ").includes("f-form-layout")) {
1036
- const P = String(a.innerText), O = N("form-group");
1037
- return O.editor = w, O.label = P, O;
1038
- }
1039
- return w;
386
+ function i() {
387
+ return t.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
1040
388
  }
1041
389
  function s() {
1042
- return !T;
390
+ return n;
1043
391
  }
1044
- function u() {
1045
- return !T;
392
+ function l() {
393
+ return o;
1046
394
  }
1047
- function A() {
1048
- return m;
395
+ function p() {
396
+ return !n && !o;
1049
397
  }
1050
398
  return {
1051
- canAccepts: d,
1052
- resolveComponentContext: f,
1053
- getStyles: v,
1054
- onAcceptNewChildElement: l,
1055
- onAcceptMovedChildElement: b,
1056
- onResolveNewComponentSchema: o,
1057
- triggerBelongedComponentToMoveWhenMoved: r,
1058
- triggerBelongedComponentToDeleteWhenDeleted: c,
399
+ canAccepts: u,
400
+ getStyles: i,
401
+ onAcceptMovedChildElement: y,
1059
402
  checkCanMoveComponent: s,
1060
- checkCanDeleteComponent: u,
1061
- hideNestedPaddingInDesginerView: A
403
+ checkCanDeleteComponent: l,
404
+ hideNestedPaddingInDesginerView: p
1062
405
  };
1063
406
  }
1064
- function $e(n, e, t) {
1065
- var w;
1066
- function r() {
407
+ function he(r, e, t) {
408
+ var F;
409
+ function a() {
1067
410
  t != null && t.resolveComponentContext && t.resolveComponentContext();
1068
411
  }
1069
- r();
1070
- const c = t && t.getStyles && t.getStyles() || "", h = t && t.getDesignerClass && t.getDesignerClass() || "", m = M();
1071
- function y() {
412
+ a();
413
+ const n = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "", o = M();
414
+ function u() {
1072
415
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
1073
416
  }
1074
- function T() {
417
+ function y() {
1075
418
  return !1;
1076
419
  }
1077
- function p() {
420
+ function i() {
1078
421
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
1079
422
  }
1080
- function d() {
423
+ function s() {
1081
424
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
1082
425
  }
1083
- function f(i) {
1084
- if (!i || !i.value)
426
+ function l(m) {
427
+ if (!m || !m.value)
1085
428
  return null;
1086
- if (i.value.schema && i.value.schema.type === "component")
1087
- return i.value;
1088
- const C = M(i == null ? void 0 : i.value.parent), g = f(C);
1089
- return g || null;
429
+ if (m.value.schema && m.value.schema.type === "component")
430
+ return m.value;
431
+ const d = M(m == null ? void 0 : m.value.parent), C = l(d);
432
+ return C || null;
1090
433
  }
1091
- function b(i = e) {
1092
- const { componentInstance: C, designerItemElementRef: g } = i;
1093
- return !C || !C.value ? null : C.value.canMove ? g : b(i.parent);
434
+ function p(m = e) {
435
+ const { componentInstance: d, designerItemElementRef: C } = m;
436
+ return !d || !d.value ? null : d.value.canMove ? C : p(m.parent);
1094
437
  }
1095
- function v(i) {
1096
- return !!t && t.canAccepts(i);
438
+ function f(m) {
439
+ return !!t && t.canAccepts(m);
1097
440
  }
1098
- function o() {
441
+ function h() {
1099
442
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
1100
443
  }
1101
- function l() {
1102
- }
1103
- function s(i, C) {
1104
- C && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(C);
444
+ function D() {
1105
445
  }
1106
- function u(i, C) {
1107
- const { componentType: g } = i;
1108
- let P = N(g, i, C);
1109
- t && t.onResolveNewComponentSchema && (P = t.onResolveNewComponentSchema(i, P));
1110
- const O = g.toLowerCase().replace("-", "_");
1111
- return P && !P.id && P.type === g && (P.id = `${O}_${Math.random().toString().slice(2, 6)}`), P;
446
+ function T(m, d) {
447
+ d && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(d);
1112
448
  }
1113
- function A(i, C) {
1114
- const g = String(i.getAttribute("data-controltype")), P = i.getAttribute("data-feature"), O = P ? JSON.parse(P) : {};
1115
- O.parentComponentInstance = m.value;
1116
- let D = N(g, O);
1117
- t && t.onAcceptNewChildElement && (D = t.onAcceptNewChildElement(i, C, D));
1118
- const E = g.toLowerCase().replace("-", "_");
1119
- return D && !D.id && D.type === g && (D.id = `${E}_${Math.random().toString().slice(2, 6)}`), D;
449
+ function b(m, d) {
450
+ const { componentType: C } = m;
451
+ let v = $(C, m, d);
452
+ t && t.onResolveNewComponentSchema && (v = t.onResolveNewComponentSchema(m, v));
453
+ const q = C.toLowerCase().replace("-", "_");
454
+ return v && !v.id && v.type === C && (v.id = `${q}_${Math.random().toString().slice(2, 6)}`), v;
1120
455
  }
1121
- function a(i) {
456
+ function L(m) {
1122
457
  }
1123
- function j(...i) {
458
+ function k(...m) {
1124
459
  if (t && t.getPropsConfig)
1125
- return t.getPropsConfig(...i);
460
+ return t.getPropsConfig(...m);
1126
461
  }
1127
- return m.value = {
1128
- canMove: y(),
1129
- canSelectParent: T(),
1130
- canDelete: p(),
1131
- canNested: !d(),
462
+ return o.value = {
463
+ canMove: u(),
464
+ canSelectParent: y(),
465
+ canDelete: i(),
466
+ canNested: !s(),
1132
467
  contents: e == null ? void 0 : e.schema.contents,
1133
- elementRef: n,
1134
- parent: (w = e == null ? void 0 : e.parent) == null ? void 0 : w.componentInstance,
468
+ elementRef: r,
469
+ parent: (F = e == null ? void 0 : e.parent) == null ? void 0 : F.componentInstance,
1135
470
  schema: e == null ? void 0 : e.schema,
1136
- styles: c,
1137
- designerClass: h,
1138
- canAccepts: v,
1139
- getBelongedComponentInstance: f,
1140
- getDraggableDesignItemElement: b,
1141
- getDraggingDisplayText: o,
1142
- getPropConfig: j,
1143
- getDragScopeElement: l,
1144
- onAcceptMovedChildElement: s,
1145
- onAcceptNewChildElement: A,
1146
- onChildElementMovedOut: a,
1147
- addNewChildComponentSchema: u,
1148
- updateDragAndDropRules: r,
471
+ styles: n,
472
+ designerClass: c,
473
+ canAccepts: f,
474
+ getBelongedComponentInstance: l,
475
+ getDraggableDesignItemElement: p,
476
+ getDraggingDisplayText: h,
477
+ getPropConfig: k,
478
+ getDragScopeElement: D,
479
+ onAcceptMovedChildElement: T,
480
+ onChildElementMovedOut: L,
481
+ addNewChildComponentSchema: b,
482
+ updateDragAndDropRules: a,
1149
483
  triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || M(!1),
1150
484
  triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || M(!1)
1151
- }, m;
485
+ }, o;
1152
486
  }
1153
- const Fe = ["moz", "ms", "webkit"];
1154
- function ke() {
1155
- let n = 0;
487
+ const de = ["moz", "ms", "webkit"];
488
+ function Ce() {
489
+ let r = 0;
1156
490
  return (e) => {
1157
- const t = (/* @__PURE__ */ new Date()).getTime(), r = Math.max(0, 16 - (t - n)), c = setTimeout(() => {
1158
- e(t + r);
1159
- }, r);
1160
- return n = t + r, c;
491
+ const t = (/* @__PURE__ */ new Date()).getTime(), a = Math.max(0, 16 - (t - r)), n = setTimeout(() => {
492
+ e(t + a);
493
+ }, a);
494
+ return r = t + a, n;
1161
495
  };
1162
496
  }
1163
- function Le() {
497
+ function be() {
1164
498
  if (typeof window > "u")
1165
499
  return () => 0;
1166
500
  if (window.requestAnimationFrame)
1167
501
  return window.requestAnimationFrame.bind(window);
1168
- const n = Fe.filter((e) => `${e}RequestAnimationFrame` in window)[0];
1169
- return n ? window[`${n}RequestAnimationFrame`] : ke();
502
+ const r = de.filter((e) => `${e}RequestAnimationFrame` in window)[0];
503
+ return r ? window[`${r}RequestAnimationFrame`] : Ce();
1170
504
  }
1171
- Le();
1172
- function Ve(n, e) {
1173
- return ((e == null ? void 0 : e.split(" ")) || []).reduce((r, c) => (c && (r[c] = !0), r), n), n;
505
+ be();
506
+ function ve(r, e) {
507
+ return ((e == null ? void 0 : e.split(" ")) || []).reduce((a, n) => (n && (a[n] = !0), a), r), r;
1174
508
  }
1175
- const Be = /* @__PURE__ */ W({
509
+ const ge = /* @__PURE__ */ j({
1176
510
  name: "FContentContainerDesign",
1177
- props: L,
511
+ props: P,
1178
512
  emits: [],
1179
- setup(n, e) {
1180
- var y;
1181
- const t = M(), r = Z("design-item-context"), c = Se(r.schema, (y = r.parent) == null ? void 0 : y.schema), h = $e(t, r, c), m = R(() => Ve({
513
+ setup(r, e) {
514
+ const t = M(), a = S("designer-host-service"), n = S("design-item-context"), c = ye(n, a), o = he(t, n, c), u = R(() => ve({
1182
515
  "drag-container": !0
1183
- }, n == null ? void 0 : n.customClass));
1184
- return x(() => {
1185
- t.value.componentInstance = h;
1186
- }), e.expose(h.value), () => _("div", {
516
+ }, r == null ? void 0 : r.customClass));
517
+ return W(() => {
518
+ t.value.componentInstance = o;
519
+ }), e.expose(o.value), () => N("div", {
1187
520
  ref: t,
1188
- class: m.value,
1189
- style: n.customStyle,
1190
- "data-dragref": `${r.schema.id}-container`
521
+ class: u.value,
522
+ style: r.customStyle,
523
+ "data-dragref": `${n.schema.id}-container`
1191
524
  }, [e.slots.default && e.slots.default()]);
1192
525
  }
1193
- }), ze = {
1194
- install(n) {
1195
- n.component($.name, $);
526
+ }), Me = {
527
+ install(r) {
528
+ r.component(w.name, w);
1196
529
  },
1197
- register(n, e, t, r) {
1198
- n["content-container"] = $, e["content-container"] = q;
530
+ register(r, e, t, a) {
531
+ r["content-container"] = w, e["content-container"] = B;
1199
532
  },
1200
- registerDesigner(n, e, t) {
1201
- n["content-container"] = Be, e["content-container"] = q;
533
+ registerDesigner(r, e, t) {
534
+ r["content-container"] = ge, e["content-container"] = B;
1202
535
  }
1203
536
  };
1204
537
  export {
1205
- $ as ContentContainer,
1206
- Be as ContentContainerDesign,
1207
- L as contentContainerProps,
1208
- ze as default,
1209
- q as propsResolver
538
+ w as ContentContainer,
539
+ ge as ContentContainerDesign,
540
+ P as contentContainerProps,
541
+ Me as default,
542
+ B as propsResolver
1210
543
  };