@farris/ui-vue 1.6.5-beta.8 → 1.6.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 (137) hide show
  1. package/components/avatar/index.esm.js +335 -335
  2. package/components/avatar/index.umd.cjs +1 -1
  3. package/components/button-edit/index.esm.js +6 -6
  4. package/components/button-edit/index.umd.cjs +1 -1
  5. package/components/combo-list/index.esm.js +139 -134
  6. package/components/combo-list/index.umd.cjs +1 -1
  7. package/components/common/index.esm.js +1 -1
  8. package/components/common/index.umd.cjs +1 -1
  9. package/components/component/index.esm.js +300 -300
  10. package/components/component/index.umd.cjs +1 -1
  11. package/components/condition/index.esm.js +7 -6
  12. package/components/condition/index.umd.cjs +1 -1
  13. package/components/content-container/index.esm.js +295 -295
  14. package/components/content-container/index.umd.cjs +1 -1
  15. package/components/data-grid/index.esm.js +99 -99
  16. package/components/data-grid/index.umd.cjs +1 -1
  17. package/components/data-view/index.esm.js +3407 -3338
  18. package/components/data-view/index.umd.cjs +1 -1
  19. package/components/date-picker/index.esm.js +833 -832
  20. package/components/date-picker/index.umd.cjs +1 -1
  21. package/components/designer-canvas/index.esm.js +5 -5
  22. package/components/designer-canvas/index.umd.cjs +1 -1
  23. package/components/dynamic-form/index.esm.js +173 -172
  24. package/components/dynamic-form/index.umd.cjs +1 -1
  25. package/components/events-editor/index.esm.js +637 -637
  26. package/components/events-editor/index.umd.cjs +3 -3
  27. package/components/expression-editor/index.esm.js +737 -732
  28. package/components/expression-editor/index.umd.cjs +4 -4
  29. package/components/filter-bar/index.esm.js +728 -706
  30. package/components/filter-bar/index.umd.cjs +1 -1
  31. package/components/filter-condition-editor/index.esm.js +670 -665
  32. package/components/filter-condition-editor/index.umd.cjs +2 -2
  33. package/components/flow-canvas/index.esm.js +205 -205
  34. package/components/flow-canvas/index.umd.cjs +1 -1
  35. package/components/language-textbox/index.esm.js +77 -76
  36. package/components/language-textbox/index.umd.cjs +1 -1
  37. package/components/list-nav/index.esm.js +4 -2
  38. package/components/list-nav/index.umd.cjs +1 -1
  39. package/components/list-view/index.esm.js +42 -40
  40. package/components/list-view/index.umd.cjs +2 -2
  41. package/components/lookup/index.esm.js +118 -118
  42. package/components/lookup/index.umd.cjs +1 -1
  43. package/components/mapping-editor/index.esm.js +482 -483
  44. package/components/mapping-editor/index.umd.cjs +1 -1
  45. package/components/message-box/index.esm.js +424 -424
  46. package/components/message-box/index.umd.cjs +1 -1
  47. package/components/modal/index.esm.js +276 -276
  48. package/components/modal/index.umd.cjs +1 -1
  49. package/components/number-range/index.esm.js +161 -161
  50. package/components/number-range/index.umd.cjs +1 -1
  51. package/components/number-spinner/index.esm.js +322 -316
  52. package/components/number-spinner/index.umd.cjs +1 -1
  53. package/components/order/index.esm.js +541 -534
  54. package/components/order/index.umd.cjs +2 -2
  55. package/components/page-header/index.esm.js +1 -1
  56. package/components/page-header/index.umd.cjs +1 -1
  57. package/components/popover/index.esm.js +58 -56
  58. package/components/popover/index.umd.cjs +1 -1
  59. package/components/property-panel/index.esm.js +216 -216
  60. package/components/property-panel/index.umd.cjs +2 -2
  61. package/components/query-solution/index.esm.js +489 -467
  62. package/components/query-solution/index.umd.cjs +3 -3
  63. package/components/radio-group/index.esm.js +30 -30
  64. package/components/radio-group/index.umd.cjs +1 -1
  65. package/components/response-layout/index.esm.js +282 -282
  66. package/components/response-layout/index.umd.cjs +1 -1
  67. package/components/response-layout-editor/index.esm.js +875 -873
  68. package/components/response-layout-editor/index.umd.cjs +1 -1
  69. package/components/response-toolbar/index.esm.js +1 -1
  70. package/components/response-toolbar/index.umd.cjs +1 -1
  71. package/components/schema-selector/index.esm.js +504 -496
  72. package/components/schema-selector/index.umd.cjs +6 -6
  73. package/components/search-box/index.esm.js +76 -72
  74. package/components/search-box/index.umd.cjs +1 -1
  75. package/components/section/index.esm.js +212 -212
  76. package/components/section/index.umd.cjs +1 -1
  77. package/components/sort-condition-editor/index.esm.js +382 -377
  78. package/components/sort-condition-editor/index.umd.cjs +2 -2
  79. package/components/tabs/index.esm.js +584 -582
  80. package/components/tabs/index.umd.cjs +2 -2
  81. package/components/textarea/index.esm.js +362 -362
  82. package/components/textarea/index.umd.cjs +2 -2
  83. package/components/time-picker/index.css +1 -0
  84. package/components/time-picker/index.esm.js +9799 -0
  85. package/components/time-picker/index.umd.cjs +1 -0
  86. package/components/time-picker/package.json +8 -0
  87. package/components/time-picker/style.js +6 -0
  88. package/components/transfer/index.esm.js +81 -79
  89. package/components/transfer/index.umd.cjs +2 -2
  90. package/components/tree-grid/index.esm.js +100 -100
  91. package/components/tree-grid/index.umd.cjs +1 -1
  92. package/components/tree-view/index.esm.js +2361 -2279
  93. package/components/tree-view/index.umd.cjs +1 -1
  94. package/components/video/index.esm.js +220 -220
  95. package/components/video/index.umd.cjs +1 -1
  96. package/designer/button-edit/index.css +1 -0
  97. package/designer/button-edit/index.esm.js +4856 -0
  98. package/designer/button-edit/index.umd.cjs +1 -0
  99. package/designer/checkbox/index.esm.js +254 -0
  100. package/designer/checkbox/index.umd.cjs +1 -0
  101. package/designer/checkbox-group/index.esm.js +381 -0
  102. package/designer/checkbox-group/index.umd.cjs +1 -0
  103. package/designer/data-grid/index.css +1 -0
  104. package/designer/data-grid/index.esm.js +15445 -0
  105. package/designer/data-grid/index.umd.cjs +23 -0
  106. package/designer/data-view/index.esm.js +854 -0
  107. package/designer/data-view/index.umd.cjs +38 -0
  108. package/designer/drawer/index.css +1 -0
  109. package/designer/drawer/index.esm.js +525 -0
  110. package/designer/drawer/index.umd.cjs +1 -0
  111. package/designer/farris-designer.all.esm.js +22331 -0
  112. package/designer/farris-designer.all.umd.cjs +34 -0
  113. package/designer/index.css +1 -0
  114. package/designer/input-group/index.esm.js +1099 -0
  115. package/designer/input-group/index.umd.cjs +1 -0
  116. package/designer/list-view/index.css +1 -0
  117. package/designer/list-view/index.esm.js +4685 -0
  118. package/designer/list-view/index.umd.cjs +40 -0
  119. package/designer/radio-group/index.css +1 -0
  120. package/designer/radio-group/index.esm.js +6989 -0
  121. package/designer/radio-group/index.umd.cjs +1 -0
  122. package/designer/tree-grid/index.esm.js +1099 -0
  123. package/designer/tree-grid/index.umd.cjs +1 -0
  124. package/farris.all.esm.js +13299 -13177
  125. package/farris.all.umd.cjs +25 -25
  126. package/locales/data-grid/ui/en.json +4 -3
  127. package/locales/data-grid/ui/zh-CHS.json +2 -1
  128. package/locales/data-grid/ui/zh-CHT.json +2 -1
  129. package/locales/designer/en.json +9 -7
  130. package/locales/designer/zh-CHS.json +4 -2
  131. package/locales/designer/zh-CHT.json +4 -2
  132. package/locales/ui/en.json +9 -7
  133. package/locales/ui/zh-CHS.json +4 -2
  134. package/locales/ui/zh-CHT.json +4 -2
  135. package/package.json +1 -1
  136. package/types/combo-list/src/property-config/combo-list.property-config.d.ts +0 -6
  137. package/types/data-view/composition/types.d.ts +10 -4
@@ -1,4 +1,4 @@
1
- import { defineComponent as E, ref as g, computed as V, watch as B, onMounted as O, createVNode as I, inject as k } from "vue";
1
+ import { defineComponent as E, ref as y, computed as V, watch as B, onMounted as O, createVNode as I, inject as k } from "vue";
2
2
  import { useI18n as M } from "vue-i18n";
3
3
  import z from "../button-edit/index.esm.js";
4
4
  import { resolveAppearance as K, createPropsResolver as Q } from "../dynamic-resolver/index.esm.js";
