@farris/ui-vue 1.3.4 → 1.3.6

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 (145) hide show
  1. package/components/accordion/index.esm.js +16 -16
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +65 -65
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.esm.js +13 -13
  6. package/components/button-edit/index.umd.cjs +1 -1
  7. package/components/calendar/index.esm.js +504 -490
  8. package/components/calendar/index.umd.cjs +1 -1
  9. package/components/capsule/index.esm.js +247 -233
  10. package/components/capsule/index.umd.cjs +1 -1
  11. package/components/checkbox/index.esm.js +356 -344
  12. package/components/checkbox/index.umd.cjs +1 -1
  13. package/components/color-picker/index.esm.js +159 -145
  14. package/components/color-picker/index.umd.cjs +2 -2
  15. package/components/combo-list/index.esm.js +127 -128
  16. package/components/combo-list/index.umd.cjs +1 -1
  17. package/components/combo-tree/index.esm.js +15 -15
  18. package/components/combo-tree/index.umd.cjs +1 -1
  19. package/components/component/index.esm.js +101 -87
  20. package/components/component/index.umd.cjs +1 -1
  21. package/components/condition/index.esm.js +9 -7
  22. package/components/condition/index.umd.cjs +1 -1
  23. package/components/content-container/index.esm.js +181 -167
  24. package/components/content-container/index.umd.cjs +1 -1
  25. package/components/data-grid/index.esm.js +746 -730
  26. package/components/data-grid/index.umd.cjs +1 -1
  27. package/components/data-view/index.esm.js +9 -7
  28. package/components/data-view/index.umd.cjs +1 -1
  29. package/components/date-picker/index.esm.js +789 -777
  30. package/components/date-picker/index.umd.cjs +1 -1
  31. package/components/designer-canvas/index.esm.js +3096 -3069
  32. package/components/designer-canvas/index.umd.cjs +1 -1
  33. package/components/dropdown/index.esm.js +257 -243
  34. package/components/dropdown/index.umd.cjs +2 -2
  35. package/components/dynamic-form/index.esm.js +322 -306
  36. package/components/dynamic-form/index.umd.cjs +1 -1
  37. package/components/dynamic-resolver/index.esm.js +177 -163
  38. package/components/dynamic-resolver/index.umd.cjs +1 -1
  39. package/components/event-parameter/index.esm.js +78 -82
  40. package/components/event-parameter/index.umd.cjs +1 -1
  41. package/components/events-editor/index.esm.js +501 -487
  42. package/components/events-editor/index.umd.cjs +1 -1
  43. package/components/expression-editor/index.esm.js +37 -37
  44. package/components/expression-editor/index.umd.cjs +1 -1
  45. package/components/external-container/index.esm.js +487 -472
  46. package/components/external-container/index.umd.cjs +1 -1
  47. package/components/field-selector/index.esm.js +440 -433
  48. package/components/field-selector/index.umd.cjs +1 -1
  49. package/components/filter-bar/index.esm.js +594 -587
  50. package/components/filter-bar/index.umd.cjs +1 -1
  51. package/components/flow-canvas/index.esm.js +2766 -2739
  52. package/components/flow-canvas/index.umd.cjs +1 -1
  53. package/components/image-cropper/index.esm.js +402 -388
  54. package/components/image-cropper/index.umd.cjs +1 -1
  55. package/components/input-group/index.esm.js +201 -202
  56. package/components/input-group/index.umd.cjs +1 -1
  57. package/components/layout/index.esm.js +264 -245
  58. package/components/layout/index.umd.cjs +1 -1
  59. package/components/list-nav/index.esm.js +157 -143
  60. package/components/list-nav/index.umd.cjs +1 -1
  61. package/components/list-view/index.esm.js +314 -298
  62. package/components/list-view/index.umd.cjs +1 -1
  63. package/components/lookup/index.esm.js +862 -843
  64. package/components/lookup/index.umd.cjs +1 -1
  65. package/components/mapping-editor/index.esm.js +1031 -1015
  66. package/components/mapping-editor/index.umd.cjs +1 -1
  67. package/components/nav/index.esm.js +169 -155
  68. package/components/nav/index.umd.cjs +2 -2
  69. package/components/number-range/index.esm.js +150 -137
  70. package/components/number-range/index.umd.cjs +1 -1
  71. package/components/number-spinner/index.esm.js +207 -194
  72. package/components/number-spinner/index.umd.cjs +1 -1
  73. package/components/order/index.esm.js +427 -414
  74. package/components/order/index.umd.cjs +1 -1
  75. package/components/page-footer/index.esm.js +22 -22
  76. package/components/page-footer/index.umd.cjs +1 -1
  77. package/components/page-header/index.esm.js +510 -492
  78. package/components/page-header/index.umd.cjs +1 -1
  79. package/components/pagination/index.esm.js +192 -178
  80. package/components/pagination/index.umd.cjs +1 -1
  81. package/components/progress/index.esm.js +234 -220
  82. package/components/progress/index.umd.cjs +3 -3
  83. package/components/property-editor/index.esm.js +288 -277
  84. package/components/property-editor/index.umd.cjs +2 -2
  85. package/components/property-panel/index.esm.js +62 -61
  86. package/components/property-panel/index.umd.cjs +1 -1
  87. package/components/query-solution/index.esm.js +776 -770
  88. package/components/query-solution/index.umd.cjs +6 -6
  89. package/components/radio-button/index.esm.js +64 -64
  90. package/components/radio-button/index.umd.cjs +1 -1
  91. package/components/radio-group/index.esm.js +296 -283
  92. package/components/radio-group/index.umd.cjs +1 -1
  93. package/components/rate/index.esm.js +222 -208
  94. package/components/rate/index.umd.cjs +1 -1
  95. package/components/response-layout/index.esm.js +187 -173
  96. package/components/response-layout/index.umd.cjs +1 -1
  97. package/components/response-layout-editor/index.esm.js +554 -542
  98. package/components/response-layout-editor/index.umd.cjs +1 -1
  99. package/components/response-toolbar/index.esm.js +483 -469
  100. package/components/response-toolbar/index.umd.cjs +1 -1
  101. package/components/schema-selector/index.esm.js +634 -619
  102. package/components/schema-selector/index.umd.cjs +2 -2
  103. package/components/search-box/index.esm.js +228 -214
  104. package/components/search-box/index.umd.cjs +1 -1
  105. package/components/section/index.esm.js +419 -406
  106. package/components/section/index.umd.cjs +1 -1
  107. package/components/smoke-detector/index.esm.js +162 -148
  108. package/components/smoke-detector/index.umd.cjs +1 -1
  109. package/components/splitter/index.esm.js +308 -284
  110. package/components/splitter/index.umd.cjs +1 -1
  111. package/components/step/index.esm.js +279 -265
  112. package/components/step/index.umd.cjs +1 -1
  113. package/components/switch/index.esm.js +183 -170
  114. package/components/switch/index.umd.cjs +1 -1
  115. package/components/tabs/index.esm.js +307 -294
  116. package/components/tabs/index.umd.cjs +1 -1
  117. package/components/tags/index.esm.js +320 -306
  118. package/components/tags/index.umd.cjs +1 -1
  119. package/components/text/index.esm.js +245 -231
  120. package/components/text/index.umd.cjs +1 -1
  121. package/components/textarea/index.esm.js +260 -247
  122. package/components/textarea/index.umd.cjs +1 -1
  123. package/components/time-picker/index.esm.js +409 -396
  124. package/components/time-picker/index.umd.cjs +1 -1
  125. package/components/transfer/index.esm.js +424 -410
  126. package/components/transfer/index.umd.cjs +1 -1
  127. package/components/tree-grid/index.esm.js +383 -376
  128. package/components/tree-grid/index.umd.cjs +1 -1
  129. package/components/tree-view/index.esm.js +595 -575
  130. package/components/tree-view/index.umd.cjs +1 -1
  131. package/components/uploader/index.esm.js +325 -311
  132. package/components/uploader/index.umd.cjs +2 -2
  133. package/components/verify-detail/index.esm.js +304 -290
  134. package/components/verify-detail/index.umd.cjs +1 -1
  135. package/components/video/index.esm.js +99 -85
  136. package/components/video/index.umd.cjs +1 -1
  137. package/components/weather/index.esm.js +947 -933
  138. package/components/weather/index.umd.cjs +4 -4
  139. package/farris.all.esm.js +5492 -5470
  140. package/farris.all.umd.cjs +13 -13
  141. package/index.css +1 -1
  142. package/package.json +1 -1
  143. package/types/condition/src/composition/condition-value/input-group-value.d.ts +1 -1
  144. package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
  145. package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
