@farris/ui-vue 1.3.1 → 1.3.3

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 (259) hide show
  1. package/components/accordion/index.esm.js +103 -99
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +301 -351
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/binding-selector/index.esm.js +444 -0
  6. package/components/binding-selector/index.umd.cjs +1 -0
  7. package/components/binding-selector/package.json +8 -0
  8. package/components/border-editor/index.esm.js +5 -3
  9. package/components/border-editor/index.umd.cjs +1 -1
  10. package/components/button-edit/index.esm.js +143 -139
  11. package/components/button-edit/index.umd.cjs +1 -1
  12. package/components/calendar/index.esm.js +407 -396
  13. package/components/calendar/index.umd.cjs +1 -1
  14. package/components/capsule/index.esm.js +266 -255
  15. package/components/capsule/index.umd.cjs +1 -1
  16. package/components/checkbox/index.esm.js +628 -641
  17. package/components/checkbox/index.umd.cjs +1 -1
  18. package/components/color-picker/index.esm.js +379 -374
  19. package/components/color-picker/index.umd.cjs +2 -2
  20. package/components/combo-list/index.esm.js +471 -471
  21. package/components/combo-list/index.umd.cjs +1 -1
  22. package/components/combo-tree/index.esm.js +155 -148
  23. package/components/combo-tree/index.umd.cjs +1 -1
  24. package/components/common/index.esm.js +487 -478
  25. package/components/common/index.umd.cjs +1 -1
  26. package/components/component/index.esm.js +330 -279
  27. package/components/component/index.umd.cjs +1 -1
  28. package/components/condition/index.esm.js +1171 -1277
  29. package/components/condition/index.umd.cjs +1 -1
  30. package/components/content-container/index.esm.js +220 -204
  31. package/components/content-container/index.umd.cjs +1 -1
  32. package/components/data-grid/index.esm.js +4743 -4641
  33. package/components/data-grid/index.umd.cjs +1 -1
  34. package/components/data-view/index.esm.js +2916 -3019
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.esm.js +2375 -2590
  37. package/components/date-picker/index.umd.cjs +1 -1
  38. package/components/designer-canvas/index.css +1 -1
  39. package/components/designer-canvas/index.esm.js +9518 -1198
  40. package/components/designer-canvas/index.umd.cjs +1 -1
  41. package/components/designer-outline/index.esm.js +2 -1
  42. package/components/designer-outline/index.umd.cjs +1 -1
  43. package/components/drawer/index.esm.js +34 -38
  44. package/components/drawer/index.umd.cjs +1 -1
  45. package/components/dropdown/index.esm.js +149 -138
  46. package/components/dropdown/index.umd.cjs +2 -2
  47. package/components/dynamic-form/index.esm.js +1602 -1740
  48. package/components/dynamic-form/index.umd.cjs +1 -1
  49. package/components/dynamic-resolver/index.esm.js +159 -151
  50. package/components/dynamic-resolver/index.umd.cjs +1 -1
  51. package/components/dynamic-view/index.esm.js +218 -218
  52. package/components/dynamic-view/index.umd.cjs +1 -1
  53. package/components/event-parameter/index.esm.js +311 -0
  54. package/components/event-parameter/index.umd.cjs +1 -0
  55. package/components/event-parameter/package.json +8 -0
  56. package/components/events-editor/index.css +1 -1
  57. package/components/events-editor/index.esm.js +533 -563
  58. package/components/events-editor/index.umd.cjs +1 -1
  59. package/components/expression-editor/index.esm.js +95 -91
  60. package/components/expression-editor/index.umd.cjs +1 -1
  61. package/components/external-container/index.esm.js +2356 -2455
  62. package/components/external-container/index.umd.cjs +1 -1
  63. package/components/field-selector/index.esm.js +3048 -3308
  64. package/components/field-selector/index.umd.cjs +1 -1
  65. package/components/filter-bar/index.css +1 -1
  66. package/components/filter-bar/index.esm.js +10537 -3249
  67. package/components/filter-bar/index.umd.cjs +1 -1
  68. package/components/flow-canvas/index.css +1 -1
  69. package/components/flow-canvas/index.esm.js +9781 -1327
  70. package/components/flow-canvas/index.umd.cjs +1 -1
  71. package/components/image-cropper/index.esm.js +353 -341
  72. package/components/image-cropper/index.umd.cjs +1 -1
  73. package/components/input-group/index.esm.js +510 -827
  74. package/components/input-group/index.umd.cjs +1 -1
  75. package/components/layout/index.esm.js +278 -268
  76. package/components/layout/index.umd.cjs +1 -1
  77. package/components/list-nav/index.esm.js +144 -136
  78. package/components/list-nav/index.umd.cjs +1 -1
  79. package/components/list-view/index.esm.js +2139 -2237
  80. package/components/list-view/index.umd.cjs +1 -1
  81. package/components/lookup/index.esm.js +6414 -6367
  82. package/components/lookup/index.umd.cjs +1 -1
  83. package/components/mapping-editor/index.esm.js +5216 -5114
  84. package/components/mapping-editor/index.umd.cjs +1 -1
  85. package/components/message-box/index.esm.js +252 -252
  86. package/components/message-box/index.umd.cjs +1 -1
  87. package/components/modal/index.esm.js +70 -70
  88. package/components/modal/index.umd.cjs +1 -1
  89. package/components/nav/index.esm.js +486 -984
  90. package/components/nav/index.umd.cjs +3 -3
  91. package/components/number-range/index.esm.js +446 -498
  92. package/components/number-range/index.umd.cjs +1 -1
  93. package/components/number-spinner/index.esm.js +363 -388
  94. package/components/number-spinner/index.umd.cjs +1 -1
  95. package/components/order/index.esm.js +1050 -1308
  96. package/components/order/index.umd.cjs +1 -1
  97. package/components/page-footer/index.esm.js +134 -131
  98. package/components/page-footer/index.umd.cjs +1 -1
  99. package/components/page-header/index.esm.js +1072 -1082
  100. package/components/page-header/index.umd.cjs +1 -1
  101. package/components/pagination/index.esm.js +412 -910
  102. package/components/pagination/index.umd.cjs +1 -1
  103. package/components/progress/index.esm.js +214 -203
  104. package/components/progress/index.umd.cjs +3 -3
  105. package/components/property-editor/index.esm.js +1361 -1536
  106. package/components/property-editor/index.umd.cjs +2 -2
  107. package/components/property-panel/index.esm.js +650 -677
  108. package/components/property-panel/index.umd.cjs +1 -1
  109. package/components/query-solution/index.css +1 -1
  110. package/components/query-solution/index.esm.js +12344 -5048
  111. package/components/query-solution/index.umd.cjs +6 -1
  112. package/components/radio-button/index.esm.js +97 -97
  113. package/components/radio-button/index.umd.cjs +1 -1
  114. package/components/radio-group/index.css +1 -1
  115. package/components/radio-group/index.esm.js +1821 -565
  116. package/components/radio-group/index.umd.cjs +1 -1
  117. package/components/rate/index.esm.js +251 -244
  118. package/components/rate/index.umd.cjs +1 -1
  119. package/components/response-layout/index.esm.js +151 -140
  120. package/components/response-layout/index.umd.cjs +1 -1
  121. package/components/response-layout-editor/index.esm.js +707 -676
  122. package/components/response-layout-editor/index.umd.cjs +1 -1
  123. package/components/response-toolbar/index.esm.js +719 -740
  124. package/components/response-toolbar/index.umd.cjs +1 -1
  125. package/components/schema-selector/index.esm.js +4977 -5249
  126. package/components/schema-selector/index.umd.cjs +2 -2
  127. package/components/search-box/index.esm.js +145 -134
  128. package/components/search-box/index.umd.cjs +1 -1
  129. package/components/section/index.esm.js +348 -337
  130. package/components/section/index.umd.cjs +1 -1
  131. package/components/smoke-detector/index.esm.js +141 -130
  132. package/components/smoke-detector/index.umd.cjs +1 -1
  133. package/components/splitter/index.esm.js +311 -301
  134. package/components/splitter/index.umd.cjs +1 -1
  135. package/components/step/index.esm.js +231 -220
  136. package/components/step/index.umd.cjs +1 -1
  137. package/components/switch/index.esm.js +385 -432
  138. package/components/switch/index.umd.cjs +1 -1
  139. package/components/tabs/index.esm.js +1932 -1914
  140. package/components/tabs/index.umd.cjs +1 -1
  141. package/components/tags/index.esm.js +351 -340
  142. package/components/tags/index.umd.cjs +1 -1
  143. package/components/text/index.esm.js +209 -199
  144. package/components/text/index.umd.cjs +1 -1
  145. package/components/textarea/index.esm.js +388 -415
  146. package/components/textarea/index.umd.cjs +1 -1
  147. package/components/time-picker/index.esm.js +619 -666
  148. package/components/time-picker/index.umd.cjs +1 -1
  149. package/components/transfer/index.esm.js +493 -486
  150. package/components/transfer/index.umd.cjs +1 -1
  151. package/components/tree-grid/index.esm.js +3169 -3278
  152. package/components/tree-grid/index.umd.cjs +1 -1
  153. package/components/tree-view/index.esm.js +2320 -2418
  154. package/components/tree-view/index.umd.cjs +1 -1
  155. package/components/uploader/index.esm.js +563 -554
  156. package/components/uploader/index.umd.cjs +2 -2
  157. package/components/verify-detail/index.esm.js +287 -276
  158. package/components/verify-detail/index.umd.cjs +1 -1
  159. package/components/video/index.esm.js +368 -324
  160. package/components/video/index.umd.cjs +1 -1
  161. package/components/weather/index.esm.js +498 -487
  162. package/components/weather/index.umd.cjs +5 -5
  163. package/farris.all.esm.js +51302 -47651
  164. package/farris.all.umd.cjs +14 -9
  165. package/index.css +1 -1
  166. package/package.json +1 -1
  167. package/types/binding-selector/index.d.ts +55 -0
  168. package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
  169. package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
  170. package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
  171. package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
  172. package/types/combo-list/src/components/list-container.component.d.ts +6 -6
  173. package/types/combo-list/src/components/list-container.props.d.ts +1 -1
  174. package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
  175. package/types/common/entity/entity-schema.d.ts +26 -11
  176. package/types/common/index.d.ts +1 -0
  177. package/types/common/types.d.ts +2 -2
  178. package/types/condition/src/condition-fields.design.component.d.ts +18 -0
  179. package/types/condition/src/types.d.ts +6 -6
  180. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
  181. package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
  182. package/types/data-grid/src/data-grid.props.d.ts +2 -2
  183. package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
  184. package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
  185. package/types/data-view/composition/types.d.ts +2 -2
  186. package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
  187. package/types/date-picker/src/components/month/month.component.d.ts +3 -3
  188. package/types/date-picker/src/components/year/year.component.d.ts +3 -3
  189. package/types/designer-canvas/index.d.ts +2 -1
  190. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  191. package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
  192. package/types/designer-canvas/src/composition/types.d.ts +49 -40
  193. package/types/designer-canvas/src/types.d.ts +8 -20
  194. package/types/dynamic-form/index.d.ts +1 -1
  195. package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
  196. package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
  197. package/types/dynamic-form/src/types.d.ts +1 -1
  198. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +5 -0
  199. package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
  200. package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
  201. package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
  202. package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
  203. package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
  204. package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
  205. package/types/event-parameter/index.d.ts +31 -0
  206. package/types/event-parameter/src/composition/type.d.ts +77 -0
  207. package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
  208. package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
  209. package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
  210. package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
  211. package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
  212. package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
  213. package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
  214. package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
  215. package/types/field-selector/src/field-selector.component.d.ts +1 -2
  216. package/types/field-selector/src/field-selector.props.d.ts +0 -9
  217. package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
  218. package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
  219. package/types/list-view/src/list-view-table.component.d.ts +15 -0
  220. package/types/lookup/src/composition/use-user-data.d.ts +2 -2
  221. package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
  222. package/types/modal/src/composition/modal.service.d.ts +2 -1
  223. package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
  224. package/types/page-header/src/page-header.component.d.ts +1 -1
  225. package/types/property-panel/index.d.ts +2 -1
  226. package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
  227. package/types/property-panel/src/composition/type.d.ts +0 -13
  228. package/types/query-solution/src/composition/types.d.ts +35 -4
  229. package/types/query-solution/src/composition/use-header.d.ts +21 -0
  230. package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
  231. package/types/query-solution/src/composition/use-solution.d.ts +20 -0
  232. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +17 -16
  233. package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
  234. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +3 -51
  235. package/types/query-solution/src/query-solution.d.ts +10 -2
  236. package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
  237. package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
  238. package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
  239. package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
  240. package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
  241. package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
  242. package/types/section/src/property-config/section.property-config.d.ts +17 -17
  243. package/types/section/src/schema/schema-resolver.d.ts +1 -2
  244. package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
  245. package/types/tabs/src/composition/types.d.ts +4 -1
  246. package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
  247. package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
  248. package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
  249. package/types/text/src/composition/types.d.ts +4 -4
  250. package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
  251. package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
  252. package/types/weather/src/composition/use-weather-color.d.ts +15 -0
  253. package/types/weather/src/composition/use-weather-data.d.ts +15 -0
  254. package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
  255. package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
  256. package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
  257. package/types/weather/src/composition/types.d.ts +0 -2
  258. /package/types/dynamic-form/src/designer/{use-designer-rules.d.ts → response-form-use-designer-rules.d.ts} +0 -0
  259. /package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +0 -0
