@farris/ui-vue 1.2.8 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/components/accordion/index.esm.js +180 -180
  2. package/components/accordion/index.umd.cjs +1 -0
  3. package/components/avatar/index.esm.js +419 -331
  4. package/components/avatar/index.umd.cjs +1 -0
  5. package/components/border-editor/index.umd.cjs +1 -0
  6. package/components/button/index.umd.cjs +1 -0
  7. package/components/button-edit/index.css +1 -1
  8. package/components/button-edit/index.esm.js +346 -326
  9. package/components/button-edit/index.umd.cjs +1 -0
  10. package/components/button-group/index.umd.cjs +1 -0
  11. package/components/calculator/index.umd.cjs +1 -0
  12. package/components/calendar/index.esm.js +384 -384
  13. package/components/calendar/index.umd.cjs +1 -0
  14. package/components/capsule/index.esm.js +205 -205
  15. package/components/capsule/index.umd.cjs +1 -0
  16. package/components/checkbox/index.esm.js +555 -467
  17. package/components/checkbox/index.umd.cjs +1 -0
  18. package/components/color-picker/index.esm.js +239 -239
  19. package/components/color-picker/index.umd.cjs +3 -0
  20. package/components/combo-list/index.css +1 -0
  21. package/components/combo-list/index.esm.js +1072 -364
  22. package/components/combo-list/index.umd.cjs +1 -0
  23. package/components/combo-tree/index.esm.js +129 -129
  24. package/components/combo-tree/index.umd.cjs +1 -0
  25. package/components/common/index.esm.js +778 -700
  26. package/components/common/index.umd.cjs +1 -0
  27. package/components/component/index.esm.js +582 -327
  28. package/components/component/index.umd.cjs +1 -0
  29. package/components/condition/index.css +1 -0
  30. package/components/condition/index.esm.js +2433 -1134
  31. package/components/condition/index.umd.cjs +1 -0
  32. package/components/content-container/index.esm.js +307 -234
  33. package/components/content-container/index.umd.cjs +1 -0
  34. package/components/data-grid/index.css +1 -1
  35. package/components/data-grid/index.esm.js +6762 -4946
  36. package/components/data-grid/index.umd.cjs +1 -0
  37. package/components/data-view/index.css +1 -0
  38. package/components/data-view/index.esm.js +4977 -3489
  39. package/components/data-view/index.umd.cjs +1 -0
  40. package/components/date-picker/index.css +1 -1
  41. package/components/date-picker/index.esm.js +3525 -2811
  42. package/components/date-picker/index.umd.cjs +1 -0
  43. package/components/designer-canvas/index.css +1 -1
  44. package/components/designer-canvas/index.esm.js +938 -928
  45. package/components/designer-canvas/index.umd.cjs +1 -0
  46. package/components/designer-outline/index.css +1 -1
  47. package/components/designer-outline/index.esm.js +38 -37
  48. package/components/designer-outline/index.umd.cjs +1 -0
  49. package/components/designer-toolbox/index.esm.js +36 -12
  50. package/components/designer-toolbox/index.umd.cjs +1 -0
  51. package/components/discussion-editor/index.umd.cjs +3 -0
  52. package/components/discussion-list/index.umd.cjs +1 -0
  53. package/components/drawer/index.umd.cjs +1 -0
  54. package/components/dropdown/index.esm.js +282 -282
  55. package/components/dropdown/index.umd.cjs +2 -0
  56. package/components/dynamic-form/index.css +1 -0
  57. package/components/dynamic-form/index.esm.js +2684 -1039
  58. package/components/dynamic-form/index.umd.cjs +1 -0
  59. package/components/dynamic-resolver/index.esm.js +149 -101
  60. package/components/dynamic-resolver/index.umd.cjs +1 -0
  61. package/components/dynamic-view/index.esm.js +303 -290
  62. package/components/dynamic-view/index.umd.cjs +1 -0
  63. package/components/enum-editor/index.umd.cjs +1 -0
  64. package/components/events-editor/index.esm.js +573 -518
  65. package/components/events-editor/index.umd.cjs +1 -0
  66. package/components/expression-editor/index.esm.js +99 -99
  67. package/components/expression-editor/index.umd.cjs +1 -0
  68. package/components/external-container/index.css +1 -1
  69. package/components/external-container/index.esm.js +3607 -2799
  70. package/components/external-container/index.umd.cjs +1 -0
  71. package/components/field-selector/index.css +1 -1
  72. package/components/field-selector/index.esm.js +5438 -8236
  73. package/components/field-selector/index.umd.cjs +1 -0
  74. package/components/filter-bar/index.css +1 -1
  75. package/components/filter-bar/index.esm.js +1679 -1759
  76. package/components/filter-bar/index.umd.cjs +1 -0
  77. package/components/flow-canvas/index.css +1 -1
  78. package/components/flow-canvas/index.esm.js +1062 -1052
  79. package/components/flow-canvas/index.umd.cjs +1 -0
  80. package/components/image-cropper/index.esm.js +421 -421
  81. package/components/image-cropper/index.umd.cjs +1 -0
  82. package/components/input-group/index.esm.js +677 -593
  83. package/components/input-group/index.umd.cjs +1 -0
  84. package/components/layout/index.esm.js +326 -326
  85. package/components/layout/index.umd.cjs +1 -0
  86. package/components/list-nav/index.esm.js +272 -199
  87. package/components/list-nav/index.umd.cjs +1 -0
  88. package/components/list-view/index.css +1 -1
  89. package/components/list-view/index.esm.js +3739 -2273
  90. package/components/list-view/index.umd.cjs +1 -0
  91. package/components/loading/index.umd.cjs +8 -0
  92. package/components/locale/index.umd.cjs +1 -0
  93. package/components/lookup/index.css +1 -1
  94. package/components/lookup/index.esm.js +11255 -9004
  95. package/components/lookup/index.umd.cjs +1 -0
  96. package/components/mapping-editor/index.css +1 -1
  97. package/components/mapping-editor/index.esm.js +6046 -5314
  98. package/components/mapping-editor/index.umd.cjs +1 -0
  99. package/components/message-box/index.css +1 -1
  100. package/components/message-box/index.esm.js +511 -471
  101. package/components/message-box/index.umd.cjs +1 -0
  102. package/components/modal/index.css +1 -1
  103. package/components/modal/index.esm.js +438 -398
  104. package/components/modal/index.umd.cjs +1 -0
  105. package/components/nav/index.esm.js +588 -444
  106. package/components/nav/index.umd.cjs +3 -0
  107. package/components/notify/index.esm.js +59 -53
  108. package/components/notify/index.umd.cjs +1 -0
  109. package/components/number-range/index.esm.js +568 -485
  110. package/components/number-range/index.umd.cjs +1 -0
  111. package/components/number-spinner/index.esm.js +542 -454
  112. package/components/number-spinner/index.umd.cjs +1 -0
  113. package/components/order/index.css +1 -1
  114. package/components/order/index.esm.js +1967 -1105
  115. package/components/order/index.umd.cjs +1 -0
  116. package/components/page-footer/index.esm.js +160 -160
  117. package/components/page-footer/index.umd.cjs +1 -0
  118. package/components/page-header/index.esm.js +1282 -1151
  119. package/components/page-header/index.umd.cjs +1 -0
  120. package/components/pagination/index.esm.js +705 -555
  121. package/components/pagination/index.umd.cjs +1 -0
  122. package/components/popover/index.esm.js +71 -70
  123. package/components/popover/index.umd.cjs +1 -0
  124. package/components/progress/index.esm.js +270 -270
  125. package/components/progress/index.umd.cjs +3 -0
  126. package/components/property-editor/index.css +1 -1
  127. package/components/property-editor/index.esm.js +2231 -1517
  128. package/components/property-editor/index.umd.cjs +3 -0
  129. package/components/property-panel/index.esm.js +813 -909
  130. package/components/property-panel/index.umd.cjs +1 -0
  131. package/components/query-solution/index.css +1 -1
  132. package/components/query-solution/index.esm.js +3781 -2566
  133. package/components/query-solution/index.umd.cjs +1 -0
  134. package/components/radio-button/index.esm.js +101 -101
  135. package/components/radio-button/index.umd.cjs +1 -0
  136. package/components/radio-group/index.esm.js +538 -450
  137. package/components/radio-group/index.umd.cjs +1 -0
  138. package/components/rate/index.esm.js +238 -233
  139. package/components/rate/index.umd.cjs +1 -0
  140. package/components/response-layout/index.esm.js +155 -155
  141. package/components/response-layout/index.umd.cjs +1 -0
  142. package/components/response-layout-editor/index.css +1 -1
  143. package/components/response-layout-editor/index.esm.js +1243 -1180
  144. package/components/response-layout-editor/index.umd.cjs +1 -0
  145. package/components/response-toolbar/index.esm.js +988 -877
  146. package/components/response-toolbar/index.umd.cjs +1 -0
  147. package/components/schema-selector/index.css +1 -1
  148. package/components/schema-selector/index.esm.js +5413 -4867
  149. package/components/schema-selector/index.umd.cjs +8 -0
  150. package/components/search-box/index.esm.js +199 -199
  151. package/components/search-box/index.umd.cjs +1 -0
  152. package/components/section/index.esm.js +646 -503
  153. package/components/section/index.umd.cjs +1 -0
  154. package/components/smoke-detector/index.esm.js +144 -144
  155. package/components/smoke-detector/index.umd.cjs +1 -0
  156. package/components/spacing-editor/index.umd.cjs +1 -0
  157. package/components/splitter/index.esm.js +464 -391
  158. package/components/splitter/index.umd.cjs +1 -0
  159. package/components/step/index.esm.js +249 -249
  160. package/components/step/index.umd.cjs +1 -0
  161. package/components/switch/index.esm.js +483 -394
  162. package/components/switch/index.umd.cjs +1 -0
  163. package/components/tabs/index.css +1 -1
  164. package/components/tabs/index.esm.js +2366 -2208
  165. package/components/tabs/index.umd.cjs +1 -0
  166. package/components/tags/index.esm.js +397 -399
  167. package/components/tags/index.umd.cjs +1 -0
  168. package/components/text/index.esm.js +394 -394
  169. package/components/text/index.umd.cjs +1 -0
  170. package/components/textarea/index.esm.js +451 -367
  171. package/components/textarea/index.umd.cjs +1 -0
  172. package/components/time-picker/index.css +1 -1
  173. package/components/time-picker/index.esm.js +1252 -1144
  174. package/components/time-picker/index.umd.cjs +1 -0
  175. package/components/tooltip/index.umd.cjs +1 -0
  176. package/components/transfer/index.css +1 -1
  177. package/components/transfer/index.esm.js +510 -499
  178. package/components/transfer/index.umd.cjs +1 -0
  179. package/components/tree-grid/index.css +1 -1
  180. package/components/tree-grid/index.esm.js +5463 -9330
  181. package/components/tree-grid/index.umd.cjs +1 -0
  182. package/components/tree-view/index.css +1 -0
  183. package/components/tree-view/index.esm.js +4058 -2597
  184. package/components/tree-view/index.umd.cjs +1 -0
  185. package/components/uploader/index.esm.js +510 -504
  186. package/components/uploader/index.umd.cjs +2 -0
  187. package/components/verify-detail/index.esm.js +220 -220
  188. package/components/verify-detail/index.umd.cjs +1 -0
  189. package/components/video/index.esm.js +653 -394
  190. package/components/video/index.umd.cjs +1 -0
  191. package/components/weather/index.esm.js +1028 -1028
  192. package/components/weather/index.umd.cjs +16 -0
  193. package/farris.all.esm.js +20407 -18556
  194. package/farris.all.umd.cjs +8 -8
  195. package/index.css +1 -1
  196. package/package.json +1 -1
  197. package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
  198. package/types/capsule/src/capsule.props.d.ts +2 -2
  199. package/types/combo-list/src/components/list-container.props.d.ts +1 -1
  200. package/types/common/entity/entity-schema.d.ts +258 -0
  201. package/types/common/index.d.ts +1 -0
  202. package/types/common/types.d.ts +1 -1
  203. package/types/common/utils/encrypt.d.ts +2 -0
  204. package/types/component/src/component-ref.props.d.ts +4 -0
  205. package/types/component/src/component.props.d.ts +7 -0
  206. package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
  207. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  208. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  209. package/types/components.d.ts +1 -0
  210. package/types/data-grid/index.d.ts +8 -2
  211. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
  212. package/types/data-grid/src/data-grid.component.d.ts +3 -1
  213. package/types/data-grid/src/data-grid.props.d.ts +3 -2
  214. package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
  215. package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
  216. package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
  217. package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
  218. package/types/data-view/components/column-format/date.component.d.ts +4 -0
  219. package/types/data-view/components/column-format/enum.component.d.ts +4 -0
  220. package/types/data-view/components/column-format/number.component.d.ts +4 -0
  221. package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
  222. package/types/data-view/composition/types.d.ts +36 -7
  223. package/types/data-view/composition/use-edit.d.ts +2 -1
  224. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  225. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  226. package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
  227. package/types/designer-canvas/src/composition/types.d.ts +1 -1
  228. package/types/designer-canvas/src/types.d.ts +2 -2
  229. package/types/dynamic-form/index.d.ts +2 -1
  230. package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
  231. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  232. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  233. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  234. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  235. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  236. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  237. package/types/dynamic-form/src/schema/schema-resolver.d.ts +3 -1
  238. package/types/dynamic-form/src/types.d.ts +12 -1
  239. package/types/dynamic-resolver/index.d.ts +1 -0
  240. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  241. package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
  242. package/types/dynamic-resolver/src/types.d.ts +12 -2
  243. package/types/dynamic-view/index.d.ts +1 -0
  244. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  245. package/types/index.d.ts +2 -0
  246. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  247. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  248. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  249. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  250. package/types/lookup/src/composition/types.d.ts +8 -0
  251. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  252. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  253. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  254. package/types/lookup/src/composition/use-http.d.ts +9 -5
  255. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  256. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  257. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  258. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  259. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  260. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  261. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  262. package/types/modal/src/modal.component.d.ts +3 -0
  263. package/types/modal/src/modal.props.d.ts +4 -0
  264. package/types/page-header/src/page-header.props.d.ts +1 -0
  265. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  266. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  267. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  268. package/types/response-layout-editor/src/type.d.ts +21 -0
  269. package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
  270. package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
  271. package/types/section/src/property-config/section.property-config.d.ts +93 -0
  272. package/types/section/src/schema/schema-resolver.d.ts +2 -1
  273. package/types/tabs/src/composition/types.d.ts +2 -2
  274. package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
  275. package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
  276. package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
  277. package/types/tabs/src/tabs.props.d.ts +1 -0
  278. package/types/tags/index.d.ts +36 -5
  279. package/types/tree-grid/index.d.ts +8 -2
  280. package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
  281. package/types/modal/src/composition/use-esc.d.ts +0 -1
  282. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  283. package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
