@farris/ui-vue 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/components/accordion/index.esm.js +1 -1
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +472 -366
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.esm.js +1 -1
  6. package/components/button-edit/index.umd.cjs +1 -1
  7. package/components/calendar/index.esm.js +472 -480
  8. package/components/calendar/index.umd.cjs +1 -1
  9. package/components/capsule/index.esm.js +225 -233
  10. package/components/capsule/index.umd.cjs +1 -1
  11. package/components/checkbox/index.esm.js +615 -517
  12. package/components/checkbox/index.umd.cjs +1 -1
  13. package/components/color-picker/index.esm.js +325 -333
  14. package/components/color-picker/index.umd.cjs +2 -2
  15. package/components/combo-list/index.esm.js +578 -472
  16. package/components/combo-list/index.umd.cjs +1 -1
  17. package/components/combo-tree/index.esm.js +49 -49
  18. package/components/combo-tree/index.umd.cjs +1 -1
  19. package/components/common/index.esm.js +832 -722
  20. package/components/common/index.umd.cjs +1 -1
  21. package/components/component/index.esm.js +303 -981
  22. package/components/component/index.umd.cjs +1 -1
  23. package/components/condition/index.esm.js +8 -8
  24. package/components/condition/index.umd.cjs +1 -1
  25. package/components/content-container/index.esm.js +335 -1002
  26. package/components/content-container/index.umd.cjs +1 -1
  27. package/components/data-grid/index.esm.js +4429 -4312
  28. package/components/data-grid/index.umd.cjs +1 -1
  29. package/components/data-view/index.esm.js +3037 -3020
  30. package/components/data-view/index.umd.cjs +1 -1
  31. package/components/date-picker/index.esm.js +2216 -2119
  32. package/components/date-picker/index.umd.cjs +1 -1
  33. package/components/designer-canvas/index.css +1 -1
  34. package/components/designer-canvas/index.esm.js +914 -883
  35. package/components/designer-canvas/index.umd.cjs +1 -1
  36. package/components/dropdown/index.esm.js +223 -231
  37. package/components/dropdown/index.umd.cjs +2 -2
  38. package/components/dynamic-form/index.esm.js +1691 -2187
  39. package/components/dynamic-form/index.umd.cjs +1 -1
  40. package/components/dynamic-resolver/index.esm.js +143 -136
  41. package/components/dynamic-resolver/index.umd.cjs +1 -1
  42. package/components/events-editor/index.esm.js +250 -258
  43. package/components/events-editor/index.umd.cjs +1 -1
  44. package/components/expression-editor/index.esm.js +1 -1
  45. package/components/expression-editor/index.umd.cjs +1 -1
  46. package/components/external-container/index.esm.js +2672 -3438
  47. package/components/external-container/index.umd.cjs +1 -1
  48. package/components/field-selector/index.esm.js +2965 -2970
  49. package/components/field-selector/index.umd.cjs +1 -1
  50. package/components/filter-bar/index.esm.js +1650 -1602
  51. package/components/filter-bar/index.umd.cjs +1 -1
  52. package/components/flow-canvas/index.css +1 -1
  53. package/components/flow-canvas/index.esm.js +684 -675
  54. package/components/flow-canvas/index.umd.cjs +1 -1
  55. package/components/image-cropper/index.esm.js +453 -461
  56. package/components/image-cropper/index.umd.cjs +1 -1
  57. package/components/input-group/index.esm.js +604 -507
  58. package/components/input-group/index.umd.cjs +1 -1
  59. package/components/layout/index.esm.js +402 -378
  60. package/components/layout/index.umd.cjs +1 -1
  61. package/components/list-nav/index.esm.js +348 -1019
  62. package/components/list-nav/index.umd.cjs +1 -1
  63. package/components/list-view/index.esm.js +1658 -1666
  64. package/components/list-view/index.umd.cjs +1 -1
  65. package/components/lookup/index.esm.js +5209 -5088
  66. package/components/lookup/index.umd.cjs +1 -1
  67. package/components/mapping-editor/index.esm.js +4329 -4213
  68. package/components/mapping-editor/index.umd.cjs +1 -1
  69. package/components/nav/index.esm.js +905 -1357
  70. package/components/nav/index.umd.cjs +3 -3
  71. package/components/number-range/index.esm.js +517 -420
  72. package/components/number-range/index.umd.cjs +1 -1
  73. package/components/number-spinner/index.esm.js +588 -491
  74. package/components/number-spinner/index.umd.cjs +1 -1
  75. package/components/order/index.esm.js +1376 -1965
  76. package/components/order/index.umd.cjs +1 -1
  77. package/components/page-footer/index.esm.js +1 -1
  78. package/components/page-footer/index.umd.cjs +1 -1
  79. package/components/page-header/index.esm.js +1073 -1905
  80. package/components/page-header/index.umd.cjs +1 -1
  81. package/components/pagination/index.esm.js +809 -1237
  82. package/components/pagination/index.umd.cjs +1 -1
  83. package/components/progress/index.esm.js +198 -206
  84. package/components/progress/index.umd.cjs +3 -3
  85. package/components/property-editor/index.esm.js +1297 -1200
  86. package/components/property-editor/index.umd.cjs +2 -2
  87. package/components/property-panel/index.esm.js +609 -507
  88. package/components/property-panel/index.umd.cjs +1 -1
  89. package/components/query-solution/index.esm.js +3391 -3758
  90. package/components/query-solution/index.umd.cjs +1 -1
  91. package/components/radio-button/index.esm.js +1 -1
  92. package/components/radio-button/index.umd.cjs +1 -1
  93. package/components/radio-group/index.esm.js +544 -447
  94. package/components/radio-group/index.umd.cjs +1 -1
  95. package/components/rate/index.esm.js +247 -255
  96. package/components/rate/index.umd.cjs +1 -1
  97. package/components/response-layout/index.esm.js +146 -154
  98. package/components/response-layout/index.umd.cjs +1 -1
  99. package/components/response-layout-editor/index.esm.js +700 -675
  100. package/components/response-layout-editor/index.umd.cjs +1 -1
  101. package/components/response-toolbar/index.esm.js +956 -1786
  102. package/components/response-toolbar/index.umd.cjs +1 -1
  103. package/components/schema-selector/index.esm.js +4963 -5617
  104. package/components/schema-selector/index.umd.cjs +2 -2
  105. package/components/search-box/index.esm.js +158 -161
  106. package/components/search-box/index.umd.cjs +1 -1
  107. package/components/section/index.esm.js +436 -1124
  108. package/components/section/index.umd.cjs +1 -1
  109. package/components/smoke-detector/index.esm.js +92 -100
  110. package/components/smoke-detector/index.umd.cjs +1 -1
  111. package/components/splitter/index.esm.js +571 -1210
  112. package/components/splitter/index.umd.cjs +1 -1
  113. package/components/splitter/style.js +2 -0
  114. package/components/step/index.esm.js +239 -247
  115. package/components/step/index.umd.cjs +1 -1
  116. package/components/switch/index.esm.js +445 -348
  117. package/components/switch/index.umd.cjs +1 -1
  118. package/components/tabs/index.esm.js +2278 -3031
  119. package/components/tabs/index.umd.cjs +1 -1
  120. package/components/tags/index.esm.js +311 -319
  121. package/components/tags/index.umd.cjs +1 -1
  122. package/components/text/index.esm.js +215 -223
  123. package/components/text/index.umd.cjs +1 -1
  124. package/components/textarea/index.esm.js +468 -371
  125. package/components/textarea/index.umd.cjs +1 -1
  126. package/components/time-picker/index.esm.js +1271 -1174
  127. package/components/time-picker/index.umd.cjs +1 -1
  128. package/components/transfer/index.esm.js +469 -477
  129. package/components/transfer/index.umd.cjs +1 -1
  130. package/components/tree-grid/index.esm.js +3060 -3065
  131. package/components/tree-grid/index.umd.cjs +1 -1
  132. package/components/tree-view/index.esm.js +2476 -2481
  133. package/components/tree-view/index.umd.cjs +1 -1
  134. package/components/uploader/index.esm.js +374 -382
  135. package/components/uploader/index.umd.cjs +2 -2
  136. package/components/verify-detail/index.esm.js +248 -256
  137. package/components/verify-detail/index.umd.cjs +1 -1
  138. package/components/video/index.esm.js +414 -1093
  139. package/components/video/index.umd.cjs +1 -1
  140. package/components/weather/index.esm.js +498 -506
  141. package/components/weather/index.umd.cjs +5 -5
  142. package/farris.all.esm.js +20216 -21844
  143. package/farris.all.umd.cjs +9 -9
  144. package/index.css +1 -1
  145. package/package.json +1 -1
  146. package/types/common/directive/area-response.d.ts +10 -0
  147. package/types/common/index.d.ts +8 -0
  148. package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
  149. package/types/common/utils/resolve-field.d.ts +2 -0
  150. package/types/common/utils/use-class.d.ts +7 -0
  151. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  152. package/types/condition/src/types.d.ts +2 -1
  153. package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
  154. package/types/data-grid/index.d.ts +8 -5
  155. package/types/data-grid/src/data-grid.component.d.ts +3 -2
  156. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  157. package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
  158. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  159. package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
  160. package/types/data-view/composition/types.d.ts +7 -9
  161. package/types/designer-canvas/index.d.ts +2 -1
  162. package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
  163. package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
  164. package/types/designer-canvas/src/composition/types.d.ts +1 -2
  165. package/types/designer-canvas/src/types.d.ts +2 -1
  166. package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
  167. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  168. package/types/dynamic-form/src/property-config/form.property-config.d.ts +1 -1
  169. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
  170. package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
  171. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
  172. package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
  173. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
  174. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
  175. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
  176. package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
  177. package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
  178. package/types/property-panel/index.d.ts +2 -1
  179. package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
  180. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
  181. package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
  182. package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
  183. package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
  184. package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
  185. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
  186. package/types/query-solution/src/solutions.d.ts +108 -509
  187. package/types/response-layout-editor/index.d.ts +3 -1
  188. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
  189. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
  190. package/types/section/src/designer/use-designer-rules.d.ts +3 -3
  191. package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
  192. package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
  193. package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
  194. package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
  195. package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
  196. package/types/tree-grid/index.d.ts +3 -3
  197. package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
  198. package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
  199. package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
  200. package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
  201. package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
