@farris/ui-vue 1.2.6 → 1.2.7

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 (74) hide show
  1. package/components/accordion/index.esm.js +147 -139
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +11 -28
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/checkbox/index.esm.js +33 -50
  6. package/components/checkbox/index.umd.cjs +1 -1
  7. package/components/combo-list/index.esm.js +183 -171
  8. package/components/combo-list/index.umd.cjs +1 -1
  9. package/components/condition/index.esm.js +236 -235
  10. package/components/condition/index.umd.cjs +1 -1
  11. package/components/data-grid/index.esm.js +1531 -1560
  12. package/components/data-grid/index.umd.cjs +1 -1
  13. package/components/data-view/index.esm.js +1299 -1300
  14. package/components/data-view/index.umd.cjs +1 -1
  15. package/components/date-picker/index.esm.js +235 -252
  16. package/components/date-picker/index.umd.cjs +1 -1
  17. package/components/dynamic-form/index.esm.js +127 -143
  18. package/components/dynamic-form/index.umd.cjs +1 -1
  19. package/components/dynamic-view/index.esm.js +206 -201
  20. package/components/dynamic-view/index.umd.cjs +1 -1
  21. package/components/external-container/index.esm.js +650 -647
  22. package/components/external-container/index.umd.cjs +1 -1
  23. package/components/field-selector/index.esm.js +1101 -1131
  24. package/components/field-selector/index.umd.cjs +1 -1
  25. package/components/filter-bar/index.esm.js +335 -332
  26. package/components/filter-bar/index.umd.cjs +1 -1
  27. package/components/input-group/index.esm.js +128 -145
  28. package/components/input-group/index.umd.cjs +1 -1
  29. package/components/list-view/index.esm.js +306 -303
  30. package/components/list-view/index.umd.cjs +1 -1
  31. package/components/lookup/index.esm.js +2470 -2469
  32. package/components/lookup/index.umd.cjs +1 -1
  33. package/components/mapping-editor/index.esm.js +1928 -1958
  34. package/components/mapping-editor/index.umd.cjs +1 -1
  35. package/components/order/index.esm.js +802 -788
  36. package/components/order/index.umd.cjs +1 -1
  37. package/components/page-header/index.esm.js +116 -137
  38. package/components/page-header/index.umd.cjs +1 -1
  39. package/components/property-editor/index.esm.js +533 -521
  40. package/components/property-editor/index.umd.cjs +2 -2
  41. package/components/property-panel/index.esm.js +178 -177
  42. package/components/property-panel/index.umd.cjs +1 -1
  43. package/components/radio-group/index.esm.js +56 -73
  44. package/components/radio-group/index.umd.cjs +1 -1
  45. package/components/response-layout-editor/index.esm.js +547 -518
  46. package/components/response-layout-editor/index.umd.cjs +1 -1
  47. package/components/response-toolbar/index.esm.js +260 -281
  48. package/components/response-toolbar/index.umd.cjs +1 -1
  49. package/components/schema-selector/index.esm.js +598 -617
  50. package/components/schema-selector/index.umd.cjs +2 -2
  51. package/components/switch/index.esm.js +137 -154
  52. package/components/switch/index.umd.cjs +1 -1
  53. package/components/tabs/index.esm.js +109 -130
  54. package/components/tabs/index.umd.cjs +1 -1
  55. package/components/textarea/index.esm.js +103 -120
  56. package/components/textarea/index.umd.cjs +1 -1
  57. package/components/time-picker/index.esm.js +172 -189
  58. package/components/time-picker/index.umd.cjs +1 -1
  59. package/components/transfer/index.esm.js +124 -122
  60. package/components/transfer/index.umd.cjs +1 -1
  61. package/components/tree-grid/index.esm.js +1600 -1630
  62. package/components/tree-grid/index.umd.cjs +1 -1
  63. package/components/tree-view/index.esm.js +245 -246
  64. package/components/tree-view/index.umd.cjs +1 -1
  65. package/farris.all.esm.js +4123 -4112
  66. package/farris.all.umd.cjs +8 -8
  67. package/package.json +1 -1
  68. package/types/combo-list/src/components/list-container.component.d.ts +6 -0
  69. package/types/combo-list/src/components/list-container.props.d.ts +9 -1
  70. package/types/data-grid/src/data-grid.props.d.ts +1 -0
  71. package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +0 -4
  72. package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -2
  73. package/types/property-panel/src/composition/entity/base-property.d.ts +0 -16
  74. package/types/property-panel/src/composition/entity/input-base-property.d.ts +21 -0