@@ -1,121 +1,167 @@
1
- import { defineComponent as F, onBeforeMount as z, onMounted as L, createVNode as q, ref as M, inject as G } from "vue";
2
- import { cloneDeep as H } from "lodash-es";
3
- const W = {}, _ = {};
4
- function V(c) {
5
- const { properties: e, title: t } = c, s = Object.keys(e).reduce((p, y) => (p[y] = e[y].type === "object" && e[y].properties ? V(e[y]) : H(e[y].default), p), {});
6
- return s.id = `${t}-${Date.now()}`, s;
1
+ var ee = Object.defineProperty;
2
+ var te = (r, e, t) => e in r ? ee(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var M = (r, e, t) => te(r, typeof e != "symbol" ? e + "" : e, t);
4
+ import { defineComponent as z, onBeforeMount as ne, onMounted as Q, createVNode as X, ref as E, inject as W } from "vue";
5
+ import { isPlainObject as _, cloneDeep as Y } from "lodash-es";
6
+ const Z = {}, x = {};
7
+ function F(r) {
8
+ const { properties: e, title: t, ignore: n } = r, s = n && Array.isArray(n), u = Object.keys(e).reduce((y, g) => ((!s || !n.find((P) => P == g)) && (y[g] = e[g].type === "object" && e[g].properties ? F(e[g]) : Y(e[g].default)), y), {});
9
+ return (!s || !n.find((y) => y == "id")) && (u.id = `${t}-${Date.now()}`), u;
7
10
  }
8
- function $(c, e = {}) {
9
- const t = W[c];
10
- if (t) {
11
- let s = V(t);
12
- const p = _[c];
13
- return s = p ? p({ getSchemaByType: $ }, s, e) : s, s;
11
+ function B(r, e = {}, t) {
12
+ const n = Z[r];
13
+ if (n) {
14
+ let s = F(n);
15
+ const u = x[r];
16
+ return s = u ? u({ getSchemaByType: B }, s, e, t) : s, s;
14
17
  }
15
18
  return null;
16
19
  }
17
- function Q(c, e) {
18
- const t = V(e);
19
- return Object.keys(c).reduce((s, p) => (s[p] && typeof s[p] == "object" ? Object.assign(s[p], c[p]) : s[p] = c[p], s), t), t;
20
+ function oe(r, e) {
21
+ const t = F(e);
22
+ return Object.keys(r).reduce((n, s) => (n[s] && _(n[s]) && _(r[s]) ? Object.assign(n[s], r[s]) : n[s] = r[s], n), t), t;
20
23
  }
21
- function U(c, e) {
22
- return Object.keys(c).filter((s) => c[s] != null).reduce((s, p) => {
23
- if (e.has(p)) {
24
- const y = e.get(p);
25
- if (typeof y == "string")
26
- s[y] = c[p];
24
+ function re(r, e) {
25
+ return Object.keys(r).filter((n) => r[n] != null).reduce((n, s) => {
26
+ if (e.has(s)) {
27
+ const u = e.get(s);
28
+ if (typeof u == "string")
29
+ n[u] = r[s];
27
30
  else {
28
- const m = y(p, c[p], c);
29
- Object.assign(s, m);
31
+ const y = u(s, r[s], r);
32
+ Object.assign(n, y);
30
33
  }
31
34
  } else
32
- s[p] = c[p];
33
- return s;
35
+ n[s] = r[s];
36
+ return n;
34
37
  }, {});
35
38
  }
36
- function X(c, e, t = /* @__PURE__ */ new Map()) {
37
- const s = Q(c, e);
38
- return U(s, t);
39
+ function se(r, e, t = /* @__PURE__ */ new Map()) {
40
+ const n = oe(r, e);
41
+ return re(n, t);
39
42
  }
40
- function Y(c = {}) {
41
- function e(a, d, l, u) {
42
- if (typeof l == "number")
43
- return u[a].length === l;
44
- if (typeof l == "object") {
45
- const g = Object.keys(l)[0], n = l[g];
46
- if (g === "not")
47
- return Number(u[a].length) !== Number(n);
48
- if (g === "moreThan")
49
- return Number(u[a].length) >= Number(n);
50
- if (g === "lessThan")
51
- return Number(u[a].length) <= Number(n);
43
+ function ce(r = {}) {
44
+ function e(a, d, f, m) {
45
+ if (typeof f == "number")
46
+ return m[a].length === f;
47
+ if (typeof f == "object") {
48
+ const j = Object.keys(f)[0], o = f[j];
49
+ if (j === "not")
50
+ return Number(m[a].length) !== Number(o);
51
+ if (j === "moreThan")
52
+ return Number(m[a].length) >= Number(o);
53
+ if (j === "lessThan")
54
+ return Number(m[a].length) <= Number(o);
52
55
  }
53
56
  return !1;
54
57
  }
55
- function t(a, d, l, u) {
56
- return u[a] && u[a].propertyValue && String(u[a].propertyValue.value) === String(l);
58
+ function t(a, d, f, m) {
59
+ return m[a] && m[a].propertyValue && String(m[a].propertyValue.value) === String(f);
57
60
  }
58
- const s = /* @__PURE__ */ new Map([
61
+ const n = /* @__PURE__ */ new Map([
59
62
  ["length", e],
60
63
  ["getProperty", t]
61
64
  ]);
62
- Object.keys(c).reduce((a, d) => (a.set(d, c[d]), a), s);
63
- function p(a, d) {
64
- const l = a;
65
- return typeof d == "number" ? [{ target: l, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: l, operator: "getProperty", param: a, value: !!d }] : typeof d == "object" ? Object.keys(d).map((u) => {
66
- if (u === "length")
67
- return { target: l, operator: "length", param: null, value: d[u] };
68
- const g = u, n = d[u];
69
- return { target: l, operator: "getProperty", param: g, value: n };
65
+ Object.keys(r).reduce((a, d) => (a.set(d, r[d]), a), n);
66
+ function s(a, d) {
67
+ const f = a;
68
+ return typeof d == "number" ? [{ target: f, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: f, operator: "getProperty", param: a, value: !!d }] : typeof d == "object" ? Object.keys(d).map((m) => {
69
+ if (m === "length")
70
+ return { target: f, operator: "length", param: null, value: d[m] };
71
+ const j = m, o = d[m];
72
+ return { target: f, operator: "getProperty", param: j, value: o };
70
73
  }) : [];
71
74
  }
72
- function y(a) {
73
- return Object.keys(a).reduce((l, u) => {
74
- const g = p(u, a[u]);
75
- return l.push(...g), l;
75
+ function u(a) {
76
+ return Object.keys(a).reduce((f, m) => {
77
+ const j = s(m, a[m]);
78
+ return f.push(...j), f;
76
79
  }, []);
77
80
  }
78
- function m(a, d) {
79
- if (s.has(a.operator)) {
80
- const l = s.get(a.operator);
81
- return l && l(a.target, a.param, a.value, d) || !1;
81
+ function y(a, d) {
82
+ if (n.has(a.operator)) {
83
+ const f = n.get(a.operator);
84
+ return f && f(a.target, a.param, a.value, d) || !1;
82
85
  }
83
86
  return !1;
84
87
  }
85
- function P(a, d) {
86
- return y(a).reduce((g, n) => g && m(n, d), !0);
88
+ function g(a, d) {
89
+ return u(a).reduce((j, o) => j && y(o, d), !0);
87
90
  }
88
- function D(a, d) {
89
- const l = Object.keys(a), u = l.includes("allOf"), g = l.includes("anyOf"), n = u || g, i = (n ? a[n ? u ? "allOf" : "anyOf" : "allOf"] : [a]).map((b) => P(b, d));
90
- return u ? !i.includes(!1) : i.includes(!0);
91
+ function P(a, d) {
92
+ const f = Object.keys(a), m = f.includes("allOf"), j = f.includes("anyOf"), o = m || j, p = (o ? a[o ? m ? "allOf" : "anyOf" : "allOf"] : [a]).map((h) => g(h, d));
93
+ return m ? !p.includes(!1) : p.includes(!0);
91
94
  }
92
- return { parseValueSchema: D };
95
+ return { parseValueSchema: P };
93
96
  }
94
- const Z = {}, K = {};
95
- Y();
96
- function R(c, e, t = /* @__PURE__ */ new Map(), s = (m, P, D) => P, p = {}, y = (m) => m) {
97
- return W[e.title] = e, _[e.title] = s, Z[e.title] = p, K[e.title] = y, (m = {}) => {
98
- const P = X(m, e, t), D = Object.keys(c).reduce((a, d) => (a[d] = c[d].default, a), {});
99
- return Object.assign(D, P);
97
+ const ie = {
98
+ button: { type: "button", name: "按钮", icon: "Button" },
99
+ "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
100
+ "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
101
+ "content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
102
+ "input-group": { type: "input-group", name: "文本", icon: "TextBox" },
103
+ textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
104
+ lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
105
+ "number-spinner": { type: "number-spinner", name: "数值", icon: "NumericBox" },
106
+ "date-picker": { type: "date-picker", name: "日期", icon: "DateBox" },
107
+ switch: { type: "switch", name: "开关", icon: "SwitchField" },
108
+ "radio-group": { type: "radio-group", name: "单选组", icon: "RadioGroup" },
109
+ "check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
110
+ "check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
111
+ "combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
112
+ "response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
113
+ "response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
114
+ "response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
115
+ "tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
116
+ "tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
117
+ "data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
118
+ "data-grid-column": { type: "data-grid-column", name: "表格列" },
119
+ module: { type: "Module", name: "模块", icon: "Module" },
120
+ component: { type: "component", name: "组件", icon: "Component" },
121
+ tabs: { type: "tabs", name: "标签页", icon: "Tab" },
122
+ "tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
123
+ "tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
124
+ "time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
125
+ section: { type: "section", name: "分组面板", icon: "Section" },
126
+ "section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
127
+ "section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
128
+ splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
129
+ "splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
130
+ "component-ref": { type: "component-ref", name: "组件引用节点" },
131
+ uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
132
+ "page-header": { type: "page-header", name: "页头", icon: "Header" },
133
+ "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
134
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
135
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
136
+ }, ae = {}, pe = {};
137
+ ce();
138
+ function H(r, e, t = /* @__PURE__ */ new Map(), n = (y, g, P) => g, s = {}, u = (y) => y) {
139
+ return Z[e.title] = e, x[e.title] = n, ae[e.title] = s, pe[e.title] = u, (y = {}) => {
140
+ const g = se(y, e, t), P = Object.keys(r).reduce((a, d) => (a[d] = r[d].default, a), {});
141
+ return Object.assign(P, g);
100
142
  };
101
143
  }
102
- function x(c, e) {
144
+ function le(r, e) {
103
145
  return { customClass: e.class, customStyle: e.style };
104
146
  }
105
- const I = /* @__PURE__ */ new Map([
106
- ["appearance", x]
107
- ]), ee = "https://json-schema.org/draft/2020-12/schema", te = "https://farris-design.gitee.io/component.schema.json", ne = "component", oe = "A Farris Visual Component", re = "object", ce = {
147
+ const R = /* @__PURE__ */ new Map([
148
+ ["appearance", le]
149
+ ]), ue = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-design.gitee.io/component.schema.json", de = "component", ye = "A Farris Visual Component", me = "object", he = {
108
150
  id: {
109
- description: "The unique identifier for a Section",
151
+ description: "The unique identifier for a component",
110
152
  type: "string"
111
153
  },
112
154
  type: {
113
- description: "The type string of Section component",
155
+ description: "The type string of component",
114
156
  type: "string",
115
157
  default: "component"
116
158
  },
117
159
  componentType: {
118
- description: "The type string of Section component",
160
+ description: "The type string of component",
161
+ type: "string"
162
+ },
163
+ viewModel: {
164
+ description: "The viewModel string of component",
119
165
  type: "string"
120
166
  },
121
167
  appearance: {
@@ -140,100 +186,62 @@ const I = /* @__PURE__ */ new Map([
140
186
  description: "",
141
187
  type: "boolean",
142
188
  default: !0
189
+ },
190
+ onInit: {
191
+ description: "初始化事件",
192
+ type: "string",
193
+ default: ""
194
+ },
195
+ onAfterViewInit: {
196
+ description: "视图初始化后事件",
197
+ type: "string",
198
+ default: ""
143
199
  }
144
- }, se = [
200
+ }, be = [
145
201
  "id",
146
202
  "type",
147
203
  "contents"
148
- ], ae = {
149
- $schema: ee,
150
- $id: te,
151
- title: ne,
152
- description: oe,
153
- type: re,
154
- properties: ce,
155
- required: se
204
+ ], ge = {
205
+ $schema: ue,
206
+ $id: fe,
207
+ title: de,
208
+ description: ye,
209
+ type: me,
210
+ properties: he,
211
+ required: be
156
212
  };
157
- function pe(c, e, t) {
213
+ function I(r, e, t) {
158
214
  return e;
159
215
  }
160
- const ie = "accordion", le = "A Farris Component", ue = "object", fe = {
161
- basic: {
162
- description: "Basic Infomation",
163
- title: "基本信息",
164
- properties: {
165
- id: {
166
- description: "组件标识",
167
- title: "标识",
168
- type: "string",
169
- readonly: !0
170
- },
171
- type: {
172
- description: "组件类型",
173
- title: "控件类型",
174
- type: "select",
175
- editor: {
176
- type: "combo-list",
177
- textField: "value",
178
- valueField: "key",
179
- data: [
180
- {
181
- key: "component",
182
- value: "组件"
183
- }
184
- ]
185
- }
186
- }
187
- }
188
- },
189
- appearance: {
190
- description: "",
191
- title: "外观",
192
- properties: {
193
- class: {
194
- description: "组件的CSS样式",
195
- title: "class样式"
196
- },
197
- style: {
198
- description: "组件的内容样式",
199
- title: "style样式"
200
- }
201
- }
202
- }
203
- }, de = {
204
- title: ie,
205
- description: le,
206
- type: ue,
207
- categories: fe
208
- }, k = {
216
+ const D = {
209
217
  id: { type: String },
210
218
  customClass: { type: String, default: "" },
211
219
  componentType: { type: String, default: "" }
212
- }, B = R(k, ae, I, pe, de), E = /* @__PURE__ */ F({
220
+ }, J = H(D, ge, R, I), Qe = Object.assign({}, D, { componentId: { type: String, default: "" } }), k = /* @__PURE__ */ z({
213
221
  name: "FComponent",
214
- props: k,
222
+ props: D,
215
223
  emits: ["init", "afterViewInit"],
216
- setup(c, e) {
217
- return z(() => {
218
- e.emit("init", c.id);
219
- }), L(() => {
220
- e.emit("afterViewInit", c.id);
221
- }), () => q("div", {
222
- class: c.customClass
224
+ setup(r, e) {
225
+ return ne(() => {
226
+ e.emit("init", r.id);
227
+ }), Q(() => {
228
+ e.emit("afterViewInit", r.id);
229
+ }), () => X("div", {
230
+ class: r.customClass
223
231
  }, [e.slots.default && e.slots.default()]);
224
232
  }
225
233
  });
226
- function ye(c, e, t) {
227
- var O;
228
- function s() {
234
+ function je(r, e, t) {
235
+ var S;
236
+ function n() {
229
237
  t != null && t.resolveComponentContext && t.resolveComponentContext();
230
238
  }
231
- s();
232
- const p = t && t.getStyles && t.getStyles() || "", y = t && t.getDesignerClass && t.getDesignerClass() || "", m = M();
233
- function P() {
239
+ n();
240
+ const s = t && t.getStyles && t.getStyles() || "", u = t && t.getDesignerClass && t.getDesignerClass() || "", y = E();
241
+ function g() {
234
242
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
235
243
  }
236
- function D() {
244
+ function P() {
237
245
  return !1;
238
246
  }
239
247
  function a() {
@@ -242,77 +250,77 @@ function ye(c, e, t) {
242
250
  function d() {
243
251
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
244
252
  }
245
- function l(f) {
246
- if (!f || !f.value)
253
+ function f(l) {
254
+ if (!l || !l.value)
247
255
  return null;
248
- if (f.value.schema && f.value.schema.type === "component")
249
- return f.value;
250
- const v = M(f == null ? void 0 : f.value.parent), h = l(v);
251
- return h || null;
256
+ if (l.value.schema && l.value.schema.type === "component")
257
+ return l.value;
258
+ const v = E(l == null ? void 0 : l.value.parent), C = f(v);
259
+ return C || null;
252
260
  }
253
- function u(f = e) {
254
- const { componentInstance: v, designerItemElementRef: h } = f;
255
- return !v || !v.value ? null : v.value.canMove ? h : u(f.parent);
261
+ function m(l = e) {
262
+ const { componentInstance: v, designerItemElementRef: C } = l;
263
+ return !v || !v.value ? null : v.value.canMove ? C : m(l.parent);
256
264
  }
257
- function g(f) {
258
- return !!t && t.canAccepts(f);
265
+ function j(l) {
266
+ return !!t && t.canAccepts(l);
259
267
  }
260
- function n() {
268
+ function o() {
261
269
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
262
270
  }
263
- function r() {
271
+ function i() {
264
272
  }
265
- function o(f, v) {
273
+ function c(l, v) {
266
274
  v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
267
275
  }
268
- function i(f) {
269
- const { componentType: v } = f;
270
- let h = $(v, f);
271
- t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(f, h));
272
- const T = v.toLowerCase().replace("-", "_");
273
- return h && !h.id && h.type === v && (h.id = `${T}_${Math.random().toString().slice(2, 6)}`), h;
276
+ function p(l, v) {
277
+ const { componentType: C } = l;
278
+ let T = B(C, l, v);
279
+ t && t.onResolveNewComponentSchema && (T = t.onResolveNewComponentSchema(l, T));
280
+ const O = C.toLowerCase().replace("-", "_");
281
+ return T && !T.id && T.type === C && (T.id = `${O}_${Math.random().toString().slice(2, 6)}`), T;
274
282
  }
275
- function j(f, v) {
276
- const h = String(f.getAttribute("data-controltype")), T = f.getAttribute("data-feature"), w = T ? JSON.parse(T) : {};
277
- w.parentComponentInstance = m.value;
278
- let A = $(h, w);
279
- t && t.onAcceptNewChildElement && (A = t.onAcceptNewChildElement(f, v, A));
280
- const N = h.toLowerCase().replace("-", "_");
281
- return A && !A.id && A.type === h && (A.id = `${N}_${Math.random().toString().slice(2, 6)}`), A;
283
+ function b(l, v) {
284
+ const C = String(l.getAttribute("data-controltype")), T = l.getAttribute("data-feature"), O = T ? JSON.parse(T) : {};
285
+ O.parentComponentInstance = y.value;
286
+ let A = B(C, O);
287
+ t && t.onAcceptNewChildElement && (A = t.onAcceptNewChildElement(l, v, A));
288
+ const V = C.toLowerCase().replace("-", "_");
289
+ return A && !A.id && A.type === C && (A.id = `${V}_${Math.random().toString().slice(2, 6)}`), A;
282
290
  }
283
- function b(f) {
291
+ function h(l) {
284
292
  }
285
- function C(...f) {
293
+ function w(...l) {
286
294
  if (t && t.getPropsConfig)
287
- return t.getPropsConfig(...f);
295
+ return t.getPropsConfig(...l);
288
296
  }
289
- return m.value = {
290
- canMove: P(),
291
- canSelectParent: D(),
297
+ return y.value = {
298
+ canMove: g(),
299
+ canSelectParent: P(),
292
300
  canDelete: a(),
293
301
  canNested: !d(),
294
302
  contents: e == null ? void 0 : e.schema.contents,
295
- elementRef: c,
296
- parent: (O = e == null ? void 0 : e.parent) == null ? void 0 : O.componentInstance,
303
+ elementRef: r,
304
+ parent: (S = e == null ? void 0 : e.parent) == null ? void 0 : S.componentInstance,
297
305
  schema: e == null ? void 0 : e.schema,
298
- styles: p,
299
- designerClass: y,
300
- canAccepts: g,
301
- getBelongedComponentInstance: l,
302
- getDraggableDesignItemElement: u,
303
- getDraggingDisplayText: n,
304
- getPropConfig: C,
305
- getDragScopeElement: r,
306
- onAcceptMovedChildElement: o,
307
- onAcceptNewChildElement: j,
308
- onChildElementMovedOut: b,
309
- addNewChildComponentSchema: i,
310
- updateDragAndDropRules: s,
311
- triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || M(!1),
312
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || M(!1)
313
- }, m;
306
+ styles: s,
307
+ designerClass: u,
308
+ canAccepts: j,
309
+ getBelongedComponentInstance: f,
310
+ getDraggableDesignItemElement: m,
311
+ getDraggingDisplayText: o,
312
+ getPropConfig: w,
313
+ getDragScopeElement: i,
314
+ onAcceptMovedChildElement: c,
315
+ onAcceptNewChildElement: b,
316
+ onChildElementMovedOut: h,
317
+ addNewChildComponentSchema: p,
318
+ updateDragAndDropRules: n,
319
+ triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || E(!1),
320
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || E(!1)
321
+ }, y;
314
322
  }
315
- const be = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-design.gitee.io/dragging-rules.schema.json", me = "Dragging Rules", ge = "The rules of designer canvas", je = "object", Ce = {
323
+ const ve = "https://json-schema.org/draft/2020-12/schema", Ce = "https://farris-design.gitee.io/dragging-rules.schema.json", Pe = "Dragging Rules", we = "The rules of designer canvas", Me = "object", Te = {
316
324
  "f-page": {
317
325
  description: "The root class of page designed by farris.",
318
326
  type: "object",
@@ -731,6 +739,80 @@ const be = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-
731
739
  "f-list-nav-left": {
732
740
  description: "",
733
741
  type: "object"
742
+ },
743
+ "f-struct-data-grid-in-nav": {
744
+ description: "",
745
+ type: "object",
746
+ properties: {
747
+ contents: {
748
+ type: "object",
749
+ properties: {
750
+ "f-section-form": {
751
+ description: "",
752
+ type: "object",
753
+ properties: {
754
+ rules: {
755
+ type: "object",
756
+ properties: {
757
+ canAccept: {
758
+ type: "boolean",
759
+ const: !1
760
+ },
761
+ fixed: {
762
+ type: "boolean",
763
+ const: !0
764
+ },
765
+ hidePadding: {
766
+ type: "boolean",
767
+ const: !0
768
+ }
769
+ }
770
+ }
771
+ }
772
+ },
773
+ "f-section-grid": {
774
+ description: "",
775
+ type: "object",
776
+ properties: {
777
+ rules: {
778
+ type: "object",
779
+ properties: {
780
+ canAccept: {
781
+ type: "boolean",
782
+ const: !1
783
+ },
784
+ fixed: {
785
+ type: "boolean",
786
+ const: !0
787
+ },
788
+ hidePadding: {
789
+ type: "boolean",
790
+ const: !0
791
+ }
792
+ }
793
+ }
794
+ }
795
+ }
796
+ }
797
+ },
798
+ rules: {
799
+ type: "object",
800
+ properties: {
801
+ canAccept: {
802
+ type: "boolean",
803
+ const: !1
804
+ },
805
+ fixed: {
806
+ type: "boolean",
807
+ const: !0
808
+ },
809
+ hidePadding: {
810
+ type: "boolean",
811
+ const: !0
812
+ }
813
+ }
814
+ }
815
+ }
734
816
  }
735
817
  }
736
818
  }
@@ -876,175 +958,348 @@ const be = "https://json-schema.org/draft/2020-12/schema", he = "https://farris-
876
958
  description: "",
877
959
  type: "object"
878
960
  }
879
- }, ve = [], Pe = {
880
- $schema: be,
881
- $id: he,
882
- title: me,
883
- description: ge,
884
- type: je,
885
- properties: Ce,
886
- required: ve
887
- }, S = /* @__PURE__ */ new Map();
888
- function Ae() {
889
- function c(n, r, o, i) {
890
- var j;
891
- if (typeof o == "number")
892
- return ((j = i[n]) == null ? void 0 : j.length) === o;
893
- if (typeof o == "object") {
894
- const b = Object.keys(o)[0], C = o[b];
895
- if (b === "not")
896
- return Number(i[n].length) !== Number(C);
897
- if (b === "moreThan")
898
- return Number(i[n].length) >= Number(C);
899
- if (b === "lessThan")
900
- return Number(i[n].length) <= Number(C);
961
+ }, Ae = {
962
+ $schema: ve,
963
+ $id: Ce,
964
+ title: Pe,
965
+ description: we,
966
+ type: Me,
967
+ properties: Te
968
+ }, N = /* @__PURE__ */ new Map();
969
+ function Se() {
970
+ function r(o, i, c, p) {
971
+ var b;
972
+ if (typeof c == "number")
973
+ return ((b = p[o]) == null ? void 0 : b.length) === c;
974
+ if (typeof c == "object") {
975
+ const h = Object.keys(c)[0], w = c[h];
976
+ if (h === "not")
977
+ return Number(p[o].length) !== Number(w);
978
+ if (h === "moreThan")
979
+ return Number(p[o].length) >= Number(w);
980
+ if (h === "lessThan")
981
+ return Number(p[o].length) <= Number(w);
901
982
  }
902
983
  return !1;
903
984
  }
904
- function e(n, r, o, i) {
905
- return typeof o == "boolean" ? i.childrenClassList.includes(r) === !!o : !1;
985
+ function e(o, i, c, p) {
986
+ return typeof c == "boolean" ? p.childrenClassList.includes(i) === !!c : !1;
906
987
  }
907
- function t(n, r, o, i) {
908
- return typeof o == "boolean" ? i.parentClassList.includes(r) === !!o : !1;
988
+ function t(o, i, c, p) {
989
+ return typeof c == "boolean" ? p.parentClassList.includes(i) === !!c : !1;
909
990
  }
910
- function s(n, r, o, i) {
911
- return typeof o == "boolean" ? i.parentClassList.includes(r) === !!o : !1;
991
+ function n(o, i, c, p) {
992
+ return typeof c == "boolean" ? p.parentClassList.includes(i) === !!c : !1;
912
993
  }
913
- const p = /* @__PURE__ */ new Map([
914
- ["length", c],
994
+ const s = /* @__PURE__ */ new Map([
995
+ ["length", r],
915
996
  ["hasChildren", e],
916
- ["hasSibling", s],
997
+ ["hasSibling", n],
917
998
  ["hasParent", t]
918
999
  ]);
919
- function y(n, r) {
920
- const o = n;
921
- return typeof r == "number" ? [{ target: o, operator: "length", param: null, value: Number(r) }] : typeof r == "object" ? Object.keys(r).map((i) => {
922
- if (i === "length")
923
- return { target: o, operator: "length", param: null, value: r[i] };
924
- const j = i, b = r[i];
925
- return { target: o, operator: n === "children" ? "hasChildren" : n === "parent" ? "hasParent" : "hasSibling", param: j, value: b };
1000
+ function u(o, i) {
1001
+ const c = o;
1002
+ return typeof i == "number" ? [{ target: c, operator: "length", param: null, value: Number(i) }] : typeof i == "object" ? Object.keys(i).map((p) => {
1003
+ if (p === "length")
1004
+ return { target: c, operator: "length", param: null, value: i[p] };
1005
+ const b = p, h = i[p];
1006
+ return { target: c, operator: o === "children" ? "hasChildren" : o === "parent" ? "hasParent" : "hasSibling", param: b, value: h };
926
1007
  }) : [];
927
1008
  }
928
- function m(n, r) {
929
- if (p.has(n.operator)) {
930
- const o = p.get(n.operator);
931
- return o && o(n.target, n.param, n.value, r) || !1;
1009
+ function y(o, i) {
1010
+ if (s.has(o.operator)) {
1011
+ const c = s.get(o.operator);
1012
+ return c && c(o.target, o.param, o.value, i) || !1;
932
1013
  }
933
1014
  return !1;
934
1015
  }
935
- function P(n, r) {
936
- return Object.keys(n).reduce((b, C) => {
937
- const O = y(C, n[C]);
938
- return b.push(...O), b;
939
- }, []).reduce((b, C) => b && m(C, r), !0);
1016
+ function g(o, i) {
1017
+ return Object.keys(o).reduce((h, w) => {
1018
+ const S = u(w, o[w]);
1019
+ return h.push(...S), h;
1020
+ }, []).reduce((h, w) => h && y(w, i), !0);
940
1021
  }
941
- function D(n, r) {
942
- const o = Object.keys(n), i = o.includes("allOf"), j = o.includes("anyOf"), b = i || j, f = (b ? n[b ? i ? "allOf" : "anyOf" : "allOf"] : [n]).map((h) => P(h, r));
943
- return i ? !f.includes(!1) : f.includes(!0);
1022
+ function P(o, i) {
1023
+ const c = Object.keys(o), p = c.includes("allOf"), b = c.includes("anyOf"), h = p || b, l = (h ? o[h ? p ? "allOf" : "anyOf" : "allOf"] : [o]).map((C) => g(C, i));
1024
+ return p ? !l.includes(!1) : l.includes(!0);
944
1025
  }
945
- function a(n, r) {
946
- const o = n.const;
947
- return o ? typeof o == "boolean" ? o : typeof o == "object" ? D(o, r) : !1 : !1;
1026
+ function a(o, i) {
1027
+ const c = o.const;
1028
+ return c ? typeof c == "boolean" ? c : typeof c == "object" ? P(c, i) : !1 : !1;
948
1029
  }
949
- function d(n) {
950
- return (r) => {
951
- const o = { canAccept: !0, fixed: !1, hidePadding: !1 };
952
- return n && n.properties && Object.keys(n.properties).reduce((i, j) => {
953
- const b = n.properties[j];
954
- return i[j] = a(b, r), i;
955
- }, o), o;
1030
+ function d(o) {
1031
+ return (i) => {
1032
+ const c = { canAccept: !0, fixed: !1, hidePadding: !1 };
1033
+ return o && o.properties && Object.keys(o.properties).reduce((p, b) => {
1034
+ const h = o.properties[b];
1035
+ return p[b] = a(h, i), p;
1036
+ }, c), c;
956
1037
  };
957
1038
  }
958
- function l(n, r, o) {
959
- if (r.type === "object" && r.properties) {
960
- const { rules: i, contents: j } = r.properties;
961
- o.set(n, d(i)), j && Object.keys(j.properties).forEach(
962
- (b) => l(b, j.properties[b], o)
1039
+ function f(o, i, c) {
1040
+ if (i.type === "object" && i.properties) {
1041
+ const { rules: p, contents: b } = i.properties;
1042
+ c.set(o, d(p)), b && Object.keys(b.properties).forEach(
1043
+ (h) => f(h, b.properties[h], c)
963
1044
  );
964
1045
  }
965
1046
  }
966
- function u() {
967
- const { properties: n } = Pe;
968
- Object.keys(n).forEach((r) => {
969
- l(r, n[r], S);
1047
+ function m() {
1048
+ const { properties: o } = Ae;
1049
+ Object.keys(o).forEach((i) => {
1050
+ f(i, o[i], N);
970
1051
  });
971
1052
  }
972
- function g(n, r) {
973
- const o = { canAccept: !0, fixed: !1, hidePadding: !0 };
974
- return S.has(n) ? S.get(n)(r) : o;
1053
+ function j(o, i) {
1054
+ const c = { canAccept: !0, fixed: !1, hidePadding: !0 };
1055
+ return N.has(o) ? N.get(o)(i) : c;
975
1056
  }
976
- return u(), { getRuleValue: g };
1057
+ return m(), { getRuleValue: j };
977
1058
  }
978
- function De(c, e) {
979
- const t = Ae();
980
- let s = !1, p, y = !1;
981
- const m = !1;
1059
+ class Oe {
1060
+ constructor(e, t) {
1061
+ M(this, "componentId");
1062
+ M(this, "viewModelId");
1063
+ M(this, "eventsEditorUtils");
1064
+ M(this, "formSchemaUtils");
1065
+ M(this, "formMetadataConverter");
1066
+ M(this, "designViewModelUtils");
1067
+ M(this, "designViewModelField");
1068
+ M(this, "controlCreatorUtils");
1069
+ M(this, "designerHostService");
1070
+ M(this, "schemaService", null);
1071
+ M(this, "metadataService", null);
1072
+ M(this, "propertyConfig", {
1073
+ type: "object",
1074
+ categories: {}
1075
+ });
1076
+ var n;
1077
+ 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;
1078
+ }
1079
+ getTableInfo() {
1080
+ var e;
1081
+ return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
1082
+ }
1083
+ setDesignViewModelField(e) {
1084
+ const t = e.binding && e.binding.type === "Form" && e.binding.field;
1085
+ if (t) {
1086
+ if (!this.designViewModelField) {
1087
+ const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1088
+ this.designViewModelField = n.fields.find((s) => s.id === t);
1089
+ }
1090
+ e.updateOn = this.designViewModelField.updateOn;
1091
+ }
1092
+ }
1093
+ changeFieldEditorType(e, t) {
1094
+ }
1095
+ getBasicPropConfig(e) {
1096
+ return {
1097
+ description: "Basic Information",
1098
+ title: "基本信息",
1099
+ properties: {
1100
+ id: {
1101
+ description: "组件标识",
1102
+ title: "标识",
1103
+ type: "string",
1104
+ readonly: !0
1105
+ },
1106
+ type: {
1107
+ description: "组件类型",
1108
+ title: "控件类型",
1109
+ type: "select",
1110
+ editor: {
1111
+ type: "combo-list",
1112
+ textField: "name",
1113
+ valueField: "value",
1114
+ data: [{ value: e.type, name: ie[e.type].name }]
1115
+ }
1116
+ }
1117
+ }
1118
+ };
1119
+ }
1120
+ getAppearanceConfig(e = null) {
1121
+ return {
1122
+ title: "样式",
1123
+ description: "Appearance",
1124
+ properties: {
1125
+ class: {
1126
+ title: "class样式",
1127
+ type: "string",
1128
+ description: "组件的CSS样式",
1129
+ $converter: "/converter/appearance.converter"
1130
+ },
1131
+ style: {
1132
+ title: "style样式",
1133
+ type: "string",
1134
+ description: "组件的样式",
1135
+ $converter: "/converter/appearance.converter"
1136
+ }
1137
+ }
1138
+ };
1139
+ }
1140
+ /**
1141
+ *
1142
+ * @param propertyId
1143
+ * @param componentInstance
1144
+ * @returns
1145
+ */
1146
+ updateElementByParentContainer(e, t) {
1147
+ const n = t && t.parent && t.parent.schema;
1148
+ if (!n)
1149
+ return;
1150
+ const s = n.contents.findIndex((y) => y.id === e), u = Y(n.contents[s]);
1151
+ n.contents.splice(s, 1), n.contents.splice(s, 0, u);
1152
+ }
1153
+ }
1154
+ class Ee extends Oe {
1155
+ constructor(e, t) {
1156
+ super(e, t);
1157
+ }
1158
+ getPropertyConfig(e) {
1159
+ return this.propertyConfig.categories.basic = this.getBasicPropConfig(e), this.propertyConfig.categories.appearance = this.getAppearanceConfig(e), this.getEventPropConfig(e), this.propertyConfig;
1160
+ }
1161
+ getEventPropConfig(e) {
1162
+ const t = [
1163
+ {
1164
+ label: "onInit",
1165
+ name: "初始化事件"
1166
+ },
1167
+ {
1168
+ label: "onAfterViewInit",
1169
+ name: "视图初始化后事件"
1170
+ }
1171
+ ];
1172
+ var n = this;
1173
+ const s = n.eventsEditorUtils.formProperties(e, n.viewModelId, t), u = {};
1174
+ u[n.viewModelId] = {
1175
+ type: "events-editor",
1176
+ editor: {
1177
+ initialData: s
1178
+ }
1179
+ }, this.propertyConfig.categories.eventsEditor = {
1180
+ title: "事件",
1181
+ hideTitle: !0,
1182
+ properties: u,
1183
+ // 这个属性,标记当属性变更得时候触发重新更新属性
1184
+ refreshPanelAfterChanged: !0,
1185
+ tabId: "commands",
1186
+ tabName: "交互",
1187
+ setPropertyRelates(y, g) {
1188
+ const P = y.propertyValue;
1189
+ delete e[n.viewModelId], P && (P.setPropertyRelates = this.setPropertyRelates, n.eventsEditorUtils.saveRelatedParameters(e, n.viewModelId, P.events, P));
1190
+ }
1191
+ };
1192
+ }
1193
+ }
1194
+ function De(r, e) {
1195
+ const t = Se();
1196
+ let n = !1, s, u = !1;
1197
+ const y = !1, g = r.schema;
982
1198
  function P() {
983
1199
  return !1;
984
1200
  }
985
- function D() {
986
- return m || !y;
987
- }
988
1201
  function a() {
989
- return !y;
1202
+ return y || !u;
990
1203
  }
991
1204
  function d() {
992
- y = !1;
993
- const u = c, g = u.appearance && u.appearance.class || "", n = g.split(" "), r = u.contents || [], o = r.length ? r[0] : null, i = o && o.appearance ? o.appearance.class : "", j = i ? i.split(" ") : [], b = r.length ? r.reduce((w, A) => {
994
- const N = A && A.appearance ? A.appearance.class : "", J = N ? N.split(" ") : [];
995
- return w.push(...J), w;
996
- }, []) : [], C = e, O = C && C.appearance && C.appearance.class || "", f = O ? O.split(" ") : [];
997
- p = {
998
- componentClass: g,
999
- componentClassList: n,
1000
- childContents: r,
1001
- firstChildContent: o,
1002
- firstChildClass: i,
1003
- firstChildClassList: j,
1004
- parent: C,
1005
- parentClass: O,
1006
- parentClassList: f,
1007
- children: r,
1008
- childrenClassList: b
1205
+ return !u;
1206
+ }
1207
+ function f() {
1208
+ var U, L;
1209
+ u = !1;
1210
+ const o = r.schema, i = o.appearance && o.appearance.class || "", c = i.split(" "), p = o.contents || [], b = p.length ? p[0] : null, h = b && b.appearance ? b.appearance.class : "", w = h ? h.split(" ") : [], S = p.length ? p.reduce((q, $) => {
1211
+ const G = $ && $.appearance ? $.appearance.class : "", K = G ? G.split(" ") : [];
1212
+ return q.push(...K), q;
1213
+ }, []) : [];
1214
+ if (((L = (U = r.parent) == null ? void 0 : U.schema) == null ? void 0 : L.type) !== "component-ref") {
1215
+ n = !0, u = !0;
1216
+ return;
1217
+ }
1218
+ const l = r.parent.parent, v = l && l.schema, C = v && v.appearance ? v.appearance.class : "", T = C ? C.split(" ") : [];
1219
+ s = {
1220
+ componentClass: i,
1221
+ componentClassList: c,
1222
+ childContents: p,
1223
+ firstChildContent: b,
1224
+ firstChildClass: h,
1225
+ firstChildClassList: w,
1226
+ parent: v,
1227
+ parentClass: C,
1228
+ parentClassList: T,
1229
+ children: p,
1230
+ childrenClassList: S
1009
1231
  };
1010
- const { canAccept: v, fixed: h, hidePadding: T } = t.getRuleValue(n[0], p);
1011
- return s = T, y = h, !0;
1232
+ const { canAccept: O, fixed: A, hidePadding: V } = t.getRuleValue(c[0], s);
1233
+ n = V, u = A;
1012
1234
  }
1013
- function l() {
1014
- return s;
1235
+ function m() {
1236
+ return n;
1015
1237
  }
1016
- return { canAccepts: P, checkCanDeleteComponent: D, checkCanMoveComponent: a, resolveComponentContext: d, hideNestedPaddingInDesginerView: l };
1238
+ function j(o) {
1239
+ return new Ee(o, e).getPropertyConfig(g);
1240
+ }
1241
+ return { canAccepts: P, checkCanDeleteComponent: a, checkCanMoveComponent: d, resolveComponentContext: f, hideNestedPaddingInDesginerView: m, getPropsConfig: j };
1017
1242
  }
1018
- const Oe = /* @__PURE__ */ F({
1243
+ const Ve = /* @__PURE__ */ z({
1019
1244
  name: "FComponetDesign",
1020
- props: k,
1245
+ props: D,
1021
1246
  emits: [],
1022
- setup(c, e) {
1023
- var m;
1024
- const t = M(), s = G("design-item-context"), p = De(s.schema, (m = s.parent) == null ? void 0 : m.schema), y = ye(t, s, p);
1025
- return L(() => {
1247
+ setup(r, e) {
1248
+ const t = E(), n = W("designer-host-service"), s = W("design-item-context"), u = De(s, n), y = je(t, s, u);
1249
+ return Q(() => {
1026
1250
  t.value.componentInstance = y;
1027
- }), e.expose(y.value), () => q("div", {
1251
+ }), e.expose(y.value), () => X("div", {
1028
1252
  ref: t,
1029
1253
  class: "drag-container",
1030
1254
  "data-dragref": `${s.schema.id}-container`
1031
1255
  }, [e.slots.default && e.slots.default()]);
1032
1256
  }
1033
- }), Me = {
1034
- install(c) {
1035
- c.component(E.name, E);
1257
+ }), $e = "https://json-schema.org/draft/2020-12/schema", ke = "https://farris-design.gitee.io/component.schema.json", Ne = "component-ref", Be = "A Farris Visual Component", Fe = "object", Ue = {
1258
+ id: {
1259
+ description: "The unique identifier for a Section",
1260
+ type: "string"
1261
+ },
1262
+ type: {
1263
+ description: "The type string of Section component",
1264
+ type: "string",
1265
+ default: "component-ref"
1266
+ },
1267
+ component: {
1268
+ description: "",
1269
+ type: "string",
1270
+ default: ""
1271
+ }
1272
+ }, Le = [
1273
+ "id",
1274
+ "type",
1275
+ "component"
1276
+ ], qe = {
1277
+ $schema: $e,
1278
+ $id: ke,
1279
+ title: Ne,
1280
+ description: Be,
1281
+ type: Fe,
1282
+ properties: Ue,
1283
+ required: Le
1284
+ }, Ge = {
1285
+ id: { type: String },
1286
+ component: { type: String, default: "" }
1287
+ }, We = H(Ge, qe, R, I), Xe = {
1288
+ install(r) {
1289
+ r.component(k.name, k);
1036
1290
  },
1037
- register(c, e, t, s) {
1038
- c.component = E, e.component = B;
1291
+ register(r, e, t, n) {
1292
+ r.component = k, e.component = J;
1039
1293
  },
1040
- registerDesigner(c, e) {
1041
- c.component = Oe, e.component = B;
1294
+ registerDesigner(r, e) {
1295
+ r.component = Ve, e.component = J, e["component-ref"] = We;
1042
1296
  }
1043
1297
  };
1044
1298
  export {
1045
- E as Component,
1046
- Oe as ComponentDesign,
1047
- k as componentProps,
1048
- Me as default,
1049
- B as propsResolver
1299
+ k as Component,
1300
+ Ve as ComponentDesign,
1301
+ Qe as componentDesignProps,
1302
+ D as componentProps,
1303
+ Xe as default,
1304
+ J as propsResolver
1050
1305
  };