@@ -1,56 +1,60 @@
1
- import { ref as v, computed as h, createVNode as b, defineComponent as z, watch as U, onMounted as H, inject as N } from "vue";
2
- import { isPlainObject as O, cloneDeep as x } from "lodash-es";
3
- import _ from "../response-toolbar/index.esm.js";
1
+ import { ref as C, computed as b, createVNode as v, defineComponent as z, watch as _, onMounted as V, inject as O } from "vue";
2
+ import { isPlainObject as N, cloneDeep as U } from "lodash-es";
3
+ import Q from "../response-toolbar/index.esm.js";
4
4
  import "bignumber.js";
5
5
  import { withInstall as Z } from "../common/index.esm.js";
6
- const V = {}, $ = {};
7
- function B(n) {
8
- const { properties: e, title: t, ignore: a } = n, r = a && Array.isArray(a), i = Object.keys(e).reduce((o, p) => ((!r || !a.find((f) => f == p)) && (o[p] = e[p].type === "object" && e[p].properties ? B(e[p]) : x(e[p].default)), o), {});
9
- return t && (!r || !a.find((o) => o == "id")) && (i.id = `${t}-${Date.now()}`), i;
6
+ const q = {}, R = {};
7
+ function j(n) {
8
+ const { properties: e, title: t, ignore: a } = n, i = a && Array.isArray(a), r = Object.keys(e).reduce((o, f) => ((!i || !a.find((p) => p === f)) && (o[f] = e[f].type === "object" && e[f].properties ? j(e[f]) : U(e[f].default)), o), {});
9
+ if (t && (!i || !a.find((o) => o === "id"))) {
10
+ const o = t.toLowerCase().replace(/-/g, "_");
11
+ r.id = `${o}_${Math.random().toString().slice(2, 6)}`;
12
+ }
13
+ return r;
10
14
  }
11
- function q(n, e = {}, t) {
12
- const a = V[n];
15
+ function $(n, e = {}, t) {
16
+ const a = q[n];
13
17
  if (a) {
14
- let r = B(a);
15
- const i = $[n];
16
- return r = i ? i({ getSchemaByType: q }, r, e, t) : r, r;
18
+ let i = j(a);
19
+ const r = R[n];
20
+ return i = r ? r({ getSchemaByType: $ }, i, e, t) : i, i;
17
21
  }
18
22
  return null;
19
23
  }
20
24
  function J(n, e) {
21
- const t = B(e);
22
- return Object.keys(n).reduce((a, r) => (a[r] && O(a[r]) && O(n[r]) ? Object.assign(a[r], n[r]) : a[r] = n[r], a), t), t;
25
+ const t = j(e);
26
+ return Object.keys(t).reduce((a, i) => (a[i] && N(a[i]) && N(n[i] || !n[i]) ? Object.assign(a[i], n[i] || {}) : a[i] = n[i], a), t), t;
23
27
  }
24
- function Q(n, e) {
25
- return Object.keys(n).filter((a) => n[a] != null).reduce((a, r) => {
26
- if (e.has(r)) {
27
- const i = e.get(r);
28
- if (typeof i == "string")
29
- a[i] = n[r];
28
+ function X(n, e) {
29
+ return Object.keys(n).filter((a) => n[a] != null).reduce((a, i) => {
30
+ if (e.has(i)) {
31
+ const r = e.get(i);
32
+ if (typeof r == "string")
33
+ a[r] = n[i];
30
34
  else {
31
- const o = i(r, n[r], n);
35
+ const o = r(i, n[i], n);
32
36
  Object.assign(a, o);
33
37
  }
34
38
  } else
35
- a[r] = n[r];
39
+ a[i] = n[i];
36
40
  return a;
37
41
  }, {});
38
42
  }
39
- function X(n, e, t = /* @__PURE__ */ new Map()) {
43
+ function Y(n, e, t = /* @__PURE__ */ new Map()) {
40
44
  const a = J(n, e);
41
- return Q(a, t);
45
+ return X(a, t);
42
46
  }
43
- function Y(n = {}) {
47
+ function x(n = {}) {
44
48
  function e(s, c, l, u) {
45
49
  if (typeof l == "number")
46
50
  return u[s].length === l;
47
51
  if (typeof l == "object") {
48
- const d = Object.keys(l)[0], y = l[d];
49
- if (d === "not")
52
+ const m = Object.keys(l)[0], y = l[m];
53
+ if (m === "not")
50
54
  return Number(u[s].length) !== Number(y);
51
- if (d === "moreThan")
55
+ if (m === "moreThan")
52
56
  return Number(u[s].length) >= Number(y);
53
- if (d === "lessThan")
57
+ if (m === "lessThan")
54
58
  return Number(u[s].length) <= Number(y);
55
59
  }
56
60
  return !1;
@@ -63,19 +67,19 @@ function Y(n = {}) {
63
67
  ["getProperty", t]
64
68
  ]);
65
69
  Object.keys(n).reduce((s, c) => (s.set(c, n[c]), s), a);
66
- function r(s, c) {
70
+ function i(s, c) {
67
71
  const l = s;
68
72
  return typeof c == "number" ? [{ target: l, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: l, operator: "getProperty", param: s, value: !!c }] : typeof c == "object" ? Object.keys(c).map((u) => {
69
73
  if (u === "length")
70
74
  return { target: l, operator: "length", param: null, value: c[u] };
71
- const d = u, y = c[u];
72
- return { target: l, operator: "getProperty", param: d, value: y };
75
+ const m = u, y = c[u];
76
+ return { target: l, operator: "getProperty", param: m, value: y };
73
77
  }) : [];
74
78
  }
75
- function i(s) {
79
+ function r(s) {
76
80
  return Object.keys(s).reduce((l, u) => {
77
- const d = r(u, s[u]);
78
- return l.push(...d), l;
81
+ const m = i(u, s[u]);
82
+ return l.push(...m), l;
79
83
  }, []);
80
84
  }
81
85
  function o(s, c) {
@@ -85,16 +89,16 @@ function Y(n = {}) {
85
89
  }
86
90
  return !1;
87
91
  }
88
- function p(s, c) {
89
- return i(s).reduce((d, y) => d && o(y, c), !0);
90
- }
91
92
  function f(s, c) {
92
- const l = Object.keys(s), u = l.includes("allOf"), d = l.includes("anyOf"), y = u || d, S = (y ? s[y ? u ? "allOf" : "anyOf" : "allOf"] : [s]).map((T) => p(T, c));
93
- return u ? !S.includes(!1) : S.includes(!0);
93
+ return r(s).reduce((m, y) => m && o(y, c), !0);
94
+ }
95
+ function p(s, c) {
96
+ const l = Object.keys(s), u = l.includes("allOf"), m = l.includes("anyOf"), y = u || m, M = (y ? s[y ? u ? "allOf" : "anyOf" : "allOf"] : [s]).map((S) => f(S, c));
97
+ return u ? !M.includes(!1) : M.includes(!0);
94
98
  }
95
- return { parseValueSchema: f };
99
+ return { parseValueSchema: p };
96
100
  }
97
- const k = {
101
+ const P = {
98
102
  button: { type: "button", name: "按钮", icon: "Button" },
99
103
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
100
104
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -132,13 +136,14 @@ const k = {
132
136
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
133
137
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
134
138
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
135
- fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
139
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
140
+ "query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
136
141
  }, K = {}, I = {};
137
- Y();
138
- function ee(n, e, t = /* @__PURE__ */ new Map(), a = (o, p, f) => p, r = {}, i = (o) => o) {
139
- return V[e.title] = e, $[e.title] = a, K[e.title] = r, I[e.title] = i, (o = {}) => {
140
- const p = X(o, e, t), f = Object.keys(n).reduce((s, c) => (s[c] = n[c].default, s), {});
141
- return Object.assign(f, p);
142
+ x();
143
+ function ee(n, e, t = /* @__PURE__ */ new Map(), a = (o, f, p, s) => f, i = {}, r = (o) => o) {
144
+ return q[e.title] = e, R[e.title] = a, K[e.title] = i, I[e.title] = r, (o = {}) => {
145
+ const f = Y(o, e, t), p = Object.keys(n).reduce((s, c) => (s[c] = n[c].default, s), {});
146
+ return Object.assign(p, f);
142
147
  };
143
148
  }
144
149
  function te(n, e) {
@@ -148,10 +153,8 @@ function ne(n, e, t) {
148
153
  return e ? { enableAccordion: t.accordionMode } : { enableAccordion: "" };
149
154
  }
150
155
  function oe(n, e) {
151
- return e && e.contents && e.contents.length && e.contents.forEach((t) => {
152
- t.title && (t.text = t.title);
153
- }), {
154
- buttons: e.contents,
156
+ return {
157
+ buttons: e.buttons,
155
158
  buttonPosition: e.position
156
159
  };
157
160
  }
@@ -161,34 +164,34 @@ const ae = /* @__PURE__ */ new Map([
161
164
  ["enableAccordion", ne],
162
165
  ["toolbar", oe]
163
166
  ]);
164
- function re(n, e, t, a) {
165
- const r = Math.random().toString().slice(2, 6), i = t.parentComponentInstance;
167
+ function re(n, e, t) {
168
+ const a = Math.random().toString().slice(2, 6), i = t.parentComponentInstance;
166
169
  Object.assign(e, {
167
- id: `section-${r}`,
170
+ id: `section-${a}`,
168
171
  appearance: {
169
172
  class: "f-section-in-mainsubcard"
170
173
  },
171
174
  enableAccordion: !1,
172
- mainTitle: e.mainTitle || "标题"
175
+ mainTitle: t.mainTitle || e.mainTitle || "标题"
173
176
  });
174
- const o = n.getSchemaByType("content-container");
175
- Object.assign(o, {
176
- id: `container-${r}`,
177
+ const r = n.getSchemaByType("content-container");
178
+ Object.assign(r, {
179
+ id: `container-${a}`,
177
180
  appearance: {
178
181
  class: "f-struct-wrapper"
179
182
  },
180
183
  contents: [e]
181
184
  });
182
- const p = i.schema;
183
- switch (p && p.type) {
184
- case k["splitter-pane"].type: {
185
+ const o = i.schema;
186
+ switch (o && o.type) {
187
+ case P["splitter-pane"].type: {
185
188
  e.appearance.class = "f-section-in-main";
186
189
  break;
187
190
  }
188
191
  }
189
- return o;
192
+ return r;
190
193
  }
191
- function ie(n, e, t, a) {
194
+ function ie(n, e, t) {
192
195
  return t.parentComponentInstance ? re(n, e, t) : e;
193
196
  }
194
197
  const se = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-design.gitee.io/section.schema.json", le = "section", ue = "A Farris Container Component", pe = "object", fe = {
@@ -309,7 +312,7 @@ const se = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-
309
312
  type: "string",
310
313
  default: "inHead"
311
314
  },
312
- contents: {
315
+ buttons: {
313
316
  type: "array",
314
317
  default: []
315
318
  }
@@ -328,11 +331,12 @@ const se = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-
328
331
  type: pe,
329
332
  properties: fe,
330
333
  required: de
331
- }, F = {
334
+ }, B = {
332
335
  /** 设置内容区域样式 */
333
336
  contentClass: { type: String, default: "" },
334
337
  /** 自定义样式 */
335
338
  customClass: { type: String, default: "" },
339
+ customStyle: { type: String, default: "" },
336
340
  /** 设置是否启用収折功能。支持:空字符串,不启用収折 | default 默认収折方式 || custom自定义収折方式 */
337
341
  enableAccordion: { type: String, default: "" },
338
342
  /** 设置初始是否处于展开状态,支持:true 内容区域被展开|false 内容区域被収折 */
@@ -372,24 +376,10 @@ const se = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-
372
376
  // toolbarPosition: { type: String, default: '' },
373
377
  // toolbarButtons: { type: Array<object>, default: [] },
374
378
  // toolbar: { type: Object as PropType<ToolbarConfig>, default: {} }
375
- }, G = ee(F, me, ae, ie);
379
+ }, H = ee(B, me, ae, ie);
376
380
  function ye(n, e, t) {
377
381
  let a;
378
- function r() {
379
- !n || !e.value || (t.value = !t.value, t.value ? i() : o());
380
- }
381
- function i() {
382
- a = n.value.nextElementSibling;
383
- const f = document && document.querySelector("body");
384
- f && (f.appendChild(n.value), n.value.style.zIndex = p());
385
- }
386
- function o() {
387
- a ? e.value.insertBefore(
388
- n.value,
389
- a
390
- ) : e.value.appendChild(n.value), n.value.style.zIndex = null;
391
- }
392
- function p(f = 1) {
382
+ function i(p = 1) {
393
383
  const s = [
394
384
  "body>.f-datagrid-settings-simple-host",
395
385
  "body>div",
@@ -401,101 +391,113 @@ function ye(n, e, t) {
401
391
  "body>filter-row-panel>.f-datagrid-filter-panel",
402
392
  "body>.f-section-maximize"
403
393
  ], c = Array.from(document.body.querySelectorAll(s.join(","))).filter((u) => u).map((u) => {
404
- const { display: d, zIndex: y } = window.getComputedStyle(u);
405
- return d === "none" ? 0 : parseInt(y, 10);
394
+ const { display: m, zIndex: y } = window.getComputedStyle(u);
395
+ return m === "none" ? 0 : parseInt(y, 10);
406
396
  }).filter((u) => u);
407
397
  let l = Math.max(...c);
408
- return l < 1040 && (l = 1040), l + f;
398
+ return l < 1040 && (l = 1040), l + p;
399
+ }
400
+ function r() {
401
+ a = n.value.nextElementSibling;
402
+ const p = document && document.querySelector("body");
403
+ p && (p.appendChild(n.value), n.value.style.zIndex = i());
404
+ }
405
+ function o() {
406
+ a ? e.value.insertBefore(
407
+ n.value,
408
+ a
409
+ ) : e.value.appendChild(n.value), n.value.style.zIndex = null;
410
+ }
411
+ function f() {
412
+ !n || !e.value || (t.value = !t.value, t.value ? r() : o());
409
413
  }
410
- return { onClickMaxMinIcon: r };
414
+ return { onClickMaxMinIcon: f };
411
415
  }
412
- function j(n, e) {
413
- const t = v(n.buttons), a = h(() => n.buttonPosition === "inHead" ? "right" : "left"), r = h(() => "f-section-toolbar" + (n.buttonPosition === "inHead" ? " f-section-header--toolbar" : " f-section-content--toolbar")), i = h(() => {
414
- n.buttons && n.buttons.length > 0 && n.buttonPosition;
415
- });
416
- function o(p) {
417
- e.emit("Click", p);
416
+ function F(n, e) {
417
+ const t = C(n.buttons), a = b(() => n.buttonPosition === "inHead" ? "right" : "left"), i = b(() => "f-section-toolbar" + (n.buttonPosition === "inHead" ? " f-section-header--toolbar" : " f-section-content--toolbar")), r = b(() => n.buttons && n.buttons.length > 0 && n.buttonPosition === "inHead");
418
+ function o(f) {
419
+ e.emit("Click", f);
418
420
  }
419
- return () => i && b(_, {
420
- customClass: r.value,
421
+ return () => r.value && v(Q, {
422
+ customClass: i.value,
421
423
  items: t.value,
422
424
  onClick: o,
423
425
  alignment: a.value
424
426
  }, null);
425
427
  }
426
- function R(n, e, t, a, r, i) {
427
- v(n.subTitle);
428
- const o = h(() => n.buttonPosition), p = j(n, e), {
429
- onClickMaxMinIcon: f
430
- } = ye(a, r, i), s = h(() => !!n.subTitle), c = h(() => n.enableMaximize), l = h(() => n.enableAccordion != ""), u = h(() => {
431
- const T = {
428
+ function G(n, e, t, a, i, r) {
429
+ C(n.subTitle);
430
+ const o = b(() => n.buttonPosition), f = F(n, e), {
431
+ onClickMaxMinIcon: p
432
+ } = ye(a, i, r), s = b(() => !!n.subTitle), c = b(() => n.enableMaximize), l = b(() => n.enableAccordion !== ""), u = b(() => {
433
+ const S = {
432
434
  "f-section-header": !0
433
435
  };
434
- return e.slots.header && n.headerClass.split(" ").reduce((m, g) => (m[g] = !0, m), T), T;
436
+ return e.slots.header && n.headerClass.split(" ").reduce((d, h) => (d[h] = !0, d), S), S;
435
437
  });
436
- function d(T) {
437
- T.stopPropagation(), n.enableAccordion !== "" && (t.value = !t.value);
438
+ function m(S) {
439
+ S.stopPropagation(), n.enableAccordion !== "" && (t.value = !t.value);
438
440
  }
439
441
  function y() {
440
- const T = h(() => ({
442
+ const S = b(() => ({
441
443
  btn: !0,
442
444
  "f-btn-collapse-expand": !0,
443
445
  "f-btn-mx": !0,
444
446
  "f-state-expand": t.value
445
- })), A = h(() => ({
447
+ })), D = b(() => ({
446
448
  "f-icon": !0,
447
- "f-icon-maximize": !i.value,
448
- "f-icon-minimize": i.value
449
+ "f-icon-maximize": !r.value,
450
+ "f-icon-minimize": r.value
449
451
  }));
450
- return b("div", {
452
+ return v("div", {
451
453
  class: "f-max-accordion"
452
- }, [c.value ? b("span", {
453
- class: A.value,
454
- onClick: f
455
- }, null) : "", l.value ? b("button", {
456
- class: T.value,
457
- onClick: d
458
- }, [b("span", null, [t.value ? n.collapseLabel : n.expandLabel])]) : ""]);
454
+ }, [c.value ? v("span", {
455
+ class: D.value,
456
+ onClick: p
457
+ }, null) : "", l.value ? v("button", {
458
+ class: S.value,
459
+ onClick: m
460
+ }, [v("span", null, [t.value ? n.collapseLabel : n.expandLabel])]) : ""]);
459
461
  }
460
- function M() {
461
- return e.slots.header ? b("div", {
462
+ function w() {
463
+ return e.slots.header ? v("div", {
462
464
  class: u.value
463
465
  }, [e.slots.header()]) : "";
464
466
  }
465
- function C() {
466
- return b("div", {
467
+ function g() {
468
+ return v("div", {
467
469
  class: "f-title",
468
- onClick: d
469
- }, [b("h4", {
470
+ onClick: m
471
+ }, [v("h4", {
470
472
  class: "f-title-text"
471
- }, [n.mainTitle]), s.value && b("span", null, [n.subTitle])]);
473
+ }, [n.mainTitle]), s.value && v("span", null, [n.subTitle])]);
472
474
  }
473
- function S() {
474
- const T = h(() => {
475
- const A = {
475
+ function M() {
476
+ const S = b(() => {
477
+ const D = {
476
478
  "f-content": !0
477
479
  };
478
- return n.headerContentClass && n.headerContentClass.split(" ").reduce((g, D) => (g[D] = !0, g), A), A;
480
+ return n.headerContentClass && n.headerContentClass.split(" ").reduce((h, T) => (h[T] = !0, h), D), D;
479
481
  });
480
- return e.slots.headerContent ? b("div", {
481
- class: T.value
482
+ return e.slots.headerContent ? v("div", {
483
+ class: S.value
482
484
  }, [e.slots.headerContent()]) : "";
483
485
  }
484
- function w() {
485
- return b("div", {
486
+ function A() {
487
+ return v("div", {
486
488
  class: u.value
487
- }, [e.slots.headerTitle ? e.slots.headerTitle() : C(), S(), o.value === "inHead" && p(), (c.value || l.value) && y()]);
489
+ }, [e.slots.headerTitle ? e.slots.headerTitle() : g(), M(), o.value === "inHead" && f(), (c.value || l.value) && y()]);
488
490
  }
489
- return () => n.showHeader && (e.slots.header ? M() : w());
491
+ return () => n.showHeader && (e.slots.header ? w() : A());
490
492
  }
491
- const he = ["moz", "ms", "webkit"];
492
- function be() {
493
+ const be = ["moz", "ms", "webkit"];
494
+ function he() {
493
495
  let n = 0;
494
496
  return (e) => {
495
- const t = (/* @__PURE__ */ new Date()).getTime(), a = Math.max(0, 16 - (t - n)), r = setTimeout(() => {
497
+ const t = (/* @__PURE__ */ new Date()).getTime(), a = Math.max(0, 16 - (t - n)), i = setTimeout(() => {
496
498
  e(t + a);
497
499
  }, a);
498
- return n = t + a, r;
500
+ return n = t + a, i;
499
501
  };
500
502
  }
501
503
  function ve() {
@@ -503,53 +505,52 @@ function ve() {
503
505
  return () => 0;
504
506
  if (window.requestAnimationFrame)
505
507
  return window.requestAnimationFrame.bind(window);
506
- const n = he.filter((e) => `${e}RequestAnimationFrame` in window)[0];
507
- return n ? window[`${n}RequestAnimationFrame`] : be();
508
+ const n = be.filter((e) => `${e}RequestAnimationFrame` in window)[0];
509
+ return n ? window[`${n}RequestAnimationFrame`] : he();
508
510
  }
509
511
  ve();
510
- function P(n, e) {
511
- return ((e == null ? void 0 : e.split(" ")) || []).reduce((a, r) => (r && (a[r] = !0), a), n), n;
512
+ function L(n, e) {
513
+ return ((e == null ? void 0 : e.split(" ")) || []).reduce((a, i) => (i && (a[i] = !0), a), n), n;
512
514
  }
513
515
  const E = /* @__PURE__ */ z({
514
516
  name: "FSection",
515
- props: F,
517
+ props: B,
516
518
  emits: [],
517
519
  setup(n, e) {
518
- const t = v();
519
- let a = v();
520
- const r = v(n.customClass), i = h(() => n.enableAccordion), o = v(n.expandStatus), p = h(() => n.buttonPosition), f = v(!1), s = R(n, e, o, t, a, f), c = j(n, e), l = h(() => {
521
- const C = {
520
+ const t = C(), a = C(), i = C(n.customClass), r = b(() => n.enableAccordion), o = C(n.expandStatus), f = b(() => n.buttonPosition), p = C(!1), s = G(n, e, o, t, a, p), c = F(n, e), l = b(() => {
521
+ const g = {
522
522
  "f-section": !0,
523
- "f-section-accordion": i.value === "default",
524
- "f-state-collapse": (i.value === "default" || i.value === "custom") && !o.value,
525
- "f-section-custom-accordion": i.value === "custom",
523
+ "f-section-accordion": r.value === "default",
524
+ "f-state-collapse": (r.value === "default" || r.value === "custom") && !o.value,
525
+ "f-section-custom-accordion": r.value === "custom",
526
526
  "f-section-fill": n.fill,
527
- "f-section-maximize": f.value
527
+ "f-section-maximize": p.value
528
528
  };
529
- return P(C, r.value);
530
- }), u = h(() => P({
529
+ return L(g, i.value);
530
+ }), u = b(() => L({
531
531
  "f-section-content": !0
532
- }, n.contentClass)), d = h(() => P({
532
+ }, n.contentClass)), m = b(() => L({
533
533
  "f-section-extend": !0
534
- }, d.value));
534
+ }, m.value));
535
535
  function y() {
536
- return e.slots.extend && b("div", {
537
- class: d.value
536
+ return e.slots.extend && v("div", {
537
+ class: m.value
538
538
  }, [e.slots.extend()]);
539
539
  }
540
- function M() {
541
- return b("div", {
540
+ function w() {
541
+ return v("div", {
542
542
  class: u.value
543
- }, [p.value === "inContent" && c(), e.slots.default && e.slots.default()]);
543
+ }, [f.value === "inContent" && c(), e.slots.default && e.slots.default()]);
544
544
  }
545
- return U(() => n.expandStatus, (C, S) => {
546
- C !== S && (o.value = C);
547
- }), H(() => {
548
- t && t.value && (a.value = t.value.parentElement);
549
- }), () => b("div", {
545
+ return _(() => n.expandStatus, (g, M) => {
546
+ g !== M && (o.value = g);
547
+ }), V(() => {
548
+ t.value && t.value && (a.value = t.value.parentElement);
549
+ }), () => v("div", {
550
550
  class: l.value,
551
- ref: t
552
- }, [s(), y(), M()]);
551
+ ref: t,
552
+ style: n.customStyle
553
+ }, [s(), y(), w()]);
553
554
  }
554
555
  });
555
556
  function Ce() {
@@ -560,8 +561,8 @@ function Ce() {
560
561
  const a = ((o = e.targetContainer) == null ? void 0 : o.componentInstance) && e.targetContainer.componentInstance.value;
561
562
  if (!a)
562
563
  return !1;
563
- const r = a.schema.type, i = t == null ? void 0 : t.formSchemaUtils.getComponentById(a.belongedComponentId);
564
- return !((e.controlCategory === "input" || e.controlType === "form-group") && ![k["response-layout-item"].type, k["response-form"].type].includes(r) || (e.controlType === k.tabs.type || e.controlType === k.section.type) && ((i == null ? void 0 : i.componentType) !== "frame" || ![k["content-container"].type, k["splitter-pane"].type, k["response-layout-item"].type].includes(r)));
564
+ const i = a.schema.type, r = t == null ? void 0 : t.formSchemaUtils.getComponentById(a.belongedComponentId);
565
+ return !((e.componentCategory === "input" || e.componentType === "form-group") && ![P["response-layout-item"].type, P["response-form"].type].includes(i) || (e.componentType === P.tabs.type || e.componentType === P.section.type) && ((r == null ? void 0 : r.componentType) !== "frame" || ![P["content-container"].type, P["splitter-pane"].type, P["response-layout-item"].type].includes(i)));
565
566
  }
566
567
  return {
567
568
  basalDragulaRuleForContainer: n
@@ -597,36 +598,11 @@ const ge = {
597
598
  }
598
599
  ]
599
600
  }
600
- },
601
- mainTitle: {
602
- title: "主标题",
603
- type: "string",
604
- description: "",
605
- visible: {
606
- showHeader: !0
607
- }
608
- },
609
- subTitle: {
610
- title: "副标题",
611
- type: "string",
612
- description: "",
613
- visible: {
614
- showHeader: !0
615
- }
616
601
  }
617
- },
618
- setPropertyRelates(n, e) {
619
- if (n)
620
- switch (n && n.propertyID) {
621
- case "mainTitle": {
622
- n.needRefreshControlTree = !0;
623
- break;
624
- }
625
- }
626
602
  }
627
603
  },
628
604
  appearance: {
629
- title: "样式",
605
+ title: "外观",
630
606
  description: "Appearance",
631
607
  properties: {
632
608
  class: {
@@ -642,10 +618,26 @@ const ge = {
642
618
  type: "boolean",
643
619
  description: ""
644
620
  },
621
+ mainTitle: {
622
+ title: "主标题",
623
+ type: "string",
624
+ description: "",
625
+ visible: {
626
+ showHeader: !0
627
+ }
628
+ },
629
+ subTitle: {
630
+ title: "副标题",
631
+ type: "string",
632
+ description: "",
633
+ visible: {
634
+ showHeader: !0
635
+ }
636
+ },
645
637
  fill: {
646
638
  title: "填充内容区域",
647
639
  type: "boolean",
648
- description: "To fill the space of parent container in flex layout."
640
+ description: ""
649
641
  },
650
642
  enableAccordion: {
651
643
  title: "允许收折",
@@ -655,6 +647,15 @@ const ge = {
655
647
  showHeader: !0
656
648
  }
657
649
  }
650
+ },
651
+ setPropertyRelates(n, e) {
652
+ if (n)
653
+ switch (n && n.propertyID) {
654
+ case "mainTitle": {
655
+ n.needRefreshControlTree = !0;
656
+ break;
657
+ }
658
+ }
658
659
  }
659
660
  },
660
661
  extends: {
@@ -672,258 +673,268 @@ const ge = {
672
673
  };
673
674
  class Te {
674
675
  getTemplateRule(e, t) {
675
- const a = t == null ? void 0 : t.formSchemaUtils, r = a == null ? void 0 : a.getFormTemplateRule(), i = { canAccept: !0, canDelete: !0, canMove: !0 };
676
- if (!r)
677
- return i;
678
- const o = this.getComponentContext(e);
679
- return o.componentClassList.forEach((f) => {
680
- if (!f || !r[f])
676
+ const a = t == null ? void 0 : t.formSchemaUtils, i = a == null ? void 0 : a.getFormTemplateRule(), r = { canAccept: !0, canDelete: !0, canMove: !0 };
677
+ if (!i)
678
+ return r;
679
+ const o = this.getComponentContext(e), { componentClassList: f } = o;
680
+ return f.forEach((p) => {
681
+ if (!p || !i[p])
681
682
  return;
682
- const { canMove: s, canDelete: c, canAccept: l } = r[f];
683
- i.canMove = i.canMove && this.resolveRuleValue(s, o), i.canDelete = i.canDelete && this.resolveRuleValue(c, o), i.canAccept = i.canAccept && this.resolveRuleValue(l, o);
684
- }), i;
683
+ const { canMove: s, canDelete: c, canAccept: l } = i[p];
684
+ r.canMove = r.canMove && this.resolveRuleValue(s, o), r.canDelete = r.canDelete && this.resolveRuleValue(c, o), r.canAccept = r.canAccept && this.resolveRuleValue(l, o);
685
+ }), r;
685
686
  }
686
687
  resolveRuleValue(e, t) {
687
688
  return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, t);
688
689
  }
689
690
  parseRuleValueSchema(e, t) {
690
691
  const a = e.invalidContext || [];
691
- let r = !0;
692
- for (const i of a) {
693
- if (i.firstLevelChild) {
694
- if (i.firstLevelChild.class) {
695
- const o = t.firstLevelChildClassList;
696
- if (o && !o.includes(i.firstLevelChild.class)) {
697
- r = !1;
692
+ let i = !0;
693
+ for (const r of a) {
694
+ if (r.firstLevelChild) {
695
+ if (r.firstLevelChild.class) {
696
+ const { firstLevelChildClassList: o } = t;
697
+ if (o && !o.includes(r.firstLevelChild.class)) {
698
+ i = !1;
698
699
  continue;
699
700
  }
700
701
  }
701
- if (i.firstLevelChild.type) {
702
- const o = t.firstLevelChildSchema;
703
- if (o && o.type !== i.firstLevelChild.type) {
704
- r = !1;
702
+ if (r.firstLevelChild.type) {
703
+ const { firstLevelChildSchema: o } = t;
704
+ if (!o || o.type !== r.firstLevelChild.type) {
705
+ i = !1;
705
706
  continue;
706
707
  }
707
708
  }
708
709
  }
709
- if (i.secondLevelChild) {
710
- if (i.secondLevelChild.class) {
711
- const o = t.secondLevelChildClassList;
712
- if (o && !o.includes(i.secondLevelChild.class)) {
713
- r = !1;
710
+ if (r.secondLevelChild) {
711
+ if (r.secondLevelChild.class) {
712
+ const { secondLevelChildClassList: o } = t;
713
+ if (o && !o.includes(r.secondLevelChild.class)) {
714
+ i = !1;
714
715
  continue;
715
716
  }
716
717
  }
717
- if (i.secondLevelChild.type) {
718
- const o = t.secondLevelChildSchema;
719
- if (o && o.type !== i.secondLevelChild.type) {
720
- r = !1;
718
+ if (r.secondLevelChild.type) {
719
+ const { secondLevelChildSchema: o } = t;
720
+ if (!o || o.type !== r.secondLevelChild.type) {
721
+ i = !1;
721
722
  continue;
722
723
  }
723
724
  }
724
725
  }
725
- if (i.parent) {
726
- if (i.parent.class) {
727
- const o = t.parentClassList;
728
- if (o && !o.includes(i.parent.class)) {
729
- r = !1;
726
+ if (r.parent) {
727
+ if (r.parent.class) {
728
+ const { parentClassList: o } = t;
729
+ if (o && !o.includes(r.parent.class)) {
730
+ i = !1;
730
731
  continue;
731
732
  }
732
733
  }
733
- if (i.parent.type) {
734
- const o = t.parentSchema;
735
- if (o && o.type !== i.parent.type) {
736
- r = !1;
734
+ if (r.parent.type) {
735
+ const { parentSchema: o } = t;
736
+ if (o && o.type !== r.parent.type) {
737
+ i = !1;
737
738
  continue;
738
739
  }
739
740
  }
740
741
  }
741
- r = !0;
742
+ i = !0;
742
743
  break;
743
744
  }
744
- return !r;
745
+ return !i;
745
746
  }
746
747
  getComponentContext(e) {
747
- var M, C, S, w;
748
- const t = e.schema, a = t.appearance && t.appearance.class || "", r = a.split(" ") || [], i = t.contents || [], o = i.length ? i[0] : null, p = o && o.appearance ? o.appearance.class : "", f = p ? p.split(" ") : [], s = (M = o == null ? void 0 : o.contents) != null && M.length ? o == null ? void 0 : o.contents[0] : null, c = s && s.appearance ? s.appearance.class : "", l = c ? c.split(" ") : [], u = t.type === "component" ? (S = (C = e.parent) == null ? void 0 : C.parent) == null ? void 0 : S.schema : (w = e.parent) == null ? void 0 : w.schema, d = u && u.appearance && u.appearance.class || "", y = d ? d.split(" ") : [];
748
+ var w, g, M, A;
749
+ const t = e.schema, a = t.appearance && t.appearance.class || "", i = a.split(" ") || [], r = t.contents || [], o = r.length ? r[0] : null, f = o && o.appearance ? o.appearance.class : "", p = f ? f.split(" ") : [], s = (w = o == null ? void 0 : o.contents) != null && w.length ? o == null ? void 0 : o.contents[0] : null, c = s && s.appearance ? s.appearance.class : "", l = c ? c.split(" ") : [], u = t.type === "component" ? (M = (g = e.parent) == null ? void 0 : g.parent) == null ? void 0 : M.schema : (A = e.parent) == null ? void 0 : A.schema, m = u && u.appearance && u.appearance.class || "", y = m ? m.split(" ") : [];
749
750
  return {
750
751
  componentClass: a,
751
- componentClassList: r,
752
- childContents: i,
752
+ componentClassList: i,
753
+ childContents: r,
753
754
  firstLevelChildSchema: o,
754
- firstLevelChildClass: p,
755
- firstLevelChildClassList: f,
755
+ firstLevelChildClass: f,
756
+ firstLevelChildClassList: p,
756
757
  secondLevelChildSchema: s,
757
758
  secondLevelChildClass: c,
758
759
  secondLevelChildClassList: l,
759
760
  parentSchema: u,
760
- parentClass: d,
761
+ parentClass: m,
761
762
  parentClassList: y
762
763
  };
763
764
  }
764
765
  }
765
766
  function Se(n, e) {
766
- const t = new Te(), { canMove: a, canAccept: r, canDelete: i } = t.getTemplateRule(n, e);
767
- function o(l) {
767
+ const t = new Te();
768
+ function a(p) {
768
769
  return ge;
769
770
  }
770
- function p(l) {
771
- return Ce().basalDragulaRuleForContainer(l, e) ? r : !1;
771
+ function i(p) {
772
+ if (!Ce().basalDragulaRuleForContainer(p, e))
773
+ return !1;
774
+ const { canAccept: c } = t.getTemplateRule(n, e);
775
+ return c;
772
776
  }
773
- function f() {
774
- return i;
777
+ function r() {
778
+ const { canDelete: p } = t.getTemplateRule(n, e);
779
+ return p;
775
780
  }
776
- function s() {
777
- return a;
781
+ function o() {
782
+ const { canMove: p } = t.getTemplateRule(n, e);
783
+ return p;
778
784
  }
779
- function c() {
780
- return !a && !i;
785
+ function f() {
786
+ const { canMove: p, canDelete: s } = t.getTemplateRule(n, e);
787
+ return !p && !s;
781
788
  }
782
789
  return {
783
- canAccepts: p,
784
- checkCanDeleteComponent: f,
785
- checkCanMoveComponent: s,
786
- hideNestedPaddingInDesginerView: c,
787
- getPropsConfig: o
790
+ canAccepts: i,
791
+ checkCanDeleteComponent: r,
792
+ checkCanMoveComponent: o,
793
+ hideNestedPaddingInDesginerView: f,
794
+ getPropsConfig: a
788
795
  };
789
796
  }
790
797
  function Me(n, e, t) {
791
- var A;
792
- function a() {
793
- t != null && t.resolveComponentContext && t.resolveComponentContext();
794
- }
795
- a();
796
- const r = t && t.getStyles && t.getStyles() || "", i = t && t.getDesignerClass && t.getDesignerClass() || "", o = v();
797
- function p() {
798
+ var D;
799
+ const a = t && t.getStyles && t.getStyles() || "", i = t && t.getDesignerClass && t.getDesignerClass() || "", r = C();
800
+ function o() {
798
801
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
799
802
  }
800
803
  function f() {
801
804
  return !1;
802
805
  }
803
- function s() {
806
+ function p() {
804
807
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
805
808
  }
806
- function c() {
809
+ function s() {
807
810
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
808
811
  }
809
- function l(m) {
810
- if (!m || !m.value)
812
+ function c(d) {
813
+ if (!d || !d.value)
811
814
  return null;
812
- if (m.value.schema && m.value.schema.type === "component")
813
- return m.value;
814
- const g = v(m == null ? void 0 : m.value.parent), D = l(g);
815
- return D || null;
815
+ if (d.value.schema && d.value.schema.type === "component")
816
+ return d.value;
817
+ const h = C(d == null ? void 0 : d.value.parent), T = c(h);
818
+ return T || null;
816
819
  }
817
- function u(m = e) {
818
- const { componentInstance: g, designerItemElementRef: D } = m;
819
- return !g || !g.value ? null : g.value.canMove ? D : u(m.parent);
820
+ function l(d = e) {
821
+ const { componentInstance: h, designerItemElementRef: T } = d;
822
+ return !h || !h.value ? null : h.value.canMove ? T : l(d.parent);
820
823
  }
821
- function d(m) {
822
- return !!t && t.canAccepts(m);
824
+ function u(d) {
825
+ return !!t && t.canAccepts(d);
823
826
  }
824
- function y() {
827
+ function m() {
825
828
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
826
829
  }
827
- function M() {
830
+ function y() {
828
831
  }
829
- function C(m, g) {
830
- g && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(g);
832
+ function w(d, h) {
833
+ h && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(h);
831
834
  }
832
- function S(m, g) {
833
- const { componentType: D } = m;
834
- let L = q(D, m, g);
835
- t && t.onResolveNewComponentSchema && (L = t.onResolveNewComponentSchema(m, L));
836
- const W = D.toLowerCase().replace("-", "_");
837
- return L && !L.id && L.type === D && (L.id = `${W}_${Math.random().toString().slice(2, 6)}`), L;
835
+ function g(d, h) {
836
+ const { componentType: T } = d;
837
+ let k = $(T, d, h);
838
+ t && t.onResolveNewComponentSchema && (k = t.onResolveNewComponentSchema(d, k));
839
+ const W = T.toLowerCase().replace(/-/g, "_");
840
+ return k && !k.id && k.type === T && (k.id = `${W}_${Math.random().toString().slice(2, 6)}`), k;
838
841
  }
839
- function w(m) {
842
+ function M(d) {
840
843
  }
841
- function T(...m) {
844
+ function A(...d) {
842
845
  if (t && t.getPropsConfig)
843
- return t.getPropsConfig(...m);
846
+ return t.getPropsConfig(...d);
847
+ }
848
+ function S() {
849
+ t && t.onRemoveComponent && t.onRemoveComponent(), e != null && e.schema.contents && e.schema.contents.map((d) => {
850
+ var k;
851
+ let h = d.id;
852
+ d.type === "component-ref" && (h = d.component);
853
+ const T = n.value.querySelector(`#${h}-design-item`);
854
+ (k = T == null ? void 0 : T.componentInstance) != null && k.value.onRemoveComponent && T.componentInstance.value.onRemoveComponent();
855
+ });
844
856
  }
845
- return o.value = {
846
- canMove: p(),
857
+ return r.value = {
858
+ canMove: o(),
847
859
  canSelectParent: f(),
848
- canDelete: s(),
849
- canNested: !c(),
860
+ canDelete: p(),
861
+ canNested: !s(),
850
862
  contents: e == null ? void 0 : e.schema.contents,
851
863
  elementRef: n,
852
- parent: (A = e == null ? void 0 : e.parent) == null ? void 0 : A.componentInstance,
864
+ parent: (D = e == null ? void 0 : e.parent) == null ? void 0 : D.componentInstance,
853
865
  schema: e == null ? void 0 : e.schema,
854
- styles: r,
866
+ styles: a,
855
867
  designerClass: i,
856
- canAccepts: d,
857
- getBelongedComponentInstance: l,
858
- getDraggableDesignItemElement: u,
859
- getDraggingDisplayText: y,
860
- getPropConfig: T,
861
- getDragScopeElement: M,
862
- onAcceptMovedChildElement: C,
863
- onChildElementMovedOut: w,
864
- addNewChildComponentSchema: S,
865
- updateDragAndDropRules: a,
866
- triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || v(!1),
867
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || v(!1)
868
- }, o;
868
+ canAccepts: u,
869
+ getBelongedComponentInstance: c,
870
+ getDraggableDesignItemElement: l,
871
+ getDraggingDisplayText: m,
872
+ getPropConfig: A,
873
+ getDragScopeElement: y,
874
+ onAcceptMovedChildElement: w,
875
+ onChildElementMovedOut: M,
876
+ addNewChildComponentSchema: g,
877
+ triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || C(!1),
878
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || C(!1),
879
+ onRemoveComponent: S
880
+ }, r;
869
881
  }
870
882
  const we = /* @__PURE__ */ z({
871
883
  name: "FSectionDesign",
872
- props: F,
884
+ props: B,
873
885
  emits: [],
874
886
  setup(n, e) {
875
- const t = v(), a = v();
876
- let r = v();
877
- const i = N("designer-host-service"), o = N("design-item-context"), p = Se(o, i), f = Me(t, o, p);
878
- f.value.styles = "display: inherit;", H(() => {
879
- t.value.componentInstance = f;
880
- }), e.expose(f.value);
881
- const s = v(n.customClass), c = h(() => n.enableAccordion), l = v(n.expandStatus), u = h(() => n.buttonPosition), d = v(!1), y = R(n, e, l, a, r, d), M = j(n, e), C = h(() => {
882
- const m = {
887
+ const t = C(), a = C(), i = C(), r = O("designer-host-service"), o = O("design-item-context"), f = Se(o, r), p = Me(t, o, f);
888
+ p.value.styles = "display: inherit;", V(() => {
889
+ t.value.componentInstance = p;
890
+ }), e.expose(p.value);
891
+ const s = C(n.customClass), c = b(() => n.enableAccordion), l = C(n.expandStatus), u = b(() => n.buttonPosition), m = C(!1), y = G(n, e, l, a, i, m), w = F(n, e), g = b(() => {
892
+ const d = {
883
893
  "f-section": !0,
884
894
  "f-section-accordion": c.value === "default",
885
895
  "f-state-collapse": (c.value === "default" || c.value === "custom") && !l.value,
886
896
  "f-section-custom-accordion": c.value === "custom",
887
897
  "f-section-fill": n.fill,
888
- "f-section-maximize": d.value,
898
+ "f-section-maximize": m.value,
889
899
  "f-utils-fill": !0,
890
900
  "p-0": !0
891
901
  };
892
- return P(m, s.value);
893
- }), S = h(() => P({
902
+ return L(d, s.value);
903
+ }), M = b(() => L({
894
904
  "f-section-content": !0,
895
905
  "drag-container": !0
896
- }, n.contentClass)), w = h(() => P({
906
+ }, n.contentClass)), A = b(() => L({
897
907
  "f-section-extend": !0
898
- }, w.value));
899
- function T() {
900
- return e.slots.extend && b("div", {
901
- class: w.value
908
+ }, A.value));
909
+ function S() {
910
+ return e.slots.extend && v("div", {
911
+ class: A.value
902
912
  }, [e.slots.extend()]);
903
913
  }
904
- function A() {
905
- return b("div", {
906
- class: S.value,
914
+ function D() {
915
+ return v("div", {
916
+ class: M.value,
907
917
  ref: t,
908
918
  "data-dragref": `${o.schema.id}-container`
909
- }, [u.value === "inContent" && M(), e.slots.default && e.slots.default()]);
919
+ }, [u.value === "inContent" && w(), e.slots.default && e.slots.default()]);
910
920
  }
911
- return () => b("div", {
912
- class: C.value,
913
- ref: a
914
- }, [y(), T(), A()]);
921
+ return () => v("div", {
922
+ class: g.value,
923
+ ref: a,
924
+ style: n.customStyle
925
+ }, [y(), S(), D()]);
915
926
  }
916
927
  });
917
928
  E.register = (n, e, t, a) => {
918
- n.section = E, e.section = G;
929
+ n.section = E, e.section = H;
919
930
  };
920
931
  E.registerDesigner = (n, e, t) => {
921
- n.section = we, e.section = G;
932
+ n.section = we, e.section = H;
922
933
  };
923
934
  const Ee = Z(E);
924
935
  export {
925
936
  E as Section,
926
937
  Ee as default,
927
- G as propsResolver,
928
- F as sectionProps
938
+ H as propsResolver,
939
+ B as sectionProps
929
940
  };