@@ -5,34 +5,34 @@ import { defineComponent as $, toRefs as j, ref as T, computed as k, watch as U,
5
5
  import { cloneDeep as Y } from "lodash-es";
6
6
  const x = {}, W = {};
7
7
  function A(o) {
8
- const { properties: e, title: t } = o, n = Object.keys(e).reduce((i, c) => (i[c] = e[c].type === "object" && e[c].properties ? A(e[c]) : Y(e[c].default), i), {});
8
+ const { properties: e, title: t } = o, n = Object.keys(e).reduce((r, c) => (r[c] = e[c].type === "object" && e[c].properties ? A(e[c]) : Y(e[c].default), r), {});
9
9
  return n.id = `${t}-${Date.now()}`, n;
10
10
  }
11
11
  function V(o, e = {}) {
12
12
  const t = x[o];
13
13
  if (t) {
14
14
  let n = A(t);
15
- const i = W[o];
16
- return n = i ? i({ getSchemaByType: V }, n, e) : n, n;
15
+ const r = W[o];
16
+ return n = r ? r({ getSchemaByType: V }, n, e) : n, n;
17
17
  }
18
18
  return null;
19
19
  }
20
20
  function Z(o, e) {
21
21
  const t = A(e);
22
- return Object.keys(o).reduce((n, i) => (n[i] = o[i], n), t), t;
22
+ return Object.keys(o).reduce((n, r) => (n[r] = o[r], n), t), t;
23
23
  }
24
24
  function J(o, e) {
25
- return Object.keys(o).filter((n) => o[n] != null).reduce((n, i) => {
26
- if (e.has(i)) {
27
- const c = e.get(i);
25
+ return Object.keys(o).filter((n) => o[n] != null).reduce((n, r) => {
26
+ if (e.has(r)) {
27
+ const c = e.get(r);
28
28
  if (typeof c == "string")
29
- n[c] = o[i];
29
+ n[c] = o[r];
30
30
  else {
31
- const m = c(i, o[i], o);
31
+ const m = c(r, o[r], o);
32
32
  Object.assign(n, m);
33
33
  }
34
34
  } else
35
- n[i] = o[i];
35
+ n[r] = o[r];
36
36
  return n;
37
37
  }, {});
38
38
  }
@@ -41,60 +41,60 @@ function R(o, e, t = /* @__PURE__ */ new Map()) {
41
41
  return J(n, t);
42
42
  }
43
43
  function K(o = {}) {
44
- function e(a, l, s, p) {
45
- if (typeof s == "number")
46
- return p[a].length === s;
47
- if (typeof s == "object") {
48
- const g = Object.keys(s)[0], f = s[g];
44
+ function e(a, l, p, s) {
45
+ if (typeof p == "number")
46
+ return s[a].length === p;
47
+ if (typeof p == "object") {
48
+ const g = Object.keys(p)[0], h = p[g];
49
49
  if (g === "not")
50
- return Number(p[a].length) !== Number(f);
50
+ return Number(s[a].length) !== Number(h);
51
51
  if (g === "moreThan")
52
- return Number(p[a].length) >= Number(f);
52
+ return Number(s[a].length) >= Number(h);
53
53
  if (g === "lessThan")
54
- return Number(p[a].length) <= Number(f);
54
+ return Number(s[a].length) <= Number(h);
55
55
  }
56
56
  return !1;
57
57
  }
58
- function t(a, l, s, p) {
59
- return p[a] && p[a].propertyValue && String(p[a].propertyValue.value) === String(s);
58
+ function t(a, l, p, s) {
59
+ return s[a] && s[a].propertyValue && String(s[a].propertyValue.value) === String(p);
60
60
  }
61
61
  const n = /* @__PURE__ */ new Map([
62
62
  ["length", e],
63
63
  ["getProperty", t]
64
64
  ]);
65
65
  Object.keys(o).reduce((a, l) => (a.set(l, o[l]), a), n);
66
- function i(a, l) {
67
- const s = a;
68
- return typeof l == "number" ? [{ target: s, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: s, operator: "getProperty", param: a, value: !!l }] : typeof l == "object" ? Object.keys(l).map((p) => {
69
- if (p === "length")
70
- return { target: s, operator: "length", param: null, value: l[p] };
71
- const g = p, f = l[p];
72
- return { target: s, operator: "getProperty", param: g, value: f };
66
+ function r(a, l) {
67
+ const p = a;
68
+ return typeof l == "number" ? [{ target: p, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: p, operator: "getProperty", param: a, value: !!l }] : typeof l == "object" ? Object.keys(l).map((s) => {
69
+ if (s === "length")
70
+ return { target: p, operator: "length", param: null, value: l[s] };
71
+ const g = s, h = l[s];
72
+ return { target: p, operator: "getProperty", param: g, value: h };
73
73
  }) : [];
74
74
  }
75
75
  function c(a) {
76
- return Object.keys(a).reduce((s, p) => {
77
- const g = i(p, a[p]);
78
- return s.push(...g), s;
76
+ return Object.keys(a).reduce((p, s) => {
77
+ const g = r(s, a[s]);
78
+ return p.push(...g), p;
79
79
  }, []);
80
80
  }
81
81
  function m(a, l) {
82
82
  if (n.has(a.operator)) {
83
- const s = n.get(a.operator);
84
- return s && s(a.target, a.param, a.value, l) || !1;
83
+ const p = n.get(a.operator);
84
+ return p && p(a.target, a.param, a.value, l) || !1;
85
85
  }
86
86
  return !1;
87
87
  }
88
88
  function u(a, l) {
89
- return c(a).reduce((g, f) => g && m(f, l), !0);
89
+ return c(a).reduce((g, h) => g && m(h, l), !0);
90
90
  }
91
91
  function y(a, l) {
92
- const s = Object.keys(a), p = s.includes("allOf"), g = s.includes("anyOf"), f = p || g, S = (f ? a[f ? p ? "allOf" : "anyOf" : "allOf"] : [a]).map((D) => u(D, l));
93
- return p ? !S.includes(!1) : S.includes(!0);
92
+ const p = Object.keys(a), s = p.includes("allOf"), g = p.includes("anyOf"), h = s || g, S = (h ? a[h ? s ? "allOf" : "anyOf" : "allOf"] : [a]).map((D) => u(D, l));
93
+ return s ? !S.includes(!1) : S.includes(!0);
94
94
  }
95
95
  return { parseValueSchema: y };
96
96
  }
97
- const r = {
97
+ const i = {
98
98
  Button: { type: "Button", name: "按钮", icon: "Button" },
99
99
  ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
100
100
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
@@ -207,8 +207,8 @@ const r = {
207
207
  /** 审批类 end */
208
208
  }, ee = {}, te = {};
209
209
  K();
210
- function ne(o, e, t = /* @__PURE__ */ new Map(), n = (m, u, y) => u, i = {}, c = (m) => m) {
211
- return x[e.title] = e, W[e.title] = n, ee[e.title] = i, te[e.title] = c, (m = {}) => {
210
+ function ne(o, e, t = /* @__PURE__ */ new Map(), n = (m, u, y) => u, r = {}, c = (m) => m) {
211
+ return x[e.title] = e, W[e.title] = n, ee[e.title] = r, te[e.title] = c, (m = {}) => {
212
212
  const u = R(m, e, t), y = Object.keys(o).reduce((a, l) => (a[l] = o[l].default, a), {});
213
213
  return Object.assign(y, u);
214
214
  };
@@ -216,9 +216,9 @@ function ne(o, e, t = /* @__PURE__ */ new Map(), n = (m, u, y) => u, i = {}, c =
216
216
  function oe(o, e) {
217
217
  return { customClass: e.class, customStyle: e.style };
218
218
  }
219
- const ie = /* @__PURE__ */ new Map([
219
+ const re = /* @__PURE__ */ new Map([
220
220
  ["appearance", oe]
221
- ]), re = "https://json-schema.org/draft/2020-12/schema", ae = "https://farris-design.gitee.io/switch.schema.json", le = "switch", ce = "A Farris Component", se = "object", pe = {
221
+ ]), ie = "https://json-schema.org/draft/2020-12/schema", ae = "https://farris-design.gitee.io/switch.schema.json", le = "switch", ce = "A Farris Component", pe = "object", se = {
222
222
  id: {
223
223
  description: "The unique identifier for a switch",
224
224
  type: "string"
@@ -294,12 +294,12 @@ const ie = /* @__PURE__ */ new Map([
294
294
  "id",
295
295
  "type"
296
296
  ], de = {
297
- $schema: re,
297
+ $schema: ie,
298
298
  $id: ae,
299
299
  title: le,
300
300
  description: ce,
301
- type: se,
302
- properties: pe,
301
+ type: pe,
302
+ properties: se,
303
303
  required: ue
304
304
  };
305
305
  function me(o, e, t) {
@@ -321,7 +321,7 @@ const E = {
321
321
  /** 开关值变化事件 */
322
322
  onModelValueChanged: { type: Function, default: () => {
323
323
  } }
324
- }, I = ne(E, de, ie, me), P = /* @__PURE__ */ $({
324
+ }, G = ne(E, de, re, me), P = /* @__PURE__ */ $({
325
325
  name: "FSwitch",
326
326
  props: E,
327
327
  emits: ["update:modelValue", "modelValueChanged"],
@@ -329,13 +329,13 @@ const E = {
329
329
  const {
330
330
  disabled: t,
331
331
  size: n,
332
- onLabel: i,
332
+ onLabel: r,
333
333
  offLabel: c,
334
334
  onBackground: m,
335
335
  offBackground: u,
336
336
  onColor: y,
337
337
  offColor: a
338
- } = j(o), l = T(o.modelValue), s = k(() => ({
338
+ } = j(o), l = T(o.modelValue), p = k(() => ({
339
339
  switch: !0,
340
340
  "f-cmp-switch": !0,
341
341
  checked: l.value,
@@ -343,7 +343,7 @@ const E = {
343
343
  "switch-large": n.value === "large",
344
344
  "switch-medium": n.value === "medium",
345
345
  "switch-small": n.value === "small"
346
- })), p = k(() => l.value ? {
346
+ })), s = k(() => l.value ? {
347
347
  outline: "none",
348
348
  background: m.value
349
349
  } : {
@@ -353,7 +353,7 @@ const E = {
353
353
  background: y.value
354
354
  } : {
355
355
  backgroundColor: a.value
356
- }), f = k(() => (i == null ? void 0 : i.value) || (c == null ? void 0 : c.value));
356
+ }), h = k(() => (r == null ? void 0 : r.value) || (c == null ? void 0 : c.value));
357
357
  function F() {
358
358
  t.value || (l.value = !l.value, e.emit("update:modelValue", l.value));
359
359
  }
@@ -364,14 +364,14 @@ const E = {
364
364
  }), () => b("span", {
365
365
  tabindex: "0",
366
366
  role: "button",
367
- class: s.value,
368
- style: p.value,
367
+ class: p.value,
368
+ style: s.value,
369
369
  onClick: F
370
- }, [f.value && b("span", {
370
+ }, [h.value && b("span", {
371
371
  class: "switch-pane"
372
372
  }, [b("span", {
373
373
  class: "switch-label-checked"
374
- }, [i == null ? void 0 : i.value]), b("span", {
374
+ }, [r == null ? void 0 : r.value]), b("span", {
375
375
  class: "switch-label-unchecked"
376
376
  }, [c == null ? void 0 : c.value])]), b("small", {
377
377
  style: g.value
@@ -384,7 +384,7 @@ function ye(o, e, t) {
384
384
  t != null && t.resolveComponentContext && t.resolveComponentContext();
385
385
  }
386
386
  n();
387
- const i = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "", m = T();
387
+ const r = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "", m = T();
388
388
  function u() {
389
389
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
390
390
  }
@@ -397,22 +397,22 @@ function ye(o, e, t) {
397
397
  function l() {
398
398
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
399
399
  }
400
- function s(d) {
400
+ function p(d) {
401
401
  if (!d || !d.value)
402
402
  return null;
403
403
  if (d.value.schema && d.value.schema.type === "component")
404
404
  return d.value;
405
- const v = T(d == null ? void 0 : d.value.parent), h = s(v);
406
- return h || null;
405
+ const v = T(d == null ? void 0 : d.value.parent), f = p(v);
406
+ return f || null;
407
407
  }
408
- function p(d = e) {
409
- const { componentInstance: v, designerItemElementRef: h } = d;
410
- return !v || !v.value ? null : v.value.canMove ? h : p(d.parent);
408
+ function s(d = e) {
409
+ const { componentInstance: v, designerItemElementRef: f } = d;
410
+ return !v || !v.value ? null : v.value.canMove ? f : s(d.parent);
411
411
  }
412
412
  function g(d) {
413
413
  return !!t && t.canAccepts(d);
414
414
  }
415
- function f() {
415
+ function h() {
416
416
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
417
417
  }
418
418
  function F() {
@@ -422,22 +422,22 @@ function ye(o, e, t) {
422
422
  }
423
423
  function S(d) {
424
424
  const { componentType: v } = d;
425
- let h = V(v, d);
426
- t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(d, h));
425
+ let f = V(v, d);
426
+ t && t.onResolveNewComponentSchema && (f = t.onResolveNewComponentSchema(d, f));
427
427
  const B = v.toLowerCase().replace("-", "_");
428
- return h && !h.id && h.type === v && (h.id = `${B}_${Math.random().toString().slice(2, 6)}`), h;
428
+ return f && !f.id && f.type === v && (f.id = `${B}_${Math.random().toString().slice(2, 6)}`), f;
429
429
  }
430
430
  function O(d, v) {
431
- const h = String(d.getAttribute("data-controltype")), B = d.getAttribute("data-feature"), L = B ? JSON.parse(B) : {};
431
+ const f = String(d.getAttribute("data-controltype")), B = d.getAttribute("data-feature"), L = B ? JSON.parse(B) : {};
432
432
  L.parentComponentInstance = m.value;
433
- let M = V(h, L);
433
+ let M = V(f, L);
434
434
  t && t.onAcceptNewChildElement && (M = t.onAcceptNewChildElement(d, v, M));
435
- const Q = h.toLowerCase().replace("-", "_");
436
- return M && !M.id && M.type === h && (M.id = `${Q}_${Math.random().toString().slice(2, 6)}`), M;
435
+ const I = f.toLowerCase().replace("-", "_");
436
+ return M && !M.id && M.type === f && (M.id = `${I}_${Math.random().toString().slice(2, 6)}`), M;
437
437
  }
438
438
  function D(d) {
439
439
  }
440
- function H(...d) {
440
+ function Q(...d) {
441
441
  if (t && t.getPropsConfig)
442
442
  return t.getPropsConfig(...d);
443
443
  }
@@ -450,13 +450,13 @@ function ye(o, e, t) {
450
450
  elementRef: o,
451
451
  parent: (N = e == null ? void 0 : e.parent) == null ? void 0 : N.componentInstance,
452
452
  schema: e == null ? void 0 : e.schema,
453
- styles: i,
453
+ styles: r,
454
454
  designerClass: c,
455
455
  canAccepts: g,
456
- getBelongedComponentInstance: s,
457
- getDraggableDesignItemElement: p,
458
- getDraggingDisplayText: f,
459
- getPropConfig: H,
456
+ getBelongedComponentInstance: p,
457
+ getDraggableDesignItemElement: s,
458
+ getDraggingDisplayText: h,
459
+ getPropConfig: Q,
460
460
  getDragScopeElement: F,
461
461
  onAcceptMovedChildElement: w,
462
462
  onAcceptNewChildElement: O,
@@ -467,7 +467,7 @@ function ye(o, e, t) {
467
467
  triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || T(!1)
468
468
  }, m;
469
469
  }
470
- class G {
470
+ class H {
471
471
  static getEditorTypesByMDataType(e) {
472
472
  const t = this.fieldControlTypeMapping[e];
473
473
  return t || [{ key: "", value: "" }];
@@ -476,59 +476,59 @@ class G {
476
476
  /**
477
477
  * <字段类型,可配置的控件类型列表>的映射
478
478
  */
479
- C(G, "fieldControlTypeMapping", {
479
+ C(H, "fieldControlTypeMapping", {
480
480
  String: [
481
- { key: r["input-group"].type, value: r["input-group"].name },
482
- { key: r.lookup.type, value: r.lookup.name },
483
- { key: r.Image.type, value: r.Image.name },
484
- { key: r["date-picker"].type, value: r["date-picker"].name },
485
- { key: r["check-box"].type, value: r["check-box"].name },
486
- { key: r["radio-group"].type, value: r["radio-group"].name },
487
- { key: r["combo-list"].type, value: r["combo-list"].name },
488
- { key: r.textarea.type, value: r.textarea.name }
481
+ { key: i["input-group"].type, value: i["input-group"].name },
482
+ { key: i.lookup.type, value: i.lookup.name },
483
+ { key: i.Image.type, value: i.Image.name },
484
+ { key: i["date-picker"].type, value: i["date-picker"].name },
485
+ { key: i["check-box"].type, value: i["check-box"].name },
486
+ { key: i["radio-group"].type, value: i["radio-group"].name },
487
+ { key: i["combo-list"].type, value: i["combo-list"].name },
488
+ { key: i.textarea.type, value: i.textarea.name }
489
489
  // { key: DgControl.Tags.type, value: DgControl.Tags.name },
490
490
  ],
491
491
  Text: [
492
- { key: r.textarea.type, value: r.textarea.name },
493
- { key: r.avatar.type, value: r.avatar.name },
494
- { key: r.lookup.type, value: r.lookup.name }
492
+ { key: i.textarea.type, value: i.textarea.name },
493
+ { key: i.avatar.type, value: i.avatar.name },
494
+ { key: i.lookup.type, value: i.lookup.name }
495
495
  ],
496
496
  Decimal: [
497
- { key: r["number-spinner"].type, value: r["number-spinner"].name }
497
+ { key: i["number-spinner"].type, value: i["number-spinner"].name }
498
498
  ],
499
499
  Integer: [
500
- { key: r["number-spinner"].type, value: r["number-spinner"].name }
500
+ { key: i["number-spinner"].type, value: i["number-spinner"].name }
501
501
  ],
502
502
  Number: [
503
- { key: r["number-spinner"].type, value: r["number-spinner"].name }
503
+ { key: i["number-spinner"].type, value: i["number-spinner"].name }
504
504
  ],
505
505
  BigNumber: [
506
- { key: r["number-spinner"].type, value: r["number-spinner"].name }
506
+ { key: i["number-spinner"].type, value: i["number-spinner"].name }
507
507
  ],
508
508
  Date: [
509
- { key: r["date-picker"].type, value: r["date-picker"].name }
509
+ { key: i["date-picker"].type, value: i["date-picker"].name }
510
510
  ],
511
511
  DateTime: [
512
- { key: r["date-picker"].type, value: r["date-picker"].name }
512
+ { key: i["date-picker"].type, value: i["date-picker"].name }
513
513
  ],
514
514
  Boolean: [
515
- { key: r.switch.type, value: r.switch.name },
516
- { key: r["check-box"].type, value: r["check-box"].name }
515
+ { key: i.switch.type, value: i.switch.name },
516
+ { key: i["check-box"].type, value: i["check-box"].name }
517
517
  ],
518
518
  Enum: [
519
- { key: r["combo-list"].type, value: r["combo-list"].name },
520
- { key: r["radio-group"].type, value: r["radio-group"].name }
519
+ { key: i["combo-list"].type, value: i["combo-list"].name },
520
+ { key: i["radio-group"].type, value: i["radio-group"].name }
521
521
  ],
522
522
  Object: [
523
- { key: r.lookup.type, value: r.lookup.name },
524
- { key: r["combo-list"].type, value: r["combo-list"].name },
525
- { key: r["radio-group"].type, value: r["radio-group"].name }
523
+ { key: i.lookup.type, value: i.lookup.name },
524
+ { key: i["combo-list"].type, value: i["combo-list"].name },
525
+ { key: i["radio-group"].type, value: i["radio-group"].name }
526
526
  ],
527
527
  EmployeeSelector: [
528
- { key: r.EmployeeSelector.type, value: r.EmployeeSelector.name }
528
+ { key: i.EmployeeSelector.type, value: i.EmployeeSelector.name }
529
529
  ],
530
530
  AdminOrganizationSelector: [
531
- { key: r.AdminOrganizationSelector.type, value: r.AdminOrganizationSelector.name }
531
+ { key: i.AdminOrganizationSelector.type, value: i.AdminOrganizationSelector.name }
532
532
  ]
533
533
  });
534
534
  class ge {
@@ -560,7 +560,7 @@ class ge {
560
560
  if (t) {
561
561
  if (!this.designViewModelField) {
562
562
  const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
563
- this.designViewModelField = n.fields.find((i) => i.id === t);
563
+ this.designViewModelField = n.fields.find((r) => r.id === t);
564
564
  }
565
565
  e.updateOn = this.designViewModelField.updateOn;
566
566
  }
@@ -568,7 +568,7 @@ class ge {
568
568
  changeFieldEditorType(e, t) {
569
569
  }
570
570
  getBasicPropConfig(e) {
571
- var n, i;
571
+ var n, r;
572
572
  var t = this;
573
573
  return this.setDesignViewModelField(e), {
574
574
  description: "Basic Information",
@@ -590,7 +590,7 @@ class ge {
590
590
  type: "combo-list",
591
591
  textField: "value",
592
592
  valueField: "key",
593
- data: G.getEditorTypesByMDataType(((i = (n = t.designViewModelField) == null ? void 0 : n.type) == null ? void 0 : i.name) || ""),
593
+ data: H.getEditorTypesByMDataType(((r = (n = t.designViewModelField) == null ? void 0 : n.type) == null ? void 0 : r.name) || ""),
594
594
  editable: !1
595
595
  }
596
596
  },
@@ -617,12 +617,12 @@ class ge {
617
617
  * @param newControlType 新控件类型
618
618
  */
619
619
  changeControlType(e, t) {
620
- var a, l, s, p, g;
621
- const n = t.propertyValue, i = this.formSchemaUtils.getComponentById(this.componentId);
622
- let c = this.getControlParentContainer(e.id, i);
620
+ var a, l, p, s, g;
621
+ const n = t.propertyValue, r = this.formSchemaUtils.getComponentById(this.componentId);
622
+ let c = this.getControlParentContainer(e.id, r);
623
623
  if (!c)
624
624
  return;
625
- const m = c.contents.findIndex((f) => f.id === e.id), u = c.contents[m];
625
+ const m = c.contents.findIndex((h) => h.id === e.id), u = c.contents[m];
626
626
  let y;
627
627
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
628
628
  editor: {
@@ -641,8 +641,8 @@ class ge {
641
641
  type: n || "",
642
642
  placeHolder: (a = u.editor) == null ? void 0 : a.placeHolder,
643
643
  holdPlace: (l = u.editor) == null ? void 0 : l.holdPlace,
644
- readonly: (s = u.editor) == null ? void 0 : s.readonly,
645
- require: (p = u.editor) == null ? void 0 : p.require,
644
+ readonly: (p = u.editor) == null ? void 0 : p.readonly,
645
+ require: (s = u.editor) == null ? void 0 : s.require,
646
646
  visible: (g = u.editor) == null ? void 0 : g.visible
647
647
  }), c.contents.splice(m, 1, y);
648
648
  }
@@ -685,36 +685,15 @@ class ge {
685
685
  let n;
686
686
  if (!t || !t.contents || t.contents.length === 0)
687
687
  return null;
688
- for (const i of t.contents) {
689
- if (i.id === e)
688
+ for (const r of t.contents) {
689
+ if (r.id === e)
690
690
  return n = t, t;
691
- if (n = this.getControlParentContainer(e, i), n)
691
+ if (n = this.getControlParentContainer(e, r), n)
692
692
  return n;
693
693
  }
694
694
  }
695
- getBindingFieldEditorOptions(e) {
696
- const t = this.formSchemaUtils.getFormMetadataBasicInfo();
697
- return {
698
- type: "field-selector",
699
- bindingType: { enable: !1 },
700
- editorParams: {
701
- propertyData: e,
702
- formBasicInfo: t
703
- },
704
- columns: [
705
- { field: "name", title: "字段名称" },
706
- { field: "bindingField", title: "绑定字段" },
707
- { field: "fieldType", title: "字段类型" }
708
- ],
709
- beforeOpenDialog: (n) => {
710
- const i = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
711
- n.instance.loadData(i);
712
- },
713
- textField: "bindingField"
714
- };
715
- }
716
695
  }
717
- class fe extends ge {
696
+ class he extends ge {
718
697
  constructor(e, t) {
719
698
  super(e, t);
720
699
  }
@@ -749,12 +728,16 @@ class fe extends ge {
749
728
  { field: "bindingField", title: "绑定字段" },
750
729
  { field: "fieldType", title: "字段类型" }
751
730
  ],
731
+ textField: "bindingField",
752
732
  data: n
753
733
  }
754
734
  };
755
735
  }
736
+ getBindingOtions(e) {
737
+ return this.getFieldSelectorOptions(e);
738
+ }
756
739
  getComponentConfig(e, t = {}, n = {}) {
757
- const i = Object.assign({
740
+ const r = Object.assign({
758
741
  description: "组件信息",
759
742
  title: "组件信息",
760
743
  type: "input-group",
@@ -781,10 +764,10 @@ class fe extends ge {
781
764
  type: "string"
782
765
  }
783
766
  }, n);
784
- return { ...i, properties: { ...c } };
767
+ return { ...r, properties: { ...c } };
785
768
  }
786
769
  }
787
- class he extends fe {
770
+ class fe extends he {
788
771
  constructor(e, t) {
789
772
  super(e, t);
790
773
  }
@@ -842,7 +825,7 @@ class he extends fe {
842
825
  function ve(o, e) {
843
826
  o.schema;
844
827
  const t = T(!0), n = T(!0);
845
- function i(s) {
828
+ function r(p) {
846
829
  return !1;
847
830
  }
848
831
  function c() {
@@ -854,15 +837,15 @@ function ve(o, e) {
854
837
  function u() {
855
838
  return !0;
856
839
  }
857
- function y(s) {
840
+ function y(p) {
858
841
  }
859
842
  function a() {
860
843
  }
861
- function l(s) {
844
+ function l(p) {
862
845
  return null;
863
846
  }
864
847
  return {
865
- canAccepts: i,
848
+ canAccepts: r,
866
849
  checkCanDeleteComponent: c,
867
850
  checkCanMoveComponent: m,
868
851
  hideNestedPaddingInDesginerView: u,
@@ -877,26 +860,26 @@ function Ce(o, e) {
877
860
  const {
878
861
  canAccepts: t,
879
862
  checkCanDeleteComponent: n,
880
- checkCanMoveComponent: i,
863
+ checkCanMoveComponent: r,
881
864
  hideNestedPaddingInDesginerView: c,
882
865
  onAcceptMovedChildElement: m,
883
866
  resolveComponentContext: u,
884
867
  triggerBelongedComponentToMoveWhenMoved: y,
885
868
  triggerBelongedComponentToDeleteWhenDeleted: a
886
869
  } = ve(o), l = o.schema;
887
- function s(p) {
888
- return new he(p, e).getPropertyConfig(l);
870
+ function p(s) {
871
+ return new fe(s, e).getPropertyConfig(l);
889
872
  }
890
873
  return {
891
874
  canAccepts: t,
892
875
  checkCanDeleteComponent: n,
893
- checkCanMoveComponent: i,
876
+ checkCanMoveComponent: r,
894
877
  hideNestedPaddingInDesginerView: c,
895
878
  onAcceptMovedChildElement: m,
896
879
  resolveComponentContext: u,
897
880
  triggerBelongedComponentToMoveWhenMoved: y,
898
881
  triggerBelongedComponentToDeleteWhenDeleted: a,
899
- getPropsConfig: s
882
+ getPropsConfig: p
900
883
  };
901
884
  }
902
885
  const be = /* @__PURE__ */ $({
@@ -907,7 +890,7 @@ const be = /* @__PURE__ */ $({
907
890
  const {
908
891
  size: t,
909
892
  onLabel: n,
910
- offLabel: i
893
+ offLabel: r
911
894
  } = j(o), c = T(), m = z("designer-host-service"), u = z("design-item-context"), y = Ce(u, m), a = ye(c, u, y);
912
895
  X(() => {
913
896
  c.value.componentInstance = a;
@@ -919,17 +902,17 @@ const be = /* @__PURE__ */ $({
919
902
  "switch-large": t.value === "large",
920
903
  "switch-medium": t.value === "medium",
921
904
  "switch-small": t.value === "small"
922
- })), s = k(() => (n == null ? void 0 : n.value) || (i == null ? void 0 : i.value));
905
+ })), p = k(() => (n == null ? void 0 : n.value) || (r == null ? void 0 : r.value));
923
906
  return () => b("span", {
924
907
  ref: c,
925
908
  tabindex: "0",
926
909
  role: "button",
927
910
  class: l.value
928
- }, [s.value && b("span", {
911
+ }, [p.value && b("span", {
929
912
  class: "switch-pane"
930
913
  }, [b("span", {
931
914
  class: "switch-label-unchecked"
932
- }, [i == null ? void 0 : i.value])]), b("small", null, [e.slots.default && e.slots.default()])]);
915
+ }, [r == null ? void 0 : r.value])]), b("small", null, [e.slots.default && e.slots.default()])]);
933
916
  }
934
917
  }), we = (o) => {
935
918
  const e = o;
@@ -938,15 +921,15 @@ const be = /* @__PURE__ */ $({
938
921
  }, o;
939
922
  };
940
923
  P.register = (o, e, t, n) => {
941
- o.switch = P, e.switch = I;
924
+ o.switch = P, e.switch = G;
942
925
  };
943
926
  P.registerDesigner = (o, e, t) => {
944
- o.switch = be, e.switch = I;
927
+ o.switch = be, e.switch = G;
945
928
  };
946
929
  const ke = we(P);
947
930
  export {
948
931
  P as FSwitch,
949
932
  ke as default,
950
- I as propsResolver,
933
+ G as propsResolver,
951
934
  E as switchProps
952
935
  };