@@ -1,100 +1,100 @@
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;
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;
10
10
  }
11
- function B(r, e = {}, t) {
12
- const n = Z[r];
11
+ function q(a, e = {}, t) {
12
+ const n = O[a];
13
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
+ let o = S(n);
15
+ const i = U[a];
16
+ return o = i ? i({ getSchemaByType: q }, o, e, t) : o, o;
17
17
  }
18
18
  return null;
19
19
  }
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
+ 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;
23
23
  }
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];
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];
30
30
  else {
31
- const y = u(s, r[s], r);
32
- Object.assign(n, y);
31
+ const r = i(o, a[o], a);
32
+ Object.assign(n, r);
33
33
  }
34
34
  } else
35
- n[s] = r[s];
35
+ n[o] = a[o];
36
36
  return n;
37
37
  }, {});
38
38
  }
39
- function se(r, e, t = /* @__PURE__ */ new Map()) {
40
- const n = oe(r, e);
41
- return re(n, t);
39
+ function Z(a, e, t = /* @__PURE__ */ new Map()) {
40
+ const n = X(a, e);
41
+ return Y(n, t);
42
42
  }
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);
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];
49
+ if (d === "not")
50
+ return Number(l[s].length) !== Number(h);
51
+ if (d === "moreThan")
52
+ return Number(l[s].length) >= Number(h);
53
+ if (d === "lessThan")
54
+ return Number(l[s].length) <= Number(h);
55
55
  }