@@ -1,52 +1,66 @@
1
- var Y = Object.defineProperty;
2
- var Z = (s, t, e) => t in s ? Y(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
- var v = (s, t, e) => Z(s, typeof t != "symbol" ? t + "" : t, e);
4
- import { defineComponent as q, toRefs as O, ref as P, computed as B, watch as U, createVNode as F, inject as $, onMounted as _ } from "vue";
5
- import { isPlainObject as G, cloneDeep as j } from "lodash-es";
6
- import { DgControl as W } from "../designer-canvas/index.esm.js";
7
- import { withInstall as K } from "../common/index.esm.js";
1
+ var J = Object.defineProperty;
2
+ var Y = (s, t, e) => t in s ? J(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
+ var v = (s, t, e) => Y(s, typeof t != "symbol" ? t + "" : t, e);
4
+ import { defineComponent as W, toRefs as j, ref as T, computed as B, watch as $, createVNode as F, inject as G, onMounted as Z } from "vue";
5
+ import { isPlainObject as q, cloneDeep as A } from "lodash-es";
6
+ import { DgControl as O } from "../designer-canvas/index.esm.js";
7
+ import { withInstall as R } from "../common/index.esm.js";
8
8
  const z = {}, X = {};
9
- function A(s) {
10
- const { properties: t, title: e, ignore: i } = s, n = i && Array.isArray(i), r = Object.keys(t).reduce((l, f) => ((!n || !i.find((y) => y === f)) && (l[f] = t[f].type === "object" && t[f].properties ? A(t[f]) : j(t[f].default)), l), {});
11
- if (e && (!n || !i.find((l) => l === "id"))) {
9
+ function N(s) {
10
+ const { properties: t, title: e, ignore: r } = s, n = r && Array.isArray(r), i = Object.keys(t).reduce((l, f) => ((!n || !r.find((y) => y === f)) && (l[f] = t[f].type === "object" && t[f].properties ? N(t[f]) : A(t[f].default)), l), {});
11
+ if (e && (!n || !r.find((l) => l === "id"))) {
12
12
  const l = e.toLowerCase().replace(/-/g, "_");
13
- r.id = `${l}_${Math.random().toString().slice(2, 6)}`;
13
+ i.id = `${l}_${Math.random().toString().slice(2, 6)}`;
14
14
  }
15
- return r;
15
+ return i;
16
16
  }
17
- function Q(s, t = {}, e) {
18
- const i = z[s];
19
- if (i) {
20
- let n = A(i);
21
- const r = X[s];
22
- return n = r ? r({ getSchemaByType: Q }, n, t, e) : n, n;
17
+ function K(s) {
18
+ const { properties: t, title: e, required: r } = s;
19
+ if (r && Array.isArray(r)) {
20
+ const n = r.reduce((i, l) => (i[l] = t[l].type === "object" && t[l].properties ? N(t[l]) : A(t[l].default), i), {});
21
+ if (e && r.find((i) => i === "id")) {
22
+ const i = e.toLowerCase().replace(/-/g, "_");
23
+ n.id = `${i}_${Math.random().toString().slice(2, 6)}`;
24
+ }
25
+ return n;
23
26
  }
24
- return null;
27
+ return {
28
+ type: e
29
+ };
25
30
  }
26
- function R(s, t) {
27
- const e = A(t);
28
- return Object.keys(e).reduce((i, n) => (i[n] && G(i[n]) && G(s[n] || !s[n]) ? Object.assign(i[n], s[n] || {}) : i[n] = s[n], i), e), e;
31
+ function _(s, t = {}, e) {
32
+ const r = z[s];
33
+ if (r) {
34
+ let n = K(r);
35
+ const i = X[s];
36
+ return n = i ? i({ getSchemaByType: _ }, n, t, e) : n, n;
37
+ }
38
+ return null;
29
39
  }
30
40
  function x(s, t) {
31
- return Object.keys(s).filter((i) => s[i] != null).reduce((i, n) => {
41
+ const e = N(t);
42
+ return Object.keys(e).reduce((r, n) => (Object.prototype.hasOwnProperty.call(s, n) && (r[n] && q(r[n]) && q(s[n] || !s[n]) ? Object.assign(r[n], s[n] || {}) : r[n] = s[n]), r), e), e;
43
+ }
44
+ function ee(s, t) {
45
+ return Object.keys(s).filter((r) => s[r] != null).reduce((r, n) => {
32
46
  if (t.has(n)) {
33
- const r = t.get(n);
34
- if (typeof r == "string")
35
- i[r] = s[n];
47
+ const i = t.get(n);
48
+ if (typeof i == "string")
49
+ r[i] = s[n];
36
50
  else {
37
- const l = r(n, s[n], s);
38
- Object.assign(i, l);
51
+ const l = i(n, s[n], s);
52
+ Object.assign(r, l);
39
53
  }
40
54
  } else
41
- i[n] = s[n];
42
- return i;
55
+ r[n] = s[n];
56
+ return r;
43
57
  }, {});
44
58
  }
45
- function ee(s, t, e = /* @__PURE__ */ new Map()) {
46
- const i = R(s, t);
47
- return x(i, e);
59
+ function te(s, t, e = /* @__PURE__ */ new Map()) {
60
+ const r = x(s, t);
61
+ return ee(r, e);
48
62
  }
49
- function te(s = {}) {
63
+ function ne(s = {}) {
50
64
  function t(a, c, o, p) {
51
65
  if (typeof o == "number")
52
66
  return p[a].length === o;
@@ -64,11 +78,11 @@ function te(s = {}) {
64
78
  function e(a, c, o, p) {
65
79
  return p[a] && p[a].propertyValue && String(p[a].propertyValue.value) === String(o);
66
80
  }
67
- const i = /* @__PURE__ */ new Map([
81
+ const r = /* @__PURE__ */ new Map([
68
82
  ["length", t],
69
83
  ["getProperty", e]
70
84
  ]);
71
- Object.keys(s).reduce((a, c) => (a.set(c, s[c]), a), i);
85
+ Object.keys(s).reduce((a, c) => (a.set(c, s[c]), a), r);
72
86
  function n(a, c) {
73
87
  const o = a;
74
88
  return typeof c == "number" ? [{ target: o, operator: "length", param: null, value: Number(c) }] : typeof c == "boolean" ? [{ target: o, operator: "getProperty", param: a, value: !!c }] : typeof c == "object" ? Object.keys(c).map((p) => {
@@ -78,21 +92,21 @@ function te(s = {}) {
78
92
  return { target: o, operator: "getProperty", param: m, value: d };
79
93
  }) : [];
80
94
  }
81
- function r(a) {
95
+ function i(a) {
82
96
  return Object.keys(a).reduce((o, p) => {
83
97
  const m = n(p, a[p]);
84
98
  return o.push(...m), o;
85
99
  }, []);
86
100
  }
87
101
  function l(a, c) {
88
- if (i.has(a.operator)) {
89
- const o = i.get(a.operator);
102
+ if (r.has(a.operator)) {
103
+ const o = r.get(a.operator);
90
104
  return o && o(a.target, a.param, a.value, c) || !1;
91
105
  }
92
106
  return !1;
93
107
  }
94
108
  function f(a, c) {
95
- return r(a).reduce((m, d) => m && l(d, c), !0);
109
+ return i(a).reduce((m, d) => m && l(d, c), !0);
96
110
  }
97
111
  function y(a, c) {
98
112
  const o = Object.keys(a), p = o.includes("allOf"), m = o.includes("anyOf"), d = p || m, b = (d ? a[d ? p ? "allOf" : "anyOf" : "allOf"] : [a]).map((E) => f(E, c));
@@ -140,20 +154,20 @@ const u = {
140
154
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
141
155
  fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
142
156
  "query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
143
- }, ne = {}, oe = {};
144
- te();
145
- function ie(s, t, e = /* @__PURE__ */ new Map(), i = (l, f, y, a) => f, n = {}, r = (l) => l) {
146
- return z[t.title] = t, X[t.title] = i, ne[t.title] = n, oe[t.title] = r, (l = {}) => {
147
- const f = ee(l, t, e), y = Object.keys(s).reduce((a, c) => (a[c] = s[c].default, a), {});
157
+ }, oe = {}, re = {};
158
+ ne();
159
+ function ie(s, t, e = /* @__PURE__ */ new Map(), r = (l, f, y, a) => f, n = {}, i = (l) => l) {
160
+ return z[t.title] = t, X[t.title] = r, oe[t.title] = n, re[t.title] = i, (l = {}) => {
161
+ const f = te(l, t, e), y = Object.keys(s).reduce((a, c) => (a[c] = s[c].default, a), {});
148
162
  return Object.assign(y, f);
149
163
  };
150
164
  }
151
- function re(s, t) {
165
+ function ae(s, t) {
152
166
  return { customClass: t.class, customStyle: t.style };
153
167
  }
154
- const ae = /* @__PURE__ */ new Map([
155
- ["appearance", re]
156
- ]), se = "https://json-schema.org/draft/2020-12/schema", le = "https://farris-design.gitee.io/switch.schema.json", ce = "switch", pe = "A Farris Component", ue = "object", de = {
168
+ const se = /* @__PURE__ */ new Map([
169
+ ["appearance", ae]
170
+ ]), le = "https://json-schema.org/draft/2020-12/schema", ce = "https://farris-design.gitee.io/switch.schema.json", pe = "switch", ue = "A Farris Component", de = "object", me = {
157
171
  id: {
158
172
  description: "The unique identifier for a switch",
159
173
  type: "string"
@@ -225,27 +239,26 @@ const ae = /* @__PURE__ */ new Map([
225
239
  type: "enum",
226
240
  default: "medium"
227
241
  }
228
- }, me = [
229
- "id",
242
+ }, fe = [
230
243
  "type"
231
- ], fe = [
244
+ ], ye = [
232
245
  "id",
233
246
  "appearance",
234
247
  "binding"
235
- ], ye = {
236
- $schema: se,
237
- $id: le,
238
- title: ce,
239
- description: pe,
240
- type: ue,
241
- properties: de,
242
- required: me,
243
- ignore: fe
248
+ ], he = {
249
+ $schema: le,
250
+ $id: ce,
251
+ title: pe,
252
+ description: ue,
253
+ type: de,
254
+ properties: me,
255
+ required: fe,
256
+ ignore: ye
244
257
  };
245
- function he(s, t, e) {
258
+ function ge(s, t, e) {
246
259
  return t;
247
260
  }
248
- const N = {
261
+ const U = {
249
262
  /** 组件值*/
250
263
  modelValue: { type: Boolean, default: !1 },
251
264
  /** 禁用 */
@@ -265,29 +278,29 @@ const N = {
265
278
  /** 开关值变化事件 */
266
279
  onModelValueChanged: { type: Function, default: () => {
267
280
  } }
268
- }, H = ie(N, ye, ae, he), V = /* @__PURE__ */ q({
281
+ }, Q = ie(U, he, se, ge), V = /* @__PURE__ */ W({
269
282
  name: "FSwitch",
270
- props: N,
283
+ props: U,
271
284
  emits: ["update:modelValue", "modelValueChanged"],
272
285
  setup(s, t) {
273
286
  const {
274
287
  disabled: e,
275
- size: i,
288
+ size: r,
276
289
  onLabel: n,
277
- offLabel: r,
290
+ offLabel: i,
278
291
  onBackground: l,
279
292
  offBackground: f,
280
293
  onColor: y,
281
294
  offColor: a,
282
295
  readonly: c
283
- } = O(s), o = P(s.modelValue), p = B(() => ({
296
+ } = j(s), o = T(s.modelValue), p = B(() => ({
284
297
  switch: !0,
285
298
  "f-cmp-switch": !0,
286
299
  checked: o.value,
287
300
  disabled: c.value || e.value,
288
- "switch-large": i.value === "large",
289
- "switch-medium": i.value === "medium",
290
- "switch-small": i.value === "small"
301
+ "switch-large": r.value === "large",
302
+ "switch-medium": r.value === "medium",
303
+ "switch-small": r.value === "small"
291
304
  })), m = B(() => o.value ? {
292
305
  outline: "none",
293
306
  background: l.value
@@ -298,13 +311,13 @@ const N = {
298
311
  background: y.value
299
312
  } : {
300
313
  backgroundColor: a.value
301
- }), h = B(() => (n == null ? void 0 : n.value) || (r == null ? void 0 : r.value));
314
+ }), h = B(() => (n == null ? void 0 : n.value) || (i == null ? void 0 : i.value));
302
315
  function k() {
303
316
  c.value || e.value || (o.value = !o.value, t.emit("update:modelValue", o.value));
304
317
  }
305
- return U(o, (b, C) => {
318
+ return $(o, (b, C) => {
306
319
  b !== C && t.emit("modelValueChanged", b);
307
- }), U(() => s.modelValue, (b, C) => {
320
+ }), $(() => s.modelValue, (b, C) => {
308
321
  b !== C && (o.value = b);
309
322
  }), () => F("span", {
310
323
  tabindex: "0",
@@ -318,14 +331,14 @@ const N = {
318
331
  class: "switch-label-checked"
319
332
  }, [n == null ? void 0 : n.value]), F("span", {
320
333
  class: "switch-label-unchecked"
321
- }, [r == null ? void 0 : r.value])]), F("small", {
334
+ }, [i == null ? void 0 : i.value])]), F("small", {
322
335
  style: d.value
323
336
  }, [t.slots.default && t.slots.default()])]);
324
337
  }
325
338
  });
326
- function ge(s, t, e) {
327
- var T;
328
- const i = e && e.getStyles && e.getStyles() || "", n = e && e.getDesignerClass && e.getDesignerClass() || "", r = P();
339
+ function ve(s, t, e) {
340
+ var P;
341
+ const r = e && e.getStyles && e.getStyles() || "", n = e && e.getDesignerClass && e.getDesignerClass() || "", i = T();
329
342
  function l() {
330
343
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
331
344
  }
@@ -343,7 +356,7 @@ function ge(s, t, e) {
343
356
  return null;
344
357
  if (g.value.schema && g.value.schema.type === "component")
345
358
  return g.value;
346
- const w = P(g == null ? void 0 : g.value.parent), M = c(w);
359
+ const w = T(g == null ? void 0 : g.value.parent), M = c(w);
347
360
  return M || null;
348
361
  }
349
362
  function o(g = t) {
@@ -363,7 +376,7 @@ function ge(s, t, e) {
363
376
  }
364
377
  function k(g, w) {
365
378
  const { componentType: M } = g;
366
- let S = Q(M, g, w);
379
+ let S = _(M, g, w);
367
380
  e && e.onResolveNewComponentSchema && (S = e.onResolveNewComponentSchema(g, S));
368
381
  const L = M.toLowerCase().replace(/-/g, "_");
369
382
  return S && !S.id && S.type === M && (S.id = `${L}_${Math.random().toString().slice(2, 6)}`), S;
@@ -383,16 +396,16 @@ function ge(s, t, e) {
383
396
  (S = M == null ? void 0 : M.componentInstance) != null && S.value.onRemoveComponent && M.componentInstance.value.onRemoveComponent();
384
397
  });
385
398
  }
386
- return r.value = {
399
+ return i.value = {
387
400
  canMove: l(),
388
401
  canSelectParent: f(),
389
402
  canDelete: y(),
390
403
  canNested: !a(),
391
404
  contents: t == null ? void 0 : t.schema.contents,
392
405
  elementRef: s,
393
- parent: (T = t == null ? void 0 : t.parent) == null ? void 0 : T.componentInstance,
406
+ parent: (P = t == null ? void 0 : t.parent) == null ? void 0 : P.componentInstance,
394
407
  schema: t == null ? void 0 : t.schema,
395
- styles: i,
408
+ styles: r,
396
409
  designerClass: n,
397
410
  canAccepts: p,
398
411
  getBelongedComponentInstance: c,
@@ -403,12 +416,12 @@ function ge(s, t, e) {
403
416
  onAcceptMovedChildElement: h,
404
417
  onChildElementMovedOut: b,
405
418
  addNewChildComponentSchema: k,
406
- triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || P(!1),
407
- triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || P(!1),
419
+ triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || T(!1),
420
+ triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || T(!1),
408
421
  onRemoveComponent: E
409
- }, r;
422
+ }, i;
410
423
  }
411
- class ve {
424
+ class be {
412
425
  constructor(t, e) {
413
426
  v(this, "componentId");
414
427
  v(this, "viewModelId");
@@ -425,22 +438,22 @@ class ve {
425
438
  type: "object",
426
439
  categories: {}
427
440
  });
428
- var i;
429
- this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((i = this.formSchemaUtils) == null ? void 0 : i.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
441
+ var r;
442
+ this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
430
443
  }
431
444
  getTableInfo() {
432
445
  var t;
433
446
  return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
434
447
  }
435
448
  setDesignViewModelField(t) {
436
- var i;
449
+ var r;
437
450
  const e = t.binding && t.binding.type === "Form" && t.binding.field;
438
451
  if (e) {
439
452
  if (!this.designViewModelField) {
440
453
  const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
441
- this.designViewModelField = n.fields.find((r) => r.id === e);
454
+ this.designViewModelField = n.fields.find((i) => i.id === e);
442
455
  }
443
- t.updateOn = (i = this.designViewModelField) == null ? void 0 : i.updateOn;
456
+ t.updateOn = (r = this.designViewModelField) == null ? void 0 : r.updateOn;
444
457
  }
445
458
  }
446
459
  changeFieldEditorType(t, e) {
@@ -497,11 +510,11 @@ class ve {
497
510
  * @returns
498
511
  */
499
512
  updateElementByParentContainer(t, e) {
500
- const i = e && e.parent && e.parent.schema;
501
- if (!i)
513
+ const r = e && e.parent && e.parent.schema;
514
+ if (!r)
502
515
  return;
503
- const n = i.contents.findIndex((l) => l.id === t), r = j(i.contents[n]);
504
- i.contents.splice(n, 1), i.contents.splice(n, 0, r);
516
+ const n = r.contents.findIndex((l) => l.id === t), i = A(r.contents[n]);
517
+ r.contents.splice(n, 1), r.contents.splice(n, 0, i);
505
518
  }
506
519
  }
507
520
  const I = class I {
@@ -518,8 +531,8 @@ const I = class I {
518
531
  static getAllInputTypes() {
519
532
  const t = [];
520
533
  for (const e in I.fieldControlTypeMapping)
521
- I.fieldControlTypeMapping[e].forEach((i) => {
522
- t.find((n) => n.key === i.key && n.value === i.value) || t.push({ key: i.key, value: i.value });
534
+ I.fieldControlTypeMapping[e].forEach((r) => {
535
+ t.find((n) => n.key === r.key && n.value === r.value) || t.push({ key: r.key, value: r.value });
523
536
  });
524
537
  return t;
525
538
  }
@@ -575,8 +588,8 @@ v(I, "fieldControlTypeMapping", {
575
588
  ]
576
589
  });
577
590
  let D = I;
578
- const be = P(0);
579
- class Ce {
591
+ const Ce = T(0);
592
+ class ke {
580
593
  constructor() {
581
594
  /** 控件标题 */
582
595
  v(this, "label", "");
@@ -606,11 +619,11 @@ class Ce {
606
619
  v(this, "fieldSetId", "");
607
620
  }
608
621
  }
609
- function ke(s) {
622
+ function we(s) {
610
623
  let t, e;
611
- const i = /* @__PURE__ */ new Map();
624
+ const r = /* @__PURE__ */ new Map();
612
625
  let n = [];
613
- function r(c, o) {
626
+ function i(c, o) {
614
627
  const m = c.split(" ").filter((C) => C.startsWith("col-"));
615
628
  if (m.length === 0) {
616
629
  o.isSupportedClass = !1;
@@ -627,15 +640,15 @@ function ke(s) {
627
640
  return;
628
641
  }
629
642
  d && (p += 1, d = !1);
630
- const k = h.appearance && h.appearance.class, b = new Ce();
631
- k ? r(k, b) : b.isSupportedClass = !1, b.label = h.label || h.id, b.id = h.id, b.group = p, m && (b.fieldSetId = c.id), e === h.id && (t = p), i.set(h.id, h), o.push(b);
643
+ const k = h.appearance && h.appearance.class, b = new ke();
644
+ k ? i(k, b) : b.isSupportedClass = !1, b.label = h.label || h.id, b.id = h.id, b.group = p, m && (b.fieldSetId = c.id), e === h.id && (t = p), r.set(h.id, h), o.push(b);
632
645
  });
633
646
  }
634
647
  function f(c) {
635
648
  const o = s.getComponentById(c);
636
649
  if (!o || !o.componentType || !o.componentType.startsWith("form"))
637
650
  return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
638
- const p = s.selectNode(o, (m) => m.type === W["response-form"].type);
651
+ const p = s.selectNode(o, (m) => m.type === O["response-form"].type);
639
652
  return !p || !p.contents || p.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: p };
640
653
  }
641
654
  function y(c, o) {
@@ -643,8 +656,8 @@ function ke(s) {
643
656
  const { result: p, message: m, formNode: d } = f(o);
644
657
  if (!p)
645
658
  return { result: p, message: m };
646
- e = c.id, n = [], i.clear();
647
- const h = d.contents[0].type === W.fieldset.type ? 0 : 1;
659
+ e = c.id, n = [], r.clear();
660
+ const h = d.contents[0].type === O.fieldset.type ? 0 : 1;
648
661
  l(d, n, h);
649
662
  const k = n.find((C) => !C.isSupportedClass);
650
663
  return {
@@ -663,14 +676,14 @@ function ke(s) {
663
676
  const d = [];
664
677
  return c.forEach((h) => {
665
678
  var C;
666
- const k = i.get(h.id), b = k.appearance && k.appearance.class;
679
+ const k = r.get(h.id), b = k.appearance && k.appearance.class;
667
680
  if (b) {
668
- const T = b.split(" ").filter((J) => !J.startsWith("col-")), g = "col-" + h.columnInSM, w = "col-md-" + h.columnInMD, M = "col-xl-" + h.columnInLG, S = "col-el-" + h.columnInEL, L = [g, w, M, S].concat(T);
681
+ const P = b.split(" ").filter((H) => !H.startsWith("col-")), g = "col-" + h.columnInSM, w = "col-md-" + h.columnInMD, M = "col-xl-" + h.columnInLG, S = "col-el-" + h.columnInEL, L = [g, w, M, S].concat(P);
669
682
  k.appearance.class = L.join(" ");
670
683
  }
671
684
  if (h.fieldSetId) {
672
- const E = m.contents.find((g) => g.id === h.fieldSetId), T = d.find((g) => g.id === h.fieldSetId);
673
- T ? (C = T.contents) == null || C.push(k) : (d.push(E), E.contents = [k]);
685
+ const E = m.contents.find((g) => g.id === h.fieldSetId), P = d.find((g) => g.id === h.fieldSetId);
686
+ P ? (C = P.contents) == null || C.push(k) : (d.push(E), E.contents = [k]);
674
687
  } else
675
688
  d.push(k);
676
689
  }), m.contents = d, m.id;
@@ -682,19 +695,19 @@ function ke(s) {
682
695
  getResonseFormLayoutConfig: l
683
696
  };
684
697
  }
685
- class we extends ve {
686
- constructor(e, i) {
687
- super(e, i);
698
+ class Me extends be {
699
+ constructor(e, r) {
700
+ super(e, r);
688
701
  v(this, "responseLayoutEditorFunction");
689
- this.responseLayoutEditorFunction = ke(this.formSchemaUtils);
702
+ this.responseLayoutEditorFunction = we(this.formSchemaUtils);
690
703
  }
691
- getPropertyConfig(e, i) {
692
- return this.propertyConfig.categories.basic = this.getBasicProperties(e, i), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, i), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
704
+ getPropertyConfig(e, r) {
705
+ return this.propertyConfig.categories.basic = this.getBasicProperties(e, r), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, r), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
693
706
  }
694
- getBasicProperties(e, i) {
695
- var r;
707
+ getBasicProperties(e, r) {
708
+ var i;
696
709
  const n = this;
697
- return this.setDesignViewModelField(e), this.formSchemaUtils.getFormMetadataBasicInfo(), {
710
+ return this.setDesignViewModelField(e), {
698
711
  description: "Basic Information",
699
712
  title: "基本信息",
700
713
  properties: {
@@ -715,7 +728,7 @@ class we extends ve {
715
728
  textField: "value",
716
729
  valueField: "key",
717
730
  editable: !1,
718
- data: n.designViewModelField ? D.getEditorTypesByMDataType((r = n.designViewModelField.type) == null ? void 0 : r.name) : D.getAllInputTypes()
731
+ data: n.designViewModelField ? D.getEditorTypesByMDataType((i = n.designViewModelField.type) == null ? void 0 : i.name) : D.getAllInputTypes()
719
732
  }
720
733
  },
721
734
  label: {
@@ -744,7 +757,7 @@ class we extends ve {
744
757
  if (l)
745
758
  switch (l && l.propertyID) {
746
759
  case "type": {
747
- n.changeControlType(e, l, i);
760
+ n.changeControlType(e, l, r);
748
761
  break;
749
762
  }
750
763
  case "label": {
@@ -755,7 +768,7 @@ class we extends ve {
755
768
  }
756
769
  };
757
770
  }
758
- getAppearanceProperties(e, i) {
771
+ getAppearanceProperties(e, r) {
759
772
  const n = this;
760
773
  return {
761
774
  title: "样式",
@@ -786,14 +799,14 @@ class we extends ve {
786
799
  }
787
800
  }
788
801
  },
789
- setPropertyRelates(r, l) {
790
- if (r)
791
- switch (r && r.propertyID) {
802
+ setPropertyRelates(i, l) {
803
+ if (i)
804
+ switch (i && i.propertyID) {
792
805
  case "responseLayout":
793
- n.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(r.propertyValue, n.componentId || e.id), n.updateUnifiedLayoutAfterResponseLayoutChanged(n.componentId), n.updateElementByParentContainer(e.id, i), delete e.responseLayout;
806
+ n.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(i.propertyValue, n.componentId || e.id), n.updateUnifiedLayoutAfterResponseLayoutChanged(n.componentId), n.updateElementByParentContainer(e.id, r), delete e.responseLayout;
794
807
  break;
795
808
  case "class":
796
- n.updateUnifiedLayoutAfterControlChanged(r.propertyValue, e.id, this.componentId), n.updateElementByParentContainer(e.id, i);
809
+ n.updateUnifiedLayoutAfterControlChanged(i.propertyValue, e.id, this.componentId), n.updateElementByParentContainer(e.id, r);
797
810
  break;
798
811
  }
799
812
  }
@@ -807,21 +820,21 @@ class we extends ve {
807
820
  * @param propertyData 控件DOM属性
808
821
  * @param newControlType 新控件类型
809
822
  */
810
- changeControlType(e, i, n) {
823
+ changeControlType(e, r, n) {
811
824
  var c, o, p, m;
812
- const r = i.propertyValue, l = n && n.parent && n.parent.schema;
825
+ const i = r.propertyValue, l = n && n.parent && n.parent.schema;
813
826
  if (!l)
814
827
  return;
815
828
  const f = l.contents.findIndex((d) => d.id === e.id), y = l.contents[f];
816
829
  let a;
817
830
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
818
831
  editor: {
819
- $type: r
832
+ $type: i
820
833
  },
821
834
  name: this.designViewModelField.name,
822
835
  require: this.designViewModelField.require,
823
836
  readonly: this.designViewModelField.readonly
824
- }, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, r)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(r)), Object.assign(a, {
837
+ }, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, i)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(i)), Object.assign(a, {
825
838
  id: y.id,
826
839
  appearance: y.appearance,
827
840
  size: y.size,
@@ -836,15 +849,15 @@ class we extends ve {
836
849
  require: (m = y.editor) == null ? void 0 : m.require
837
850
  }), l.contents.splice(f, 1), l.contents.splice(f, 0, a), n.schema = Object.assign(y, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
838
851
  (d) => d.classList.remove("dgComponentSelected")
839
- ), be.value++;
852
+ ), Ce.value++;
840
853
  }
841
- getComponentConfig(e, i = {}, n = {}) {
842
- const r = Object.assign({
854
+ getComponentConfig(e, r = {}, n = {}) {
855
+ const i = Object.assign({
843
856
  description: "编辑器",
844
857
  title: "编辑器",
845
858
  type: "input-group",
846
859
  $converter: "/converter/property-editor.converter"
847
- }, i), l = Object.assign({
860
+ }, r), l = Object.assign({
848
861
  readonly: {
849
862
  description: "",
850
863
  title: "只读",
@@ -866,7 +879,7 @@ class we extends ve {
866
879
  type: "string"
867
880
  }
868
881
  }, n);
869
- return { ...r, properties: { ...l } };
882
+ return { ...i, properties: { ...l } };
870
883
  }
871
884
  /**
872
885
  * 修改某一输入控件的样式后更新Form的统一布局配置
@@ -874,12 +887,12 @@ class we extends ve {
874
887
  * @param controlId 控件Id
875
888
  * @param componentId 控件所在组件id
876
889
  */
877
- updateUnifiedLayoutAfterControlChanged(e, i, n) {
878
- const r = e.split(" ");
879
- let l = r.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), f = r.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), y = r.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), a = r.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
890
+ updateUnifiedLayoutAfterControlChanged(e, r, n) {
891
+ const i = e.split(" ");
892
+ let l = i.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), f = i.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), y = i.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), a = i.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
880
893
  l = l || "col-12", f = f || "col-md-" + l.replace("col-", ""), y = y || "col-xl-" + f.replace("col-md-", ""), a = a || "col-el-" + y.replace("col-xl-", "");
881
894
  const c = {
882
- id: i,
895
+ id: r,
883
896
  columnInSM: parseInt(l.replace("col-", ""), 10),
884
897
  columnInMD: parseInt(f.replace("col-md-", ""), 10),
885
898
  columnInLG: parseInt(y.replace("col-xl-", ""), 10),
@@ -892,16 +905,16 @@ class we extends ve {
892
905
  * @param componentId 组件Id
893
906
  * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
894
907
  */
895
- updateUnifiedLayoutAfterResponseLayoutChanged(e, i) {
908
+ updateUnifiedLayoutAfterResponseLayoutChanged(e, r) {
896
909
  const { formNode: n } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
897
910
  if (!n || !n.unifiedLayout)
898
911
  return;
899
- const r = [];
900
- if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(n, r, 1), i) {
901
- const d = r.find((h) => h.id === i.id);
902
- Object.assign(d || {}, i);
912
+ const i = [];
913
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(n, i, 1), r) {
914
+ const d = i.find((h) => h.id === r.id);
915
+ Object.assign(d || {}, r);
903
916
  }
904
- const l = r.map((d) => d.columnInSM), f = r.map((d) => d.columnInMD), y = r.map((d) => d.columnInLG), a = r.map((d) => d.columnInEL), c = this.checkIsUniqueColumn(l) ? l[0] : null, o = this.checkIsUniqueColumn(f) ? f[0] : null, p = this.checkIsUniqueColumn(y) ? y[0] : null, m = this.checkIsUniqueColumn(a) ? a[0] : null;
917
+ const l = i.map((d) => d.columnInSM), f = i.map((d) => d.columnInMD), y = i.map((d) => d.columnInLG), a = i.map((d) => d.columnInEL), c = this.checkIsUniqueColumn(l) ? l[0] : null, o = this.checkIsUniqueColumn(f) ? f[0] : null, p = this.checkIsUniqueColumn(y) ? y[0] : null, m = this.checkIsUniqueColumn(a) ? a[0] : null;
905
918
  Object.assign(n.unifiedLayout, {
906
919
  uniqueColClassInSM: c,
907
920
  uniqueColClassInMD: o,
@@ -913,11 +926,11 @@ class we extends ve {
913
926
  * 校验宽度样式值是否一致
914
927
  */
915
928
  checkIsUniqueColumn(e) {
916
- const i = new Set(e);
917
- return Array.from(i).length === 1;
929
+ const r = new Set(e);
930
+ return Array.from(r).length === 1;
918
931
  }
919
932
  }
920
- class Me extends we {
933
+ class Se extends Me {
921
934
  constructor(t, e) {
922
935
  super(t, e);
923
936
  }
@@ -973,25 +986,25 @@ class Me extends we {
973
986
  });
974
987
  }
975
988
  }
976
- function Se(s, t) {
989
+ function Fe(s, t) {
977
990
  const e = s.schema;
978
- function i(n, r) {
979
- return new Me(n, t).getPropertyConfig(e, r);
991
+ function r(n, i) {
992
+ return new Se(n, t).getPropertyConfig(e, i);
980
993
  }
981
- return { getPropsConfig: i };
994
+ return { getPropsConfig: r };
982
995
  }
983
- const Fe = /* @__PURE__ */ q({
996
+ const Ee = /* @__PURE__ */ W({
984
997
  name: "FSwitchDesign",
985
- props: N,
998
+ props: U,
986
999
  emits: ["update:modelValue"],
987
1000
  setup(s, t) {
988
1001
  const {
989
1002
  size: e,
990
- onLabel: i,
1003
+ onLabel: r,
991
1004
  offLabel: n
992
- } = O(s), r = P(), l = $("designer-host-service"), f = $("design-item-context"), y = Se(f, l), a = ge(r, f, y);
993
- _(() => {
994
- r.value.componentInstance = a;
1005
+ } = j(s), i = T(), l = G("designer-host-service"), f = G("design-item-context"), y = Fe(f, l), a = ve(i, f, y);
1006
+ Z(() => {
1007
+ i.value.componentInstance = a;
995
1008
  }), t.expose(a.value);
996
1009
  const c = B(() => ({
997
1010
  switch: !0,
@@ -1000,9 +1013,9 @@ const Fe = /* @__PURE__ */ q({
1000
1013
  "switch-large": e.value === "large",
1001
1014
  "switch-medium": e.value === "medium",
1002
1015
  "switch-small": e.value === "small"
1003
- })), o = B(() => (i == null ? void 0 : i.value) || (n == null ? void 0 : n.value));
1016
+ })), o = B(() => (r == null ? void 0 : r.value) || (n == null ? void 0 : n.value));
1004
1017
  return () => F("span", {
1005
- ref: r,
1018
+ ref: i,
1006
1019
  tabindex: "0",
1007
1020
  role: "button",
1008
1021
  class: c.value
@@ -1013,16 +1026,16 @@ const Fe = /* @__PURE__ */ q({
1013
1026
  }, [n == null ? void 0 : n.value])]), F("small", null, [t.slots.default && t.slots.default()])]);
1014
1027
  }
1015
1028
  });
1016
- V.register = (s, t, e, i) => {
1017
- s.switch = V, t.switch = H;
1029
+ V.register = (s, t, e, r) => {
1030
+ s.switch = V, t.switch = Q;
1018
1031
  };
1019
1032
  V.registerDesigner = (s, t, e) => {
1020
- s.switch = Fe, t.switch = H;
1033
+ s.switch = Ee, t.switch = Q;
1021
1034
  };
1022
- const Ve = K(V);
1035
+ const De = R(V);
1023
1036
  export {
1024
1037
  V as FSwitch,
1025
- Ve as default,
1026
- H as propsResolver,
1027
- N as switchProps
1038
+ De as default,
1039
+ Q as propsResolver,
1040
+ U as switchProps
1028
1041
  };