@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,40 +1,40 @@
1
- var Re = Object.defineProperty;
2
- var Se = (s, e, o) => e in s ? Re(s, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[e] = o;
3
- var B = (s, e, o) => Se(s, typeof e != "symbol" ? e + "" : e, o);
4
- import { computed as W, getCurrentInstance as fe, createVNode as w, ref as S, defineComponent as X, onMounted as z, onUnmounted as ne, watch as H, inject as L, createTextVNode as ge, provide as Me, onBeforeUnmount as ke, withModifiers as Ae } from "vue";
5
- import { isPlainObject as pe, cloneDeep as me } from "lodash-es";
6
- import { getCustomClass as J, withInstall as Be } from "../common/index.esm.js";
7
- import { useDesignerInnerComponent as he } from "../designer-canvas/index.esm.js";
8
- class be {
1
+ var Me = Object.defineProperty;
2
+ var Ee = (s, e, n) => e in s ? Me(s, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : s[e] = n;
3
+ var D = (s, e, n) => Ee(s, typeof e != "symbol" ? e + "" : e, n);
4
+ import { computed as V, getCurrentInstance as de, createVNode as y, ref as S, defineComponent as Q, onMounted as z, onUnmounted as ue, watch as G, inject as L, createTextVNode as pe, provide as Re, onBeforeUnmount as ke, withModifiers as Pe } from "vue";
5
+ import { isPlainObject as ce, cloneDeep as fe } from "lodash-es";
6
+ import { getCustomClass as H, withInstall as Be } from "../common/index.esm.js";
7
+ import { useDesignerInnerComponent as ge } from "../designer-canvas/index.esm.js";
8
+ class me {
9
9
  constructor(e) {
10
10
  /** 工具栏项标识 */
11
- B(this, "id", "");
11
+ D(this, "id", "");
12
12
  /** 工具栏项自定义样式 */
13
- B(this, "class", "btn-secondary");
13
+ D(this, "class", "btn-secondary");
14
14
  /** 图标 */
15
- B(this, "icon", "");
15
+ D(this, "icon", "");
16
16
  /** 所属分组 */
17
- B(this, "groupId", "");
17
+ D(this, "groupId", "");
18
18
  /** 收藏顺序 */
19
- B(this, "order", -1);
19
+ D(this, "order", -1);
20
20
  /** 是否作为下拉菜单的顶层按钮 */
21
- B(this, "asDropDownTop", !1);
21
+ D(this, "asDropDownTop", !1);
22
22
  /** 文本 */
23
- B(this, "text", "");
23
+ D(this, "text", "");
24
24
  /** 是否可见 */
25
- B(this, "visible", !0);
26
- B(this, "responsed", !1);
25
+ D(this, "visible", !0);
26
+ D(this, "responsed", !1);
27
27
  /** 是否启用提示消息 */
28
- B(this, "tipsEnable", !1);
28
+ D(this, "tipsEnable", !1);
29
29
  /** 提示消息内容 */
30
- B(this, "tipsText", "");
30
+ D(this, "tipsText", "");
31
31
  /** 记录宽度 */
32
- B(this, "width", 0);
33
- B(this, "onClick", () => {
32
+ D(this, "width", 0);
33
+ D(this, "onClick", () => {
34
34
  });
35
- B(this, "options");
35
+ D(this, "options");
36
36
  this.options = e;
37
- const o = [
37
+ const n = [
38
38
  "id",
39
39
  "class",
40
40
  "icon",
@@ -50,13 +50,13 @@ class be {
50
50
  "tipsText",
51
51
  "onClick"
52
52
  ];
53
- Object.keys(e).filter((c) => o.indexOf(c) > -1).forEach((c) => {
54
- this[c] = e[c];
53
+ Object.keys(e).filter((i) => n.indexOf(i) > -1).forEach((i) => {
54
+ this[i] = e[i];
55
55
  });
56
56
  }
57
57
  /** 是否可用 */
58
58
  get enable() {
59
- return Object.keys(this.options).indexOf("enable") > -1 ? this.options.enable : W(() => !0);
59
+ return Object.keys(this.options).indexOf("disabled") > -1 ? !this.options.disabled : V(() => !0);
60
60
  }
61
61
  /** 设置宽度 */
62
62
  setWidth(e) {
@@ -67,49 +67,49 @@ class be {
67
67
  return this.visible ? this.width : !1;
68
68
  }
69
69
  }
70
- class Oe extends be {
70
+ class Ae extends me {
71
71
  constructor(e) {
72
72
  super(e);
73
73
  }
74
74
  }
75
- function ye() {
75
+ function he() {
76
76
  function s(e) {
77
- const o = [];
78
- return e.reduce((c, d) => (d.children && d.children.length > 0 ? c.push(new G(d)) : c.push(new Oe(d)), c), o), o;
77
+ const n = [];
78
+ return e.reduce((i, d) => (d.children && d.children.length > 0 ? i.push(new W(d)) : i.push(new Ae(d)), i), n), n;
79
79
  }
80
80
  return { buildResponseToolbarItems: s };
81
81
  }
82
- const { buildResponseToolbarItems: _e } = ye();
83
- class G extends be {
84
- constructor(o) {
85
- super(o);
86
- B(this, "placement", "");
82
+ const { buildResponseToolbarItems: Oe } = he();
83
+ class W extends me {
84
+ constructor(n) {
85
+ super(n);
86
+ D(this, "placement", "");
87
87
  // 下拉位置
88
88
  /** 下拉class */
89
- B(this, "dropdownClass", "");
89
+ D(this, "dropdownClass", "");
90
90
  /** 下拉菜单class */
91
- B(this, "menuClass", "");
91
+ D(this, "menuClass", "");
92
92
  /** 是否用分开的下拉按钮 */
93
- B(this, "split", !1);
94
- B(this, "children", []);
95
- B(this, "expanded", !1);
96
- const c = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
97
- Object.keys(o).filter((d) => c.indexOf(d) > -1).forEach((d) => {
98
- this[d] = o[d];
99
- }), o.children && o.children.length && (this.children = _e(o.children));
93
+ D(this, "split", !1);
94
+ D(this, "children", []);
95
+ D(this, "expanded", !1);
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];
99
+ }), n.children && n.children.length && (this.children = Oe(n.children));
100
100
  }
101
101
  }
102
- class Vt {
103
- constructor(e, o) {
104
- B(this, "id");
105
- B(this, "name");
102
+ class Pt {
103
+ constructor(e, n) {
104
+ D(this, "id");
105
+ D(this, "name");
106
106
  /** 记录元素的Id */
107
- B(this, "presetId", []);
107
+ D(this, "presetId", []);
108
108
  /** 记录转变为下拉时元素的位置 */
109
- B(this, "responsedIndex", []);
109
+ D(this, "responsedIndex", []);
110
110
  /** 记录宽度 */
111
- B(this, "width");
112
- this.id = e, this.name = o, this.width = 0;
111
+ D(this, "width");
112
+ this.id = e, this.name = n, this.width = 0;
113
113
  }
114
114
  // 设置宽度
115
115
  setWidth(e) {
@@ -144,98 +144,98 @@ class Vt {
144
144
  return this.presetId.length === this.responsedIndex.length;
145
145
  }
146
146
  }
147
- const oe = {}, ve = {};
148
- function se(s) {
149
- const { properties: e, title: o, ignore: c } = s, d = c && Array.isArray(c), b = Object.keys(e).reduce((m, D) => ((!d || !c.find((P) => P == D)) && (m[D] = e[D].type === "object" && e[D].properties ? se(e[D]) : me(e[D].default)), m), {});
150
- return (!d || !c.find((m) => m == "id")) && (b.id = `${o}-${Date.now()}`), b;
147
+ const ee = {}, be = {};
148
+ function te(s) {
149
+ const { properties: e, title: n, ignore: i } = s, d = i && Array.isArray(i), h = Object.keys(e).reduce((f, x) => ((!d || !i.find((w) => w == x)) && (f[x] = e[x].type === "object" && e[x].properties ? te(e[x]) : fe(e[x].default)), f), {});
150
+ return n && (!d || !i.find((f) => f == "id")) && (h.id = `${n}-${Date.now()}`), h;
151
151
  }
152
- function q(s, e = {}, o) {
153
- const c = oe[s];
154
- if (c) {
155
- let d = se(c);
156
- const b = ve[s];
157
- return d = b ? b({ getSchemaByType: q }, d, e, o) : d, d;
152
+ function X(s, e = {}, n) {
153
+ const i = ee[s];
154
+ if (i) {
155
+ let d = te(i);
156
+ const h = be[s];
157
+ return d = h ? h({ getSchemaByType: X }, d, e, n) : d, d;
158
158
  }
159
159
  return null;
160
160
  }
161
- function Ne(s, e) {
162
- const o = se(e);
163
- return Object.keys(s).reduce((c, d) => (c[d] && pe(c[d]) && pe(s[d]) ? Object.assign(c[d], s[d]) : c[d] = s[d], c), o), o;
161
+ function je(s, e) {
162
+ const n = te(e);
163
+ return Object.keys(s).reduce((i, d) => (i[d] && ce(i[d]) && ce(s[d]) ? Object.assign(i[d], s[d]) : i[d] = s[d], i), n), n;
164
164
  }
165
- function $e(s, e) {
166
- return Object.keys(s).filter((c) => s[c] != null).reduce((c, d) => {
165
+ function _e(s, e) {
166
+ return Object.keys(s).filter((i) => s[i] != null).reduce((i, d) => {
167
167
  if (e.has(d)) {
168
- const b = e.get(d);
169
- if (typeof b == "string")
170
- c[b] = s[d];
168
+ const h = e.get(d);
169
+ if (typeof h == "string")
170
+ i[h] = s[d];
171
171
  else {
172
- const m = b(d, s[d], s);
173
- Object.assign(c, m);
172
+ const f = h(d, s[d], s);
173
+ Object.assign(i, f);
174
174
  }
175
175
  } else
176
- c[d] = s[d];
177
- return c;
176
+ i[d] = s[d];
177
+ return i;
178
178
  }, {});
179
179
  }
180
- function Fe(s, e, o = /* @__PURE__ */ new Map()) {
181
- const c = Ne(s, e);
182
- return $e(c, o);
180
+ function $e(s, e, n = /* @__PURE__ */ new Map()) {
181
+ const i = je(s, e);
182
+ return _e(i, n);
183
183
  }
184
- function Le(s = {}) {
185
- function e(g, C, p, i) {
186
- if (typeof p == "number")
187
- return i[g].length === p;
188
- if (typeof p == "object") {
189
- const f = Object.keys(p)[0], a = p[f];
190
- if (f === "not")
191
- return Number(i[g].length) !== Number(a);
192
- if (f === "moreThan")
193
- return Number(i[g].length) >= Number(a);
194
- if (f === "lessThan")
195
- return Number(i[g].length) <= Number(a);
184
+ function Fe(s = {}) {
185
+ function e(g, m, l, c) {
186
+ if (typeof l == "number")
187
+ return c[g].length === l;
188
+ if (typeof l == "object") {
189
+ const p = Object.keys(l)[0], b = l[p];
190
+ if (p === "not")
191
+ return Number(c[g].length) !== Number(b);
192
+ if (p === "moreThan")
193
+ return Number(c[g].length) >= Number(b);
194
+ if (p === "lessThan")
195
+ return Number(c[g].length) <= Number(b);
196
196
  }
197
197
  return !1;
198
198
  }
199
- function o(g, C, p, i) {
200
- return i[g] && i[g].propertyValue && String(i[g].propertyValue.value) === String(p);
199
+ function n(g, m, l, c) {
200
+ return c[g] && c[g].propertyValue && String(c[g].propertyValue.value) === String(l);
201
201
  }
202
- const c = /* @__PURE__ */ new Map([
202
+ const i = /* @__PURE__ */ new Map([
203
203
  ["length", e],
204
- ["getProperty", o]
204
+ ["getProperty", n]
205
205
  ]);
206
- Object.keys(s).reduce((g, C) => (g.set(C, s[C]), g), c);
207
- function d(g, C) {
208
- const p = g;
209
- return typeof C == "number" ? [{ target: p, operator: "length", param: null, value: Number(C) }] : typeof C == "boolean" ? [{ target: p, operator: "getProperty", param: g, value: !!C }] : typeof C == "object" ? Object.keys(C).map((i) => {
210
- if (i === "length")
211
- return { target: p, operator: "length", param: null, value: C[i] };
212
- const f = i, a = C[i];
213
- return { target: p, operator: "getProperty", param: f, value: a };
206
+ Object.keys(s).reduce((g, m) => (g.set(m, s[m]), g), i);
207
+ function d(g, m) {
208
+ const l = g;
209
+ 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) => {
210
+ if (c === "length")
211
+ return { target: l, operator: "length", param: null, value: m[c] };
212
+ const p = c, b = m[c];
213
+ return { target: l, operator: "getProperty", param: p, value: b };
214
214
  }) : [];
215
215
  }
216
- function b(g) {
217
- return Object.keys(g).reduce((p, i) => {
218
- const f = d(i, g[i]);
219
- return p.push(...f), p;
216
+ function h(g) {
217
+ return Object.keys(g).reduce((l, c) => {
218
+ const p = d(c, g[c]);
219
+ return l.push(...p), l;
220
220
  }, []);
221
221
  }
222
- function m(g, C) {
223
- if (c.has(g.operator)) {
224
- const p = c.get(g.operator);
225
- return p && p(g.target, g.param, g.value, C) || !1;
222
+ function f(g, m) {
223
+ if (i.has(g.operator)) {
224
+ const l = i.get(g.operator);
225
+ return l && l(g.target, g.param, g.value, m) || !1;
226
226
  }
227
227
  return !1;
228
228
  }
229
- function D(g, C) {
230
- return b(g).reduce((f, a) => f && m(a, C), !0);
229
+ function x(g, m) {
230
+ return h(g).reduce((p, b) => p && f(b, m), !0);
231
231
  }
232
- function P(g, C) {
233
- const p = Object.keys(g), i = p.includes("allOf"), f = p.includes("anyOf"), a = i || f, T = (a ? g[a ? i ? "allOf" : "anyOf" : "allOf"] : [g]).map((E) => D(E, C));
234
- return i ? !T.includes(!1) : T.includes(!0);
232
+ function w(g, m) {
233
+ const l = Object.keys(g), c = l.includes("allOf"), p = l.includes("anyOf"), b = c || p, j = (b ? g[b ? c ? "allOf" : "anyOf" : "allOf"] : [g]).map((_) => x(_, m));
234
+ return c ? !j.includes(!1) : j.includes(!0);
235
235
  }
236
- return { parseValueSchema: P };
236
+ return { parseValueSchema: w };
237
237
  }
238
- const re = {
238
+ const ne = {
239
239
  button: { type: "button", name: "按钮", icon: "Button" },
240
240
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
241
241
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -274,30 +274,30 @@ const re = {
274
274
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
275
275
  "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
276
276
  fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
277
- }, Ce = {}, Ve = {};
278
- Le();
279
- function we(s, e, o = /* @__PURE__ */ new Map(), c = (m, D, P) => D, d = {}, b = (m) => m) {
280
- return oe[e.title] = e, ve[e.title] = c, Ce[e.title] = d, Ve[e.title] = b, (m = {}) => {
281
- const D = Fe(m, e, o), P = Object.keys(s).reduce((g, C) => (g[C] = s[C].default, g), {});
282
- return Object.assign(P, D);
277
+ }, ye = {}, Ne = {};
278
+ Fe();
279
+ function ve(s, e, n = /* @__PURE__ */ new Map(), i = (f, x, w) => x, d = {}, h = (f) => f) {
280
+ return ee[e.title] = e, be[e.title] = i, ye[e.title] = d, Ne[e.title] = h, (f = {}) => {
281
+ const x = $e(f, e, n), w = Object.keys(s).reduce((g, m) => (g[m] = s[m].default, g), {});
282
+ return Object.assign(w, x);
283
283
  };
284
284
  }
285
- function We(s, e) {
285
+ function Le(s, e) {
286
286
  return { customClass: e.class, customStyle: e.style };
287
287
  }
288
- const Ue = /* @__PURE__ */ new Map([
288
+ const Ve = /* @__PURE__ */ new Map([
289
289
  ["buttons", "items"],
290
+ ["appearance", Le]
291
+ ]), Ue = /* @__PURE__ */ new Map([
290
292
  ["appearance", We]
291
- ]), qe = /* @__PURE__ */ new Map([
292
- ["appearance", ze]
293
293
  ]);
294
- function ze(s, e) {
294
+ function We(s, e) {
295
295
  return { class: e.class, style: e.style };
296
296
  }
297
- function xe(s, e, o) {
297
+ function Ce(s, e, n) {
298
298
  return e;
299
299
  }
300
- const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-design.gitee.io/response-toolbar.schema.json", Je = "response-toolbar", Qe = "A Farris Toolbar Component", Xe = "object", Ye = {
300
+ const qe = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-design.gitee.io/response-toolbar.schema.json", Ge = "response-toolbar", He = "A Farris Toolbar Component", Je = "object", Qe = {
301
301
  id: {
302
302
  description: "The unique identifier for a Response Toolbar",
303
303
  type: "string"
@@ -313,9 +313,6 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
313
313
  properties: {
314
314
  class: {
315
315
  type: "string"
316
- },
317
- style: {
318
- type: "string"
319
316
  }
320
317
  },
321
318
  default: {}
@@ -330,19 +327,19 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
330
327
  type: "array",
331
328
  default: []
332
329
  }
333
- }, Ze = [
330
+ }, Xe = [
334
331
  "id",
335
332
  "type",
336
333
  "buttons"
337
- ], Ke = {
338
- $schema: Ge,
339
- $id: He,
340
- title: Je,
341
- description: Qe,
342
- type: Xe,
343
- properties: Ye,
344
- required: Ze
345
- }, et = "https://json-schema.org/draft/2020-12/schema", tt = "https://farris-design.gitee.io/response-toolbar-item.schema.json", nt = "response-toolbar-item", ot = "A Farris Toolbar Item Component", st = "object", rt = {
334
+ ], Ye = {
335
+ $schema: qe,
336
+ $id: ze,
337
+ title: Ge,
338
+ description: He,
339
+ type: Je,
340
+ properties: Qe,
341
+ required: Xe
342
+ }, Ze = "https://json-schema.org/draft/2020-12/schema", Ke = "https://farris-design.gitee.io/response-toolbar-item.schema.json", et = "response-toolbar-item", tt = "A Farris Toolbar Item Component", nt = "object", ot = {
346
343
  id: {
347
344
  description: "The unique identifier for a Response Toolbar",
348
345
  type: "string"
@@ -358,10 +355,7 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
358
355
  properties: {
359
356
  class: {
360
357
  type: "string",
361
- default: "btn-primary"
362
- },
363
- style: {
364
- type: "string"
358
+ default: "btn-secondary"
365
359
  }
366
360
  },
367
361
  default: {}
@@ -374,31 +368,36 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
374
368
  text: {
375
369
  description: "文本",
376
370
  type: "string",
377
- default: "新增"
371
+ default: "按钮"
378
372
  },
379
373
  icon: {
380
374
  description: "图标",
381
375
  type: "string",
382
376
  default: ""
383
377
  },
378
+ disabled: {
379
+ description: "禁用",
380
+ type: "boolean",
381
+ default: !1
382
+ },
384
383
  onClick: {
385
384
  description: "点击事件",
386
385
  type: "string",
387
386
  default: ""
388
387
  }
389
- }, it = [
388
+ }, st = [
390
389
  "id",
391
390
  "type",
392
391
  "text"
393
- ], te = {
394
- $schema: et,
395
- $id: tt,
396
- title: nt,
397
- description: ot,
398
- type: st,
399
- properties: rt,
400
- required: it
401
- }, ct = "response-toolbar-item", at = "A Farris Container Component", lt = "object", pt = {
392
+ ], K = {
393
+ $schema: Ze,
394
+ $id: Ke,
395
+ title: et,
396
+ description: tt,
397
+ type: nt,
398
+ properties: ot,
399
+ required: st
400
+ }, rt = "response-toolbar-item", it = "A Farris Container Component", ct = "object", lt = {
402
401
  basic: {
403
402
  title: "基本信息",
404
403
  description: "Basic Infomation",
@@ -431,12 +430,12 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
431
430
  }
432
431
  }
433
432
  }
434
- }, de = {
435
- title: ct,
436
- description: at,
437
- type: lt,
438
- categories: pt
439
- }, ie = {
433
+ }, le = {
434
+ title: rt,
435
+ description: it,
436
+ type: ct,
437
+ categories: lt
438
+ }, oe = {
440
439
  /** 组件自定义样式 */
441
440
  customClass: { type: String, default: "" },
442
441
  alignment: { Type: String, default: "right" },
@@ -445,16 +444,16 @@ const Ge = "https://json-schema.org/draft/2020-12/schema", He = "https://farris-
445
444
  default: []
446
445
  }
447
446
  };
448
- oe[te.title] = te;
449
- Ce[de.title] = de;
450
- const dt = Object.assign({}, ie, {
447
+ ee[K.title] = K;
448
+ ye[le.title] = le;
449
+ const at = Object.assign({}, oe, {
451
450
  componentId: { type: String, default: "" }
452
- }), ce = we(
453
- ie,
454
- Ke,
455
- Ue,
456
- xe
457
- ), Te = {
451
+ }), se = ve(
452
+ oe,
453
+ Ye,
454
+ Ve,
455
+ Ce
456
+ ), we = {
458
457
  id: { type: String, default: "" },
459
458
  items: { type: Object, default: {} },
460
459
  class: { type: String, default: "" },
@@ -463,1528 +462,772 @@ const dt = Object.assign({}, ie, {
463
462
  icon: { type: String, default: "" },
464
463
  componentId: { type: String, default: "" },
465
464
  alignment: { Type: String, default: "right" }
466
- }, ut = we(
467
- Te,
468
- te,
469
- qe,
470
- xe
465
+ }, dt = ve(
466
+ we,
467
+ K,
468
+ Ue,
469
+ Ce
471
470
  );
472
- function je() {
473
- function s(o) {
474
- const c = {
471
+ function xe() {
472
+ function s(n) {
473
+ const i = {
475
474
  "f-icon": !0
476
475
  };
477
- if (o.icon) {
478
- const d = o.icon.trim().split(" ");
479
- d && d.length && d.reduce((b, m) => (b[m] = !0, b), c);
476
+ if (n.icon) {
477
+ const d = n.icon.trim().split(" ");
478
+ d && d.length && d.reduce((h, f) => (h[f] = !0, h), i);
480
479
  }
481
- return c;
480
+ return i;
482
481
  }
483
- function e(o) {
484
- return !!(o.icon && o.icon.trim());
482
+ function e(n) {
483
+ return !!(n.icon && n.icon.trim());
485
484
  }
486
485
  return { iconClass: s, shouldShowIcon: e };
487
486
  }
488
- function ft(s) {
489
- function e(p) {
490
- const i = {
487
+ function ut(s) {
488
+ function e(l) {
489
+ const c = {
491
490
  "dropdown-menu": !0
492
491
  };
493
- if (p.class) {
494
- const f = p.menuClass.split(" ");
495
- f && f.length && f.reduce((a, y) => (a[y] = !0, a), i);
492
+ if (l.class) {
493
+ const p = l.menuClass.split(" ");
494
+ p && p.length && p.reduce((b, M) => (b[M] = !0, b), c);
496
495
  }
497
- return i;
496
+ return c;
498
497
  }
499
- function o(p) {
500
- const i = {
501
- disabled: !p.enable,
498
+ function n(l) {
499
+ const c = {
500
+ disabled: !l.enable,
502
501
  "dropdown-submenu": !0,
503
502
  "f-rt-dropdown": !0
504
- }, f = p.dropdownClass.split(" ");
505
- return f && f.length && f.reduce((a, y) => (a[y] = !0, a), i), i;
503
+ }, p = l.dropdownClass.split(" ");
504
+ return p && p.length && p.reduce((b, M) => (b[M] = !0, b), c), c;
506
505
  }
507
- function c(p) {
508
- const i = {
509
- disabled: !p.enable,
506
+ function i(l) {
507
+ const c = {
508
+ disabled: !l.enable,
510
509
  "dropdown-item": !0,
511
510
  "f-rt-btn": !0
512
- }, f = p.class.split(" ");
513
- return f && f.length && f.reduce((a, y) => (a[y] = !0, a), i), i;
511
+ }, p = l.class.split(" ");
512
+ return p && p.length && p.reduce((b, M) => (b[M] = !0, b), c), c;
514
513
  }
515
514
  let d;
516
- const b = /* @__PURE__ */ new Map();
517
- function m(p, i, f) {
518
- var y;
519
- ((y = p.target) == null ? void 0 : y.id) === i.id && p.stopPropagation();
520
- const a = f ? f.id : "__top_item__";
521
- if (i.children && i.children.length && (i.expanded = !i.expanded, i.expanded ? b.set(a, i) : b.delete(a)), b.has(a) && b.get(a) !== i) {
522
- const v = b.get(a);
523
- v && (v.expanded = !1);
515
+ const h = /* @__PURE__ */ new Map();
516
+ function f(l, c, p) {
517
+ var M;
518
+ ((M = l.target) == null ? void 0 : M.id) === c.id && l.stopPropagation();
519
+ const b = p ? p.id : "__top_item__";
520
+ if (c.children && c.children.length && (c.expanded = !c.expanded, c.expanded ? h.set(b, c) : h.delete(b)), h.has(b) && h.get(b) !== c) {
521
+ const O = h.get(b);
522
+ O && (O.expanded = !1);
524
523
  }
525
524
  }
526
- function D(p, i) {
527
- document.body.click(), i.enable && i.onClick(p, i.id);
528
- }
529
- function P(p) {
530
- return p.children.map((i) => i.children && i.children.length ? w("li", {
531
- class: o(i),
532
- id: i.id,
533
- onClick: (f) => i.enable && m(f, i, p)
534
- }, [w("span", {
535
- id: i.id,
536
- class: c(i),
537
- onMouseover: (f) => i.enable && m(f, i, p)
538
- }, [i.text, w("i", {
525
+ function x(l, c) {
526
+ document.body.click(), c.enable && c.onClick(l, c.id);
527
+ }
528
+ function w(l) {
529
+ return l.children.map((c) => c.children && c.children.length ? y("li", {
530
+ class: n(c),
531
+ id: c.id,
532
+ onClick: (p) => c.enable && f(p, c, l)
533
+ }, [y("span", {
534
+ id: c.id,
535
+ class: i(c),
536
+ onMouseover: (p) => c.enable && f(p, c, l)
537
+ }, [c.text, y("i", {
539
538
  class: "f-icon f-icon-arrow-chevron-right",
540
539
  style: "display: inline-block;float: right;line-height: 1.25rem;"
541
- }, null)]), d(i, i)]) : w("li", {
542
- class: c(i),
543
- id: i.id,
544
- onClick: (f) => D(f, i),
545
- onMouseover: (f) => i.enable && m(f, i, p)
546
- }, [s.shouldShowIcon(i) && w("i", {
547
- class: s.iconClass(i)
548
- }, null), i.text]));
549
- }
550
- function g(p, i, f) {
551
- const a = {
552
- display: p.expanded ? "block" : "none",
540
+ }, null)]), d(c, c)]) : y("li", {
541
+ class: i(c),
542
+ id: c.id,
543
+ onClick: (p) => x(p, c),
544
+ onMouseover: (p) => c.enable && f(p, c, l)
545
+ }, [s.shouldShowIcon(c) && y("i", {
546
+ class: s.iconClass(c)
547
+ }, null), c.text]));
548
+ }
549
+ function g(l, c, p) {
550
+ const b = {
551
+ display: l.expanded ? "block" : "none",
553
552
  position: "fixed",
554
553
  maxWidth: "300px",
555
554
  width: "auto",
556
555
  minWidth: "120px"
557
- }, y = document.getElementsByTagName("body")[0].getClientRects()[0].width, v = i, T = v == null ? void 0 : v.getClientRects();
558
- if (v && T && T.length) {
556
+ }, M = document.getElementsByTagName("body")[0].getClientRects()[0].width, O = c, j = O == null ? void 0 : O.getClientRects();
557
+ if (O && j && j.length) {
559
558
  const {
560
- top: O,
561
- width: E,
562
- left: k,
563
- right: N,
564
- height: j
565
- } = T[0], h = Math.ceil(j + O);
566
- a.top = `${h}px`, a.left = `${k}px`;
567
- const I = p.id + "_menu", A = i ? i.querySelector("#" + I) : null;
559
+ top: F,
560
+ width: _,
561
+ left: R,
562
+ right: E,
563
+ height: k
564
+ } = j[0], v = Math.ceil(k + F);
565
+ b.top = `${v}px`, b.left = `${R}px`;
566
+ const P = l.id + "_menu", A = c ? c.querySelector("#" + P) : null;
568
567
  if (A) {
569
- a.display === "block" && (A.style.display = "block");
570
- const l = A.getBoundingClientRect();
571
- if (f) {
572
- a.top = `${O - 6}px`;
573
- const n = Math.ceil(E + k);
574
- a.left = `${n}px`;
568
+ b.display === "block" && (A.style.display = "block");
569
+ const a = A.getBoundingClientRect();
570
+ if (p) {
571
+ b.top = `${F - 6}px`;
572
+ const o = Math.ceil(_ + R);
573
+ b.left = `${o}px`;
575
574
  }
576
- y - k - E < l.width && (a.left = `${(f ? k : N) - l.width}px`);
575
+ M - R - _ < a.width && (b.left = `${(p ? R : E) - a.width}px`);
577
576
  }
578
577
  }
579
- return a;
580
- }
581
- d = function(p, i) {
582
- var v, T;
583
- const f = fe(), a = i ? i.id : p.id, y = (T = (v = f == null ? void 0 : f.exposed) == null ? void 0 : v.elementRef.value) == null ? void 0 : T.querySelector("#" + a);
584
- return w("ul", {
585
- class: e(p),
586
- style: g(p, y, i),
587
- id: p.id + "_menu"
588
- }, [P(p)]);
578
+ return b;
579
+ }
580
+ d = function(l, c) {
581
+ var O, j;
582
+ const p = de(), b = c ? c.id : l.id, M = (j = (O = p == null ? void 0 : p.exposed) == null ? void 0 : O.elementRef.value) == null ? void 0 : j.querySelector("#" + b);
583
+ return y("ul", {
584
+ class: e(l),
585
+ style: g(l, M, c),
586
+ id: l.id + "_menu"
587
+ }, [w(l)]);
589
588
  };
590
- function C() {
591
- b.forEach((p) => {
592
- p.expanded = !1;
593
- }), b.clear();
589
+ function m() {
590
+ h.forEach((l) => {
591
+ l.expanded = !1;
592
+ }), h.clear();
594
593
  }
595
594
  return {
596
595
  renderDropdownMenu: d,
597
- clearAllDropDownMenu: C
596
+ clearAllDropDownMenu: m
598
597
  };
599
598
  }
600
- function gt(s, e) {
601
- const o = S(s.alignment), {
602
- renderDropdownMenu: c,
599
+ function pt(s, e) {
600
+ const n = S(s.alignment), {
601
+ renderDropdownMenu: i,
603
602
  clearAllDropDownMenu: d
604
- } = ft(e);
605
- function b(C) {
606
- const p = {
603
+ } = ut(e);
604
+ function h(m) {
605
+ const l = {
607
606
  "btn-group": !0,
608
607
  "f-rt-dropdown": !0,
609
- "f-btn-ml": o.value === "right",
610
- "f-btn-mr": o.value === "left"
611
- }, i = C.dropdownClass.split(" ");
612
- return i && i.length && i.reduce((f, a) => (f[a] = !0, f), p), p;
608
+ "f-btn-ml": n.value === "right",
609
+ "f-btn-mr": n.value === "left"
610
+ }, c = m.dropdownClass.split(" ");
611
+ return c && c.length && c.reduce((p, b) => (p[b] = !0, p), l), l;
613
612
  }
614
- function m(C) {
615
- const p = {
613
+ function f(m) {
614
+ const l = {
616
615
  btn: !0,
617
- disabled: !C.enable,
616
+ disabled: !m.enable,
618
617
  "f-rt-btn": !0,
619
- "btn-icontext": !!(C.icon && C.icon.trim())
618
+ "btn-icontext": !!(m.icon && m.icon.trim())
620
619
  };
621
- if (C.class) {
622
- const i = C.class.split(" ");
623
- i && i.length && i.reduce((f, a) => (f[a] = !0, f), p);
620
+ if (m.class) {
621
+ const c = m.class.split(" ");
622
+ c && c.length && c.reduce((p, b) => (p[b] = !0, p), l);
624
623
  }
625
- return p;
626
- }
627
- function D(C, p) {
628
- C.stopPropagation();
629
- const i = p.expanded;
630
- document.body.click(), p.expanded = !i;
631
- }
632
- function P(C) {
633
- return w("div", {
634
- id: C.id,
635
- class: b(C)
636
- }, [w("div", {
637
- class: m(C),
624
+ return l;
625
+ }
626
+ function x(m, l) {
627
+ m.stopPropagation();
628
+ const c = l.expanded;
629
+ document.body.click(), l.expanded = !c;
630
+ }
631
+ function w(m) {
632
+ return y("div", {
633
+ id: m.id,
634
+ class: h(m)
635
+ }, [y("div", {
636
+ class: f(m),
638
637
  style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
639
- onClick: (p) => C.enable && D(p, C)
640
- }, [e.shouldShowIcon(C) && w("i", {
641
- class: e.iconClass(C)
642
- }, null), w("span", null, [C.text]), w("i", {
638
+ onClick: (l) => m.enable && x(l, m)
639
+ }, [e.shouldShowIcon(m) && y("i", {
640
+ class: e.iconClass(m)
641
+ }, null), y("span", null, [m.text]), y("i", {
643
642
  class: "f-icon f-icon-arrow-chevron-down",
644
643
  style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
645
- }, null)]), c(C)]);
644
+ }, null)]), i(m)]);
646
645
  }
647
646
  function g() {
648
647
  d();
649
648
  }
650
649
  return {
651
- renderToolbarDropdown: P,
650
+ renderToolbarDropdown: w,
652
651
  clearAllDropDown: g
653
652
  };
654
653
  }
655
654
  const {
656
- buildResponseToolbarItems: ue
657
- } = ye(), Q = /* @__PURE__ */ X({
655
+ buildResponseToolbarItems: ae
656
+ } = he(), J = /* @__PURE__ */ Q({
658
657
  name: "FResponseToolbar",
659
- props: ie,
658
+ props: oe,
660
659
  emits: ["click"],
661
660
  setup(s, e) {
662
- const o = S(ue(s.items)), c = S(), d = S(), b = S(), m = S(s.alignment), D = {
661
+ const n = S(ae(s.items)), i = S(), d = S(), h = S(), f = S(s.alignment), x = {
663
662
  id: "__more_buttons__",
664
663
  text: "更多"
665
- }, P = S(new G(D)), g = je(), C = W(() => P.value.children.length > 0), p = W(() => J({
664
+ }, w = S(new W(x)), g = xe(), m = V(() => w.value.children.length > 0), l = V(() => H({
666
665
  "f-toolbar": !0,
667
666
  "f-response-toolbar": !0,
668
667
  "position-relative": !0
669
- }, s.customClass)), i = W(() => ({
668
+ }, s.customClass)), c = V(() => ({
670
669
  "w-100": !0,
671
670
  "d-flex": !0,
672
671
  "flex-nowrap": !0,
673
- "justify-content-end": m.value === "right",
674
- "justify-content-start": m.value === "left"
672
+ "justify-content-end": f.value === "right",
673
+ "justify-content-start": f.value === "left"
675
674
  })), {
676
- renderToolbarDropdown: f,
677
- clearAllDropDown: a
678
- } = gt(s, g);
679
- function y() {
680
- o.value.filter((h) => h.children && h.children.length > 0).forEach((h) => {
681
- h.expanded = !1;
682
- }), P.value.expanded = !1, a();
675
+ renderToolbarDropdown: p,
676
+ clearAllDropDown: b
677
+ } = pt(s, g);
678
+ function M() {
679
+ n.value.filter((v) => v.children && v.children.length > 0).forEach((v) => {
680
+ v.expanded = !1;
681
+ }), w.value.expanded = !1, b();
683
682
  }
684
- function v(h) {
685
- const I = {
683
+ function O(v) {
684
+ const P = {
686
685
  btn: !0,
687
686
  "f-rt-btn": !0,
688
- "f-btn-ml": m.value === "right",
689
- "f-btn-mr": m.value === "left",
690
- "btn-icontext": !!(h.icon && h.icon.trim())
687
+ "f-btn-ml": f.value === "right",
688
+ "f-btn-mr": f.value === "left",
689
+ "btn-icontext": !!(v.icon && v.icon.trim())
691
690
  };
692
- if (h.class) {
693
- const A = h.class.split(" ");
694
- A && A.length && A.reduce((l, n) => (l[n] = !0, l), I);
691
+ if (v.class) {
692
+ const A = v.class.split(" ");
693
+ A && A.length && A.reduce((a, o) => (a[o] = !0, a), P);
695
694
  }
696
- return I;
695
+ return P;
697
696
  }
698
- function T(h, I) {
699
- document.body.click(), typeof I.onClick == "function" && I.onClick(h, I.id), e.emit("click", h, I.id);
697
+ function j(v, P) {
698
+ document.body.click(), typeof P.onClick == "function" && P.onClick(v, P.id), e.emit("click", v, P.id);
700
699
  }
701
- function O(h) {
702
- return w("button", {
700
+ function F(v) {
701
+ return y("button", {
703
702
  type: "button",
704
- class: v(h),
705
- id: h.id,
706
- disabled: !h.enable,
707
- onClick: (I) => T(I, h)
708
- }, [g.shouldShowIcon(h) && w("i", {
709
- class: g.iconClass(h)
710
- }, null), h.text]);
703
+ class: O(v),
704
+ id: v.id,
705
+ disabled: !v.enable,
706
+ onClick: (P) => j(P, v)
707
+ }, [g.shouldShowIcon(v) && y("i", {
708
+ class: g.iconClass(v)
709
+ }, null), v.text]);
711
710
  }
712
- const E = /* @__PURE__ */ new Map(), k = [];
713
- function N(h) {
714
- const I = b.value;
715
- let A = h;
716
- const l = Array.from(I.children), n = l[l.length - 1].id === "__more_buttons__" ? l[l.length - 1] : null;
717
- if (n) {
718
- const x = n.computedStyleMap().get("margin-left"), M = n.computedStyleMap().get("margin-right"), F = (x ? x.value : 0) + n.getBoundingClientRect().width + (M ? M.value : 0);
719
- A -= F;
711
+ const _ = /* @__PURE__ */ new Map(), R = [];
712
+ function E(v) {
713
+ const P = h.value;
714
+ let A = v;
715
+ const a = Array.from(P.children), o = a[a.length - 1].id === "__more_buttons__" ? a[a.length - 1] : null;
716
+ if (o) {
717
+ const C = o.computedStyleMap().get("margin-left"), I = o.computedStyleMap().get("margin-right"), N = (C ? C.value : 0) + o.getBoundingClientRect().width + (I ? I.value : 0);
718
+ A -= N;
720
719
  }
721
- const t = l.filter((x) => x.id !== "__more_buttons__");
722
- for (const x of t) {
723
- const M = x.computedStyleMap().get("margin-left"), F = x.computedStyleMap().get("margin-right"), _ = (M ? M.value : 0) + x.getBoundingClientRect().width + (F ? F.value : 0);
724
- A < _ ? (E.set(x.id, !0), k.push({
725
- id: x.id,
726
- width: _
727
- })) : A -= _;
720
+ const t = a.filter((C) => C.id !== "__more_buttons__");
721
+ for (const C of t) {
722
+ const I = C.computedStyleMap().get("margin-left"), N = C.computedStyleMap().get("margin-right"), B = (I ? I.value : 0) + C.getBoundingClientRect().width + (N ? N.value : 0);
723
+ A < B ? (_.set(C.id, !0), R.push({
724
+ id: C.id,
725
+ width: B
726
+ })) : A -= B;
728
727
  }
729
- if (k.length)
730
- for (let x = k.length - 1; x >= 0; x--) {
731
- const M = k[x].width;
732
- if (A >= M)
733
- A -= M, E.delete(k[x].id), k.pop();
728
+ if (R.length)
729
+ for (let C = R.length - 1; C >= 0; C--) {
730
+ const I = R[C].width;
731
+ if (A >= I)
732
+ A -= I, _.delete(R[C].id), R.pop();
734
733
  else
735
734
  break;
736
735
  }
737
- const r = Object.assign({}, P.value);
736
+ const r = Object.assign({}, w.value);
738
737
  r.children = [];
739
- const u = new G(r), R = o.value.reduce((x, M) => (E.has(M.id) && u.children.push(M), M.visible = !E.has(M.id), x.push(M), x), []);
740
- P.value = u, o.value = R;
738
+ const u = new W(r), T = n.value.reduce((C, I) => (_.has(I.id) && u.children.push(I), I.visible = !_.has(I.id), C.push(I), C), []);
739
+ w.value = u, n.value = T;
741
740
  }
742
- const j = new ResizeObserver((h) => {
743
- if (h.length) {
744
- const A = h[0].contentRect.width, n = b.value.getBoundingClientRect().width;
745
- (A < n || k.length) && (N(A), y());
741
+ const k = new ResizeObserver((v) => {
742
+ if (v.length) {
743
+ const A = v[0].contentRect.width, o = h.value.getBoundingClientRect().width;
744
+ (A < o || R.length) && (E(A), M());
746
745
  }
747
746
  });
748
747
  return z(() => {
749
- const h = d.value;
750
- j.observe(h), document.body.addEventListener("click", y), document.body.addEventListener("wheel", y);
751
- }), ne(() => {
752
- j.disconnect(), document.body.removeEventListener("click", y), document.body.removeEventListener("wheel", y);
753
- }), H(() => s.items, () => {
754
- o.value = ue(s.items);
748
+ const v = d.value;
749
+ k.observe(v), document.body.addEventListener("click", M), document.body.addEventListener("wheel", M);
750
+ }), ue(() => {
751
+ k.disconnect(), document.body.removeEventListener("click", M), document.body.removeEventListener("wheel", M);
752
+ }), G(() => s.items, () => {
753
+ n.value = ae(s.items);
755
754
  }, {
756
755
  deep: !0
757
756
  }), e.expose({
758
- elementRef: c
759
- }), () => w("div", {
760
- class: p.value,
761
- ref: c
762
- }, [w("div", {
757
+ elementRef: i
758
+ }), () => y("div", {
759
+ class: l.value,
760
+ ref: i
761
+ }, [y("div", {
763
762
  ref: d,
764
- class: i.value
765
- }, [w("div", {
766
- ref: b,
763
+ class: c.value
764
+ }, [y("div", {
765
+ ref: h,
767
766
  class: "d-inline-block f-response-content",
768
767
  style: "white-space: nowrap;"
769
- }, [o.value.filter((h) => h.visible).map((h) => h.children && h.children.length > 0 ? f(h) : O(h)), C.value && f(P.value)])])]);
768
+ }, [n.value.filter((v) => v.visible).map((v) => v.children && v.children.length > 0 ? p(v) : F(v)), m.value && p(w.value)])])]);
770
769
  }
771
770
  });
772
- function mt(s, e) {
773
- const o = L("design-item-context"), c = L("toolbar-item-handler", () => {
771
+ function ft(s, e) {
772
+ const n = L("design-item-context"), i = L("toolbar-item-handler", () => {
774
773
  });
775
774
  function d() {
776
- c && c();
775
+ i && i();
777
776
  }
778
- function b(n) {
777
+ function h(o) {
779
778
  const t = {
780
779
  "dropdown-menu": !0
781
780
  };
782
- if (n.class) {
783
- const r = n.menuClass.split(" ");
784
- r && r.length && r.reduce((u, R) => (u[R] = !0, u), t);
781
+ if (o.class) {
782
+ const r = o.menuClass.split(" ");
783
+ r && r.length && r.reduce((u, T) => (u[T] = !0, u), t);
785
784
  }
786
785
  return t;
787
786
  }
788
- function m(n) {
787
+ function f(o) {
789
788
  const t = {
790
- disabled: !n.enable,
789
+ disabled: !o.enable,
791
790
  "dropdown-submenu": !0,
792
791
  "f-rt-dropdown": !0
793
- }, r = n.dropdownClass.split(" ");
794
- return r && r.length && r.reduce((u, R) => (u[R] = !0, u), t), t;
792
+ }, r = o.dropdownClass.split(" ");
793
+ return r && r.length && r.reduce((u, T) => (u[T] = !0, u), t), t;
795
794
  }
796
- function D(n) {
795
+ function x(o) {
797
796
  const t = {
798
- disabled: !n.enable,
797
+ disabled: !o.enable,
799
798
  "dropdown-item": !0,
800
799
  "f-rt-btn": !0,
801
800
  "position-relative": !0,
802
801
  "farris-component": !0
803
- }, r = n.class.split(" ");
804
- return r && r.length && r.reduce((u, R) => (u[R] = !0, u), t), t;
802
+ }, r = o.class.split(" ");
803
+ return r && r.length && r.reduce((u, T) => (u[T] = !0, u), t), t;
805
804
  }
806
- let P;
805
+ let w;
807
806
  const g = /* @__PURE__ */ new Map();
808
- function C(n, t, r) {
809
- var R;
810
- ((R = n.target) == null ? void 0 : R.id) === t.id && n.stopPropagation();
807
+ function m(o, t, r) {
808
+ var T;
809
+ ((T = o.target) == null ? void 0 : T.id) === t.id && o.stopPropagation();
811
810
  const u = r ? r.id : "__top_item__";
812
811
  if (t.children && t.children.length && (t.expanded = !t.expanded, t.expanded ? g.set(u, t) : g.delete(u)), g.has(u) && g.get(u) !== t) {
813
- const x = g.get(u);
814
- x && (x.expanded = !1);
812
+ const C = g.get(u);
813
+ C && (C.expanded = !1);
815
814
  }
816
815
  }
817
- function p(n) {
818
- n && (n.stopPropagation(), n.preventDefault());
816
+ function l(o) {
817
+ o && (o.stopPropagation(), o.preventDefault());
819
818
  }
820
- function i() {
819
+ function c() {
821
820
  Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((t) => t.classList.remove("dgComponentFocused"));
822
- const n = document.getElementsByClassName("dgComponentSelected");
823
- Array.from(n).forEach((t) => t.classList.remove("dgComponentSelected"));
821
+ const o = document.getElementsByClassName("dgComponentSelected");
822
+ Array.from(o).forEach((t) => t.classList.remove("dgComponentSelected"));
824
823
  }
825
- function f(n) {
826
- n.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
824
+ function p(o) {
825
+ o.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
827
826
  }
828
- function a(n) {
827
+ function b(o) {
829
828
  const {
830
829
  buttons: t = []
831
- } = o.schema;
830
+ } = n.schema;
832
831
  let r = [];
833
- t.forEach((x) => {
834
- r = r.concat(x.children || []);
832
+ t.forEach((C) => {
833
+ r = r.concat(C.children || []);
835
834
  });
836
- const u = r.findIndex((x) => x.id === n), R = u === -1 ? null : r[u];
835
+ const u = r.findIndex((C) => C.id === o), T = u === -1 ? null : r[u];
837
836
  return {
838
837
  index: u,
839
- item: R
838
+ item: T
840
839
  };
841
840
  }
842
- function y(n) {
841
+ function M(o) {
843
842
  const {
844
843
  buttons: t = []
845
- } = o.schema, r = t.findIndex((R) => R.id === n), u = r === -1 ? null : t[r];
844
+ } = n.schema, r = t.findIndex((T) => T.id === o), u = r === -1 ? null : t[r];
846
845
  return {
847
846
  index: r,
848
847
  item: u
849
848
  };
850
849
  }
851
- function v(n) {
850
+ function O(o) {
852
851
  var u;
853
- o.schema;
852
+ n.schema;
854
853
  const {
855
854
  index: t,
856
855
  item: r
857
- } = a(n);
858
- (u = o == null ? void 0 : o.setupContext) == null || u.emit("selectionChange", r == null ? void 0 : r.type, r);
856
+ } = b(o);
857
+ (u = n == null ? void 0 : n.setupContext) == null || u.emit("selectionChange", r == null ? void 0 : r.type, r);
859
858
  }
860
- const T = function(n) {
859
+ const j = function(o) {
861
860
  const {
862
861
  componentType: t
863
- } = n, r = q(t, n), u = t.toLowerCase().replace("-", "_");
862
+ } = o, r = X(t, o), u = t.toLowerCase().replace("-", "_");
864
863
  return r && !r.id && r.type === t && (r.id = `${u}_${Math.random().toString().slice(2, 6)}`), r;
865
- }, O = function() {
866
- const n = {
864
+ }, F = function() {
865
+ const o = {
867
866
  componentType: "response-toolbar-item",
868
867
  parentComponentInstance: e.value,
869
868
  targetPosition: -1
870
869
  };
871
- return T(n);
870
+ return j(o);
872
871
  };
873
- function E(n, t) {
874
- p(n), i(), f(n), v(t.id);
875
- }
876
- function k(n, t, r) {
877
- p(n);
878
- const u = t.id, R = r && r.id, {
879
- buttons: x = []
880
- } = o.schema;
881
- if (!R)
872
+ function _(o, t) {
873
+ l(o), c(), p(o), O(t.id);
874
+ }
875
+ function R(o, t, r) {
876
+ l(o);
877
+ const u = t.id, T = r && r.id, {
878
+ buttons: C = []
879
+ } = n.schema;
880
+ if (!T)
882
881
  return;
883
882
  const {
884
- index: M
885
- } = y(R);
886
- if (M === -1)
883
+ index: I
884
+ } = M(T);
885
+ if (I === -1)
887
886
  return;
888
887
  const {
889
- index: F
890
- } = a(u);
891
- F !== -1 && (x[M].children.splice(F, 1), d());
888
+ index: N
889
+ } = b(u);
890
+ N !== -1 && (C[I].children.splice(N, 1), d());
892
891
  }
893
- function N(n, t, r) {
894
- p(n);
892
+ function E(o, t, r) {
893
+ l(o);
895
894
  const u = r && r.id, {
896
- buttons: R = []
897
- } = o.schema;
895
+ buttons: T = []
896
+ } = n.schema;
898
897
  if (!u)
899
898
  return;
900
899
  const {
901
- index: x
902
- } = y(u);
903
- if (x === -1)
900
+ index: C
901
+ } = M(u);
902
+ if (C === -1)
904
903
  return;
905
- const M = O(), F = Object.assign({}, M, {
904
+ const I = F(), N = Object.assign({}, I, {
906
905
  text: t.text
907
906
  });
908
- R[x].children.push(F), d();
907
+ T[C].children.push(N), d();
909
908
  }
910
- function j(n, t, r) {
911
- p(n);
909
+ function k(o, t, r) {
910
+ l(o);
912
911
  const u = r && r.id, {
913
- buttons: R = []
914
- } = o.schema;
912
+ buttons: T = []
913
+ } = n.schema;
915
914
  if (!u)
916
915
  return;
917
916
  const {
918
- index: x
919
- } = y(u);
920
- if (x === -1)
917
+ index: C
918
+ } = M(u);
919
+ if (C === -1)
921
920
  return;
922
- const M = O(), F = Object.assign({}, M, {
921
+ const I = F(), N = Object.assign({}, I, {
923
922
  text: "按钮"
924
923
  });
925
- R[x].children.push(F), d();
924
+ T[C].children.push(N), d();
926
925
  }
927
- function h(n, t) {
928
- return w("div", {
926
+ function v(o, t) {
927
+ return y("div", {
929
928
  class: "component-btn-group"
930
- }, [w("div", null, [w("div", {
929
+ }, [y("div", null, [y("div", {
931
930
  role: "button",
932
931
  class: "btn component-settings-button",
933
932
  title: "删除",
934
933
  ref: "removeButton",
935
934
  style: "position:static;",
936
- onClick: (r) => k(r, n, t)
937
- }, [w("i", {
935
+ onClick: (r) => R(r, o, t)
936
+ }, [y("i", {
938
937
  class: "f-icon f-icon-yxs_delete"
939
- }, null)]), w("div", {
938
+ }, null)]), y("div", {
940
939
  role: "button",
941
940
  class: "btn component-settings-button",
942
941
  title: "复制",
943
942
  ref: "copyButton",
944
943
  style: "position:static;",
945
- onClick: (r) => N(r, n, t)
946
- }, [w("i", {
944
+ onClick: (r) => E(r, o, t)
945
+ }, [y("i", {
947
946
  class: "f-icon f-icon-yxs_copy"
948
- }, null)]), w("div", {
947
+ }, null)]), y("div", {
949
948
  role: "button",
950
949
  class: "btn component-settings-button",
951
950
  title: "新增同级",
952
951
  ref: "appendSame",
953
952
  style: "width:85px!important;padding:0 5px;position:static;",
954
- onClick: (r) => j(r, n, t)
955
- }, [w("i", {
953
+ onClick: (r) => k(r, o, t)
954
+ }, [y("i", {
956
955
  class: "f-icon f-icon-plus-circle text-white mr-1"
957
- }, null), w("span", {
956
+ }, null), y("span", {
958
957
  style: "font-size:13px;margin:auto"
959
- }, [ge("新增同级")])])])]);
958
+ }, [pe("新增同级")])])])]);
960
959
  }
961
- function I(n) {
962
- return n.children.map((t) => t.children && t.children.length ? w("li", {
963
- class: m(t),
960
+ function P(o) {
961
+ return o.children.map((t) => t.children && t.children.length ? y("li", {
962
+ class: f(t),
964
963
  id: t.id,
965
- onClick: (r) => t.enable && C(r, t, n)
966
- }, [w("span", {
964
+ onClick: (r) => t.enable && m(r, t, o)
965
+ }, [y("span", {
967
966
  id: t.id,
968
- class: D(t),
969
- onMouseover: (r) => t.enable && C(r, t, n)
970
- }, [t.text, w("i", {
967
+ class: x(t),
968
+ onMouseover: (r) => t.enable && m(r, t, o)
969
+ }, [t.text, y("i", {
971
970
  class: "f-icon f-icon-arrow-chevron-right",
972
971
  style: "display: inline-block;float: right;line-height: 1.25rem;"
973
- }, null)]), P(t, t)]) : w("li", {
974
- class: D(t),
972
+ }, null)]), w(t, t)]) : y("li", {
973
+ class: x(t),
975
974
  id: t.id,
976
- onClick: (r) => E(r, t)
977
- }, [h(t, n), s.shouldShowIcon(t) && w("i", {
975
+ onClick: (r) => _(r, t)
976
+ }, [v(t, o), s.shouldShowIcon(t) && y("i", {
978
977
  class: s.iconClass(t)
979
978
  }, null), t.text]));
980
979
  }
981
- function A(n, t, r) {
980
+ function A(o, t, r) {
982
981
  const u = {
983
- display: n.expanded ? "block" : "none",
982
+ display: o.expanded ? "block" : "none",
984
983
  position: "fixed",
985
984
  maxWidth: "300px",
986
985
  width: "auto",
987
986
  minWidth: "120px"
988
- }, R = document.getElementsByTagName("body")[0].getClientRects()[0].width, x = t, M = x == null ? void 0 : x.getClientRects();
989
- if (x && M && M.length) {
987
+ }, T = document.getElementsByTagName("body")[0].getClientRects()[0].width, C = t, I = C == null ? void 0 : C.getClientRects();
988
+ if (C && I && I.length) {
990
989
  const {
991
- top: F,
992
- width: _,
990
+ top: N,
991
+ width: B,
993
992
  left: $,
994
- right: V,
995
- height: U
996
- } = M[0], Y = Math.ceil(U + F);
997
- u.top = `${Y}px`, u.left = `${$}px`;
998
- const Ie = n.id + "_menu", Z = t ? t.querySelector("#" + Ie) : null;
999
- if (Z) {
1000
- u.display === "block" && (Z.style.display = "block");
1001
- const le = Z.getBoundingClientRect();
993
+ right: U,
994
+ height: q
995
+ } = I[0], Ie = Math.ceil(q + N);
996
+ u.top = `${Ie}px`, u.left = `${$}px`;
997
+ const De = o.id + "_menu", Y = t ? t.querySelector("#" + De) : null;
998
+ if (Y) {
999
+ u.display === "block" && (Y.style.display = "block");
1000
+ const ie = Y.getBoundingClientRect();
1002
1001
  if (r) {
1003
- u.top = `${F - 6}px`;
1004
- const Ee = Math.ceil(_ + $);
1005
- u.left = `${Ee}px`;
1002
+ u.top = `${N - 6}px`;
1003
+ const Se = Math.ceil(B + $);
1004
+ u.left = `${Se}px`;
1006
1005
  }
1007
- R - $ - _ < le.width && (u.left = `${(r ? $ : V) - le.width}px`);
1006
+ T - $ - B < ie.width && (u.left = `${(r ? $ : U) - ie.width}px`);
1008
1007
  }
1009
1008
  }
1010
1009
  return u;
1011
1010
  }
1012
- P = function(n, t) {
1013
- var x, M;
1014
- const r = fe(), u = t ? t.id : n.id, R = (M = (x = r == null ? void 0 : r.exposed) == null ? void 0 : x.elementRef.value) == null ? void 0 : M.querySelector("#" + u);
1015
- return w("ul", {
1016
- class: b(n),
1017
- style: A(n, R, t),
1018
- id: n.id + "_menu"
1019
- }, [I(n)]);
1011
+ w = function(o, t) {
1012
+ var C, I;
1013
+ const r = de(), u = t ? t.id : o.id, T = (I = (C = r == null ? void 0 : r.exposed) == null ? void 0 : C.elementRef.value) == null ? void 0 : I.querySelector("#" + u);
1014
+ return y("ul", {
1015
+ class: h(o),
1016
+ style: A(o, T, t),
1017
+ id: o.id + "_menu"
1018
+ }, [P(o)]);
1020
1019
  };
1021
- function l() {
1022
- g.forEach((n) => {
1023
- n.expanded = !1;
1020
+ function a() {
1021
+ g.forEach((o) => {
1022
+ o.expanded = !1;
1024
1023
  }), g.clear();
1025
1024
  }
1026
1025
  return {
1027
- renderDropdownMenu: P,
1028
- clearAllDropDownMenu: l
1026
+ renderDropdownMenu: w,
1027
+ clearAllDropDownMenu: a
1029
1028
  };
1030
1029
  }
1031
- function ht(s, e, o) {
1032
- const c = S(s.alignment), {
1030
+ function gt(s, e, n) {
1031
+ const i = S(s.alignment), {
1033
1032
  renderDropdownMenu: d,
1034
- clearAllDropDownMenu: b
1035
- } = mt(e, o), m = L("design-item-context"), D = L("toolbar-item-handler", () => {
1033
+ clearAllDropDownMenu: h
1034
+ } = ft(e, n), f = L("design-item-context"), x = L("toolbar-item-handler", () => {
1036
1035
  });
1037
- function P() {
1038
- D && D();
1036
+ function w() {
1037
+ x && x();
1039
1038
  }
1040
- function g(l) {
1041
- const n = {
1039
+ function g(a) {
1040
+ const o = {
1042
1041
  "btn-group": !0,
1043
1042
  "f-rt-dropdown": !0,
1044
- "f-btn-ml": c.value === "right",
1045
- "f-btn-mr": c.value === "left"
1046
- }, t = l.dropdownClass.split(" ");
1047
- return t && t.length && t.reduce((r, u) => (r[u] = !0, r), n), n;
1043
+ "f-btn-ml": i.value === "right",
1044
+ "f-btn-mr": i.value === "left"
1045
+ }, t = a.dropdownClass.split(" ");
1046
+ return t && t.length && t.reduce((r, u) => (r[u] = !0, r), o), o;
1048
1047
  }
1049
- function C(l) {
1050
- const n = {
1048
+ function m(a) {
1049
+ const o = {
1051
1050
  btn: !0,
1052
- disabled: !l.enable,
1051
+ disabled: !a.enable,
1053
1052
  "position-relative": !0,
1054
1053
  "farris-component": !0,
1055
1054
  "f-rt-btn": !0,
1056
- "btn-icontext": !!(l.icon && l.icon.trim())
1055
+ "btn-icontext": !!(a.icon && a.icon.trim())
1057
1056
  };
1058
- if (l.class) {
1059
- const t = l.class.split(" ");
1060
- t && t.length && t.reduce((r, u) => (r[u] = !0, r), n);
1057
+ if (a.class) {
1058
+ const t = a.class.split(" ");
1059
+ t && t.length && t.reduce((r, u) => (r[u] = !0, r), o);
1061
1060
  }
1062
- return n;
1061
+ return o;
1063
1062
  }
1064
- function p(l) {
1065
- l && (l.stopPropagation(), l.preventDefault());
1063
+ function l(a) {
1064
+ a && (a.stopPropagation(), a.preventDefault());
1066
1065
  }
1067
- function i(l, n) {
1068
- p(l);
1069
- const t = n.expanded;
1070
- document.body.click(), n.expanded = !t;
1066
+ function c(a, o) {
1067
+ l(a);
1068
+ const t = o.expanded;
1069
+ document.body.click(), o.expanded = !t;
1071
1070
  }
1072
- const f = function(l) {
1071
+ const p = function(a) {
1073
1072
  const {
1074
- componentType: n
1075
- } = l, t = q(n, l), r = n.toLowerCase().replace("-", "_");
1076
- return t && !t.id && t.type === n && (t.id = `${r}_${Math.random().toString().slice(2, 6)}`), t;
1077
- }, a = function() {
1078
- const l = {
1073
+ componentType: o
1074
+ } = a, t = X(o, a), r = o.toLowerCase().replace("-", "_");
1075
+ return t && !t.id && t.type === o && (t.id = `${r}_${Math.random().toString().slice(2, 6)}`), t;
1076
+ }, b = function() {
1077
+ const a = {
1079
1078
  componentType: "response-toolbar-item",
1080
- parentComponentInstance: o.value,
1079
+ parentComponentInstance: n.value,
1081
1080
  targetPosition: -1
1082
1081
  };
1083
- return f(l);
1082
+ return p(a);
1084
1083
  };
1085
- function y(l) {
1086
- const n = m.schema.buttons || m.schema.contents, t = n == null ? void 0 : n.findIndex((u) => u.id === l), r = t === -1 ? null : n[t];
1084
+ function M(a) {
1085
+ const o = f.schema.buttons || f.schema.contents, t = o == null ? void 0 : o.findIndex((u) => u.id === a), r = t === -1 ? null : o[t];
1087
1086
  return {
1088
1087
  index: t,
1089
1088
  toolbarItem: r
1090
1089
  };
1091
1090
  }
1092
- function v(l, n) {
1093
- var M;
1091
+ function O(a, o) {
1092
+ var I;
1094
1093
  const {
1095
1094
  index: t,
1096
1095
  toolbarItem: r
1097
- } = y(n);
1096
+ } = M(o);
1098
1097
  if (t === -1)
1099
1098
  return;
1100
- const u = r.text || "按钮", R = a(), x = Object.assign({}, R, {
1099
+ const u = r.text || "按钮", T = b(), C = Object.assign({}, T, {
1101
1100
  text: u
1102
1101
  });
1103
- (M = m.schema.buttons) == null || M.push(x), P();
1102
+ (I = f.schema.buttons) == null || I.push(C), w();
1104
1103
  }
1105
- function T(l, n) {
1104
+ function j(a, o) {
1106
1105
  const {
1107
1106
  index: t,
1108
1107
  toolbarItem: r
1109
- } = y(n);
1108
+ } = M(o);
1110
1109
  if (t === -1)
1111
1110
  return;
1112
- const u = r.text || "按钮", R = a(), x = Object.assign({}, R, {
1111
+ const u = r.text || "按钮", T = b(), C = Object.assign({}, T, {
1113
1112
  text: u
1114
- }), M = m.schema.buttons[t].children || [];
1115
- M.push(x), m.schema.buttons[t].children = M, P();
1113
+ }), I = f.schema.buttons[t].children || [];
1114
+ I.push(C), f.schema.buttons[t].children = I, w();
1116
1115
  }
1117
- function O(l, n) {
1118
- const t = m.schema.buttons || m.schema.contents, r = t == null ? void 0 : t.findIndex((u) => u.id === n);
1119
- r !== -1 && (t.splice(r, 1), P());
1116
+ function F(a, o) {
1117
+ const t = f.schema.buttons || f.schema.contents, r = t == null ? void 0 : t.findIndex((u) => u.id === o);
1118
+ r !== -1 && (t.splice(r, 1), w());
1120
1119
  }
1121
- function E(l) {
1122
- return w("div", {
1120
+ function _(a) {
1121
+ return y("div", {
1123
1122
  class: "component-btn-group"
1124
- }, [w("div", null, [w("div", {
1123
+ }, [y("div", null, [y("div", {
1125
1124
  role: "button",
1126
1125
  class: "btn component-settings-button",
1127
1126
  title: "删除",
1128
1127
  ref: "removeButton",
1129
1128
  style: "position:static;",
1130
- onClick: (n) => O(n, l)
1131
- }, [w("i", {
1129
+ onClick: (o) => F(o, a)
1130
+ }, [y("i", {
1132
1131
  class: "f-icon f-icon-yxs_delete"
1133
- }, null)]), w("div", {
1132
+ }, null)]), y("div", {
1134
1133
  role: "button",
1135
1134
  class: "btn component-settings-button",
1136
1135
  title: "复制",
1137
1136
  ref: "copyButton",
1138
1137
  style: "position:static;",
1139
- onClick: (n) => v(n, l)
1140
- }, [w("i", {
1138
+ onClick: (o) => O(o, a)
1139
+ }, [y("i", {
1141
1140
  class: "f-icon f-icon-yxs_copy"
1142
- }, null)]), w("div", {
1141
+ }, null)]), y("div", {
1143
1142
  role: "button",
1144
1143
  class: "btn component-settings-button",
1145
1144
  title: "新增子级",
1146
1145
  ref: "appendChildButton",
1147
1146
  style: "width:85px!important;padding:0 5px;position:static;",
1148
- onClick: (n) => T(n, l)
1149
- }, [w("i", {
1147
+ onClick: (o) => j(o, a)
1148
+ }, [y("i", {
1150
1149
  class: "f-icon f-icon-plus-circle text-white mr-1"
1151
- }, null), w("span", {
1150
+ }, null), y("span", {
1152
1151
  style: "font-size:13px;margin:auto"
1153
- }, [ge("新增子级")])])])]);
1152
+ }, [pe("新增子级")])])])]);
1154
1153
  }
1155
- function k() {
1156
- Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((n) => n.classList.remove("dgComponentFocused"));
1157
- const l = document.getElementsByClassName("dgComponentSelected");
1158
- Array.from(l).forEach((n) => n.classList.remove("dgComponentSelected"));
1154
+ function R() {
1155
+ Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
1156
+ const a = document.getElementsByClassName("dgComponentSelected");
1157
+ Array.from(a).forEach((o) => o.classList.remove("dgComponentSelected"));
1159
1158
  }
1160
- function N(l) {
1161
- l.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
1159
+ function E(a) {
1160
+ a.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
1162
1161
  }
1163
- function j(l) {
1162
+ function k(a) {
1164
1163
  var u;
1165
- const n = m.schema.buttons || m.schema.contents, t = n == null ? void 0 : n.findIndex((R) => R.id === l);
1164
+ const o = f.schema.buttons || f.schema.contents, t = o == null ? void 0 : o.findIndex((T) => T.id === a);
1166
1165
  if (t === -1)
1167
1166
  return;
1168
- const r = n[t];
1169
- (u = m == null ? void 0 : m.setupContext) == null || u.emit("selectionChange", "response-toolbar-item", r);
1170
- }
1171
- function h(l, n) {
1172
- p(l), k(), N(l), p(l), i(l, n), j(n.id);
1173
- }
1174
- function I(l) {
1175
- return w("div", {
1176
- id: l.id,
1177
- class: g(l)
1178
- }, [w("div", {
1179
- class: C(l),
1167
+ const r = o[t];
1168
+ (u = f == null ? void 0 : f.setupContext) == null || u.emit("selectionChange", "response-toolbar-item", r);
1169
+ }
1170
+ function v(a, o) {
1171
+ l(a), R(), E(a), l(a), c(a, o), k(o.id);
1172
+ }
1173
+ function P(a) {
1174
+ return y("div", {
1175
+ id: a.id,
1176
+ class: g(a)
1177
+ }, [y("div", {
1178
+ class: m(a),
1180
1179
  style: "display: flex;padding-right: 0.1rem;",
1181
- onClick: (n) => l.enable && h(n, l)
1182
- }, [E(l.id), e.shouldShowIcon(l) && w("i", {
1183
- class: e.iconClass(l)
1184
- }, null), w("span", null, [l.text]), w("i", {
1180
+ onClick: (o) => a.enable && v(o, a)
1181
+ }, [_(a.id), e.shouldShowIcon(a) && y("i", {
1182
+ class: e.iconClass(a)
1183
+ }, null), y("span", null, [a.text]), y("i", {
1185
1184
  class: "f-icon f-icon-arrow-chevron-down",
1186
1185
  style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
1187
- }, null)]), d(l)]);
1186
+ }, null)]), d(a)]);
1188
1187
  }
1189
1188
  function A() {
1190
- b();
1189
+ h();
1191
1190
  }
1192
1191
  return {
1193
- renderToolbarDropdown: I,
1192
+ renderToolbarDropdown: P,
1194
1193
  clearAllDropDown: A
1195
1194
  };
1196
1195
  }
1197
- function bt() {
1198
- function s(e) {
1199
- var d, b;
1200
- if (!e)
1201
- return !1;
1202
- const o = ((d = e.targetContainer) == null ? void 0 : d.componentInstance) && e.targetContainer.componentInstance.value;
1203
- if (!o)
1204
- return !1;
1205
- const c = (b = o.schema.appearance) == null ? void 0 : b.class;
1206
- if (e.controlCategory === "input" || e.controlType === "form-group") {
1207
- const m = o.schema.type, D = (m === "response-form" || m === "content-container") && c && c.includes("farris-form");
1208
- if (o.schema.type !== "response-layout-item" && !D)
1209
- return !1;
1210
- }
1211
- return e.controlType !== "field-set";
1212
- }
1213
- return {
1214
- basalDragulaRuleForContainer: s
1215
- };
1216
- }
1217
- const yt = "https://json-schema.org/draft/2020-12/schema", vt = "https://farris-design.gitee.io/dragging-rules.schema.json", Ct = "Dragging Rules", wt = "The rules of designer canvas", xt = "object", Tt = {
1218
- "f-page": {
1219
- description: "The root class of page designed by farris.",
1220
- type: "object",
1221
- properties: {
1222
- contents: {
1223
- type: "object",
1224
- properties: {
1225
- "f-page-header": {
1226
- description: "The class of page header designed by farris.",
1227
- type: "string"
1228
- },
1229
- "f-page-main": {
1230
- description: "The class of page body designed by farris.",
1231
- type: "object",
1232
- properties: {
1233
- contents: {
1234
- type: "object",
1235
- properties: {
1236
- "f-struct-like-card": {
1237
- description: "",
1238
- type: "object",
1239
- properties: {
1240
- contents: {
1241
- type: "object",
1242
- properties: {
1243
- "f-struct-form": {
1244
- description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
1245
- type: "object",
1246
- properties: {
1247
- contents: {
1248
- type: "object",
1249
- properties: {
1250
- "f-section-form": {
1251
- description: "The class of section which has wrapped a reponse-form component.",
1252
- type: "object",
1253
- properties: {
1254
- contents: {
1255
- type: "object",
1256
- properties: {
1257
- "f-form-layout": {
1258
- description: "The class of reponse form",
1259
- type: "object",
1260
- properties: {
1261
- rules: {
1262
- type: "object",
1263
- properties: {
1264
- canAccept: {
1265
- type: "boolean",
1266
- const: !0
1267
- },
1268
- fixed: {
1269
- type: "boolean",
1270
- const: !0
1271
- },
1272
- hidePadding: {
1273
- type: "boolean",
1274
- const: !1
1275
- }
1276
- }
1277
- }
1278
- }
1279
- }
1280
- }
1281
- },
1282
- rules: {
1283
- type: "object",
1284
- properties: {
1285
- canAccept: {
1286
- type: "boolean",
1287
- const: !1
1288
- },
1289
- fixed: {
1290
- type: "boolean",
1291
- const: !0
1292
- },
1293
- hidePadding: {
1294
- type: "boolean",
1295
- const: !0
1296
- }
1297
- }
1298
- }
1299
- }
1300
- }
1301
- }
1302
- },
1303
- rules: {
1304
- type: "object",
1305
- properties: {
1306
- canAccept: {
1307
- type: "boolean",
1308
- const: !1
1309
- },
1310
- fixed: {
1311
- type: "boolean",
1312
- const: !1
1313
- },
1314
- hidePadding: {
1315
- type: "boolean",
1316
- const: !0
1317
- }
1318
- }
1319
- }
1320
- }
1321
- },
1322
- "f-struct-wrapper": {
1323
- description: "",
1324
- type: "object",
1325
- properties: {
1326
- contents: {
1327
- type: "object",
1328
- properties: {
1329
- "f-section-tabs": {
1330
- description: "The class of section which has wrapped sub-grid tabs.",
1331
- type: "object",
1332
- properties: {
1333
- contents: {
1334
- type: "object",
1335
- properties: {
1336
- "f-tabs-in-card": {
1337
- description: "The class of tabs which contains sub-grid.",
1338
- type: "object",
1339
- properties: {
1340
- contents: {
1341
- type: "object",
1342
- properties: {
1343
- "f-struct-data-grid-in-card": {
1344
- description: "The class of sub-grid component",
1345
- type: "object",
1346
- properties: {
1347
- contents: {
1348
- type: "object",
1349
- properties: {
1350
- "f-grid-is-sub": {
1351
- description: "The class of sub-grid",
1352
- type: "object",
1353
- properties: {
1354
- rules: {
1355
- type: "object",
1356
- properties: {
1357
- canAccept: {
1358
- type: "boolean",
1359
- const: !0
1360
- },
1361
- fixed: {
1362
- type: "boolean",
1363
- const: !0
1364
- },
1365
- hidePadding: {
1366
- type: "boolean",
1367
- const: !1
1368
- }
1369
- }
1370
- }
1371
- }
1372
- }
1373
- }
1374
- },
1375
- rules: {
1376
- type: "object",
1377
- properties: {
1378
- canAccept: {
1379
- type: "boolean",
1380
- const: !1
1381
- },
1382
- fixed: {
1383
- type: "boolean",
1384
- const: !1
1385
- },
1386
- hidePadding: {
1387
- type: "boolean",
1388
- const: !0
1389
- }
1390
- }
1391
- }
1392
- }
1393
- }
1394
- }
1395
- },
1396
- rules: {
1397
- type: "object",
1398
- properties: {
1399
- canAccept: {
1400
- type: "boolean",
1401
- const: !1
1402
- },
1403
- fixed: {
1404
- type: "boolean",
1405
- const: !0
1406
- },
1407
- hidePadding: {
1408
- type: "boolean",
1409
- const: !0
1410
- }
1411
- }
1412
- }
1413
- }
1414
- }
1415
- }
1416
- },
1417
- rules: {
1418
- type: "object",
1419
- properties: {
1420
- canAccept: {
1421
- type: "boolean",
1422
- const: !1
1423
- },
1424
- fixed: {
1425
- type: "boolean",
1426
- const: !0
1427
- },
1428
- hidePadding: {
1429
- type: "boolean",
1430
- const: !0
1431
- }
1432
- }
1433
- }
1434
- }
1435
- },
1436
- "f-section-in-main": {
1437
- description: "The class of section which has wrapped a reponse-form component.",
1438
- type: "object",
1439
- properties: {
1440
- rules: {
1441
- type: "object",
1442
- properties: {
1443
- canAccept: {
1444
- type: "boolean",
1445
- const: !0
1446
- },
1447
- fixed: {
1448
- type: "boolean",
1449
- const: !0
1450
- },
1451
- hidePadding: {
1452
- type: "boolean",
1453
- const: !1
1454
- }
1455
- }
1456
- }
1457
- }
1458
- }
1459
- }
1460
- },
1461
- rules: {
1462
- type: "object",
1463
- properties: {
1464
- canAccept: {
1465
- type: "boolean",
1466
- const: !1
1467
- },
1468
- fixed: {
1469
- type: "boolean",
1470
- const: !1
1471
- },
1472
- hidePadding: {
1473
- type: "boolean",
1474
- const: !0
1475
- }
1476
- }
1477
- }
1478
- }
1479
- }
1480
- }
1481
- },
1482
- rules: {
1483
- type: "object",
1484
- properties: {
1485
- canAccept: {
1486
- type: "boolean",
1487
- const: !0
1488
- },
1489
- fixed: {
1490
- type: "boolean",
1491
- const: !0
1492
- },
1493
- hidePadding: {
1494
- type: "object",
1495
- const: {
1496
- allOf: [
1497
- {
1498
- sibling: 0,
1499
- parent: {
1500
- "f-page-main": !0
1501
- }
1502
- }
1503
- ]
1504
- }
1505
- }
1506
- }
1507
- }
1508
- }
1509
- },
1510
- "f-struct-data-grid": {
1511
- description: "",
1512
- type: "object",
1513
- properties: {
1514
- rules: {
1515
- type: "object",
1516
- properties: {
1517
- canAccept: {
1518
- type: "object",
1519
- const: !0
1520
- },
1521
- fixed: {
1522
- type: "boolean",
1523
- const: !0
1524
- },
1525
- hidePadding: {
1526
- type: "boolean",
1527
- const: !0
1528
- }
1529
- }
1530
- }
1531
- }
1532
- },
1533
- "f-page-main-content": {
1534
- description: "",
1535
- type: "object",
1536
- properties: {
1537
- contents: {
1538
- type: "object",
1539
- properties: {
1540
- "f-page-content-nav": {
1541
- description: "",
1542
- type: "object",
1543
- properties: {
1544
- contents: {
1545
- type: "object",
1546
- properties: {
1547
- "f-struct-data-grid-in-nav": {
1548
- description: "",
1549
- type: "object",
1550
- properties: {
1551
- contents: {
1552
- type: "object",
1553
- properties: {
1554
- "f-page-content-nav-extend": {
1555
- description: "",
1556
- type: "object"
1557
- },
1558
- "f-section-in-nav": {
1559
- description: "",
1560
- type: "object",
1561
- properties: {
1562
- rules: {
1563
- type: "object",
1564
- properties: {
1565
- canAccept: {
1566
- type: "boolean",
1567
- const: !1
1568
- },
1569
- fixed: {
1570
- type: "boolean",
1571
- const: !0
1572
- },
1573
- hidePadding: {
1574
- type: "boolean",
1575
- const: !1
1576
- }
1577
- }
1578
- }
1579
- }
1580
- }
1581
- }
1582
- },
1583
- rules: {
1584
- type: "object",
1585
- properties: {
1586
- canAccept: {
1587
- type: "boolean",
1588
- const: !0
1589
- },
1590
- fixed: {
1591
- type: "boolean",
1592
- const: !1
1593
- },
1594
- hidePadding: {
1595
- type: "boolean",
1596
- const: !0
1597
- }
1598
- }
1599
- }
1600
- }
1601
- }
1602
- }
1603
- }
1604
- }
1605
- },
1606
- "f-page-content-main": {
1607
- description: "",
1608
- type: "object",
1609
- properties: {}
1610
- }
1611
- }
1612
- }
1613
- }
1614
- },
1615
- "f-page-content": {
1616
- description: "",
1617
- type: "object",
1618
- properties: {
1619
- contents: {
1620
- type: "object",
1621
- properties: {
1622
- "f-page-content-nav": {
1623
- description: "",
1624
- type: "object",
1625
- properties: {
1626
- contents: {
1627
- type: "object",
1628
- properties: {
1629
- "f-list-nav": {
1630
- description: "",
1631
- type: "object"
1632
- },
1633
- "f-list-nav-left": {
1634
- description: "",
1635
- type: "object"
1636
- },
1637
- "f-struct-data-grid-in-nav": {
1638
- description: "",
1639
- type: "object",
1640
- properties: {
1641
- contents: {
1642
- type: "object",
1643
- properties: {
1644
- "f-section-form": {
1645
- description: "",
1646
- type: "object",
1647
- properties: {
1648
- rules: {
1649
- type: "object",
1650
- properties: {
1651
- canAccept: {
1652
- type: "boolean",
1653
- const: !1
1654
- },
1655
- fixed: {
1656
- type: "boolean",
1657
- const: !0
1658
- },
1659
- hidePadding: {
1660
- type: "boolean",
1661
- const: !0
1662
- }
1663
- }
1664
- }
1665
- }
1666
- },
1667
- "f-section-grid": {
1668
- description: "",
1669
- type: "object",
1670
- properties: {
1671
- rules: {
1672
- type: "object",
1673
- properties: {
1674
- canAccept: {
1675
- type: "boolean",
1676
- const: !1
1677
- },
1678
- fixed: {
1679
- type: "boolean",
1680
- const: !0
1681
- },
1682
- hidePadding: {
1683
- type: "boolean",
1684
- const: !0
1685
- }
1686
- }
1687
- }
1688
- }
1689
- }
1690
- }
1691
- },
1692
- rules: {
1693
- type: "object",
1694
- properties: {
1695
- canAccept: {
1696
- type: "boolean",
1697
- const: !1
1698
- },
1699
- fixed: {
1700
- type: "boolean",
1701
- const: !0
1702
- },
1703
- hidePadding: {
1704
- type: "boolean",
1705
- const: !0
1706
- }
1707
- }
1708
- }
1709
- }
1710
- }
1711
- }
1712
- }
1713
- },
1714
- rules: {
1715
- type: "object",
1716
- properties: {
1717
- canAccept: {
1718
- type: "boolean",
1719
- const: !1
1720
- },
1721
- fixed: {
1722
- type: "boolean",
1723
- const: !0
1724
- },
1725
- hidePadding: {
1726
- type: "boolean",
1727
- const: !0
1728
- }
1729
- }
1730
- }
1731
- },
1732
- "f-page-content-main": {
1733
- description: "",
1734
- type: "object",
1735
- properties: {
1736
- rules: {
1737
- type: "object",
1738
- properties: {
1739
- canAccept: {
1740
- type: "boolean",
1741
- const: !1
1742
- },
1743
- fixed: {
1744
- type: "boolean",
1745
- const: !1
1746
- },
1747
- hidePadding: {
1748
- type: "boolean",
1749
- const: !0
1750
- }
1751
- }
1752
- }
1753
- }
1754
- }
1755
- }
1756
- },
1757
- rules: {
1758
- type: "object",
1759
- properties: {
1760
- canAccept: {
1761
- type: "boolean",
1762
- const: !1
1763
- },
1764
- fixed: {
1765
- type: "boolean",
1766
- const: !0
1767
- },
1768
- hidePadding: {
1769
- type: "boolean",
1770
- const: !0
1771
- }
1772
- }
1773
- }
1774
- }
1775
- }
1776
- }
1777
- },
1778
- rules: {
1779
- type: "object",
1780
- properties: {
1781
- canAccept: {
1782
- type: "object",
1783
- const: {
1784
- anyOf: [
1785
- {
1786
- children: 0
1787
- },
1788
- {
1789
- children: {
1790
- length: {
1791
- not: 1
1792
- },
1793
- "f-struct-like-card": !0
1794
- }
1795
- },
1796
- {
1797
- children: {
1798
- "scroll-spy": !1,
1799
- "f-page-content": !1,
1800
- "f-struct-like-card": !1
1801
- }
1802
- }
1803
- ]
1804
- }
1805
- },
1806
- fixed: {
1807
- type: "boolean",
1808
- const: !0
1809
- },
1810
- hidePadding: {
1811
- type: "boolean",
1812
- const: !0
1813
- }
1814
- }
1815
- }
1816
- }
1817
- },
1818
- "f-page-footer": {
1819
- description: "The class of page footer designed by farris.",
1820
- type: "string"
1821
- }
1822
- }
1823
- },
1824
- rules: {
1825
- type: "object",
1826
- properties: {
1827
- canAccept: {
1828
- type: "boolean",
1829
- const: !1
1830
- },
1831
- fixed: {
1832
- type: "boolean",
1833
- const: !0
1834
- },
1835
- hidePadding: {
1836
- type: "boolean",
1837
- const: !0
1838
- }
1839
- }
1840
- }
1841
- }
1842
- },
1843
- "f-page-is-managelist": {
1844
- description: "The root class of mangement list page.",
1845
- type: "string"
1846
- },
1847
- "f-page-card": {
1848
- description: "",
1849
- type: "object"
1850
- },
1851
- "f-page-is-mainsubcard": {
1852
- description: "",
1853
- type: "object"
1854
- }
1855
- }, jt = {
1856
- $schema: yt,
1857
- $id: vt,
1858
- title: Ct,
1859
- description: wt,
1860
- type: xt,
1861
- properties: Tt
1862
- }, K = /* @__PURE__ */ new Map();
1863
- function Pe() {
1864
- function s(a, y, v, T) {
1865
- var O;
1866
- if (typeof v == "number")
1867
- return ((O = T[a]) == null ? void 0 : O.length) === v;
1868
- if (typeof v == "object") {
1869
- const E = Object.keys(v)[0], k = v[E];
1870
- if (E === "not")
1871
- return Number(T[a].length) !== Number(k);
1872
- if (E === "moreThan")
1873
- return Number(T[a].length) >= Number(k);
1874
- if (E === "lessThan")
1875
- return Number(T[a].length) <= Number(k);
1876
- }
1877
- return !1;
1878
- }
1879
- function e(a, y, v, T) {
1880
- return typeof v == "boolean" ? T.childrenClassList.includes(y) === !!v : !1;
1881
- }
1882
- function o(a, y, v, T) {
1883
- return typeof v == "boolean" ? T.parentClassList.includes(y) === !!v : !1;
1884
- }
1885
- function c(a, y, v, T) {
1886
- return typeof v == "boolean" ? T.parentClassList.includes(y) === !!v : !1;
1887
- }
1888
- const d = /* @__PURE__ */ new Map([
1889
- ["length", s],
1890
- ["hasChildren", e],
1891
- ["hasSibling", c],
1892
- ["hasParent", o]
1893
- ]);
1894
- function b(a, y) {
1895
- const v = a;
1896
- return typeof y == "number" ? [{ target: v, operator: "length", param: null, value: Number(y) }] : typeof y == "object" ? Object.keys(y).map((T) => {
1897
- if (T === "length")
1898
- return { target: v, operator: "length", param: null, value: y[T] };
1899
- const O = T, E = y[T];
1900
- return { target: v, operator: a === "children" ? "hasChildren" : a === "parent" ? "hasParent" : "hasSibling", param: O, value: E };
1901
- }) : [];
1902
- }
1903
- function m(a, y) {
1904
- if (d.has(a.operator)) {
1905
- const v = d.get(a.operator);
1906
- return v && v(a.target, a.param, a.value, y) || !1;
1907
- }
1908
- return !1;
1909
- }
1910
- function D(a, y) {
1911
- return Object.keys(a).reduce((E, k) => {
1912
- const N = b(k, a[k]);
1913
- return E.push(...N), E;
1914
- }, []).reduce((E, k) => E && m(k, y), !0);
1915
- }
1916
- function P(a, y) {
1917
- const v = Object.keys(a), T = v.includes("allOf"), O = v.includes("anyOf"), E = T || O, j = (E ? a[E ? T ? "allOf" : "anyOf" : "allOf"] : [a]).map((I) => D(I, y));
1918
- return T ? !j.includes(!1) : j.includes(!0);
1919
- }
1920
- function g(a, y) {
1921
- const v = a.const;
1922
- return v ? typeof v == "boolean" ? v : typeof v == "object" ? P(v, y) : !1 : !1;
1923
- }
1924
- function C(a) {
1925
- return (y) => {
1926
- const v = { canAccept: !0, fixed: !1, hidePadding: !1 };
1927
- return a && a.properties && Object.keys(a.properties).reduce((T, O) => {
1928
- const E = a.properties[O];
1929
- return T[O] = g(E, y), T;
1930
- }, v), v;
1931
- };
1932
- }
1933
- function p(a, y, v) {
1934
- if (y.type === "object" && y.properties) {
1935
- const { rules: T, contents: O } = y.properties;
1936
- v.set(a, C(T)), O && Object.keys(O.properties).forEach(
1937
- (E) => p(E, O.properties[E], v)
1938
- );
1939
- }
1940
- }
1941
- function i() {
1942
- const { properties: a } = jt;
1943
- Object.keys(a).forEach((y) => {
1944
- p(y, a[y], K);
1945
- });
1946
- }
1947
- function f(a, y) {
1948
- const v = { canAccept: !0, fixed: !1, hidePadding: !0 };
1949
- return K.has(a) ? K.get(a)(y) : v;
1950
- }
1951
- return i(), { getRuleValue: f };
1952
- }
1953
- class ae {
1954
- constructor(e, o) {
1955
- B(this, "componentId");
1956
- B(this, "viewModelId");
1957
- B(this, "eventsEditorUtils");
1958
- B(this, "formSchemaUtils");
1959
- B(this, "formMetadataConverter");
1960
- B(this, "designViewModelUtils");
1961
- B(this, "designViewModelField");
1962
- B(this, "controlCreatorUtils");
1963
- B(this, "designerHostService");
1964
- B(this, "schemaService", null);
1965
- B(this, "metadataService", null);
1966
- B(this, "propertyConfig", {
1196
+ class re {
1197
+ constructor(e, n) {
1198
+ D(this, "componentId");
1199
+ D(this, "viewModelId");
1200
+ D(this, "eventsEditorUtils");
1201
+ D(this, "formSchemaUtils");
1202
+ D(this, "formMetadataConverter");
1203
+ D(this, "designViewModelUtils");
1204
+ D(this, "designViewModelField");
1205
+ D(this, "controlCreatorUtils");
1206
+ D(this, "designerHostService");
1207
+ D(this, "schemaService", null);
1208
+ D(this, "metadataService", null);
1209
+ D(this, "propertyConfig", {
1967
1210
  type: "object",
1968
1211
  categories: {}
1969
1212
  });
1970
- var c;
1971
- this.componentId = e, this.designerHostService = o, this.eventsEditorUtils = o.eventsEditorUtils, this.formSchemaUtils = o.formSchemaUtils, this.formMetadataConverter = o.formMetadataConverter, this.viewModelId = ((c = this.formSchemaUtils) == null ? void 0 : c.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = o.designViewModelUtils, this.controlCreatorUtils = o.controlCreatorUtils, this.metadataService = o.metadataService, this.schemaService = o.schemaService;
1213
+ var i;
1214
+ this.componentId = e, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((i = this.formSchemaUtils) == null ? void 0 : i.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
1972
1215
  }
1973
1216
  getTableInfo() {
1974
1217
  var e;
1975
1218
  return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
1976
1219
  }
1977
1220
  setDesignViewModelField(e) {
1978
- const o = e.binding && e.binding.type === "Form" && e.binding.field;
1979
- if (o) {
1221
+ const n = e.binding && e.binding.type === "Form" && e.binding.field;
1222
+ if (n) {
1980
1223
  if (!this.designViewModelField) {
1981
- const c = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1982
- this.designViewModelField = c.fields.find((d) => d.id === o);
1224
+ const i = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1225
+ this.designViewModelField = i.fields.find((d) => d.id === n);
1983
1226
  }
1984
1227
  e.updateOn = this.designViewModelField.updateOn;
1985
1228
  }
1986
1229
  }
1987
- changeFieldEditorType(e, o) {
1230
+ changeFieldEditorType(e, n) {
1988
1231
  }
1989
1232
  getBasicPropConfig(e) {
1990
1233
  return {
@@ -2005,7 +1248,7 @@ class ae {
2005
1248
  type: "combo-list",
2006
1249
  textField: "name",
2007
1250
  valueField: "value",
2008
- data: [{ value: e.type, name: re[e.type].name }]
1251
+ data: [{ value: e.type, name: ne[e.type].name }]
2009
1252
  }
2010
1253
  }
2011
1254
  }
@@ -2037,17 +1280,17 @@ class ae {
2037
1280
  * @param componentInstance
2038
1281
  * @returns
2039
1282
  */
2040
- updateElementByParentContainer(e, o) {
2041
- const c = o && o.parent && o.parent.schema;
2042
- if (!c)
1283
+ updateElementByParentContainer(e, n) {
1284
+ const i = n && n.parent && n.parent.schema;
1285
+ if (!i)
2043
1286
  return;
2044
- const d = c.contents.findIndex((m) => m.id === e), b = me(c.contents[d]);
2045
- c.contents.splice(d, 1), c.contents.splice(d, 0, b);
1287
+ const d = i.contents.findIndex((f) => f.id === e), h = fe(i.contents[d]);
1288
+ i.contents.splice(d, 1), i.contents.splice(d, 0, h);
2046
1289
  }
2047
1290
  }
2048
- class Pt extends ae {
2049
- constructor(e, o) {
2050
- super(e, o);
1291
+ class mt extends re {
1292
+ constructor(e, n) {
1293
+ super(e, n);
2051
1294
  }
2052
1295
  getPropertyConfig(e) {
2053
1296
  return this.getBasicPropConfig(e), this.getBehaviorProperties(e), this.propertyConfig;
@@ -2071,7 +1314,7 @@ class Pt extends ae {
2071
1314
  type: "combo-list",
2072
1315
  textField: "value",
2073
1316
  valueField: "key",
2074
- data: [{ key: "response-toolbar", value: re["response-toolbar"].name }]
1317
+ data: [{ key: "response-toolbar", value: ne["response-toolbar"].name }]
2075
1318
  }
2076
1319
  }
2077
1320
  }
@@ -2114,85 +1357,40 @@ class Pt extends ae {
2114
1357
  };
2115
1358
  }
2116
1359
  }
2117
- function Dt(s, e, o, c) {
2118
- const d = Pe(), b = S(!1), m = S(!1);
2119
- let D = !0, P = !1, g;
2120
- function C(j) {
2121
- return g && g.componentClassList && g.componentClassList.includes("f-form-layout") && g.componentClassList.includes("farris-form") ? j.sourceType === "control" && j.controlCategory === "input" || j.sourceType === "move" && j.controlType === "form-group" : !0;
2122
- }
2123
- function p(j) {
2124
- return !bt().basalDragulaRuleForContainer(j) || !D || !C(j), !1;
2125
- }
2126
- function i() {
2127
- b.value = !1, m.value = !1;
2128
- const j = s, h = j.appearance && j.appearance.class || "", I = h.split(" "), A = j.buttons || [], l = A.length ? A[0] : null, n = l && l.appearance ? l.appearance.class : "", t = n ? n.split(" ") : [], r = A.length ? A.reduce(($, V) => {
2129
- const U = V && V.appearance ? V.appearance.class : "", Y = U ? U.split(" ") : [];
2130
- return $.push(...Y), $;
2131
- }, []) : [], u = o == null ? void 0 : o.schema, R = u && u.appearance && u.appearance.class || "", x = R ? R.split(" ") : [];
2132
- g = {
2133
- componentClass: h,
2134
- componentClassList: I,
2135
- childContents: A,
2136
- firstChildContent: l,
2137
- firstChildClass: n,
2138
- firstChildClassList: t,
2139
- parent: u,
2140
- parentClass: R,
2141
- parentClassList: x,
2142
- children: A,
2143
- childrenClassList: r
2144
- };
2145
- const { canAccept: M, fixed: F, hidePadding: _ } = d.getRuleValue(I[0], g);
2146
- return D = M, P = _, !0;
2147
- }
2148
- function f(j) {
2149
- }
2150
- function a() {
2151
- return s.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
2152
- }
2153
- function y(j, h) {
2154
- return h.text = j.label, h;
1360
+ function ht(s, e) {
1361
+ const n = s.schema;
1362
+ function i(m) {
1363
+ return !1;
2155
1364
  }
2156
- function v(j, h, I) {
2157
- const A = s;
2158
- if ((A.appearance && A.appearance.class || "").split(" ").includes("f-form-layout")) {
2159
- const t = String(j.innerText), r = q("form-group");
2160
- return r.editor = I, r.label = t, r;
2161
- }
2162
- return I;
1365
+ function d(m, l) {
1366
+ return l.text = m.label, l;
2163
1367
  }
2164
- function T() {
1368
+ function h() {
2165
1369
  return !1;
2166
1370
  }
2167
- function O() {
1371
+ function f() {
2168
1372
  return !1;
2169
1373
  }
2170
- function E() {
1374
+ function x() {
2171
1375
  return !0;
2172
1376
  }
2173
- function k() {
2174
- return P;
1377
+ function w() {
1378
+ return !0;
2175
1379
  }
2176
- function N(j) {
2177
- return new Pt(j, e).getPropertyConfig(s);
1380
+ function g(m) {
1381
+ return new mt(m, e).getPropertyConfig(n);
2178
1382
  }
2179
1383
  return {
2180
- canAccepts: p,
2181
- checkCanAddComponent: E,
2182
- checkCanDeleteComponent: O,
2183
- checkCanMoveComponent: T,
2184
- getStyles: a,
2185
- hideNestedPaddingInDesginerView: k,
2186
- onAcceptNewChildElement: v,
2187
- onAcceptMovedChildElement: f,
2188
- onResolveNewComponentSchema: y,
2189
- resolveComponentContext: i,
2190
- getPropsConfig: N,
2191
- triggerBelongedComponentToMoveWhenMoved: b,
2192
- triggerBelongedComponentToDeleteWhenDeleted: m
1384
+ canAccepts: i,
1385
+ checkCanAddComponent: x,
1386
+ checkCanDeleteComponent: f,
1387
+ checkCanMoveComponent: h,
1388
+ hideNestedPaddingInDesginerView: w,
1389
+ onResolveNewComponentSchema: d,
1390
+ getPropsConfig: g
2193
1391
  };
2194
1392
  }
2195
- const It = {
1393
+ const bt = {
2196
1394
  id: { type: String, default: "" },
2197
1395
  componentId: { type: String, default: "" },
2198
1396
  canAdd: { type: Boolean, default: !1 },
@@ -2205,256 +1403,248 @@ const It = {
2205
1403
  * 组件值
2206
1404
  */
2207
1405
  modelValue: { type: Object }
2208
- }, ee = S(0);
2209
- function Et(s, e) {
2210
- const o = e.getBoundingClientRect(), c = s.getBoundingClientRect(), d = c.top >= o.top, b = c.top <= o.bottom;
2211
- return d && b;
1406
+ }, Z = S(0);
1407
+ function yt(s, e) {
1408
+ const n = e.getBoundingClientRect(), i = s.getBoundingClientRect(), d = i.top >= n.top, h = i.top <= n.bottom;
1409
+ return d && h;
2212
1410
  }
2213
- function Rt(s) {
1411
+ function vt(s) {
2214
1412
  if (!s)
2215
1413
  return;
2216
1414
  let e;
2217
1415
  if (s.className.includes("dgComponentSelected") ? e = s : e = s.querySelector(".dgComponentSelected"), !e)
2218
1416
  return;
2219
- const o = e.getBoundingClientRect();
2220
- if (o.width === 0 && o.height === 0)
1417
+ const n = e.getBoundingClientRect();
1418
+ if (n.width === 0 && n.height === 0)
2221
1419
  return;
2222
- const c = e.querySelector(".component-btn-group");
2223
- if (c) {
2224
- if (!Et(e, s)) {
2225
- c.style.display = "none";
1420
+ const i = e.querySelector(".component-btn-group");
1421
+ if (i) {
1422
+ if (!yt(e, s)) {
1423
+ i.style.display = "none";
2226
1424
  return;
2227
1425
  }
2228
- c.style.display = "";
2229
- const b = c.getBoundingClientRect(), m = c.querySelector("div");
2230
- if (m) {
2231
- const D = m.getBoundingClientRect();
2232
- m.style.top = b.top + "px", m.style.left = b.left - D.width + "px";
1426
+ i.style.display = "";
1427
+ const h = i.getBoundingClientRect(), f = i.querySelector("div");
1428
+ if (f) {
1429
+ const x = f.getBoundingClientRect();
1430
+ f.style.top = h.top + "px", f.style.left = h.left - x.width + "px";
2233
1431
  }
2234
1432
  }
2235
1433
  }
2236
- function St(s, e, o) {
2237
- var N;
2238
- function c() {
1434
+ function Ct(s, e, n) {
1435
+ var R;
1436
+ function i() {
2239
1437
  }
2240
- const d = "", b = S();
2241
- function m() {
1438
+ const d = "", h = S();
1439
+ function f() {
2242
1440
  return !0;
2243
1441
  }
2244
- function D() {
1442
+ function x() {
2245
1443
  return !1;
2246
1444
  }
2247
- function P() {
1445
+ function w() {
2248
1446
  return !0;
2249
1447
  }
2250
1448
  function g() {
2251
1449
  return !0;
2252
1450
  }
2253
- function C() {
1451
+ function m() {
2254
1452
  return !0;
2255
1453
  }
2256
- function p(j) {
2257
- if (!j || !j.value)
1454
+ function l(E) {
1455
+ if (!E || !E.value)
2258
1456
  return null;
2259
- const h = S(j == null ? void 0 : j.value.parent), I = p(h);
2260
- return I || null;
1457
+ const k = S(E == null ? void 0 : E.value.parent), v = l(k);
1458
+ return v || null;
2261
1459
  }
2262
- function i(j = e) {
2263
- const { componentInstance: h, designerItemElementRef: I } = j;
2264
- return !h || !h.value ? null : h.value.canMove || h.value.canAdd || h.value.canDelete ? I : i(j.parent);
1460
+ function c(E = e) {
1461
+ const { componentInstance: k, designerItemElementRef: v } = E;
1462
+ return !k || !k.value ? null : k.value.canMove || k.value.canAdd || k.value.canDelete ? v : c(E.parent);
2265
1463
  }
2266
- function f(j) {
2267
- return !!o;
1464
+ function p(E) {
1465
+ return !!n;
2268
1466
  }
2269
- function a() {
1467
+ function b() {
2270
1468
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
2271
1469
  }
2272
- function y() {
1470
+ function M() {
2273
1471
  }
2274
- function v(j, h) {
1472
+ function O(E, k) {
2275
1473
  }
2276
- function T(j) {
2277
- const { componentType: h } = j;
2278
- let I = q(h, j);
2279
- const A = h.toLowerCase().replace("-", "_");
2280
- return I && !I.id && I.type === h && (I.id = `${A}_${Math.random().toString().slice(2, 6)}`), I;
1474
+ function j(E) {
1475
+ const { componentType: k } = E;
1476
+ let v = X(k, E);
1477
+ const P = k.toLowerCase().replace("-", "_");
1478
+ return v && !v.id && v.type === k && (v.id = `${P}_${Math.random().toString().slice(2, 6)}`), v;
2281
1479
  }
2282
- function O(j, h) {
2283
- const I = String(j.getAttribute("data-controltype")), A = j.getAttribute("data-feature"), l = A ? JSON.parse(A) : {};
2284
- l.parentComponentInstance = b.value;
2285
- let n = q(I, l);
2286
- const t = I.toLowerCase().replace("-", "_");
2287
- return n && !n.id && n.type === I && (n.id = `${t}_${Math.random().toString().slice(2, 6)}`), n;
1480
+ function F(E) {
2288
1481
  }
2289
- function E(j) {
2290
- }
2291
- function k(...j) {
1482
+ function _(...E) {
2292
1483
  return [];
2293
1484
  }
2294
- return b.value = {
2295
- canMove: m(),
2296
- canSelectParent: D(),
1485
+ return h.value = {
1486
+ canMove: f(),
1487
+ canSelectParent: x(),
2297
1488
  canAdd: g(),
2298
- canDelete: P(),
2299
- canNested: !C(),
1489
+ canDelete: w(),
1490
+ canNested: !m(),
2300
1491
  contents: [],
2301
1492
  elementRef: s,
2302
- parent: (N = e.parent) == null ? void 0 : N.componentInstance,
1493
+ parent: (R = e.parent) == null ? void 0 : R.componentInstance,
2303
1494
  schema: e.schema,
2304
1495
  styles: d,
2305
- canAccepts: f,
2306
- getBelongedComponentInstance: p,
2307
- getDraggableDesignItemElement: i,
2308
- getDraggingDisplayText: a,
2309
- getPropConfig: k,
2310
- getDragScopeElement: y,
2311
- onAcceptMovedChildElement: v,
2312
- onAcceptNewChildElement: O,
2313
- onChildElementMovedOut: E,
2314
- addNewChildComponentSchema: T,
2315
- updateDragAndDropRules: c,
1496
+ canAccepts: p,
1497
+ getBelongedComponentInstance: l,
1498
+ getDraggableDesignItemElement: c,
1499
+ getDraggingDisplayText: b,
1500
+ getPropConfig: _,
1501
+ getDragScopeElement: M,
1502
+ onAcceptMovedChildElement: O,
1503
+ onChildElementMovedOut: F,
1504
+ addNewChildComponentSchema: j,
1505
+ updateDragAndDropRules: i,
2316
1506
  triggerBelongedComponentToMoveWhenMoved: S(!1),
2317
1507
  triggerBelongedComponentToDeleteWhenDeleted: S(!1)
2318
- }, b;
1508
+ }, h;
2319
1509
  }
2320
- const Mt = /* @__PURE__ */ X({
1510
+ const wt = /* @__PURE__ */ Q({
2321
1511
  name: "FDesignerInnerItem",
2322
- props: It,
1512
+ props: bt,
2323
1513
  emits: ["selectionChange", "addComponent", "removeComponent"],
2324
1514
  setup(s, e) {
2325
- const o = S(s.canMove), c = S(s.canAdd), d = S(s.canDelete), b = S(!1), m = S(s.contentKey), D = S(s.childType), P = S(s.childLabel), g = S(s.modelValue), C = S(""), p = S(), i = L("canvas-dragula"), f = S(), a = L("design-item-context"), y = {
2326
- designerItemElementRef: p,
2327
- componentInstance: f,
1515
+ const n = S(s.canMove), i = S(s.canAdd), d = S(s.canDelete), h = S(!1), f = S(s.contentKey), x = S(s.childType), w = S(s.childLabel), g = S(s.modelValue), m = S(""), l = S(), c = L("canvas-dragula"), p = S(), b = L("design-item-context"), M = {
1516
+ designerItemElementRef: l,
1517
+ componentInstance: p,
2328
1518
  schema: g.value,
2329
- parent: a,
1519
+ parent: b,
2330
1520
  setupContext: e
2331
1521
  };
2332
- Me("design-item-context", y);
2333
- const v = W(() => ({
1522
+ Re("design-item-context", M);
1523
+ const O = V(() => ({
2334
1524
  "farris-component": !0,
2335
1525
  // 受position-relative影响,整个容器的高度不能被撑起
2336
1526
  "flex-fill": s.id == "root-component",
2337
- "position-relative": o.value || d.value,
2338
- "farris-nested": b.value,
2339
- "can-move": o.value,
2340
- "d-none": p.value && p.value.classList.contains("d-none")
2341
- })), T = W(() => {
1527
+ "position-relative": n.value || d.value,
1528
+ "farris-nested": h.value,
1529
+ "can-move": n.value,
1530
+ "d-none": l.value && l.value.classList.contains("d-none")
1531
+ })), j = V(() => {
2342
1532
  const t = {};
2343
- return C.value && C.value.split(";").reduce((r, u) => {
2344
- const [R, x] = u.split(":");
2345
- return R && (r[R] = x), r;
1533
+ return m.value && m.value.split(";").reduce((r, u) => {
1534
+ const [T, C] = u.split(":");
1535
+ return T && (r[T] = C), r;
2346
1536
  }, t), t;
2347
1537
  });
2348
- function O(t, r) {
2349
- if (a && a.schema[m.value]) {
2350
- const u = a.schema[m.value].findIndex((R) => R.id === r.id);
1538
+ function F(t, r) {
1539
+ if (b && b.schema[f.value]) {
1540
+ const u = b.schema[f.value].findIndex((T) => T.id === r.id);
2351
1541
  if (u > -1) {
2352
- const R = a.schema[m.value].length, x = a.schema[m.value][u % R];
2353
- a.designerItemElementRef.value.querySelector(`#${x.id}-design-item`), a.schema[m.value].splice(u, 1), a.componentInstance.value.updateDragAndDropRules(), ee.value++, e.emit("removeComponent");
1542
+ const T = b.schema[f.value].length, C = b.schema[f.value][u % T];
1543
+ b.designerItemElementRef.value.querySelector(`#${C.id}-design-item`), b.schema[f.value].splice(u, 1), b.componentInstance.value.updateDragAndDropRules(), Z.value++, e.emit("removeComponent");
2354
1544
  }
2355
1545
  }
2356
1546
  }
2357
- function E(t) {
2358
- if (f.value.addNewChildComponentSchema) {
1547
+ function _(t) {
1548
+ if (p.value.addNewChildComponentSchema) {
2359
1549
  const r = {
2360
- componentType: D.value,
2361
- label: P.value,
2362
- parentComponentInstance: f.value,
1550
+ componentType: x.value,
1551
+ label: w.value,
1552
+ parentComponentInstance: p.value,
2363
1553
  targetPosition: -1
2364
- }, u = f.value.addNewChildComponentSchema(r);
2365
- g.value[m.value].push(u), e.emit("addComponent");
1554
+ }, u = p.value.addNewChildComponentSchema(r);
1555
+ g.value[f.value].push(u), e.emit("addComponent");
2366
1556
  }
2367
1557
  }
2368
- function k() {
2369
- return c.value && w("div", {
1558
+ function R() {
1559
+ return i.value && y("div", {
2370
1560
  role: "button",
2371
1561
  class: "btn component-settings-button",
2372
1562
  title: "新增",
2373
1563
  ref: "removeComponent",
2374
1564
  onClick: (t) => {
2375
- E();
1565
+ _();
2376
1566
  }
2377
- }, [w("i", {
1567
+ }, [y("i", {
2378
1568
  class: "f-icon f-icon-plus-circle"
2379
1569
  }, null)]);
2380
1570
  }
2381
- function N(t) {
2382
- return d.value && w("div", {
1571
+ function E(t) {
1572
+ return d.value && y("div", {
2383
1573
  role: "button",
2384
1574
  class: "btn component-settings-button",
2385
1575
  title: "删除",
2386
1576
  ref: "removeComponent",
2387
- onClick: Ae((r) => O(r, t), ["stop"])
2388
- }, [w("i", {
1577
+ onClick: Pe((r) => F(r, t), ["stop"])
1578
+ }, [y("i", {
2389
1579
  class: "f-icon f-icon-yxs_delete"
2390
1580
  }, null)]);
2391
1581
  }
2392
- function j() {
2393
- return o.value && w("div", {
1582
+ function k() {
1583
+ return n.value && y("div", {
2394
1584
  role: "button",
2395
1585
  class: "btn component-settings-button",
2396
1586
  title: "移动",
2397
1587
  ref: "moveComponent"
2398
- }, [w("i", {
1588
+ }, [y("i", {
2399
1589
  "data-dragging-icon": "true",
2400
1590
  class: "cmp_move f-icon f-icon-yxs_move"
2401
1591
  }, null)]);
2402
1592
  }
2403
- function h(t) {
2404
- return w("div", {
1593
+ function v(t) {
1594
+ return y("div", {
2405
1595
  class: "component-btn-group",
2406
1596
  "data-noattach": "true"
2407
- }, [w("div", null, [k(), j(), N(t)])]);
1597
+ }, [y("div", null, [R(), k(), E(t)])]);
2408
1598
  }
2409
- H(() => s.modelValue, (t) => {
2410
- g.value = t, y.schema = t;
1599
+ G(() => s.modelValue, (t) => {
1600
+ g.value = t, M.schema = t;
2411
1601
  });
2412
- function I(t) {
1602
+ function P(t) {
2413
1603
  const r = t.target;
2414
- Rt(r);
1604
+ vt(r);
2415
1605
  }
2416
1606
  function A() {
2417
1607
  var t, r;
2418
- (r = (t = g.value) == null ? void 0 : t.contents) != null && r.length && p.value && p.value.addEventListener("scroll", I);
1608
+ (r = (t = g.value) == null ? void 0 : t.contents) != null && r.length && l.value && l.value.addEventListener("scroll", P);
2419
1609
  }
2420
- function l() {
2421
- const t = p.value, r = S(t.children[1]);
2422
- return St(r, y).value;
1610
+ function a() {
1611
+ const t = l.value, r = S(t.children[1]);
1612
+ return Ct(r, M).value;
2423
1613
  }
2424
1614
  z(() => {
2425
- if (p.value) {
2426
- const t = p.value.querySelector(`[data-dragref='${g.value.id}-container']`);
2427
- f.value = t && t.componentInstance ? t.componentInstance.value : l(), i && t && i.attachComponents(t, g.value), b.value = f.value.canNested !== void 0 ? f.value.canNested : b.value, c.value = f.value.canAdd !== void 0 ? f.value.canAdd : c.value, d.value = f.value.canDelete !== void 0 ? f.value.canDelete : d.value, o.value = f.value.canMove !== void 0 ? f.value.canMove : o.value, C.value = f.value.styles || "", p.value && (p.value.componentInstance = f, p.value.designItemContext = y);
1615
+ if (l.value) {
1616
+ const t = l.value.querySelector(`[data-dragref='${g.value.id}-container']`);
1617
+ p.value = t && t.componentInstance ? t.componentInstance.value : a(), c && t && c.attachComponents(t, g.value), h.value = p.value.canNested !== void 0 ? p.value.canNested : h.value, i.value = p.value.canAdd !== void 0 ? p.value.canAdd : i.value, d.value = p.value.canDelete !== void 0 ? p.value.canDelete : d.value, n.value = p.value.canMove !== void 0 ? p.value.canMove : n.value, m.value = p.value.styles || "", l.value && (l.value.componentInstance = p, l.value.designItemContext = M);
2428
1618
  }
2429
- A(), ee.value++;
1619
+ A(), Z.value++;
2430
1620
  }), ke(() => {
2431
- p.value && p.value.removeEventListener("scroll", I);
1621
+ l.value && l.value.removeEventListener("scroll", P);
2432
1622
  });
2433
- function n(t) {
1623
+ function o(t) {
2434
1624
  Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((u) => u.classList.remove("dgComponentFocused")), t && (t.preventDefault(), t.stopPropagation());
2435
- const r = p.value;
1625
+ const r = l.value;
2436
1626
  if (r) {
2437
1627
  const u = document.getElementsByClassName("dgComponentSelected");
2438
- if (!(u && u.length === 1 && u[0] === p.value)) {
2439
- Array.from(u).forEach((M) => M.classList.remove("dgComponentSelected")), r.classList.add("dgComponentFocused"), e.emit("selectionChange", g.value.type, g.value, s.componentId, f.value);
2440
- const x = f.value.getDraggableDesignItemElement(y);
2441
- x && x.value && x.value.classList.add("dgComponentSelected");
1628
+ if (!(u && u.length === 1 && u[0] === l.value)) {
1629
+ Array.from(u).forEach((I) => I.classList.remove("dgComponentSelected")), r.classList.add("dgComponentFocused"), e.emit("selectionChange", g.value.type, g.value, s.componentId, p.value);
1630
+ const C = p.value.getDraggableDesignItemElement(M);
1631
+ C && C.value && C.value.classList.add("dgComponentSelected");
2442
1632
  }
2443
1633
  }
2444
- ee.value++;
1634
+ Z.value++;
2445
1635
  }
2446
- return () => w("div", {
1636
+ return () => y("div", {
2447
1637
  id: `${s.id}-design-item`,
2448
- ref: p,
2449
- class: v.value,
2450
- style: T.value,
2451
- onClick: n
2452
- }, [h(g.value), e.slots.default && e.slots.default()]);
1638
+ ref: l,
1639
+ class: O.value,
1640
+ style: j.value,
1641
+ onClick: o
1642
+ }, [v(g.value), e.slots.default && e.slots.default()]);
2453
1643
  }
2454
1644
  });
2455
- class kt extends ae {
2456
- constructor(e, o) {
2457
- super(e, o);
1645
+ class xt extends re {
1646
+ constructor(e, n) {
1647
+ super(e, n);
2458
1648
  }
2459
1649
  getPropertyConfig(e) {
2460
1650
  return this.getBasicPropConfig(e), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
@@ -2503,20 +1693,20 @@ class kt extends ae {
2503
1693
  title: "style样式"
2504
1694
  }
2505
1695
  },
2506
- setPropertyRelates(o, c) {
1696
+ setPropertyRelates(n, i) {
2507
1697
  }
2508
1698
  };
2509
1699
  }
2510
1700
  getEventPropConfig(e) {
2511
- const o = [
1701
+ const n = [
2512
1702
  {
2513
1703
  label: "onClick",
2514
1704
  name: "点击事件"
2515
1705
  }
2516
1706
  ];
2517
- var c = this;
2518
- const d = c.eventsEditorUtils.formProperties(e, c.viewModelId, o), b = {};
2519
- b[c.viewModelId] = {
1707
+ var i = this;
1708
+ const d = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), h = {};
1709
+ h[i.viewModelId] = {
2520
1710
  type: "events-editor",
2521
1711
  editor: {
2522
1712
  initialData: d
@@ -2524,24 +1714,24 @@ class kt extends ae {
2524
1714
  }, this.propertyConfig.categories.eventsEditor = {
2525
1715
  title: "事件",
2526
1716
  hideTitle: !0,
2527
- properties: b,
1717
+ properties: h,
2528
1718
  // 这个属性,标记当属性变更得时候触发重新更新属性
2529
1719
  refreshPanelAfterChanged: !0,
2530
1720
  tabId: "commands",
2531
1721
  tabName: "交互",
2532
- setPropertyRelates(m, D) {
2533
- const P = m.propertyValue;
2534
- delete e[c.viewModelId], P && (P.setPropertyRelates = this.setPropertyRelates, c.eventsEditorUtils.saveRelatedParameters(e, c.viewModelId, P.events, P));
1722
+ setPropertyRelates(f, x) {
1723
+ const w = f.propertyValue;
1724
+ delete e[i.viewModelId], w && (w.setPropertyRelates = this.setPropertyRelates, i.eventsEditorUtils.saveRelatedParameters(e, i.viewModelId, w.events, w));
2535
1725
  }
2536
1726
  };
2537
1727
  }
2538
1728
  }
2539
- class At extends ae {
2540
- constructor(e, o) {
2541
- super(e, o);
1729
+ class Tt extends re {
1730
+ constructor(e, n) {
1731
+ super(e, n);
2542
1732
  }
2543
1733
  getPropertyConfig(e) {
2544
- return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
1734
+ return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getbBehaviorConfig(), this.getEventPropConfig(e), this.propertyConfig;
2545
1735
  }
2546
1736
  getBasicPropConfig() {
2547
1737
  this.propertyConfig.categories.basic = {
@@ -2562,7 +1752,7 @@ class At extends ae {
2562
1752
  type: "combo-list",
2563
1753
  textField: "value",
2564
1754
  valueField: "key",
2565
- data: [{ key: "response-toolbar-item", value: re["response-toolbar-item"].name }]
1755
+ data: [{ key: "response-toolbar-item", value: ne["response-toolbar-item"].name }]
2566
1756
  }
2567
1757
  },
2568
1758
  text: {
@@ -2579,6 +1769,20 @@ class At extends ae {
2579
1769
  }
2580
1770
  };
2581
1771
  }
1772
+ getbBehaviorConfig() {
1773
+ this.propertyConfig.categories.behavior = {
1774
+ title: "行为",
1775
+ description: "Behavior",
1776
+ properties: {
1777
+ disabled: {
1778
+ title: "禁用状态",
1779
+ type: "boolean",
1780
+ description: "按钮禁用状态",
1781
+ refreshPanelAfterChanged: !0
1782
+ }
1783
+ }
1784
+ };
1785
+ }
2582
1786
  getAppearanceProperties(e) {
2583
1787
  this.propertyConfig.categories.appearance = {
2584
1788
  title: "样式",
@@ -2587,24 +1791,20 @@ class At extends ae {
2587
1791
  class: {
2588
1792
  title: "class",
2589
1793
  type: "string",
2590
- description: ""
2591
- },
2592
- style: {
2593
- title: "style",
2594
- type: "string",
2595
- description: ""
1794
+ description: "",
1795
+ $converter: "/converter/appearance.converter"
2596
1796
  }
2597
1797
  }
2598
1798
  };
2599
1799
  }
2600
1800
  getEventPropConfig(e) {
2601
- const o = [
1801
+ const n = [
2602
1802
  {
2603
1803
  label: "onClick",
2604
1804
  name: "点击事件"
2605
1805
  }
2606
- ], c = this, d = c.eventsEditorUtils.formProperties(e, c.viewModelId, o), b = {};
2607
- b[c.viewModelId] = {
1806
+ ], i = this, d = i.eventsEditorUtils.formProperties(e, i.viewModelId, n), h = {};
1807
+ h[i.viewModelId] = {
2608
1808
  type: "events-editor",
2609
1809
  editor: {
2610
1810
  initialData: d
@@ -2612,272 +1812,242 @@ class At extends ae {
2612
1812
  }, this.propertyConfig.categories.eventsEditor = {
2613
1813
  title: "事件",
2614
1814
  hideTitle: !0,
2615
- properties: b,
1815
+ properties: h,
2616
1816
  // 这个属性,标记当属性变更得时候触发重新更新属性
2617
1817
  refreshPanelAfterChanged: !0,
2618
1818
  tabId: "commands",
2619
1819
  tabName: "交互",
2620
- setPropertyRelates(m, D) {
2621
- const P = m.propertyValue;
2622
- delete e[c.viewModelId], P && (P.setPropertyRelates = this.setPropertyRelates, c.eventsEditorUtils.saveRelatedParameters(e, c.viewModelId, P.events, P));
1820
+ setPropertyRelates(f, x) {
1821
+ const w = f.propertyValue;
1822
+ delete e[i.viewModelId], w && (w.setPropertyRelates = this.setPropertyRelates, i.eventsEditorUtils.saveRelatedParameters(e, i.viewModelId, w.events, w));
2623
1823
  }
2624
1824
  };
2625
1825
  }
2626
1826
  }
2627
- function Bt(s, e) {
2628
- Pe();
2629
- const o = S(!1), c = S(!1);
2630
- let d = !1, b = !1;
2631
- function m(v) {
1827
+ function It(s, e) {
1828
+ function n(x) {
2632
1829
  return !1;
2633
1830
  }
2634
- function D(v) {
2635
- }
2636
- function P() {
2637
- return "";
2638
- }
2639
- function g(v, T) {
2640
- return T.text = v.label, T;
2641
- }
2642
- function C(v, T, O) {
2643
- const E = s.schema;
2644
- if ((E.appearance && E.appearance.class || "").split(" ").includes("f-form-layout")) {
2645
- const j = String(v.innerText), h = q("form-group");
2646
- return h.editor = O, h.label = j, h;
2647
- }
2648
- return O;
2649
- }
2650
- function p() {
1831
+ function i() {
2651
1832
  return !1;
2652
1833
  }
2653
- function i() {
2654
- return !b;
1834
+ function d() {
1835
+ return !0;
2655
1836
  }
2656
- function f() {
1837
+ function h() {
2657
1838
  return !1;
2658
1839
  }
2659
- function a() {
2660
- return d;
2661
- }
2662
- function y(v) {
2663
- let T;
1840
+ function f(x) {
1841
+ let w;
2664
1842
  switch (s.schema.type) {
2665
1843
  case "tab-toolbar-item":
2666
- T = new kt(v, e);
1844
+ w = new xt(x, e);
2667
1845
  break;
2668
1846
  default:
2669
- T = new At(v, e);
1847
+ w = new Tt(x, e);
2670
1848
  }
2671
- return T.getPropertyConfig(s.schema);
1849
+ return w.getPropertyConfig(s.schema);
2672
1850
  }
2673
1851
  return {
2674
- canAccepts: m,
2675
- checkCanAddComponent: f,
2676
- checkCanDeleteComponent: i,
2677
- checkCanMoveComponent: p,
2678
- getStyles: P,
2679
- hideNestedPaddingInDesginerView: a,
2680
- onAcceptNewChildElement: C,
2681
- onAcceptMovedChildElement: D,
2682
- onResolveNewComponentSchema: g,
2683
- getPropsConfig: y,
2684
- triggerBelongedComponentToMoveWhenMoved: o,
2685
- triggerBelongedComponentToDeleteWhenDeleted: c
1852
+ canAccepts: n,
1853
+ checkCanMoveComponent: i,
1854
+ checkCanDeleteComponent: d,
1855
+ checkCanAddComponent: h,
1856
+ getPropsConfig: f
2686
1857
  };
2687
1858
  }
2688
- const De = /* @__PURE__ */ X({
1859
+ const Te = /* @__PURE__ */ Q({
2689
1860
  name: "FResponseToolbarItemDesign",
2690
- props: Te,
1861
+ props: we,
2691
1862
  emits: ["Click"],
2692
1863
  setup(s, e) {
2693
1864
  S(), S();
2694
- const o = S(s.alignment), c = {
1865
+ const n = S(s.alignment), i = {
2695
1866
  id: "__more_buttons__",
2696
1867
  text: "More"
2697
- }, d = S(new G(c));
2698
- W(() => d.value.children.length > 0);
2699
- const b = S(), m = L("designer-host-service"), D = L("design-item-context"), P = Bt(D, m), g = he(b, D, P);
1868
+ }, d = S(new W(i));
1869
+ V(() => d.value.children.length > 0);
1870
+ const h = S(), f = L("designer-host-service"), x = L("design-item-context"), w = It(x, f), g = ge(h, x, w);
2700
1871
  L("toolbar-item-handler", () => {
2701
1872
  }), z(() => {
2702
- b.value.componentInstance = g;
1873
+ h.value.componentInstance = g;
2703
1874
  }), e.expose(g.value);
2704
- function C() {
2705
- const f = {
1875
+ function m() {
1876
+ const p = {
2706
1877
  "f-icon": !0
2707
- }, a = s.icon ? s.icon.trim() : "";
2708
- return J(f, a);
1878
+ }, b = s.icon ? s.icon.trim() : "";
1879
+ return H(p, b);
2709
1880
  }
2710
- function p() {
1881
+ function l() {
2711
1882
  return !!(s.icon && s.icon.trim());
2712
1883
  }
2713
- function i() {
2714
- const f = {
1884
+ function c() {
1885
+ const p = {
2715
1886
  btn: !0,
2716
1887
  "f-rt-btn": !0,
2717
- "f-btn-ml": o.value === "right",
2718
- "f-btn-mr": o.value === "left",
2719
- "btn-icontext": !!(s.icon && s.icon.trim())
1888
+ "f-btn-ml": n.value === "right",
1889
+ "f-btn-mr": n.value === "left",
1890
+ "btn-icontext": !!(s.icon && s.icon.trim()),
1891
+ disabled: s.disabled === !0
2720
1892
  };
2721
- return J(f, s.class);
1893
+ return H(p, s.class);
2722
1894
  }
2723
- return z(() => {
2724
- }), ne(() => {
2725
- }), () => w("div", {
2726
- ref: b,
2727
- "data-dragref": `${D.schema.id}-container`,
1895
+ return () => y("div", {
1896
+ ref: h,
1897
+ "data-dragref": `${x.schema.id}-container`,
2728
1898
  class: "farris-component position-relative",
2729
1899
  style: "display:inline-block!important;"
2730
- }, [w("button", {
1900
+ }, [y("button", {
2731
1901
  type: "button",
2732
- class: i(),
1902
+ class: c(),
2733
1903
  id: s.id
2734
- }, [p() && w("i", {
2735
- class: C()
1904
+ }, [l() && y("i", {
1905
+ class: m()
2736
1906
  }, null), s.text])]);
2737
1907
  }
2738
- }), Ot = /* @__PURE__ */ X({
1908
+ }), Dt = /* @__PURE__ */ Q({
2739
1909
  name: "FResponseToolbarDesign",
2740
- props: dt,
1910
+ props: at,
2741
1911
  emits: ["Click"],
2742
1912
  setup(s, e) {
2743
- const o = S(s.items);
2744
- let c = new Array(o.value.length).fill(S());
2745
- const d = S(), b = S(), m = S(s.alignment), D = {
1913
+ const n = S(s.items);
1914
+ let i = new Array(n.value.length).fill(S());
1915
+ const d = S(), h = S(), f = S(s.alignment), x = {
2746
1916
  id: "__more_buttons__",
2747
1917
  text: "More"
2748
- }, P = S(new G(D)), g = je();
2749
- W(() => P.value.children.length > 0);
2750
- const C = S(), p = L("designer-host-service"), i = L("design-item-context"), f = Dt(i.schema, p, i), a = he(C, i, f);
1918
+ }, w = S(new W(x)), g = xe();
1919
+ V(() => w.value.children.length > 0);
1920
+ const m = S(), l = L("designer-host-service"), c = L("design-item-context"), p = ht(c, l), b = ge(m, c, p);
2751
1921
  L("toolbar-item-handler", () => {
2752
1922
  }), z(() => {
2753
- C.value.componentInstance = a;
2754
- }), e.expose(a.value);
2755
- const y = W(() => J({
1923
+ m.value.componentInstance = b;
1924
+ }), e.expose(b.value);
1925
+ const M = V(() => H({
2756
1926
  "f-toolbar": !0,
2757
1927
  "f-response-toolbar": !0,
2758
1928
  "position-relative": !0
2759
- }, s.customClass)), v = W(() => ({
1929
+ }, s.customClass)), O = V(() => ({
2760
1930
  "d-flex": !0,
2761
1931
  "flex-nowrap": !0,
2762
- "justify-content-end": m.value === "right",
2763
- "justify-content-start": m.value === "left"
1932
+ "justify-content-end": f.value === "right",
1933
+ "justify-content-start": f.value === "left"
2764
1934
  })), {
2765
- renderToolbarDropdown: T,
2766
- clearAllDropDown: O
2767
- } = ht(s, g, a);
2768
- function E() {
2769
- o.value.filter((l) => l.children && l.children.length > 0).forEach((l) => {
2770
- l.expanded = !1;
2771
- }), P.value.expanded = !1, O();
1935
+ renderToolbarDropdown: j,
1936
+ clearAllDropDown: F
1937
+ } = gt(s, g, b);
1938
+ function _() {
1939
+ n.value.filter((a) => a.children && a.children.length > 0).forEach((a) => {
1940
+ a.expanded = !1;
1941
+ }), w.value.expanded = !1, F();
2772
1942
  }
2773
- const k = /* @__PURE__ */ new Map(), N = [];
2774
- function j(l) {
2775
- const n = b.value;
2776
- let t = l;
2777
- const r = Array.from(n.children), u = r[r.length - 1].id === "__more_buttons__" ? r[r.length - 1] : null;
1943
+ const R = /* @__PURE__ */ new Map(), E = [];
1944
+ function k(a) {
1945
+ const o = h.value;
1946
+ let t = a;
1947
+ const r = Array.from(o.children), u = r[r.length - 1].id === "__more_buttons__" ? r[r.length - 1] : null;
2778
1948
  if (u) {
2779
- const _ = u.computedStyleMap().get("margin-left"), $ = u.computedStyleMap().get("margin-right"), V = (_ ? _.value : 0) + u.getBoundingClientRect().width + ($ ? $.value : 0);
2780
- t -= V;
1949
+ const B = u.computedStyleMap().get("margin-left"), $ = u.computedStyleMap().get("margin-right"), U = (B ? B.value : 0) + u.getBoundingClientRect().width + ($ ? $.value : 0);
1950
+ t -= U;
2781
1951
  }
2782
- const R = r.filter((_) => _.id !== "__more_buttons__");
2783
- for (const _ of R) {
2784
- const $ = _.computedStyleMap().get("margin-left"), V = _.computedStyleMap().get("margin-right"), U = ($ ? $.value : 0) + _.getBoundingClientRect().width + (V ? V.value : 0);
2785
- t < U ? (k.set(_.id, !0), N.push({
2786
- id: _.id,
2787
- width: U
2788
- })) : t -= U;
1952
+ const T = r.filter((B) => B.id !== "__more_buttons__");
1953
+ for (const B of T) {
1954
+ const $ = B.computedStyleMap().get("margin-left"), U = B.computedStyleMap().get("margin-right"), q = ($ ? $.value : 0) + B.getBoundingClientRect().width + (U ? U.value : 0);
1955
+ t < q ? (R.set(B.id, !0), E.push({
1956
+ id: B.id,
1957
+ width: q
1958
+ })) : t -= q;
2789
1959
  }
2790
- if (N.length)
2791
- for (let _ = N.length - 1; _ >= 0; _--) {
2792
- const $ = N[_].width;
1960
+ if (E.length)
1961
+ for (let B = E.length - 1; B >= 0; B--) {
1962
+ const $ = E[B].width;
2793
1963
  if (t >= $)
2794
- t -= $, k.delete(N[_].id), N.pop();
1964
+ t -= $, R.delete(E[B].id), E.pop();
2795
1965
  else
2796
1966
  break;
2797
1967
  }
2798
- const x = Object.assign({}, P.value);
2799
- x.children = [];
2800
- const M = new G(x), F = o.value.reduce((_, $) => (k.has($.id) && M.children.push($), $.visible = !k.has($.id), _.push($), _), []);
2801
- P.value = M, o.value = F;
1968
+ const C = Object.assign({}, w.value);
1969
+ C.children = [];
1970
+ const I = new W(C), N = n.value.reduce((B, $) => (R.has($.id) && I.children.push($), $.visible = !R.has($.id), B.push($), B), []);
1971
+ w.value = I, n.value = N;
2802
1972
  }
2803
- const h = new ResizeObserver((l) => {
2804
- if (l.length) {
2805
- const t = l[0].contentRect.width, u = b.value.getBoundingClientRect().width;
2806
- (t < u || N.length) && j(t);
1973
+ const v = new ResizeObserver((a) => {
1974
+ if (a.length) {
1975
+ const t = a[0].contentRect.width, u = h.value.getBoundingClientRect().width;
1976
+ (t < u || E.length) && k(t);
2807
1977
  }
2808
1978
  });
2809
1979
  z(() => {
2810
- const l = d.value;
2811
- h.observe(l), document.body.addEventListener("click", E);
2812
- }), ne(() => {
2813
- h.disconnect(), document.body.removeEventListener("click", E);
2814
- }), H(() => s.items, () => {
2815
- o.value = s.items;
1980
+ const a = d.value;
1981
+ v.observe(a), document.body.addEventListener("click", _);
1982
+ }), ue(() => {
1983
+ v.disconnect(), document.body.removeEventListener("click", _);
1984
+ }), G(() => s.items, () => {
1985
+ n.value = s.items;
2816
1986
  }, {
2817
1987
  deep: !0
2818
- }), H(o, (l) => {
2819
- c = new Array(o.value.length).fill(S());
1988
+ }), G(n, (a) => {
1989
+ i = new Array(n.value.length).fill(S());
2820
1990
  });
2821
- function I(l, n, t, r) {
2822
- i && i.setupContext && i.setupContext.emit("selectionChange", l, n, t, r);
1991
+ function P(a, o, t, r) {
1992
+ c && c.setupContext && c.setupContext.emit("selectionChange", a, o, t, r);
2823
1993
  }
2824
1994
  function A() {
2825
- const l = b.value.querySelector(".dgComponentFocused.dgComponentSelected");
2826
- l == null || l.classList.remove("dgComponentSelected"), l == null || l.classList.remove("dgComponentFocused");
1995
+ const a = h.value.querySelector(".dgComponentFocused.dgComponentSelected");
1996
+ a == null || a.classList.remove("dgComponentSelected"), a == null || a.classList.remove("dgComponentFocused");
2827
1997
  }
2828
- return () => w("div", {
2829
- ref: C,
2830
- "data-dragref": `${i.schema.id}-container`,
2831
- class: y.value
2832
- }, [w("div", {
1998
+ return () => y("div", {
1999
+ ref: m,
2000
+ "data-dragref": `${c.schema.id}-container`,
2001
+ class: M.value
2002
+ }, [y("div", {
2833
2003
  ref: d,
2834
- class: v.value
2835
- }, [w("div", {
2836
- ref: b,
2004
+ class: O.value
2005
+ }, [y("div", {
2006
+ ref: h,
2837
2007
  class: "d-inline-block f-response-content",
2838
2008
  style: "white-space: nowrap;"
2839
- }, [o.value.map((l, n) => w(Mt, {
2840
- ref: c[n],
2009
+ }, [n.value.map((a, o) => y(wt, {
2010
+ ref: i[o],
2841
2011
  class: "p-0 display-inline-block",
2842
- modelValue: l,
2843
- "onUpdate:modelValue": (t) => l = t,
2012
+ modelValue: a,
2013
+ "onUpdate:modelValue": (t) => a = t,
2844
2014
  canMove: !0,
2845
2015
  childType: "response-toolbar-item",
2846
2016
  childLabel: "按钮",
2847
2017
  contentKey: "buttons",
2848
2018
  componentId: s.componentId,
2849
- id: l.id,
2019
+ id: a.id,
2850
2020
  style: "padding:0 !important;display:inline-block",
2851
- onSelectionChange: I,
2021
+ onSelectionChange: P,
2852
2022
  onRemoveComponent: A
2853
2023
  }, {
2854
2024
  default: () => {
2855
2025
  var t;
2856
- return [w(De, {
2857
- id: l.id,
2858
- disable: l.disable,
2859
- text: l.text,
2860
- icon: l.icon,
2861
- class: ((t = l.appearance) == null ? void 0 : t.class) || "btn-secondary",
2026
+ return [y(Te, {
2027
+ id: a.id,
2028
+ disabled: a.disabled,
2029
+ text: a.text,
2030
+ icon: a.icon,
2031
+ class: ((t = a.appearance) == null ? void 0 : t.class) || "btn-secondary",
2862
2032
  alignment: s.alignment || "right",
2863
2033
  componentId: s.componentId
2864
2034
  }, null)];
2865
2035
  }
2866
2036
  }))])])]);
2867
2037
  }
2868
- }), Wt = ce;
2869
- Q.register = (s, e, o) => {
2870
- s["response-toolbar"] = Q, e["response-toolbar"] = ce;
2038
+ }), Bt = se;
2039
+ J.register = (s, e, n) => {
2040
+ s["response-toolbar"] = J, e["response-toolbar"] = se;
2871
2041
  };
2872
- Q.registerDesigner = (s, e, o) => {
2873
- s["response-toolbar"] = Ot, e["response-toolbar"] = ce, s["response-toolbar-item"] = De, e["response-toolbar-item"] = ut;
2042
+ J.registerDesigner = (s, e, n) => {
2043
+ s["response-toolbar"] = Dt, e["response-toolbar"] = se, s["response-toolbar-item"] = Te, e["response-toolbar-item"] = dt;
2874
2044
  };
2875
- const Ut = Be(Q);
2045
+ const At = Be(J);
2876
2046
  export {
2877
- Q as FResponseToolbar,
2878
- G as ResponseToolbarDropDownItem,
2879
- Vt as ResponseToolbarGroup,
2880
- Oe as ResponseToolbarItem,
2881
- Ut as default,
2882
- Wt as responseToolbarResolver
2047
+ J as FResponseToolbar,
2048
+ W as ResponseToolbarDropDownItem,
2049
+ Pt as ResponseToolbarGroup,
2050
+ Ae as ResponseToolbarItem,
2051
+ At as default,
2052
+ Bt as responseToolbarResolver
2883
2053
  };