56
56
  return !1;
57
57
  }
58
- function t(a, d, f, m) {
59
- return m[a] && m[a].propertyValue && String(m[a].propertyValue.value) === String(f);
58
+ function t(s, c, p, l) {
59
+ return l[s] && l[s].propertyValue && String(l[s].propertyValue.value) === String(p);
60
60
  }
61
61
  const n = /* @__PURE__ */ new Map([
62
62
  ["length", e],
63
63
  ["getProperty", t]
64
64
  ]);
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 };
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 };
73
73
  }) : [];
74
74
  }
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;
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;
79
79
  }, []);
80
80
  }
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;
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;
85
85
  }
86
86
  return !1;
87
87
  }
88
- function g(a, d) {
89
- return u(a).reduce((j, o) => j && y(o, d), !0);
88
+ function u(s, c) {
89
+ return i(s).reduce((d, h) => d && r(h, c), !0);
90
90
  }
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
+ 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);
94
94
  }
95
- return { parseValueSchema: P };
95
+ return { parseValueSchema: f };
96
96
  }
97
- const ie = {
97
+ const K = {
98
98
  button: { type: "button", name: "按钮", icon: "Button" },
99
99
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
100
100
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -133,20 +133,20 @@ const ie = {
133
133
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
134
134
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
135
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);
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);
142
142
  };
143
143
  }
