@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,12 +1,11 @@
1
- var le = Object.defineProperty;
2
- var ce = (n, t, e) => t in n ? le(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
- var M = (n, t, e) => ce(n, typeof t != "symbol" ? t + "" : t, e);
4
- import { defineComponent as U, inject as A, ref as h, computed as j, watch as L, onMounted as O, createVNode as b, Fragment as se, provide as ue } from "vue";
5
- import { isPlainObject as X, cloneDeep as J } from "lodash-es";
6
- import { CHECKBOX_CONTEXT as H, useCheck as pe } from "../common/index.esm.js";
7
- import { getSchemaByType as _ } from "../dynamic-resolver/index.esm.js";
8
- import { useResponseLayoutEditorSetting as de } from "../response-layout-editor/index.esm.js/src/composition/converter/use-response-layout-editor-setting";
9
- const me = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-design.gitee.io/check-box.schema.json", ye = "check-box", he = "A Farris Input Component", ge = "object", be = {
1
+ var ie = Object.defineProperty;
2
+ var ae = (o, t, e) => t in o ? ie(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
3
+ var v = (o, t, e) => ae(o, typeof t != "symbol" ? t + "" : t, e);
4
+ import { defineComponent as L, inject as P, ref as k, computed as x, watch as I, onMounted as G, createVNode as S, Fragment as le, provide as se } from "vue";
5
+ import { isPlainObject as O, cloneDeep as z } from "lodash-es";
6
+ import { CHECKBOX_CONTEXT as X, useCheck as ce } from "../common/index.esm.js";
7
+ import { DgControl as q } from "../designer-canvas/index.esm.js";
8
+ const ue = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-design.gitee.io/check-box.schema.json", de = "check-box", me = "A Farris Input Component", fe = "object", he = {
10
9
  id: {
11
10
  description: "The unique identifier for a check box",
12
11
  type: "string"
@@ -78,114 +77,114 @@ const me = "https://json-schema.org/draft/2020-12/schema", fe = "https://farris-
78
77
  type: "boolean",
79
78
  default: !0
80
79
  }
81
- }, ve = [
80
+ }, ye = [
82
81
  "id",
83
82
  "type"
84
- ], Ce = [
83
+ ], ge = [
85
84
  "id",
86
85
  "appearance",
87
86
  "binding"
88
- ], ke = {
89
- $schema: me,
90
- $id: fe,
91
- title: ye,
92
- description: he,
93
- type: ge,
94
- properties: be,
95
- required: ve,
96
- ignore: Ce
97
- }, Q = {}, Y = {};
98
- function q(n) {
99
- const { properties: t, title: e, ignore: o } = n, r = o && Array.isArray(o), l = Object.keys(t).reduce((c, m) => ((!r || !o.find((s) => s == m)) && (c[m] = t[m].type === "object" && t[m].properties ? q(t[m]) : J(t[m].default)), c), {});
100
- return (!r || !o.find((c) => c == "id")) && (l.id = `${e}-${Date.now()}`), l;
87
+ ], be = {
88
+ $schema: ue,
89
+ $id: pe,
90
+ title: de,
91
+ description: me,
92
+ type: fe,
93
+ properties: he,
94
+ required: ye,
95
+ ignore: ge
96
+ }, _ = {}, H = {};
97
+ function U(o) {
98
+ const { properties: t, title: e, ignore: r } = o, i = r && Array.isArray(r), l = Object.keys(t).reduce((p, f) => ((!i || !r.find((m) => m == f)) && (p[f] = t[f].type === "object" && t[f].properties ? U(t[f]) : z(t[f].default)), p), {});
99
+ return e && (!i || !r.find((p) => p == "id")) && (l.id = `${e}-${Date.now()}`), l;
101
100
  }
102
- function G(n, t = {}, e) {
103
- const o = Q[n];
104
- if (o) {
105
- let r = q(o);
106
- const l = Y[n];
107
- return r = l ? l({ getSchemaByType: G }, r, t, e) : r, r;
101
+ function J(o, t = {}, e) {
102
+ const r = _[o];
103
+ if (r) {
104
+ let i = U(r);
105
+ const l = H[o];
106
+ return i = l ? l({ getSchemaByType: J }, i, t, e) : i, i;
108
107
  }
109
108
  return null;
110
109
  }
111
- function Me(n, t) {
112
- const e = q(t);
113
- return Object.keys(n).reduce((o, r) => (o[r] && X(o[r]) && X(n[r]) ? Object.assign(o[r], n[r]) : o[r] = n[r], o), e), e;
110
+ function ve(o, t) {
111
+ const e = U(t);
112
+ return Object.keys(o).reduce((r, i) => (r[i] && O(r[i]) && O(o[i]) ? Object.assign(r[i], o[i]) : r[i] = o[i], r), e), e;
114
113
  }
115
- function Te(n, t) {
116
- return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => {
117
- if (t.has(r)) {
118
- const l = t.get(r);
114
+ function Ce(o, t) {
115
+ return Object.keys(o).filter((r) => o[r] != null).reduce((r, i) => {
116
+ if (t.has(i)) {
117
+ const l = t.get(i);
119
118
  if (typeof l == "string")
120
- o[l] = n[r];
119
+ r[l] = o[i];
121
120
  else {
122
- const c = l(r, n[r], n);
123
- Object.assign(o, c);
121
+ const p = l(i, o[i], o);
122
+ Object.assign(r, p);
124
123
  }
125
124
  } else
126
- o[r] = n[r];
127
- return o;
125
+ r[i] = o[i];
126
+ return r;
128
127
  }, {});
129
128
  }
130
- function Ve(n, t, e = /* @__PURE__ */ new Map()) {
131
- const o = Me(n, t);
132
- return Te(o, e);
129
+ function ke(o, t, e = /* @__PURE__ */ new Map()) {
130
+ const r = ve(o, t);
131
+ return Ce(r, e);
133
132
  }
134
- function Se(n = {}) {
135
- function t(i, p, a, f) {
136
- if (typeof a == "number")
137
- return f[i].length === a;
138
- if (typeof a == "object") {
139
- const u = Object.keys(a)[0], d = a[u];
140
- if (u === "not")
141
- return Number(f[i].length) !== Number(d);
142
- if (u === "moreThan")
143
- return Number(f[i].length) >= Number(d);
144
- if (u === "lessThan")
145
- return Number(f[i].length) <= Number(d);
133
+ function Me(o = {}) {
134
+ function t(a, d, n, c) {
135
+ if (typeof n == "number")
136
+ return c[a].length === n;
137
+ if (typeof n == "object") {
138
+ const s = Object.keys(n)[0], u = n[s];
139
+ if (s === "not")
140
+ return Number(c[a].length) !== Number(u);
141
+ if (s === "moreThan")
142
+ return Number(c[a].length) >= Number(u);
143
+ if (s === "lessThan")
144
+ return Number(c[a].length) <= Number(u);
146
145
  }
147
146
  return !1;
148
147
  }
149
- function e(i, p, a, f) {
150
- return f[i] && f[i].propertyValue && String(f[i].propertyValue.value) === String(a);
148
+ function e(a, d, n, c) {
149
+ return c[a] && c[a].propertyValue && String(c[a].propertyValue.value) === String(n);
151
150
  }
152
- const o = /* @__PURE__ */ new Map([
151
+ const r = /* @__PURE__ */ new Map([
153
152
  ["length", t],
154
153
  ["getProperty", e]
155
154
  ]);
156
- Object.keys(n).reduce((i, p) => (i.set(p, n[p]), i), o);
157
- function r(i, p) {
158
- const a = i;
159
- return typeof p == "number" ? [{ target: a, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: a, operator: "getProperty", param: i, value: !!p }] : typeof p == "object" ? Object.keys(p).map((f) => {
160
- if (f === "length")
161
- return { target: a, operator: "length", param: null, value: p[f] };
162
- const u = f, d = p[f];
163
- return { target: a, operator: "getProperty", param: u, value: d };
155
+ Object.keys(o).reduce((a, d) => (a.set(d, o[d]), a), r);
156
+ function i(a, d) {
157
+ const n = a;
158
+ return typeof d == "number" ? [{ target: n, operator: "length", param: null, value: Number(d) }] : typeof d == "boolean" ? [{ target: n, operator: "getProperty", param: a, value: !!d }] : typeof d == "object" ? Object.keys(d).map((c) => {
159
+ if (c === "length")
160
+ return { target: n, operator: "length", param: null, value: d[c] };
161
+ const s = c, u = d[c];
162
+ return { target: n, operator: "getProperty", param: s, value: u };
164
163
  }) : [];
165
164
  }
166
- function l(i) {
167
- return Object.keys(i).reduce((a, f) => {
168
- const u = r(f, i[f]);
169
- return a.push(...u), a;
165
+ function l(a) {
166
+ return Object.keys(a).reduce((n, c) => {
167
+ const s = i(c, a[c]);
168
+ return n.push(...s), n;
170
169
  }, []);
171
170
  }
172
- function c(i, p) {
173
- if (o.has(i.operator)) {
174
- const a = o.get(i.operator);
175
- return a && a(i.target, i.param, i.value, p) || !1;
171
+ function p(a, d) {
172
+ if (r.has(a.operator)) {
173
+ const n = r.get(a.operator);
174
+ return n && n(a.target, a.param, a.value, d) || !1;
176
175
  }
177
176
  return !1;
178
177
  }
179
- function m(i, p) {
180
- return l(i).reduce((u, d) => u && c(d, p), !0);
178
+ function f(a, d) {
179
+ return l(a).reduce((s, u) => s && p(u, d), !0);
181
180
  }
182
- function s(i, p) {
183
- const a = Object.keys(i), f = a.includes("allOf"), u = a.includes("anyOf"), d = f || u, C = (d ? i[d ? f ? "allOf" : "anyOf" : "allOf"] : [i]).map((B) => m(B, p));
184
- return f ? !C.includes(!1) : C.includes(!0);
181
+ function m(a, d) {
182
+ const n = Object.keys(a), c = n.includes("allOf"), s = n.includes("anyOf"), u = c || s, g = (u ? a[u ? c ? "allOf" : "anyOf" : "allOf"] : [a]).map((F) => f(F, d));
183
+ return c ? !g.includes(!1) : g.includes(!0);
185
184
  }
186
- return { parseValueSchema: s };
185
+ return { parseValueSchema: m };
187
186
  }
188
- const y = {
187
+ const h = {
189
188
  button: { type: "button", name: "按钮", icon: "Button" },
190
189
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
191
190
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -224,24 +223,24 @@ const y = {
224
223
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
225
224
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
226
225
  fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
227
- }, we = {}, Be = {};
228
- Se();
229
- function Z(n, t, e = /* @__PURE__ */ new Map(), o = (c, m, s) => m, r = {}, l = (c) => c) {
230
- return Q[t.title] = t, Y[t.title] = o, we[t.title] = r, Be[t.title] = l, (c = {}) => {
231
- const m = Ve(c, t, e), s = Object.keys(n).reduce((i, p) => (i[p] = n[p].default, i), {});
232
- return Object.assign(s, m);
226
+ }, Se = {}, Fe = {};
227
+ Me();
228
+ function Q(o, t, e = /* @__PURE__ */ new Map(), r = (p, f, m) => f, i = {}, l = (p) => p) {
229
+ return _[t.title] = t, H[t.title] = r, Se[t.title] = i, Fe[t.title] = l, (p = {}) => {
230
+ const f = ke(p, t, e), m = Object.keys(o).reduce((a, d) => (a[d] = o[d].default, a), {});
231
+ return Object.assign(m, f);
233
232
  };
234
233
  }
235
- function Pe(n, t) {
234
+ function Te(o, t) {
236
235
  return { customClass: t.class, customStyle: t.style };
237
236
  }
238
- const R = /* @__PURE__ */ new Map([
239
- ["appearance", Pe]
237
+ const Y = /* @__PURE__ */ new Map([
238
+ ["appearance", Te]
240
239
  ]);
241
- function K(n, t, e) {
240
+ function Z(o, t, e) {
242
241
  return t;
243
242
  }
244
- const z = {
243
+ const W = {
245
244
  /** 组件唯一标识 */
246
245
  id: { Type: String, default: "" },
247
246
  /** 自定义样式 */
@@ -264,67 +263,68 @@ const z = {
264
263
  label: { type: String, default: "" },
265
264
  /** 标识是否被选中 */
266
265
  checked: { type: Boolean, default: !1 }
267
- }, ee = Z(z, ke, R, K), I = /* @__PURE__ */ U({
266
+ }, K = Q(W, be, Y, Z), $ = /* @__PURE__ */ L({
268
267
  name: "FCheckBox",
269
- props: z,
268
+ props: W,
270
269
  emits: ["change", "changeValue", "update:modelValue", "update:checked"],
271
- setup(n, t) {
272
- const e = A(H, null), {
273
- buttonClass: o,
274
- disabled: r,
270
+ setup(o, t) {
271
+ const e = P(X, null), {
272
+ buttonClass: r,
273
+ disabled: i,
275
274
  name: l,
276
- shouldRenderButton: c,
277
- shouldRenderNative: m,
278
- shouldRenderTag: s,
279
- tagClass: i,
280
- checked: p,
281
- onClickCheckBox: a
282
- } = pe(n, t, e == null ? void 0 : e.parentProps, e == null ? void 0 : e.parentContext);
283
- h();
284
- const f = h(n.id), u = h(n.customClass), d = h(n.modelValue), v = h(n.indeterminate);
285
- return j(() => {
286
- const k = {
275
+ shouldRenderButton: p,
276
+ shouldRenderNative: f,
277
+ shouldRenderTag: m,
278
+ tagClass: a,
279
+ checked: d,
280
+ onClickCheckBox: n
281
+ } = ce(o, t, e == null ? void 0 : e.parentProps, e == null ? void 0 : e.parentContext);
282
+ k();
283
+ const c = k(o.id), s = k(o.customClass), u = k(o.modelValue), y = k(o.indeterminate);
284
+ return x(() => {
285
+ const b = {
287
286
  "custom-control": !0,
288
287
  "custom-checkbox": !0
289
288
  };
290
- return u.value && u.value.split(" ").reduce((C, w) => (C[w] = !0, C), k), k;
291
- }), L(() => n.modelValue, (k) => {
292
- d.value = k;
293
- }), L(() => n.indeterminate, (k) => {
294
- v.value = k;
295
- }), O(() => {
289
+ return s.value && s.value.split(" ").reduce((g, M) => (g[M] = !0, g), b), b;
290
+ }), I(() => o.modelValue, (b) => {
291
+ u.value = b;
292
+ }), I(() => o.indeterminate, (b) => {
293
+ y.value = b;
294
+ }), G(() => {
296
295
  }), () => {
297
- var k, C, w, B, F, D;
298
- return b(se, null, [c.value && b("div", {
299
- class: o.value,
296
+ var b, g, M, F, T, C;
297
+ return S(le, null, [p.value && S("div", {
298
+ class: r.value,
300
299
  style: "border-radius:0;border: 1px solid #E8EBF2;",
301
- onClick: a
302
- }, [(C = (k = t.slots).default) == null ? void 0 : C.call(k)]), s.value && b("div", {
303
- class: i.value,
304
- onClick: a
305
- }, [b("div", {
300
+ onClick: n
301
+ }, [(g = (b = t.slots).default) == null ? void 0 : g.call(b)]), m.value && S("div", {
302
+ class: a.value,
303
+ onClick: n
304
+ }, [S("div", {
306
305
  class: "title"
307
- }, [(B = (w = t.slots).default) == null ? void 0 : B.call(w)]), b("div", {
306
+ }, [(F = (M = t.slots).default) == null ? void 0 : F.call(M)]), S("div", {
308
307
  class: "tip"
309
- }, null), b("span", {
308
+ }, null), S("span", {
310
309
  class: "f-icon f-icon-check f-radio-icon"
311
- }, null)]), m.value && b("div", {
310
+ }, null)]), f.value && S("div", {
312
311
  class: "custom-control custom-checkbox",
313
- onClick: a
314
- }, [b("input", {
312
+ onClick: n
313
+ }, [S("input", {
315
314
  type: "checkbox",
316
315
  class: "custom-control-input",
317
316
  name: l.value,
318
- id: f,
319
- value: n.value,
320
- checked: p.value,
321
- disabled: r.value
322
- }, null), b("div", {
317
+ id: c,
318
+ value: o.value,
319
+ checked: d.value,
320
+ indeterminate: y.value,
321
+ disabled: i.value
322
+ }, null), S("div", {
323
323
  class: "custom-control-label"
324
- }, [(D = (F = t.slots).default) == null ? void 0 : D.call(F)])])]);
324
+ }, [(C = (T = t.slots).default) == null ? void 0 : C.call(T)])])]);
325
325
  };
326
326
  }
327
- }), Fe = "https://json-schema.org/draft/2020-12/schema", xe = "https://farris-design.gitee.io/check-box.schema.json", Ee = "check-group", De = "A Farris Input Component", Ae = "object", Le = {
327
+ }), we = "https://json-schema.org/draft/2020-12/schema", De = "https://farris-design.gitee.io/check-box.schema.json", Be = "check-group", Ee = "A Farris Input Component", Ve = "object", Pe = {
328
328
  id: {
329
329
  description: "The unique identifier for a check box",
330
330
  type: "string"
@@ -332,7 +332,7 @@ const z = {
332
332
  type: {
333
333
  description: "The type string of check box component",
334
334
  type: "string",
335
- default: "checkbox"
335
+ default: "check-group"
336
336
  },
337
337
  appearance: {
338
338
  description: "",
@@ -391,18 +391,18 @@ const z = {
391
391
  type: "boolean",
392
392
  default: !0
393
393
  }
394
- }, $e = [
394
+ }, Ie = [
395
395
  "id",
396
396
  "type"
397
- ], Ne = {
398
- $schema: Fe,
399
- $id: xe,
400
- title: Ee,
401
- description: De,
402
- type: Ae,
403
- properties: Le,
404
- required: $e
405
- }, Ue = {
397
+ ], Ae = {
398
+ $schema: we,
399
+ $id: De,
400
+ title: Be,
401
+ description: Ee,
402
+ type: Ve,
403
+ properties: Pe,
404
+ required: Ie
405
+ }, Le = {
406
406
  /**
407
407
  * 是否被选中
408
408
  */
@@ -419,8 +419,8 @@ const z = {
419
419
  * type为button或者tag时的尺寸
420
420
  */
421
421
  size: { type: String, default: "middle" }
422
- }, W = {
423
- ...Ue,
422
+ }, j = {
423
+ ...Le,
424
424
  /**
425
425
  * 组件标识
426
426
  */
@@ -476,230 +476,221 @@ const z = {
476
476
  * 枚举数组中枚举值的key值。
477
477
  */
478
478
  valueField: { type: String, default: "value" }
479
- }, te = Z(W, Ne, R, K);
480
- function ne(n, t, e) {
481
- const o = j(() => !n.disabled), r = h(n.enumData);
482
- function l(a) {
483
- return a[n.valueField];
484
- }
485
- function c(a) {
486
- return a[n.textField];
487
- }
488
- function m(a) {
489
- return a ? n.isStringValue ? a.split(n.separator) : a : [];
490
- }
491
- function s(a) {
492
- const u = r.value.map((d) => l(d)).filter((d) => a.some((v) => v === String(d)));
493
- return n.isStringValue ? u.join(n.separator) : u;
494
- }
495
- function i(a) {
496
- const f = String(l(a));
497
- return m(e.value).some((d) => d === f);
498
- }
499
- function p(a, f) {
500
- if (o.value) {
501
- let u = m(e.value) || [];
502
- const d = String(l(a));
503
- !u || !u.length ? u.push(d) : u.some((v) => v === d) ? u = u.filter((v) => v !== d) : u.push(d), e.value = s(u), t.emit("changeValue", e.value), t.emit("update:modelValue", e.value);
479
+ }, R = Q(j, Ae, Y, Z);
480
+ function ee(o, t, e) {
481
+ const r = x(() => !o.disabled), i = k(o.enumData);
482
+ function l(n) {
483
+ return n[o.valueField];
484
+ }
485
+ function p(n) {
486
+ return n[o.textField];
487
+ }
488
+ function f(n) {
489
+ return n ? o.isStringValue ? n.split(o.separator) : n : [];
490
+ }
491
+ function m(n) {
492
+ const s = i.value.map((u) => l(u)).filter((u) => n.some((y) => y === String(u)));
493
+ return o.isStringValue ? s.join(o.separator) : s;
494
+ }
495
+ function a(n) {
496
+ const c = String(l(n));
497
+ return f(e.value).some((u) => u === c);
498
+ }
499
+ function d(n, c) {
500
+ if (r.value) {
501
+ let s = f(e.value) || [];
502
+ const u = String(l(n));
503
+ !s || !s.length ? s.push(u) : s.some((y) => y === u) ? s = s.filter((y) => y !== u) : s.push(u), e.value = m(s), t.emit("changeValue", e.value), t.emit("update:modelValue", e.value);
504
504
  }
505
- f.stopPropagation();
505
+ c.stopPropagation();
506
506
  }
507
507
  return {
508
- enumData: r,
508
+ enumData: i,
509
509
  getValue: l,
510
- getText: c,
511
- checked: i,
512
- onClickCheckbox: p
510
+ getText: p,
511
+ checked: a,
512
+ onClickCheckbox: d
513
513
  };
514
514
  }
515
- const E = /* @__PURE__ */ U({
515
+ const V = /* @__PURE__ */ L({
516
516
  name: "FCheckGroup",
517
- props: W,
517
+ props: j,
518
518
  emits: ["changeValue", "update:modelValue"],
519
- setup(n, t) {
520
- const e = h(n.modelValue), o = h(n.horizontal), r = h(n.tabIndex), l = h(n.name), {
521
- enumData: c,
522
- onClickCheckbox: m,
523
- getValue: s,
524
- getText: i,
525
- checked: p
526
- } = ne(n, t, e), a = j(() => ({
527
- "farris-checkradio-hor": o.value
519
+ setup(o, t) {
520
+ const e = k(o.modelValue), r = k(o.horizontal), i = k(o.tabIndex), l = k(o.name), {
521
+ enumData: p,
522
+ onClickCheckbox: f,
523
+ getValue: m,
524
+ getText: a,
525
+ checked: d
526
+ } = ee(o, t, e), n = x(() => ({
527
+ "farris-checkradio-hor": r.value
528
528
  }));
529
- L(() => n.modelValue, (u) => {
530
- e.value = u;
529
+ I(() => o.modelValue, (s) => {
530
+ e.value = s;
531
531
  });
532
- const f = h([]);
533
- return ue(H, {
534
- values: f,
535
- parentProps: n,
532
+ const c = k([]);
533
+ return se(X, {
534
+ values: c,
535
+ parentProps: o,
536
536
  parentContext: t
537
- }), () => b("div", {
538
- class: ["farris-input-wrap", a.value]
539
- }, [t.slots.default ? t.slots.default() : c.value.map((u, d) => {
540
- const v = "checkbox_" + l.value + d;
541
- return b("div", {
537
+ }), () => S("div", {
538
+ class: ["farris-input-wrap", n.value]
539
+ }, [t.slots.default ? t.slots.default() : p.value.map((s, u) => {
540
+ const y = "checkbox_" + l.value + u;
541
+ return S("div", {
542
542
  class: "custom-control custom-checkbox"
543
- }, [b("input", {
543
+ }, [S("input", {
544
544
  type: "checkbox",
545
545
  class: "custom-control-input",
546
546
  name: l.value,
547
- id: v,
548
- value: s(u),
549
- checked: p(u),
550
- disabled: n.disabled,
551
- tabindex: r.value,
552
- onClick: (k) => m(u, k)
553
- }, null), b("label", {
547
+ id: y,
548
+ value: m(s),
549
+ checked: d(s),
550
+ disabled: o.disabled,
551
+ tabindex: i.value,
552
+ onClick: (b) => f(s, b)
553
+ }, null), S("label", {
554
554
  class: "custom-control-label",
555
- for: v,
556
- title: i(u)
557
- }, [i(u)])]);
555
+ for: y,
556
+ title: a(s)
557
+ }, [a(s)])]);
558
558
  })]);
559
559
  }
560
560
  });
561
- function oe(n, t, e) {
562
- var D;
563
- function o() {
561
+ function te(o, t, e) {
562
+ var T;
563
+ function r() {
564
564
  e != null && e.resolveComponentContext && e.resolveComponentContext();
565
565
  }
566
- o();
567
- const r = e && e.getStyles && e.getStyles() || "", l = e && e.getDesignerClass && e.getDesignerClass() || "", c = h();
568
- function m() {
566
+ r();
567
+ const i = e && e.getStyles && e.getStyles() || "", l = e && e.getDesignerClass && e.getDesignerClass() || "", p = k();
568
+ function f() {
569
569
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
570
570
  }
571
- function s() {
571
+ function m() {
572
572
  return !1;
573
573
  }
574
- function i() {
574
+ function a() {
575
575
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
576
576
  }
577
- function p() {
577
+ function d() {
578
578
  return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
579
579
  }
580
- function a(g) {
581
- if (!g || !g.value)
580
+ function n(C) {
581
+ if (!C || !C.value)
582
582
  return null;
583
- if (g.value.schema && g.value.schema.type === "component")
584
- return g.value;
585
- const T = h(g == null ? void 0 : g.value.parent), V = a(T);
586
- return V || null;
583
+ if (C.value.schema && C.value.schema.type === "component")
584
+ return C.value;
585
+ const w = k(C == null ? void 0 : C.value.parent), D = n(w);
586
+ return D || null;
587
587
  }
588
- function f(g = t) {
589
- const { componentInstance: T, designerItemElementRef: V } = g;
590
- return !T || !T.value ? null : T.value.canMove ? V : f(g.parent);
588
+ function c(C = t) {
589
+ const { componentInstance: w, designerItemElementRef: D } = C;
590
+ return !w || !w.value ? null : w.value.canMove ? D : c(C.parent);
591
591
  }
592
- function u(g) {
593
- return !!e && e.canAccepts(g);
592
+ function s(C) {
593
+ return !!e && e.canAccepts(C);
594
594
  }
595
- function d() {
595
+ function u() {
596
596
  return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
597
597
  }
598
- function v() {
599
- }
600
- function k(g, T) {
601
- T && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(T);
598
+ function y() {
602
599
  }
603
- function C(g, T) {
604
- const { componentType: V } = g;
605
- let S = G(V, g, T);
606
- e && e.onResolveNewComponentSchema && (S = e.onResolveNewComponentSchema(g, S));
607
- const $ = V.toLowerCase().replace("-", "_");
608
- return S && !S.id && S.type === V && (S.id = `${$}_${Math.random().toString().slice(2, 6)}`), S;
600
+ function b(C, w) {
601
+ w && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(w);
609
602
  }
610
- function w(g, T) {
611
- const V = String(g.getAttribute("data-controltype")), S = g.getAttribute("data-feature"), $ = S ? JSON.parse(S) : {};
612
- $.parentComponentInstance = c.value;
613
- let P = G(V, $);
614
- e && e.onAcceptNewChildElement && (P = e.onAcceptNewChildElement(g, T, P));
615
- const ae = V.toLowerCase().replace("-", "_");
616
- return P && !P.id && P.type === V && (P.id = `${ae}_${Math.random().toString().slice(2, 6)}`), P;
603
+ function g(C, w) {
604
+ const { componentType: D } = C;
605
+ let B = J(D, C, w);
606
+ e && e.onResolveNewComponentSchema && (B = e.onResolveNewComponentSchema(C, B));
607
+ const N = D.toLowerCase().replace("-", "_");
608
+ return B && !B.id && B.type === D && (B.id = `${N}_${Math.random().toString().slice(2, 6)}`), B;
617
609
  }
618
- function B(g) {
610
+ function M(C) {
619
611
  }
620
- function F(...g) {
612
+ function F(...C) {
621
613
  if (e && e.getPropsConfig)
622
- return e.getPropsConfig(...g);
614
+ return e.getPropsConfig(...C);
623
615
  }
624
- return c.value = {
625
- canMove: m(),
626
- canSelectParent: s(),
627
- canDelete: i(),
628
- canNested: !p(),
616
+ return p.value = {
617
+ canMove: f(),
618
+ canSelectParent: m(),
619
+ canDelete: a(),
620
+ canNested: !d(),
629
621
  contents: t == null ? void 0 : t.schema.contents,
630
- elementRef: n,
631
- parent: (D = t == null ? void 0 : t.parent) == null ? void 0 : D.componentInstance,
622
+ elementRef: o,
623
+ parent: (T = t == null ? void 0 : t.parent) == null ? void 0 : T.componentInstance,
632
624
  schema: t == null ? void 0 : t.schema,
633
- styles: r,
625
+ styles: i,
634
626
  designerClass: l,
635
- canAccepts: u,
636
- getBelongedComponentInstance: a,
637
- getDraggableDesignItemElement: f,
638
- getDraggingDisplayText: d,
627
+ canAccepts: s,
628
+ getBelongedComponentInstance: n,
629
+ getDraggableDesignItemElement: c,
630
+ getDraggingDisplayText: u,
639
631
  getPropConfig: F,
640
- getDragScopeElement: v,
641
- onAcceptMovedChildElement: k,
642
- onAcceptNewChildElement: w,
643
- onChildElementMovedOut: B,
644
- addNewChildComponentSchema: C,
645
- updateDragAndDropRules: o,
646
- triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || h(!1),
647
- triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || h(!1)
648
- }, c;
632
+ getDragScopeElement: y,
633
+ onAcceptMovedChildElement: b,
634
+ onChildElementMovedOut: M,
635
+ addNewChildComponentSchema: g,
636
+ updateDragAndDropRules: r,
637
+ triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || k(!1),
638
+ triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
639
+ }, p;
649
640
  }
650
- function re(n, t) {
651
- n.schema;
652
- const e = h(!0), o = h(!0);
653
- function r(a) {
641
+ function ne(o, t) {
642
+ o.schema;
643
+ const e = k(!0), r = k(!0);
644
+ function i(n) {
654
645
  return !1;
655
646
  }
656
647
  function l() {
657
648
  return !1;
658
649
  }
659
- function c() {
650
+ function p() {
660
651
  return !1;
661
652
  }
662
- function m() {
653
+ function f() {
663
654
  return !0;
664
655
  }
665
- function s(a) {
656
+ function m(n) {
666
657
  }
667
- function i() {
658
+ function a() {
668
659
  }
669
- function p(a) {
660
+ function d(n) {
670
661
  return null;
671
662
  }
672
663
  return {
673
- canAccepts: r,
664
+ canAccepts: i,
674
665
  checkCanDeleteComponent: l,
675
- checkCanMoveComponent: c,
676
- hideNestedPaddingInDesginerView: m,
677
- onAcceptMovedChildElement: s,
678
- resolveComponentContext: i,
666
+ checkCanMoveComponent: p,
667
+ hideNestedPaddingInDesginerView: f,
668
+ onAcceptMovedChildElement: m,
669
+ resolveComponentContext: a,
679
670
  triggerBelongedComponentToMoveWhenMoved: e,
680
- triggerBelongedComponentToDeleteWhenDeleted: o,
681
- getPropsConfig: p
671
+ triggerBelongedComponentToDeleteWhenDeleted: r,
672
+ getPropsConfig: d
682
673
  };
683
674
  }
684
- class je {
675
+ class xe {
685
676
  constructor(t, e) {
686
- M(this, "componentId");
687
- M(this, "viewModelId");
688
- M(this, "eventsEditorUtils");
689
- M(this, "formSchemaUtils");
690
- M(this, "formMetadataConverter");
691
- M(this, "designViewModelUtils");
692
- M(this, "designViewModelField");
693
- M(this, "controlCreatorUtils");
694
- M(this, "designerHostService");
695
- M(this, "schemaService", null);
696
- M(this, "metadataService", null);
697
- M(this, "propertyConfig", {
677
+ v(this, "componentId");
678
+ v(this, "viewModelId");
679
+ v(this, "eventsEditorUtils");
680
+ v(this, "formSchemaUtils");
681
+ v(this, "formMetadataConverter");
682
+ v(this, "designViewModelUtils");
683
+ v(this, "designViewModelField");
684
+ v(this, "controlCreatorUtils");
685
+ v(this, "designerHostService");
686
+ v(this, "schemaService", null);
687
+ v(this, "metadataService", null);
688
+ v(this, "propertyConfig", {
698
689
  type: "object",
699
690
  categories: {}
700
691
  });
701
- var o;
702
- this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
692
+ var r;
693
+ this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
703
694
  }
704
695
  getTableInfo() {
705
696
  var t;
@@ -709,8 +700,8 @@ class je {
709
700
  const e = t.binding && t.binding.type === "Form" && t.binding.field;
710
701
  if (e) {
711
702
  if (!this.designViewModelField) {
712
- const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
713
- this.designViewModelField = o.fields.find((r) => r.id === e);
703
+ const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
704
+ this.designViewModelField = r.fields.find((i) => i.id === e);
714
705
  }
715
706
  t.updateOn = this.designViewModelField.updateOn;
716
707
  }
@@ -736,7 +727,7 @@ class je {
736
727
  type: "combo-list",
737
728
  textField: "name",
738
729
  valueField: "value",
739
- data: [{ value: t.type, name: y[t.type].name }]
730
+ data: [{ value: t.type, name: h[t.type].name }]
740
731
  }
741
732
  }
742
733
  }
@@ -769,19 +760,19 @@ class je {
769
760
  * @returns
770
761
  */
771
762
  updateElementByParentContainer(t, e) {
772
- const o = e && e.parent && e.parent.schema;
773
- if (!o)
763
+ const r = e && e.parent && e.parent.schema;
764
+ if (!r)
774
765
  return;
775
- const r = o.contents.findIndex((c) => c.id === t), l = J(o.contents[r]);
776
- o.contents.splice(r, 1), o.contents.splice(r, 0, l);
766
+ const i = r.contents.findIndex((p) => p.id === t), l = z(r.contents[i]);
767
+ r.contents.splice(i, 1), r.contents.splice(i, 0, l);
777
768
  }
778
769
  }
779
- const x = class x {
770
+ const E = class E {
780
771
  /**
781
772
  * 根据绑定字段类型获取可用的输入类控件
782
773
  */
783
774
  static getEditorTypesByMDataType(t) {
784
- const e = x.fieldControlTypeMapping[t];
775
+ const e = E.fieldControlTypeMapping[t];
785
776
  return e || [{ key: "", value: "" }];
786
777
  }
787
778
  /**
@@ -789,9 +780,9 @@ const x = class x {
789
780
  */
790
781
  static getAllInputTypes() {
791
782
  const t = [];
792
- for (let e in x.fieldControlTypeMapping)
793
- x.fieldControlTypeMapping[e].forEach((o) => {
794
- t.find((r) => r.key === o.key && r.value === o.value) || t.push({ key: o.key, value: o.value });
783
+ for (let e in E.fieldControlTypeMapping)
784
+ E.fieldControlTypeMapping[e].forEach((r) => {
785
+ t.find((i) => i.key === r.key && i.value === r.value) || t.push({ key: r.key, value: r.value });
795
786
  });
796
787
  return t;
797
788
  }
@@ -799,68 +790,175 @@ const x = class x {
799
790
  /**
800
791
  * <字段类型,可配置的控件类型列表>的映射
801
792
  */
802
- M(x, "fieldControlTypeMapping", {
793
+ v(E, "fieldControlTypeMapping", {
803
794
  String: [
804
- { key: y["input-group"].type, value: y["input-group"].name },
805
- { key: y.lookup.type, value: y.lookup.name },
806
- { key: y["date-picker"].type, value: y["date-picker"].name },
807
- { key: y["check-box"].type, value: y["check-box"].name },
808
- { key: y["radio-group"].type, value: y["radio-group"].name },
809
- { key: y["combo-list"].type, value: y["combo-list"].name },
810
- { key: y.textarea.type, value: y.textarea.name }
795
+ { key: h["input-group"].type, value: h["input-group"].name },
796
+ { key: h.lookup.type, value: h.lookup.name },
797
+ { key: h["date-picker"].type, value: h["date-picker"].name },
798
+ { key: h["check-box"].type, value: h["check-box"].name },
799
+ { key: h["check-group"].type, value: h["check-group"].name },
800
+ { key: h["radio-group"].type, value: h["radio-group"].name },
801
+ { key: h["combo-list"].type, value: h["combo-list"].name },
802
+ { key: h.textarea.type, value: h.textarea.name }
811
803
  ],
812
804
  Text: [
813
- { key: y.textarea.type, value: y.textarea.name },
814
- { key: y.lookup.type, value: y.lookup.name }
805
+ { key: h.textarea.type, value: h.textarea.name },
806
+ { key: h.lookup.type, value: h.lookup.name }
815
807
  ],
816
808
  Decimal: [
817
- { key: y["number-spinner"].type, value: y["number-spinner"].name }
809
+ { key: h["number-spinner"].type, value: h["number-spinner"].name }
818
810
  ],
819
811
  Integer: [
820
- { key: y["number-spinner"].type, value: y["number-spinner"].name }
812
+ { key: h["number-spinner"].type, value: h["number-spinner"].name }
821
813
  ],
822
814
  Number: [
823
- { key: y["number-spinner"].type, value: y["number-spinner"].name }
815
+ { key: h["number-spinner"].type, value: h["number-spinner"].name }
824
816
  ],
825
817
  BigNumber: [
826
- { key: y["number-spinner"].type, value: y["number-spinner"].name }
818
+ { key: h["number-spinner"].type, value: h["number-spinner"].name }
827
819
  ],
828
820
  Date: [
829
- { key: y["date-picker"].type, value: y["date-picker"].name }
821
+ { key: h["date-picker"].type, value: h["date-picker"].name }
830
822
  ],
831
823
  DateTime: [
832
- { key: y["date-picker"].type, value: y["date-picker"].name }
824
+ { key: h["date-picker"].type, value: h["date-picker"].name }
833
825
  ],
834
826
  Boolean: [
835
- { key: y.switch.type, value: y.switch.name },
836
- { key: y["check-box"].type, value: y["check-box"].name }
827
+ { key: h.switch.type, value: h.switch.name },
828
+ { key: h["check-box"].type, value: h["check-box"].name }
837
829
  ],
838
830
  Enum: [
839
- { key: y["combo-list"].type, value: y["combo-list"].name },
840
- { key: y["radio-group"].type, value: y["radio-group"].name }
831
+ { key: h["combo-list"].type, value: h["combo-list"].name },
832
+ { key: h["radio-group"].type, value: h["radio-group"].name }
841
833
  ],
842
834
  Object: [
843
- { key: y.lookup.type, value: y.lookup.name },
844
- { key: y["combo-list"].type, value: y["combo-list"].name },
845
- { key: y["radio-group"].type, value: y["radio-group"].name }
835
+ { key: h.lookup.type, value: h.lookup.name },
836
+ { key: h["combo-list"].type, value: h["combo-list"].name },
837
+ { key: h["radio-group"].type, value: h["radio-group"].name }
846
838
  ]
847
839
  });
848
- let N = x;
849
- const Ge = h(0);
850
- class ie extends je {
851
- constructor(e, o) {
852
- super(e, o);
853
- M(this, "responseLayoutEditorFunction");
854
- this.responseLayoutEditorFunction = de(this.formSchemaUtils);
855
- }
856
- getPropertyConfig(e, o) {
857
- return this.propertyConfig.categories.basic = this.getBasicProperties(e, o), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, o), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
858
- }
859
- getBasicProperties(e, o) {
860
- var m;
861
- var r = this;
840
+ let A = E;
841
+ const Ne = k(0);
842
+ class $e {
843
+ constructor() {
844
+ /** 控件标题 */
845
+ v(this, "label", "");
846
+ /** 控件id */
847
+ v(this, "id", "");
848
+ /** 每个控件占用的栅格数 */
849
+ v(this, "columnInSM", 12);
850
+ v(this, "columnInMD", 6);
851
+ v(this, "columnInLG", 3);
852
+ v(this, "columnInEL", 2);
853
+ /** 每个控件占用的列数 */
854
+ v(this, "displayWidthInSM", 1);
855
+ v(this, "displayWidthInMD", 1);
856
+ v(this, "displayWidthInLG", 1);
857
+ v(this, "displayWidthInEL", 1);
858
+ /** 编辑器内部默认显示的屏幕大小-----可以去掉 */
859
+ v(this, "displayColumnCountAtBreakPoint", "md");
860
+ /** 控件所在行,传0即可-----编辑器内部使用 */
861
+ v(this, "tagRow", 0);
862
+ /** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
863
+ v(this, "showTopBorder", 0);
864
+ /** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
865
+ v(this, "group", 1);
866
+ /** 控件是否符合标准的class配置(设计器用的) */
867
+ v(this, "isSupportedClass", !0);
868
+ /** 控件所在分组id(设计器用的) */
869
+ v(this, "fieldSetId", "");
870
+ }
871
+ }
872
+ function Ge(o) {
873
+ let t, e;
874
+ const r = /* @__PURE__ */ new Map();
875
+ let i = [];
876
+ function l(d, n) {
877
+ const s = d.split(" ").filter((M) => M.startsWith("col-"));
878
+ if (s.length === 0) {
879
+ n.isSupportedClass = !1;
880
+ return;
881
+ }
882
+ let u = s.find((M) => /^col-([1-9]|10|11|12)$/.test(M)), y = s.find((M) => /^col-md-([1-9]|10|11|12)$/.test(M)), b = s.find((M) => /^col-xl-([1-9]|10|11|12)$/.test(M)), g = s.find((M) => /^col-el-([1-9]|10|11|12)$/.test(M));
883
+ u = u || "col-12", n.columnInSM = parseInt(u.replace("col-", ""), 10), n.displayWidthInSM = n.columnInSM / 12, n.displayWidthInSM !== 1 && (n.isSupportedClass = !1), y = y || "col-md-" + n.columnInSM, n.columnInMD = parseInt(y.replace("col-md-", ""), 10), n.displayWidthInMD = n.columnInMD / 6, [1, 2].includes(n.displayWidthInMD) || (n.isSupportedClass = !1), b = b || "col-xl-" + n.columnInMD, n.columnInLG = parseInt(b.replace("col-xl-", ""), 10), n.displayWidthInLG = n.columnInLG / 3, [1, 2, 3, 4].includes(n.displayWidthInLG) || (n.isSupportedClass = !1), g = g || "col-el-" + n.columnInLG, n.columnInEL = parseInt(g.replace("col-el-", ""), 10), n.displayWidthInEL = n.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(n.displayWidthInEL) || (n.isSupportedClass = !1);
884
+ }
885
+ function p(d, n, c, s = !1) {
886
+ let u = !1;
887
+ d.contents.forEach((y) => {
888
+ if (y.type === "fieldset") {
889
+ c += 1, p(y, n, c, !0), u = !0;
890
+ return;
891
+ }
892
+ u && (c += 1, u = !1);
893
+ const b = y.appearance && y.appearance.class, g = new $e();
894
+ b ? l(b, g) : g.isSupportedClass = !1, g.label = y.label || y.id, g.id = y.id, g.group = c, s && (g.fieldSetId = d.id), e === y.id && (t = c), r.set(y.id, y), n.push(g);
895
+ });
896
+ }
897
+ function f(d) {
898
+ const n = o.getComponentById(d);
899
+ if (!n || !n.componentType || !n.componentType.startsWith("form"))
900
+ return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
901
+ const c = o.selectNode(n, (s) => s.type === q["response-form"].type);
902
+ return !c || !c.contents || c.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: c };
903
+ }
904
+ function m(d, n) {
905
+ n = n || d.id;
906
+ const { result: c, message: s, formNode: u } = f(n);
907
+ if (!c)
908
+ return { result: c, message: s };
909
+ e = d.id, i = [], r.clear();
910
+ const y = u.contents[0].type === q.fieldset.type ? 0 : 1;
911
+ p(u, i, y);
912
+ const b = i.find((M) => !M.isSupportedClass);
913
+ return {
914
+ defaultState: {
915
+ defaultGroupNumber: t || 1,
916
+ model: b ? "customize" : "standard"
917
+ },
918
+ importData: i
919
+ };
920
+ }
921
+ function a(d, n) {
922
+ n = n;
923
+ const { result: c, formNode: s } = f(n);
924
+ if (!c)
925
+ return "";
926
+ const u = [];
927
+ return d.forEach((y) => {
928
+ var M;
929
+ const b = r.get(y.id), g = b.appearance && b.appearance.class;
930
+ if (g) {
931
+ const T = g.split(" ").filter((re) => !re.startsWith("col-")), C = "col-" + y.columnInSM, w = "col-md-" + y.columnInMD, D = "col-xl-" + y.columnInLG, B = "col-el-" + y.columnInEL, N = [C, w, D, B].concat(T);
932
+ b.appearance.class = N.join(" ");
933
+ }
934
+ if (y.fieldSetId) {
935
+ const F = s.contents.find((C) => C.id === y.fieldSetId), T = u.find((C) => C.id === y.fieldSetId);
936
+ T ? (M = T.contents) == null || M.push(b) : (u.push(F), F.contents = [b]);
937
+ } else
938
+ u.push(b);
939
+ }), s.contents = u, s.id;
940
+ }
941
+ return {
942
+ checkCanFindFormNode: f,
943
+ checkCanOpenLayoutEditor: m,
944
+ changeFormControlsByResponseLayoutConfig: a,
945
+ getResonseFormLayoutConfig: p
946
+ };
947
+ }
948
+ class oe extends xe {
949
+ constructor(e, r) {
950
+ super(e, r);
951
+ v(this, "responseLayoutEditorFunction");
952
+ this.responseLayoutEditorFunction = Ge(this.formSchemaUtils);
953
+ }
954
+ getPropertyConfig(e, r) {
955
+ 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;
956
+ }
957
+ getBasicProperties(e, r) {
958
+ var f;
959
+ var i = this;
862
960
  this.setDesignViewModelField(e);
863
- const l = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
961
+ const l = this.formSchemaUtils.getFormMetadataBasicInfo(), p = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
864
962
  return {
865
963
  description: "Basic Information",
866
964
  title: "基本信息",
@@ -882,7 +980,7 @@ class ie extends je {
882
980
  textField: "value",
883
981
  valueField: "key",
884
982
  editable: !1,
885
- data: r.designViewModelField ? N.getEditorTypesByMDataType((m = r.designViewModelField.type) == null ? void 0 : m.name) : N.getAllInputTypes()
983
+ data: i.designViewModelField ? A.getEditorTypesByMDataType((f = i.designViewModelField.type) == null ? void 0 : f.name) : A.getAllInputTypes()
886
984
  }
887
985
  },
888
986
  label: {
@@ -907,27 +1005,27 @@ class ie extends je {
907
1005
  { field: "fieldType", title: "字段类型" }
908
1006
  ],
909
1007
  textField: "bindingField",
910
- data: c
1008
+ data: p
911
1009
  }
912
1010
  }
913
1011
  },
914
- setPropertyRelates(s, i) {
915
- if (s)
916
- switch (s && s.propertyID) {
1012
+ setPropertyRelates(m, a) {
1013
+ if (m)
1014
+ switch (m && m.propertyID) {
917
1015
  case "type": {
918
- r.changeControlType(e, s, o);
1016
+ i.changeControlType(e, m, r);
919
1017
  break;
920
1018
  }
921
1019
  case "label": {
922
- s.needRefreshControlTree = !0;
1020
+ m.needRefreshControlTree = !0;
923
1021
  break;
924
1022
  }
925
1023
  }
926
1024
  }
927
1025
  };
928
1026
  }
929
- getAppearanceProperties(e, o) {
930
- var r = this;
1027
+ getAppearanceProperties(e, r) {
1028
+ var i = this;
931
1029
  return {
932
1030
  title: "样式",
933
1031
  description: "Appearance",
@@ -953,18 +1051,18 @@ class ie extends je {
953
1051
  refreshPanelAfterChanged: !0,
954
1052
  editor: {
955
1053
  type: "response-layout-editor-setting",
956
- initialState: r.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, r.componentId)
1054
+ initialState: i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, i.componentId)
957
1055
  }
958
1056
  }
959
1057
  },
960
- setPropertyRelates(l, c) {
1058
+ setPropertyRelates(l, p) {
961
1059
  if (l)
962
1060
  switch (l && l.propertyID) {
963
1061
  case "responseLayout":
964
- r.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue, r.componentId || e.id), r.updateUnifiedLayoutAfterResponseLayoutChanged(r.componentId), r.updateElementByParentContainer(e.id, o), delete e.responseLayout;
1062
+ i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue, i.componentId || e.id), i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId), i.updateElementByParentContainer(e.id, r), delete e.responseLayout;
965
1063
  break;
966
1064
  case "class":
967
- r.updateUnifiedLayoutAfterControlChanged(l.propertyValue, e.id, this.componentId), r.updateElementByParentContainer(e.id, o);
1065
+ i.updateUnifiedLayoutAfterControlChanged(l.propertyValue, e.id, this.componentId), i.updateElementByParentContainer(e.id, r);
968
1066
  break;
969
1067
  }
970
1068
  }
@@ -978,13 +1076,13 @@ class ie extends je {
978
1076
  * @param propertyData 控件DOM属性
979
1077
  * @param newControlType 新控件类型
980
1078
  */
981
- changeControlType(e, o, r) {
982
- var p, a, f, u;
983
- const l = o.propertyValue, c = r && r.parent && r.parent.schema;
984
- if (!c)
1079
+ changeControlType(e, r, i) {
1080
+ var d, n, c, s;
1081
+ const l = r.propertyValue, p = i && i.parent && i.parent.schema;
1082
+ if (!p)
985
1083
  return;
986
- const m = c.contents.findIndex((d) => d.id === e.id), s = c.contents[m];
987
- let i;
1084
+ const f = p.contents.findIndex((u) => u.id === e.id), m = p.contents[f];
1085
+ let a;
988
1086
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
989
1087
  editor: {
990
1088
  $type: l
@@ -992,30 +1090,30 @@ class ie extends je {
992
1090
  name: this.designViewModelField.name,
993
1091
  require: this.designViewModelField.require,
994
1092
  readonly: this.designViewModelField.readonly
995
- }, !1), i = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), i || (i = _("form-group") || {}, i.editor = _(l) || {}, delete i.editor.id, delete i.editor.binding, delete i.editor.appearance), Object.assign(i, {
996
- id: s.id,
997
- appearance: s.appearance,
998
- size: s.size,
999
- label: s.label,
1000
- binding: s.binding,
1001
- visible: s.visible
1002
- }), Object.assign(i.editor, {
1003
- isTextArea: i.isTextArea && s.isTextArea,
1004
- placeholder: (p = s.editor) == null ? void 0 : p.placeholder,
1005
- holdPlace: (a = s.editor) == null ? void 0 : a.holdPlace,
1006
- readonly: (f = s.editor) == null ? void 0 : f.readonly,
1007
- require: (u = s.editor) == null ? void 0 : u.require
1008
- }), c.contents.splice(m, 1), c.contents.splice(m, 0, i), r.schema = Object.assign(s, i), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
1009
- (d) => d.classList.remove("dgComponentSelected")
1010
- ), Ge.value++;
1011
- }
1012
- getComponentConfig(e, o = {}, r = {}) {
1093
+ }, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(l)), Object.assign(a, {
1094
+ id: m.id,
1095
+ appearance: m.appearance,
1096
+ size: m.size,
1097
+ label: m.label,
1098
+ binding: m.binding,
1099
+ visible: m.visible
1100
+ }), Object.assign(a.editor, {
1101
+ isTextArea: a.isTextArea && m.isTextArea,
1102
+ placeholder: (d = m.editor) == null ? void 0 : d.placeholder,
1103
+ holdPlace: (n = m.editor) == null ? void 0 : n.holdPlace,
1104
+ readonly: (c = m.editor) == null ? void 0 : c.readonly,
1105
+ require: (s = m.editor) == null ? void 0 : s.require
1106
+ }), p.contents.splice(f, 1), p.contents.splice(f, 0, a), i.schema = Object.assign(m, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
1107
+ (u) => u.classList.remove("dgComponentSelected")
1108
+ ), Ne.value++;
1109
+ }
1110
+ getComponentConfig(e, r = {}, i = {}) {
1013
1111
  const l = Object.assign({
1014
1112
  description: "编辑器",
1015
1113
  title: "编辑器",
1016
1114
  type: "input-group",
1017
1115
  $converter: "/converter/property-editor.converter"
1018
- }, o), c = Object.assign({
1116
+ }, r), p = Object.assign({
1019
1117
  readonly: {
1020
1118
  description: "",
1021
1119
  title: "只读",
@@ -1036,8 +1134,8 @@ class ie extends je {
1036
1134
  title: "提示文本",
1037
1135
  type: "string"
1038
1136
  }
1039
- }, r);
1040
- return { ...l, properties: { ...c } };
1137
+ }, i);
1138
+ return { ...l, properties: { ...p } };
1041
1139
  }
1042
1140
  /**
1043
1141
  * 修改某一输入控件的样式后更新Form的统一布局配置
@@ -1045,50 +1143,50 @@ class ie extends je {
1045
1143
  * @param controlId 控件Id
1046
1144
  * @param componentId 控件所在组件id
1047
1145
  */
1048
- updateUnifiedLayoutAfterControlChanged(e, o, r) {
1146
+ updateUnifiedLayoutAfterControlChanged(e, r, i) {
1049
1147
  const l = e.split(" ");
1050
- let c = l.find((a) => /^col-([1-9]|10|11|12)$/.test(a)), m = l.find((a) => /^col-md-([1-9]|10|11|12)$/.test(a)), s = l.find((a) => /^col-xl-([1-9]|10|11|12)$/.test(a)), i = l.find((a) => /^col-el-([1-9]|10|11|12)$/.test(a));
1051
- c = c || "col-12", m = m || "col-md-" + c.replace("col-", ""), s = s || "col-xl-" + m.replace("col-md-", ""), i = i || "col-el-" + s.replace("col-xl-", "");
1052
- const p = {
1053
- id: o,
1054
- columnInSM: parseInt(c.replace("col-", ""), 10),
1055
- columnInMD: parseInt(m.replace("col-md-", ""), 10),
1056
- columnInLG: parseInt(s.replace("col-xl-", ""), 10),
1057
- columnInEL: parseInt(i.replace("col-el-", ""), 10)
1148
+ let p = l.find((n) => /^col-([1-9]|10|11|12)$/.test(n)), f = l.find((n) => /^col-md-([1-9]|10|11|12)$/.test(n)), m = l.find((n) => /^col-xl-([1-9]|10|11|12)$/.test(n)), a = l.find((n) => /^col-el-([1-9]|10|11|12)$/.test(n));
1149
+ p = p || "col-12", f = f || "col-md-" + p.replace("col-", ""), m = m || "col-xl-" + f.replace("col-md-", ""), a = a || "col-el-" + m.replace("col-xl-", "");
1150
+ const d = {
1151
+ id: r,
1152
+ columnInSM: parseInt(p.replace("col-", ""), 10),
1153
+ columnInMD: parseInt(f.replace("col-md-", ""), 10),
1154
+ columnInLG: parseInt(m.replace("col-xl-", ""), 10),
1155
+ columnInEL: parseInt(a.replace("col-el-", ""), 10)
1058
1156
  };
1059
- this.updateUnifiedLayoutAfterResponseLayoutChanged(r, p);
1157
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(i, d);
1060
1158
  }
1061
1159
  /**
1062
1160
  * 修改控件布局配置后更新Form统一布局配置
1063
1161
  * @param componentId 组件Id
1064
1162
  * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
1065
1163
  */
1066
- updateUnifiedLayoutAfterResponseLayoutChanged(e, o) {
1067
- const { formNode: r } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
1068
- if (!r || !r.unifiedLayout)
1164
+ updateUnifiedLayoutAfterResponseLayoutChanged(e, r) {
1165
+ const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
1166
+ if (!i || !i.unifiedLayout)
1069
1167
  return;
1070
1168
  const l = [];
1071
- if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(r, l, 1), o) {
1072
- const d = l.find((v) => v.id === o.id);
1073
- Object.assign(d || {}, o);
1169
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i, l, 1), r) {
1170
+ const u = l.find((y) => y.id === r.id);
1171
+ Object.assign(u || {}, r);
1074
1172
  }
1075
- const c = l.map((d) => d.columnInSM), m = l.map((d) => d.columnInMD), s = l.map((d) => d.columnInLG), i = l.map((d) => d.columnInEL), p = this.checkIsUniqueColumn(c) ? c[0] : null, a = this.checkIsUniqueColumn(m) ? m[0] : null, f = this.checkIsUniqueColumn(s) ? s[0] : null, u = this.checkIsUniqueColumn(i) ? i[0] : null;
1076
- Object.assign(r.unifiedLayout, {
1077
- uniqueColClassInSM: p,
1078
- uniqueColClassInMD: a,
1079
- uniqueColClassInLG: f,
1080
- uniqueColClassInEL: u
1173
+ const p = l.map((u) => u.columnInSM), f = l.map((u) => u.columnInMD), m = l.map((u) => u.columnInLG), a = l.map((u) => u.columnInEL), d = this.checkIsUniqueColumn(p) ? p[0] : null, n = this.checkIsUniqueColumn(f) ? f[0] : null, c = this.checkIsUniqueColumn(m) ? m[0] : null, s = this.checkIsUniqueColumn(a) ? a[0] : null;
1174
+ Object.assign(i.unifiedLayout, {
1175
+ uniqueColClassInSM: d,
1176
+ uniqueColClassInMD: n,
1177
+ uniqueColClassInLG: c,
1178
+ uniqueColClassInEL: s
1081
1179
  });
1082
1180
  }
1083
1181
  /**
1084
1182
  * 校验宽度样式值是否一致
1085
1183
  */
1086
1184
  checkIsUniqueColumn(e) {
1087
- const o = new Set(e);
1088
- return Array.from(o).length === 1;
1185
+ const r = new Set(e);
1186
+ return Array.from(r).length === 1;
1089
1187
  }
1090
1188
  }
1091
- class Ie extends ie {
1189
+ class Ue extends oe {
1092
1190
  constructor(t, e) {
1093
1191
  super(t, e);
1094
1192
  }
@@ -1115,7 +1213,7 @@ class Ie extends ie {
1115
1213
  });
1116
1214
  }
1117
1215
  }
1118
- class Oe extends ie {
1216
+ class We extends oe {
1119
1217
  constructor(t, e) {
1120
1218
  super(t, e);
1121
1219
  }
@@ -1137,141 +1235,141 @@ class Oe extends ie {
1137
1235
  });
1138
1236
  }
1139
1237
  }
1140
- function qe(n, t) {
1238
+ function je(o, t) {
1141
1239
  const {
1142
1240
  canAccepts: e,
1143
- checkCanDeleteComponent: o,
1144
- checkCanMoveComponent: r,
1241
+ checkCanDeleteComponent: r,
1242
+ checkCanMoveComponent: i,
1145
1243
  hideNestedPaddingInDesginerView: l,
1146
- onAcceptMovedChildElement: c,
1147
- resolveComponentContext: m,
1148
- triggerBelongedComponentToMoveWhenMoved: s,
1149
- triggerBelongedComponentToDeleteWhenDeleted: i
1150
- } = re(n), p = n.schema;
1151
- function a(f, u) {
1152
- return new Ie(f, t).getPropertyConfig(p, u);
1244
+ onAcceptMovedChildElement: p,
1245
+ resolveComponentContext: f,
1246
+ triggerBelongedComponentToMoveWhenMoved: m,
1247
+ triggerBelongedComponentToDeleteWhenDeleted: a
1248
+ } = ne(o), d = o.schema;
1249
+ function n(c, s) {
1250
+ return new Ue(c, t).getPropertyConfig(d, s);
1153
1251
  }
1154
1252
  return {
1155
1253
  canAccepts: e,
1156
- checkCanDeleteComponent: o,
1157
- checkCanMoveComponent: r,
1254
+ checkCanDeleteComponent: r,
1255
+ checkCanMoveComponent: i,
1158
1256
  hideNestedPaddingInDesginerView: l,
1159
- onAcceptMovedChildElement: c,
1160
- resolveComponentContext: m,
1161
- triggerBelongedComponentToMoveWhenMoved: s,
1162
- triggerBelongedComponentToDeleteWhenDeleted: i,
1163
- getPropsConfig: a
1257
+ onAcceptMovedChildElement: p,
1258
+ resolveComponentContext: f,
1259
+ triggerBelongedComponentToMoveWhenMoved: m,
1260
+ triggerBelongedComponentToDeleteWhenDeleted: a,
1261
+ getPropsConfig: n
1164
1262
  };
1165
1263
  }
1166
- function ze(n, t) {
1264
+ function Oe(o, t) {
1167
1265
  const {
1168
1266
  canAccepts: e,
1169
- checkCanDeleteComponent: o,
1170
- checkCanMoveComponent: r,
1267
+ checkCanDeleteComponent: r,
1268
+ checkCanMoveComponent: i,
1171
1269
  hideNestedPaddingInDesginerView: l,
1172
- onAcceptMovedChildElement: c,
1173
- resolveComponentContext: m,
1174
- triggerBelongedComponentToMoveWhenMoved: s,
1175
- triggerBelongedComponentToDeleteWhenDeleted: i
1176
- } = re(n), p = n.schema;
1177
- function a(f, u) {
1178
- return new Oe(f, t).getPropertyConfig(p, u);
1270
+ onAcceptMovedChildElement: p,
1271
+ resolveComponentContext: f,
1272
+ triggerBelongedComponentToMoveWhenMoved: m,
1273
+ triggerBelongedComponentToDeleteWhenDeleted: a
1274
+ } = ne(o), d = o.schema;
1275
+ function n(c, s) {
1276
+ return new We(c, t).getPropertyConfig(d, s);
1179
1277
  }
1180
1278
  return {
1181
1279
  canAccepts: e,
1182
- checkCanDeleteComponent: o,
1183
- checkCanMoveComponent: r,
1280
+ checkCanDeleteComponent: r,
1281
+ checkCanMoveComponent: i,
1184
1282
  hideNestedPaddingInDesginerView: l,
1185
- onAcceptMovedChildElement: c,
1186
- resolveComponentContext: m,
1187
- triggerBelongedComponentToMoveWhenMoved: s,
1188
- triggerBelongedComponentToDeleteWhenDeleted: i,
1189
- getPropsConfig: a
1283
+ onAcceptMovedChildElement: p,
1284
+ resolveComponentContext: f,
1285
+ triggerBelongedComponentToMoveWhenMoved: m,
1286
+ triggerBelongedComponentToDeleteWhenDeleted: a,
1287
+ getPropsConfig: n
1190
1288
  };
1191
1289
  }
1192
- const We = /* @__PURE__ */ U({
1290
+ const qe = /* @__PURE__ */ L({
1193
1291
  name: "FCheckboxGroupDesign",
1194
- props: W,
1292
+ props: j,
1195
1293
  emits: ["changeValue", "update:modelValue"],
1196
- setup(n, t) {
1197
- const e = h(n.modelValue), o = h(n.horizontal), r = h(n.tabIndex), l = h(n.name), c = j(() => ({
1198
- "farris-checkradio-hor": o.value
1294
+ setup(o, t) {
1295
+ const e = k(o.modelValue), r = k(o.horizontal), i = k(o.tabIndex), l = k(o.name), p = x(() => ({
1296
+ "farris-checkradio-hor": r.value
1199
1297
  })), {
1200
- enumData: m,
1201
- onClickCheckbox: s,
1202
- getValue: i,
1203
- getText: p,
1204
- checked: a
1205
- } = ne(n, t, e), f = h(), u = A("designer-host-service"), d = A("design-item-context"), v = qe(d, u), k = oe(f, d, v);
1206
- return O(() => {
1207
- f.value.componentInstance = k;
1208
- }), t.expose(k.value), L(() => n.modelValue, (C) => {
1209
- e.value = C, t.emit("changeValue", e.value);
1210
- }), () => b("div", {
1211
- ref: f,
1212
- class: ["farris-input-wrap", c.value]
1213
- }, [m.value.map((C, w) => {
1214
- const B = "checkbox_" + l.value + w;
1215
- return b("div", {
1298
+ enumData: f,
1299
+ onClickCheckbox: m,
1300
+ getValue: a,
1301
+ getText: d,
1302
+ checked: n
1303
+ } = ee(o, t, e), c = k(), s = P("designer-host-service"), u = P("design-item-context"), y = je(u, s), b = te(c, u, y);
1304
+ return G(() => {
1305
+ c.value.componentInstance = b;
1306
+ }), t.expose(b.value), I(() => o.modelValue, (g) => {
1307
+ e.value = g, t.emit("changeValue", e.value);
1308
+ }), () => S("div", {
1309
+ ref: c,
1310
+ class: ["farris-input-wrap", p.value]
1311
+ }, [f.value.map((g, M) => {
1312
+ const F = "checkbox_" + l.value + M;
1313
+ return S("div", {
1216
1314
  class: "custom-control custom-checkbox"
1217
- }, [b("input", {
1315
+ }, [S("input", {
1218
1316
  type: "checkbox",
1219
1317
  class: "custom-control-input",
1220
1318
  name: l.value,
1221
- id: B,
1222
- value: i(C),
1223
- checked: a(C),
1224
- disabled: n.disabled,
1225
- tabindex: r.value,
1226
- onClick: (F) => s(C, F)
1227
- }, null), b("label", {
1319
+ id: F,
1320
+ value: a(g),
1321
+ checked: n(g),
1322
+ disabled: o.disabled,
1323
+ tabindex: i.value,
1324
+ onClick: (T) => m(g, T)
1325
+ }, null), S("label", {
1228
1326
  class: "custom-control-label",
1229
- for: B,
1230
- title: p(C)
1231
- }, [p(C)])]);
1327
+ for: F,
1328
+ title: d(g)
1329
+ }, [d(g)])]);
1232
1330
  })]);
1233
1331
  }
1234
- }), Xe = /* @__PURE__ */ U({
1332
+ }), ze = /* @__PURE__ */ L({
1235
1333
  name: "FCheckBoxDesign",
1236
- props: z,
1334
+ props: W,
1237
1335
  emits: [],
1238
- setup(n, t) {
1239
- const e = h(), o = h(n.id), r = h(n.indeterminate), l = A("designer-host-service"), c = A("design-item-context"), m = ze(c, l), s = oe(e, c, m);
1240
- return O(() => {
1241
- e.value.componentInstance = s;
1242
- }), L(() => n.indeterminate, (i) => {
1243
- r.value = i;
1244
- }), t.expose(s.value), () => b("div", {
1336
+ setup(o, t) {
1337
+ const e = k(), r = k(o.id), i = k(o.indeterminate), l = P("designer-host-service"), p = P("design-item-context"), f = Oe(p, l), m = te(e, p, f);
1338
+ return G(() => {
1339
+ e.value.componentInstance = m;
1340
+ }), I(() => o.indeterminate, (a) => {
1341
+ i.value = a;
1342
+ }), t.expose(m.value), () => S("div", {
1245
1343
  ref: e,
1246
- dragref: `${c.schema.id}-container`,
1344
+ dragref: `${p.schema.id}-container`,
1247
1345
  class: "drag-container custom-control custom-checkbox"
1248
- }, [b("input", {
1346
+ }, [S("input", {
1249
1347
  type: "checkbox",
1250
1348
  class: "custom-control-input",
1251
- id: o,
1252
- value: n.value,
1253
- checked: n.modelValue,
1254
- disabled: n.disabled
1255
- }, null), b("div", {
1349
+ id: r,
1350
+ value: o.value,
1351
+ checked: o.modelValue,
1352
+ disabled: o.disabled
1353
+ }, null), S("div", {
1256
1354
  class: "custom-control-label"
1257
1355
  }, null)]);
1258
1356
  }
1259
1357
  });
1260
- E.install = (n) => {
1261
- n.component(E.name, E), n.component(I.name, I);
1358
+ V.install = (o) => {
1359
+ o.component(V.name, V), o.component($.name, $);
1262
1360
  };
1263
- E.register = (n, t, e, o) => {
1264
- n["check-box"] = I, t["check-box"] = ee, n["check-group"] = E, t["check-group"] = te;
1361
+ V.register = (o, t, e, r) => {
1362
+ o["check-box"] = $, t["check-box"] = K, o["check-group"] = V, t["check-group"] = R;
1265
1363
  };
1266
- E.registerDesigner = (n, t, e) => {
1267
- n["check-box"] = Xe, t["check-box"] = ee, n["check-group"] = We, t["check-group"] = te;
1364
+ V.registerDesigner = (o, t, e) => {
1365
+ o["check-box"] = ze, t["check-box"] = K, o["check-group"] = qe, t["check-group"] = R;
1268
1366
  };
1269
1367
  export {
1270
- I as FCheckBox,
1271
- E as FCheckBoxGroup,
1272
- te as checkBoxGroupPropsResolver,
1273
- z as checkBoxProps,
1274
- ee as checkBoxPropsResolver,
1275
- W as checkboxGroupProps,
1276
- E as default
1368
+ $ as FCheckBox,
1369
+ V as FCheckBoxGroup,
1370
+ R as checkBoxGroupPropsResolver,
1371
+ W as checkBoxProps,
1372
+ K as checkBoxPropsResolver,
1373
+ j as checkboxGroupProps,
1374
+ V as default
1277
1375
  };