@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,100 +1,105 @@
1
1
  var z = Object.defineProperty;
2
- var J = (a, e, t) => e in a ? z(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
- var y = (a, e, t) => J(a, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as $, onBeforeMount as Q, onMounted as F, createVNode as j, ref as D, inject as E } from "vue";
5
- import { isPlainObject as B, cloneDeep as N } from "lodash-es";
6
- const O = {}, U = {};
7
- function S(a) {
8
- const { properties: e, title: t, ignore: n } = a, o = n && Array.isArray(n), i = Object.keys(e).reduce((r, u) => ((!o || !n.find((f) => f == u)) && (r[u] = e[u].type === "object" && e[u].properties ? S(e[u]) : N(e[u].default)), r), {});
9
- return t && (!o || !n.find((r) => r == "id")) && (i.id = `${t}-${Date.now()}`), i;
2
+ var J = (n, e, t) => e in n ? z(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
+ var V = (n, e, t) => J(n, typeof e != "symbol" ? e + "" : e, t);
4
+ import { defineComponent as O, onBeforeMount as X, onMounted as j, createVNode as S, ref as D, inject as A, computed as Y } from "vue";
5
+ import { isPlainObject as $, cloneDeep as N } from "lodash-es";
6
+ import { getCustomClass as Z } from "../common/index.esm.js";
7
+ const R = {}, q = {};
8
+ function U(n) {
9
+ const { properties: e, title: t, ignore: o } = n, a = o && Array.isArray(o), c = Object.keys(e).reduce((r, f) => ((!a || !o.find((m) => m === f)) && (r[f] = e[f].type === "object" && e[f].properties ? U(e[f]) : N(e[f].default)), r), {});
10
+ if (t && (!a || !o.find((r) => r === "id"))) {
11
+ const r = t.toLowerCase().replace(/-/g, "_");
12
+ c.id = `${r}_${Math.random().toString().slice(2, 6)}`;
13
+ }
14
+ return c;
10
15
  }
11
- function q(a, e = {}, t) {
12
- const n = O[a];
13
- if (n) {
14
- let o = S(n);
15
- const i = U[a];
16
- return o = i ? i({ getSchemaByType: q }, o, e, t) : o, o;
16
+ function G(n, e = {}, t) {
17
+ const o = R[n];
18
+ if (o) {
19
+ let a = U(o);
20
+ const c = q[n];
21
+ return a = c ? c({ getSchemaByType: G }, a, e, t) : a, a;
17
22
  }
18
23
  return null;
19
24
  }
20
- function X(a, e) {
21
- const t = S(e);
22
- return Object.keys(a).reduce((n, o) => (n[o] && B(n[o]) && B(a[o]) ? Object.assign(n[o], a[o]) : n[o] = a[o], n), t), t;
25
+ function I(n, e) {
26
+ const t = U(e);
27
+ return Object.keys(t).reduce((o, a) => (o[a] && $(o[a]) && $(n[a] || !n[a]) ? Object.assign(o[a], n[a] || {}) : o[a] = n[a], o), t), t;
23
28
  }
24
- function Y(a, e) {
25
- return Object.keys(a).filter((n) => a[n] != null).reduce((n, o) => {
26
- if (e.has(o)) {
27
- const i = e.get(o);
28
- if (typeof i == "string")
29
- n[i] = a[o];
29
+ function K(n, e) {
30
+ return Object.keys(n).filter((o) => n[o] != null).reduce((o, a) => {
31
+ if (e.has(a)) {
32
+ const c = e.get(a);
33
+ if (typeof c == "string")
34
+ o[c] = n[a];
30
35
  else {
31
- const r = i(o, a[o], a);
32
- Object.assign(n, r);
36
+ const r = c(a, n[a], n);
37
+ Object.assign(o, r);
33
38
  }
34
39
  } else
35
- n[o] = a[o];
36
- return n;
40
+ o[a] = n[a];
41
+ return o;
37
42
  }, {});
38
43
  }
39
- function Z(a, e, t = /* @__PURE__ */ new Map()) {
40
- const n = X(a, e);
41
- return Y(n, t);
44
+ function H(n, e, t = /* @__PURE__ */ new Map()) {
45
+ const o = I(n, e);
46
+ return K(o, t);
42
47
  }
43
- function H(a = {}) {
44
- function e(s, c, p, l) {
45
- if (typeof p == "number")
46
- return l[s].length === p;
47
- if (typeof p == "object") {
48
- const d = Object.keys(p)[0], h = p[d];
48
+ function x(n = {}) {
49
+ function e(i, s, l, p) {
50
+ if (typeof l == "number")
51
+ return p[i].length === l;
52
+ if (typeof l == "object") {
53
+ const d = Object.keys(l)[0], v = l[d];
49
54
  if (d === "not")
50
- return Number(l[s].length) !== Number(h);
55
+ return Number(p[i].length) !== Number(v);
51
56
  if (d === "moreThan")
52
- return Number(l[s].length) >= Number(h);
57
+ return Number(p[i].length) >= Number(v);
53
58
  if (d === "lessThan")
54
- return Number(l[s].length) <= Number(h);
59
+ return Number(p[i].length) <= Number(v);
55
60
  }
56
61
  return !1;
57
62
  }
58
- function t(s, c, p, l) {
59
- return l[s] && l[s].propertyValue && String(l[s].propertyValue.value) === String(p);
63
+ function t(i, s, l, p) {
64
+ return p[i] && p[i].propertyValue && String(p[i].propertyValue.value) === String(l);
60
65
  }
61
- const n = /* @__PURE__ */ new Map([
66
+ const o = /* @__PURE__ */ new Map([
62
67
  ["length", e],
63
68
  ["getProperty", t]
64
69
  ]);
65
- Object.keys(a).reduce((s, c) => (s.set(c, a[c]), s), n);
66
- function o(s, c) {
67
- const p = s;
68
- return typeof c == "number" ? [{ target: p, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: p, operator: "getProperty", param: s, value: !!c }] : typeof c == "object" ? Object.keys(c).map((l) => {
69
- if (l === "length")
70
- return { target: p, operator: "length", param: null, value: c[l] };
71
- const d = l, h = c[l];
72
- return { target: p, operator: "getProperty", param: d, value: h };
70
+ Object.keys(n).reduce((i, s) => (i.set(s, n[s]), i), o);
71
+ function a(i, s) {
72
+ const l = i;
73
+ 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) => {
74
+ if (p === "length")
75
+ return { target: l, operator: "length", param: null, value: s[p] };
76
+ const d = p, v = s[p];
77
+ return { target: l, operator: "getProperty", param: d, value: v };
73
78
  }) : [];
74
79
  }
75
- function i(s) {
76
- return Object.keys(s).reduce((p, l) => {
77
- const d = o(l, s[l]);
78
- return p.push(...d), p;
80
+ function c(i) {
81
+ return Object.keys(i).reduce((l, p) => {
82
+ const d = a(p, i[p]);
83
+ return l.push(...d), l;
79
84
  }, []);
80
85
  }
81
- function r(s, c) {
82
- if (n.has(s.operator)) {
83
- const p = n.get(s.operator);
84
- return p && p(s.target, s.param, s.value, c) || !1;
86
+ function r(i, s) {
87
+ if (o.has(i.operator)) {
88
+ const l = o.get(i.operator);
89
+ return l && l(i.target, i.param, i.value, s) || !1;
85
90
  }
86
91
  return !1;
87
92
  }
88
- function u(s, c) {
89
- return i(s).reduce((d, h) => d && r(h, c), !0);
93
+ function f(i, s) {
94
+ return c(i).reduce((d, v) => d && r(v, s), !0);
90
95
  }
91
- function f(s, c) {
92
- const p = Object.keys(s), l = p.includes("allOf"), d = p.includes("anyOf"), h = l || d, C = (h ? s[h ? l ? "allOf" : "anyOf" : "allOf"] : [s]).map((L) => u(L, c));
93
- return l ? !C.includes(!1) : C.includes(!0);
96
+ function m(i, s) {
97
+ const l = Object.keys(i), p = l.includes("allOf"), d = l.includes("anyOf"), v = p || d, M = (v ? i[v ? p ? "allOf" : "anyOf" : "allOf"] : [i]).map((P) => f(P, s));
98
+ return p ? !M.includes(!1) : M.includes(!0);
94
99
  }
95
- return { parseValueSchema: f };
100
+ return { parseValueSchema: m };
96
101
  }
97
- const K = {
102
+ const ee = {
98
103
  button: { type: "button", name: "按钮", icon: "Button" },
99
104
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
100
105
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -132,21 +137,22 @@ const K = {
132
137
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
133
138
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
134
139
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
135
- fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
136
- }, I = {}, x = {};
137
- H();
138
- function G(a, e, t = /* @__PURE__ */ new Map(), n = (r, u, f) => u, o = {}, i = (r) => r) {
139
- return O[e.title] = e, U[e.title] = n, I[e.title] = o, x[e.title] = i, (r = {}) => {
140
- const u = Z(r, e, t), f = Object.keys(a).reduce((s, c) => (s[c] = a[c].default, s), {});
141
- return Object.assign(f, u);
140
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
141
+ "query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
142
+ }, te = {}, ne = {};
143
+ x();
144
+ function W(n, e, t = /* @__PURE__ */ new Map(), o = (r, f, m, i) => f, a = {}, c = (r) => r) {
145
+ return R[e.title] = e, q[e.title] = o, te[e.title] = a, ne[e.title] = c, (r = {}) => {
146
+ const f = H(r, e, t), m = Object.keys(n).reduce((i, s) => (i[s] = n[s].default, i), {});
147
+ return Object.assign(m, f);
142
148
  };
143
149
  }
144
- function ee(a, e) {
150
+ function oe(n, e) {
145
151
  return { customClass: e.class, customStyle: e.style };
146
152
  }
147
- const W = /* @__PURE__ */ new Map([
148
- ["appearance", ee]
149
- ]), te = "https://json-schema.org/draft/2020-12/schema", ne = "https://farris-design.gitee.io/component.schema.json", oe = "component", re = "A Farris Visual Component", ie = "object", ae = {
153
+ const _ = /* @__PURE__ */ new Map([
154
+ ["appearance", oe]
155
+ ]), ae = "https://json-schema.org/draft/2020-12/schema", re = "https://farris-design.gitee.io/component.schema.json", ce = "component", ie = "A Farris Visual Component", se = "object", le = {
150
156
  id: {
151
157
  description: "The unique identifier for a component",
152
158
  type: "string"
@@ -197,245 +203,252 @@ const W = /* @__PURE__ */ new Map([
197
203
  type: "string",
198
204
  default: ""
199
205
  }
200
- }, se = [
206
+ }, pe = [
201
207
  "id",
202
208
  "type",
203
209
  "contents"
204
- ], ce = {
205
- $schema: te,
206
- $id: ne,
207
- title: oe,
208
- description: re,
209
- type: ie,
210
- properties: ae,
211
- required: se
210
+ ], ue = {
211
+ $schema: ae,
212
+ $id: re,
213
+ title: ce,
214
+ description: ie,
215
+ type: se,
216
+ properties: le,
217
+ required: pe
212
218
  };
213
- function _(a, e, t) {
219
+ function Q(n, e, t) {
214
220
  return e;
215
221
  }
216
- const T = {
222
+ const L = {
217
223
  id: { type: String },
218
224
  customClass: { type: String, default: "" },
225
+ customStyle: { type: String, default: "" },
219
226
  componentType: { type: String, default: "" },
220
227
  formColumns: { type: Number, default: 4 }
221
- }, A = G(T, ce, W, _), Se = Object.assign({}, T, { componentId: { type: String, default: "" } }), V = /* @__PURE__ */ $({
228
+ }, F = W(L, ue, _, Q), $e = Object.assign({}, L, { componentId: { type: String, default: "" } }), B = /* @__PURE__ */ O({
222
229
  name: "FComponent",
223
- props: T,
230
+ props: L,
224
231
  emits: ["init", "afterViewInit"],
225
- setup(a, e) {
226
- return Q(() => {
227
- e.emit("init", a.id);
228
- }), F(() => {
229
- e.emit("afterViewInit", a.id);
230
- }), () => j("div", {
231
- class: a.customClass
232
+ setup(n, e) {
233
+ return X(() => {
234
+ e.emit("init", n.id);
235
+ }), j(() => {
236
+ e.emit("afterViewInit", n.id);
237
+ }), () => S("div", {
238
+ class: n.customClass
232
239
  }, [e.slots.default && e.slots.default()]);
233
240
  }
234
241
  });
235
- function pe(a, e, t) {
236
- var k;
237
- function n() {
238
- t != null && t.resolveComponentContext && t.resolveComponentContext();
239
- }
240
- n();
241
- const o = t && t.getStyles && t.getStyles() || "", i = t && t.getDesignerClass && t.getDesignerClass() || "", r = D();
242
- function u() {
242
+ function fe(n, e, t) {
243
+ var T;
244
+ const o = t && t.getStyles && t.getStyles() || "", a = t && t.getDesignerClass && t.getDesignerClass() || "", c = D();
245
+ function r() {
243
246
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
244
247
  }
245
248
  function f() {
246
249
  return !1;
247
250
  }
248
- function s() {
251
+ function m() {
249
252
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
250
253
  }
251
- function c() {
254
+ function i() {
252
255
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
253
256
  }
254
- function p(m) {
255
- if (!m || !m.value)
257
+ function s(u) {
258
+ if (!u || !u.value)
256
259
  return null;
257
- if (m.value.schema && m.value.schema.type === "component")
258
- return m.value;
259
- const g = D(m == null ? void 0 : m.value.parent), v = p(g);
260
- return v || null;
260
+ if (u.value.schema && u.value.schema.type === "component")
261
+ return u.value;
262
+ const w = D(u == null ? void 0 : u.value.parent), b = s(w);
263
+ return b || null;
261
264
  }
262
- function l(m = e) {
263
- const { componentInstance: g, designerItemElementRef: v } = m;
264
- return !g || !g.value ? null : g.value.canMove ? v : l(m.parent);
265
+ function l(u = e) {
266
+ const { componentInstance: w, designerItemElementRef: b } = u;
267
+ return !w || !w.value ? null : w.value.canMove ? b : l(u.parent);
265
268
  }
266
- function d(m) {
267
- return !!t && t.canAccepts(m);
269
+ function p(u) {
270
+ return !!t && t.canAccepts(u);
268
271
  }
269
- function h() {
272
+ function d() {
270
273
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
271
274
  }
272
- function M() {
275
+ function v() {
273
276
  }
274
- function w(m, g) {
275
- g && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(g);
277
+ function y(u, w) {
278
+ w && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(w);
276
279
  }
277
- function C(m, g) {
278
- const { componentType: v } = m;
279
- let b = q(v, m, g);
280
- t && t.onResolveNewComponentSchema && (b = t.onResolveNewComponentSchema(m, b));
281
- const R = v.toLowerCase().replace("-", "_");
282
- return b && !b.id && b.type === v && (b.id = `${R}_${Math.random().toString().slice(2, 6)}`), b;
280
+ function h(u, w) {
281
+ const { componentType: b } = u;
282
+ let C = G(b, u, w);
283
+ t && t.onResolveNewComponentSchema && (C = t.onResolveNewComponentSchema(u, C));
284
+ const E = b.toLowerCase().replace(/-/g, "_");
285
+ return C && !C.id && C.type === b && (C.id = `${E}_${Math.random().toString().slice(2, 6)}`), C;
283
286
  }
284
- function P(m) {
287
+ function M(u) {
285
288
  }
286
- function L(...m) {
289
+ function g(...u) {
287
290
  if (t && t.getPropsConfig)
288
- return t.getPropsConfig(...m);
291
+ return t.getPropsConfig(...u);
292
+ }
293
+ function P() {
294
+ t && t.onRemoveComponent && t.onRemoveComponent(), e != null && e.schema.contents && e.schema.contents.map((u) => {
295
+ var C;
296
+ let w = u.id;
297
+ u.type === "component-ref" && (w = u.component);
298
+ const b = n.value.querySelector(`#${w}-design-item`);
299
+ (C = b == null ? void 0 : b.componentInstance) != null && C.value.onRemoveComponent && b.componentInstance.value.onRemoveComponent();
300
+ });
289
301
  }
290
- return r.value = {
291
- canMove: u(),
302
+ return c.value = {
303
+ canMove: r(),
292
304
  canSelectParent: f(),
293
- canDelete: s(),
294
- canNested: !c(),
305
+ canDelete: m(),
306
+ canNested: !i(),
295
307
  contents: e == null ? void 0 : e.schema.contents,
296
- elementRef: a,
297
- parent: (k = e == null ? void 0 : e.parent) == null ? void 0 : k.componentInstance,
308
+ elementRef: n,
309
+ parent: (T = e == null ? void 0 : e.parent) == null ? void 0 : T.componentInstance,
298
310
  schema: e == null ? void 0 : e.schema,
299
311
  styles: o,
300
- designerClass: i,
301
- canAccepts: d,
302
- getBelongedComponentInstance: p,
312
+ designerClass: a,
313
+ canAccepts: p,
314
+ getBelongedComponentInstance: s,
303
315
  getDraggableDesignItemElement: l,
304
- getDraggingDisplayText: h,
305
- getPropConfig: L,
306
- getDragScopeElement: M,
307
- onAcceptMovedChildElement: w,
308
- onChildElementMovedOut: P,
309
- addNewChildComponentSchema: C,
310
- updateDragAndDropRules: n,
316
+ getDraggingDisplayText: d,
317
+ getPropConfig: g,
318
+ getDragScopeElement: v,
319
+ onAcceptMovedChildElement: y,
320
+ onChildElementMovedOut: M,
321
+ addNewChildComponentSchema: h,
311
322
  triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || D(!1),
312
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || D(!1)
313
- }, r;
323
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || D(!1),
324
+ onRemoveComponent: P
325
+ }, c;
314
326
  }
315
- class le {
327
+ class me {
316
328
  getTemplateRule(e, t) {
317
- const n = t == null ? void 0 : t.formSchemaUtils, o = n == null ? void 0 : n.getFormTemplateRule(), i = { canAccept: !0, canDelete: !0, canMove: !0 };
318
- if (!o)
319
- return i;
320
- const r = this.getComponentContext(e);
321
- return r.componentClassList.forEach((f) => {
322
- if (!f || !o[f])
329
+ const o = t == null ? void 0 : t.formSchemaUtils, a = o == null ? void 0 : o.getFormTemplateRule(), c = { canAccept: !0, canDelete: !0, canMove: !0 };
330
+ if (!a)
331
+ return c;
332
+ const r = this.getComponentContext(e), { componentClassList: f } = r;
333
+ return f.forEach((m) => {
334
+ if (!m || !a[m])
323
335
  return;
324
- const { canMove: s, canDelete: c, canAccept: p } = o[f];
325
- i.canMove = i.canMove && this.resolveRuleValue(s, r), i.canDelete = i.canDelete && this.resolveRuleValue(c, r), i.canAccept = i.canAccept && this.resolveRuleValue(p, r);
326
- }), i;
336
+ const { canMove: i, canDelete: s, canAccept: l } = a[m];
337
+ c.canMove = c.canMove && this.resolveRuleValue(i, r), c.canDelete = c.canDelete && this.resolveRuleValue(s, r), c.canAccept = c.canAccept && this.resolveRuleValue(l, r);
338
+ }), c;
327
339
  }
328
340
  resolveRuleValue(e, t) {
329
341
  return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, t);
330
342
  }
331
343
  parseRuleValueSchema(e, t) {
332
- const n = e.invalidContext || [];
333
- let o = !0;
334
- for (const i of n) {
335
- if (i.firstLevelChild) {
336
- if (i.firstLevelChild.class) {
337
- const r = t.firstLevelChildClassList;
338
- if (r && !r.includes(i.firstLevelChild.class)) {
339
- o = !1;
344
+ const o = e.invalidContext || [];
345
+ let a = !0;
346
+ for (const c of o) {
347
+ if (c.firstLevelChild) {
348
+ if (c.firstLevelChild.class) {
349
+ const { firstLevelChildClassList: r } = t;
350
+ if (r && !r.includes(c.firstLevelChild.class)) {
351
+ a = !1;
340
352
  continue;
341
353
  }
342
354
  }
343
- if (i.firstLevelChild.type) {
344
- const r = t.firstLevelChildSchema;
345
- if (r && r.type !== i.firstLevelChild.type) {
346
- o = !1;
355
+ if (c.firstLevelChild.type) {
356
+ const { firstLevelChildSchema: r } = t;
357
+ if (!r || r.type !== c.firstLevelChild.type) {
358
+ a = !1;
347
359
  continue;
348
360
  }
349
361
  }
350
362
  }
351
- if (i.secondLevelChild) {
352
- if (i.secondLevelChild.class) {
353
- const r = t.secondLevelChildClassList;
354
- if (r && !r.includes(i.secondLevelChild.class)) {
355
- o = !1;
363
+ if (c.secondLevelChild) {
364
+ if (c.secondLevelChild.class) {
365
+ const { secondLevelChildClassList: r } = t;
366
+ if (r && !r.includes(c.secondLevelChild.class)) {
367
+ a = !1;
356
368
  continue;
357
369
  }
358
370
  }
359
- if (i.secondLevelChild.type) {
360
- const r = t.secondLevelChildSchema;
361
- if (r && r.type !== i.secondLevelChild.type) {
362
- o = !1;
371
+ if (c.secondLevelChild.type) {
372
+ const { secondLevelChildSchema: r } = t;
373
+ if (!r || r.type !== c.secondLevelChild.type) {
374
+ a = !1;
363
375
  continue;
364
376
  }
365
377
  }
366
378
  }
367
- if (i.parent) {
368
- if (i.parent.class) {
369
- const r = t.parentClassList;
370
- if (r && !r.includes(i.parent.class)) {
371
- o = !1;
379
+ if (c.parent) {
380
+ if (c.parent.class) {
381
+ const { parentClassList: r } = t;
382
+ if (r && !r.includes(c.parent.class)) {
383
+ a = !1;
372
384
  continue;
373
385
  }
374
386
  }
375
- if (i.parent.type) {
376
- const r = t.parentSchema;
377
- if (r && r.type !== i.parent.type) {
378
- o = !1;
387
+ if (c.parent.type) {
388
+ const { parentSchema: r } = t;
389
+ if (r && r.type !== c.parent.type) {
390
+ a = !1;
379
391
  continue;
380
392
  }
381
393
  }
382
394
  }
383
- o = !0;
395
+ a = !0;
384
396
  break;
385
397
  }
386
- return !o;
398
+ return !a;
387
399
  }
388
400
  getComponentContext(e) {
389
- var M, w, C, P;
390
- const t = e.schema, n = t.appearance && t.appearance.class || "", o = n.split(" ") || [], i = t.contents || [], r = i.length ? i[0] : null, u = r && r.appearance ? r.appearance.class : "", f = u ? u.split(" ") : [], s = (M = r == null ? void 0 : r.contents) != null && M.length ? r == null ? void 0 : r.contents[0] : null, c = s && s.appearance ? s.appearance.class : "", p = c ? c.split(" ") : [], l = t.type === "component" ? (C = (w = e.parent) == null ? void 0 : w.parent) == null ? void 0 : C.schema : (P = e.parent) == null ? void 0 : P.schema, d = l && l.appearance && l.appearance.class || "", h = d ? d.split(" ") : [];
401
+ var y, h, M, g;
402
+ const t = e.schema, o = t.appearance && t.appearance.class || "", a = o.split(" ") || [], c = t.contents || [], r = c.length ? c[0] : null, f = r && r.appearance ? r.appearance.class : "", m = f ? f.split(" ") : [], i = (y = r == null ? void 0 : r.contents) != null && y.length ? r == null ? void 0 : r.contents[0] : null, s = i && i.appearance ? i.appearance.class : "", l = s ? s.split(" ") : [], p = t.type === "component" ? (M = (h = e.parent) == null ? void 0 : h.parent) == null ? void 0 : M.schema : (g = e.parent) == null ? void 0 : g.schema, d = p && p.appearance && p.appearance.class || "", v = d ? d.split(" ") : [];
391
403
  return {
392
- componentClass: n,
393
- componentClassList: o,
394
- childContents: i,
404
+ componentClass: o,
405
+ componentClassList: a,
406
+ childContents: c,
395
407
  firstLevelChildSchema: r,
396
- firstLevelChildClass: u,
397
- firstLevelChildClassList: f,
398
- secondLevelChildSchema: s,
399
- secondLevelChildClass: c,
400
- secondLevelChildClassList: p,
401
- parentSchema: l,
408
+ firstLevelChildClass: f,
409
+ firstLevelChildClassList: m,
410
+ secondLevelChildSchema: i,
411
+ secondLevelChildClass: s,
412
+ secondLevelChildClassList: l,
413
+ parentSchema: p,
402
414
  parentClass: d,
403
- parentClassList: h
415
+ parentClassList: v
404
416
  };
405
417
  }
406
418
  }
407
- class ue {
419
+ class de {
408
420
  constructor(e, t) {
409
- y(this, "componentId");
410
- y(this, "viewModelId");
411
- y(this, "eventsEditorUtils");
412
- y(this, "formSchemaUtils");
413
- y(this, "formMetadataConverter");
414
- y(this, "designViewModelUtils");
415
- y(this, "designViewModelField");
416
- y(this, "controlCreatorUtils");
417
- y(this, "designerHostService");
418
- y(this, "schemaService", null);
419
- y(this, "metadataService", null);
420
- y(this, "propertyConfig", {
421
+ V(this, "componentId");
422
+ V(this, "viewModelId");
423
+ V(this, "eventsEditorUtils");
424
+ V(this, "formSchemaUtils");
425
+ V(this, "formMetadataConverter");
426
+ V(this, "designViewModelUtils");
427
+ V(this, "designViewModelField");
428
+ V(this, "controlCreatorUtils");
429
+ V(this, "designerHostService");
430
+ V(this, "schemaService", null);
431
+ V(this, "metadataService", null);
432
+ V(this, "propertyConfig", {
421
433
  type: "object",
422
434
  categories: {}
423
435
  });
424
- var n;
425
- this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((n = this.formSchemaUtils) == null ? void 0 : n.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
436
+ var o;
437
+ this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
426
438
  }
427
439
  getTableInfo() {
428
440
  var e;
429
441
  return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
430
442
  }
431
443
  setDesignViewModelField(e) {
444
+ var o;
432
445
  const t = e.binding && e.binding.type === "Form" && e.binding.field;
433
446
  if (t) {
434
447
  if (!this.designViewModelField) {
435
- const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
436
- this.designViewModelField = n.fields.find((o) => o.id === t);
448
+ const a = this.designViewModelUtils.getDgViewModel(this.viewModelId);
449
+ this.designViewModelField = a.fields.find((c) => c.id === t);
437
450
  }
438
- e.updateOn = this.designViewModelField.updateOn;
451
+ e.updateOn = (o = this.designViewModelField) == null ? void 0 : o.updateOn;
439
452
  }
440
453
  }
441
454
  changeFieldEditorType(e, t) {
@@ -459,7 +472,7 @@ class ue {
459
472
  type: "combo-list",
460
473
  textField: "name",
461
474
  valueField: "value",
462
- data: [{ value: e.type, name: K[e.type].name }]
475
+ data: [{ value: e.type, name: ee[e.type].name }]
463
476
  }
464
477
  }
465
478
  }
@@ -492,14 +505,14 @@ class ue {
492
505
  * @returns
493
506
  */
494
507
  updateElementByParentContainer(e, t) {
495
- const n = t && t.parent && t.parent.schema;
496
- if (!n)
508
+ const o = t && t.parent && t.parent.schema;
509
+ if (!o)
497
510
  return;
498
- const o = n.contents.findIndex((r) => r.id === e), i = N(n.contents[o]);
499
- n.contents.splice(o, 1), n.contents.splice(o, 0, i);
511
+ const a = o.contents.findIndex((r) => r.id === e), c = N(o.contents[a]);
512
+ o.contents.splice(a, 1), o.contents.splice(a, 0, c);
500
513
  }
501
514
  }
502
- class fe extends ue {
515
+ class he extends de {
503
516
  constructor(e, t) {
504
517
  super(e, t);
505
518
  }
@@ -516,67 +529,105 @@ class fe extends ue {
516
529
  label: "onAfterViewInit",
517
530
  name: "视图初始化后事件"
518
531
  }
519
- ];
520
- var n = this;
521
- const o = n.eventsEditorUtils.formProperties(e, n.viewModelId, t), i = {};
522
- i[n.viewModelId] = {
532
+ ], o = this, a = o.eventsEditorUtils.formProperties(e, o.viewModelId, t), c = {};
533
+ c[o.viewModelId] = {
523
534
  type: "events-editor",
524
535
  editor: {
525
- initialData: o
536
+ initialData: a
526
537
  }
527
538
  }, this.propertyConfig.categories.eventsEditor = {
528
539
  title: "事件",
529
540
  hideTitle: !0,
530
- properties: i,
541
+ properties: c,
531
542
  // 这个属性,标记当属性变更得时候触发重新更新属性
532
543
  refreshPanelAfterChanged: !0,
533
544
  tabId: "commands",
534
545
  tabName: "交互",
535
- setPropertyRelates(r, u) {
536
- const f = r.propertyValue;
537
- delete e[n.viewModelId], f && (f.setPropertyRelates = this.setPropertyRelates, n.eventsEditorUtils.saveRelatedParameters(e, n.viewModelId, f.events, f));
546
+ setPropertyRelates(r, f) {
547
+ const m = r.propertyValue;
548
+ delete e[o.viewModelId], m && (m.setPropertyRelates = this.setPropertyRelates, o.eventsEditorUtils.saveRelatedParameters(e, o.viewModelId, m.events, m));
538
549
  }
539
550
  };
540
551
  }
541
552
  }
542
- function me(a, e) {
543
- const t = new le(), { canMove: n, canDelete: o } = t.getTemplateRule(a, e);
544
- function i() {
553
+ function ye(n, e) {
554
+ const t = new me(), { canMove: o, canDelete: a } = t.getTemplateRule(n, e);
555
+ function c() {
545
556
  return !1;
546
557
  }
547
558
  function r() {
548
- return o;
549
- }
550
- function u() {
551
- return n;
559
+ return a;
552
560
  }
553
561
  function f() {
562
+ return o;
563
+ }
564
+ function m() {
554
565
  return !1;
555
566
  }
556
- function s() {
567
+ function i() {
557
568
  return " display: inherit;flex-direction: inherit;margin-bottom:10px";
558
569
  }
559
- function c(p) {
560
- const l = new fe(p, e), d = a.schema;
561
- return l.getPropertyConfig(d);
570
+ function s(y) {
571
+ const h = new he(y, e), { schema: M } = n;
572
+ return h.getPropertyConfig(M);
573
+ }
574
+ function l() {
575
+ var P, T, u, w;
576
+ const y = n == null ? void 0 : n.schema, M = (e == null ? void 0 : e.formSchemaUtils).getViewModelIdByComponentId(y.id);
577
+ if (y.componentType !== "data-grid" && y.componentType !== "form" || !((P = n.componentInstance) != null && P.value.parent))
578
+ return;
579
+ const g = (T = n.componentInstance) == null ? void 0 : T.value.parent.schema;
580
+ if ((u = g == null ? void 0 : g.toolbar) != null && u.buttons && g.toolbar.buttons.length) {
581
+ g.toolbar.buttons.forEach((C) => {
582
+ const E = C.onClick, k = E && E.split(".");
583
+ if (!k || k.length < 3)
584
+ return;
585
+ k[k.length - 2] === M && (C.needRemove = !0);
586
+ }), g.toolbar.buttons = g.toolbar.buttons.filter((C) => !C.needRemove);
587
+ const b = (w = n.componentInstance) == null ? void 0 : w.value.parent;
588
+ b.parent && b.parent.updateToolbarItems && b.parent.updateToolbarItems();
589
+ }
590
+ }
591
+ function p() {
592
+ const y = e == null ? void 0 : e.designViewModelUtils, h = e == null ? void 0 : e.formSchemaUtils, M = n == null ? void 0 : n.schema;
593
+ if (y && h) {
594
+ const g = h.getViewModelIdByComponentId(M.id);
595
+ y.deleteViewModelById(g), h.deleteComponent(M.id);
596
+ }
597
+ }
598
+ function d() {
599
+ const y = e == null ? void 0 : e.designViewModelUtils, h = e == null ? void 0 : e.formSchemaUtils, M = n == null ? void 0 : n.schema, g = h.getViewModelIdByComponentId(M.id);
600
+ y.getDgViewModel(g).fields.forEach((P) => {
601
+ if (h.getExpressions() && h.getExpressions().length) {
602
+ const T = h.getExpressions().findIndex((u) => u.fieldId === P.id);
603
+ T > -1 && h.getExpressions().splice(T, 1);
604
+ }
605
+ });
606
+ }
607
+ function v() {
608
+ l(), d(), p();
562
609
  }
563
- return { canAccepts: i, checkCanDeleteComponent: r, checkCanMoveComponent: u, hideNestedPaddingInDesginerView: f, getStyles: s, getPropsConfig: c };
610
+ return { canAccepts: c, checkCanDeleteComponent: r, checkCanMoveComponent: f, hideNestedPaddingInDesginerView: m, getStyles: i, getPropsConfig: s, onRemoveComponent: v };
564
611
  }
565
- const de = /* @__PURE__ */ $({
612
+ const ge = /* @__PURE__ */ O({
566
613
  name: "FComponetDesign",
567
- props: T,
614
+ props: L,
568
615
  emits: [],
569
- setup(a, e) {
570
- const t = D(), n = E("designer-host-service"), o = E("design-item-context"), i = me(o, n), r = pe(t, o, i);
571
- return F(() => {
572
- t.value.componentInstance = r;
573
- }), e.expose(r.value), () => j("div", {
616
+ setup(n, e) {
617
+ const t = D(), o = A("designer-host-service"), a = A("design-item-context"), c = ye(a, o), r = fe(t, a, c), f = Y(() => Z({
618
+ "drag-container": !0
619
+ }, n == null ? void 0 : n.customClass));
620
+ return j(() => {
621
+ var m, i, s, l;
622
+ t.value.componentInstance = r, ((i = (m = a.parent) == null ? void 0 : m.schema) == null ? void 0 : i.type) === "component-ref" && (r.value.parent = (l = (s = a.parent) == null ? void 0 : s.parent) == null ? void 0 : l.componentInstance);
623
+ }), e.expose(r.value), () => S("div", {
574
624
  ref: t,
575
- class: "drag-container",
576
- "data-dragref": `${o.schema.id}-container`
625
+ class: f.value,
626
+ style: n.customStyle,
627
+ "data-dragref": `${a.schema.id}-container`
577
628
  }, [e.slots.default && e.slots.default()]);
578
629
  }
579
- }), he = "https://json-schema.org/draft/2020-12/schema", ye = "https://farris-design.gitee.io/component.schema.json", ge = "component-ref", ve = "A Farris Visual Component", Ce = "object", be = {
630
+ }), be = "https://json-schema.org/draft/2020-12/schema", ve = "https://farris-design.gitee.io/component.schema.json", Me = "component-ref", we = "A Farris Visual Component", Ce = "object", Ve = {
580
631
  id: {
581
632
  description: "The unique identifier for a Section",
582
633
  type: "string"
@@ -591,37 +642,37 @@ const de = /* @__PURE__ */ $({
591
642
  type: "string",
592
643
  default: ""
593
644
  }
594
- }, Me = [
645
+ }, Pe = [
595
646
  "id",
596
647
  "type",
597
648
  "component"
598
- ], we = {
599
- $schema: he,
600
- $id: ye,
601
- title: ge,
602
- description: ve,
649
+ ], Te = {
650
+ $schema: be,
651
+ $id: ve,
652
+ title: Me,
653
+ description: we,
603
654
  type: Ce,
604
- properties: be,
605
- required: Me
606
- }, Pe = {
655
+ properties: Ve,
656
+ required: Pe
657
+ }, De = {
607
658
  id: { type: String },
608
659
  component: { type: String, default: "" }
609
- }, De = G(Pe, we, W, _), ke = {
610
- install(a) {
611
- a.component(V.name, V);
660
+ }, Ee = W(De, Te, _, Q), Fe = {
661
+ install(n) {
662
+ n.component(B.name, B);
612
663
  },
613
- register(a, e, t, n) {
614
- a.component = V, e.component = A;
664
+ register(n, e, t, o) {
665
+ n.component = B, e.component = F;
615
666
  },
616
- registerDesigner(a, e) {
617
- a.component = de, e.component = A, e["component-ref"] = De;
667
+ registerDesigner(n, e) {
668
+ n.component = ge, e.component = F, e["component-ref"] = Ee;
618
669
  }
619
670
  };
620
671
  export {
621
- V as Component,
622
- de as ComponentDesign,
623
- Se as componentDesignProps,
624
- T as componentProps,
625
- ke as default,
626
- A as propsResolver
672
+ B as Component,
673
+ ge as ComponentDesign,
674
+ $e as componentDesignProps,
675
+ L as componentProps,
676
+ Fe as default,
677
+ F as propsResolver
627
678
  };