144
- function le(r, e) {
144
+ function ee(a, e) {
145
145
  return { customClass: e.class, customStyle: e.style };
146
146
  }
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 = {
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 = {
150
150
  id: {
151
151
  description: "The unique identifier for a component",
152
152
  type: "string"
@@ -197,879 +197,227 @@ const R = /* @__PURE__ */ new Map([
197
197
  type: "string",
198
198
  default: ""
199
199
  }
200
- }, be = [
200
+ }, se = [
201
201
  "id",
202
202
  "type",
203
203
  "contents"
204
- ], ge = {
205
- $schema: ue,
206
- $id: fe,
207
- title: de,
208
- description: ye,
209
- type: me,
210
- properties: he,
211
- required: be
204
+ ], ce = {
205
+ $schema: te,
206
+ $id: ne,
207
+ title: oe,
208
+ description: re,
209
+ type: ie,
210
+ properties: ae,
211
+ required: se
212
212
  };
213
- function I(r, e, t) {
213
+ function _(a, e, t) {
214
214
  return e;
215
215
  }
216
- const D = {
216
+ const T = {
217
217
  id: { type: String },
218
218
  customClass: { type: String, default: "" },
219
- componentType: { type: String, default: "" }
220
- }, J = H(D, ge, R, I), Qe = Object.assign({}, D, { componentId: { type: String, default: "" } }), k = /* @__PURE__ */ z({
219
+ componentType: { type: String, default: "" },
220
+ formColumns: { type: Number, default: 4 }
221
+ }, A = G(T, ce, W, _), Se = Object.assign({}, T, { componentId: { type: String, default: "" } }), V = /* @__PURE__ */ $({
221
222
  name: "FComponent",
222
- props: D,
223
+ props: T,
223
224
  emits: ["init", "afterViewInit"],
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
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
231
232
  }, [e.slots.default && e.slots.default()]);
232
233
  }
233
234
  });
234
- function je(r, e, t) {
235
- var S;
235
+ function pe(a, e, t) {
236
+ var k;
236
237
  function n() {
237
238
  t != null && t.resolveComponentContext && t.resolveComponentContext();
238
239
  }
239
240
  n();
240
- const s = t && t.getStyles && t.getStyles() || "", u = t && t.getDesignerClass && t.getDesignerClass() || "", y = E();
241
- function g() {
241
+ const o = t && t.getStyles && t.getStyles() || "", i = t && t.getDesignerClass && t.getDesignerClass() || "", r = D();
242
+ function u() {
242
243
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
243
244
  }
244
- function P() {
245
+ function f() {
245
246
  return !1;
246
247
  }
247
- function a() {
248
+ function s() {
248
249
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
249
250
  }
250
- function d() {
251
+ function c() {
251
252
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
252
253
  }
253
- function f(l) {
254
- if (!l || !l.value)
254
+ function p(m) {
255
+ if (!m || !m.value)
255
256
  return 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;
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
261
  }
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);
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);
264
265
  }
265
- function j(l) {
266
- return !!t && t.canAccepts(l);
266
+ function d(m) {
267
+ return !!t && t.canAccepts(m);
267
268
  }
268
- function o() {
269
+ function h() {
269
270
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
270
271
  }
271
- function i() {
272
- }
273
- function c(l, v) {
274
- v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
272
+ function M() {
275
273
  }
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
+ function w(m, g) {
275
+ g && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(g);
282
276
  }
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;
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;
290
283
  }
291
- function h(l) {
284
+ function P(m) {
292
285
  }
293
- function w(...l) {
286
+ function L(...m) {
294
287
  if (t && t.getPropsConfig)
295
- return t.getPropsConfig(...l);
288
+ return t.getPropsConfig(...m);
296
289
  }
297
- return y.value = {
298
- canMove: g(),
299
- canSelectParent: P(),
300
- canDelete: a(),
301
- canNested: !d(),
290
+ return r.value = {
291
+ canMove: u(),
292
+ canSelectParent: f(),
293
+ canDelete: s(),
294
+ canNested: !c(),
302
295
  contents: e == null ? void 0 : e.schema.contents,
303
- elementRef: r,
304
- parent: (S = e == null ? void 0 : e.parent) == null ? void 0 : S.componentInstance,
296
+ elementRef: a,
297
+ parent: (k = e == null ? void 0 : e.parent) == null ? void 0 : k.componentInstance,
305
298
  schema: e == null ? void 0 : e.schema,
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,
299
+ styles: o,
300
+ designerClass: i,
301
+ canAccepts: d,
302
+ getBelongedComponentInstance: p,
303
+ getDraggableDesignItemElement: l,
304
+ getDraggingDisplayText: h,
305
+ getPropConfig: L,
306
+ getDragScopeElement: M,
307
+ onAcceptMovedChildElement: w,
308
+ onChildElementMovedOut: P,
309
+ addNewChildComponentSchema: C,
318
310
  updateDragAndDropRules: n,
319
- triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || E(!1),
320
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || E(!1)
321
- }, y;
311
+ triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || D(!1),
312
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || D(!1)
313
+ }, r;
322
314
  }
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 = {
324
- "f-page": {
325
- description: "The root class of page designed by farris.",
326
- type: "object",
327
- properties: {
328
- contents: {
329
- type: "object",
330
- properties: {
331
- "f-page-header": {
332
- description: "The class of page header designed by farris.",
333
- type: "string"
334
- },
335
- "f-page-main": {
336
- description: "The class of page body designed by farris.",
337
- type: "object",
338
- properties: {
339
- contents: {
340
- type: "object",
341
- properties: {
342
- "f-struct-like-card": {
343
- description: "",
344
- type: "object",
345
- properties: {
346
- contents: {
347
- type: "object",
348
- properties: {
349
- "f-struct-form": {
350
- description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
351
- type: "object",
352
- properties: {
353
- contents: {
354
- type: "object",
355
- properties: {
356
- "f-section-form": {
357
- description: "The class of section which has wrapped a reponse-form component.",
358
- type: "object",
359
- properties: {
360
- contents: {
361
- type: "object",
362
- properties: {
363
- "f-form-layout": {
364
- description: "The class of reponse form",
365
- type: "object",
366
- properties: {
367
- rules: {
368
- type: "object",
369
- properties: {
370
- canAccept: {
371
- type: "boolean",
372
- const: !0
373
- },
374
- fixed: {
375
- type: "boolean",
376
- const: !0
377
- },
378
- hidePadding: {
379
- type: "boolean",
380
- const: !1
381
- }
382
- }
383
- }
384
- }
385
- }
386
- }
387
- },
388
- rules: {
389
- type: "object",
390
- properties: {
391
- canAccept: {
392
- type: "boolean",
393
- const: !1
394
- },
395
- fixed: {
396
- type: "boolean",
397
- const: !0
398
- },
399
- hidePadding: {
400
- type: "boolean",
401
- const: !0
402
- }
403
- }
404
- }
405
- }
406
- }
407
- }
408
- },
409
- rules: {
410
- type: "object",
411
- properties: {
412
- canAccept: {
413
- type: "boolean",
414
- const: !1
415
- },
416
- fixed: {
417
- type: "boolean",
418
- const: !1
419
- },
420
- hidePadding: {
421
- type: "boolean",
422
- const: !0
423
- }
424
- }
425
- }
426
- }
427
- },
428
- "f-struct-wrapper": {
429
- description: "",
430
- type: "object",
431
- properties: {
432
- contents: {
433
- type: "object",
434
- properties: {
435
- "f-section-tabs": {
436
- description: "The class of section which has wrapped sub-grid tabs.",
437
- type: "object",
438
- properties: {
439
- contents: {
440
- type: "object",
441
- properties: {
442
- "f-tabs-in-card": {
443
- description: "The class of tabs which contains sub-grid.",
444
- type: "object",
445
- properties: {
446
- contents: {
447
- type: "object",
448
- properties: {
449
- "f-struct-data-grid-in-card": {
450
- description: "The class of sub-grid component",
451
- type: "object",
452
- properties: {
453
- contents: {
454
- type: "object",
455
- properties: {
456
- "f-grid-is-sub": {
457
- description: "The class of sub-grid",
458
- type: "object",
459
- properties: {
460
- rules: {
461
- type: "object",
462
- properties: {
463
- canAccept: {
464
- type: "boolean",
465
- const: !0
466
- },
467
- fixed: {
468
- type: "boolean",
469
- const: !0
470
- },
471
- hidePadding: {
472
- type: "boolean",
473
- const: !1
474
- }
475
- }
476
- }
477
- }
478
- }
479
- }
480
- },
481
- rules: {
482
- type: "object",
483
- properties: {
484
- canAccept: {
485
- type: "boolean",
486
- const: !1
487
- },
488
- fixed: {
489
- type: "boolean",
490
- const: !1
491
- },
492
- hidePadding: {
493
- type: "boolean",
494
- const: !0
495
- }
496
- }
497
- }
498
- }
499
- }
500
- }
501
- },
502
- rules: {
503
- type: "object",
504
- properties: {
505
- canAccept: {
506
- type: "boolean",
507
- const: !1
508
- },
509
- fixed: {
510
- type: "boolean",
511
- const: !0
512
- },
513
- hidePadding: {
514
- type: "boolean",
515
- const: !0
516
- }
517
- }
518
- }
519
- }
520
- }
521
- }
522
- },
523
- rules: {
524
- type: "object",
525
- properties: {
526
- canAccept: {
527
- type: "boolean",
528
- const: !1
529
- },
530
- fixed: {
531
- type: "boolean",
532
- const: !0
533
- },
534
- hidePadding: {
535
- type: "boolean",
536
- const: !0
537
- }
538
- }
539
- }
540
- }
541
- },
542
- "f-section-in-main": {
543
- description: "The class of section which has wrapped a reponse-form component.",
544
- type: "object",
545
- properties: {
546
- rules: {
547
- type: "object",
548
- properties: {
549
- canAccept: {
550
- type: "boolean",
551
- const: !0
552
- },
553
- fixed: {
554
- type: "boolean",
555
- const: !0
556
- },
557
- hidePadding: {
558
- type: "boolean",
559
- const: !1
560
- }
561
- }
562
- }
563
- }
564
- }
565
- }
566
- },
567
- rules: {
568
- type: "object",
569
- properties: {
570
- canAccept: {
571
- type: "boolean",
572
- const: !1
573
- },
574
- fixed: {
575
- type: "boolean",
576
- const: !1
577
- },
578
- hidePadding: {
579
- type: "boolean",
580
- const: !0
581
- }
582
- }
583
- }
584
- }
585
- }
586
- }
587
- },
588
- rules: {
589
- type: "object",
590
- properties: {
591
- canAccept: {
592
- type: "boolean",
593
- const: !0
594
- },
595
- fixed: {
596
- type: "boolean",
597
- const: !0
598
- },
599
- hidePadding: {
600
- type: "object",
601
- const: {
602
- allOf: [
603
- {
604
- sibling: 0,
605
- parent: {
606
- "f-page-main": !0
607
- }
608
- }
609
- ]
610
- }
611
- }
612
- }
613
- }
614
- }
615
- },
616
- "f-struct-data-grid": {
617
- description: "",
618
- type: "object",
619
- properties: {
620
- rules: {
621
- type: "object",
622
- properties: {
623
- canAccept: {
624
- type: "object",
625
- const: !0
626
- },
627
- fixed: {
628
- type: "boolean",
629
- const: !0
630
- },
631
- hidePadding: {
632
- type: "boolean",
633
- const: !0
634
- }
635
- }
636
- }
637
- }
638
- },
639
- "f-page-main-content": {
640
- description: "",
641
- type: "object",
642
- properties: {
643
- contents: {
644
- type: "object",
645
- properties: {
646
- "f-page-content-nav": {
647
- description: "",
648
- type: "object",
649
- properties: {
650
- contents: {
651
- type: "object",
652
- properties: {
653
- "f-struct-data-grid-in-nav": {
654
- description: "",
655
- type: "object",
656
- properties: {
657
- contents: {
658
- type: "object",
659
- properties: {
660
- "f-page-content-nav-extend": {
661
- description: "",
662
- type: "object"
663
- },
664
- "f-section-in-nav": {
665
- description: "",
666
- type: "object",
667
- properties: {
668
- rules: {
669
- type: "object",
670
- properties: {
671
- canAccept: {
672
- type: "boolean",
673
- const: !1
674
- },
675
- fixed: {
676
- type: "boolean",
677
- const: !0
678
- },
679
- hidePadding: {
680
- type: "boolean",
681
- const: !1
682
- }
683
- }
684
- }
685
- }
686
- }
687
- }
688
- },
689
- rules: {
690
- type: "object",
691
- properties: {
692
- canAccept: {
693
- type: "boolean",
694
- const: !0
695
- },
696
- fixed: {
697
- type: "boolean",
698
- const: !1
699
- },
700
- hidePadding: {
701
- type: "boolean",
702
- const: !0
703
- }
704
- }
705
- }
706
- }
707
- }
708
- }
709
- }
710
- }
711
- },
712
- "f-page-content-main": {
713
- description: "",
714
- type: "object",
715
- properties: {}
716
- }
717
- }
718
- }
719
- }
720
- },
721
- "f-page-content": {
722
- description: "",
723
- type: "object",
724
- properties: {
725
- contents: {
726
- type: "object",
727
- properties: {
728
- "f-page-content-nav": {
729
- description: "",
730
- type: "object",
731
- properties: {
732
- contents: {
733
- type: "object",
734
- properties: {
735
- "f-list-nav": {
736
- description: "",
737
- type: "object"
738
- },
739
- "f-list-nav-left": {
740
- description: "",
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
- }
816
- }
817
- }
818
- }
819
- },
820
- rules: {
821
- type: "object",
822
- properties: {
823
- canAccept: {
824
- type: "boolean",
825
- const: !1
826
- },
827
- fixed: {
828
- type: "boolean",
829
- const: !0
830
- },
831
- hidePadding: {
832
- type: "boolean",
833
- const: !0
834
- }
835
- }
836
- }
837
- },
838
- "f-page-content-main": {
839
- description: "",
840
- type: "object",
841
- properties: {
842
- rules: {
843
- type: "object",
844
- properties: {
845
- canAccept: {
846
- type: "boolean",
847
- const: !1
848
- },
849
- fixed: {
850
- type: "boolean",
851
- const: !1
852
- },
853
- hidePadding: {
854
- type: "boolean",
855
- const: !0
856
- }
857
- }
858
- }
859
- }
860
- }
861
- }
862
- },
863
- rules: {
864
- type: "object",
865
- properties: {
866
- canAccept: {
867
- type: "boolean",
868
- const: !1
869
- },
870
- fixed: {
871
- type: "boolean",
872
- const: !0
873
- },
874
- hidePadding: {
875
- type: "boolean",
876
- const: !0
877
- }
878
- }
879
- }
880
- }
881
- }
882
- }
883
- },
884
- rules: {
885
- type: "object",
886
- properties: {
887
- canAccept: {
888
- type: "object",
889
- const: {
890
- anyOf: [
891
- {
892
- children: 0
893
- },
894
- {
895
- children: {
896
- length: {
897
- not: 1
898
- },
899
- "f-struct-like-card": !0
900
- }
901
- },
902
- {
903
- children: {
904
- "scroll-spy": !1,
905
- "f-page-content": !1,
906
- "f-struct-like-card": !1
907
- }
908
- }
909
- ]
910
- }
911
- },
912
- fixed: {
913
- type: "boolean",
914
- const: !0
915
- },
916
- hidePadding: {
917
- type: "boolean",
918
- const: !0
919
- }
920
- }
921
- }
922
- }
923
- },
924
- "f-page-footer": {
925
- description: "The class of page footer designed by farris.",
926
- type: "string"
315
+ class le {
316
+ 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])
323
+ 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;
327
+ }
328
+ resolveRuleValue(e, t) {
329
+ return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, t);
330
+ }
331
+ 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;
340
+ continue;
927
341
  }
928
342
  }
929
- },
930
- rules: {
931
- type: "object",
932
- properties: {
933
- canAccept: {
934
- type: "boolean",
935
- const: !1
936
- },
937
- fixed: {
938
- type: "boolean",
939
- const: !0
940
- },
941
- hidePadding: {
942
- type: "boolean",
943
- const: !0
343
+ if (i.firstLevelChild.type) {
344
+ const r = t.firstLevelChildSchema;
345
+ if (r && r.type !== i.firstLevelChild.type) {
346
+ o = !1;
347
+ continue;
944
348
  }
945
349
  }
946
350
  }
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;
356
+ continue;
357
+ }
358
+ }
359
+ if (i.secondLevelChild.type) {
360
+ const r = t.secondLevelChildSchema;
361
+ if (r && r.type !== i.secondLevelChild.type) {
362
+ o = !1;
363
+ continue;
364
+ }
365
+ }
366
+ }
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;
372
+ continue;
373
+ }
374
+ }
375
+ if (i.parent.type) {
376
+ const r = t.parentSchema;
377
+ if (r && r.type !== i.parent.type) {
378
+ o = !1;
379
+ continue;
380
+ }
381
+ }
382
+ }
383
+ o = !0;
384
+ break;
947
385
  }
948
- },
949
- "f-page-is-managelist": {
950
- description: "The root class of mangement list page.",
951
- type: "string"
952
- },
953
- "f-page-card": {
954
- description: "",
955
- type: "object"
956
- },
957
- "f-page-is-mainsubcard": {
958
- description: "",
959
- type: "object"
960
- }
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);
982
- }
983
- return !1;
984
- }
985
- function e(o, i, c, p) {
986
- return typeof c == "boolean" ? p.childrenClassList.includes(i) === !!c : !1;
987
- }
988
- function t(o, i, c, p) {
989
- return typeof c == "boolean" ? p.parentClassList.includes(i) === !!c : !1;
990
- }
991
- function n(o, i, c, p) {
992
- return typeof c == "boolean" ? p.parentClassList.includes(i) === !!c : !1;
993
- }
994
- const s = /* @__PURE__ */ new Map([
995
- ["length", r],
996
- ["hasChildren", e],
997
- ["hasSibling", n],
998
- ["hasParent", t]
999
- ]);
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 };
1007
- }) : [];
1008
- }
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;
1013
- }
1014
- return !1;
1015
- }
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);
386
+ return !o;
1021
387
  }
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);
1025
- }
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;
1029
- }
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;
388
+ 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(" ") : [];
391
+ return {
392
+ componentClass: n,
393
+ componentClassList: o,
394
+ childContents: i,
395
+ firstLevelChildSchema: r,
396
+ firstLevelChildClass: u,
397
+ firstLevelChildClassList: f,
398
+ secondLevelChildSchema: s,
399
+ secondLevelChildClass: c,
400
+ secondLevelChildClassList: p,
401
+ parentSchema: l,
402
+ parentClass: d,
403
+ parentClassList: h
1037
404
  };
