@farris/ui-vue 1.3.5 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/components/accordion/index.esm.js +16 -16
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +65 -65
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.esm.js +13 -13
  6. package/components/button-edit/index.umd.cjs +1 -1
  7. package/components/calendar/index.esm.js +504 -490
  8. package/components/calendar/index.umd.cjs +1 -1
  9. package/components/capsule/index.esm.js +247 -233
  10. package/components/capsule/index.umd.cjs +1 -1
  11. package/components/checkbox/index.esm.js +356 -344
  12. package/components/checkbox/index.umd.cjs +1 -1
  13. package/components/color-picker/index.esm.js +159 -145
  14. package/components/color-picker/index.umd.cjs +2 -2
  15. package/components/combo-list/index.esm.js +127 -128
  16. package/components/combo-list/index.umd.cjs +1 -1
  17. package/components/combo-tree/index.esm.js +15 -15
  18. package/components/combo-tree/index.umd.cjs +1 -1
  19. package/components/component/index.esm.js +101 -87
  20. package/components/component/index.umd.cjs +1 -1
  21. package/components/condition/index.esm.js +7 -5
  22. package/components/condition/index.umd.cjs +1 -1
  23. package/components/content-container/index.esm.js +181 -167
  24. package/components/content-container/index.umd.cjs +1 -1
  25. package/components/data-grid/index.esm.js +4057 -4304
  26. package/components/data-grid/index.umd.cjs +1 -1
  27. package/components/data-view/index.esm.js +2450 -2467
  28. package/components/data-view/index.umd.cjs +1 -1
  29. package/components/date-picker/index.esm.js +789 -777
  30. package/components/date-picker/index.umd.cjs +1 -1
  31. package/components/designer-canvas/index.esm.js +3593 -3585
  32. package/components/designer-canvas/index.umd.cjs +1 -1
  33. package/components/dropdown/index.esm.js +257 -243
  34. package/components/dropdown/index.umd.cjs +2 -2
  35. package/components/dynamic-form/index.esm.js +322 -306
  36. package/components/dynamic-form/index.umd.cjs +1 -1
  37. package/components/dynamic-resolver/index.esm.js +177 -163
  38. package/components/dynamic-resolver/index.umd.cjs +1 -1
  39. package/components/event-parameter/index.esm.js +163 -2643
  40. package/components/event-parameter/index.umd.cjs +1 -1
  41. package/components/events-editor/index.esm.js +500 -486
  42. package/components/events-editor/index.umd.cjs +1 -1
  43. package/components/expression-editor/index.esm.js +37 -37
  44. package/components/expression-editor/index.umd.cjs +1 -1
  45. package/components/external-container/index.esm.js +485 -470
  46. package/components/external-container/index.umd.cjs +1 -1
  47. package/components/field-selector/index.esm.js +2611 -2623
  48. package/components/field-selector/index.umd.cjs +1 -1
  49. package/components/filter-bar/index.esm.js +3825 -3837
  50. package/components/filter-bar/index.umd.cjs +1 -1
  51. package/components/flow-canvas/index.esm.js +3720 -3712
  52. package/components/flow-canvas/index.umd.cjs +1 -1
  53. package/components/image-cropper/index.esm.js +402 -388
  54. package/components/image-cropper/index.umd.cjs +1 -1
  55. package/components/input-group/index.esm.js +201 -202
  56. package/components/input-group/index.umd.cjs +1 -1
  57. package/components/layout/index.esm.js +264 -245
  58. package/components/layout/index.umd.cjs +1 -1
  59. package/components/list-nav/index.esm.js +157 -143
  60. package/components/list-nav/index.umd.cjs +1 -1
  61. package/components/list-view/index.esm.js +312 -296
  62. package/components/list-view/index.umd.cjs +1 -1
  63. package/components/lookup/index.esm.js +4748 -4992
  64. package/components/lookup/index.umd.cjs +1 -1
  65. package/components/mapping-editor/index.esm.js +4215 -4462
  66. package/components/mapping-editor/index.umd.cjs +1 -1
  67. package/components/nav/index.esm.js +169 -155
  68. package/components/nav/index.umd.cjs +2 -2
  69. package/components/number-range/index.esm.js +150 -137
  70. package/components/number-range/index.umd.cjs +1 -1
  71. package/components/number-spinner/index.esm.js +207 -194
  72. package/components/number-spinner/index.umd.cjs +1 -1
  73. package/components/order/index.esm.js +427 -414
  74. package/components/order/index.umd.cjs +1 -1
  75. package/components/page-footer/index.esm.js +22 -22
  76. package/components/page-footer/index.umd.cjs +1 -1
  77. package/components/page-header/index.esm.js +510 -492
  78. package/components/page-header/index.umd.cjs +1 -1
  79. package/components/pagination/index.esm.js +192 -178
  80. package/components/pagination/index.umd.cjs +1 -1
  81. package/components/progress/index.esm.js +234 -220
  82. package/components/progress/index.umd.cjs +3 -3
  83. package/components/property-editor/index.esm.js +288 -277
  84. package/components/property-editor/index.umd.cjs +2 -2
  85. package/components/property-panel/index.esm.js +62 -61
  86. package/components/property-panel/index.umd.cjs +1 -1
  87. package/components/query-solution/index.esm.js +3015 -3027
  88. package/components/query-solution/index.umd.cjs +5 -5
  89. package/components/radio-button/index.esm.js +64 -64
  90. package/components/radio-button/index.umd.cjs +1 -1
  91. package/components/radio-group/index.esm.js +293 -280
  92. package/components/radio-group/index.umd.cjs +1 -1
  93. package/components/rate/index.esm.js +222 -208
  94. package/components/rate/index.umd.cjs +1 -1
  95. package/components/response-layout/index.esm.js +187 -173
  96. package/components/response-layout/index.umd.cjs +1 -1
  97. package/components/response-layout-editor/index.esm.js +554 -542
  98. package/components/response-layout-editor/index.umd.cjs +1 -1
  99. package/components/response-toolbar/index.esm.js +483 -469
  100. package/components/response-toolbar/index.umd.cjs +1 -1
  101. package/components/schema-selector/index.esm.js +632 -617
  102. package/components/schema-selector/index.umd.cjs +2 -2
  103. package/components/search-box/index.esm.js +228 -214
  104. package/components/search-box/index.umd.cjs +1 -1
  105. package/components/section/index.esm.js +419 -406
  106. package/components/section/index.umd.cjs +1 -1
  107. package/components/smoke-detector/index.esm.js +162 -148
  108. package/components/smoke-detector/index.umd.cjs +1 -1
  109. package/components/splitter/index.esm.js +308 -284
  110. package/components/splitter/index.umd.cjs +1 -1
  111. package/components/step/index.esm.js +279 -265
  112. package/components/step/index.umd.cjs +1 -1
  113. package/components/switch/index.esm.js +183 -170
  114. package/components/switch/index.umd.cjs +1 -1
  115. package/components/tabs/index.esm.js +307 -294
  116. package/components/tabs/index.umd.cjs +1 -1
  117. package/components/tags/index.esm.js +320 -306
  118. package/components/tags/index.umd.cjs +1 -1
  119. package/components/text/index.esm.js +245 -231
  120. package/components/text/index.umd.cjs +1 -1
  121. package/components/textarea/index.esm.js +260 -247
  122. package/components/textarea/index.umd.cjs +1 -1
  123. package/components/time-picker/index.esm.js +409 -396
  124. package/components/time-picker/index.umd.cjs +1 -1
  125. package/components/transfer/index.esm.js +424 -410
  126. package/components/transfer/index.umd.cjs +1 -1
  127. package/components/tree-grid/index.esm.js +2994 -3006
  128. package/components/tree-grid/index.umd.cjs +1 -1
  129. package/components/tree-view/index.esm.js +749 -733
  130. package/components/tree-view/index.umd.cjs +1 -1
  131. package/components/uploader/index.esm.js +325 -311
  132. package/components/uploader/index.umd.cjs +2 -2
  133. package/components/verify-detail/index.esm.js +304 -290
  134. package/components/verify-detail/index.umd.cjs +1 -1
  135. package/components/video/index.esm.js +99 -85
  136. package/components/video/index.umd.cjs +1 -1
  137. package/components/weather/index.esm.js +947 -933
  138. package/components/weather/index.umd.cjs +4 -4
  139. package/farris.all.esm.js +7750 -7990
  140. package/farris.all.umd.cjs +12 -12
  141. package/package.json +1 -1
  142. package/types/data-view/composition/types.d.ts +0 -1
  143. package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
  144. package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
  145. package/components/event-parameter/index.css +0 -1
  146. package/types/data-grid/src/components/data/data-grid-area.component.d.ts +0 -8
  147. package/types/data-grid/src/components/data/data-grid-area.props.d.ts +0 -3
@@ -1,8 +1,8 @@
1
1
  var Ie = Object.defineProperty;
