@farris/ui-vue 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/components/accordion/index.esm.js +1 -1
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +472 -366
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.esm.js +1 -1
  6. package/components/button-edit/index.umd.cjs +1 -1
  7. package/components/calendar/index.esm.js +472 -480
  8. package/components/calendar/index.umd.cjs +1 -1
  9. package/components/capsule/index.esm.js +225 -233
  10. package/components/capsule/index.umd.cjs +1 -1
  11. package/components/checkbox/index.esm.js +615 -517
  12. package/components/checkbox/index.umd.cjs +1 -1
  13. package/components/color-picker/index.esm.js +325 -333
  14. package/components/color-picker/index.umd.cjs +2 -2
  15. package/components/combo-list/index.esm.js +578 -472
  16. package/components/combo-list/index.umd.cjs +1 -1
  17. package/components/combo-tree/index.esm.js +49 -49
  18. package/components/combo-tree/index.umd.cjs +1 -1
  19. package/components/common/index.esm.js +832 -722
  20. package/components/common/index.umd.cjs +1 -1
  21. package/components/component/index.esm.js +303 -981
  22. package/components/component/index.umd.cjs +1 -1
  23. package/components/condition/index.esm.js +8 -8
  24. package/components/condition/index.umd.cjs +1 -1
  25. package/components/content-container/index.esm.js +335 -1002
  26. package/components/content-container/index.umd.cjs +1 -1
  27. package/components/data-grid/index.esm.js +4429 -4312
  28. package/components/data-grid/index.umd.cjs +1 -1
  29. package/components/data-view/index.esm.js +3037 -3020
  30. package/components/data-view/index.umd.cjs +1 -1
  31. package/components/date-picker/index.esm.js +2216 -2119
  32. package/components/date-picker/index.umd.cjs +1 -1
  33. package/components/designer-canvas/index.css +1 -1
  34. package/components/designer-canvas/index.esm.js +914 -883
  35. package/components/designer-canvas/index.umd.cjs +1 -1
  36. package/components/dropdown/index.esm.js +223 -231
  37. package/components/dropdown/index.umd.cjs +2 -2
  38. package/components/dynamic-form/index.esm.js +1691 -2187
  39. package/components/dynamic-form/index.umd.cjs +1 -1
  40. package/components/dynamic-resolver/index.esm.js +143 -136
  41. package/components/dynamic-resolver/index.umd.cjs +1 -1
  42. package/components/events-editor/index.esm.js +250 -258
  43. package/components/events-editor/index.umd.cjs +1 -1
  44. package/components/expression-editor/index.esm.js +1 -1
  45. package/components/expression-editor/index.umd.cjs +1 -1
  46. package/components/external-container/index.esm.js +2672 -3438
  47. package/components/external-container/index.umd.cjs +1 -1
  48. package/components/field-selector/index.esm.js +2965 -2970
  49. package/components/field-selector/index.umd.cjs +1 -1
  50. package/components/filter-bar/index.esm.js +1650 -1602
  51. package/components/filter-bar/index.umd.cjs +1 -1
  52. package/components/flow-canvas/index.css +1 -1
  53. package/components/flow-canvas/index.esm.js +684 -675
  54. package/components/flow-canvas/index.umd.cjs +1 -1
  55. package/components/image-cropper/index.esm.js +453 -461
  56. package/components/image-cropper/index.umd.cjs +1 -1
  57. package/components/input-group/index.esm.js +604 -507
  58. package/components/input-group/index.umd.cjs +1 -1
  59. package/components/layout/index.esm.js +402 -378
  60. package/components/layout/index.umd.cjs +1 -1
  61. package/components/list-nav/index.esm.js +348 -1019
  62. package/components/list-nav/index.umd.cjs +1 -1
  63. package/components/list-view/index.esm.js +1658 -1666
  64. package/components/list-view/index.umd.cjs +1 -1
  65. package/components/lookup/index.esm.js +5209 -5088
  66. package/components/lookup/index.umd.cjs +1 -1
  67. package/components/mapping-editor/index.esm.js +4329 -4213
  68. package/components/mapping-editor/index.umd.cjs +1 -1
  69. package/components/nav/index.esm.js +905 -1357
  70. package/components/nav/index.umd.cjs +3 -3
  71. package/components/number-range/index.esm.js +517 -420
  72. package/components/number-range/index.umd.cjs +1 -1
  73. package/components/number-spinner/index.esm.js +588 -491
  74. package/components/number-spinner/index.umd.cjs +1 -1
  75. package/components/order/index.esm.js +1376 -1965
  76. package/components/order/index.umd.cjs +1 -1
  77. package/components/page-footer/index.esm.js +1 -1
  78. package/components/page-footer/index.umd.cjs +1 -1
  79. package/components/page-header/index.esm.js +1073 -1905
  80. package/components/page-header/index.umd.cjs +1 -1
  81. package/components/pagination/index.esm.js +809 -1237
  82. package/components/pagination/index.umd.cjs +1 -1
  83. package/components/progress/index.esm.js +198 -206
  84. package/components/progress/index.umd.cjs +3 -3
  85. package/components/property-editor/index.esm.js +1297 -1200
  86. package/components/property-editor/index.umd.cjs +2 -2
  87. package/components/property-panel/index.esm.js +609 -507
  88. package/components/property-panel/index.umd.cjs +1 -1
  89. package/components/query-solution/index.esm.js +3391 -3758
  90. package/components/query-solution/index.umd.cjs +1 -1
  91. package/components/radio-button/index.esm.js +1 -1
  92. package/components/radio-button/index.umd.cjs +1 -1
  93. package/components/radio-group/index.esm.js +544 -447
  94. package/components/radio-group/index.umd.cjs +1 -1
  95. package/components/rate/index.esm.js +247 -255
  96. package/components/rate/index.umd.cjs +1 -1
  97. package/components/response-layout/index.esm.js +146 -154
  98. package/components/response-layout/index.umd.cjs +1 -1
  99. package/components/response-layout-editor/index.esm.js +700 -675
  100. package/components/response-layout-editor/index.umd.cjs +1 -1
  101. package/components/response-toolbar/index.esm.js +956 -1786
  102. package/components/response-toolbar/index.umd.cjs +1 -1
  103. package/components/schema-selector/index.esm.js +4963 -5617
  104. package/components/schema-selector/index.umd.cjs +2 -2
  105. package/components/search-box/index.esm.js +158 -161
  106. package/components/search-box/index.umd.cjs +1 -1
  107. package/components/section/index.esm.js +436 -1124
  108. package/components/section/index.umd.cjs +1 -1
  109. package/components/smoke-detector/index.esm.js +92 -100
  110. package/components/smoke-detector/index.umd.cjs +1 -1
  111. package/components/splitter/index.esm.js +571 -1210
  112. package/components/splitter/index.umd.cjs +1 -1
  113. package/components/splitter/style.js +2 -0
  114. package/components/step/index.esm.js +239 -247
  115. package/components/step/index.umd.cjs +1 -1
  116. package/components/switch/index.esm.js +445 -348
  117. package/components/switch/index.umd.cjs +1 -1
  118. package/components/tabs/index.esm.js +2278 -3031
  119. package/components/tabs/index.umd.cjs +1 -1
  120. package/components/tags/index.esm.js +311 -319
  121. package/components/tags/index.umd.cjs +1 -1
  122. package/components/text/index.esm.js +215 -223
  123. package/components/text/index.umd.cjs +1 -1
  124. package/components/textarea/index.esm.js +468 -371
  125. package/components/textarea/index.umd.cjs +1 -1
  126. package/components/time-picker/index.esm.js +1271 -1174
  127. package/components/time-picker/index.umd.cjs +1 -1
  128. package/components/transfer/index.esm.js +469 -477
  129. package/components/transfer/index.umd.cjs +1 -1
  130. package/components/tree-grid/index.esm.js +3060 -3065
  131. package/components/tree-grid/index.umd.cjs +1 -1
  132. package/components/tree-view/index.esm.js +2476 -2481
  133. package/components/tree-view/index.umd.cjs +1 -1
  134. package/components/uploader/index.esm.js +374 -382
  135. package/components/uploader/index.umd.cjs +2 -2
  136. package/components/verify-detail/index.esm.js +248 -256
  137. package/components/verify-detail/index.umd.cjs +1 -1
  138. package/components/video/index.esm.js +414 -1093
  139. package/components/video/index.umd.cjs +1 -1
  140. package/components/weather/index.esm.js +498 -506
  141. package/components/weather/index.umd.cjs +5 -5
  142. package/farris.all.esm.js +20216 -21844
  143. package/farris.all.umd.cjs +9 -9
  144. package/index.css +1 -1
  145. package/package.json +1 -1
  146. package/types/common/directive/area-response.d.ts +10 -0
  147. package/types/common/index.d.ts +8 -0
  148. package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
  149. package/types/common/utils/resolve-field.d.ts +2 -0
  150. package/types/common/utils/use-class.d.ts +7 -0
  151. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  152. package/types/condition/src/types.d.ts +2 -1
  153. package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
  154. package/types/data-grid/index.d.ts +8 -5
  155. package/types/data-grid/src/data-grid.component.d.ts +3 -2
  156. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  157. package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
  158. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  159. package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
  160. package/types/data-view/composition/types.d.ts +7 -9
  161. package/types/designer-canvas/index.d.ts +2 -1
  162. package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
  163. package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
  164. package/types/designer-canvas/src/composition/types.d.ts +1 -2
  165. package/types/designer-canvas/src/types.d.ts +2 -1
  166. package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
  167. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  168. package/types/dynamic-form/src/property-config/form.property-config.d.ts +1 -1
  169. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
  170. package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
  171. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
  172. package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
  173. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
  174. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
  175. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
  176. package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
  177. package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
  178. package/types/property-panel/index.d.ts +2 -1
  179. package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
  180. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
  181. package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
  182. package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
  183. package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
  184. package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
  185. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
  186. package/types/query-solution/src/solutions.d.ts +108 -509
  187. package/types/response-layout-editor/index.d.ts +3 -1
  188. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
  189. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
  190. package/types/section/src/designer/use-designer-rules.d.ts +3 -3
  191. package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
  192. package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
  193. package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
  194. package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
  195. package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
  196. package/types/tree-grid/index.d.ts +3 -3
  197. package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
  198. package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
  199. package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
  200. package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
  201. package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