1038
405
  }
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)
1044
- );
1045
- }
1046
- }
1047
- function m() {
1048
- const { properties: o } = Ae;
1049
- Object.keys(o).forEach((i) => {
1050
- f(i, o[i], N);
1051
- });
1052
- }
1053
- function j(o, i) {
1054
- const c = { canAccept: !0, fixed: !1, hidePadding: !0 };
1055
- return N.has(o) ? N.get(o)(i) : c;
1056
- }
1057
- return m(), { getRuleValue: j };
1058
406
  }
1059
- class Oe {
407
+ class ue {
1060
408
  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", {
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", {
1073
421
  type: "object",
1074
422
  categories: {}
1075
423
  });
@@ -1085,7 +433,7 @@ class Oe {
1085
433
  if (t) {
1086
434
  if (!this.designViewModelField) {
1087
435
  const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1088
- this.designViewModelField = n.fields.find((s) => s.id === t);
436
+ this.designViewModelField = n.fields.find((o) => o.id === t);
1089
437
  }
1090
438
  e.updateOn = this.designViewModelField.updateOn;
1091
439
  }
@@ -1111,7 +459,7 @@ class Oe {
1111
459
  type: "combo-list",
1112
460
  textField: "name",
1113
461
  valueField: "value",
1114
- data: [{ value: e.type, name: ie[e.type].name }]
462
+ data: [{ value: e.type, name: K[e.type].name }]
1115
463
  }
1116
464
  }