2
- var Se = (s, e, n) => e in s ? Ie(s, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : s[e] = n;
3
- var D = (s, e, n) => Se(s, typeof e != "symbol" ? e + "" : e, n);
4
- import { computed as V, getCurrentInstance as ae, createVNode as y, ref as M, defineComponent as Y, onMounted as H, onUnmounted as de, watch as Q, inject as L, createTextVNode as ue, provide as De, onBeforeUnmount as Me, withModifiers as Ee } from "vue";
5
- import { isPlainObject as ie, cloneDeep as pe } from "lodash-es";
2
+ var Se = (o, e, n) => e in o ? Ie(o, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : o[e] = n;
3
+ var D = (o, e, n) => Se(o, typeof e != "symbol" ? e + "" : e, n);
4
+ import { computed as V, getCurrentInstance as de, createVNode as y, ref as M, defineComponent as Y, onMounted as H, onUnmounted as ue, watch as Q, inject as L, createTextVNode as pe, provide as De, onBeforeUnmount as Me, withModifiers as Ee } from "vue";
5
+ import { isPlainObject as ce, cloneDeep as ee } from "lodash-es";
6
6
  import { getCustomClass as J, withInstall as Re } from "../common/index.esm.js";
7
7
  import { useDesignerInnerComponent as fe } from "../designer-canvas/index.esm.js";
8
8
  class ge {
@@ -73,11 +73,11 @@ class ke extends ge {
73
73
  }
74
74
  }
75
75
  function me() {
76
- function s(e) {
76
+ function o(e) {
77
77
  const n = [];
78
- return e.reduce((i, d) => (d.children && d.children.length > 0 ? i.push(new z(d)) : i.push(new ke(d)), i), n), n;
78
+ return e.reduce((i, a) => (a.children && a.children.length > 0 ? i.push(new z(a)) : i.push(new ke(a)), i), n), n;
79
79
  }
80
- return { buildResponseToolbarItems: s };
80
+ return { buildResponseToolbarItems: o };
81
81
  }
82
82
  const { buildResponseToolbarItems: Pe } = me();
83
83
  class z extends ge {
@@ -94,12 +94,12 @@ class z extends ge {
94
94
  D(this, "children", []);
95
95
  D(this, "expanded", !1);
96
96
  const i = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
97
- Object.keys(n).filter((d) => i.indexOf(d) > -1).forEach((d) => {
98
- this[d] = n[d];
97
+ Object.keys(n).filter((a) => i.indexOf(a) > -1).forEach((a) => {
98
+ this[a] = n[a];
99
99
  }), n.children && n.children.length && (this.children = Pe(n.children));
100
100
  }
101
101
  }
102
- class Dt {
102
+ class Mt {
103
103
  constructor(e, n) {
104
104
  D(this, "id");
105
105
  D(this, "name");
@@ -145,101 +145,115 @@ class Dt {
145
145
  }
146
146
  }
147
147
  const he = {}, be = {};
148
- function ee(s) {
149
- const { properties: e, title: n, ignore: i } = s, d = i && Array.isArray(i), m = Object.keys(e).reduce((p, T) => ((!d || !i.find((x) => x === T)) && (p[T] = e[T].type === "object" && e[T].properties ? ee(e[T]) : pe(e[T].default)), p), {});
150
- if (n && (!d || !i.find((p) => p === "id"))) {
148
+ function te(o) {
149
+ const { properties: e, title: n, ignore: i } = o, a = i && Array.isArray(i), f = Object.keys(e).reduce((p, T) => ((!a || !i.find((x) => x === T)) && (p[T] = e[T].type === "object" && e[T].properties ? te(e[T]) : ee(e[T].default)), p), {});
150
+ if (n && (!a || !i.find((p) => p === "id"))) {
151
151
  const p = n.toLowerCase().replace(/-/g, "_");
152
- m.id = `${p}_${Math.random().toString().slice(2, 6)}`;
152
+ f.id = `${p}_${Math.random().toString().slice(2, 6)}`;
153
153
  }
154
- return m;
154
+ return f;
155
155
  }
156
- function Z(s, e = {}, n) {
157
- const i = he[s];
156
+ function Be(o) {
157
+ const { properties: e, title: n, required: i } = o;
158
+ if (i && Array.isArray(i)) {
159
+ const a = i.reduce((f, p) => (f[p] = e[p].type === "object" && e[p].properties ? te(e[p]) : ee(e[p].default), f), {});
160
+ if (n && i.find((f) => f === "id")) {
161
+ const f = n.toLowerCase().replace(/-/g, "_");
162
+ a.id = `${f}_${Math.random().toString().slice(2, 6)}`;
163
+ }
164
+ return a;
165
+ }
166
+ return {
167
+ type: n
168
+ };
169
+ }
170
+ function Z(o, e = {}, n) {
171
+ const i = he[o];
158
172
  if (i) {
159
- let d = ee(i);
160
- const m = be[s];
161
- return d = m ? m({ getSchemaByType: Z }, d, e, n) : d, d;
173
+ let a = Be(i);
174
+ const f = be[o];
175
+ return a = f ? f({ getSchemaByType: Z }, a, e, n) : a, a;
162
176
  }
163
177
  return null;
164
178
  }
165
- function Be(s, e) {
166
- const n = ee(e);
167
- return Object.keys(n).reduce((i, d) => (i[d] && ie(i[d]) && ie(s[d] || !s[d]) ? Object.assign(i[d], s[d] || {}) : i[d] = s[d], i), n), n;
179
+ function Ae(o, e) {
180
+ const n = te(e);
181
+ return Object.keys(n).reduce((i, a) => (Object.prototype.hasOwnProperty.call(o, a) && (i[a] && ce(i[a]) && ce(o[a] || !o[a]) ? Object.assign(i[a], o[a] || {}) : i[a] = o[a]), i), n), n;
168
182
  }
169
- function Ae(s, e) {
170
- return Object.keys(s).filter((i) => s[i] != null).reduce((i, d) => {
171
- if (e.has(d)) {
172
- const m = e.get(d);
173
- if (typeof m == "string")
174
- i[m] = s[d];
183
+ function Oe(o, e) {
184
+ return Object.keys(o).filter((i) => o[i] != null).reduce((i, a) => {
185
+ if (e.has(a)) {
186
+ const f = e.get(a);
187
+ if (typeof f == "string")
188
+ i[f] = o[a];
175
189
  else {
176
- const p = m(d, s[d], s);
190
+ const p = f(a, o[a], o);
177
191
  Object.assign(i, p);
178
192
  }
179
193
  } else
180
- i[d] = s[d];
194
+ i[a] = o[a];
181
195
  return i;
182
196
  }, {});
183
197
  }
184
- function Oe(s, e, n = /* @__PURE__ */ new Map()) {
185
- const i = Be(s, e);
186
- return Ae(i, n);
198
+ function _e(o, e, n = /* @__PURE__ */ new Map()) {
199
+ const i = Ae(o, e);
200
+ return Oe(i, n);
187
201
  }
188
- function _e(s = {}) {
189
- function e(f, g, l, c) {
202
+ function je(o = {}) {
203
+ function e(g, m, l, c) {
190
204
  if (typeof l == "number")
191
- return c[f].length === l;
205
+ return c[g].length === l;
192
206
  if (typeof l == "object") {
193
207
  const u = Object.keys(l)[0], b = l[u];
194
208
  if (u === "not")
195
- return Number(c[f].length) !== Number(b);
209
+ return Number(c[g].length) !== Number(b);
196
210
  if (u === "moreThan")
197
- return Number(c[f].length) >= Number(b);
211
+ return Number(c[g].length) >= Number(b);
198
212
  if (u === "lessThan")
199
- return Number(c[f].length) <= Number(b);
213
+ return Number(c[g].length) <= Number(b);
200
214
  }
201
215
  return !1;
202
216
  }
203
- function n(f, g, l, c) {
204
- return c[f] && c[f].propertyValue && String(c[f].propertyValue.value) === String(l);
217
+ function n(g, m, l, c) {
218
+ return c[g] && c[g].propertyValue && String(c[g].propertyValue.value) === String(l);
205
219
  }
206
220
  const i = /* @__PURE__ */ new Map([
207
221
  ["length", e],
208
222
  ["getProperty", n]
209
223
  ]);
210
- Object.keys(s).reduce((f, g) => (f.set(g, s[g]), f), i);
211
- function d(f, g) {
212
- const l = f;
213
- return typeof g == "number" ? [{ target: l, operator: "length", param: null, value: Number(g) }] : typeof g == "boolean" ? [{ target: l, operator: "getProperty", param: f, value: !!g }] : typeof g == "object" ? Object.keys(g).map((c) => {
224
+ Object.keys(o).reduce((g, m) => (g.set(m, o[m]), g), i);
225
+ function a(g, m) {
226
+ const l = g;
227
+ return typeof m == "number" ? [{ target: l, operator: "length", param: null, value: Number(m) }] : typeof m == "boolean" ? [{ target: l, operator: "getProperty", param: g, value: !!m }] : typeof m == "object" ? Object.keys(m).map((c) => {
214
228
  if (c === "length")
215
- return { target: l, operator: "length", param: null, value: g[c] };
216
- const u = c, b = g[c];
229
+ return { target: l, operator: "length", param: null, value: m[c] };
230
+ const u = c, b = m[c];
217
231
  return { target: l, operator: "getProperty", param: u, value: b };
218
232
  }) : [];
219
233
  }
220
- function m(f) {
221
- return Object.keys(f).reduce((l, c) => {
222
- const u = d(c, f[c]);
234
+ function f(g) {
235
+ return Object.keys(g).reduce((l, c) => {
236
+ const u = a(c, g[c]);
223
237
  return l.push(...u), l;
224
238
  }, []);
225
239
  }
226
- function p(f, g) {
227
- if (i.has(f.operator)) {
228
- const l = i.get(f.operator);
229
- return l && l(f.target, f.param, f.value, g) || !1;
240
+ function p(g, m) {
241
+ if (i.has(g.operator)) {
242
+ const l = i.get(g.operator);
243
+ return l && l(g.target, g.param, g.value, m) || !1;
230
244
  }
231
245
  return !1;
232
246
  }
233
- function T(f, g) {
234
- return m(f).reduce((u, b) => u && p(b, g), !0);
247
+ function T(g, m) {
248
+ return f(g).reduce((u, b) => u && p(b, m), !0);
235
249
  }
236
- function x(f, g) {
237
- const l = Object.keys(f), c = l.includes("allOf"), u = l.includes("anyOf"), b = c || u, O = (b ? f[b ? c ? "allOf" : "anyOf" : "allOf"] : [f]).map((j) => T(j, g));
250
+ function x(g, m) {
251
+ const l = Object.keys(g), c = l.includes("allOf"), u = l.includes("anyOf"), b = c || u, O = (b ? g[b ? c ? "allOf" : "anyOf" : "allOf"] : [g]).map((j) => T(j, m));
238
252
  return c ? !O.includes(!1) : O.includes(!0);
239
253
  }
240
254
  return { parseValueSchema: x };
241
255
  }
242
- const te = {
256
+ const ne = {
243
257
  button: { type: "button", name: "按钮", icon: "Button" },
244
258
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
245
259
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -279,31 +293,31 @@ const te = {
279
293
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
280
294
  fieldset: { type: "fieldset", name: "分组", icon: "fieldset" },
281
295
  "query-solution": { type: "query-solution", name: "筛选方案", icon: "QueryScheme" }
282
- }, je = {}, $e = {};
283
- _e();
284
- function ye(s, e, n = /* @__PURE__ */ new Map(), i = (p, T, x, f) => T, d = {}, m = (p) => p) {
285
- return he[e.title] = e, be[e.title] = i, je[e.title] = d, $e[e.title] = m, (p = {}) => {
286
- const T = Oe(p, e, n), x = Object.keys(s).reduce((f, g) => (f[g] = s[g].default, f), {});
296
+ }, $e = {}, Fe = {};
297
+ je();
298
+ function ye(o, e, n = /* @__PURE__ */ new Map(), i = (p, T, x, g) => T, a = {}, f = (p) => p) {
299
+ return he[e.title] = e, be[e.title] = i, $e[e.title] = a, Fe[e.title] = f, (p = {}) => {
300
+ const T = _e(p, e, n), x = Object.keys(o).reduce((g, m) => (g[m] = o[m].default, g), {});
287
301
  return Object.assign(x, T);
288
302
  };
289
303
  }
290
- function Fe(s, e) {
304
+ function Ne(o, e) {
291
305
  return { customClass: e.class, customStyle: e.style };
292
306
  }
293
- const Ne = /* @__PURE__ */ new Map([
307
+ const Le = /* @__PURE__ */ new Map([
294
308
  ["buttons", "items"],
295
- ["appearance", Fe]
309
+ ["appearance", Ne]
296
310
  ]);
297
- function Le(s, e) {
311
+ function Ve(o, e) {
298
312
  return { class: e.class, style: e.style };
299
313
  }
300
- const Ve = /* @__PURE__ */ new Map([
301
- ["appearance", Le]
314
+ const Ue = /* @__PURE__ */ new Map([
315
+ ["appearance", Ve]
302
316
  ]);
303
- function ve(s, e, n) {
317
+ function ve(o, e, n) {
304
318
  return e;
305
319
  }
306
- const Ue = "https://json-schema.org/draft/2020-12/schema", We = "https://farris-design.gitee.io/response-toolbar.schema.json", qe = "response-toolbar", ze = "A Farris Toolbar Component", Ge = "object", He = {
320
+ const We = "https://json-schema.org/draft/2020-12/schema", qe = "https://farris-design.gitee.io/response-toolbar.schema.json", ze = "response-toolbar", Ge = "A Farris Toolbar Component", He = "object", Qe = {
307
321
  id: {
308
322
  description: "The unique identifier for a Response Toolbar",
309
323
  type: "string"
@@ -333,19 +347,19 @@ const Ue = "https://json-schema.org/draft/2020-12/schema", We = "https://farris-
333
347
  type: "array",
334
348
  default: []
335
349
  }
336
- }, Qe = [
350
+ }, Je = [
337
351
  "id",
338
352
  "type",
339
353
  "buttons"
340
- ], Je = {
341
- $schema: Ue,
342
- $id: We,
343
- title: qe,
344
- description: ze,
345
- type: Ge,
346
- properties: He,
347
- required: Qe
348
- }, Xe = "https://json-schema.org/draft/2020-12/schema", Ye = "https://farris-design.gitee.io/response-toolbar-item.schema.json", Ze = "response-toolbar-item", Ke = "A Farris Toolbar Item Component", et = "object", tt = {
354
+ ], Xe = {
355
+ $schema: We,
356
+ $id: qe,
357
+ title: ze,
358
+ description: Ge,
359
+ type: He,
360
+ properties: Qe,
361
+ required: Je
362
+ }, Ye = "https://json-schema.org/draft/2020-12/schema", Ze = "https://farris-design.gitee.io/response-toolbar-item.schema.json", Ke = "response-toolbar-item", et = "A Farris Toolbar Item Component", tt = "object", nt = {
349
363
  id: {
350
364
  description: "The unique identifier for a Response Toolbar",
351
365
  type: "string"
@@ -390,19 +404,19 @@ const Ue = "https://json-schema.org/draft/2020-12/schema", We = "https://farris-
390
404
  type: "string",
391
405
  default: ""
392
406
  }
393
- }, nt = [
407
+ }, ot = [
394
408
  "id",
395
409
  "type",
396
410
  "text"
397
- ], ot = {
398
- $schema: Xe,
399
- $id: Ye,
400
- title: Ze,
401
- description: Ke,
402
- type: et,
403
- properties: tt,
404
- required: nt
405
- }, ne = {
411
+ ], st = {
412
+ $schema: Ye,
413
+ $id: Ze,
414
+ title: Ke,
415
+ description: et,
416
+ type: tt,
417
+ properties: nt,
418
+ required: ot
419
+ }, oe = {
406
420
  /** 组件自定义样式 */
407
421
  customClass: { type: String, default: "" },
408
422
  alignment: { Type: String, default: "right" },
@@ -410,12 +424,12 @@ const Ue = "https://json-schema.org/draft/2020-12/schema", We = "https://farris-
410
424
  Type: Array,
411
425
  default: []
412
426
  }
413
- }, st = Object.assign({}, ne, {
427
+ }, rt = Object.assign({}, oe, {
414
428
  componentId: { type: String, default: "" }
415
- }), oe = ye(
416
- ne,
417
- Je,
418
- Ne,
429
+ }), se = ye(
430
+ oe,
431
+ Xe,
432
+ Le,
419
433
  ve
420
434
  ), Ce = {
421
435
  id: { type: String, default: "" },
@@ -426,29 +440,29 @@ const Ue = "https://json-schema.org/draft/2020-12/schema", We = "https://farris-
426
440
  icon: { type: String, default: "" },
427
441
  componentId: { type: String, default: "" },
428
442
  alignment: { Type: String, default: "right" }
429
- }, rt = ye(
443
+ }, it = ye(
430
444
  Ce,
431
- ot,
432
- Ve,
445
+ st,
446
+ Ue,
433
447
  ve
434
448
  );
435
449
  function we() {
436
- function s(n) {
450
+ function o(n) {
437
451
  const i = {
438
452
  "f-icon": !0
439
453
  };
440
454
  if (n.icon) {
441
- const d = n.icon.trim().split(" ");
442
- d && d.length && d.reduce((m, p) => (m[p] = !0, m), i);
455
+ const a = n.icon.trim().split(" ");
456
+ a && a.length && a.reduce((f, p) => (f[p] = !0, f), i);
443
457
  }
444
458
  return i;
445
459
  }
446
460
  function e(n) {
447
461
  return !!(n.icon && n.icon.trim());
448
462
  }
449
- return { iconClass: s, shouldShowIcon: e };
463
+ return { iconClass: o, shouldShowIcon: e };
450
464
  }
451
- function it(s) {
465
+ function ct(o) {
452
466
  function e(l) {
453
467
  const c = {
454
468
  "dropdown-menu": !0
@@ -475,14 +489,14 @@ function it(s) {
475
489
  }, u = l.class.split(" ");
476
490
  return u && u.length && u.reduce((b, I) => (b[I] = !0, b), c), c;
477
491
  }
478
- let d;
479
- const m = /* @__PURE__ */ new Map();
492
+ let a;
493
+ const f = /* @__PURE__ */ new Map();
480
494
  function p(l, c, u) {
481
495
  var I;
482
496
  ((I = l.target) == null ? void 0 : I.id) === c.id && l.stopPropagation();
483
497
  const b = u ? u.id : "__top_item__";
484
- if (c.children && c.children.length && (c.expanded = !c.expanded, c.expanded ? m.set(b, c) : m.delete(b)), m.has(b) && m.get(b) !== c) {
485
- const B = m.get(b);
498
+ if (c.children && c.children.length && (c.expanded = !c.expanded, c.expanded ? f.set(b, c) : f.delete(b)), f.has(b) && f.get(b) !== c) {
499
+ const B = f.get(b);
486
500
  B && (B.expanded = !1);
487
501
  }
488
502
  }
@@ -501,16 +515,16 @@ function it(s) {
501
515
  }, [c.text, y("i", {
502
516
  class: "f-icon f-icon-arrow-chevron-right",
503
517
  style: "display: inline-block;float: right;line-height: 1.25rem;"
504
- }, null)]), d(c, c)]) : y("li", {
518
+ }, null)]), a(c, c)]) : y("li", {
505
519
  class: i(c),
506
520
  id: c.id,
507
521
  onClick: (u) => T(u, c),
508
522
  onMouseover: (u) => c.enable && p(u, c, l)
509
- }, [s.shouldShowIcon(c) && y("i", {
510
- class: s.iconClass(c)
523
+ }, [o.shouldShowIcon(c) && y("i", {
524
+ class: o.iconClass(c)
511
525
  }, null), c.text]));
512
526
  }
513
- function f(l, c, u) {
527
+ function g(l, c, u) {
514
528
  const b = {
515
529
  display: l.expanded ? "block" : "none",
516
530
  position: "fixed",
@@ -533,103 +547,103 @@ function it(s) {
533
547
  const h = P.getBoundingClientRect();
534
548
  if (u) {
535
549
  b.top = `${F - 6}px`;
536
- const o = Math.ceil(j + A);
537
- b.left = `${o}px`;
550
+ const s = Math.ceil(j + A);
551
+ b.left = `${s}px`;
538
552
  }
539
553
  I - A - j < h.width && (b.left = `${(u ? A : k) - h.width}px`);
540
554
  }
541
555
  }
542
556
  return b;
543
557
  }
544
- d = function(l, c) {
558
+ a = function(l, c) {
545
559
  var B, O;
546
- const u = ae(), b = c ? c.id : l.id, I = (O = (B = u == null ? void 0 : u.exposed) == null ? void 0 : B.elementRef.value) == null ? void 0 : O.querySelector("#" + b);
560
+ const u = de(), b = c ? c.id : l.id, I = (O = (B = u == null ? void 0 : u.exposed) == null ? void 0 : B.elementRef.value) == null ? void 0 : O.querySelector("#" + b);
547
561
  return y("ul", {
548
562
  class: e(l),
549
- style: f(l, I, c),
563
+ style: g(l, I, c),
550
564
  id: l.id + "_menu"
551
565
  }, [x(l)]);
552
566
  };
553
- function g() {
554
- m.forEach((l) => {
567
+ function m() {
568
+ f.forEach((l) => {
555
569
  l.expanded = !1;
556
- }), m.clear();
570
+ }), f.clear();
557
571
  }
558
572
  return {
559
- renderDropdownMenu: d,
560
- clearAllDropDownMenu: g
573
+ renderDropdownMenu: a,
574
+ clearAllDropDownMenu: m
561
575
  };
562
576
  }
563
- function ct(s, e) {
564
- const n = M(s.alignment), {
577
+ function lt(o, e) {
578
+ const n = M(o.alignment), {
565
579
  renderDropdownMenu: i,
566
- clearAllDropDownMenu: d
567
- } = it(e);
568
- function m(g) {
580
+ clearAllDropDownMenu: a
581
+ } = ct(e);
582
+ function f(m) {
569
583
  const l = {
570
584
  "btn-group": !0,
571
585
  "f-rt-dropdown": !0,
572
586
  "f-btn-ml": n.value === "right",
573
587
  "f-btn-mr": n.value === "left"
574
- }, c = g.dropdownClass.split(" ");
588
+ }, c = m.dropdownClass.split(" ");
575
589
  return c && c.length && c.reduce((u, b) => (u[b] = !0, u), l), l;
576
590
  }
577
- function p(g) {
591
+ function p(m) {
578
592
  const l = {
579
593
  btn: !0,
580
- disabled: !g.enable,
594
+ disabled: !m.enable,
581
595
  "f-rt-btn": !0,
582
- "btn-icontext": !!(g.icon && g.icon.trim())
596
+ "btn-icontext": !!(m.icon && m.icon.trim())
583
597
  };
584
- if (g.class) {
585
- const c = g.class.split(" ");
598
+ if (m.class) {
599
+ const c = m.class.split(" ");
586
600
  c && c.length && c.reduce((u, b) => (u[b] = !0, u), l);
587
601
  }
588
602
  return l;
589
603
  }
590
- function T(g, l) {
591
- g.stopPropagation();
604
+ function T(m, l) {
605
+ m.stopPropagation();
592
606
  const c = l.expanded;
593
607
  document.body.click(), l.expanded = !c;
594
608
  }
595
- function x(g) {
609
+ function x(m) {
596
610
  return y("div", {
597
- id: g.id,
598
- class: m(g)
611
+ id: m.id,
612
+ class: f(m)
599
613
  }, [y("div", {
600
- class: p(g),
614
+ class: p(m),
601
615
  style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
602
- onClick: (l) => g.enable && T(l, g)
603
- }, [e.shouldShowIcon(g) && y("i", {
604
- class: e.iconClass(g)
605
- }, null), y("span", null, [g.text]), y("i", {
616
+ onClick: (l) => m.enable && T(l, m)
617
+ }, [e.shouldShowIcon(m) && y("i", {
618
+ class: e.iconClass(m)
619
+ }, null), y("span", null, [m.text]), y("i", {
606
620
  class: "f-icon f-icon-arrow-chevron-down",
607
621
  style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
608
- }, null)]), i(g)]);
622
+ }, null)]), i(m)]);
609
623
  }
610
- function f() {
611
- d();
624
+ function g() {
625
+ a();
612
626
  }
613
627
  return {
614
628
  renderToolbarDropdown: x,
615
- clearAllDropDown: f
629
+ clearAllDropDown: g
616
630
  };
617
631
  }
618
632
  const {
619
- buildResponseToolbarItems: ce
633
+ buildResponseToolbarItems: le
620
634
  } = me(), X = /* @__PURE__ */ Y({
621
635
  name: "FResponseToolbar",
622
- props: ne,
636
+ props: oe,
623
637
  emits: ["click"],
624
- setup(s, e) {
625
- const n = M(ce(s.items)), i = M(), d = M(), m = M(), p = M(s.alignment), T = {
638
+ setup(o, e) {
639
+ const n = M(le(o.items)), i = M(), a = M(), f = M(), p = M(o.alignment), T = {
626
640
  id: "__more_buttons__",
627
641
  text: "更多"
628
- }, x = M(new z(T)), f = we(), g = V(() => x.value.children.length > 0), l = V(() => J({
642
+ }, x = M(new z(T)), g = we(), m = V(() => x.value.children.length > 0), l = V(() => J({
629
643
  "f-toolbar": !0,
630
644
  "f-response-toolbar": !0,
631
645
  "position-relative": !0
632
- }, s.customClass)), c = V(() => ({
646
+ }, o.customClass)), c = V(() => ({
633
647
  "w-100": !0,
634
648
  "d-flex": !0,
635
649
  "flex-nowrap": !0,
@@ -638,7 +652,7 @@ const {
638
652
  })), {
639
653
  renderToolbarDropdown: u,
640
654
  clearAllDropDown: b
641
- } = ct(s, f);
655
+ } = lt(o, g);
642
656
  function I() {
643
657
  n.value.filter((v) => v.children && v.children.length > 0).forEach((v) => {
644
658
  v.expanded = !1;
@@ -654,7 +668,7 @@ const {
654
668
  };
655
669
  if (v.class) {
656
670
  const P = v.class.split(" ");
657
- P && P.length && P.reduce((h, o) => (h[o] = !0, h), E);
671
+ P && P.length && P.reduce((h, s) => (h[s] = !0, h), E);
658
672
  }
659
673
  return E;
660
674
  }
@@ -668,17 +682,17 @@ const {
668
682
  id: v.id,
669
683
  disabled: !v.enable,
670
684
  onClick: (E) => O(E, v)
671
- }, [f.shouldShowIcon(v) && y("i", {
672
- class: f.iconClass(v)
685
+ }, [g.shouldShowIcon(v) && y("i", {
686
+ class: g.iconClass(v)
673
687
  }, null), v.text]);
674
688
  }
675
689
  const j = /* @__PURE__ */ new Map(), A = [];
676
690
  function k(v) {
677
- const E = m.value;
691
+ const E = f.value;
678
692
  let P = v;
679
- const h = Array.from(E.children), o = h[h.length - 1].id === "__more_buttons__" ? h[h.length - 1] : null;
680
- if (o) {
681
- const C = o.computedStyleMap().get("margin-left"), S = o.computedStyleMap().get("margin-right"), $ = (C ? C.value : 0) + o.getBoundingClientRect().width + (S ? S.value : 0);
693
+ const h = Array.from(E.children), s = h[h.length - 1].id === "__more_buttons__" ? h[h.length - 1] : null;
694
+ if (s) {
695
+ const C = s.computedStyleMap().get("margin-left"), S = s.computedStyleMap().get("margin-right"), $ = (C ? C.value : 0) + s.getBoundingClientRect().width + (S ? S.value : 0);
682
696
  P -= $;
683
697
  }
684
698
  const t = h.filter((C) => C.id !== "__more_buttons__");
@@ -699,22 +713,22 @@ const {
699
713
  }
700
714
  const r = Object.assign({}, x.value);
701
715
  r.children = [];
702
- const a = new z(r), w = n.value.reduce((C, S) => (j.has(S.id) && a.children.push(S), S.visible = !j.has(S.id), C.push(S), C), []);
703
- x.value = a, n.value = w;
716
+ const d = new z(r), w = n.value.reduce((C, S) => (j.has(S.id) && d.children.push(S), S.visible = !j.has(S.id), C.push(S), C), []);
717
+ x.value = d, n.value = w;
704
718
  }
705
719
  const R = new ResizeObserver((v) => {
706
720
  if (v.length) {
707
- const P = v[0].contentRect.width, o = m.value.getBoundingClientRect().width;
708
- (P < o || A.length) && (k(P), I());
721
+ const P = v[0].contentRect.width, s = f.value.getBoundingClientRect().width;
722
+ (P < s || A.length) && (k(P), I());
709
723
  }
710
724
  });
711
725
  return H(() => {
712
- const v = d.value;
726
+ const v = a.value;
713
727
  R.observe(v), document.body.addEventListener("click", I), document.body.addEventListener("wheel", I);
714
- }), de(() => {
728
+ }), ue(() => {
715
729
  R.disconnect(), document.body.removeEventListener("click", I), document.body.removeEventListener("wheel", I);
716
- }), Q(() => s.items, () => {
717
- n.value = ce(s.items);
730
+ }), Q(() => o.items, () => {
731
+ n.value = le(o.items);
718
732
  }, {
719
733
  deep: !0
720
734
  }), e.expose({
@@ -723,72 +737,72 @@ const {
723
737
  class: l.value,
724
738
  ref: i
725
739
  }, [y("div", {
726
- ref: d,
740
+ ref: a,
727
741
  class: c.value
728
742
  }, [y("div", {
729
- ref: m,
743
+ ref: f,
730
744
  class: "d-inline-block f-response-content",
731
745
  style: "white-space: nowrap;"
732
- }, [n.value.filter((v) => v.visible).map((v) => v.children && v.children.length > 0 ? u(v) : F(v)), g.value && u(x.value)])])]);
746
+ }, [n.value.filter((v) => v.visible).map((v) => v.children && v.children.length > 0 ? u(v) : F(v)), m.value && u(x.value)])])]);
733
747
  }
734
748
  });
735
- function lt(s, e) {
749
+ function at(o, e) {
736
750
  const n = L("design-item-context"), i = L("toolbar-item-handler", () => {
737
751
  });
738
- function d() {
752
+ function a() {
739
753
  i && i();
740
754
  }
741
- function m(o) {
755
+ function f(s) {
742
756
  const t = {
743
757
  "dropdown-menu": !0
744
758
  };
745
- if (o.class) {
746
- const r = o.menuClass.split(" ");
747
- r && r.length && r.reduce((a, w) => (a[w] = !0, a), t);
759
+ if (s.class) {
760
+ const r = s.menuClass.split(" ");
761
+ r && r.length && r.reduce((d, w) => (d[w] = !0, d), t);
748
762
  }
749
763
  return t;
750
764
  }
751
- function p(o) {
765
+ function p(s) {
752
766
  const t = {
753
- disabled: !o.enable,
767
+ disabled: !s.enable,
754
768
  "dropdown-submenu": !0,
755
769
  "f-rt-dropdown": !0
756
- }, r = o.dropdownClass.split(" ");
757
- return r && r.length && r.reduce((a, w) => (a[w] = !0, a), t), t;
770
+ }, r = s.dropdownClass.split(" ");
771
+ return r && r.length && r.reduce((d, w) => (d[w] = !0, d), t), t;
758
772
  }
759
- function T(o) {
773
+ function T(s) {
760
774
  const t = {
761
- disabled: !o.enable,
775
+ disabled: !s.enable,
762
776
  "dropdown-item": !0,
763
777
  "f-rt-btn": !0,
764
778
  "position-relative": !0,
765
779
  "farris-component": !0
766
- }, r = o.class.split(" ");
767
- return r && r.length && r.reduce((a, w) => (a[w] = !0, a), t), t;
780
+ }, r = s.class.split(" ");
781
+ return r && r.length && r.reduce((d, w) => (d[w] = !0, d), t), t;
768
782
  }
769
783
  let x;
770
- const f = /* @__PURE__ */ new Map();
771
- function g(o, t, r) {
784
+ const g = /* @__PURE__ */ new Map();
785
+ function m(s, t, r) {
772
786
  var w;
773
- ((w = o.target) == null ? void 0 : w.id) === t.id && o.stopPropagation();
774
- const a = r ? r.id : "__top_item__";
775
- if (t.children && t.children.length && (t.expanded = !t.expanded, t.expanded ? f.set(a, t) : f.delete(a)), f.has(a) && f.get(a) !== t) {
776
- const C = f.get(a);
787
+ ((w = s.target) == null ? void 0 : w.id) === t.id && s.stopPropagation();
788
+ const d = r ? r.id : "__top_item__";
789
+ if (t.children && t.children.length && (t.expanded = !t.expanded, t.expanded ? g.set(d, t) : g.delete(d)), g.has(d) && g.get(d) !== t) {
790
+ const C = g.get(d);
777
791
  C && (C.expanded = !1);
778
792
  }
779
793
  }
780
- function l(o) {
781
- o && (o.stopPropagation(), o.preventDefault());
794
+ function l(s) {
795
+ s && (s.stopPropagation(), s.preventDefault());
782
796
  }
783
797
  function c() {
784
798
  Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((t) => t.classList.remove("dgComponentFocused"));
785
- const o = document.getElementsByClassName("dgComponentSelected");
786
- Array.from(o).forEach((t) => t.classList.remove("dgComponentSelected"));
799
+ const s = document.getElementsByClassName("dgComponentSelected");
800
+ Array.from(s).forEach((t) => t.classList.remove("dgComponentSelected"));
787
801
  }
788
- function u(o) {
789
- o.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
802
+ function u(s) {
803
+ s.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
790
804
  }
791
- function b(o) {
805
+ function b(s) {
792
806
  const {
793
807
  buttons: t = []
794
808
  } = n.schema;
@@ -796,49 +810,49 @@ function lt(s, e) {
796
810
  t.forEach((C) => {
797
811
  r = r.concat(C.children || []);
798
812
  });
799
- const a = r.findIndex((C) => C.id === o), w = a === -1 ? null : r[a];
813
+ const d = r.findIndex((C) => C.id === s), w = d === -1 ? null : r[d];
800
814
  return {
801
- index: a,
815
+ index: d,
802
816
  item: w
803
817
  };
804
818
  }
805
- function I(o) {
819
+ function I(s) {
806
820
  const {
807
821
  buttons: t = []
808
- } = n.schema, r = t.findIndex((w) => w.id === o), a = r === -1 ? null : t[r];
822
+ } = n.schema, r = t.findIndex((w) => w.id === s), d = r === -1 ? null : t[r];
809
823
  return {
810
824
  index: r,
811
- item: a
825
+ item: d
812
826
  };
813
827
  }
814
- function B(o) {
815
- var a;
828
+ function B(s) {
829
+ var d;
816
830
  n.schema;
817
831
  const {
818
832
  index: t,
819
833
  item: r
820
- } = b(o);
821
- (a = n == null ? void 0 : n.setupContext) == null || a.emit("selectionChange", r == null ? void 0 : r.type, r);
834
+ } = b(s);
835
+ (d = n == null ? void 0 : n.setupContext) == null || d.emit("selectionChange", r == null ? void 0 : r.type, r);
822
836
  }
823
- const O = function(o) {
837
+ const O = function(s) {
824
838
  const {
825
839
  componentType: t
826
- } = o, r = Z(t, o), a = t.toLowerCase().replace("-", "_");
827
- return r && !r.id && r.type === t && (r.id = `${a}_${Math.random().toString().slice(2, 6)}`), r;
840
+ } = s, r = Z(t, s), d = t.toLowerCase().replace("-", "_");
841
+ return r && !r.id && r.type === t && (r.id = `${d}_${Math.random().toString().slice(2, 6)}`), r;
828
842
  }, F = function() {
829
- const o = {
843
+ const s = {
830
844
  componentType: "response-toolbar-item",
831
845
  parentComponentInstance: e.value,
832
846
  targetPosition: -1
833
847
  };
834
- return O(o);
848
+ return O(s);
835
849
  };
836
- function j(o, t) {
837
- l(o), c(), u(o), B(t.id);
850
+ function j(s, t) {
851
+ l(s), c(), u(s), B(t.id);
838
852
  }
839
- function A(o, t, r) {
840
- l(o);
841
- const a = t.id, w = r && r.id, {
853
+ function A(s, t, r) {
854
+ l(s);
855
+ const d = t.id, w = r && r.id, {
842
856
  buttons: C = []
843
857
  } = n.schema;
844
858
  if (!w)
@@ -850,44 +864,44 @@ function lt(s, e) {
850
864
  return;
851
865
  const {
852
866
  index: $
853
- } = b(a);
854
- $ !== -1 && (C[S].children.splice($, 1), d());
867
+ } = b(d);
868
+ $ !== -1 && (C[S].children.splice($, 1), a());
855
869
  }
856
- function k(o, t, r) {
857
- l(o);
858
- const a = r && r.id, {
870
+ function k(s, t, r) {
871
+ l(s);
872
+ const d = r && r.id, {
859
873
  buttons: w = []
860
874
  } = n.schema;
861
- if (!a)
875
+ if (!d)
862
876
  return;
863
877
  const {
864
878
  index: C
865
- } = I(a);
879
+ } = I(d);
866
880
  if (C === -1)
867
881
  return;
868
882
  const S = F(), $ = Object.assign({}, S, {
869
883
  text: t.text
870
884
  });
871
- w[C].children.push($), d();
885
+ w[C].children.push($), a();
872
886
  }
873
- function R(o, t, r) {
874
- l(o);
875
- const a = r && r.id, {
887
+ function R(s, t, r) {
888
+ l(s);
889
+ const d = r && r.id, {
876
890
  buttons: w = []
877
891
  } = n.schema;
878
- if (!a)
892
+ if (!d)
879
893
  return;
880
894
  const {
881
895
  index: C
882
- } = I(a);
896
+ } = I(d);
883
897
  if (C === -1)
884
898
  return;
885
899
  const S = F(), $ = Object.assign({}, S, {
886
900
  text: "按钮"
887
901
  });
888
- w[C].children.push($), d();
902
+ w[C].children.push($), a();
889
903
  }
890
- function v(o, t) {
904
+ function v(s, t) {
891
905
  return y("div", {
892
906
  class: "component-btn-group"
893
907
  }, [y("div", null, [y("div", {
@@ -896,7 +910,7 @@ function lt(s, e) {
896
910
  title: "删除",
897
911
  ref: "removeButton",
898
912
  style: "position:static;",
899
- onClick: (r) => A(r, o, t)
913
+ onClick: (r) => A(r, s, t)
900
914
  }, [y("i", {
901
915
  class: "f-icon f-icon-yxs_delete"
902
916
  }, null)]), y("div", {
@@ -905,7 +919,7 @@ function lt(s, e) {
905
919
  title: "复制",
906
920
  ref: "copyButton",
907
921
  style: "position:static;",
908
- onClick: (r) => k(r, o, t)
922
+ onClick: (r) => k(r, s, t)
909
923
  }, [y("i", {
910
924
  class: "f-icon f-icon-yxs_copy"
911
925
  }, null)]), y("div", {
@@ -914,22 +928,22 @@ function lt(s, e) {
914
928
  title: "新增同级",
915
929
  ref: "appendSame",
916
930
  style: "width:85px!important;padding:0 5px;position:static;",
917
- onClick: (r) => R(r, o, t)
931
+ onClick: (r) => R(r, s, t)
918
932
  }, [y("i", {
919
933
  class: "f-icon f-icon-plus-circle text-white mr-1"
920
934
  }, null), y("span", {
921
935
  style: "font-size:13px;margin:auto"
922
- }, [ue("新增同级")])])])]);
936
+ }, [pe("新增同级")])])])]);
923
937
  }
924
- function E(o) {
925
- return o.children.map((t) => t.children && t.children.length ? y("li", {
938
+ function E(s) {
939
+ return s.children.map((t) => t.children && t.children.length ? y("li", {
926
940
  class: p(t),
927
941
  id: t.id,
928
- onClick: (r) => t.enable && g(r, t, o)
942
+ onClick: (r) => t.enable && m(r, t, s)
929
943
  }, [y("span", {
930
944
  id: t.id,
931
945
  class: T(t),
932
- onMouseover: (r) => t.enable && g(r, t, o)
946
+ onMouseover: (r) => t.enable && m(r, t, s)
933
947
  }, [t.text, y("i", {
934
948
  class: "f-icon f-icon-arrow-chevron-right",
935
949
  style: "display: inline-block;float: right;line-height: 1.25rem;"
@@ -937,13 +951,13 @@ function lt(s, e) {
937
951
  class: T(t),
938
952
  id: t.id,
939
953
  onClick: (r) => j(r, t)
940
- }, [v(t, o), s.shouldShowIcon(t) && y("i", {
941
- class: s.iconClass(t)
954
+ }, [v(t, s), o.shouldShowIcon(t) && y("i", {
955
+ class: o.iconClass(t)
942
956
  }, null), t.text]));
943
957
  }
944
- function P(o, t, r) {
945
- const a = {
946
- display: o.expanded ? "block" : "none",
958
+ function P(s, t, r) {
959
+ const d = {
960
+ display: s.expanded ? "block" : "none",
947
961
  position: "fixed",
948
962
  maxWidth: "300px",
949
963
  width: "auto",
@@ -957,60 +971,60 @@ function lt(s, e) {
957
971
  right: _,
958
972
  height: N
959
973
  } = S[0], q = Math.ceil(N + $);
960
- a.top = `${q}px`, a.left = `${W}px`;
961
- const G = o.id + "_menu", K = t ? t.querySelector("#" + G) : null;
974
+ d.top = `${q}px`, d.left = `${W}px`;
975
+ const G = s.id + "_menu", K = t ? t.querySelector("#" + G) : null;
962
976
  if (K) {
963
- a.display === "block" && (K.style.display = "block");
964
- const re = K.getBoundingClientRect();
977
+ d.display === "block" && (K.style.display = "block");
978
+ const ie = K.getBoundingClientRect();
965
979
  if (r) {
966
- a.top = `${$ - 6}px`;
980
+ d.top = `${$ - 6}px`;
967
981
  const Te = Math.ceil(U + W);
968
- a.left = `${Te}px`;
982
+ d.left = `${Te}px`;
969
983
  }
970
- w - W - U < re.width && (a.left = `${(r ? W : _) - re.width}px`);
984
+ w - W - U < ie.width && (d.left = `${(r ? W : _) - ie.width}px`);
971
985
  }
972
986
  }
973
- return a;
987
+ return d;
974
988
  }
975
- x = function(o, t) {
989
+ x = function(s, t) {
976
990
  var C, S;
977
- const r = ae(), a = t ? t.id : o.id, w = (S = (C = r == null ? void 0 : r.exposed) == null ? void 0 : C.elementRef.value) == null ? void 0 : S.querySelector("#" + a);
991
+ const r = de(), d = t ? t.id : s.id, w = (S = (C = r == null ? void 0 : r.exposed) == null ? void 0 : C.elementRef.value) == null ? void 0 : S.querySelector("#" + d);
978
992
  return y("ul", {
979
- class: m(o),
980
- style: P(o, w, t),
981
- id: o.id + "_menu"
982
- }, [E(o)]);
993
+ class: f(s),
994
+ style: P(s, w, t),
995
+ id: s.id + "_menu"
996
+ }, [E(s)]);
983
997
  };
984
998
  function h() {
985
- f.forEach((o) => {
986
- o.expanded = !1;
987
- }), f.clear();
999
+ g.forEach((s) => {
1000
+ s.expanded = !1;
1001
+ }), g.clear();
988
1002
  }
989
1003
  return {
990
1004
  renderDropdownMenu: x,
991
1005
  clearAllDropDownMenu: h
992
1006
  };
993
1007
  }
994
- function at(s, e, n) {
995
- const i = M(s.alignment), {
996
- renderDropdownMenu: d,
997
- clearAllDropDownMenu: m
998
- } = lt(e, n), p = L("design-item-context"), T = L("toolbar-item-handler", () => {
1008
+ function dt(o, e, n) {
1009
+ const i = M(o.alignment), {
1010
+ renderDropdownMenu: a,
1011
+ clearAllDropDownMenu: f
1012
+ } = at(e, n), p = L("design-item-context"), T = L("toolbar-item-handler", () => {
999
1013
  });
1000
1014
  function x() {
1001
1015
  T && T();
1002
1016
  }
1003
- function f(h) {
1004
- const o = {
1017
+ function g(h) {
1018
+ const s = {
1005
1019
  "btn-group": !0,
1006
1020
  "f-rt-dropdown": !0,
1007
1021
  "f-btn-ml": i.value === "right",
1008
1022
  "f-btn-mr": i.value === "left"
1009
1023
  }, t = h.dropdownClass.split(" ");
1010
- return t && t.length && t.reduce((r, a) => (r[a] = !0, r), o), o;
1024
+ return t && t.length && t.reduce((r, d) => (r[d] = !0, r), s), s;
1011
1025
  }
1012
- function g(h) {
1013
- const o = {
1026
+ function m(h) {
1027
+ const s = {
1014
1028
  btn: !0,
1015
1029
  disabled: !h.enable,
1016
1030
  "position-relative": !0,
@@ -1020,23 +1034,23 @@ function at(s, e, n) {
1020
1034
  };
1021
1035
  if (h.class) {
1022
1036
  const t = h.class.split(" ");
1023
- t && t.length && t.reduce((r, a) => (r[a] = !0, r), o);
1037
+ t && t.length && t.reduce((r, d) => (r[d] = !0, r), s);
1024
1038
  }
1025
- return o;
1039
+ return s;
1026
1040
  }
1027
1041
  function l(h) {
1028
1042
  h && (h.stopPropagation(), h.preventDefault());
1029
1043
  }
1030
- function c(h, o) {
1044
+ function c(h, s) {
1031
1045
  l(h);
1032
- const t = o.expanded;
1033
- document.body.click(), o.expanded = !t;
1046
+ const t = s.expanded;
1047
+ document.body.click(), s.expanded = !t;
1034
1048
  }
1035
1049
  const u = function(h) {
1036
1050
  const {
1037
- componentType: o
1038
- } = h, t = Z(o, h), r = o.toLowerCase().replace("-", "_");
1039
- return t && !t.id && t.type === o && (t.id = `${r}_${Math.random().toString().slice(2, 6)}`), t;
1051
+ componentType: s
1052
+ } = h, t = Z(s, h), r = s.toLowerCase().replace("-", "_");
1053
+ return t && !t.id && t.type === s && (t.id = `${r}_${Math.random().toString().slice(2, 6)}`), t;
1040
1054
  }, b = function() {
1041
1055
  const h = {
1042
1056
  componentType: "response-toolbar-item",
@@ -1046,39 +1060,39 @@ function at(s, e, n) {
1046
1060
  return u(h);
1047
1061
  };
1048
1062
  function I(h) {
1049
- const o = p.schema.buttons || p.schema.contents, t = o == null ? void 0 : o.findIndex((a) => a.id === h), r = t === -1 ? null : o[t];
1063
+ const s = p.schema.buttons || p.schema.contents, t = s == null ? void 0 : s.findIndex((d) => d.id === h), r = t === -1 ? null : s[t];
1050
1064
  return {
1051
1065
  index: t,
1052
1066
  toolbarItem: r
1053
1067
  };
1054
1068
  }
1055
- function B(h, o) {
1069
+ function B(h, s) {
1056
1070
  var S;
1057
1071
  const {
1058
1072
  index: t,
1059
1073
  toolbarItem: r
1060
- } = I(o);
1074
+ } = I(s);
1061
1075
  if (t === -1)
1062
1076
  return;
1063
- const a = r.text || "按钮", w = b(), C = Object.assign({}, w, {
1064
- text: a
1077
+ const d = r.text || "按钮", w = b(), C = Object.assign({}, w, {
1078
+ text: d
1065
1079
  });
1066
1080
  (S = p.schema.buttons) == null || S.push(C), x();
1067
1081
  }
1068
- function O(h, o) {
1082
+ function O(h, s) {
1069
1083
  const {
1070
1084
  index: t,
1071
1085
  toolbarItem: r
1072
- } = I(o);
1086
+ } = I(s);
1073
1087
  if (t === -1)
1074
1088
  return;
1075
- const a = r.text || "按钮", w = b(), C = Object.assign({}, w, {
1076
- text: a
1089
+ const d = r.text || "按钮", w = b(), C = Object.assign({}, w, {
1090
+ text: d
1077
1091
  }), S = p.schema.buttons[t].children || [];
1078
1092
  S.push(C), p.schema.buttons[t].children = S, x();
1079
1093
  }
1080
- function F(h, o) {
1081
- const t = p.schema.buttons || p.schema.contents, r = t == null ? void 0 : t.findIndex((a) => a.id === o);
1094
+ function F(h, s) {
1095
+ const t = p.schema.buttons || p.schema.contents, r = t == null ? void 0 : t.findIndex((d) => d.id === s);
1082
1096
  r !== -1 && (t.splice(r, 1), x());
1083
1097
  }
1084
1098
  function j(h) {
@@ -1090,7 +1104,7 @@ function at(s, e, n) {
1090
1104
  title: "删除",
1091
1105
  ref: "removeButton",
1092
1106
  style: "position:static;",
1093
- onClick: (o) => F(o, h)
1107
+ onClick: (s) => F(s, h)
1094
1108
  }, [y("i", {
1095
1109
  class: "f-icon f-icon-yxs_delete"
1096
1110
  }, null)]), y("div", {
@@ -1099,7 +1113,7 @@ function at(s, e, n) {
1099
1113
  title: "复制",
1100
1114
  ref: "copyButton",
1101
1115
  style: "position:static;",
1102
- onClick: (o) => B(o, h)
1116
+ onClick: (s) => B(s, h)
1103
1117
  }, [y("i", {
1104
1118
  class: "f-icon f-icon-yxs_copy"
1105
1119
  }, null)]), y("div", {
@@ -1108,56 +1122,56 @@ function at(s, e, n) {
1108
1122
  title: "新增子级",
1109
1123
  ref: "appendChildButton",
1110
1124
  style: "width:85px!important;padding:0 5px;position:static;",
1111
- onClick: (o) => O(o, h)
1125
+ onClick: (s) => O(s, h)
1112
1126
  }, [y("i", {
1113
1127
  class: "f-icon f-icon-plus-circle text-white mr-1"
1114
1128
  }, null), y("span", {
1115
1129
  style: "font-size:13px;margin:auto"
1116
- }, [ue("新增子级")])])])]);
1130
+ }, [pe("新增子级")])])])]);
1117
1131
  }
1118
1132
  function A() {
1119
- Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
1133
+ Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((s) => s.classList.remove("dgComponentFocused"));
1120
1134
  const h = document.getElementsByClassName("dgComponentSelected");
1121
- Array.from(h).forEach((o) => o.classList.remove("dgComponentSelected"));
1135
+ Array.from(h).forEach((s) => s.classList.remove("dgComponentSelected"));
1122
1136
  }
1123
1137
  function k(h) {
1124
1138
  h.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
1125
1139
  }
1126
1140
  function R(h) {
1127
- var a;
1128
- const o = p.schema.buttons || p.schema.contents, t = o == null ? void 0 : o.findIndex((w) => w.id === h);
1141
+ var d;
1142
+ const s = p.schema.buttons || p.schema.contents, t = s == null ? void 0 : s.findIndex((w) => w.id === h);
1129
1143
  if (t === -1)
1130
1144
  return;
1131
- const r = o[t];
1132
- (a = p == null ? void 0 : p.setupContext) == null || a.emit("selectionChange", "response-toolbar-item", r);
1145
+ const r = s[t];
1146
+ (d = p == null ? void 0 : p.setupContext) == null || d.emit("selectionChange", "response-toolbar-item", r);
1133
1147
  }
1134
- function v(h, o) {
1135
- l(h), A(), k(h), l(h), c(h, o), R(o.id);
1148
+ function v(h, s) {
1149
+ l(h), A(), k(h), l(h), c(h, s), R(s.id);
1136
1150
  }
1137
1151
  function E(h) {
1138
1152
  return y("div", {
1139
1153
  id: h.id,
1140
- class: f(h)
1154
+ class: g(h)
1141
1155
  }, [y("div", {
1142
- class: g(h),
1156
+ class: m(h),
1143
1157
  style: "display: flex;padding-right: 0.1rem;",
1144
- onClick: (o) => h.enable && v(o, h)
1158
+ onClick: (s) => h.enable && v(s, h)
1145
1159
  }, [j(h.id), e.shouldShowIcon(h) && y("i", {
1146
1160
  class: e.iconClass(h)
1147
1161
  }, null), y("span", null, [h.text]), y("i", {
1148
1162
  class: "f-icon f-icon-arrow-chevron-down",
1149
1163
  style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
1150
- }, null)]), d(h)]);
1164
+ }, null)]), a(h)]);
1151
1165
  }
1152
1166
  function P() {
1153
- m();
1167
+ f();
1154
1168
  }
1155
1169
  return {
1156
1170
  renderToolbarDropdown: E,
1157
1171
  clearAllDropDown: P
1158
1172
  };
1159
1173
  }
1160
- class se {
1174
+ class re {
1161
1175
  constructor(e, n) {
1162
1176
  D(this, "componentId");
1163
1177
  D(this, "viewModelId");
@@ -1186,8 +1200,8 @@ class se {
1186
1200
  const n = e.binding && e.binding.type === "Form" && e.binding.field;
1187
1201
  if (n) {
1188
1202
  if (!this.designViewModelField) {
1189
- const d = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1190
- this.designViewModelField = d.fields.find((m) => m.id === n);
1203
+ const a = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1204
+ this.designViewModelField = a.fields.find((f) => f.id === n);
1191
1205
  }
1192
1206
  e.updateOn = (i = this.designViewModelField) == null ? void 0 : i.updateOn;
1193
1207
  }
@@ -1213,7 +1227,7 @@ class se {
1213
1227
  type: "combo-list",
1214
1228
  textField: "name",
1215
1229
  valueField: "value",
1216
- data: [{ value: e.type, name: te[e.type].name }]
1230
+ data: [{ value: e.type, name: ne[e.type].name }]
1217
1231
  }
1218
1232
  }
1219
1233
  }
@@ -1249,11 +1263,11 @@ class se {
1249
1263
  const i = n && n.parent && n.parent.schema;
1250
1264
  if (!i)
1251
1265
  return;
1252
- const d = i.contents.findIndex((p) => p.id === e), m = pe(i.contents[d]);
1253
- i.contents.splice(d, 1), i.contents.splice(d, 0, m);
1266
+ const a = i.contents.findIndex((p) => p.id === e), f = ee(i.contents[a]);
1267
+ i.contents.splice(a, 1), i.contents.splice(a, 0, f);
1254
1268
  }
1255
1269
  }
1256
- class dt extends se {
1270
+ class ut extends re {
1257
1271
  constructor(e, n) {
1258
1272
  super(e, n);
1259
1273
  }
@@ -1293,7 +1307,7 @@ class dt extends se {
1293
1307
  type: "combo-list",
1294
1308
  textField: "value",
1295
1309
  valueField: "key",
1296
- data: [{ key: "response-toolbar", value: te["response-toolbar"].name }]
1310
+ data: [{ key: "response-toolbar", value: ne["response-toolbar"].name }]
1297
1311
  }
1298
1312
  }
1299
1313
  }
@@ -1336,15 +1350,15 @@ class dt extends se {
1336
1350
  };
1337
1351
  }
1338
1352
  }
1339
- function ut(s, e) {
1340
- const n = s.schema;
1341
- function i(g) {
1353
+ function pt(o, e) {
1354
+ const n = o.schema;
1355
+ function i(m) {
1342
1356
  return !1;
1343
1357
  }
1344
- function d(g, l) {
1345
- return l.text = g.label, l;
1358
+ function a(m, l) {
1359
+ return l.text = m.label, l;
1346
1360
  }
1347
- function m() {
1361
+ function f() {
1348
1362
  return !1;
1349
1363
  }
1350
1364
  function p() {
@@ -1356,20 +1370,20 @@ function ut(s, e) {
1356
1370
  function x() {
1357
1371
  return !0;
1358
1372
  }
1359
- function f(g) {
1360
- return new dt(g, e).getPropertyConfig(n);
1373
+ function g(m) {
1374
+ return new ut(m, e).getPropertyConfig(n);
1361
1375
  }
1362
1376
  return {
1363
1377
  canAccepts: i,
1364
1378
  checkCanAddComponent: T,
1365
1379
  checkCanDeleteComponent: p,
1366
- checkCanMoveComponent: m,
1380
+ checkCanMoveComponent: f,
1367
1381
  hideNestedPaddingInDesginerView: x,
1368
- onResolveNewComponentSchema: d,
1369
- getPropsConfig: f
1382
+ onResolveNewComponentSchema: a,
1383
+ getPropsConfig: g
1370
1384
  };
1371
1385
  }
1372
- const pt = {
1386
+ const ft = {
1373
1387
  id: { type: String, default: "" },
1374
1388
  componentId: { type: String, default: "" },
1375
1389
  canAdd: { type: Boolean, default: !1 },
@@ -1382,38 +1396,38 @@ const pt = {
1382
1396
  * 组件值
1383
1397
  */
1384
1398
  modelValue: { type: Object }
1385
- }, le = M(0);
1386
- function ft(s, e) {
1387
- const n = e.getBoundingClientRect(), i = s.getBoundingClientRect(), d = i.top >= n.top, m = i.top <= n.bottom;
1388
- return d && m;
1399
+ }, ae = M(0);
1400
+ function gt(o, e) {
1401
+ const n = e.getBoundingClientRect(), i = o.getBoundingClientRect(), a = i.top >= n.top, f = i.top <= n.bottom;
1402
+ return a && f;
1389
1403
  }
1390
- function gt(s) {
1391
- if (!s)
1404
+ function mt(o) {
1405
+ if (!o)
1392
1406
  return;
1393
1407
  let e;
1394
- if (s.className.includes("dgComponentSelected") ? e = s : e = s.querySelector(".dgComponentSelected"), !e)
1408
+ if (o.className.includes("dgComponentSelected") ? e = o : e = o.querySelector(".dgComponentSelected"), !e)
1395
1409
  return;
1396
1410
  const n = e.getBoundingClientRect();
1397
1411
  if (n.width === 0 && n.height === 0)
1398
1412
  return;
1399
1413
  const i = e.querySelector(".component-btn-group");
1400
1414
  if (i) {
1401
- if (!ft(e, s)) {
1415
+ if (!gt(e, o)) {
1402
1416
  i.style.display = "none";
1403
1417
  return;
1404
1418
  }
1405
1419
  i.style.display = "";
1406
- const m = i.getBoundingClientRect(), p = i.querySelector("div");
1420
+ const f = i.getBoundingClientRect(), p = i.querySelector("div");
1407
1421
  if (p) {
1408
1422
  const T = p.getBoundingClientRect();
1409
- p.style.top = m.top + "px", p.style.left = m.left - T.width + "px";
1423
+ p.style.top = f.top + "px", p.style.left = f.left - T.width + "px";
1410
1424
  }
1411
1425
  }
1412
1426
  }
1413
- function mt(s, e, n) {
1427
+ function ht(o, e, n) {
1414
1428
  var A;
1415
- const i = "", d = M();
1416
- function m() {
1429
+ const i = "", a = M();
1430
+ function f() {
1417
1431
  return !0;
1418
1432
  }
1419
1433
  function p() {
@@ -1425,13 +1439,13 @@ function mt(s, e, n) {
1425
1439
  function x() {
1426
1440
  return !0;
1427
1441
  }
1428
- function f() {
1442
+ function g() {
1429
1443
  return !0;
1430
1444
  }
1431
- function g(k) {
1445
+ function m(k) {
1432
1446
  if (!k || !k.value)
1433
1447
  return null;
1434
- const R = M(k == null ? void 0 : k.value.parent), v = g(R);
1448
+ const R = M(k == null ? void 0 : k.value.parent), v = m(R);
1435
1449
  return v || null;
1436
1450
  }
1437
1451
  function l(k = e) {
@@ -1461,19 +1475,19 @@ function mt(s, e, n) {
1461
1475
  }
1462
1476
  function j() {
1463
1477
  }
1464
- return d.value = {
1465
- canMove: m(),
1478
+ return a.value = {
1479
+ canMove: f(),
1466
1480
  canSelectParent: p(),
1467
1481
  canAdd: x(),
1468
1482
  canDelete: T(),
1469
- canNested: !f(),
1483
+ canNested: !g(),
1470
1484
  contents: [],
1471
- elementRef: s,
1485
+ elementRef: o,
1472
1486
  parent: (A = e.parent) == null ? void 0 : A.componentInstance,
1473
1487
  schema: e.schema,
1474
1488
  styles: i,
1475
1489
  canAccepts: c,
1476
- getBelongedComponentInstance: g,
1490
+ getBelongedComponentInstance: m,
1477
1491
  getDraggableDesignItemElement: l,
1478
1492
  getDraggingDisplayText: u,
1479
1493
  getPropConfig: F,
@@ -1484,17 +1498,17 @@ function mt(s, e, n) {
1484
1498
  onRemoveComponent: j,
1485
1499
  triggerBelongedComponentToMoveWhenMoved: M(!1),
1486
1500
  triggerBelongedComponentToDeleteWhenDeleted: M(!1)
1487
- }, d;
1501
+ }, a;
1488
1502
  }
1489
- const ht = /* @__PURE__ */ Y({
1503
+ const bt = /* @__PURE__ */ Y({
1490
1504
  name: "FDesignerInnerItem",
1491
- props: pt,
1505
+ props: ft,
1492
1506
  emits: ["selectionChange", "addComponent", "removeComponent"],
1493
- setup(s, e) {
1494
- const n = M(s.canMove), i = M(s.canAdd), d = M(s.canDelete), m = M(!1), p = M(s.contentKey), T = M(s.childType), x = M(s.childLabel), f = M(s.modelValue), g = M(""), l = M(), c = L("canvas-dragula"), u = M(), b = L("design-item-context"), I = {
1507
+ setup(o, e) {
1508
+ const n = M(o.canMove), i = M(o.canAdd), a = M(o.canDelete), f = M(!1), p = M(o.contentKey), T = M(o.childType), x = M(o.childLabel), g = M(o.modelValue), m = M(""), l = M(), c = L("canvas-dragula"), u = M(), b = L("design-item-context"), I = {
1495
1509
  designerItemElementRef: l,
1496
1510
  componentInstance: u,
1497
- schema: f.value,
1511
+ schema: g.value,
1498
1512
  parent: b,
1499
1513
  setupContext: e
1500
1514
  };
@@ -1502,24 +1516,24 @@ const ht = /* @__PURE__ */ Y({
1502
1516
  const B = V(() => ({
1503
1517
  "farris-component": !0,
1504
1518
  // 受position-relative影响,整个容器的高度不能被撑起
1505
- "flex-fill": s.id === "root-component",
1506
- "position-relative": n.value || d.value,
1507
- "farris-nested": m.value,
1519
+ "flex-fill": o.id === "root-component",
1520
+ "position-relative": n.value || a.value,
1521
+ "farris-nested": f.value,
1508
1522
  "can-move": n.value,
1509
1523
  "d-none": l.value && l.value.classList.contains("d-none")
1510
1524
  })), O = V(() => {
1511
1525
  const t = {};
1512
- return g.value && g.value.split(";").reduce((r, a) => {
1513
- const [w, C] = a.split(":");
1526
+ return m.value && m.value.split(";").reduce((r, d) => {
1527
+ const [w, C] = d.split(":");
1514
1528
  return w && (r[w] = C), r;
1515
1529
  }, t), t;
1516
1530
  });
1517
1531
  function F(t, r) {
1518
1532
  if (b && b.schema[p.value]) {
1519
- const a = b.schema[p.value].findIndex((w) => w.id === r.id);
1520
- if (a > -1) {
1521
- const w = b.schema[p.value].length, C = b.schema[p.value][a % w];
1522
- b.designerItemElementRef.value.querySelector(`#${C.id}-design-item`), b.schema[p.value].splice(a, 1), le.value++, e.emit("removeComponent");
1533
+ const d = b.schema[p.value].findIndex((w) => w.id === r.id);
1534
+ if (d > -1) {
1535
+ const w = b.schema[p.value].length, C = b.schema[p.value][d % w];
1536
+ b.designerItemElementRef.value.querySelector(`#${C.id}-design-item`), b.schema[p.value].splice(d, 1), ae.value++, e.emit("removeComponent");
1523
1537
  }
1524
1538
  }
1525
1539
  }
@@ -1530,8 +1544,8 @@ const ht = /* @__PURE__ */ Y({
1530
1544
  label: x.value,
1531
1545
  parentComponentInstance: u.value,
1532
1546
  targetPosition: -1
1533
- }, a = u.value.addNewChildComponentSchema(r);
1534
- f.value[p.value].push(a), e.emit("addComponent");
1547
+ }, d = u.value.addNewChildComponentSchema(r);
1548
+ g.value[p.value].push(d), e.emit("addComponent");
1535
1549
  }
1536
1550
  }
1537
1551
  function A() {
@@ -1548,7 +1562,7 @@ const ht = /* @__PURE__ */ Y({
1548
1562
  }, null)]);
1549
1563
  }
1550
1564
  function k(t) {
1551
- return d.value && y("div", {
1565
+ return a.value && y("div", {
1552
1566
  role: "button",
1553
1567
  class: "btn component-settings-button",
1554
1568
  title: "删除",
@@ -1575,52 +1589,52 @@ const ht = /* @__PURE__ */ Y({
1575
1589
  "data-noattach": "true"
1576
1590
  }, [y("div", null, [A(), R(), k(t)])]);
1577
1591
  }
1578
- Q(() => s.modelValue, (t) => {
1579
- f.value = t, I.schema = t;
1592
+ Q(() => o.modelValue, (t) => {
1593
+ g.value = t, I.schema = t;
1580
1594
  });
1581
1595
  function E(t) {
1582
1596
  const r = t.target;
1583
- gt(r);
1597
+ mt(r);
1584
1598
  }
1585
1599
  function P() {
1586
1600
  var t, r;
1587
- (r = (t = f.value) == null ? void 0 : t.contents) != null && r.length && l.value && l.value.addEventListener("scroll", E);
1601
+ (r = (t = g.value) == null ? void 0 : t.contents) != null && r.length && l.value && l.value.addEventListener("scroll", E);
1588
1602
  }
1589
1603
  function h() {
1590
1604
  const t = l.value, r = M(t.children[1]);
1591
- return mt(r, I).value;
1605
+ return ht(r, I).value;
1592
1606
  }
1593
1607
  H(() => {
1594
1608
  if (l.value) {
1595
- const t = l.value.querySelector(`[data-dragref='${f.value.id}-container']`);
1596
- u.value = t && t.componentInstance ? t.componentInstance.value : h(), c && t && c.attachComponents(t, f.value), m.value = u.value.canNested !== void 0 ? u.value.canNested : m.value, i.value = u.value.canAdd !== void 0 ? u.value.canAdd : i.value, d.value = u.value.canDelete !== void 0 ? u.value.canDelete : d.value, n.value = u.value.canMove !== void 0 ? u.value.canMove : n.value, g.value = u.value.styles || "", l.value && (l.value.componentInstance = u, l.value.designItemContext = I);
1609
+ const t = l.value.querySelector(`[data-dragref='${g.value.id}-container']`);
1610
+ u.value = t && t.componentInstance ? t.componentInstance.value : h(), c && t && c.attachComponents(t, g.value), f.value = u.value.canNested !== void 0 ? u.value.canNested : f.value, i.value = u.value.canAdd !== void 0 ? u.value.canAdd : i.value, a.value = u.value.canDelete !== void 0 ? u.value.canDelete : a.value, n.value = u.value.canMove !== void 0 ? u.value.canMove : n.value, m.value = u.value.styles || "", l.value && (l.value.componentInstance = u, l.value.designItemContext = I);
1597
1611
  }
1598
- P(), le.value++;
1612
+ P(), ae.value++;
1599
1613
  }), Me(() => {
1600
1614
  l.value && l.value.removeEventListener("scroll", E);
1601
1615
  });
1602
- function o(t) {
1616
+ function s(t) {
1603
1617
  Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((w) => w.classList.remove("dgComponentFocused")), t && (t.preventDefault(), t.stopPropagation());
1604
1618
  let r = I.designerItemElementRef;
1605
- const a = l.value;
1606
- if (a) {
1619
+ const d = l.value;
1620
+ if (d) {
1607
1621
  const w = document.getElementsByClassName("dgComponentSelected");
1608
- w && w.length === 1 && w[0] === l.value || (Array.from(w).forEach((S) => S.classList.remove("dgComponentSelected")), a.classList.add("dgComponentFocused"), e.emit("selectionChange", f.value.type, f.value, s.componentId, u.value), r = u.value.getDraggableDesignItemElement(I), r && r.value && r.value.classList.add("dgComponentSelected"));
1622
+ w && w.length === 1 && w[0] === l.value || (Array.from(w).forEach((S) => S.classList.remove("dgComponentSelected")), d.classList.add("dgComponentFocused"), e.emit("selectionChange", g.value.type, g.value, o.componentId, u.value), r = u.value.getDraggableDesignItemElement(I), r && r.value && r.value.classList.add("dgComponentSelected"));
1609
1623
  }
1610
1624
  E({
1611
1625
  target: r == null ? void 0 : r.value
1612
1626
  });
1613
1627
  }
1614
1628
  return () => y("div", {
1615
- id: `${s.id}-design-item`,
1629
+ id: `${o.id}-design-item`,
1616
1630
  ref: l,
1617
1631
  class: B.value,
1618
1632
  style: O.value,
1619
- onClick: o
1620
- }, [v(f.value), e.slots.default && e.slots.default()]);
1633
+ onClick: s
1634
+ }, [v(g.value), e.slots.default && e.slots.default()]);
1621
1635
  }
1622
1636
  });
1623
- class bt extends se {
1637
+ class yt extends re {
1624
1638
  constructor(e, n) {
1625
1639
  super(e, n);
1626
1640
  }
@@ -1681,16 +1695,16 @@ class bt extends se {
1681
1695
  label: "onClick",
1682
1696
  name: "点击事件"
1683
1697
  }
1684
- ], i = this, d = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), m = {};
1685
- m[i.viewModelId] = {
1698
+ ], i = this, a = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), f = {};
1699
+ f[i.viewModelId] = {
1686
1700
  type: "events-editor",
1687
1701
  editor: {
1688
- initialData: d
1702
+ initialData: a
1689
1703
  }
1690
1704
  }, this.propertyConfig.categories.eventsEditor = {
1691
1705
  title: "事件",
1692
1706
  hideTitle: !0,
1693
- properties: m,
1707
+ properties: f,
1694
1708
  // 这个属性,标记当属性变更得时候触发重新更新属性
1695
1709
  refreshPanelAfterChanged: !0,
1696
1710
  tabId: "commands",
@@ -1702,7 +1716,7 @@ class bt extends se {
1702
1716
  };
1703
1717
  }
1704
1718
  }
1705
- class yt extends se {
1719
+ class vt extends re {
1706
1720
  constructor(e, n) {
1707
1721
  super(e, n);
1708
1722
  }
@@ -1728,7 +1742,7 @@ class yt extends se {
1728
1742
  type: "combo-list",
1729
1743
  textField: "value",
1730
1744
  valueField: "key",
1731
- data: [{ key: "response-toolbar-item", value: te["response-toolbar-item"].name }]
1745
+ data: [{ key: "response-toolbar-item", value: ne["response-toolbar-item"].name }]
1732
1746
  }
1733
1747
  },
1734
1748
  text: {
@@ -1779,16 +1793,16 @@ class yt extends se {
1779
1793
  label: "onClick",
1780
1794
  name: "点击事件"
1781
1795
  }
1782
- ], i = this, d = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), m = {};
1783
- m[i.viewModelId] = {
1796
+ ], i = this, a = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), f = {};
1797
+ f[i.viewModelId] = {
1784
1798
  type: "events-editor",
1785
1799
  editor: {
1786
- initialData: d
1800
+ initialData: a
1787
1801
  }
1788
1802
  }, this.propertyConfig.categories.eventsEditor = {
1789
1803
  title: "事件",
1790
1804
  hideTitle: !0,
1791
- properties: m,
1805
+ properties: f,
1792
1806
  // 这个属性,标记当属性变更得时候触发重新更新属性
1793
1807
  refreshPanelAfterChanged: !0,
1794
1808
  tabId: "commands",
@@ -1800,35 +1814,35 @@ class yt extends se {
1800
1814
  };
1801
1815
  }
1802
1816
  }
1803
- function vt(s, e) {
1817
+ function Ct(o, e) {
1804
1818
  function n(T) {
1805
1819
  return !1;
1806
1820
  }
1807
1821
  function i() {
1808
1822
  return !1;
1809
1823
  }
1810
- function d() {
1824
+ function a() {
1811
1825
  return !0;
1812
1826
  }
1813
- function m() {
1827
+ function f() {
1814
1828
  return !1;
1815
1829
  }
1816
1830
  function p(T) {
1817
1831
  let x;
1818
- switch (s.schema.type) {
1832
+ switch (o.schema.type) {
1819
1833
  case "tab-toolbar-item":
1820
- x = new bt(T, e);
1834
+ x = new yt(T, e);
1821
1835
  break;
1822
1836
  default:
1823
- x = new yt(T, e);
1837
+ x = new vt(T, e);
1824
1838
  }
1825
- return x.getPropertyConfig(s.schema);
1839
+ return x.getPropertyConfig(o.schema);
1826
1840
  }
1827
1841
  return {
1828
1842
  canAccepts: n,
1829
1843
  checkCanMoveComponent: i,
1830
- checkCanDeleteComponent: d,
1831
- checkCanAddComponent: m,
1844
+ checkCanDeleteComponent: a,
1845
+ checkCanAddComponent: f,
1832
1846
  getPropsConfig: p
1833
1847
  };
1834
1848
  }
@@ -1836,26 +1850,26 @@ const xe = /* @__PURE__ */ Y({
1836
1850
  name: "FResponseToolbarItemDesign",
1837
1851
  props: Ce,
1838
1852
  emits: ["Click"],
1839
- setup(s, e) {
1853
+ setup(o, e) {
1840
1854
  M(), M();
1841
- const n = M(s.alignment), i = {
1855
+ const n = M(o.alignment), i = {
1842
1856
  id: "__more_buttons__",
1843
1857
  text: "More"
1844
- }, d = M(new z(i));
1845
- V(() => d.value.children.length > 0);
1846
- const m = M(), p = L("designer-host-service"), T = L("design-item-context"), x = vt(T, p), f = fe(m, T, x);
1858
+ }, a = M(new z(i));
1859
+ V(() => a.value.children.length > 0);
1860
+ const f = M(), p = L("designer-host-service"), T = L("design-item-context"), x = Ct(T, p), g = fe(f, T, x);
1847
1861
  L("toolbar-item-handler", () => {
1848
1862
  }), H(() => {
1849
- m.value.componentInstance = f;
1850
- }), e.expose(f.value);
1851
- function g() {
1863
+ f.value.componentInstance = g;
1864
+ }), e.expose(g.value);
1865
+ function m() {
1852
1866
  const u = {
1853
1867
  "f-icon": !0
1854
- }, b = s.icon ? s.icon.trim() : "";
1868
+ }, b = o.icon ? o.icon.trim() : "";
1855
1869
  return J(u, b);
1856
1870
  }
1857
1871
  function l() {
1858
- return !!(s.icon && s.icon.trim());
1872
+ return !!(o.icon && o.icon.trim());
1859
1873
  }
1860
1874
  function c() {
1861
1875
  const u = {
@@ -1863,40 +1877,40 @@ const xe = /* @__PURE__ */ Y({
1863
1877
  "f-rt-btn": !0,
1864
1878
  "f-btn-ml": n.value === "right",
1865
1879
  "f-btn-mr": n.value === "left",
1866
- "btn-icontext": !!(s.icon && s.icon.trim()),
1867
- disabled: s.disabled === !0
1880
+ "btn-icontext": !!(o.icon && o.icon.trim()),
1881
+ disabled: o.disabled === !0
1868
1882
  };
1869
- return J(u, s.class);
1883
+ return J(u, o.class);
1870
1884
  }
1871
1885
  return () => y("div", {
1872
- ref: m,
1886
+ ref: f,
1873
1887
  "data-dragref": `${T.schema.id}-container`,
1874
1888
  class: "farris-component position-relative",
1875
1889
  style: "display:inline-block!important;"
1876
1890
  }, [y("button", {
1877
1891
  type: "button",
1878
1892
  class: c(),
1879
- id: s.id
1893
+ id: o.id
1880
1894
  }, [l() && y("i", {
1881
- class: g()
1882
- }, null), s.text])]);
1895
+ class: m()
1896
+ }, null), o.text])]);
1883
1897
  }
1884
- }), Ct = /* @__PURE__ */ Y({
1898
+ }), wt = /* @__PURE__ */ Y({
1885
1899
  name: "FResponseToolbarDesign",
1886
- props: st,
1900
+ props: rt,
1887
1901
  emits: ["Click"],
1888
- setup(s, e) {
1889
- const n = M(s.items);
1902
+ setup(o, e) {
1903
+ const n = M(o.items);
1890
1904
  let i = new Array(n.value.length).fill(M());
1891
- const d = M(), m = M(), p = M(s.alignment), T = {
1905
+ const a = M(), f = M(), p = M(o.alignment), T = {
1892
1906
  id: "__more_buttons__",
1893
1907
  text: "More"
1894
- }, x = M(new z(T)), f = we();
1908
+ }, x = M(new z(T)), g = we();
1895
1909
  V(() => x.value.children.length > 0);
1896
- const g = M(), l = L("designer-host-service"), c = L("design-item-context"), u = ut(c, l), b = fe(g, c, u), I = L("toolbar-item-handler", () => {
1910
+ const m = M(), l = L("designer-host-service"), c = L("design-item-context"), u = pt(c, l), b = fe(m, c, u), I = L("toolbar-item-handler", () => {
1897
1911
  });
1898
1912
  H(() => {
1899
- g.value.componentInstance = b;
1913
+ m.value.componentInstance = b;
1900
1914
  }), e.expose(b.value);
1901
1915
  function B() {
1902
1916
  I && I();
@@ -1905,7 +1919,7 @@ const xe = /* @__PURE__ */ Y({
1905
1919
  "f-toolbar": !0,
1906
1920
  "f-response-toolbar": !0,
1907
1921
  "position-relative": !0
1908
- }, s.customClass)), F = V(() => ({
1922
+ }, o.customClass)), F = V(() => ({
1909
1923
  "d-flex": !0,
1910
1924
  "flex-nowrap": !0,
1911
1925
  "justify-content-end": p.value === "right",
@@ -1913,7 +1927,7 @@ const xe = /* @__PURE__ */ Y({
1913
1927
  })), {
1914
1928
  renderToolbarDropdown: j,
1915
1929
  clearAllDropDown: A
1916
- } = at(s, f, b);
1930
+ } = dt(o, g, b);
1917
1931
  function k() {
1918
1932
  n.value.filter((t) => t.children && t.children.length > 0).forEach((t) => {
1919
1933
  t.expanded = !1;
@@ -1921,26 +1935,26 @@ const xe = /* @__PURE__ */ Y({
1921
1935
  }
1922
1936
  const R = /* @__PURE__ */ new Map(), v = [];
1923
1937
  function E(t) {
1924
- const r = m.value;
1925
- let a = t;
1938
+ const r = f.value;
1939
+ let d = t;
1926
1940
  const w = Array.from(r.children), C = w[w.length - 1].id === "__more_buttons__" ? w[w.length - 1] : null;
1927
1941
  if (C) {
1928
1942
  const _ = C.computedStyleMap().get("margin-left"), N = C.computedStyleMap().get("margin-right"), q = (_ ? _.value : 0) + C.getBoundingClientRect().width + (N ? N.value : 0);
1929
- a -= q;
1943
+ d -= q;
1930
1944
  }
1931
1945
  const S = w.filter((_) => _.id !== "__more_buttons__");
1932
1946
  for (const _ of S) {
1933
1947
  const N = _.computedStyleMap().get("margin-left"), q = _.computedStyleMap().get("margin-right"), G = (N ? N.value : 0) + _.getBoundingClientRect().width + (q ? q.value : 0);
1934
- a < G ? (R.set(_.id, !0), v.push({
1948
+ d < G ? (R.set(_.id, !0), v.push({
1935
1949
  id: _.id,
1936
1950
  width: G
1937
- })) : a -= G;
1951
+ })) : d -= G;
1938
1952
  }
1939
1953
  if (v.length)
1940
1954
  for (let _ = v.length - 1; _ >= 0; _--) {
1941
1955
  const N = v[_].width;
1942
- if (a >= N)
1943
- a -= N, R.delete(v[_].id), v.pop();
1956
+ if (d >= N)
1957
+ d -= N, R.delete(v[_].id), v.pop();
1944
1958
  else
1945
1959
  break;
1946
1960
  }
@@ -1951,82 +1965,82 @@ const xe = /* @__PURE__ */ Y({
1951
1965
  }
1952
1966
  const P = new ResizeObserver((t) => {
1953
1967
  if (t.length) {
1954
- const a = t[0].contentRect.width, C = m.value.getBoundingClientRect().width;
1955
- (a < C || v.length) && E(a);
1968
+ const d = t[0].contentRect.width, C = f.value.getBoundingClientRect().width;
1969
+ (d < C || v.length) && E(d);
1956
1970
  }
1957
1971
  });
1958
1972
  H(() => {
1959
- const t = d.value;
1973
+ const t = a.value;
1960
1974
  P.observe(t), document.body.addEventListener("click", k);
1961
- }), de(() => {
1975
+ }), ue(() => {
1962
1976
  P.disconnect(), document.body.removeEventListener("click", k);
1963
- }), Q(() => s.items, () => {
1964
- n.value = s.items;
1977
+ }), Q(() => o.items, () => {
1978
+ n.value = o.items;
1965
1979
  }, {
1966
1980
  deep: !0
1967
1981
  }), Q(n, (t) => {
1968
1982
  i = new Array(n.value.length).fill(M());
1969
1983
  });
1970
- function h(t, r, a, w) {
1971
- c && c.setupContext && c.setupContext.emit("selectionChange", t, r, a, w);
1984
+ function h(t, r, d, w) {
1985
+ c && c.setupContext && c.setupContext.emit("selectionChange", t, r, d, w);
1972
1986
  }
1973
- function o() {
1974
- const t = m.value.querySelector(".dgComponentFocused.dgComponentSelected");
1987
+ function s() {
1988
+ const t = f.value.querySelector(".dgComponentFocused.dgComponentSelected");
1975
1989
  t == null || t.classList.remove("dgComponentSelected"), t == null || t.classList.remove("dgComponentFocused"), B();
1976
1990
  }
1977
1991
  return () => y("div", {
1978
- ref: g,
1992
+ ref: m,
1979
1993
  "data-dragref": `${c.schema.id}-container`,
1980
1994
  class: O.value
1981
1995
  }, [y("div", {
1982
- ref: d,
1996
+ ref: a,
1983
1997
  class: F.value
1984
1998
  }, [y("div", {
1985
- ref: m,
1999
+ ref: f,
1986
2000
  class: "d-inline-block f-response-content",
1987
2001
  style: "white-space: nowrap;"
1988
- }, [n.value.map((t, r) => y(ht, {
2002
+ }, [n.value.map((t, r) => y(bt, {
1989
2003
  ref: i[r],
1990
2004
  class: "p-0 display-inline-block",
1991
2005
  modelValue: t,
1992
- "onUpdate:modelValue": (a) => t = a,
2006
+ "onUpdate:modelValue": (d) => t = d,
1993
2007
  canMove: !0,
1994
2008
  childType: "response-toolbar-item",
1995
2009
  childLabel: "按钮",
1996
2010
  contentKey: "buttons",
1997
- componentId: s.componentId,
2011
+ componentId: o.componentId,
1998
2012
  id: t.id,
1999
2013
  style: "padding:0 !important;display:inline-block",
2000
2014
  onSelectionChange: h,
2001
- onRemoveComponent: o
2015
+ onRemoveComponent: s
2002
2016
  }, {
2003
2017
  default: () => {
2004
- var a;
2018
+ var d;
2005
2019
  return [y(xe, {
2006
2020
  id: t.id,
2007
2021
  disabled: t.disabled,
2008
2022
  text: t.text,
2009
2023
  icon: t.icon,
2010
- class: ((a = t.appearance) == null ? void 0 : a.class) || "btn-secondary",
2011
- alignment: s.alignment || "right",
2012
- componentId: s.componentId
2024
+ class: ((d = t.appearance) == null ? void 0 : d.class) || "btn-secondary",
2025
+ alignment: o.alignment || "right",
2026
+ componentId: o.componentId
2013
2027
  }, null)];
2014
2028
  }
2015
2029
  }))])])]);
2016
2030
  }
2017
- }), Mt = oe;
2018
- X.register = (s, e, n) => {
2019
- s["response-toolbar"] = X, e["response-toolbar"] = oe;
2031
+ }), Et = se;
2032
+ X.register = (o, e, n) => {
2033
+ o["response-toolbar"] = X, e["response-toolbar"] = se;
2020
2034
  };
2021
- X.registerDesigner = (s, e, n) => {
2022
- s["response-toolbar"] = Ct, e["response-toolbar"] = oe, s["response-toolbar-item"] = xe, e["response-toolbar-item"] = rt;
2035
+ X.registerDesigner = (o, e, n) => {
2036
+ o["response-toolbar"] = wt, e["response-toolbar"] = se, o["response-toolbar-item"] = xe, e["response-toolbar-item"] = it;
2023
2037
  };
2024
- const Et = Re(X);
2038
+ const Rt = Re(X);
2025
2039
  export {
2026
2040
  X as FResponseToolbar,
2027
2041
  z as ResponseToolbarDropDownItem,
2028
- Dt as ResponseToolbarGroup,
2042
+ Mt as ResponseToolbarGroup,
2029
2043
  ke as ResponseToolbarItem,
2030
- Et as default,
2031
- Mt as responseToolbarResolver
2044
+ Rt as default,
2045
+ Et as responseToolbarResolver
2032
2046
  };