@@ -1,103 +1,102 @@
1
- var ne = Object.defineProperty;
2
- var oe = (t, n, e) => n in t ? ne(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
3
- var w = (t, n, e) => oe(t, typeof n != "symbol" ? n + "" : n, e);
4
- import { computed as B, ref as k, createVNode as V, onMounted as I, nextTick as G, defineComponent as J, watch as U, inject as W } from "vue";
5
- import { isPlainObject as z, cloneDeep as X } from "lodash-es";
6
- import S from "bignumber.js";
7
- import { getSchemaByType as Z } from "../dynamic-resolver/index.esm.js";
8
- import { useResponseLayoutEditorSetting as re } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
9
- const Q = {}, R = {};
10
- function $(t) {
11
- const { properties: n, title: e, ignore: r } = t, i = r && Array.isArray(r), c = Object.keys(n).reduce((s, p) => ((!i || !r.find((u) => u == p)) && (s[p] = n[p].type === "object" && n[p].properties ? $(n[p]) : X(n[p].default)), s), {});
12
- return (!i || !r.find((s) => s == "id")) && (c.id = `${e}-${Date.now()}`), c;
1
+ var ee = Object.defineProperty;
2
+ var te = (e, n, t) => n in e ? ee(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
+ var v = (e, n, t) => te(e, typeof n != "symbol" ? n + "" : n, t);
4
+ import { computed as F, ref as B, createVNode as E, onMounted as x, nextTick as j, defineComponent as q, watch as L, inject as W } from "vue";
5
+ import { isPlainObject as G, cloneDeep as z } from "lodash-es";
6
+ import N from "bignumber.js";
7
+ import { DgControl as $ } from "../designer-canvas/index.esm.js";
8
+ const Z = {}, X = {};
9
+ function O(e) {
10
+ const { properties: n, title: t, ignore: r } = e, i = r && Array.isArray(r), s = Object.keys(n).reduce((u, p) => ((!i || !r.find((d) => d == p)) && (u[p] = n[p].type === "object" && n[p].properties ? O(n[p]) : z(n[p].default)), u), {});
11
+ return t && (!i || !r.find((u) => u == "id")) && (s.id = `${t}-${Date.now()}`), s;
13
12
  }
14
- function j(t, n = {}, e) {
15
- const r = Q[t];
13
+ function J(e, n = {}, t) {
14
+ const r = Z[e];
16
15
  if (r) {
17
- let i = $(r);
18
- const c = R[t];
19
- return i = c ? c({ getSchemaByType: j }, i, n, e) : i, i;
16
+ let i = O(r);
17
+ const s = X[e];
18
+ return i = s ? s({ getSchemaByType: J }, i, n, t) : i, i;
20
19
  }
21
20
  return null;
22
21
  }
23
- function ie(t, n) {
24
- const e = $(n);
25
- return Object.keys(t).reduce((r, i) => (r[i] && z(r[i]) && z(t[i]) ? Object.assign(r[i], t[i]) : r[i] = t[i], r), e), e;
22
+ function ne(e, n) {
23
+ const t = O(n);
24
+ return Object.keys(e).reduce((r, i) => (r[i] && G(r[i]) && G(e[i]) ? Object.assign(r[i], e[i]) : r[i] = e[i], r), t), t;
26
25
  }
27
- function ae(t, n) {
28
- return Object.keys(t).filter((r) => t[r] != null).reduce((r, i) => {
26
+ function oe(e, n) {
27
+ return Object.keys(e).filter((r) => e[r] != null).reduce((r, i) => {
29
28
  if (n.has(i)) {
30
- const c = n.get(i);
31
- if (typeof c == "string")
32
- r[c] = t[i];
29
+ const s = n.get(i);
30
+ if (typeof s == "string")
31
+ r[s] = e[i];
33
32
  else {
34
- const s = c(i, t[i], t);
35
- Object.assign(r, s);
33
+ const u = s(i, e[i], e);
34
+ Object.assign(r, u);
36
35
  }
37
36
  } else
38
- r[i] = t[i];
37
+ r[i] = e[i];
39
38
  return r;
40
39
  }, {});
41
40
  }
42
- function le(t, n, e = /* @__PURE__ */ new Map()) {
43
- const r = ie(t, n);
44
- return ae(r, e);
41
+ function re(e, n, t = /* @__PURE__ */ new Map()) {
42
+ const r = ne(e, n);
43
+ return oe(r, t);
45
44
  }
46
- function ce(t = {}) {
47
- function n(o, l, a, d) {
48
- if (typeof a == "number")
49
- return d[o].length === a;
50
- if (typeof a == "object") {
51
- const y = Object.keys(a)[0], m = a[y];
52
- if (y === "not")
53
- return Number(d[o].length) !== Number(m);
54
- if (y === "moreThan")
55
- return Number(d[o].length) >= Number(m);
56
- if (y === "lessThan")
57
- return Number(d[o].length) <= Number(m);
45
+ function ie(e = {}) {
46
+ function n(a, l, o, c) {
47
+ if (typeof o == "number")
48
+ return c[a].length === o;
49
+ if (typeof o == "object") {
50
+ const f = Object.keys(o)[0], m = o[f];
51
+ if (f === "not")
52
+ return Number(c[a].length) !== Number(m);
53
+ if (f === "moreThan")
54
+ return Number(c[a].length) >= Number(m);
55
+ if (f === "lessThan")
56
+ return Number(c[a].length) <= Number(m);
58
57
  }
59
58
  return !1;
60
59
  }
61
- function e(o, l, a, d) {
62
- return d[o] && d[o].propertyValue && String(d[o].propertyValue.value) === String(a);
60
+ function t(a, l, o, c) {
61
+ return c[a] && c[a].propertyValue && String(c[a].propertyValue.value) === String(o);
63
62
  }
64
63
  const r = /* @__PURE__ */ new Map([
65
64
  ["length", n],
66
- ["getProperty", e]
65
+ ["getProperty", t]
67
66
  ]);
68
- Object.keys(t).reduce((o, l) => (o.set(l, t[l]), o), r);
69
- function i(o, l) {
70
- const a = o;
71
- return typeof l == "number" ? [{ target: a, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: a, operator: "getProperty", param: o, value: !!l }] : typeof l == "object" ? Object.keys(l).map((d) => {
72
- if (d === "length")
73
- return { target: a, operator: "length", param: null, value: l[d] };
74
- const y = d, m = l[d];
75
- return { target: a, operator: "getProperty", param: y, value: m };
67
+ Object.keys(e).reduce((a, l) => (a.set(l, e[l]), a), r);
68
+ function i(a, l) {
69
+ const o = a;
70
+ return typeof l == "number" ? [{ target: o, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: o, operator: "getProperty", param: a, value: !!l }] : typeof l == "object" ? Object.keys(l).map((c) => {
71
+ if (c === "length")
72
+ return { target: o, operator: "length", param: null, value: l[c] };
73
+ const f = c, m = l[c];
74
+ return { target: o, operator: "getProperty", param: f, value: m };
76
75
  }) : [];
77
76
  }
78
- function c(o) {
79
- return Object.keys(o).reduce((a, d) => {
80
- const y = i(d, o[d]);
81
- return a.push(...y), a;
77
+ function s(a) {
78
+ return Object.keys(a).reduce((o, c) => {
79
+ const f = i(c, a[c]);
80
+ return o.push(...f), o;
82
81
  }, []);
83
82
  }
84
- function s(o, l) {
85
- if (r.has(o.operator)) {
86
- const a = r.get(o.operator);
87
- return a && a(o.target, o.param, o.value, l) || !1;
83
+ function u(a, l) {
84
+ if (r.has(a.operator)) {
85
+ const o = r.get(a.operator);
86
+ return o && o(a.target, a.param, a.value, l) || !1;
88
87
  }
89
88
  return !1;
90
89
  }
91
- function p(o, l) {
92
- return c(o).reduce((y, m) => y && s(m, l), !0);
90
+ function p(a, l) {
91
+ return s(a).reduce((f, m) => f && u(m, l), !0);
93
92
  }
94
- function u(o, l) {
95
- const a = Object.keys(o), d = a.includes("allOf"), y = a.includes("anyOf"), m = d || y, F = (m ? o[m ? d ? "allOf" : "anyOf" : "allOf"] : [o]).map((P) => p(P, l));
96
- return d ? !F.includes(!1) : F.includes(!0);
93
+ function d(a, l) {
94
+ const o = Object.keys(a), c = o.includes("allOf"), f = o.includes("anyOf"), m = c || f, w = (m ? a[m ? c ? "allOf" : "anyOf" : "allOf"] : [a]).map((T) => p(T, l));
95
+ return c ? !w.includes(!1) : w.includes(!0);
97
96
  }
98
- return { parseValueSchema: u };
97
+ return { parseValueSchema: d };
99
98
  }
100
- const f = {
99
+ const y = {
101
100
  button: { type: "button", name: "按钮", icon: "Button" },
102
101
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
103
102
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -136,20 +135,20 @@ const f = {
136
135
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
137
136
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
138
137
  fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
139
- }, se = {}, ue = {};
140
- ce();
141
- function pe(t, n, e = /* @__PURE__ */ new Map(), r = (s, p, u) => p, i = {}, c = (s) => s) {
142
- return Q[n.title] = n, R[n.title] = r, se[n.title] = i, ue[n.title] = c, (s = {}) => {
143
- const p = le(s, n, e), u = Object.keys(t).reduce((o, l) => (o[l] = t[l].default, o), {});
144
- return Object.assign(u, p);
138
+ }, ae = {}, le = {};
139
+ ie();
140
+ function se(e, n, t = /* @__PURE__ */ new Map(), r = (u, p, d) => p, i = {}, s = (u) => u) {
141
+ return Z[n.title] = n, X[n.title] = r, ae[n.title] = i, le[n.title] = s, (u = {}) => {
142
+ const p = re(u, n, t), d = Object.keys(e).reduce((a, l) => (a[l] = e[l].default, a), {});
143
+ return Object.assign(d, p);
145
144
  };
146
145
  }
147
- function de(t, n) {
146
+ function ce(e, n) {
148
147
  return { customClass: n.class, customStyle: n.style };
149
148
  }
150
- const me = /* @__PURE__ */ new Map([
151
- ["appearance", de]
152
- ]), fe = "https://json-schema.org/draft/2020-12/schema", ye = "https://farris-design.gitee.io/number-spinner.schema.json", ge = "number-spinner", be = "A Farris Input Component", he = "object", ve = {
149
+ const ue = /* @__PURE__ */ new Map([
150
+ ["appearance", ce]
151
+ ]), pe = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-design.gitee.io/number-spinner.schema.json", me = "number-spinner", fe = "A Farris Input Component", ye = "object", ge = {
153
152
  id: {
154
153
  description: "The unique identifier for a number spinner",
155
154
  type: "string"
@@ -250,27 +249,27 @@ const me = /* @__PURE__ */ new Map([
250
249
  type: "sting",
251
250
  default: ""
252
251
  }
253
- }, Ce = [
252
+ }, he = [
254
253
  "id",
255
254
  "type"
256
- ], we = [
255
+ ], be = [
257
256
  "id",
258
257
  "appearance",
259
258
  "binding"
260
- ], Se = {
261
- $schema: fe,
262
- $id: ye,
263
- title: ge,
264
- description: be,
265
- type: he,
266
- properties: ve,
267
- required: Ce,
268
- ignore: we
259
+ ], ve = {
260
+ $schema: pe,
261
+ $id: de,
262
+ title: me,
263
+ description: fe,
264
+ type: ye,
265
+ properties: ge,
266
+ required: he,
267
+ ignore: be
269
268
  };
270
- function ke(t, n, e) {
269
+ function Ce(e, n, t) {
271
270
  return n;
272
271
  }
273
- const q = {
272
+ const U = {
274
273
  /**
275
274
  * 组件标识
276
275
  */
@@ -374,356 +373,347 @@ const q = {
374
373
  * 作为内嵌编辑器被创建后默认选中文本
375
374
  */
376
375
  selectOnCreated: { type: Boolean, default: !1 }
377
- }, Y = pe(q, Se, me, ke);
378
- function _(t, n, e, r) {
379
- const { format: i } = e, { displayValue: c, getRealValue: s, modelValue: p, onNumberValueChanged: u } = r;
380
- function o() {
381
- const C = new S(p.value || 0);
382
- return !(t.max && !new S(t.max).isNaN() && C.gte(new S(t.max)));
376
+ }, Q = se(U, ve, ue, Ce);
377
+ function Y(e, n, t, r) {
378
+ const { format: i } = t, { displayValue: s, getRealValue: u, modelValue: p, onNumberValueChanged: d } = r;
379
+ function a() {
380
+ const b = new N(p.value || 0);
381
+ return !(e.max && !new N(e.max).isNaN() && b.gte(new N(e.max)));
383
382
  }
384
383
  function l() {
385
- const C = new S(p.value || 0);
386
- return !(t.min && !new S(t.min).isNaN() && C.lte(new S(t.min)));
384
+ const b = new N(p.value || 0);
385
+ return !(e.min && !new N(e.min).isNaN() && b.lte(new N(e.min)));
387
386
  }
388
- function a(C) {
389
- if (t.readonly || t.disabled)
387
+ function o(b) {
388
+ if (e.readonly || e.disabled)
390
389
  return;
391
- const F = C === "up" ? o : l, E = C === "up" ? "plus" : "minus";
392
- if (F()) {
393
- const b = new S(p.value || 0)[E](Number(t.step)), N = b.toFixed();
394
- c.value = i(N), u(s(b));
390
+ const w = b === "up" ? a : l, S = b === "up" ? "plus" : "minus";
391
+ if (w()) {
392
+ const C = new N(p.value || 0)[S](Number(e.step)), h = C.toFixed();
393
+ s.value = i(h), d(u(C));
395
394
  }
396
395
  }
397
- function d() {
398
- a("up");
396
+ function c() {
397
+ o("up");
399
398
  }
400
- function y() {
401
- a("down");
399
+ function f() {
400
+ o("down");
402
401
  }
403
- function m(C) {
404
- d(), C.stopPropagation();
402
+ function m(b) {
403
+ c(), b.stopPropagation();
405
404
  }
406
- function v(C) {
407
- y(), C.stopPropagation();
405
+ function g(b) {
406
+ f(), b.stopPropagation();
408
407
  }
409
- return { canDownward: l, canUpward: o, downward: y, onClickDownButton: v, onClickUpButton: m, upward: d };
408
+ return { canDownward: l, canUpward: a, downward: f, onClickDownButton: g, onClickUpButton: m, upward: c };
410
409
  }
411
- function H(t, n, e) {
412
- const r = B(() => ({
413
- prefix: t.prefix,
414
- suffix: t.suffix,
415
- decimalSeparator: t.decimalSeparator,
416
- groupSeparator: t.useThousands ? t.groupSeparator : "",
417
- groupSize: t.groupSize
418
- })), { getValidNumberObject: i, precision: c } = e;
419
- function s(o) {
420
- return o = o == null || o === "" ? "" : String(o), o = o.replace(new RegExp(t.prefix, "g"), "").replace(new RegExp(t.suffix, "g"), "").replace(/,/g, ""), t.groupSeparator && t.groupSeparator !== "," && (o = o.replace(new RegExp(`\\${t.groupSeparator}`, "g"), "")), t.decimalSeparator && t.decimalSeparator !== "." && (o = o.replace(new RegExp(`\\${t.decimalSeparator}`, "g"), ".")), o;
421
- }
422
- function p(o, l) {
423
- return t.precision !== null && t.precision !== void 0 ? o.toFormat(c.value, l) : o.toFormat(l);
424
- }
425
- function u(o) {
426
- const l = s(o), a = new S(l, 10), d = i(a);
427
- return d.valueOf() === "0" && !t.showZero || d.isNaN() ? "" : t.formatter ? t.formatter(d.toNumber()) : p(d, r.value);
428
- }
429
- return { cleanFormat: s, format: u };
410
+ function H(e, n, t) {
411
+ const r = F(() => ({
412
+ prefix: e.prefix,
413
+ suffix: e.suffix,
414
+ decimalSeparator: e.decimalSeparator,
415
+ groupSeparator: e.useThousands ? e.groupSeparator : "",
416
+ groupSize: e.groupSize
417
+ })), { getValidNumberObject: i, precision: s } = t;
418
+ function u(a) {
419
+ return a = a == null || a === "" ? "" : String(a), a = a.replace(new RegExp(e.prefix, "g"), "").replace(new RegExp(e.suffix, "g"), "").replace(/,/g, ""), e.groupSeparator && e.groupSeparator !== "," && (a = a.replace(new RegExp(`\\${e.groupSeparator}`, "g"), "")), e.decimalSeparator && e.decimalSeparator !== "." && (a = a.replace(new RegExp(`\\${e.decimalSeparator}`, "g"), ".")), a;
420
+ }
421
+ function p(a, l) {
422
+ return e.precision !== null && e.precision !== void 0 ? a.toFormat(s.value, l) : a.toFormat(l);
423
+ }
424
+ function d(a) {
425
+ const l = u(a), o = new N(l, 10), c = i(o);
426
+ return c.valueOf() === "0" && !e.showZero || c.isNaN() ? "" : e.formatter ? e.formatter(c.toNumber()) : p(c, r.value);
427
+ }
428
+ return { cleanFormat: u, format: d };
430
429
  }
431
- function K(t, n) {
432
- const e = k(""), r = k(t.modelValue), i = B(() => Number(t.precision) || 0);
433
- function c(l) {
430
+ function _(e, n) {
431
+ const t = B(""), r = B(e.modelValue), i = F(() => Number(e.precision) || 0);
432
+ function s(l) {
434
433
  return l.toFixed(i.value);
435
434
  }
436
- function s(l) {
435
+ function u(l) {
437
436
  return isNaN(l) || l === null || l === void 0 || l === "";
438
437
  }
439
438
  function p(l) {
440
- const a = s(t.max) ? null : new S(String(t.max), 10), d = s(t.min) ? null : new S(String(t.min), 10);
441
- return a && l.gt(a) ? a : d && l.lt(d) ? d : l;
442
- }
443
- function u(l) {
444
- if (t.parser)
445
- return isNaN(Number(l)) ? t.parser(l) : l;
446
- let a = p(new S(l, 10));
447
- if (a.isNaN()) {
448
- if (t.canNull)
439
+ const o = u(e.max) ? null : new N(String(e.max), 10), c = u(e.min) ? null : new N(String(e.min), 10);
440
+ return o && l.gt(o) ? o : c && l.lt(c) ? c : l;
441
+ }
442
+ function d(l) {
443
+ if (e.parser)
444
+ return isNaN(Number(l)) ? e.parser(l) : l;
445
+ let o = p(new N(l, 10));
446
+ if (o.isNaN()) {
447
+ if (e.canNull)
449
448
  return null;
450
- const y = new S("" + t.min, 10), m = new S("" + t.max, 10);
451
- if (!y.isNaN())
452
- a = y;
449
+ const f = new N("" + e.min, 10), m = new N("" + e.max, 10);
450
+ if (!f.isNaN())
451
+ o = f;
453
452
  else if (!m.isNaN())
454
- a = m;
453
+ o = m;
455
454
  else
456
455
  return 0;
457
456
  }
458
- return c(a);
457
+ return s(o);
459
458
  }
460
- function o(l) {
461
- const a = Number(l);
462
- r.value = a, n.emit("update:modelValue", a), n.emit("valueChange", a), n.emit("change", a);
459
+ function a(l) {
460
+ const o = Number(l);
461
+ r.value = o, n.emit("update:modelValue", o), n.emit("valueChange", o), n.emit("change", o);
463
462
  }
464
- return { displayValue: e, getRealValue: u, modelValue: r, isEmpty: s, onNumberValueChanged: o, precision: i, getValidNumberObject: p };
463
+ return { displayValue: t, getRealValue: d, modelValue: r, isEmpty: u, onNumberValueChanged: a, precision: i, getValidNumberObject: p };
465
464
  }
466
- function Ne(t, n, e, r, i) {
467
- const { cleanFormat: c, format: s } = e, { displayValue: p, getRealValue: u, modelValue: o, isEmpty: l, onNumberValueChanged: a } = r, { downward: d, upward: y } = i, m = k(!1), v = B(() => p.value);
468
- function C(b) {
469
- var h;
470
- if (b.stopPropagation(), m.value = !1, t.readonly || t.disabled)
465
+ function we(e, n, t, r, i) {
466
+ const { cleanFormat: s, format: u } = t, { displayValue: p, getRealValue: d, modelValue: a, isEmpty: l, onNumberValueChanged: o } = r, { downward: c, upward: f } = i, m = B(!1), g = F(() => p.value);
467
+ function b(C) {
468
+ var M;
469
+ if (C.stopPropagation(), m.value = !1, e.readonly || e.disabled)
471
470
  return;
472
- let N = (h = b.target) == null ? void 0 : h.value;
473
- t.canNull || (N = N || 0);
474
- const g = c(N);
475
- p.value = s(g), a(u(g)), n.emit("blur", { event: b, formatted: p.value, value: o.value });
476
- }
477
- function F(b) {
478
- b.stopPropagation(), m.value = !0, !(t.readonly || t.disabled) && (p.value = l(o.value) || !t.showZero && o.value === "0" ? "" : String(o.value), n.emit("focus", { event: b, formatted: p.value, value: o.value }));
479
- }
480
- function E(b) {
481
- var h;
482
- b.stopPropagation();
483
- let N = (h = b.target) == null ? void 0 : h.value;
484
- t.canNull || (N = N || 0);
485
- const g = c(N);
486
- p.value = g, a(u(g));
487
- }
488
- function P(b) {
489
- b.key === "ArrowDown" && (b.preventDefault(), d()), b.key === "ArrowUp" && (b.preventDefault(), y()), b.stopPropagation();
490
- }
491
- return { textBoxValue: v, onBlurTextBox: C, onFocusTextBox: F, onInput: E, onKeyDown: P, isFocus: m };
471
+ let h = (M = C.target) == null ? void 0 : M.value;
472
+ e.canNull || (h = h || 0);
473
+ const k = s(h);
474
+ p.value = u(k), o(d(k)), n.emit("blur", { event: C, formatted: p.value, value: a.value });
475
+ }
476
+ function w(C) {
477
+ C.stopPropagation(), m.value = !0, !(e.readonly || e.disabled) && (p.value = l(a.value) || !e.showZero && a.value === "0" ? "" : String(a.value), n.emit("focus", { event: C, formatted: p.value, value: a.value }));
478
+ }
479
+ function S(C) {
480
+ var M;
481
+ C.stopPropagation();
482
+ let h = (M = C.target) == null ? void 0 : M.value;
483
+ e.canNull || (h = h || 0);
484
+ const k = s(h);
485
+ p.value = k, o(d(k));
486
+ }
487
+ function T(C) {
488
+ C.key === "ArrowDown" && (C.preventDefault(), c()), C.key === "ArrowUp" && (C.preventDefault(), f()), C.stopPropagation();
489
+ }
490
+ return { textBoxValue: g, onBlurTextBox: b, onFocusTextBox: w, onInput: S, onKeyDown: T, isFocus: m };
492
491
  }
493
- function ee(t, n, e) {
492
+ function K(e, n, t) {
494
493
  const {
495
494
  canDownward: r,
496
495
  canUpward: i,
497
- onClickDownButton: c,
498
- onClickUpButton: s
499
- } = e, p = B(() => ({
496
+ onClickDownButton: s,
497
+ onClickUpButton: u
498
+ } = t, p = F(() => ({
500
499
  "input-group-append": !0,
501
500
  "btn-group": !0,
502
501
  "btn-group-number": !0
503
- })), u = B(() => ({
502
+ })), d = F(() => ({
504
503
  btn: !0,
505
504
  "btn-secondary": !0,
506
505
  "btn-number-flag": !0
507
- })), o = B(() => ({
506
+ })), a = F(() => ({
508
507
  cursor: i() ? "pointer" : "not-allowed",
509
508
  "margin-left": 0
510
- })), l = B(() => ({
509
+ })), l = F(() => ({
511
510
  cursor: r() ? "pointer" : "not-allowed",
512
511
  "margin-left": 0
513
512
  }));
514
- return () => V("div", {
513
+ return () => E("div", {
515
514
  class: p.value
516
- }, [V("button", {
515
+ }, [E("button", {
517
516
  title: "upButton",
518
- class: u.value,
519
- style: o.value,
520
- onClick: s,
517
+ class: d.value,
518
+ style: a.value,
519
+ onClick: u,
521
520
  disabled: !i()
522
- }, [V("span", {
521
+ }, [E("span", {
523
522
  class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
524
- }, null)]), V("button", {
523
+ }, null)]), E("button", {
525
524
  title: "downButton",
526
- class: u.value,
525
+ class: d.value,
527
526
  style: l.value,
528
- onClick: c,
527
+ onClick: s,
529
528
  disabled: !r()
530
- }, [V("span", {
529
+ }, [E("span", {
531
530
  class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
532
531
  }, null)])]);
533
532
  }
534
- function Me(t, n, e) {
535
- const r = k(), {
533
+ function Se(e, n, t) {
534
+ const r = B(), {
536
535
  onBlurTextBox: i,
537
- onFocusTextBox: c,
538
- onInput: s,
536
+ onFocusTextBox: s,
537
+ onInput: u,
539
538
  onKeyDown: p,
540
- textBoxValue: u
541
- } = e, o = B(() => t.disabled || t.readonly || !t.editable ? "" : t.placeholder), l = B(() => ({
539
+ textBoxValue: d
540
+ } = t, a = F(() => e.disabled || e.readonly || !e.editable ? "" : e.placeholder), l = F(() => ({
542
541
  "form-control": !0,
543
542
  "f-utils-fill": !0
544
- })), a = B(() => ({
545
- "text-align": t.textAlign
543
+ })), o = F(() => ({
544
+ "text-align": e.textAlign
546
545
  }));
547
- function d(v) {
548
- v.stopPropagation();
546
+ function c(g) {
547
+ g.stopPropagation();
549
548
  }
550
- function y() {
551
- t.selectOnCreated, t.focusOnCreated;
549
+ function f() {
550
+ e.selectOnCreated, e.focusOnCreated;
552
551
  }
553
- async function m(v) {
554
- c(v), await G, y();
552
+ async function m(g) {
553
+ s(g), await j, f();
555
554
  }
556
- return I(async () => {
557
- await G, y();
558
- }), () => V("input", {
555
+ return x(async () => {
556
+ await j, f();
557
+ }), () => E("input", {
559
558
  ref: r,
560
559
  class: l.value,
561
- style: a.value,
560
+ style: o.value,
562
561
  type: "text",
563
- value: u.value,
564
- disabled: t.disabled,
565
- readonly: t.readonly || !t.editable,
566
- placeholder: o.value,
562
+ value: d.value,
563
+ disabled: e.disabled,
564
+ readonly: e.readonly || !e.editable,
565
+ placeholder: a.value,
567
566
  onBlur: i,
568
- onChange: d,
567
+ onChange: c,
569
568
  onFocus: m,
570
- onInput: s,
569
+ onInput: u,
571
570
  onKeydown: p
572
571
  }, null);
573
572
  }
574
- const L = /* @__PURE__ */ J({
573
+ const P = /* @__PURE__ */ q({
575
574
  name: "FNumberSpinner",
576
- props: q,
575
+ props: U,
577
576
  emits: ["update:modelValue", "valueChange", "change", "blur", "focus", "click", "input"],
578
- setup(t, n) {
579
- const e = K(t, n), r = H(t, n, e), i = _(t, n, r, e), c = Ne(t, n, r, e, i), s = ee(t, n, i), {
577
+ setup(e, n) {
578
+ const t = _(e, n), r = H(e, n, t), i = Y(e, n, r, t), s = we(e, n, r, t, i), u = K(e, n, i), {
580
579
  displayValue: p,
581
- modelValue: u,
582
- getRealValue: o
583
- } = e, l = Me(t, n, c), {
584
- format: a
580
+ modelValue: d,
581
+ getRealValue: a
582
+ } = t, l = Se(e, n, s), {
583
+ format: o
585
584
  } = r, {
586
- isFocus: d
587
- } = c, y = B(() => !t.disabled && !t.readonly && t.showButton);
588
- return I(() => {
589
- const m = o(t.modelValue);
590
- p.value = a(m);
591
- }), U(() => [t.value], ([m]) => {
592
- const v = o(m);
593
- u.value = v, p.value = a(v);
594
- }), U(() => [t.modelValue], ([m]) => {
595
- m !== u.value && (u.value = m, !d.value && (p.value = a(o(m))));
596
- }), U(() => [t.precision, t.useThousands, t.prefix, t.suffix, t.showZero], () => {
597
- p.value = a(u.value);
598
- }), () => V("div", {
585
+ isFocus: c
586
+ } = s, f = F(() => !e.disabled && !e.readonly && e.showButton);
587
+ return x(() => {
588
+ const m = a(e.modelValue);
589
+ p.value = o(m);
590
+ }), L(() => [e.value], ([m]) => {
591
+ const g = a(m);
592
+ d.value = g, p.value = o(g);
593
+ }), L(() => [e.modelValue], ([m]) => {
594
+ m !== d.value && (d.value = m, !c.value && (p.value = o(a(m))));
595
+ }), L(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
596
+ p.value = o(d.value);
597
+ }), () => E("div", {
599
598
  class: "input-group f-state-hover flex-row f-cmp-number-spinner"
600
- }, [l(), y.value && s()]);
599
+ }, [l(), f.value && u()]);
601
600
  }
602
601
  });
603
- function Be(t, n, e) {
604
- var N;
602
+ function ke(e, n, t) {
603
+ var C;
605
604
  function r() {
606
- e != null && e.resolveComponentContext && e.resolveComponentContext();
605
+ t != null && t.resolveComponentContext && t.resolveComponentContext();
607
606
  }
608
607
  r();
609
- const i = e && e.getStyles && e.getStyles() || "", c = e && e.getDesignerClass && e.getDesignerClass() || "", s = k();
608
+ const i = t && t.getStyles && t.getStyles() || "", s = t && t.getDesignerClass && t.getDesignerClass() || "", u = B();
610
609
  function p() {
611
- return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
610
+ return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
612
611
  }
613
- function u() {
612
+ function d() {
614
613
  return !1;
615
614
  }
616
- function o() {
617
- return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
615
+ function a() {
616
+ return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
618
617
  }
619
618
  function l() {
620
- return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
619
+ return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
621
620
  }
622
- function a(g) {
623
- if (!g || !g.value)
621
+ function o(h) {
622
+ if (!h || !h.value)
624
623
  return null;
625
- if (g.value.schema && g.value.schema.type === "component")
626
- return g.value;
627
- const h = k(g == null ? void 0 : g.value.parent), M = a(h);
624
+ if (h.value.schema && h.value.schema.type === "component")
625
+ return h.value;
626
+ const k = B(h == null ? void 0 : h.value.parent), M = o(k);
628
627
  return M || null;
629
628
  }
630
- function d(g = n) {
631
- const { componentInstance: h, designerItemElementRef: M } = g;
632
- return !h || !h.value ? null : h.value.canMove ? M : d(g.parent);
629
+ function c(h = n) {
630
+ const { componentInstance: k, designerItemElementRef: M } = h;
631
+ return !k || !k.value ? null : k.value.canMove ? M : c(h.parent);
633
632
  }
634
- function y(g) {
635
- return !!e && e.canAccepts(g);
633
+ function f(h) {
634
+ return !!t && t.canAccepts(h);
636
635
  }
637
636
  function m() {
638
637
  return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
639
638
  }
640
- function v() {
639
+ function g() {
641
640
  }
642
- function C(g, h) {
643
- h && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(h);
641
+ function b(h, k) {
642
+ k && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(k);
644
643
  }
645
- function F(g, h) {
646
- const { componentType: M } = g;
647
- let T = j(M, g, h);
648
- e && e.onResolveNewComponentSchema && (T = e.onResolveNewComponentSchema(g, T));
644
+ function w(h, k) {
645
+ const { componentType: M } = h;
646
+ let V = J(M, h, k);
647
+ t && t.onResolveNewComponentSchema && (V = t.onResolveNewComponentSchema(h, V));
649
648
  const A = M.toLowerCase().replace("-", "_");
650
- return T && !T.id && T.type === M && (T.id = `${A}_${Math.random().toString().slice(2, 6)}`), T;
651
- }
652
- function E(g, h) {
653
- const M = String(g.getAttribute("data-controltype")), T = g.getAttribute("data-feature"), A = T ? JSON.parse(T) : {};
654
- A.parentComponentInstance = s.value;
655
- let x = j(M, A);
656
- e && e.onAcceptNewChildElement && (x = e.onAcceptNewChildElement(g, h, x));
657
- const te = M.toLowerCase().replace("-", "_");
658
- return x && !x.id && x.type === M && (x.id = `${te}_${Math.random().toString().slice(2, 6)}`), x;
649
+ return V && !V.id && V.type === M && (V.id = `${A}_${Math.random().toString().slice(2, 6)}`), V;
659
650
  }
660
- function P(g) {
651
+ function S(h) {
661
652
  }
662
- function b(...g) {
663
- if (e && e.getPropsConfig)
664
- return e.getPropsConfig(...g);
653
+ function T(...h) {
654
+ if (t && t.getPropsConfig)
655
+ return t.getPropsConfig(...h);
665
656
  }
666
- return s.value = {
657
+ return u.value = {
667
658
  canMove: p(),
668
- canSelectParent: u(),
669
- canDelete: o(),
659
+ canSelectParent: d(),
660
+ canDelete: a(),
670
661
  canNested: !l(),
671
662
  contents: n == null ? void 0 : n.schema.contents,
672
- elementRef: t,
673
- parent: (N = n == null ? void 0 : n.parent) == null ? void 0 : N.componentInstance,
663
+ elementRef: e,
664
+ parent: (C = n == null ? void 0 : n.parent) == null ? void 0 : C.componentInstance,
674
665
  schema: n == null ? void 0 : n.schema,
675
666
  styles: i,
676
- designerClass: c,
677
- canAccepts: y,
678
- getBelongedComponentInstance: a,
679
- getDraggableDesignItemElement: d,
667
+ designerClass: s,
668
+ canAccepts: f,
669
+ getBelongedComponentInstance: o,
670
+ getDraggableDesignItemElement: c,
680
671
  getDraggingDisplayText: m,
681
- getPropConfig: b,
682
- getDragScopeElement: v,
683
- onAcceptMovedChildElement: C,
684
- onAcceptNewChildElement: E,
685
- onChildElementMovedOut: P,
686
- addNewChildComponentSchema: F,
672
+ getPropConfig: T,
673
+ getDragScopeElement: g,
674
+ onAcceptMovedChildElement: b,
675
+ onChildElementMovedOut: S,
676
+ addNewChildComponentSchema: w,
687
677
  updateDragAndDropRules: r,
688
- triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || k(!1),
689
- triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
690
- }, s;
678
+ triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || B(!1),
679
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || B(!1)
680
+ }, u;
691
681
  }
692
- class Te {
693
- constructor(n, e) {
694
- w(this, "componentId");
695
- w(this, "viewModelId");
696
- w(this, "eventsEditorUtils");
697
- w(this, "formSchemaUtils");
698
- w(this, "formMetadataConverter");
699
- w(this, "designViewModelUtils");
700
- w(this, "designViewModelField");
701
- w(this, "controlCreatorUtils");
702
- w(this, "designerHostService");
703
- w(this, "schemaService", null);
704
- w(this, "metadataService", null);
705
- w(this, "propertyConfig", {
682
+ class Me {
683
+ constructor(n, t) {
684
+ v(this, "componentId");
685
+ v(this, "viewModelId");
686
+ v(this, "eventsEditorUtils");
687
+ v(this, "formSchemaUtils");
688
+ v(this, "formMetadataConverter");
689
+ v(this, "designViewModelUtils");
690
+ v(this, "designViewModelField");
691
+ v(this, "controlCreatorUtils");
692
+ v(this, "designerHostService");
693
+ v(this, "schemaService", null);
694
+ v(this, "metadataService", null);
695
+ v(this, "propertyConfig", {
706
696
  type: "object",
707
697
  categories: {}
708
698
  });
709
699
  var r;
710
- this.componentId = n, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
700
+ this.componentId = n, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
711
701
  }
712
702
  getTableInfo() {
713
703
  var n;
714
704
  return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
715
705
  }
716
706
  setDesignViewModelField(n) {
717
- const e = n.binding && n.binding.type === "Form" && n.binding.field;
718
- if (e) {
707
+ const t = n.binding && n.binding.type === "Form" && n.binding.field;
708
+ if (t) {
719
709
  if (!this.designViewModelField) {
720
710
  const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
721
- this.designViewModelField = r.fields.find((i) => i.id === e);
711
+ this.designViewModelField = r.fields.find((i) => i.id === t);
722
712
  }
723
713
  n.updateOn = this.designViewModelField.updateOn;
724
714
  }
725
715
  }
726
- changeFieldEditorType(n, e) {
716
+ changeFieldEditorType(n, t) {
727
717
  }
728
718
  getBasicPropConfig(n) {
729
719
  return {
@@ -744,7 +734,7 @@ class Te {
744
734
  type: "combo-list",
745
735
  textField: "name",
746
736
  valueField: "value",
747
- data: [{ value: n.type, name: f[n.type].name }]
737
+ data: [{ value: n.type, name: y[n.type].name }]
748
738
  }
749
739
  }
750
740
  }
@@ -776,12 +766,12 @@ class Te {
776
766
  * @param componentInstance
777
767
  * @returns
778
768
  */
779
- updateElementByParentContainer(n, e) {
780
- const r = e && e.parent && e.parent.schema;
769
+ updateElementByParentContainer(n, t) {
770
+ const r = t && t.parent && t.parent.schema;
781
771
  if (!r)
782
772
  return;
783
- const i = r.contents.findIndex((s) => s.id === n), c = X(r.contents[i]);
784
- r.contents.splice(i, 1), r.contents.splice(i, 0, c);
773
+ const i = r.contents.findIndex((u) => u.id === n), s = z(r.contents[i]);
774
+ r.contents.splice(i, 1), r.contents.splice(i, 0, s);
785
775
  }
786
776
  }
787
777
  const D = class D {
@@ -789,16 +779,16 @@ const D = class D {
789
779
  * 根据绑定字段类型获取可用的输入类控件
790
780
  */
791
781
  static getEditorTypesByMDataType(n) {
792
- const e = D.fieldControlTypeMapping[n];
793
- return e || [{ key: "", value: "" }];
782
+ const t = D.fieldControlTypeMapping[n];
783
+ return t || [{ key: "", value: "" }];
794
784
  }
795
785
  /**
796
786
  * 获取所有输入类控件
797
787
  */
798
788
  static getAllInputTypes() {
799
789
  const n = [];
800
- for (let e in D.fieldControlTypeMapping)
801
- D.fieldControlTypeMapping[e].forEach((r) => {
790
+ for (let t in D.fieldControlTypeMapping)
791
+ D.fieldControlTypeMapping[t].forEach((r) => {
802
792
  n.find((i) => i.key === r.key && i.value === r.value) || n.push({ key: r.key, value: r.value });
803
793
  });
804
794
  return n;
@@ -807,68 +797,175 @@ const D = class D {
807
797
  /**
808
798
  * <字段类型,可配置的控件类型列表>的映射
809
799
  */
810
- w(D, "fieldControlTypeMapping", {
800
+ v(D, "fieldControlTypeMapping", {
811
801
  String: [
812
- { key: f["input-group"].type, value: f["input-group"].name },
813
- { key: f.lookup.type, value: f.lookup.name },
814
- { key: f["date-picker"].type, value: f["date-picker"].name },
815
- { key: f["check-box"].type, value: f["check-box"].name },
816
- { key: f["radio-group"].type, value: f["radio-group"].name },
817
- { key: f["combo-list"].type, value: f["combo-list"].name },
818
- { key: f.textarea.type, value: f.textarea.name }
802
+ { key: y["input-group"].type, value: y["input-group"].name },
803
+ { key: y.lookup.type, value: y.lookup.name },
804
+ { key: y["date-picker"].type, value: y["date-picker"].name },
805
+ { key: y["check-box"].type, value: y["check-box"].name },
806
+ { key: y["check-group"].type, value: y["check-group"].name },
807
+ { key: y["radio-group"].type, value: y["radio-group"].name },
808
+ { key: y["combo-list"].type, value: y["combo-list"].name },
809
+ { key: y.textarea.type, value: y.textarea.name }
819
810
  ],
820
811
  Text: [
821
- { key: f.textarea.type, value: f.textarea.name },
822
- { key: f.lookup.type, value: f.lookup.name }
812
+ { key: y.textarea.type, value: y.textarea.name },
813
+ { key: y.lookup.type, value: y.lookup.name }
823
814
  ],
824
815
  Decimal: [
825
- { key: f["number-spinner"].type, value: f["number-spinner"].name }
816
+ { key: y["number-spinner"].type, value: y["number-spinner"].name }
826
817
  ],
827
818
  Integer: [
828
- { key: f["number-spinner"].type, value: f["number-spinner"].name }
819
+ { key: y["number-spinner"].type, value: y["number-spinner"].name }
829
820
  ],
830
821
  Number: [
831
- { key: f["number-spinner"].type, value: f["number-spinner"].name }
822
+ { key: y["number-spinner"].type, value: y["number-spinner"].name }
832
823
  ],
833
824
  BigNumber: [
834
- { key: f["number-spinner"].type, value: f["number-spinner"].name }
825
+ { key: y["number-spinner"].type, value: y["number-spinner"].name }
835
826
  ],
836
827
  Date: [
837
- { key: f["date-picker"].type, value: f["date-picker"].name }
828
+ { key: y["date-picker"].type, value: y["date-picker"].name }
838
829
  ],
839
830
  DateTime: [
840
- { key: f["date-picker"].type, value: f["date-picker"].name }
831
+ { key: y["date-picker"].type, value: y["date-picker"].name }
841
832
  ],
842
833
  Boolean: [
843
- { key: f.switch.type, value: f.switch.name },
844
- { key: f["check-box"].type, value: f["check-box"].name }
834
+ { key: y.switch.type, value: y.switch.name },
835
+ { key: y["check-box"].type, value: y["check-box"].name }
845
836
  ],
846
837
  Enum: [
847
- { key: f["combo-list"].type, value: f["combo-list"].name },
848
- { key: f["radio-group"].type, value: f["radio-group"].name }
838
+ { key: y["combo-list"].type, value: y["combo-list"].name },
839
+ { key: y["radio-group"].type, value: y["radio-group"].name }
849
840
  ],
850
841
  Object: [
851
- { key: f.lookup.type, value: f.lookup.name },
852
- { key: f["combo-list"].type, value: f["combo-list"].name },
853
- { key: f["radio-group"].type, value: f["radio-group"].name }
842
+ { key: y.lookup.type, value: y.lookup.name },
843
+ { key: y["combo-list"].type, value: y["combo-list"].name },
844
+ { key: y["radio-group"].type, value: y["radio-group"].name }
854
845
  ]
855
846
  });
856
- let O = D;
857
- const Ve = k(0);
858
- class Fe extends Te {
859
- constructor(e, r) {
860
- super(e, r);
861
- w(this, "responseLayoutEditorFunction");
862
- this.responseLayoutEditorFunction = re(this.formSchemaUtils);
863
- }
864
- getPropertyConfig(e, r) {
865
- return this.propertyConfig.categories.basic = this.getBasicProperties(e, r), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, r), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
866
- }
867
- getBasicProperties(e, r) {
847
+ let I = D;
848
+ const Ne = B(0);
849
+ class Be {
850
+ constructor() {
851
+ /** 控件标题 */
852
+ v(this, "label", "");
853
+ /** 控件id */
854
+ v(this, "id", "");
855
+ /** 每个控件占用的栅格数 */
856
+ v(this, "columnInSM", 12);
857
+ v(this, "columnInMD", 6);
858
+ v(this, "columnInLG", 3);
859
+ v(this, "columnInEL", 2);
860
+ /** 每个控件占用的列数 */
861
+ v(this, "displayWidthInSM", 1);
862
+ v(this, "displayWidthInMD", 1);
863
+ v(this, "displayWidthInLG", 1);
864
+ v(this, "displayWidthInEL", 1);
865
+ /** 编辑器内部默认显示的屏幕大小-----可以去掉 */
866
+ v(this, "displayColumnCountAtBreakPoint", "md");
867
+ /** 控件所在行,传0即可-----编辑器内部使用 */
868
+ v(this, "tagRow", 0);
869
+ /** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
870
+ v(this, "showTopBorder", 0);
871
+ /** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
872
+ v(this, "group", 1);
873
+ /** 控件是否符合标准的class配置(设计器用的) */
874
+ v(this, "isSupportedClass", !0);
875
+ /** 控件所在分组id(设计器用的) */
876
+ v(this, "fieldSetId", "");
877
+ }
878
+ }
879
+ function Fe(e) {
880
+ let n, t;
881
+ const r = /* @__PURE__ */ new Map();
882
+ let i = [];
883
+ function s(l, o) {
884
+ const f = l.split(" ").filter((S) => S.startsWith("col-"));
885
+ if (f.length === 0) {
886
+ o.isSupportedClass = !1;
887
+ return;
888
+ }
889
+ let m = f.find((S) => /^col-([1-9]|10|11|12)$/.test(S)), g = f.find((S) => /^col-md-([1-9]|10|11|12)$/.test(S)), b = f.find((S) => /^col-xl-([1-9]|10|11|12)$/.test(S)), w = f.find((S) => /^col-el-([1-9]|10|11|12)$/.test(S));
890
+ m = m || "col-12", o.columnInSM = parseInt(m.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), g = g || "col-md-" + o.columnInSM, o.columnInMD = parseInt(g.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), b = b || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(b.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), w = w || "col-el-" + o.columnInLG, o.columnInEL = parseInt(w.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
891
+ }
892
+ function u(l, o, c, f = !1) {
893
+ let m = !1;
894
+ l.contents.forEach((g) => {
895
+ if (g.type === "fieldset") {
896
+ c += 1, u(g, o, c, !0), m = !0;
897
+ return;
898
+ }
899
+ m && (c += 1, m = !1);
900
+ const b = g.appearance && g.appearance.class, w = new Be();
901
+ b ? s(b, w) : w.isSupportedClass = !1, w.label = g.label || g.id, w.id = g.id, w.group = c, f && (w.fieldSetId = l.id), t === g.id && (n = c), r.set(g.id, g), o.push(w);
902
+ });
903
+ }
904
+ function p(l) {
905
+ const o = e.getComponentById(l);
906
+ if (!o || !o.componentType || !o.componentType.startsWith("form"))
907
+ return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
908
+ const c = e.selectNode(o, (f) => f.type === $["response-form"].type);
909
+ return !c || !c.contents || c.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: c };
910
+ }
911
+ function d(l, o) {
912
+ o = o || l.id;
913
+ const { result: c, message: f, formNode: m } = p(o);
914
+ if (!c)
915
+ return { result: c, message: f };
916
+ t = l.id, i = [], r.clear();
917
+ const g = m.contents[0].type === $.fieldset.type ? 0 : 1;
918
+ u(m, i, g);
919
+ const b = i.find((S) => !S.isSupportedClass);
920
+ return {
921
+ defaultState: {
922
+ defaultGroupNumber: n || 1,
923
+ model: b ? "customize" : "standard"
924
+ },
925
+ importData: i
926
+ };
927
+ }
928
+ function a(l, o) {
929
+ o = o;
930
+ const { result: c, formNode: f } = p(o);
931
+ if (!c)
932
+ return "";
933
+ const m = [];
934
+ return l.forEach((g) => {
935
+ var S;
936
+ const b = r.get(g.id), w = b.appearance && b.appearance.class;
937
+ if (w) {
938
+ const C = w.split(" ").filter((R) => !R.startsWith("col-")), h = "col-" + g.columnInSM, k = "col-md-" + g.columnInMD, M = "col-xl-" + g.columnInLG, V = "col-el-" + g.columnInEL, A = [h, k, M, V].concat(C);
939
+ b.appearance.class = A.join(" ");
940
+ }
941
+ if (g.fieldSetId) {
942
+ const T = f.contents.find((h) => h.id === g.fieldSetId), C = m.find((h) => h.id === g.fieldSetId);
943
+ C ? (S = C.contents) == null || S.push(b) : (m.push(T), T.contents = [b]);
944
+ } else
945
+ m.push(b);
946
+ }), f.contents = m, f.id;
947
+ }
948
+ return {
949
+ checkCanFindFormNode: p,
950
+ checkCanOpenLayoutEditor: d,
951
+ changeFormControlsByResponseLayoutConfig: a,
952
+ getResonseFormLayoutConfig: u
953
+ };
954
+ }
955
+ class Te extends Me {
956
+ constructor(t, r) {
957
+ super(t, r);
958
+ v(this, "responseLayoutEditorFunction");
959
+ this.responseLayoutEditorFunction = Fe(this.formSchemaUtils);
960
+ }
961
+ getPropertyConfig(t, r) {
962
+ return this.propertyConfig.categories.basic = this.getBasicProperties(t, r), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t, r), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
963
+ }
964
+ getBasicProperties(t, r) {
868
965
  var p;
869
966
  var i = this;
870
- this.setDesignViewModelField(e);
871
- const c = this.formSchemaUtils.getFormMetadataBasicInfo(), s = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
967
+ this.setDesignViewModelField(t);
968
+ const s = this.formSchemaUtils.getFormMetadataBasicInfo(), u = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
872
969
  return {
873
970
  description: "Basic Information",
874
971
  title: "基本信息",
@@ -890,7 +987,7 @@ class Fe extends Te {
890
987
  textField: "value",
891
988
  valueField: "key",
892
989
  editable: !1,
893
- data: i.designViewModelField ? O.getEditorTypesByMDataType((p = i.designViewModelField.type) == null ? void 0 : p.name) : O.getAllInputTypes()
990
+ data: i.designViewModelField ? I.getEditorTypesByMDataType((p = i.designViewModelField.type) == null ? void 0 : p.name) : I.getAllInputTypes()
894
991
  }
895
992
  },
896
993
  label: {
@@ -906,8 +1003,8 @@ class Fe extends Te {
906
1003
  type: "field-selector",
907
1004
  bindingType: { enable: !1 },
908
1005
  editorParams: {
909
- propertyData: e,
910
- formBasicInfo: c
1006
+ propertyData: t,
1007
+ formBasicInfo: s
911
1008
  },
912
1009
  columns: [
913
1010
  { field: "name", title: "字段名称" },
@@ -915,26 +1012,26 @@ class Fe extends Te {
915
1012
  { field: "fieldType", title: "字段类型" }
916
1013
  ],
917
1014
  textField: "bindingField",
918
- data: s
1015
+ data: u
919
1016
  }
920
1017
  }
921
1018
  },
922
- setPropertyRelates(u, o) {
923
- if (u)
924
- switch (u && u.propertyID) {
1019
+ setPropertyRelates(d, a) {
1020
+ if (d)
1021
+ switch (d && d.propertyID) {
925
1022
  case "type": {
926
- i.changeControlType(e, u, r);
1023
+ i.changeControlType(t, d, r);
927
1024
  break;
928
1025
  }
929
1026
  case "label": {
930
- u.needRefreshControlTree = !0;
1027
+ d.needRefreshControlTree = !0;
931
1028
  break;
932
1029
  }
933
1030
  }
934
1031
  }
935
1032
  };
936
1033
  }
937
- getAppearanceProperties(e, r) {
1034
+ getAppearanceProperties(t, r) {
938
1035
  var i = this;
939
1036
  return {
940
1037
  title: "样式",
@@ -961,69 +1058,69 @@ class Fe extends Te {
961
1058
  refreshPanelAfterChanged: !0,
962
1059
  editor: {
963
1060
  type: "response-layout-editor-setting",
964
- initialState: i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, i.componentId)
1061
+ initialState: i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(t, i.componentId)
965
1062
  }
966
1063
  }
967
1064
  },
968
- setPropertyRelates(c, s) {
969
- if (c)
970
- switch (c && c.propertyID) {
1065
+ setPropertyRelates(s, u) {
1066
+ if (s)
1067
+ switch (s && s.propertyID) {
971
1068
  case "responseLayout":
972
- i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(c.propertyValue, i.componentId || e.id), i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId), i.updateElementByParentContainer(e.id, r), delete e.responseLayout;
1069
+ i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(s.propertyValue, i.componentId || t.id), i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId), i.updateElementByParentContainer(t.id, r), delete t.responseLayout;
973
1070
  break;
974
1071
  case "class":
975
- i.updateUnifiedLayoutAfterControlChanged(c.propertyValue, e.id, this.componentId), i.updateElementByParentContainer(e.id, r);
1072
+ i.updateUnifiedLayoutAfterControlChanged(s.propertyValue, t.id, this.componentId), i.updateElementByParentContainer(t.id, r);
976
1073
  break;
977
1074
  }
978
1075
  }
979
1076
  };
980
1077
  }
981
- getEditorProperties(e) {
982
- return this.getComponentConfig(e);
1078
+ getEditorProperties(t) {
1079
+ return this.getComponentConfig(t);
983
1080
  }
984
1081
  /**
985
1082
  * 卡片控件:切换控件类型后事件
986
1083
  * @param propertyData 控件DOM属性
987
1084
  * @param newControlType 新控件类型
988
1085
  */
989
- changeControlType(e, r, i) {
990
- var l, a, d, y;
991
- const c = r.propertyValue, s = i && i.parent && i.parent.schema;
992
- if (!s)
1086
+ changeControlType(t, r, i) {
1087
+ var l, o, c, f;
1088
+ const s = r.propertyValue, u = i && i.parent && i.parent.schema;
1089
+ if (!u)
993
1090
  return;
994
- const p = s.contents.findIndex((m) => m.id === e.id), u = s.contents[p];
995
- let o;
1091
+ const p = u.contents.findIndex((m) => m.id === t.id), d = u.contents[p];
1092
+ let a;
996
1093
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
997
1094
  editor: {
998
- $type: c
1095
+ $type: s
999
1096
  },
1000
1097
  name: this.designViewModelField.name,
1001
1098
  require: this.designViewModelField.require,
1002
1099
  readonly: this.designViewModelField.readonly
1003
- }, !1), o = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, c)), o || (o = Z("form-group") || {}, o.editor = Z(c) || {}, delete o.editor.id, delete o.editor.binding, delete o.editor.appearance), Object.assign(o, {
1004
- id: u.id,
1005
- appearance: u.appearance,
1006
- size: u.size,
1007
- label: u.label,
1008
- binding: u.binding,
1009
- visible: u.visible
1010
- }), Object.assign(o.editor, {
1011
- isTextArea: o.isTextArea && u.isTextArea,
1012
- placeholder: (l = u.editor) == null ? void 0 : l.placeholder,
1013
- holdPlace: (a = u.editor) == null ? void 0 : a.holdPlace,
1014
- readonly: (d = u.editor) == null ? void 0 : d.readonly,
1015
- require: (y = u.editor) == null ? void 0 : y.require
1016
- }), s.contents.splice(p, 1), s.contents.splice(p, 0, o), i.schema = Object.assign(u, o), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
1100
+ }, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(s)), Object.assign(a, {
1101
+ id: d.id,
1102
+ appearance: d.appearance,
1103
+ size: d.size,
1104
+ label: d.label,
1105
+ binding: d.binding,
1106
+ visible: d.visible
1107
+ }), Object.assign(a.editor, {
1108
+ isTextArea: a.isTextArea && d.isTextArea,
1109
+ placeholder: (l = d.editor) == null ? void 0 : l.placeholder,
1110
+ holdPlace: (o = d.editor) == null ? void 0 : o.holdPlace,
1111
+ readonly: (c = d.editor) == null ? void 0 : c.readonly,
1112
+ require: (f = d.editor) == null ? void 0 : f.require
1113
+ }), u.contents.splice(p, 1), u.contents.splice(p, 0, a), i.schema = Object.assign(d, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
1017
1114
  (m) => m.classList.remove("dgComponentSelected")
1018
- ), Ve.value++;
1115
+ ), Ne.value++;
1019
1116
  }
1020
- getComponentConfig(e, r = {}, i = {}) {
1021
- const c = Object.assign({
1117
+ getComponentConfig(t, r = {}, i = {}) {
1118
+ const s = Object.assign({
1022
1119
  description: "编辑器",
1023
1120
  title: "编辑器",
1024
1121
  type: "input-group",
1025
1122
  $converter: "/converter/property-editor.converter"
1026
- }, r), s = Object.assign({
1123
+ }, r), u = Object.assign({
1027
1124
  readonly: {
1028
1125
  description: "",
1029
1126
  title: "只读",
@@ -1045,7 +1142,7 @@ class Fe extends Te {
1045
1142
  type: "string"
1046
1143
  }
1047
1144
  }, i);
1048
- return { ...c, properties: { ...s } };
1145
+ return { ...s, properties: { ...u } };
1049
1146
  }
1050
1147
  /**
1051
1148
  * 修改某一输入控件的样式后更新Form的统一布局配置
@@ -1053,16 +1150,16 @@ class Fe extends Te {
1053
1150
  * @param controlId 控件Id
1054
1151
  * @param componentId 控件所在组件id
1055
1152
  */
1056
- updateUnifiedLayoutAfterControlChanged(e, r, i) {
1057
- const c = e.split(" ");
1058
- let s = c.find((a) => /^col-([1-9]|10|11|12)$/.test(a)), p = c.find((a) => /^col-md-([1-9]|10|11|12)$/.test(a)), u = c.find((a) => /^col-xl-([1-9]|10|11|12)$/.test(a)), o = c.find((a) => /^col-el-([1-9]|10|11|12)$/.test(a));
1059
- s = s || "col-12", p = p || "col-md-" + s.replace("col-", ""), u = u || "col-xl-" + p.replace("col-md-", ""), o = o || "col-el-" + u.replace("col-xl-", "");
1153
+ updateUnifiedLayoutAfterControlChanged(t, r, i) {
1154
+ const s = t.split(" ");
1155
+ let u = s.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), p = s.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), d = s.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), a = s.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
1156
+ u = u || "col-12", p = p || "col-md-" + u.replace("col-", ""), d = d || "col-xl-" + p.replace("col-md-", ""), a = a || "col-el-" + d.replace("col-xl-", "");
1060
1157
  const l = {
1061
1158
  id: r,
1062
- columnInSM: parseInt(s.replace("col-", ""), 10),
1159
+ columnInSM: parseInt(u.replace("col-", ""), 10),
1063
1160
  columnInMD: parseInt(p.replace("col-md-", ""), 10),
1064
- columnInLG: parseInt(u.replace("col-xl-", ""), 10),
1065
- columnInEL: parseInt(o.replace("col-el-", ""), 10)
1161
+ columnInLG: parseInt(d.replace("col-xl-", ""), 10),
1162
+ columnInEL: parseInt(a.replace("col-el-", ""), 10)
1066
1163
  };
1067
1164
  this.updateUnifiedLayoutAfterResponseLayoutChanged(i, l);
1068
1165
  }
@@ -1071,34 +1168,34 @@ class Fe extends Te {
1071
1168
  * @param componentId 组件Id
1072
1169
  * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
1073
1170
  */
1074
- updateUnifiedLayoutAfterResponseLayoutChanged(e, r) {
1075
- const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
1171
+ updateUnifiedLayoutAfterResponseLayoutChanged(t, r) {
1172
+ const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(t);
1076
1173
  if (!i || !i.unifiedLayout)
1077
1174
  return;
1078
- const c = [];
1079
- if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i, c, 1), r) {
1080
- const m = c.find((v) => v.id === r.id);
1175
+ const s = [];
1176
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i, s, 1), r) {
1177
+ const m = s.find((g) => g.id === r.id);
1081
1178
  Object.assign(m || {}, r);
1082
1179
  }
1083
- const s = c.map((m) => m.columnInSM), p = c.map((m) => m.columnInMD), u = c.map((m) => m.columnInLG), o = c.map((m) => m.columnInEL), l = this.checkIsUniqueColumn(s) ? s[0] : null, a = this.checkIsUniqueColumn(p) ? p[0] : null, d = this.checkIsUniqueColumn(u) ? u[0] : null, y = this.checkIsUniqueColumn(o) ? o[0] : null;
1180
+ const u = s.map((m) => m.columnInSM), p = s.map((m) => m.columnInMD), d = s.map((m) => m.columnInLG), a = s.map((m) => m.columnInEL), l = this.checkIsUniqueColumn(u) ? u[0] : null, o = this.checkIsUniqueColumn(p) ? p[0] : null, c = this.checkIsUniqueColumn(d) ? d[0] : null, f = this.checkIsUniqueColumn(a) ? a[0] : null;
1084
1181
  Object.assign(i.unifiedLayout, {
1085
1182
  uniqueColClassInSM: l,
1086
- uniqueColClassInMD: a,
1087
- uniqueColClassInLG: d,
1088
- uniqueColClassInEL: y
1183
+ uniqueColClassInMD: o,
1184
+ uniqueColClassInLG: c,
1185
+ uniqueColClassInEL: f
1089
1186
  });
1090
1187
  }
1091
1188
  /**
1092
1189
  * 校验宽度样式值是否一致
1093
1190
  */
1094
- checkIsUniqueColumn(e) {
1095
- const r = new Set(e);
1191
+ checkIsUniqueColumn(t) {
1192
+ const r = new Set(t);
1096
1193
  return Array.from(r).length === 1;
1097
1194
  }
1098
1195
  }
1099
- class xe extends Fe {
1100
- constructor(n, e) {
1101
- super(n, e);
1196
+ class Ve extends Te {
1197
+ constructor(n, t) {
1198
+ super(n, t);
1102
1199
  }
1103
1200
  getEditorProperties(n) {
1104
1201
  return this.getComponentConfig(n, { type: "number-spinner" }, {
@@ -1129,106 +1226,106 @@ class xe extends Fe {
1129
1226
  });
1130
1227
  }
1131
1228
  }
1132
- function Ee(t, n) {
1133
- t.schema;
1134
- const e = k(!0), r = k(!0);
1135
- function i(a) {
1229
+ function Ee(e, n) {
1230
+ e.schema;
1231
+ const t = B(!0), r = B(!0);
1232
+ function i(o) {
1136
1233
  return !1;
1137
1234
  }
1138
- function c() {
1235
+ function s() {
1139
1236
  return !1;
1140
1237
  }
1141
- function s() {
1238
+ function u() {
1142
1239
  return !1;
1143
1240
  }
1144
1241
  function p() {
1145
1242
  return !0;
1146
1243
  }
1147
- function u(a) {
1244
+ function d(o) {
1148
1245
  }
1149
- function o() {
1246
+ function a() {
1150
1247
  }
1151
- function l(a) {
1248
+ function l(o) {
1152
1249
  return null;
1153
1250
  }
1154
1251
  return {
1155
1252
  canAccepts: i,
1156
- checkCanDeleteComponent: c,
1157
- checkCanMoveComponent: s,
1253
+ checkCanDeleteComponent: s,
1254
+ checkCanMoveComponent: u,
1158
1255
  hideNestedPaddingInDesginerView: p,
1159
- onAcceptMovedChildElement: u,
1160
- resolveComponentContext: o,
1161
- triggerBelongedComponentToMoveWhenMoved: e,
1256
+ onAcceptMovedChildElement: d,
1257
+ resolveComponentContext: a,
1258
+ triggerBelongedComponentToMoveWhenMoved: t,
1162
1259
  triggerBelongedComponentToDeleteWhenDeleted: r,
1163
1260
  getPropsConfig: l
1164
1261
  };
1165
1262
  }
1166
- function Pe(t, n) {
1263
+ function De(e, n) {
1167
1264
  const {
1168
- canAccepts: e,
1265
+ canAccepts: t,
1169
1266
  checkCanDeleteComponent: r,
1170
1267
  checkCanMoveComponent: i,
1171
- hideNestedPaddingInDesginerView: c,
1172
- onAcceptMovedChildElement: s,
1268
+ hideNestedPaddingInDesginerView: s,
1269
+ onAcceptMovedChildElement: u,
1173
1270
  resolveComponentContext: p,
1174
- triggerBelongedComponentToMoveWhenMoved: u,
1175
- triggerBelongedComponentToDeleteWhenDeleted: o
1176
- } = Ee(t), l = t.schema;
1177
- function a(d, y) {
1178
- return new xe(d, n).getPropertyConfig(l, y);
1271
+ triggerBelongedComponentToMoveWhenMoved: d,
1272
+ triggerBelongedComponentToDeleteWhenDeleted: a
1273
+ } = Ee(e), l = e.schema;
1274
+ function o(c, f) {
1275
+ return new Ve(c, n).getPropertyConfig(l, f);
1179
1276
  }
1180
1277
  return {
1181
- canAccepts: e,
1278
+ canAccepts: t,
1182
1279
  checkCanDeleteComponent: r,
1183
1280
  checkCanMoveComponent: i,
1184
- hideNestedPaddingInDesginerView: c,
1185
- onAcceptMovedChildElement: s,
1281
+ hideNestedPaddingInDesginerView: s,
1282
+ onAcceptMovedChildElement: u,
1186
1283
  resolveComponentContext: p,
1187
- triggerBelongedComponentToMoveWhenMoved: u,
1188
- triggerBelongedComponentToDeleteWhenDeleted: o,
1189
- getPropsConfig: a
1284
+ triggerBelongedComponentToMoveWhenMoved: d,
1285
+ triggerBelongedComponentToDeleteWhenDeleted: a,
1286
+ getPropsConfig: o
1190
1287
  };
1191
1288
  }
1192
- const De = /* @__PURE__ */ J({
1289
+ const Pe = /* @__PURE__ */ q({
1193
1290
  name: "FNumberSpinnerDesign",
1194
- props: q,
1291
+ props: U,
1195
1292
  emits: ["update:modelValue", "valueChange", "change", "blur", "focus", "click", "input"],
1196
- setup(t, n) {
1197
- const e = K(t, n), r = H(t, n, e), i = _(t, n, r, e), c = ee(t, n, i), s = k(), p = W("designer-host-service"), u = W("design-item-context"), o = Pe(u, p), l = Be(s, u, o);
1198
- I(() => {
1199
- s.value.componentInstance = l, t.readonly = !0;
1293
+ setup(e, n) {
1294
+ const t = _(e, n), r = H(e, n, t), i = Y(e, n, r, t), s = K(e, n, i), u = B(), p = W("designer-host-service"), d = W("design-item-context"), a = De(d, p), l = ke(u, d, a);
1295
+ x(() => {
1296
+ u.value.componentInstance = l, e.readonly = !0;
1200
1297
  }), n.expose(l.value);
1201
- const a = k();
1202
- return () => V("div", {
1203
- ref: s,
1298
+ const o = B();
1299
+ return () => E("div", {
1300
+ ref: u,
1204
1301
  class: "input-group f-state-hover flex-row f-cmp-number-spinner test"
1205
- }, [V("input", {
1206
- ref: a,
1302
+ }, [E("input", {
1303
+ ref: o,
1207
1304
  class: "form-control",
1208
1305
  readonly: !0,
1209
- placeholder: t.placeholder
1210
- }, null), c()]);
1211
- }
1212
- }), Ae = (t) => {
1213
- const n = t;
1214
- return n.install = function(e) {
1215
- e.component(n.name, t);
1216
- }, t;
1306
+ placeholder: e.placeholder
1307
+ }, null), s()]);
1308
+ }
1309
+ }), Ie = (e) => {
1310
+ const n = e;
1311
+ return n.install = function(t) {
1312
+ t.component(n.name, e);
1313
+ }, e;
1217
1314
  };
1218
- L.register = (t, n, e, r) => {
1219
- t["number-spinner"] = L, n["number-spinner"] = Y;
1315
+ P.register = (e, n, t, r) => {
1316
+ e["number-spinner"] = P, n["number-spinner"] = Q;
1220
1317
  };
1221
- L.registerDesigner = (t, n, e) => {
1222
- t["number-spinner"] = De, n["number-spinner"] = Y;
1318
+ P.registerDesigner = (e, n, t) => {
1319
+ e["number-spinner"] = Pe, n["number-spinner"] = Q;
1223
1320
  };
1224
- const qe = Ae(L);
1321
+ const je = Ie(P);
1225
1322
  export {
1226
- L as FNumberSpinner,
1227
- qe as default,
1228
- q as numberSpinnerProps,
1229
- Y as propsResolver,
1323
+ P as FNumberSpinner,
1324
+ je as default,
1325
+ U as numberSpinnerProps,
1326
+ Q as propsResolver,
1230
1327
  H as useFormat,
1231
- K as useNumber,
1232
- _ as useSpinner,
1233
- Ne as useTextBox
1328
+ _ as useNumber,
1329
+ Y as useSpinner,
1330
+ we as useTextBox
1234
1331
  };