1117
465
  }
@@ -1147,11 +495,11 @@ class Oe {
1147
495
  const n = t && t.parent && t.parent.schema;
1148
496
  if (!n)
1149
497
  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);
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);
1152
500
  }
1153
501
  }
1154
- class Ee extends Oe {
502
+ class fe extends ue {
1155
503
  constructor(e, t) {
1156
504
  super(e, t);
1157
505
  }
@@ -1170,91 +518,65 @@ class Ee extends Oe {
1170
518
  }
1171
519
  ];
1172
520
  var n = this;
1173
- const s = n.eventsEditorUtils.formProperties(e, n.viewModelId, t), u = {};
1174
- u[n.viewModelId] = {
521
+ const o = n.eventsEditorUtils.formProperties(e, n.viewModelId, t), i = {};
522
+ i[n.viewModelId] = {
1175
523
  type: "events-editor",
1176
524
  editor: {
1177
- initialData: s
525
+ initialData: o
1178
526
  }
1179
527
  }, this.propertyConfig.categories.eventsEditor = {
1180
528
  title: "事件",
1181
529
  hideTitle: !0,
1182
- properties: u,
530
+ properties: i,
1183
531
  // 这个属性,标记当属性变更得时候触发重新更新属性
1184
532
  refreshPanelAfterChanged: !0,
1185
533
  tabId: "commands",
1186
534
  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));
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));
1190
538
  }