@@ -411,7 +411,7 @@ const H = {
411
411
  props: ye,
412
412
  emits: ["selectionChange"],
413
413
  setup(e, t) {
414
- const i = g(), a = g(e.dataSource), n = g([]), s = g(e.separator), m = g(e.width), d = g(e.maxHeight), u = g(String(e.selectedValues).split(s.value)), C = V(() => e.multiSelect), y = V(() => ({
414
+ const i = y(), a = y(e.dataSource), n = y([]), m = y(e.separator), g = y(e.width), c = y(e.maxHeight), d = y(String(e.selectedValues).split(m.value)), C = V(() => e.multiSelect), h = V(() => ({
415
415
  enableSelectRow: !0,
416
416
  multiSelect: e.multiSelect,
417
417
  multiSelectMode: "OnCheckAndClick",
@@ -422,47 +422,47 @@ const H = {
422
422
  B(e.dataSource, () => {
423
423
  a.value = e.dataSource;
424
424
  }), V(() => e.enableSearch ? "SearchBar" : "ContentHeader");
425
- const b = V(() => {
426
- const r = {};
427
- return m.value !== void 0 && (r.width = `${m.value}px`), d.value !== void 0 && d.value > 0 && (r.maxHeight = `${d.value}px`), r;
425
+ const p = V(() => {
426
+ const u = {};
427
+ return g.value !== void 0 && (u.width = `${g.value}px`), c.value !== void 0 && c.value > 0 && (u.maxHeight = `${c.value}px`), u;
428
428
  });
429
- function l(r) {
430
- i.value.search(r);
429
+ function l(u) {
430
+ i.value.search(u);
431
431
  }
432
- function o(r) {
433
- n.value = r.map((f) => Object.assign({}, f)), u.value = r.map((f) => f[e.idField]), t.emit("selectionChange", n.value);
432
+ function o(u) {
433
+ n.value = u.map((s) => Object.assign({}, s)), d.value = u.map((s) => s[e.idField]), t.emit("selectionChange", n.value);
434
434
  }
435
- function p(r) {
435
+ function b(u) {
436
436
  if (e.enableHighlightSearch)
437
437
  return;
438
- let f = [];
438
+ let s = [];
439
439
  const {
440
- searchOption: c
440
+ searchOption: r
441
441
  } = e;
442
- typeof c == "function" ? f = a.value.filter((F) => c(r, F)) : f = a.value.filter((F) => F[e.valueField].indexOf(r) > -1 || F[e.textField].indexOf(r) > -1), i.value.updateDataSource(f);
442
+ typeof r == "function" ? s = a.value.filter((S) => r(u, S)) : s = a.value.filter((S) => S[e.valueField].indexOf(u) > -1 || S[e.textField].indexOf(u) > -1), i.value.updateDataSource(s);
443
443
  }
444
- B([() => e.selectedValues], ([r]) => {
445
- e.multiSelect ? u.value = r.split(s.value) : u.value = [r];
444
+ B([() => e.selectedValues], ([u]) => {
445
+ e.multiSelect ? d.value = u.split(m.value) : d.value = [u];
446
446
  });
447
- function S(r) {
448
- i.value.activeRowById(r);
447
+ function F(u) {
448
+ i.value.activeRowById(u);
449
449
  }
450
450
  return O(() => {
451
- var r, f;
451
+ var u, s;
452
452
  if (!e.multiSelect) {
453
- const c = (r = u.value) == null ? void 0 : r[0];
454
- let F = c;
455
- if (!X(c)) {
456
- const x = typeof c, w = typeof ((f = a.value[0]) == null ? void 0 : f[e.valueField || e.idField]);
457
- w === "number" && x !== w && (F = Number(c)), w === "boolean" && x !== w && (F = c === "true" ? !0 : c === "false" ? !1 : c), S(F);
453
+ const r = (u = d.value) == null ? void 0 : u[0];
454
+ let S = r;
455
+ if (!X(r)) {
456
+ const x = typeof r, w = typeof ((s = a.value[0]) == null ? void 0 : s[e.valueField || e.idField]);
457
+ w === "number" && x !== w && (S = Number(r)), w === "boolean" && x !== w && (S = r === "true" ? !0 : r === "false" ? !1 : r), F(S);
458
458
  }
459
459
  }
460
460
  }), t.expose({
461
461
  search: l,
462
- activeRowById: S
462
+ activeRowById: F
463
463
  }), () => I("div", {
464
464
  class: "f-combo-list-container",
465
- style: b.value
465
+ style: p.value
466
466
  }, [I(Y, {
467
467
  ref: i,
468
468
  size: "small",
@@ -475,31 +475,31 @@ const H = {
475
475
  textField: e.textField,
476
476
  titleField: e.titleField,
477
477
  multiSelect: e.multiSelect,
478
- selection: y.value,
478
+ selection: h.value,
479
479
  enableHighlightSearch: e.enableHighlightSearch,
480
- selectionValues: u.value,
480
+ selectionValues: d.value,
481
481
  onSelectionUpdate: o,
482
- onAfterSearch: p
482
+ onAfterSearch: b
483
483
  }, null)]);
484
484
  }
485
485
  });
486
486
  function ve(e) {
487
- const { t } = M(), i = g(""), a = g(e.modelValue), n = g(e.data || []), s = g(e.editable);
488
- function m(l) {
489
- const o = e.multiSelect ? String(l).split(e.separator) : [String(l)], p = o.map((f) => [f, !0]), S = new Map(p);
490
- return n.value.filter((f) => S.has(String(f[e.valueField]))).sort((f, c) => {
491
- const F = o.indexOf(f[e.valueField]), x = o.indexOf(c[e.valueField]);
492
- return F - x;
487
+ const { t } = M(), i = y(""), a = y(e.modelValue), n = y(e.data || []), m = y(e.editable);
488
+ function g(l) {
489
+ const o = e.multiSelect ? String(l).split(e.separator) : [String(l)], b = o.map((s) => [s, !0]), F = new Map(b);
490
+ return n.value.filter((s) => F.has(String(s[e.valueField]))).sort((s, r) => {
491
+ const S = o.indexOf(s[e.valueField]), x = o.indexOf(r[e.valueField]);
492
+ return S - x;
493
493
  });
494
494
  }
495
- function d(l) {
496
- const o = m(l).map((p) => p[e.textField]).join(e.separator);
497
- i.value = s.value ? o || l : o;
495
+ function c(l) {
496
+ const o = g(l).map((b) => b[e.textField]).join(e.separator);
497
+ i.value = m.value ? o || l : o;
498
498
  }
499
- function u(l) {
499
+ function d(l) {
500
500
  if (e.multiSelect) {
501
- const o = l.split(e.separator).map((S) => [S, !0]), p = new Map(o);
502
- return n.value.filter((S) => p.has(S[e.textField]));
501
+ const o = l.split(e.separator).map((F) => [F, !0]), b = new Map(o);
502
+ return n.value.filter((F) => b.has(F[e.textField]));
503
503
  }
504
504
  return n.value.filter((o) => "" + o[e.textField] === l);
505
505
  }
@@ -507,35 +507,35 @@ function ve(e) {
507
507
  const o = {};
508
508
  return o[e.idField] = l, o[e.textField] = l, [o];
509
509
  }
510
- function y(l) {
511
- let o = u(l);
512
- const p = o && o.length > 0;
513
- return s.value && !p && (o = C(l)), o;
510
+ function h(l) {
511
+ let o = d(l);
512
+ const b = o && o.length > 0;
513
+ return m.value && !b && (o = C(l)), o;
514
514
  }
515
- function b() {
516
- const { url: l, method: o = "GET", headers: p = { "Content-Type": "application/json;charset=utf-8;" }, body: S = null } = e.remote, r = o.toLowerCase() === "get" ? { method: o, headers: p } : { method: o, headers: p, body: S };
517
- let f = !1;
518
- fetch(new Request(l, r)).then((c) => {
515
+ function p() {
516
+ const { url: l, method: o = "GET", headers: b = { "Content-Type": "application/json;charset=utf-8;" }, body: F = null } = e.remote, u = o.toLowerCase() === "get" ? { method: o, headers: b } : { method: o, headers: b, body: F };
517
+ let s = !1;
518
+ fetch(new Request(l, u)).then((r) => {
519
519
  var x, w;
520
- if (c.status === 200)
521
- return f = !!((w = (x = c.headers) == null ? void 0 : x.get("content-type")) != null && w.includes("application/json")), f ? c.text() : c.json();
522
- throw c.status === 405 ? new Error(t("comboList.remoteError")) : new Error(c.statusText);
523
- }).then((c) => {
524
- c.length && (n.value = f ? JSON.parse(c) : c);
525
- }).catch((c) => {
526
- console.warn(c);
520
+ if (r.status === 200)
521
+ return s = !!((w = (x = r.headers) == null ? void 0 : x.get("content-type")) != null && w.includes("application/json")), s ? r.text() : r.json();
522
+ throw r.status === 405 ? new Error(t("comboList.remoteError")) : new Error(r.statusText);
523
+ }).then((r) => {
524
+ r.length && (n.value = s ? JSON.parse(r) : r);
525
+ }).catch((r) => {
526
+ console.warn(r);
527
527
  });
528
528
  }
529
- return e.remote && b(), B(() => e.data, () => {
529
+ return e.remote && p(), B(() => e.data, () => {
530
530
  n.value = e.data;
531
531
  }), B([n], ([l]) => {
532
532
  if (e.modelValue != null) {
533
- const o = l.find((p) => p[e.valueField] === e.modelValue);
533
+ const o = l.find((b) => b[e.valueField] === e.modelValue);
534
534
  o && (i.value = o[e.textField]);
535
535
  }
536
536
  }), B(() => e.modelValue, (l) => {
537
- a.value = l, d(l);
538
- }), d(e.modelValue), { dataSource: n, displayText: i, editable: s, modelValue: a, getItemsByDisplayText: u, getItemsByValue: m, getSelectedItemsByDisplayText: y };
537
+ a.value = l, c(l);
538
+ }), c(e.modelValue), { dataSource: n, displayText: i, editable: m, modelValue: a, getItemsByDisplayText: d, getItemsByValue: g, getSelectedItemsByDisplayText: h };
539
539
  }
540
540
  const L = /* @__PURE__ */ E({
541
541
  name: "FComboList",
@@ -544,53 +544,55 @@ const L = /* @__PURE__ */ E({
544
544
  setup(e, t) {
545
545
  const {
546
546
  t: i
547
- } = M(), a = g(), n = g(), s = g(e.disabled || e.readonly), m = g(e.enableClear), d = g(e.enableSearch), u = g(e.readonly), {
547
+ } = M(), a = y(), n = y(), m = y(e.disabled || e.readonly), g = y(e.enableClear), c = y(e.enableSearch), d = y(e.readonly), {
548
548
  dataSource: C,
549
- displayText: y,
550
- editable: b,
549
+ displayText: h,
550
+ editable: p,
551
551
  modelValue: l,
552
552
  getSelectedItemsByDisplayText: o,
553
- getItemsByDisplayText: p,
554
- getItemsByValue: S
555
- } = ve(e), r = g(e.dropDownIcon);
556
- r.value === '<span class="f-icon f-icon-arrow-chevron-down"></span>' && (r.value = '<span id="' + e.id + '-icon-dropdown" class="f-icon f-icon-arrow-chevron-down"></span>');
557
- const f = V(() => e.multiSelect), c = V(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
558
- function F() {
559
- !f.value && n.value && n.value.hidePopup();
553
+ getItemsByDisplayText: b,
554
+ getItemsByValue: F
555
+ } = ve(e), u = y(e.dropDownIcon);
556
+ u.value === '<span class="f-icon f-icon-arrow-chevron-down"></span>' && (u.value = '<span id="' + e.id + '-icon-dropdown" class="f-icon f-icon-arrow-chevron-down"></span>');
557
+ const s = V(() => e.multiSelect), r = V(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
558
+ function S() {
559
+ !s.value && n.value && n.value.hidePopup();
560
560
  }
561
- function x(h) {
562
- y.value = h.map((T) => T[e.textField]).join(e.separator);
561
+ function x(f) {
562
+ h.value = f.map((T) => T[e.textField]).join(e.separator);
563
563
  let v = "";
564
- h.length === 1 ? v = h[0][e.valueField] : v = h.map((T) => T[e.valueField]).join(e.separator), l.value !== v && (l.value = v, t.emit("update:modelValue", l.value), t.emit("change", h, l.value));
564
+ f.length === 1 ? v = f[0][e.valueField] : v = f.map((T) => T[e.valueField]).join(e.separator), l.value !== v && (l.value = v, t.emit("update:modelValue", l.value), t.emit("change", f, l.value));
565
565
  }
566
566
  function w() {
567
- const h = S(l.value);
568
- x(h);
567
+ const f = F(l.value);
568
+ x(f);
569
569
  }
570
570
  function N() {
571
- u.value || y.value;
571
+ d.value || h.value;
572
572
  }
573
- function j(h) {
573
+ function j(f) {
574
574
  var v;
575
575
  l.value = "", (v = a.value) == null || v.activeRowById(""), t.emit("update:modelValue", ""), t.emit("change", [], ""), t.emit("clear");
576
576
  }
577
- function q(h) {
577
+ function q(f) {
578
578
  var v, T;
579
- e.enableSearch && e.enableHighlightSearch && ((v = a.value) == null || v.search(h)), (T = a.value) == null || T.activeRowById(h), t.emit("change", [l.value], l.value);
579
+ e.enableSearch && e.enableHighlightSearch && ((v = a.value) == null || v.search(f)), (T = a.value) == null || T.activeRowById(f), t.emit("change", [l.value], l.value);
580
580
  }
581
- function G(h) {
581
+ function G(f) {
582
582
  if (e.multiSelect) {
583
- const v = S(l.value), P = v.map((R) => R[e.idField || e.valueField]).join(e.separator);
583
+ const v = b(f);
584
+ e.viewType;
585
+ const P = v.map((R) => R[e.idField || e.valueField]).join(e.separator);
584
586
  l.value !== P && (l.value = P, t.emit("update:modelValue", l.value), t.emit("change", v, l.value));
585
587
  }
586
588
  }
587
589
  function W() {
588
- return y.value;
590
+ return h.value;
589
591
  }
590
- function U(h) {
592
+ function U(f) {
591
593
  const {
592
594
  value: v
593
- } = h.target;
595
+ } = f.target;
594
596
  q(v), t.emit("input", v);
595
597
  }
596
598
  function J() {
@@ -599,25 +601,25 @@ const L = /* @__PURE__ */ E({
599
601
  return t.expose({
600
602
  getDisplayText: W,
601
603
  hidePopup: J
602
- }), B([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([h, v, T, P, R]) => {
603
- s.value = h, b.value = v, m.value = T, d.value = P, u.value = R;
604
+ }), B([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([f, v, T, P, R]) => {
605
+ m.value = f, p.value = v, g.value = T, c.value = P, d.value = R;
604
606
  }), () => I(z, {
605
607
  ref: n,
606
608
  id: e.id,
607
- disable: s.value,
608
- readonly: u.value,
609
+ disable: m.value,
610
+ readonly: d.value,
609
611
  forcePlaceholder: e.forcePlaceholder,
610
- editable: b.value,
611
- buttonContent: r.value,
612
+ editable: p.value,
613
+ buttonContent: u.value,
612
614
  placeholder: e.placeholder === "请选择" ? i("comboList.placeholder") : e.placeholder,
613
- enableClear: m.value,
615
+ enableClear: g.value,
614
616
  maxLength: e.maxLength,
615
617
  tabIndex: e.tabIndex,
616
618
  enableTitle: e.enableTitle,
617
619
  multiSelect: e.multiSelect,
618
620
  inputType: e.multiSelect ? e.viewType : "text",
619
- modelValue: y.value,
620
- "onUpdate:modelValue": (h) => y.value = h,
621
+ modelValue: h.value,
622
+ "onUpdate:modelValue": (f) => h.value = f,
621
623
  focusOnCreated: e.focusOnCreated,
622
624
  selectOnCreated: e.selectOnCreated,
623
625
  onClear: j,
@@ -642,12 +644,12 @@ const L = /* @__PURE__ */ E({
642
644
  selectedValues: l.value,
643
645
  separator: e.separator,
644
646
  multiSelect: e.multiSelect,
645
- enableSearch: d.value,
647
+ enableSearch: c.value,
646
648
  maxHeight: e.maxHeight,
647
649
  enableHighlightSearch: e.enableHighlightSearch,
648
- width: e.fitEditor ? c.value : void 0,
649
- onSelectionChange: (h) => {
650
- x(h), F();
650
+ width: e.fitEditor ? r.value : void 0,
651
+ onSelectionChange: (f) => {
652
+ x(f), S();
651
653
  }
652
654
  }, null)]
653
655
  });
@@ -663,7 +665,7 @@ class be extends te {
663
665
  super(t, i);
664
666
  }
665
667
  getCommonEditorProperties(t) {
666
- var i, a, n, s, m, d;
668
+ var i, a, n;
667
669
  return {
668
670
  viewType: {
669
671
  visible: !!((i = t.editor) != null && i.multiSelect),
@@ -697,23 +699,24 @@ class be extends te {
697
699
  title: "允许编辑",
698
700
  type: "boolean",
699
701
  refreshPanelAfterChanged: !0,
700
- readonly: !!((s = t.editor) != null && s.multiSelect) && (((m = t.editor) == null ? void 0 : m.viewType) === "tag" || !t.editor.viewType)
701
- },
702
- enableHighlightSearch: {
703
- visible: !!((d = t.editor) != null && d.editable),
704
- description: "编辑状态下启用高亮搜索",
705
- title: "启用高亮搜索",
706
- type: "boolean"
702
+ readonly: !0
703
+ // readonly: !!propertyData.editor?.multiSelect && (propertyData.editor?.viewType === 'tag' || !propertyData.editor!.viewType)
707
704
  }
705
+ // enableHighlightSearch: {
706
+ // visible: !!propertyData.editor?.editable,
707
+ // description: "编辑状态下启用高亮搜索",
708
+ // title: "启用高亮搜索",
709
+ // type: "boolean"
710
+ // },
708
711
  };
709
712
  }
710
713
  getEditorProperties(t) {
711
- var s, m;
714
+ var m, g;
712
715
  const i = this;
713
716
  let a = "";
714
- if (((s = t == null ? void 0 : t.binding) == null ? void 0 : s.type) === "Form") {
715
- const d = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
716
- (m = d == null ? void 0 : d.schemaField) != null && m.type && (a = d.schemaField.type.$type);
717
+ if (((m = t == null ? void 0 : t.binding) == null ? void 0 : m.type) === "Form") {
718
+ const c = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
719
+ (g = c == null ? void 0 : c.schemaField) != null && g.type && (a = c.schemaField.type.$type);
717
720
  }
718
721
  return i.getComponentConfig(t, { type: "combo-list" }, {
719
722
  // enableSearch: {
@@ -771,7 +774,7 @@ class be extends te {
771
774
  // },
772
775
  // },
773
776
  body: {
774
- visible: t.editor.dataSourceType === "dynamic",
777
+ visible: !1,
775
778
  $converter: A,
776
779
  description: "",
777
780
  title: "服务端API参数",
@@ -803,35 +806,36 @@ class be extends te {
803
806
  editor: {
804
807
  nullable: !0,
805
808
  min: 0,
806
- useThousands: !1
809
+ useThousands: !1,
810
+ needValid: !0
807
811
  }
808
812
  },
809
813
  ...this.getCommonEditorProperties(t)
810
- }, (d, u) => {
811
- if (!d || !u.editor)
814
+ }, (c, d) => {
815
+ if (!c || !d.editor)
812
816
  return;
813
817
  const C = this;
814
- switch (d.propertyID) {
818
+ switch (c.propertyID) {
815
819
  case "dataSourceType": {
816
- d.propertyValue === "static" ? (u.editor.valueField = "value", u.editor.textField = "name", u.editor.remote = null) : d.propertyValue === "dynamic" && (u.editor.remote = { method: "GET" }, u.editor.valueField = "value", u.editor.textField = "name");
820
+ c.propertyValue === "static" ? (d.editor.valueField = "value", d.editor.textField = "name", d.editor.remote = null) : c.propertyValue === "dynamic" && (d.editor.remote = { method: "GET" }, d.editor.valueField = "value", d.editor.textField = "name");
817
821
  break;
818
822
  }
819
823
  case "data": {
820
- !C.checkEnumDataReadonly(u) && u.formatter && (u.formatter.data = [...d.propertyValue]);
824
+ !C.checkEnumDataReadonly(d) && d.formatter && (d.formatter.data = [...c.propertyValue]);
821
825
  break;
822
826
  }
823
827
  case "viewType":
824
- d.propertyValue === "tag" && (u.editor.editable = !1);
828
+ c.propertyValue === "tag" && (d.editor.editable = !1);
825
829
  }
826
830
  });
827
831
  }
828
832
  getGridFieldEdtiorProperties(t, i) {
829
- var m, d, u, C;
833
+ var g, c, d, C;
830
834
  const a = this;
831
835
  let n = "";
832
- if (((m = t == null ? void 0 : t.binding) == null ? void 0 : m.type) === "Form") {
833
- const y = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
834
- (d = y == null ? void 0 : y.schemaField) != null && d.type && (n = y.schemaField.type.$type);
836
+ if (((g = t == null ? void 0 : t.binding) == null ? void 0 : g.type) === "Form") {
837
+ const h = this.schemaService.getFieldByIDAndVMID(t.binding.field, this.viewModelId);
838
+ (c = h == null ? void 0 : h.schemaField) != null && c.type && (n = h.schemaField.type.$type);
835
839
  }
836
840
  return a.getComponentConfig(t, { type: "combo-list" }, {
837
841
  // editable: {
@@ -850,7 +854,7 @@ class be extends te {
850
854
  title: "数据",
851
855
  type: "array",
852
856
  visible: !0,
853
- ...a.getItemCollectionEditor(t, (u = t.editor) == null ? void 0 : u.valueField, (C = t.editor) == null ? void 0 : C.textField),
857
+ ...a.getItemCollectionEditor(t, (d = t.editor) == null ? void 0 : d.valueField, (C = t.editor) == null ? void 0 : C.textField),
854
858
  // 这个属性,标记当属性变更得时候触发重新更新属性
855
859
  refreshPanelAfterChanged: !0
856
860
  },
@@ -880,21 +884,22 @@ class be extends te {
880
884
  editor: {
881
885
  nullable: !0,
882
886
  min: 0,
883
- useThousands: !1
887
+ useThousands: !1,
888
+ needValid: !0
884
889
  }
885
890
  },
886
891
  ...this.getCommonEditorProperties(t)
887
- }, (y, b) => {
888
- if (!y || !b.editor)
892
+ }, (h, p) => {
893
+ if (!h || !p.editor)
889
894
  return;
890
895
  const l = this;
891
- switch (y.propertyID) {
896
+ switch (h.propertyID) {
892
897
  case "dataSourceType": {
893
- y.propertyValue === "static" ? (b.editor.valueField = "value", b.editor.textField = "name", b.editor.remote = null) : y.propertyValue === "dynamic" && (b.editor.remote = { method: "GET" });
898
+ h.propertyValue === "static" ? (p.editor.valueField = "value", p.editor.textField = "name", p.editor.remote = null) : h.propertyValue === "dynamic" && (p.editor.remote = { method: "GET" });
894
899
  break;
895
900
  }
896
901
  case "data": {
897
- !l.checkEnumDataReadonly(b) && b.formatter && (b.formatter.data = [...y.propertyValue]);
902
+ !l.checkEnumDataReadonly(p) && p.formatter && (p.formatter.data = [...h.propertyValue]);
898
903
  break;
899
904
  }
900
905
  }
@@ -919,16 +924,16 @@ class be extends te {
919
924
  * 切换绑定属性
920
925
  */
921
926
  changeBindingField(t, i, a) {
922
- var s;
927
+ var m;
923
928
  super.changeBindingField(t, i);
924
929
  const n = a;
925
- t.editor && ((s = n == null ? void 0 : n.type) == null ? void 0 : s.$type) === D.EnumType && (t.editor.data = n.type.enumValues || []);
930
+ t.editor && ((m = n == null ? void 0 : n.type) == null ? void 0 : m.$type) === D.EnumType && (t.editor.data = n.type.enumValues || []);
926
931
  }
927
932
  }
928
933
  function pe(e, t) {
929
934
  const i = e.schema;
930
- function a(n, s) {
931
- return new be(n, t).getPropertyConfig(i, s);
935
+ function a(n, m) {
936
+ return new be(n, t).getPropertyConfig(i, m);
932
937
  }
933
938
  return {
934
939
  getPropsConfig: a
@@ -939,10 +944,10 @@ const Se = /* @__PURE__ */ E({
939
944
  props: he,
940
945
  emits: ["clear", "update:modelValue", "change"],
941
946
  setup(e, t) {
942
- const i = g(), a = k("designer-host-service"), n = k("design-item-context"), s = pe(n, a), m = _(i, n, s);
947
+ const i = y(), a = k("designer-host-service"), n = k("design-item-context"), m = pe(n, a), g = _(i, n, m);
943
948
  return O(() => {
944
- i.value.componentInstance = m;
945
- }), t.expose(m.value), () => I(Z, {
949
+ i.value.componentInstance = g;
950
+ }), t.expose(g.value), () => I(Z, {
946
951
  ref: i,
947
952
  buttonContent: e.dropDownIcon,
948
953
  readonly: !0,
@@ -1 +1 @@
1
- (function(h,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue"),require("vue-i18n"),require("../button-edit/index.umd.js"),require("../dynamic-resolver/index.umd.js"),require("lodash-es"),require("../list-view/index.umd.js"),require("../../designer/button-edit/index.umd.js"),require("../designer-canvas/index.umd.js"),require("../common/index.umd.js"),require("../property-panel/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","vue-i18n","../button-edit/index.umd.js","../dynamic-resolver/index.umd.js","lodash-es","../list-view/index.umd.js","../../designer/button-edit/index.umd.js","../designer-canvas/index.umd.js","../common/index.umd.js","../property-panel/index.umd.js"],i):(h=typeof globalThis<"u"?globalThis:h||self,i(h["combo-list"]={},h.Vue,h.vueI18n,h.FButtonEdit,h.dynamicResolver,h.LodashES,h.FListView,h.FButtonEditDesign,h.designerCanvas,h.common,h.propertyPanel))})(this,function(h,i,E,O,H,q,$,N,G,j,W){"use strict";const U=new Map([["appearance",H.resolveAppearance]]),J={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/combo-list.schema.json",title:"combo-list",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a combo list",type:"string"},type:{description:"The type string of number combo list component",type:"string",default:"combo-list"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disabled:{description:"",type:"boolean",default:!1},enableClear:{description:"",type:"boolean",default:!1},editable:{description:"",type:"boolean",default:!1},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeholder:{description:"",type:"string",default:"请选择"},idField:{description:"",type:"string",default:"id"},valueField:{description:"",type:"string",default:"id"},titleField:{description:"",type:"string",default:"name"},textField:{description:"",type:"string",default:"name"},dataSourceType:{description:"",type:"string",default:"static"},data:{description:"",type:"array"},remote:{description:"",type:"string"},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},multiSelect:{description:"",type:"boolean",default:!1},maxLength:{description:"",type:"number",default:null},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""},maxHeight:{description:"",type:"number",default:350},minPanelWidth:{description:"",type:"number",default:160},popupOnClick:{description:"",type:"boolean",default:!0},separator:{description:"",type:"string",default:","},viewType:{description:"",type:"string",default:"tag"},enableSearch:{description:"启用搜索",type:"boolean",default:!0},enableHighlightSearch:{description:"启用高亮搜索",type:"boolean",default:!1},"onUpdate:modelValue":{description:"",type:"object"}},required:["type"],ignore:["id","appearance","binding","visible"]};function _(e,t,l){return t}var k=(e=>(e.top="top",e.bottom="bottom",e.auto="auto",e))(k||{});const B={id:{type:String},data:{type:Array,default:[]},disabled:{default:!1,type:Boolean},dropDownIcon:{type:String,default:'<span class="f-icon f-icon-arrow-chevron-down"></span>'},editable:{default:!1,type:Boolean},enableClear:{default:!0,type:Boolean},enableSearch:{type:Boolean,default:!1},enableTitle:{default:!0,type:Boolean},fitEditor:{default:!1,type:Boolean},forcePlaceholder:{default:!1,type:Boolean},hidePanelOnClear:{default:!0,type:Boolean},idField:{default:"id",type:String},mapFields:{type:Object},maxHeight:{default:350,type:Number},maxLength:{type:Number},multiSelect:{type:Boolean,default:!1},modelValue:{},placeholder:{type:String,default:"请选择"},placement:{type:String,default:"auto"},readonly:{default:!1,type:Boolean},remote:{default:null,type:Object},remoteSearch:{default:!1,type:Boolean},separator:{default:",",type:String},tabIndex:{type:Number,default:-1},textField:{default:"name",type:String},titleField:{default:"name",type:String},valueField:{default:"id",type:String},viewType:{default:"tag",type:String},change:{type:Function,default:()=>{}},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1},autoHeight:{type:Boolean,default:!0},beforeOpen:{type:Function,default:null},searchOption:{type:[Boolean,Function],default:!1},enableHighlightSearch:{type:Boolean,default:!0},minPanelWidth:{type:Number,default:160},popupOnClick:{type:Boolean,default:!0}},A=Object.assign({},B,{readonly:{}}),L=H.createPropsResolver(B,J,U,_),z={dataSource:{type:Array,default:[]},enableSearch:{type:Boolean,default:!1},idField:{type:String,default:"id"},multiSelect:{type:Boolean,default:!1},selectedValues:{type:String,default:""},separator:{type:String,default:","},textField:{type:String,default:"name"},titleField:{type:String,default:"name"},width:{type:Number},maxHeight:{type:Number},valueField:{type:String,default:"id"},onSelectionChange:{type:Function,default:()=>{}},searchOption:{type:[Boolean,Function],default:!1},enableHighlightSearch:{type:Boolean,default:!0}},K=i.defineComponent({name:"FComboListContainer",props:z,emits:["selectionChange"],setup(e,t){const l=i.ref(),o=i.ref(e.dataSource),a=i.ref([]),f=i.ref(e.separator),y=i.ref(e.width),r=i.ref(e.maxHeight),u=i.ref(String(e.selectedValues).split(f.value)),x=i.computed(()=>e.multiSelect),b=i.computed(()=>({enableSelectRow:!0,multiSelect:e.multiSelect,multiSelectMode:"OnCheckAndClick",showCheckbox:x.value,showSelectAll:!1,showSelection:!0}));i.watch(e.dataSource,()=>{o.value=e.dataSource}),i.computed(()=>e.enableSearch?"SearchBar":"ContentHeader");const v=i.computed(()=>{const s={};return y.value!==void 0&&(s.width=`${y.value}px`),r.value!==void 0&&r.value>0&&(s.maxHeight=`${r.value}px`),s});function n(s){l.value.search(s)}function d(s){a.value=s.map(m=>Object.assign({},m)),u.value=s.map(m=>m[e.idField]),t.emit("selectionChange",a.value)}function S(s){if(e.enableHighlightSearch)return;let m=[];const{searchOption:c}=e;typeof c=="function"?m=o.value.filter(F=>c(s,F)):m=o.value.filter(F=>F[e.valueField].indexOf(s)>-1||F[e.textField].indexOf(s)>-1),l.value.updateDataSource(m)}i.watch([()=>e.selectedValues],([s])=>{e.multiSelect?u.value=s.split(f.value):u.value=[s]});function C(s){l.value.activeRowById(s)}return i.onMounted(()=>{var s,m;if(!e.multiSelect){const c=(s=u.value)==null?void 0:s[0];let F=c;if(!q.isUndefined(c)){const w=typeof c,T=typeof((m=o.value[0])==null?void 0:m[e.valueField||e.idField]);T==="number"&&w!==T&&(F=Number(c)),T==="boolean"&&w!==T&&(F=c==="true"?!0:c==="false"?!1:c),C(F)}}}),t.expose({search:n,activeRowById:C}),()=>i.createVNode("div",{class:"f-combo-list-container",style:v.value},[i.createVNode($,{ref:l,size:"small",itemClass:"f-combo-list-item",itemContentClass:"text-truncate",header:"ContentHeader",headerClass:"f-combo-list-search-box",data:o.value,idField:e.idField,textField:e.textField,titleField:e.titleField,multiSelect:e.multiSelect,selection:b.value,enableHighlightSearch:e.enableHighlightSearch,selectionValues:u.value,onSelectionUpdate:d,onAfterSearch:S},null)])}});function Q(e){const{t}=E.useI18n(),l=i.ref(""),o=i.ref(e.modelValue),a=i.ref(e.data||[]),f=i.ref(e.editable);function y(n){const d=e.multiSelect?String(n).split(e.separator):[String(n)],S=d.map(m=>[m,!0]),C=new Map(S);return a.value.filter(m=>C.has(String(m[e.valueField]))).sort((m,c)=>{const F=d.indexOf(m[e.valueField]),w=d.indexOf(c[e.valueField]);return F-w})}function r(n){const d=y(n).map(S=>S[e.textField]).join(e.separator);l.value=f.value?d||n:d}function u(n){if(e.multiSelect){const d=n.split(e.separator).map(C=>[C,!0]),S=new Map(d);return a.value.filter(C=>S.has(C[e.textField]))}return a.value.filter(d=>""+d[e.textField]===n)}function x(n){const d={};return d[e.idField]=n,d[e.textField]=n,[d]}function b(n){let d=u(n);const S=d&&d.length>0;return f.value&&!S&&(d=x(n)),d}function v(){const{url:n,method:d="GET",headers:S={"Content-Type":"application/json;charset=utf-8;"},body:C=null}=e.remote,s=d.toLowerCase()==="get"?{method:d,headers:S}:{method:d,headers:S,body:C};let m=!1;fetch(new Request(n,s)).then(c=>{var w,T;if(c.status===200)return m=!!((T=(w=c.headers)==null?void 0:w.get("content-type"))!=null&&T.includes("application/json")),m?c.text():c.json();throw c.status===405?new Error(t("comboList.remoteError")):new Error(c.statusText)}).then(c=>{c.length&&(a.value=m?JSON.parse(c):c)}).catch(c=>{console.warn(c)})}return e.remote&&v(),i.watch(()=>e.data,()=>{a.value=e.data}),i.watch([a],([n])=>{if(e.modelValue!=null){const d=n.find(S=>S[e.valueField]===e.modelValue);d&&(l.value=d[e.textField])}}),i.watch(()=>e.modelValue,n=>{o.value=n,r(n)}),r(e.modelValue),{dataSource:a,displayText:l,editable:f,modelValue:o,getItemsByDisplayText:u,getItemsByValue:y,getSelectedItemsByDisplayText:b}}const P=i.defineComponent({name:"FComboList",props:B,emits:["clear","update:modelValue","change","input"],setup(e,t){const{t:l}=E.useI18n(),o=i.ref(),a=i.ref(),f=i.ref(e.disabled||e.readonly),y=i.ref(e.enableClear),r=i.ref(e.enableSearch),u=i.ref(e.readonly),{dataSource:x,displayText:b,editable:v,modelValue:n,getSelectedItemsByDisplayText:d,getItemsByDisplayText:S,getItemsByValue:C}=Q(e),s=i.ref(e.dropDownIcon);s.value==='<span class="f-icon f-icon-arrow-chevron-down"></span>'&&(s.value='<span id="'+e.id+'-icon-dropdown" class="f-icon f-icon-arrow-chevron-down"></span>');const m=i.computed(()=>e.multiSelect),c=i.computed(()=>a.value?a.value.elementRef.getBoundingClientRect().width:0);function F(){!m.value&&a.value&&a.value.hidePopup()}function w(g){b.value=g.map(V=>V[e.textField]).join(e.separator);let p="";g.length===1?p=g[0][e.valueField]:p=g.map(V=>V[e.valueField]).join(e.separator),n.value!==p&&(n.value=p,t.emit("update:modelValue",n.value),t.emit("change",g,n.value))}function T(){const g=C(n.value);w(g)}function ee(){u.value||b.value}function te(g){var p;n.value="",(p=o.value)==null||p.activeRowById(""),t.emit("update:modelValue",""),t.emit("change",[],""),t.emit("clear")}function ie(g){var p,V;e.enableSearch&&e.enableHighlightSearch&&((p=o.value)==null||p.search(g)),(V=o.value)==null||V.activeRowById(g),t.emit("change",[n.value],n.value)}function le(g){if(e.multiSelect){const p=C(n.value),I=p.map(R=>R[e.idField||e.valueField]).join(e.separator);n.value!==I&&(n.value=I,t.emit("update:modelValue",n.value),t.emit("change",p,n.value))}}function ne(){return b.value}function ae(g){const{value:p}=g.target;ie(p),t.emit("input",p)}function oe(){a.value.hidePopup()}return t.expose({getDisplayText:ne,hidePopup:oe}),i.watch([()=>e.disabled,()=>e.editable,()=>e.enableClear,()=>e.enableSearch,()=>e.readonly],([g,p,V,I,R])=>{f.value=g,v.value=p,y.value=V,r.value=I,u.value=R}),()=>i.createVNode(O,{ref:a,id:e.id,disable:f.value,readonly:u.value,forcePlaceholder:e.forcePlaceholder,editable:v.value,buttonContent:s.value,placeholder:e.placeholder==="请选择"?l("comboList.placeholder"):e.placeholder,enableClear:y.value,maxLength:e.maxLength,tabIndex:e.tabIndex,enableTitle:e.enableTitle,multiSelect:e.multiSelect,inputType:e.multiSelect?e.viewType:"text",modelValue:b.value,"onUpdate:modelValue":g=>b.value=g,focusOnCreated:e.focusOnCreated,selectOnCreated:e.selectOnCreated,onClear:te,onClick:ee,onChange:le,onBlur:T,onInput:ae,beforeOpen:e.beforeOpen,placement:e.placement,popupMinWidth:e.minPanelWidth,popupClass:"f-combo-list-wrapper",popupOnClick:e.popupOnClick,limitContentBySpace:!0},{default:()=>[i.createVNode(K,{ref:o,idField:e.idField,valueField:e.valueField,textField:e.textField,titleField:e.titleField,dataSource:x.value,selectedValues:n.value,separator:e.separator,multiSelect:e.multiSelect,enableSearch:r.value,maxHeight:e.maxHeight,enableHighlightSearch:e.enableHighlightSearch,width:e.fitEditor?c.value:void 0,onSelectionChange:g=>{w(g),F()}},null)]})}}),M={convertFrom:(e,t)=>(e.editor.remote||{})[t],convertTo:(e,t,l)=>{e.editor.remote=e.editor.remote||{},e.editor.remote[t]=l}};class X extends W.InputBaseProperty{constructor(t,l){super(t,l)}getCommonEditorProperties(t){var l,o,a,f,y,r;return{viewType:{visible:!!((l=t.editor)!=null&&l.multiSelect),description:"数据展示类型,有标签和文本两种方式",title:"数据展示类型",type:"enum",editor:{data:[{id:"tag",name:"标签"},{id:"text",name:"文本"}]},refreshPanelAfterChanged:!0},separator:{visible:!!((o=t.editor)!=null&&o.multiSelect)&&((a=t.editor)==null?void 0:a.viewType)==="text",description:"下拉列表启用多选且数据展示类型为文本时的分隔符",title:"分隔符",type:"enum",editor:{data:[{id:",",name:"逗号(,)"},{id:"#",name:"井号(#)"},{id:".",name:"句号(.)"},{id:"|",name:"竖线(|)"}]}},editable:{description:"",title:"允许编辑",type:"boolean",refreshPanelAfterChanged:!0,readonly:!!((f=t.editor)!=null&&f.multiSelect)&&(((y=t.editor)==null?void 0:y.viewType)==="tag"||!t.editor.viewType)},enableHighlightSearch:{visible:!!((r=t.editor)!=null&&r.editable),description:"编辑状态下启用高亮搜索",title:"启用高亮搜索",type:"boolean"}}}getEditorProperties(t){var f,y;const l=this;let o="";if(((f=t==null?void 0:t.binding)==null?void 0:f.type)==="Form"){const r=this.schemaService.getFieldByIDAndVMID(t.binding.field,this.viewModelId);(y=r==null?void 0:r.schemaField)!=null&&y.type&&(o=r.schemaField.type.$type)}return l.getComponentConfig(t,{type:"combo-list"},{enableClear:{description:"",title:"启用清空",type:"boolean"},dataSourceType:{description:"",title:"数据源类型",type:"enum",editor:{default:"static",data:[{id:"static",name:"静态"},{id:"dynamic",name:"动态"}]},refreshPanelAfterChanged:!0},data:{description:"",title:"数据",type:"array",visible:!t.editor.dataSourceType||t.editor.dataSourceType==="static",...l.getItemCollectionEditor(t,t.editor.valueField,t.editor.textField),refreshPanelAfterChanged:!0},url:{visible:t.editor.dataSourceType==="dynamic",$converter:M,description:"",title:"服务端API",type:"string"},body:{visible:t.editor.dataSourceType==="dynamic",$converter:M,description:"",title:"服务端API参数",type:"string"},textField:{description:"",title:"数据源显示字段",type:"string",readonly:t.editor.dataSourceType!=="dynamic"},valueField:{description:"",title:"数据源值字段",type:"string",readonly:t.editor.dataSourceType!=="dynamic"},multiSelect:{description:"",title:"启用多选",visible:!o||o==="StringType",type:"boolean",refreshPanelAfterChanged:!0},maxLength:{description:"",title:"最大输入长度",type:"number",editor:{nullable:!0,min:0,useThousands:!1}},...this.getCommonEditorProperties(t)},(r,u)=>{if(!r||!u.editor)return;const x=this;switch(r.propertyID){case"dataSourceType":{r.propertyValue==="static"?(u.editor.valueField="value",u.editor.textField="name",u.editor.remote=null):r.propertyValue==="dynamic"&&(u.editor.remote={method:"GET"},u.editor.valueField="value",u.editor.textField="name");break}case"data":{!x.checkEnumDataReadonly(u)&&u.formatter&&(u.formatter.data=[...r.propertyValue]);break}case"viewType":r.propertyValue==="tag"&&(u.editor.editable=!1)}})}getGridFieldEdtiorProperties(t,l){var y,r,u,x;const o=this;let a="";if(((y=t==null?void 0:t.binding)==null?void 0:y.type)==="Form"){const b=this.schemaService.getFieldByIDAndVMID(t.binding.field,this.viewModelId);(r=b==null?void 0:b.schemaField)!=null&&r.type&&(a=b.schemaField.type.$type)}return o.getComponentConfig(t,{type:"combo-list"},{enableClear:{description:"",title:"启用清空",type:"boolean"},data:{description:"",title:"数据",type:"array",visible:!0,...o.getItemCollectionEditor(t,(u=t.editor)==null?void 0:u.valueField,(x=t.editor)==null?void 0:x.textField),refreshPanelAfterChanged:!0},textField:{description:"",title:"数据源显示字段",type:"string",readonly:!0},valueField:{description:"",title:"数据源值字段",type:"string",readonly:!0},multiSelect:{description:"",title:"启用多选",visible:a==="StringType",type:"boolean",refreshPanelAfterChanged:!0},maxLength:{description:"",title:"最大输入长度",type:"number",editor:{nullable:!0,min:0,useThousands:!1}},...this.getCommonEditorProperties(t)},(b,v)=>{if(!b||!v.editor)return;const n=this;switch(b.propertyID){case"dataSourceType":{b.propertyValue==="static"?(v.editor.valueField="value",v.editor.textField="name",v.editor.remote=null):b.propertyValue==="dynamic"&&(v.editor.remote={method:"GET"});break}case"data":{!n.checkEnumDataReadonly(v)&&v.formatter&&(v.formatter.data=[...b.propertyValue]);break}}})}setEditorPropertyRelates(t,l,o){if(!t||!l.editor)return;const a=this;switch(t.propertyID){case"dataSourceType":{t.propertyValue==="static"&&(l.editor.valueField="value",l.editor.textField="name",l.editor.remote={});break}case"data":{!a.checkEnumDataReadonly(l)&&l.formatter&&(l.formatter.data=[...t.propertyValue]);break}}}changeBindingField(t,l,o){var f;super.changeBindingField(t,l);const a=o;t.editor&&((f=a==null?void 0:a.type)==null?void 0:f.$type)===j.FormSchemaEntityFieldType$Type.EnumType&&(t.editor.data=a.type.enumValues||[])}}function Y(e,t){const l=e.schema;function o(a,f){return new X(a,t).getPropertyConfig(l,f)}return{getPropsConfig:o}}const Z=i.defineComponent({name:"FComboListDesign",props:A,emits:["clear","update:modelValue","change"],setup(e,t){const l=i.ref(),o=i.inject("designer-host-service"),a=i.inject("design-item-context"),f=Y(a,o),y=G.useDesignerComponent(l,a,f);return i.onMounted(()=>{l.value.componentInstance=y}),t.expose(y.value),()=>i.createVNode(N,{ref:l,buttonContent:e.dropDownIcon,readonly:!0,editable:!1,forcePlaceholder:!0,placeholder:e.placeholder,enableClear:!0},null)}});P.register=(e,t,l,o)=>{e["combo-list"]=P,t["combo-list"]=L},P.registerDesigner=(e,t,l)=>{e["combo-list"]=Z,t["combo-list"]=L};const D=j.withInstall(P);h.FComboList=P,h.Placement=k,h.comboListDesignProps=A,h.comboListProps=B,h.default=D,h.propsResolver=L,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(h,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("vue"),require("vue-i18n"),require("../button-edit/index.umd.js"),require("../dynamic-resolver/index.umd.js"),require("lodash-es"),require("../list-view/index.umd.js"),require("../../designer/button-edit/index.umd.js"),require("../designer-canvas/index.umd.js"),require("../common/index.umd.js"),require("../property-panel/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","vue-i18n","../button-edit/index.umd.js","../dynamic-resolver/index.umd.js","lodash-es","../list-view/index.umd.js","../../designer/button-edit/index.umd.js","../designer-canvas/index.umd.js","../common/index.umd.js","../property-panel/index.umd.js"],i):(h=typeof globalThis<"u"?globalThis:h||self,i(h["combo-list"]={},h.Vue,h.vueI18n,h.FButtonEdit,h.dynamicResolver,h.LodashES,h.FListView,h.FButtonEditDesign,h.designerCanvas,h.common,h.propertyPanel))})(this,function(h,i,E,O,j,q,$,N,G,H,W){"use strict";const U=new Map([["appearance",j.resolveAppearance]]),J={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/combo-list.schema.json",title:"combo-list",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a combo list",type:"string"},type:{description:"The type string of number combo list component",type:"string",default:"combo-list"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disabled:{description:"",type:"boolean",default:!1},enableClear:{description:"",type:"boolean",default:!1},editable:{description:"",type:"boolean",default:!1},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeholder:{description:"",type:"string",default:"请选择"},idField:{description:"",type:"string",default:"id"},valueField:{description:"",type:"string",default:"id"},titleField:{description:"",type:"string",default:"name"},textField:{description:"",type:"string",default:"name"},dataSourceType:{description:"",type:"string",default:"static"},data:{description:"",type:"array"},remote:{description:"",type:"string"},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},multiSelect:{description:"",type:"boolean",default:!1},maxLength:{description:"",type:"number",default:null},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""},maxHeight:{description:"",type:"number",default:350},minPanelWidth:{description:"",type:"number",default:160},popupOnClick:{description:"",type:"boolean",default:!0},separator:{description:"",type:"string",default:","},viewType:{description:"",type:"string",default:"tag"},enableSearch:{description:"启用搜索",type:"boolean",default:!0},enableHighlightSearch:{description:"启用高亮搜索",type:"boolean",default:!1},"onUpdate:modelValue":{description:"",type:"object"}},required:["type"],ignore:["id","appearance","binding","visible"]};function _(e,t,l){return t}var k=(e=>(e.top="top",e.bottom="bottom",e.auto="auto",e))(k||{});const B={id:{type:String},data:{type:Array,default:[]},disabled:{default:!1,type:Boolean},dropDownIcon:{type:String,default:'<span class="f-icon f-icon-arrow-chevron-down"></span>'},editable:{default:!1,type:Boolean},enableClear:{default:!0,type:Boolean},enableSearch:{type:Boolean,default:!1},enableTitle:{default:!0,type:Boolean},fitEditor:{default:!1,type:Boolean},forcePlaceholder:{default:!1,type:Boolean},hidePanelOnClear:{default:!0,type:Boolean},idField:{default:"id",type:String},mapFields:{type:Object},maxHeight:{default:350,type:Number},maxLength:{type:Number},multiSelect:{type:Boolean,default:!1},modelValue:{},placeholder:{type:String,default:"请选择"},placement:{type:String,default:"auto"},readonly:{default:!1,type:Boolean},remote:{default:null,type:Object},remoteSearch:{default:!1,type:Boolean},separator:{default:",",type:String},tabIndex:{type:Number,default:-1},textField:{default:"name",type:String},titleField:{default:"name",type:String},valueField:{default:"id",type:String},viewType:{default:"tag",type:String},change:{type:Function,default:()=>{}},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1},autoHeight:{type:Boolean,default:!0},beforeOpen:{type:Function,default:null},searchOption:{type:[Boolean,Function],default:!1},enableHighlightSearch:{type:Boolean,default:!0},minPanelWidth:{type:Number,default:160},popupOnClick:{type:Boolean,default:!0}},A=Object.assign({},B,{readonly:{}}),L=j.createPropsResolver(B,J,U,_),z={dataSource:{type:Array,default:[]},enableSearch:{type:Boolean,default:!1},idField:{type:String,default:"id"},multiSelect:{type:Boolean,default:!1},selectedValues:{type:String,default:""},separator:{type:String,default:","},textField:{type:String,default:"name"},titleField:{type:String,default:"name"},width:{type:Number},maxHeight:{type:Number},valueField:{type:String,default:"id"},onSelectionChange:{type:Function,default:()=>{}},searchOption:{type:[Boolean,Function],default:!1},enableHighlightSearch:{type:Boolean,default:!0}},K=i.defineComponent({name:"FComboListContainer",props:z,emits:["selectionChange"],setup(e,t){const l=i.ref(),o=i.ref(e.dataSource),a=i.ref([]),y=i.ref(e.separator),b=i.ref(e.width),c=i.ref(e.maxHeight),r=i.ref(String(e.selectedValues).split(y.value)),x=i.computed(()=>e.multiSelect),g=i.computed(()=>({enableSelectRow:!0,multiSelect:e.multiSelect,multiSelectMode:"OnCheckAndClick",showCheckbox:x.value,showSelectAll:!1,showSelection:!0}));i.watch(e.dataSource,()=>{o.value=e.dataSource}),i.computed(()=>e.enableSearch?"SearchBar":"ContentHeader");const S=i.computed(()=>{const u={};return b.value!==void 0&&(u.width=`${b.value}px`),c.value!==void 0&&c.value>0&&(u.maxHeight=`${c.value}px`),u});function n(u){l.value.search(u)}function d(u){a.value=u.map(f=>Object.assign({},f)),r.value=u.map(f=>f[e.idField]),t.emit("selectionChange",a.value)}function v(u){if(e.enableHighlightSearch)return;let f=[];const{searchOption:s}=e;typeof s=="function"?f=o.value.filter(C=>s(u,C)):f=o.value.filter(C=>C[e.valueField].indexOf(u)>-1||C[e.textField].indexOf(u)>-1),l.value.updateDataSource(f)}i.watch([()=>e.selectedValues],([u])=>{e.multiSelect?r.value=u.split(y.value):r.value=[u]});function F(u){l.value.activeRowById(u)}return i.onMounted(()=>{var u,f;if(!e.multiSelect){const s=(u=r.value)==null?void 0:u[0];let C=s;if(!q.isUndefined(s)){const w=typeof s,T=typeof((f=o.value[0])==null?void 0:f[e.valueField||e.idField]);T==="number"&&w!==T&&(C=Number(s)),T==="boolean"&&w!==T&&(C=s==="true"?!0:s==="false"?!1:s),F(C)}}}),t.expose({search:n,activeRowById:F}),()=>i.createVNode("div",{class:"f-combo-list-container",style:S.value},[i.createVNode($,{ref:l,size:"small",itemClass:"f-combo-list-item",itemContentClass:"text-truncate",header:"ContentHeader",headerClass:"f-combo-list-search-box",data:o.value,idField:e.idField,textField:e.textField,titleField:e.titleField,multiSelect:e.multiSelect,selection:g.value,enableHighlightSearch:e.enableHighlightSearch,selectionValues:r.value,onSelectionUpdate:d,onAfterSearch:v},null)])}});function Q(e){const{t}=E.useI18n(),l=i.ref(""),o=i.ref(e.modelValue),a=i.ref(e.data||[]),y=i.ref(e.editable);function b(n){const d=e.multiSelect?String(n).split(e.separator):[String(n)],v=d.map(f=>[f,!0]),F=new Map(v);return a.value.filter(f=>F.has(String(f[e.valueField]))).sort((f,s)=>{const C=d.indexOf(f[e.valueField]),w=d.indexOf(s[e.valueField]);return C-w})}function c(n){const d=b(n).map(v=>v[e.textField]).join(e.separator);l.value=y.value?d||n:d}function r(n){if(e.multiSelect){const d=n.split(e.separator).map(F=>[F,!0]),v=new Map(d);return a.value.filter(F=>v.has(F[e.textField]))}return a.value.filter(d=>""+d[e.textField]===n)}function x(n){const d={};return d[e.idField]=n,d[e.textField]=n,[d]}function g(n){let d=r(n);const v=d&&d.length>0;return y.value&&!v&&(d=x(n)),d}function S(){const{url:n,method:d="GET",headers:v={"Content-Type":"application/json;charset=utf-8;"},body:F=null}=e.remote,u=d.toLowerCase()==="get"?{method:d,headers:v}:{method:d,headers:v,body:F};let f=!1;fetch(new Request(n,u)).then(s=>{var w,T;if(s.status===200)return f=!!((T=(w=s.headers)==null?void 0:w.get("content-type"))!=null&&T.includes("application/json")),f?s.text():s.json();throw s.status===405?new Error(t("comboList.remoteError")):new Error(s.statusText)}).then(s=>{s.length&&(a.value=f?JSON.parse(s):s)}).catch(s=>{console.warn(s)})}return e.remote&&S(),i.watch(()=>e.data,()=>{a.value=e.data}),i.watch([a],([n])=>{if(e.modelValue!=null){const d=n.find(v=>v[e.valueField]===e.modelValue);d&&(l.value=d[e.textField])}}),i.watch(()=>e.modelValue,n=>{o.value=n,c(n)}),c(e.modelValue),{dataSource:a,displayText:l,editable:y,modelValue:o,getItemsByDisplayText:r,getItemsByValue:b,getSelectedItemsByDisplayText:g}}const P=i.defineComponent({name:"FComboList",props:B,emits:["clear","update:modelValue","change","input"],setup(e,t){const{t:l}=E.useI18n(),o=i.ref(),a=i.ref(),y=i.ref(e.disabled||e.readonly),b=i.ref(e.enableClear),c=i.ref(e.enableSearch),r=i.ref(e.readonly),{dataSource:x,displayText:g,editable:S,modelValue:n,getSelectedItemsByDisplayText:d,getItemsByDisplayText:v,getItemsByValue:F}=Q(e),u=i.ref(e.dropDownIcon);u.value==='<span class="f-icon f-icon-arrow-chevron-down"></span>'&&(u.value='<span id="'+e.id+'-icon-dropdown" class="f-icon f-icon-arrow-chevron-down"></span>');const f=i.computed(()=>e.multiSelect),s=i.computed(()=>a.value?a.value.elementRef.getBoundingClientRect().width:0);function C(){!f.value&&a.value&&a.value.hidePopup()}function w(m){g.value=m.map(V=>V[e.textField]).join(e.separator);let p="";m.length===1?p=m[0][e.valueField]:p=m.map(V=>V[e.valueField]).join(e.separator),n.value!==p&&(n.value=p,t.emit("update:modelValue",n.value),t.emit("change",m,n.value))}function T(){const m=F(n.value);w(m)}function ee(){r.value||g.value}function te(m){var p;n.value="",(p=o.value)==null||p.activeRowById(""),t.emit("update:modelValue",""),t.emit("change",[],""),t.emit("clear")}function ie(m){var p,V;e.enableSearch&&e.enableHighlightSearch&&((p=o.value)==null||p.search(m)),(V=o.value)==null||V.activeRowById(m),t.emit("change",[n.value],n.value)}function le(m){if(e.multiSelect){const p=v(m);e.viewType;const I=p.map(R=>R[e.idField||e.valueField]).join(e.separator);n.value!==I&&(n.value=I,t.emit("update:modelValue",n.value),t.emit("change",p,n.value))}}function ne(){return g.value}function ae(m){const{value:p}=m.target;ie(p),t.emit("input",p)}function oe(){a.value.hidePopup()}return t.expose({getDisplayText:ne,hidePopup:oe}),i.watch([()=>e.disabled,()=>e.editable,()=>e.enableClear,()=>e.enableSearch,()=>e.readonly],([m,p,V,I,R])=>{y.value=m,S.value=p,b.value=V,c.value=I,r.value=R}),()=>i.createVNode(O,{ref:a,id:e.id,disable:y.value,readonly:r.value,forcePlaceholder:e.forcePlaceholder,editable:S.value,buttonContent:u.value,placeholder:e.placeholder==="请选择"?l("comboList.placeholder"):e.placeholder,enableClear:b.value,maxLength:e.maxLength,tabIndex:e.tabIndex,enableTitle:e.enableTitle,multiSelect:e.multiSelect,inputType:e.multiSelect?e.viewType:"text",modelValue:g.value,"onUpdate:modelValue":m=>g.value=m,focusOnCreated:e.focusOnCreated,selectOnCreated:e.selectOnCreated,onClear:te,onClick:ee,onChange:le,onBlur:T,onInput:ae,beforeOpen:e.beforeOpen,placement:e.placement,popupMinWidth:e.minPanelWidth,popupClass:"f-combo-list-wrapper",popupOnClick:e.popupOnClick,limitContentBySpace:!0},{default:()=>[i.createVNode(K,{ref:o,idField:e.idField,valueField:e.valueField,textField:e.textField,titleField:e.titleField,dataSource:x.value,selectedValues:n.value,separator:e.separator,multiSelect:e.multiSelect,enableSearch:c.value,maxHeight:e.maxHeight,enableHighlightSearch:e.enableHighlightSearch,width:e.fitEditor?s.value:void 0,onSelectionChange:m=>{w(m),C()}},null)]})}}),M={convertFrom:(e,t)=>(e.editor.remote||{})[t],convertTo:(e,t,l)=>{e.editor.remote=e.editor.remote||{},e.editor.remote[t]=l}};class X extends W.InputBaseProperty{constructor(t,l){super(t,l)}getCommonEditorProperties(t){var l,o,a;return{viewType:{visible:!!((l=t.editor)!=null&&l.multiSelect),description:"数据展示类型,有标签和文本两种方式",title:"数据展示类型",type:"enum",editor:{data:[{id:"tag",name:"标签"},{id:"text",name:"文本"}]},refreshPanelAfterChanged:!0},separator:{visible:!!((o=t.editor)!=null&&o.multiSelect)&&((a=t.editor)==null?void 0:a.viewType)==="text",description:"下拉列表启用多选且数据展示类型为文本时的分隔符",title:"分隔符",type:"enum",editor:{data:[{id:",",name:"逗号(,)"},{id:"#",name:"井号(#)"},{id:".",name:"句号(.)"},{id:"|",name:"竖线(|)"}]}},editable:{description:"",title:"允许编辑",type:"boolean",refreshPanelAfterChanged:!0,readonly:!0}}}getEditorProperties(t){var y,b;const l=this;let o="";if(((y=t==null?void 0:t.binding)==null?void 0:y.type)==="Form"){const c=this.schemaService.getFieldByIDAndVMID(t.binding.field,this.viewModelId);(b=c==null?void 0:c.schemaField)!=null&&b.type&&(o=c.schemaField.type.$type)}return l.getComponentConfig(t,{type:"combo-list"},{enableClear:{description:"",title:"启用清空",type:"boolean"},dataSourceType:{description:"",title:"数据源类型",type:"enum",editor:{default:"static",data:[{id:"static",name:"静态"},{id:"dynamic",name:"动态"}]},refreshPanelAfterChanged:!0},data:{description:"",title:"数据",type:"array",visible:!t.editor.dataSourceType||t.editor.dataSourceType==="static",...l.getItemCollectionEditor(t,t.editor.valueField,t.editor.textField),refreshPanelAfterChanged:!0},url:{visible:t.editor.dataSourceType==="dynamic",$converter:M,description:"",title:"服务端API",type:"string"},body:{visible:!1,$converter:M,description:"",title:"服务端API参数",type:"string"},textField:{description:"",title:"数据源显示字段",type:"string",readonly:t.editor.dataSourceType!=="dynamic"},valueField:{description:"",title:"数据源值字段",type:"string",readonly:t.editor.dataSourceType!=="dynamic"},multiSelect:{description:"",title:"启用多选",visible:!o||o==="StringType",type:"boolean",refreshPanelAfterChanged:!0},maxLength:{description:"",title:"最大输入长度",type:"number",editor:{nullable:!0,min:0,useThousands:!1,needValid:!0}},...this.getCommonEditorProperties(t)},(c,r)=>{if(!c||!r.editor)return;const x=this;switch(c.propertyID){case"dataSourceType":{c.propertyValue==="static"?(r.editor.valueField="value",r.editor.textField="name",r.editor.remote=null):c.propertyValue==="dynamic"&&(r.editor.remote={method:"GET"},r.editor.valueField="value",r.editor.textField="name");break}case"data":{!x.checkEnumDataReadonly(r)&&r.formatter&&(r.formatter.data=[...c.propertyValue]);break}case"viewType":c.propertyValue==="tag"&&(r.editor.editable=!1)}})}getGridFieldEdtiorProperties(t,l){var b,c,r,x;const o=this;let a="";if(((b=t==null?void 0:t.binding)==null?void 0:b.type)==="Form"){const g=this.schemaService.getFieldByIDAndVMID(t.binding.field,this.viewModelId);(c=g==null?void 0:g.schemaField)!=null&&c.type&&(a=g.schemaField.type.$type)}return o.getComponentConfig(t,{type:"combo-list"},{enableClear:{description:"",title:"启用清空",type:"boolean"},data:{description:"",title:"数据",type:"array",visible:!0,...o.getItemCollectionEditor(t,(r=t.editor)==null?void 0:r.valueField,(x=t.editor)==null?void 0:x.textField),refreshPanelAfterChanged:!0},textField:{description:"",title:"数据源显示字段",type:"string",readonly:!0},valueField:{description:"",title:"数据源值字段",type:"string",readonly:!0},multiSelect:{description:"",title:"启用多选",visible:a==="StringType",type:"boolean",refreshPanelAfterChanged:!0},maxLength:{description:"",title:"最大输入长度",type:"number",editor:{nullable:!0,min:0,useThousands:!1,needValid:!0}},...this.getCommonEditorProperties(t)},(g,S)=>{if(!g||!S.editor)return;const n=this;switch(g.propertyID){case"dataSourceType":{g.propertyValue==="static"?(S.editor.valueField="value",S.editor.textField="name",S.editor.remote=null):g.propertyValue==="dynamic"&&(S.editor.remote={method:"GET"});break}case"data":{!n.checkEnumDataReadonly(S)&&S.formatter&&(S.formatter.data=[...g.propertyValue]);break}}})}setEditorPropertyRelates(t,l,o){if(!t||!l.editor)return;const a=this;switch(t.propertyID){case"dataSourceType":{t.propertyValue==="static"&&(l.editor.valueField="value",l.editor.textField="name",l.editor.remote={});break}case"data":{!a.checkEnumDataReadonly(l)&&l.formatter&&(l.formatter.data=[...t.propertyValue]);break}}}changeBindingField(t,l,o){var y;super.changeBindingField(t,l);const a=o;t.editor&&((y=a==null?void 0:a.type)==null?void 0:y.$type)===H.FormSchemaEntityFieldType$Type.EnumType&&(t.editor.data=a.type.enumValues||[])}}function Y(e,t){const l=e.schema;function o(a,y){return new X(a,t).getPropertyConfig(l,y)}return{getPropsConfig:o}}const Z=i.defineComponent({name:"FComboListDesign",props:A,emits:["clear","update:modelValue","change"],setup(e,t){const l=i.ref(),o=i.inject("designer-host-service"),a=i.inject("design-item-context"),y=Y(a,o),b=G.useDesignerComponent(l,a,y);return i.onMounted(()=>{l.value.componentInstance=b}),t.expose(b.value),()=>i.createVNode(N,{ref:l,buttonContent:e.dropDownIcon,readonly:!0,editable:!1,forcePlaceholder:!0,placeholder:e.placeholder,enableClear:!0},null)}});P.register=(e,t,l,o)=>{e["combo-list"]=P,t["combo-list"]=L},P.registerDesigner=(e,t,l)=>{e["combo-list"]=Z,t["combo-list"]=L};const D=H.withInstall(P);h.FComboList=P,h.Placement=k,h.comboListDesignProps=A,h.comboListProps=B,h.default=D,h.propsResolver=L,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -3285,7 +3285,7 @@ function Vr() {
3285
3285
  if (isNaN(s.getTime())) {
3286
3286
  let i = n;
3287
3287
  if (n.indexOf("-") > -1 || n.indexOf("/") > -1) {
3288
- n.indexOf("/") > -1 && (i = n.replace("/", "-"));
3288
+ n.indexOf("/") > -1 && (i = n.replace(/\//g, "-"));
3289
3289
  const o = "-";
3290
3290
  i = i.split(o).map((u) => u.length < 2 ? u.padStart(2, "0") : u).join(o);
3291
3291
  }