1191
539
  };
1192
540
  }
1193
541
  }
1194
- function De(r, e) {
1195
- const t = Se();
1196
- let n = !1, s, u = !1;
1197
- const y = !1, g = r.schema;
1198
- function P() {
542
+ function me(a, e) {
543
+ const t = new le(), { canMove: n, canDelete: o } = t.getTemplateRule(a, e);
544
+ function i() {
1199
545
  return !1;
1200
546
  }
1201
- function a() {
1202
- return y || !u;
547
+ function r() {
548
+ return o;
1203
549
  }
1204
- function d() {
1205
- return !u;
550
+ function u() {
551
+ return n;
1206
552
  }
1207
553
  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
1231
- };
1232
- const { canAccept: O, fixed: A, hidePadding: V } = t.getRuleValue(c[0], s);
1233
- n = V, u = A;
554
+ return !1;
1234
555
  }
1235
- function m() {
1236
- return n;
556
+ function s() {
557
+ return " display: inherit;flex-direction: inherit;margin-bottom:10px";
1237
558
  }
1238
- function j(o) {
1239
- return new Ee(o, e).getPropertyConfig(g);
559
+ function c(p) {
560
+ const l = new fe(p, e), d = a.schema;
561
+ return l.getPropertyConfig(d);
1240
562
  }
1241
- return { canAccepts: P, checkCanDeleteComponent: a, checkCanMoveComponent: d, resolveComponentContext: f, hideNestedPaddingInDesginerView: m, getPropsConfig: j };
563
+ return { canAccepts: i, checkCanDeleteComponent: r, checkCanMoveComponent: u, hideNestedPaddingInDesginerView: f, getStyles: s, getPropsConfig: c };
1242
564
  }
1243
- const Ve = /* @__PURE__ */ z({
565
+ const de = /* @__PURE__ */ $({
1244
566
  name: "FComponetDesign",
1245
- props: D,
567
+ props: T,
1246
568
  emits: [],
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(() => {
1250
- t.value.componentInstance = y;
1251
- }), e.expose(y.value), () => X("div", {
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", {
1252
574
  ref: t,
1253
575
  class: "drag-container",
1254
- "data-dragref": `${s.schema.id}-container`
576
+ "data-dragref": `${o.schema.id}-container`
1255
577
  }, [e.slots.default && e.slots.default()]);
1256
578
  }
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 = {
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 = {
1258
580
  id: {
1259
581
  description: "The unique identifier for a Section",
1260
582
  type: "string"
@@ -1269,37 +591,37 @@ const Ve = /* @__PURE__ */ z({
1269
591
  type: "string",
1270
592
  default: ""
1271
593
  }
1272
- }, Le = [
594
+ }, Me = [
1273
595
  "id",
1274
596
  "type",
1275
597
  "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 = {
598
+ ], we = {
599
+ $schema: he,
600
+ $id: ye,
601
+ title: ge,
602
+ description: ve,
603
+ type: Ce,
604
+ properties: be,
605
+ required: Me
606
+ }, Pe = {
1285
607
  id: { type: String },
1286
608
  component: { type: String, default: "" }
1287
- }, We = H(Ge, qe, R, I), Xe = {
1288
- install(r) {
1289
- r.component(k.name, k);
609
+ }, De = G(Pe, we, W, _), ke = {
610
+ install(a) {
611
+ a.component(V.name, V);
1290
612
  },
1291
- register(r, e, t, n) {
1292
- r.component = k, e.component = J;
613
+ register(a, e, t, n) {
614
+ a.component = V, e.component = A;
1293
615
  },
1294
- registerDesigner(r, e) {
1295
- r.component = Ve, e.component = J, e["component-ref"] = We;
616
+ registerDesigner(a, e) {
617
+ a.component = de, e.component = A, e["component-ref"] = De;
1296
618
  }
1297
619
  };
1298
620
  export {
1299
- k as Component,
1300
- Ve as ComponentDesign,
1301
- Qe as componentDesignProps,
1302
- D as componentProps,
1303
- Xe as default,
1304
- J as propsResolver
621
+ V as Component,
622
+ de as ComponentDesign,
623
+ Se as componentDesignProps,
624
+ T as componentProps,
625
+ ke as default,
626
+ A as propsResolver
1305
627
  };