@farris/ui-vue 1.2.6 → 1.2.8

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 (210) hide show
  1. package/components/accordion/index.esm.js +150 -142
  2. package/components/avatar/index.esm.js +393 -457
  3. package/components/border-editor/index.esm.js +4 -4
  4. package/components/button/index.esm.js +1 -1
  5. package/components/button-edit/index.esm.js +353 -444
  6. package/components/button-group/index.esm.js +5 -5
  7. package/components/calendar/index.esm.js +176 -176
  8. package/components/capsule/index.esm.js +93 -93
  9. package/components/checkbox/index.esm.js +491 -554
  10. package/components/color-picker/index.esm.js +1 -1
  11. package/components/combo-list/index.esm.js +479 -513
  12. package/components/combo-tree/index.esm.js +8 -8
  13. package/components/component/index.esm.js +89 -89
  14. package/components/condition/index.esm.js +857 -743
  15. package/components/content-container/index.esm.js +61 -61
  16. package/components/data-grid/index.esm.js +4883 -5182
  17. package/components/data-view/index.esm.js +3072 -2949
  18. package/components/date-picker/index.esm.js +2626 -2689
  19. package/components/dependent-base/style.js +1 -0
  20. package/components/dependent-fluid/style.js +1 -0
  21. package/components/dependent-icon/style.js +1 -0
  22. package/components/dependent-input/style.js +1 -0
  23. package/components/dependent-table/style.js +1 -0
  24. package/components/designer-canvas/index.esm.js +478 -475
  25. package/components/designer-outline/index.esm.js +173 -131
  26. package/components/discussion-editor/index.esm.js +1 -1
  27. package/components/dropdown/index.esm.js +73 -73
  28. package/components/dynamic-form/index.esm.js +940 -998
  29. package/components/dynamic-resolver/index.esm.js +67 -35
  30. package/components/dynamic-view/index.esm.js +307 -293
  31. package/components/enum-editor/index.esm.js +3 -3
  32. package/components/events-editor/index.esm.js +178 -178
  33. package/components/expression-editor/index.esm.js +105 -105
  34. package/components/external-container/index.esm.js +1747 -1627
  35. package/components/field-selector/index.css +1 -1
  36. package/components/field-selector/index.esm.js +5877 -6176
  37. package/components/filter-bar/index.css +1 -1
  38. package/components/filter-bar/index.esm.js +1454 -1524
  39. package/components/flow-canvas/index.esm.js +678 -675
  40. package/components/image-cropper/index.esm.js +266 -266
  41. package/components/input-group/index.esm.js +659 -722
  42. package/components/layout/index.esm.js +148 -148
  43. package/components/list-nav/index.esm.js +109 -109
  44. package/components/list-view/index.esm.js +1643 -1524
  45. package/components/lookup/index.css +1 -1
  46. package/components/lookup/index.esm.js +6502 -6770
  47. package/components/mapping-editor/index.esm.js +5639 -5939
  48. package/components/message-box/index.esm.js +1 -1
  49. package/components/modal/index.esm.js +1 -1
  50. package/components/nav/index.esm.js +86 -86
  51. package/components/number-range/index.esm.js +1120 -0
  52. package/components/number-range/package.json +8 -0
  53. package/components/number-range/style.js +6 -0
  54. package/components/number-spinner/index.esm.js +1146 -0
  55. package/components/number-spinner/package.json +8 -0
  56. package/components/number-spinner/style.js +4 -0
  57. package/components/order/index.esm.js +1098 -1130
  58. package/components/page-footer/index.esm.js +106 -106
  59. package/components/page-header/index.esm.js +1088 -1317
  60. package/components/pagination/index.esm.js +252 -252
  61. package/components/progress/index.esm.js +37 -37
  62. package/components/property-editor/index.esm.js +1479 -1513
  63. package/components/property-panel/index.css +1 -1
  64. package/components/property-panel/index.esm.js +706 -778
  65. package/components/query-solution/index.css +1 -0
  66. package/components/query-solution/index.esm.js +6935 -0
  67. package/components/query-solution/package.json +8 -0
  68. package/components/query-solution/style.js +2 -0
  69. package/components/radio-button/index.esm.js +64 -64
  70. package/components/radio-group/index.esm.js +453 -516
  71. package/components/rate/index.esm.js +92 -92
  72. package/components/response-layout/index.esm.js +33 -33
  73. package/components/response-layout-editor/index.esm.js +555 -526
  74. package/components/response-toolbar/index.esm.js +1009 -1247
  75. package/components/schema-selector/index.esm.js +3261 -3373
  76. package/components/search-box/index.esm.js +143 -143
  77. package/components/section/index.esm.js +209 -209
  78. package/components/smoke-detector/index.esm.js +22 -22
  79. package/components/spacing-editor/index.esm.js +2 -2
  80. package/components/splitter/index.esm.js +1097 -394
  81. package/components/step/index.esm.js +153 -153
  82. package/components/switch/index.esm.js +441 -504
  83. package/components/tabs/index.esm.js +1849 -2039
  84. package/components/tags/index.esm.js +215 -215
  85. package/components/text/index.esm.js +53 -53
  86. package/components/textarea/index.esm.js +445 -493
  87. package/components/time-picker/index.esm.js +1350 -1414
  88. package/components/transfer/index.esm.js +146 -144
  89. package/components/tree-grid/index.css +1 -1
  90. package/components/tree-grid/index.esm.js +5948 -6237
  91. package/components/tree-view/index.esm.js +2381 -2255
  92. package/components/uploader/index.esm.js +1 -1
  93. package/components/verify-detail/index.esm.js +232 -232
  94. package/components/video/index.esm.js +136 -136
  95. package/components/weather/index.esm.js +2 -2
  96. package/farris.all.esm.js +27221 -26804
  97. package/farris.all.umd.cjs +9 -9
  98. package/index.css +1 -1
  99. package/package.json +1 -1
  100. package/types/checkbox/index.d.ts +1 -0
  101. package/types/combo-list/src/components/list-container.component.d.ts +6 -0
  102. package/types/combo-list/src/components/list-container.props.d.ts +9 -1
  103. package/types/data-grid/src/data-grid.props.d.ts +1 -0
  104. package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
  105. package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
  106. package/types/data-view/composition/types.d.ts +1 -1
  107. package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
  108. package/types/designer-canvas/src/types.d.ts +1 -1
  109. package/types/dynamic-form/index.d.ts +1 -0
  110. package/types/dynamic-form/src/types.d.ts +1 -1
  111. package/types/dynamic-resolver/index.d.ts +1 -0
  112. package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
  113. package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
  114. package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +0 -4
  115. package/types/lookup/src/property-config/lookup.property-config.d.ts +4 -3
  116. package/types/modal/src/modal.props.d.ts +1 -4
  117. package/types/property-panel/src/composition/entity/base-property.d.ts +0 -28
  118. package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -5
  119. package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
  120. package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
  121. package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
  122. package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
  123. package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
  124. package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
  125. package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
  126. package/components/accordion/index.umd.cjs +0 -1
  127. package/components/avatar/index.umd.cjs +0 -1
  128. package/components/border-editor/index.umd.cjs +0 -1
  129. package/components/button/index.umd.cjs +0 -1
  130. package/components/button-edit/index.umd.cjs +0 -1
  131. package/components/button-group/index.umd.cjs +0 -1
  132. package/components/calculator/index.umd.cjs +0 -1
  133. package/components/calendar/index.umd.cjs +0 -1
  134. package/components/capsule/index.umd.cjs +0 -1
  135. package/components/checkbox/index.umd.cjs +0 -1
  136. package/components/color-picker/index.umd.cjs +0 -3
  137. package/components/combo-list/index.umd.cjs +0 -1
  138. package/components/combo-tree/index.umd.cjs +0 -1
  139. package/components/common/index.umd.cjs +0 -1
  140. package/components/component/index.umd.cjs +0 -1
  141. package/components/condition/index.umd.cjs +0 -1
  142. package/components/content-container/index.umd.cjs +0 -1
  143. package/components/data-grid/index.umd.cjs +0 -1
  144. package/components/data-view/index.umd.cjs +0 -1
  145. package/components/date-picker/index.umd.cjs +0 -1
  146. package/components/designer-canvas/index.umd.cjs +0 -1
  147. package/components/designer-outline/index.umd.cjs +0 -1
  148. package/components/designer-toolbox/index.umd.cjs +0 -1
  149. package/components/discussion-editor/index.umd.cjs +0 -3
  150. package/components/discussion-list/index.umd.cjs +0 -1
  151. package/components/drawer/index.umd.cjs +0 -1
  152. package/components/dropdown/index.umd.cjs +0 -2
  153. package/components/dynamic-form/index.umd.cjs +0 -1
  154. package/components/dynamic-resolver/index.umd.cjs +0 -1
  155. package/components/dynamic-view/index.umd.cjs +0 -1
  156. package/components/enum-editor/index.umd.cjs +0 -1
  157. package/components/events-editor/index.umd.cjs +0 -1
  158. package/components/expression-editor/index.umd.cjs +0 -1
  159. package/components/external-container/index.umd.cjs +0 -1
  160. package/components/field-selector/index.umd.cjs +0 -1
  161. package/components/filter-bar/index.umd.cjs +0 -1
  162. package/components/flow-canvas/index.umd.cjs +0 -1
  163. package/components/image-cropper/index.umd.cjs +0 -1
  164. package/components/input-group/index.umd.cjs +0 -1
  165. package/components/layout/index.umd.cjs +0 -1
  166. package/components/list-nav/index.umd.cjs +0 -1
  167. package/components/list-view/index.umd.cjs +0 -1
  168. package/components/loading/index.umd.cjs +0 -8
  169. package/components/locale/index.umd.cjs +0 -1
  170. package/components/lookup/index.umd.cjs +0 -1
  171. package/components/mapping-editor/index.umd.cjs +0 -1
  172. package/components/message-box/index.umd.cjs +0 -1
  173. package/components/modal/index.umd.cjs +0 -1
  174. package/components/nav/index.umd.cjs +0 -3
  175. package/components/notify/index.umd.cjs +0 -1
  176. package/components/order/index.umd.cjs +0 -1
  177. package/components/page-footer/index.umd.cjs +0 -1
  178. package/components/page-header/index.umd.cjs +0 -1
  179. package/components/pagination/index.umd.cjs +0 -1
  180. package/components/popover/index.umd.cjs +0 -1
  181. package/components/progress/index.umd.cjs +0 -3
  182. package/components/property-editor/index.umd.cjs +0 -3
  183. package/components/property-panel/index.umd.cjs +0 -1
  184. package/components/radio-button/index.umd.cjs +0 -1
  185. package/components/radio-group/index.umd.cjs +0 -1
  186. package/components/rate/index.umd.cjs +0 -1
  187. package/components/response-layout/index.umd.cjs +0 -1
  188. package/components/response-layout-editor/index.umd.cjs +0 -1
  189. package/components/response-toolbar/index.umd.cjs +0 -1
  190. package/components/schema-selector/index.umd.cjs +0 -8
  191. package/components/search-box/index.umd.cjs +0 -1
  192. package/components/section/index.umd.cjs +0 -1
  193. package/components/smoke-detector/index.umd.cjs +0 -1
  194. package/components/spacing-editor/index.umd.cjs +0 -1
  195. package/components/splitter/index.umd.cjs +0 -1
  196. package/components/step/index.umd.cjs +0 -1
  197. package/components/switch/index.umd.cjs +0 -1
  198. package/components/tabs/index.umd.cjs +0 -1
  199. package/components/tags/index.umd.cjs +0 -1
  200. package/components/text/index.umd.cjs +0 -1
  201. package/components/textarea/index.umd.cjs +0 -1
  202. package/components/time-picker/index.umd.cjs +0 -1
  203. package/components/tooltip/index.umd.cjs +0 -1
  204. package/components/transfer/index.umd.cjs +0 -1
  205. package/components/tree-grid/index.umd.cjs +0 -1
  206. package/components/tree-view/index.umd.cjs +0 -1
  207. package/components/uploader/index.umd.cjs +0 -2
  208. package/components/verify-detail/index.umd.cjs +0 -1
  209. package/components/video/index.umd.cjs +0 -1
  210. package/components/weather/index.umd.cjs +0 -16
@@ -1,40 +1,40 @@
1
1
  var Pe = Object.defineProperty;
2
- var ke = (r, e, n) => e in r ? Pe(r, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[e] = n;
3
- var F = (r, e, n) => ke(r, typeof e != "symbol" ? e + "" : e, n);
4
- import { computed as W, getCurrentInstance as de, createVNode as w, ref as j, defineComponent as Y, onMounted as H, onUnmounted as ne, watch as Q, inject as $, createTextVNode as ue, provide as Re, onBeforeUnmount as Ee, withModifiers as je } from "vue";
5
- import { cloneDeep as Be } from "lodash-es";
6
- import { useDesignerInnerComponent as fe } from "@farris/ui-vue/components/designer-canvas/src/composition/function/use-designer-inner-component";
7
- import { withInstall as Ae } from "@farris/ui-vue/components/common";
2
+ var Re = (s, e, o) => e in s ? Pe(s, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[e] = o;
3
+ var A = (s, e, o) => Re(s, typeof e != "symbol" ? e + "" : e, o);
4
+ import { computed as W, getCurrentInstance as de, createVNode as w, ref as S, defineComponent as Q, onMounted as z, onUnmounted as te, watch as H, inject as L, createTextVNode as ue, provide as Ee, onBeforeUnmount as Se, withModifiers as Me } from "vue";
5
+ import { cloneDeep as ke } from "lodash-es";
6
+ import { useDesignerInnerComponent as fe } from "../designer-canvas/index.esm.js";
7
+ import { withInstall as Be } from "../common/index.esm.js";
8
8
  class me {
9
9
  constructor(e) {
10
10
  /** 工具栏项标识 */
11
- F(this, "id", "");
11
+ A(this, "id", "");
12
12
  /** 工具栏项自定义样式 */
13
- F(this, "class", "btn-secondary");
13
+ A(this, "class", "btn-secondary");
14
14
  /** 图标 */
15
- F(this, "icon", "");
15
+ A(this, "icon", "");
16
16
  /** 所属分组 */
17
- F(this, "groupId", "");
17
+ A(this, "groupId", "");
18
18
  /** 收藏顺序 */
19
- F(this, "order", -1);
19
+ A(this, "order", -1);
20
20
  /** 是否作为下拉菜单的顶层按钮 */
21
- F(this, "asDropDownTop", !1);
21
+ A(this, "asDropDownTop", !1);
22
22
  /** 文本 */
23
- F(this, "text", "");
23
+ A(this, "text", "");
24
24
  /** 是否可见 */
25
- F(this, "visible", !0);
26
- F(this, "responsed", !1);
25
+ A(this, "visible", !0);
26
+ A(this, "responsed", !1);
27
27
  /** 是否启用提示消息 */
28
- F(this, "tipsEnable", !1);
28
+ A(this, "tipsEnable", !1);
29
29
  /** 提示消息内容 */
30
- F(this, "tipsText", "");
30
+ A(this, "tipsText", "");
31
31
  /** 记录宽度 */
32
- F(this, "width", 0);
33
- F(this, "onClick", () => {
32
+ A(this, "width", 0);
33
+ A(this, "onClick", () => {
34
34
  });
35
- F(this, "options");
35
+ A(this, "options");
36
36
  this.options = e;
37
- const n = [
37
+ const o = [
38
38
  "id",
39
39
  "class",
40
40
  "icon",
@@ -50,8 +50,8 @@ class me {
50
50
  "tipsText",
51
51
  "onClick"
52
52
  ];
53
- Object.keys(e).filter((a) => n.indexOf(a) > -1).forEach((a) => {
54
- this[a] = e[a];
53
+ Object.keys(e).filter((p) => o.indexOf(p) > -1).forEach((p) => {
54
+ this[p] = e[p];
55
55
  });
56
56
  }
57
57
  /** 是否可用 */
@@ -67,49 +67,49 @@ class me {
67
67
  return this.visible ? this.width : !1;
68
68
  }
69
69
  }
70
- class Fe extends me {
70
+ class Ae extends me {
71
71
  constructor(e) {
72
72
  super(e);
73
73
  }
74
74
  }
75
75
  function ge() {
76
- function r(e) {
77
- const n = [];
78
- return e.reduce((a, u) => (u.children && u.children.length > 0 ? a.push(new G(u)) : a.push(new Fe(u)), a), n), n;
76
+ function s(e) {
77
+ const o = [];
78
+ return e.reduce((p, f) => (f.children && f.children.length > 0 ? p.push(new G(f)) : p.push(new Ae(f)), p), o), o;
79
79
  }
80
- return { buildResponseToolbarItems: r };
80
+ return { buildResponseToolbarItems: s };
81
81
  }
82
82
  const { buildResponseToolbarItems: Oe } = ge();
83
83
  class G extends me {
84
- constructor(n) {
85
- super(n);
86
- F(this, "placement", "");
84
+ constructor(o) {
85
+ super(o);
86
+ A(this, "placement", "");
87
87
  // 下拉位置
88
88
  /** 下拉class */
89
- F(this, "dropdownClass", "");
89
+ A(this, "dropdownClass", "");
90
90
  /** 下拉菜单class */
91
- F(this, "menuClass", "");
91
+ A(this, "menuClass", "");
92
92
  /** 是否用分开的下拉按钮 */
93
- F(this, "split", !1);
94
- F(this, "children", []);
95
- F(this, "expanded", !1);
96
- const a = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
97
- Object.keys(n).filter((u) => a.indexOf(u) > -1).forEach((u) => {
98
- this[u] = n[u];
99
- }), n.children && n.children.length && (this.children = Oe(n.children));
93
+ A(this, "split", !1);
94
+ A(this, "children", []);
95
+ A(this, "expanded", !1);
96
+ const p = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
97
+ Object.keys(o).filter((f) => p.indexOf(f) > -1).forEach((f) => {
98
+ this[f] = o[f];
99
+ }), o.children && o.children.length && (this.children = Oe(o.children));
100
100
  }
101
101
  }
102
102
  class Nt {
103
- constructor(e, n) {
104
- F(this, "id");
105
- F(this, "name");
103
+ constructor(e, o) {
104
+ A(this, "id");
105
+ A(this, "name");
106
106
  /** 记录元素的Id */
107
- F(this, "presetId", []);
107
+ A(this, "presetId", []);
108
108
  /** 记录转变为下拉时元素的位置 */
109
- F(this, "responsedIndex", []);
109
+ A(this, "responsedIndex", []);
110
110
  /** 记录宽度 */
111
- F(this, "width");
112
- this.id = e, this.name = n, this.width = 0;
111
+ A(this, "width");
112
+ this.id = e, this.name = o, this.width = 0;
113
113
  }
114
114
  // 设置宽度
115
115
  setWidth(e) {
@@ -144,104 +144,102 @@ class Nt {
144
144
  return this.presetId.length === this.responsedIndex.length;
145
145
  }
146
146
  }
147
- const oe = {}, ye = {};
148
- function re(r) {
149
- const { properties: e, title: n } = r, a = Object.keys(e).reduce((u, m) => (u[m] = e[m].type === "object" && e[m].properties ? re(e[m]) : Be(e[m].default), u), {});
150
- return a.id = `${n}-${Date.now()}`, a;
147
+ const ne = {}, he = {};
148
+ function oe(s) {
149
+ const { properties: e, title: o } = s, p = Object.keys(e).reduce((f, y) => (f[y] = e[y].type === "object" && e[y].properties ? oe(e[y]) : ke(e[y].default), f), {});
150
+ return p.id = `${o}-${Date.now()}`, p;
151
151
  }
152
- function q(r, e = {}) {
153
- const n = oe[r];
154
- if (n) {
155
- let a = re(n);
156
- const u = ye[r];
157
- return a = u ? u({ getSchemaByType: q }, a, e) : a, a;
152
+ function q(s, e = {}) {
153
+ const o = ne[s];
154
+ if (o) {
155
+ let p = oe(o);
156
+ const f = he[s];
157
+ return p = f ? f({ getSchemaByType: q }, p, e) : p, p;
158
158
  }
159
159
  return null;
160
160
  }
161
- function Le(r, e) {
162
- const n = re(e);
163
- return Object.keys(r).reduce((a, u) => (a[u] = r[u], a), n), n;
161
+ function _e(s, e) {
162
+ const o = oe(e);
163
+ return Object.keys(s).reduce((p, f) => (p[f] && typeof p[f] == "object" ? Object.assign(p[f], s[f]) : p[f] = s[f], p), o), o;
164
164
  }
165
- function Ne(r, e) {
166
- return Object.keys(r).filter((a) => r[a] != null).reduce((a, u) => {
167
- if (e.has(u)) {
168
- const m = e.get(u);
169
- if (typeof m == "string")
170
- a[m] = r[u];
165
+ function Ne(s, e) {
166
+ return Object.keys(s).filter((p) => s[p] != null).reduce((p, f) => {
167
+ if (e.has(f)) {
168
+ const y = e.get(f);
169
+ if (typeof y == "string")
170
+ p[y] = s[f];
171
171
  else {
172
- const v = m(u, r[u], r);
173
- Object.assign(a, v);
172
+ const C = y(f, s[f], s);
173
+ Object.assign(p, C);
174
174
  }
175
175
  } else
176
- a[u] = r[u];
177
- return a;
176
+ p[f] = s[f];
177
+ return p;
178
178
  }, {});
179
179
  }
180
- function Ve(r, e, n = /* @__PURE__ */ new Map()) {
181
- const a = Le(r, e);
182
- return Ne(a, n);
180
+ function $e(s, e, o = /* @__PURE__ */ new Map()) {
181
+ const p = _e(s, e);
182
+ return Ne(p, o);
183
183
  }
184
- function _e(r = {}) {
185
- function e(g, C, p, c) {
186
- if (typeof p == "number")
187
- return c[g].length === p;
188
- if (typeof p == "object") {
189
- const d = Object.keys(p)[0], s = p[d];
184
+ function Fe(s = {}) {
185
+ function e(g, v, l, c) {
186
+ if (typeof l == "number")
187
+ return c[g].length === l;
188
+ if (typeof l == "object") {
189
+ const d = Object.keys(l)[0], i = l[d];
190
190
  if (d === "not")
191
- return Number(c[g].length) !== Number(s);
191
+ return Number(c[g].length) !== Number(i);
192
192
  if (d === "moreThan")
193
- return Number(c[g].length) >= Number(s);
193
+ return Number(c[g].length) >= Number(i);
194
194
  if (d === "lessThan")
195
- return Number(c[g].length) <= Number(s);
195
+ return Number(c[g].length) <= Number(i);
196
196
  }
197
197
  return !1;
198
198
  }
199
- function n(g, C, p, c) {
200
- return c[g] && c[g].propertyValue && String(c[g].propertyValue.value) === String(p);
199
+ function o(g, v, l, c) {
200
+ return c[g] && c[g].propertyValue && String(c[g].propertyValue.value) === String(l);
201
201
  }
202
- const a = /* @__PURE__ */ new Map([
202
+ const p = /* @__PURE__ */ new Map([
203
203
  ["length", e],
204
- ["getProperty", n]
204
+ ["getProperty", o]
205
205
  ]);
206
- Object.keys(r).reduce((g, C) => (g.set(C, r[C]), g), a);
207
- function u(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((c) => {
206
+ Object.keys(s).reduce((g, v) => (g.set(v, s[v]), g), p);
207
+ function f(g, v) {
208
+ const l = g;
209
+ return typeof v == "number" ? [{ target: l, operator: "length", param: null, value: Number(v) }] : typeof v == "boolean" ? [{ target: l, operator: "getProperty", param: g, value: !!v }] : typeof v == "object" ? Object.keys(v).map((c) => {
210
210
  if (c === "length")
211
- return { target: p, operator: "length", param: null, value: C[c] };
212
- const d = c, s = C[c];
213
- return { target: p, operator: "getProperty", param: d, value: s };
211
+ return { target: l, operator: "length", param: null, value: v[c] };
212
+ const d = c, i = v[c];
213
+ return { target: l, operator: "getProperty", param: d, value: i };
214
214
  }) : [];
215
215
  }
216
- function m(g) {
217
- return Object.keys(g).reduce((p, c) => {
218
- const d = u(c, g[c]);
219
- return p.push(...d), p;
216
+ function y(g) {
217
+ return Object.keys(g).reduce((l, c) => {
218
+ const d = f(c, g[c]);
219
+ return l.push(...d), l;
220
220
  }, []);
221
221
  }
222
- function v(g, C) {
223
- if (a.has(g.operator)) {
224
- const p = a.get(g.operator);
225
- return p && p(g.target, g.param, g.value, C) || !1;
222
+ function C(g, v) {
223
+ if (p.has(g.operator)) {
224
+ const l = p.get(g.operator);
225
+ return l && l(g.target, g.param, g.value, v) || !1;
226
226
  }
227
227
  return !1;
228
228
  }
229
- function M(g, C) {
230
- return m(g).reduce((d, s) => d && v(s, C), !0);
229
+ function k(g, v) {
230
+ return y(g).reduce((d, i) => d && C(i, v), !0);
231
231
  }
232
- function S(g, C) {
233
- const p = Object.keys(g), c = p.includes("allOf"), d = p.includes("anyOf"), s = c || d, x = (s ? g[s ? c ? "allOf" : "anyOf" : "allOf"] : [g]).map((k) => M(k, C));
234
- return c ? !x.includes(!1) : x.includes(!0);
232
+ function D(g, v) {
233
+ const l = Object.keys(g), c = l.includes("allOf"), d = l.includes("anyOf"), i = c || d, T = (i ? g[i ? c ? "allOf" : "anyOf" : "allOf"] : [g]).map((P) => k(P, v));
234
+ return c ? !T.includes(!1) : T.includes(!0);
235
235
  }
236
- return { parseValueSchema: S };
236
+ return { parseValueSchema: D };
237
237
  }
238
- const I = {
239
- Button: { type: "Button", name: "按钮", icon: "Button" },
240
- ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
238
+ const se = {
239
+ button: { type: "button", name: "按钮", icon: "Button" },
241
240
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
242
- "response-toolbar-item": { type: "response-toolbar-item", name: "工具栏项", icon: "Button" },
241
+ "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
243
242
  "content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
244
- DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
245
243
  "input-group": { type: "input-group", name: "文本", icon: "TextBox" },
246
244
  textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
247
245
  lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
@@ -252,115 +250,44 @@ const I = {
252
250
  "check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
253
251
  "check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
254
252
  "combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
255
- /** 暂时没用 */
256
- FlexLayout: { type: "FlexLayout", name: "弹性布局" },
257
- /** 暂时没用 */
258
- FlowLayout: { type: "FlowLayout", name: "流布局" },
259
- ResponseLayout: { type: "ResponseLayout", name: "布局容器", icon: "ResponseLayout3" },
260
- ResponseLayoutItem: { type: "ResponseLayoutItem", name: "布局", icon: "ResponseLayout1" },
253
+ "response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
254
+ "response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
255
+ "response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
261
256
  "tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
262
- TreeGridField: { type: "TreeGridField", name: "树表格列" },
263
- FieldSet: { type: "FieldSet", name: "分组", icon: "FieldSet" },
264
- Form: { type: "Form", name: "卡片面板", icon: "Form" },
265
- QueryForm: { type: "QueryForm", name: "查询面板", icon: "Form" },
257
+ "tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
266
258
  "data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
267
259
  "data-grid-column": { type: "data-grid-column", name: "表格列" },
268
- Panel: { type: "Panel", name: "面板", icon: "ContentContainer" },
269
- Module: { type: "Module", name: "模块", icon: "Module" },
260
+ module: { type: "Module", name: "模块", icon: "Module" },
270
261
  component: { type: "component", name: "组件", icon: "Component" },
271
- ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
272
- Image: { type: "Image", name: "图像", icon: "Image" },
273
- ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
274
- HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
275
- ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
276
- RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
277
262
  tabs: { type: "tabs", name: "标签页", icon: "Tab" },
278
263
  "tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
279
264
  "tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
280
- Tag: { type: "Tag", name: "Tag", icon: "Tag" },
281
- Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
282
- HtmlTemplate: { type: "HtmlTemplate", name: "模版容器", icon: "HtmlTemplate" },
283
- ListView: { type: "ListView", name: "列表", icon: "ListView" },
284
- RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
285
- TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
286
- TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
265
+ "time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
287
266
  section: { type: "section", name: "分组面板", icon: "Section" },
288
- SectionToolbar: { type: "SectionToolbar", name: "分组面板工具栏" },
289
- SectionToolbarItem: { type: "SectionToolbarItem", name: "分组面板按钮" },
290
- QueryScheme: { type: "QueryScheme", name: "筛选方案", icon: "QueryScheme" },
291
- FormHeader: { type: "FormHeader", name: "翻页" },
292
- Splitter: { type: "Splitter", name: "分栏面板", icon: "Splitter" },
293
- SplitterPane: { type: "SplitterPane", name: "分栏面板项", dependentParentControl: "Splitter" },
294
- WizardDetail: { type: "WizardDetail", name: "向导详情页" },
295
- WizardDetailContainer: { type: "WizardDetailContainer", name: "向导详情容器" },
296
- Wizard: { type: "Wizard", name: "向导", icon: "Wizard" },
297
- MultiSelect: { type: "MultiSelect", name: "数据分配", icon: "MultiSelect" },
298
- Steps: { type: "Steps", name: "步骤条", icon: "Steps" },
299
- avatar: { type: "avatar", name: "头像", icon: "Avatar" },
300
- ListFilter: { type: "ListFilter", name: "筛选条", icon: "ListFilter" },
301
- ListNav: { type: "ListNav", name: "列表导航", icon: "ListNav" },
302
- NumberRange: { type: "NumberRange", name: "数字区间选择", icon: "NumericBox" },
303
- Scrollspy: { type: "Scrollspy", name: "滚动监听", icon: "Scrollspy" },
304
- LanguageTextBox: { type: "LanguageTextBox", name: "多语言输入框", icon: "LanguageTextBox" },
305
- ComponentRef: { type: "ComponentRef", name: "组件引用节点" },
306
- FileUpload: { type: "FileUpload", name: "附件上传", icon: "FileUpload" },
307
- FilePreview: { type: "FilePreview", name: "附件预览", icon: "FilePreview" },
308
- ViewChange: { type: "ViewChange", name: "多视图切换", icon: "Button" },
309
- MultiViewContainer: { type: "MultiViewContainer", name: "多视图", icon: "MultiViewContainer" },
310
- MultiViewItem: { type: "MultiViewItem", name: "多视图项", dependentParentControl: "MultiViewContainer" },
311
- Footer: { type: "Footer", name: "页脚" },
312
- DiscussionEditor: { type: "DiscussionEditor", name: "评论编辑区", icon: "DiscussionEditor" },
313
- DiscussionList: { type: "DiscussionList", name: "评论列表", icon: "DiscussionList" },
314
- NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
315
- Tags: { type: "Tags", name: "标记组", icon: "Tags" },
316
- Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
267
+ "section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
268
+ "section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
269
+ splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
270
+ "splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
271
+ "component-ref": { type: "component-ref", name: "组件引用节点" },
272
+ uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
317
273
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
318
- ModalFooter: { type: "ModalFooter", name: "弹窗页脚", icon: "ModalFooter" },
319
- ScrollCollapsibleArea: { type: "ScrollCollapsibleArea", name: "滚动收折区域", icon: "ScrollCollapsibleArea" },
320
- PersonnelSelector: { type: "PersonnelSelector", name: "人员选择", icon: "PersonnelSelector" },
321
- Table: { type: "Table", name: "表格", icon: "DataGrid" },
322
- LoopContainer: { type: "LoopContainer", name: "循环容器", icon: "ContentContainer" },
323
- FileUploadPreview: { type: "FileUploadPreview", name: "附件上传预览", icon: "FileUpload" },
324
- DynamicArea: { type: "DynamicArea", name: "动态区域", icon: "ContentContainer" },
325
- DynamicAreaItem: { type: "DynamicAreaItem", name: "动态区域项", icon: "ContentContainer" },
326
- TabToolbar: { type: "TabToolbar", name: "标签页工具栏", icon: "TabToolbar" },
327
- HeaderToolBar: { type: "HeaderToolBar", name: "头部组件工具栏", icon: "HeaderToolBar" },
328
- ModalFooterToolBar: { type: "ModalFooterToolBar", name: "底部组件工具栏", icon: "ModalFooterToolBar" },
329
- HeaderToolBarItem: { type: "HeaderToolBarItem", name: "头部组件工具栏按钮", icon: "HeaderToolBarItem" },
330
- ModalFooterToolBarItem: { type: "ModalFooterToolBarItem", name: "底部组件工具栏按钮", icon: "ModalFooterToolBarItem" },
331
- OrganizationSelector: { type: "OrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
332
- AdminOrganizationSelector: { type: "AdminOrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
333
- EmployeeSelector: { type: "EmployeeSelector", name: "人员选择", icon: "PersonnelSelector" },
334
- OaRelation: { type: "OaRelation", name: "关联行政审批", icon: "TextBox" },
335
- CitySelector: { type: "CitySelector", name: "城市选择", icon: "CitySelector" },
336
- ExtIntergration: { type: "ExtIntergration", name: "外部服务集成", icon: "ViewModel" },
337
- AppointmentCalendar: { type: "AppointmentCalendar", name: "预约日历", icon: "DateBox" },
338
- /** 查询类 start */
339
- Charts: { type: "Charts", name: "图表", icon: "Charts" },
340
- QdpFramework: { type: "QdpFramework", name: "查询结果工具栏", icon: "QdpFramework" },
341
- SpreadSheet: { type: "SpreadSheet", name: "查询表格控件", icon: "Charts" },
342
- QdpConditionDialog: { type: "QdpConditionDialog", name: "查询筛选对话框", icon: "ContentContainer" },
343
- QdpConditionDialogTab: { type: "QdpConditionDialogTab", name: "查询筛选标签页", icon: "Tab" },
344
- /** 查询类 end */
345
- /** 审批类 start */
346
- ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
347
- ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
348
- /** 审批类 end */
349
- }, he = {}, $e = {};
350
- _e();
351
- function be(r, e, n = /* @__PURE__ */ new Map(), a = (v, M, S) => M, u = {}, m = (v) => v) {
352
- return oe[e.title] = e, ye[e.title] = a, he[e.title] = u, $e[e.title] = m, (v = {}) => {
353
- const M = Ve(v, e, n), S = Object.keys(r).reduce((g, C) => (g[C] = r[C].default, g), {});
354
- return Object.assign(S, M);
274
+ "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
275
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
276
+ }, be = {}, Le = {};
277
+ Fe();
278
+ function ye(s, e, o = /* @__PURE__ */ new Map(), p = (C, k, D) => k, f = {}, y = (C) => C) {
279
+ return ne[e.title] = e, he[e.title] = p, be[e.title] = f, Le[e.title] = y, (C = {}) => {
280
+ const k = $e(C, e, o), D = Object.keys(s).reduce((g, v) => (g[v] = s[v].default, g), {});
281
+ return Object.assign(D, k);
355
282
  };
356
283
  }
357
284
  const ve = /* @__PURE__ */ new Map([
358
285
  ["buttons", "items"]
359
286
  ]);
360
- function Ce(r, e, n) {
287
+ function Ce(s, e, o) {
361
288
  return e;
362
289
  }
363
- const Ue = "https://json-schema.org/draft/2020-12/schema", We = "https://farris-design.gitee.io/response-toolbar.schema.json", ze = "response-toolbar", qe = "A Farris Toolbar Component", He = "object", Ge = {
290
+ const Ve = "https://json-schema.org/draft/2020-12/schema", We = "https://farris-design.gitee.io/response-toolbar.schema.json", Ue = "response-toolbar", qe = "A Farris Toolbar Component", ze = "object", Ge = {
364
291
  id: {
365
292
  description: "The unique identifier for a Response Toolbar",
366
293
  type: "string"
@@ -393,19 +320,19 @@ const Ue = "https://json-schema.org/draft/2020-12/schema", We = "https://farris-
393
320
  type: "array",
394
321
  default: []
395
322
  }
396
- }, Qe = [
323
+ }, He = [
397
324
  "id",
398
325
  "type",
399
326
  "buttons"
400
- ], Xe = {
401
- $schema: Ue,
327
+ ], Je = {
328
+ $schema: Ve,
402
329
  $id: We,
403
- title: ze,
330
+ title: Ue,
404
331
  description: qe,
405
- type: He,
332
+ type: ze,
406
333
  properties: Ge,
407
- required: Qe
408
- }, Ye = "https://json-schema.org/draft/2020-12/schema", Ze = "https://farris-design.gitee.io/response-toolbar-item.schema.json", Ke = "response-toolbar-item", Je = "A Farris Toolbar Item Component", et = "object", tt = {
334
+ required: He
335
+ }, Qe = "https://json-schema.org/draft/2020-12/schema", Xe = "https://farris-design.gitee.io/response-toolbar-item.schema.json", Ye = "response-toolbar-item", Ze = "A Farris Toolbar Item Component", Ke = "object", et = {
409
336
  id: {
410
337
  description: "The unique identifier for a Response Toolbar",
411
338
  type: "string"
@@ -443,19 +370,19 @@ const Ue = "https://json-schema.org/draft/2020-12/schema", We = "https://farris-
443
370
  type: "string",
444
371
  default: ""
445
372
  }
446
- }, nt = [
373
+ }, tt = [
447
374
  "id",
448
375
  "type",
449
376
  "text"
450
- ], te = {
451
- $schema: Ye,
452
- $id: Ze,
453
- title: Ke,
454
- description: Je,
455
- type: et,
456
- properties: tt,
457
- required: nt
458
- }, ot = "response-toolbar-item", rt = "A Farris Container Component", st = "object", it = {
377
+ ], ee = {
378
+ $schema: Qe,
379
+ $id: Xe,
380
+ title: Ye,
381
+ description: Ze,
382
+ type: Ke,
383
+ properties: et,
384
+ required: tt
385
+ }, nt = "response-toolbar-item", ot = "A Farris Container Component", st = "object", rt = {
459
386
  basic: {
460
387
  title: "基本信息",
461
388
  description: "Basic Infomation",
@@ -489,11 +416,11 @@ const Ue = "https://json-schema.org/draft/2020-12/schema", We = "https://farris-
489
416
  }
490
417
  }
491
418
  }, le = {
492
- title: ot,
493
- description: rt,
419
+ title: nt,
420
+ description: ot,
494
421
  type: st,
495
- categories: it
496
- }, se = {
422
+ categories: rt
423
+ }, re = {
497
424
  /** 组件自定义样式 */
498
425
  customClass: { type: String, default: "" },
499
426
  alignment: { Type: String, default: "right" },
@@ -502,13 +429,13 @@ const Ue = "https://json-schema.org/draft/2020-12/schema", We = "https://farris-
502
429
  default: []
503
430
  }
504
431
  };
505
- oe[te.title] = te;
506
- he[le.title] = le;
507
- const at = Object.assign({}, se, {
432
+ ne[ee.title] = ee;
433
+ be[le.title] = le;
434
+ const it = Object.assign({}, re, {
508
435
  componentId: { type: String, default: "" }
509
- }), ie = be(
510
- se,
511
- Xe,
436
+ }), ie = ye(
437
+ re,
438
+ Je,
512
439
  ve,
513
440
  Ce
514
441
  ), we = {
@@ -518,246 +445,246 @@ const at = Object.assign({}, se, {
518
445
  disabled: { type: Boolean, default: !1 },
519
446
  icon: { type: String, default: "" },
520
447
  componentId: { type: String, default: "" }
521
- }, ct = be(
448
+ }, ct = ye(
522
449
  we,
523
- te,
450
+ ee,
524
451
  ve,
525
452
  Ce
526
453
  );
527
- function Te() {
528
- function r(n) {
529
- const a = {
454
+ function xe() {
455
+ function s(o) {
456
+ const p = {
530
457
  "f-icon": !0
531
458
  };
532
- if (n.icon) {
533
- const u = n.icon.trim().split(" ");
534
- u && u.length && u.reduce((m, v) => (m[v] = !0, m), a);
459
+ if (o.icon) {
460
+ const f = o.icon.trim().split(" ");
461
+ f && f.length && f.reduce((y, C) => (y[C] = !0, y), p);
535
462
  }
536
- return a;
463
+ return p;
537
464
  }
538
- function e(n) {
539
- return !!(n.icon && n.icon.trim());
465
+ function e(o) {
466
+ return !!(o.icon && o.icon.trim());
540
467
  }
541
- return { iconClass: r, shouldShowIcon: e };
468
+ return { iconClass: s, shouldShowIcon: e };
542
469
  }
543
- function lt(r) {
544
- function e(p) {
470
+ function at(s) {
471
+ function e(l) {
545
472
  const c = {
546
473
  "dropdown-menu": !0
547
474
  };
548
- if (p.class) {
549
- const d = p.menuClass.split(" ");
550
- d && d.length && d.reduce((s, y) => (s[y] = !0, s), c);
475
+ if (l.class) {
476
+ const d = l.menuClass.split(" ");
477
+ d && d.length && d.reduce((i, m) => (i[m] = !0, i), c);
551
478
  }
552
479
  return c;
553
480
  }
554
- function n(p) {
481
+ function o(l) {
555
482
  const c = {
556
- disabled: !p.enable,
483
+ disabled: !l.enable,
557
484
  "dropdown-submenu": !0,
558
485
  "f-rt-dropdown": !0
559
- }, d = p.dropdownClass.split(" ");
560
- return d && d.length && d.reduce((s, y) => (s[y] = !0, s), c), c;
486
+ }, d = l.dropdownClass.split(" ");
487
+ return d && d.length && d.reduce((i, m) => (i[m] = !0, i), c), c;
561
488
  }
562
- function a(p) {
489
+ function p(l) {
563
490
  const c = {
564
- disabled: !p.enable,
491
+ disabled: !l.enable,
565
492
  "dropdown-item": !0,
566
493
  "f-rt-btn": !0
567
- }, d = p.class.split(" ");
568
- return d && d.length && d.reduce((s, y) => (s[y] = !0, s), c), c;
569
- }
570
- let u;
571
- const m = /* @__PURE__ */ new Map();
572
- function v(p, c, d) {
573
- var y;
574
- ((y = p.target) == null ? void 0 : y.id) === c.id && p.stopPropagation();
575
- const s = d ? d.id : "__top_item__";
576
- if (c.children && c.children.length && (c.expanded = !c.expanded, c.expanded ? m.set(s, c) : m.delete(s)), m.has(s) && m.get(s) !== c) {
577
- const h = m.get(s);
494
+ }, d = l.class.split(" ");
495
+ return d && d.length && d.reduce((i, m) => (i[m] = !0, i), c), c;
496
+ }
497
+ let f;
498
+ const y = /* @__PURE__ */ new Map();
499
+ function C(l, c, d) {
500
+ var m;
501
+ ((m = l.target) == null ? void 0 : m.id) === c.id && l.stopPropagation();
502
+ const i = d ? d.id : "__top_item__";
503
+ if (c.children && c.children.length && (c.expanded = !c.expanded, c.expanded ? y.set(i, c) : y.delete(i)), y.has(i) && y.get(i) !== c) {
504
+ const h = y.get(i);
578
505
  h && (h.expanded = !1);
579
506
  }
580
507
  }
581
- function M(p, c) {
582
- document.body.click(), c.enable && c.onClick(p, c.id);
508
+ function k(l, c) {
509
+ document.body.click(), c.enable && c.onClick(l, c.id);
583
510
  }
584
- function S(p) {
585
- return p.children.map((c) => c.children && c.children.length ? w("li", {
586
- class: n(c),
511
+ function D(l) {
512
+ return l.children.map((c) => c.children && c.children.length ? w("li", {
513
+ class: o(c),
587
514
  id: c.id,
588
- onClick: (d) => c.enable && v(d, c, p)
515
+ onClick: (d) => c.enable && C(d, c, l)
589
516
  }, [w("span", {
590
517
  id: c.id,
591
- class: a(c),
592
- onMouseover: (d) => c.enable && v(d, c, p)
518
+ class: p(c),
519
+ onMouseover: (d) => c.enable && C(d, c, l)
593
520
  }, [c.text, w("i", {
594
521
  class: "f-icon f-icon-arrow-chevron-right",
595
522
  style: "display: inline-block;float: right;line-height: 1.25rem;"
596
- }, null)]), u(c, c)]) : w("li", {
597
- class: a(c),
523
+ }, null)]), f(c, c)]) : w("li", {
524
+ class: p(c),
598
525
  id: c.id,
599
- onClick: (d) => M(d, c),
600
- onMouseover: (d) => c.enable && v(d, c, p)
601
- }, [r.shouldShowIcon(c) && w("i", {
602
- class: r.iconClass(c)
526
+ onClick: (d) => k(d, c),
527
+ onMouseover: (d) => c.enable && C(d, c, l)
528
+ }, [s.shouldShowIcon(c) && w("i", {
529
+ class: s.iconClass(c)
603
530
  }, null), c.text]));
604
531
  }
605
- function g(p, c, d) {
606
- const s = {
607
- display: p.expanded ? "block" : "none",
532
+ function g(l, c, d) {
533
+ const i = {
534
+ display: l.expanded ? "block" : "none",
608
535
  position: "fixed",
609
536
  maxWidth: "300px",
610
537
  width: "auto",
611
538
  minWidth: "120px"
612
- }, y = document.getElementsByTagName("body")[0].getClientRects()[0].width, h = c, x = h == null ? void 0 : h.getClientRects();
613
- if (h && x && x.length) {
539
+ }, m = document.getElementsByTagName("body")[0].getClientRects()[0].width, h = c, T = h == null ? void 0 : h.getClientRects();
540
+ if (h && T && T.length) {
614
541
  const {
615
542
  top: O,
616
- width: k,
617
- left: A,
543
+ width: P,
544
+ left: B,
618
545
  right: N,
619
- height: D
620
- } = x[0], b = Math.ceil(D + O);
621
- s.top = `${b}px`, s.left = `${A}px`;
622
- const P = p.id + "_menu", E = c ? c.querySelector("#" + P) : null;
546
+ height: j
547
+ } = T[0], b = Math.ceil(j + O);
548
+ i.top = `${b}px`, i.left = `${B}px`;
549
+ const I = l.id + "_menu", E = c ? c.querySelector("#" + I) : null;
623
550
  if (E) {
624
- s.display === "block" && (E.style.display = "block");
625
- const l = E.getBoundingClientRect();
551
+ i.display === "block" && (E.style.display = "block");
552
+ const a = E.getBoundingClientRect();
626
553
  if (d) {
627
- s.top = `${O - 6}px`;
628
- const o = Math.ceil(k + A);
629
- s.left = `${o}px`;
554
+ i.top = `${O - 6}px`;
555
+ const n = Math.ceil(P + B);
556
+ i.left = `${n}px`;
630
557
  }
631
- y - A - k < l.width && (s.left = `${(d ? A : N) - l.width}px`);
558
+ m - B - P < a.width && (i.left = `${(d ? B : N) - a.width}px`);
632
559
  }
633
560
  }
634
- return s;
561
+ return i;
635
562
  }
636
- u = function(p, c) {
637
- var h, x;
638
- const d = de(), s = c ? c.id : p.id, y = (x = (h = d == null ? void 0 : d.exposed) == null ? void 0 : h.elementRef.value) == null ? void 0 : x.querySelector("#" + s);
563
+ f = function(l, c) {
564
+ var h, T;
565
+ const d = de(), i = c ? c.id : l.id, m = (T = (h = d == null ? void 0 : d.exposed) == null ? void 0 : h.elementRef.value) == null ? void 0 : T.querySelector("#" + i);
639
566
  return w("ul", {
640
- class: e(p),
641
- style: g(p, y, c),
642
- id: p.id + "_menu"
643
- }, [S(p)]);
567
+ class: e(l),
568
+ style: g(l, m, c),
569
+ id: l.id + "_menu"
570
+ }, [D(l)]);
644
571
  };
645
- function C() {
646
- m.forEach((p) => {
647
- p.expanded = !1;
648
- }), m.clear();
572
+ function v() {
573
+ y.forEach((l) => {
574
+ l.expanded = !1;
575
+ }), y.clear();
649
576
  }
650
577
  return {
651
- renderDropdownMenu: u,
652
- clearAllDropDownMenu: C
578
+ renderDropdownMenu: f,
579
+ clearAllDropDownMenu: v
653
580
  };
654
581
  }
655
- function pt(r, e) {
656
- const n = j(r.alignment), {
657
- renderDropdownMenu: a,
658
- clearAllDropDownMenu: u
659
- } = lt(e);
660
- function m(C) {
661
- const p = {
582
+ function lt(s, e) {
583
+ const o = S(s.alignment), {
584
+ renderDropdownMenu: p,
585
+ clearAllDropDownMenu: f
586
+ } = at(e);
587
+ function y(v) {
588
+ const l = {
662
589
  "btn-group": !0,
663
590
  "f-rt-dropdown": !0,
664
- "f-btn-ml": n.value === "right",
665
- "f-btn-mr": n.value === "left"
666
- }, c = C.dropdownClass.split(" ");
667
- return c && c.length && c.reduce((d, s) => (d[s] = !0, d), p), p;
591
+ "f-btn-ml": o.value === "right",
592
+ "f-btn-mr": o.value === "left"
593
+ }, c = v.dropdownClass.split(" ");
594
+ return c && c.length && c.reduce((d, i) => (d[i] = !0, d), l), l;
668
595
  }
669
- function v(C) {
670
- const p = {
596
+ function C(v) {
597
+ const l = {
671
598
  btn: !0,
672
- disabled: !C.enable,
599
+ disabled: !v.enable,
673
600
  "f-rt-btn": !0,
674
- "btn-icontext": !!(C.icon && C.icon.trim())
601
+ "btn-icontext": !!(v.icon && v.icon.trim())
675
602
  };
676
- if (C.class) {
677
- const c = C.class.split(" ");
678
- c && c.length && c.reduce((d, s) => (d[s] = !0, d), p);
603
+ if (v.class) {
604
+ const c = v.class.split(" ");
605
+ c && c.length && c.reduce((d, i) => (d[i] = !0, d), l);
679
606
  }
680
- return p;
607
+ return l;
681
608
  }
682
- function M(C, p) {
683
- C.stopPropagation();
684
- const c = p.expanded;
685
- document.body.click(), p.expanded = !c;
609
+ function k(v, l) {
610
+ v.stopPropagation();
611
+ const c = l.expanded;
612
+ document.body.click(), l.expanded = !c;
686
613
  }
687
- function S(C) {
614
+ function D(v) {
688
615
  return w("div", {
689
- id: C.id,
690
- class: m(C)
616
+ id: v.id,
617
+ class: y(v)
691
618
  }, [w("div", {
692
- class: v(C),
619
+ class: C(v),
693
620
  style: "display: flex;padding-right: 0.1rem;border-top-right-radius: 6px;border-bottom-right-radius: 6px",
694
- onClick: (p) => C.enable && M(p, C)
695
- }, [e.shouldShowIcon(C) && w("i", {
696
- class: e.iconClass(C)
697
- }, null), w("span", null, [C.text]), w("i", {
621
+ onClick: (l) => v.enable && k(l, v)
622
+ }, [e.shouldShowIcon(v) && w("i", {
623
+ class: e.iconClass(v)
624
+ }, null), w("span", null, [v.text]), w("i", {
698
625
  class: "f-icon f-icon-arrow-chevron-down",
699
626
  style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
700
- }, null)]), a(C)]);
627
+ }, null)]), p(v)]);
701
628
  }
702
629
  function g() {
703
- u();
630
+ f();
704
631
  }
705
632
  return {
706
- renderToolbarDropdown: S,
633
+ renderToolbarDropdown: D,
707
634
  clearAllDropDown: g
708
635
  };
709
636
  }
710
637
  const {
711
638
  buildResponseToolbarItems: pe
712
- } = ge(), X = /* @__PURE__ */ Y({
639
+ } = ge(), J = /* @__PURE__ */ Q({
713
640
  name: "FResponseToolbar",
714
- props: se,
641
+ props: re,
715
642
  emits: ["click"],
716
- setup(r, e) {
717
- const n = j(pe(r.items)), a = j(), u = j(), m = j(), v = j(r.alignment), M = {
643
+ setup(s, e) {
644
+ const o = S(pe(s.items)), p = S(), f = S(), y = S(), C = S(s.alignment), k = {
718
645
  id: "__more_buttons__",
719
646
  text: "更多"
720
- }, S = j(new G(M)), g = Te(), C = W(() => S.value.children.length > 0), p = W(() => {
647
+ }, D = S(new G(k)), g = xe(), v = W(() => D.value.children.length > 0), l = W(() => {
721
648
  const b = {
722
649
  "f-toolbar": !0,
723
650
  "f-response-toolbar": !0,
724
651
  "position-relative": !0
725
652
  };
726
- if (r.customClass) {
727
- const P = r.customClass.split(" ");
728
- P && P.length && P.reduce((E, l) => (E[l] = !0, E), b);
653
+ if (s.customClass) {
654
+ const I = s.customClass.split(" ");
655
+ I && I.length && I.reduce((E, a) => (E[a] = !0, E), b);
729
656
  }
730
657
  return b;
731
658
  }), c = W(() => ({
732
659
  "d-flex": !0,
733
660
  "flex-nowrap": !0,
734
- "justify-content-end": v.value === "right",
735
- "justify-content-start": v.value === "left"
661
+ "justify-content-end": C.value === "right",
662
+ "justify-content-start": C.value === "left"
736
663
  })), {
737
664
  renderToolbarDropdown: d,
738
- clearAllDropDown: s
739
- } = pt(r, g);
740
- function y() {
741
- n.value.filter((b) => b.children && b.children.length > 0).forEach((b) => {
665
+ clearAllDropDown: i
666
+ } = lt(s, g);
667
+ function m() {
668
+ o.value.filter((b) => b.children && b.children.length > 0).forEach((b) => {
742
669
  b.expanded = !1;
743
- }), S.value.expanded = !1, s();
670
+ }), D.value.expanded = !1, i();
744
671
  }
745
672
  function h(b) {
746
- const P = {
673
+ const I = {
747
674
  btn: !0,
748
675
  "f-rt-btn": !0,
749
- "f-btn-ml": v.value === "right",
750
- "f-btn-mr": v.value === "left",
676
+ "f-btn-ml": C.value === "right",
677
+ "f-btn-mr": C.value === "left",
751
678
  "btn-icontext": !!(b.icon && b.icon.trim())
752
679
  };
753
680
  if (b.class) {
754
681
  const E = b.class.split(" ");
755
- E && E.length && E.reduce((l, o) => (l[o] = !0, l), P);
682
+ E && E.length && E.reduce((a, n) => (a[n] = !0, a), I);
756
683
  }
757
- return P;
684
+ return I;
758
685
  }
759
- function x(b, P) {
760
- document.body.click(), P.onClick(b, P.id), e.emit("click", b, P.id);
686
+ function T(b, I) {
687
+ document.body.click(), I.onClick(b, I.id), e.emit("click", b, I.id);
761
688
  }
762
689
  function O(b) {
763
690
  return w("button", {
@@ -765,227 +692,227 @@ const {
765
692
  class: h(b),
766
693
  id: b.id,
767
694
  disabled: !b.enable,
768
- onClick: (P) => x(P, b)
695
+ onClick: (I) => T(I, b)
769
696
  }, [g.shouldShowIcon(b) && w("i", {
770
697
  class: g.iconClass(b)
771
698
  }, null), b.text]);
772
699
  }
773
- const k = /* @__PURE__ */ new Map(), A = [];
700
+ const P = /* @__PURE__ */ new Map(), B = [];
774
701
  function N(b) {
775
- const P = m.value;
702
+ const I = y.value;
776
703
  let E = b;
777
- const l = Array.from(P.children), o = l[l.length - 1].id === "__more_buttons__" ? l[l.length - 1] : null;
778
- if (o) {
779
- const T = o.computedStyleMap().get("margin-left"), B = o.computedStyleMap().get("margin-right"), _ = (T ? T.value : 0) + o.getBoundingClientRect().width + (B ? B.value : 0);
780
- E -= _;
704
+ const a = Array.from(I.children), n = a[a.length - 1].id === "__more_buttons__" ? a[a.length - 1] : null;
705
+ if (n) {
706
+ 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);
707
+ E -= F;
781
708
  }
782
- const t = l.filter((T) => T.id !== "__more_buttons__");
783
- for (const T of t) {
784
- const B = T.computedStyleMap().get("margin-left"), _ = T.computedStyleMap().get("margin-right"), L = (B ? B.value : 0) + T.getBoundingClientRect().width + (_ ? _.value : 0);
785
- E < L ? (k.set(T.id, !0), A.push({
786
- id: T.id,
787
- width: L
788
- })) : E -= L;
709
+ const t = a.filter((x) => x.id !== "__more_buttons__");
710
+ for (const x of t) {
711
+ const M = x.computedStyleMap().get("margin-left"), F = x.computedStyleMap().get("margin-right"), _ = (M ? M.value : 0) + x.getBoundingClientRect().width + (F ? F.value : 0);
712
+ E < _ ? (P.set(x.id, !0), B.push({
713
+ id: x.id,
714
+ width: _
715
+ })) : E -= _;
789
716
  }
790
- if (A.length)
791
- for (let T = A.length - 1; T >= 0; T--) {
792
- const B = A[T].width;
793
- if (E >= B)
794
- E -= B, k.delete(A[T].id), A.pop();
717
+ if (B.length)
718
+ for (let x = B.length - 1; x >= 0; x--) {
719
+ const M = B[x].width;
720
+ if (E >= M)
721
+ E -= M, P.delete(B[x].id), B.pop();
795
722
  else
796
723
  break;
797
724
  }
798
- const i = Object.assign({}, S.value);
799
- i.children = [];
800
- const f = new G(i), R = n.value.reduce((T, B) => (k.has(B.id) && f.children.push(B), B.visible = !k.has(B.id), T.push(B), T), []);
801
- S.value = f, n.value = R;
725
+ const r = Object.assign({}, D.value);
726
+ r.children = [];
727
+ const u = new G(r), R = o.value.reduce((x, M) => (P.has(M.id) && u.children.push(M), M.visible = !P.has(M.id), x.push(M), x), []);
728
+ D.value = u, o.value = R;
802
729
  }
803
- const D = new ResizeObserver((b) => {
730
+ const j = new ResizeObserver((b) => {
804
731
  if (b.length) {
805
- const E = b[0].contentRect.width, o = m.value.getBoundingClientRect().width;
806
- (E < o || A.length) && (N(E), y());
732
+ const E = b[0].contentRect.width, n = y.value.getBoundingClientRect().width;
733
+ (E < n || B.length) && (N(E), m());
807
734
  }
808
735
  });
809
- return H(() => {
810
- const b = u.value;
811
- D.observe(b), document.body.addEventListener("click", y), document.body.addEventListener("wheel", y);
812
- }), ne(() => {
813
- D.disconnect(), document.body.removeEventListener("click", y), document.body.removeEventListener("wheel", y);
814
- }), Q(() => r.items, () => {
815
- n.value = pe(r.items);
736
+ return z(() => {
737
+ const b = f.value;
738
+ j.observe(b), document.body.addEventListener("click", m), document.body.addEventListener("wheel", m);
739
+ }), te(() => {
740
+ j.disconnect(), document.body.removeEventListener("click", m), document.body.removeEventListener("wheel", m);
741
+ }), H(() => s.items, () => {
742
+ o.value = pe(s.items);
816
743
  }, {
817
744
  deep: !0
818
745
  }), e.expose({
819
- elementRef: a
746
+ elementRef: p
820
747
  }), () => w("div", {
821
- class: p.value,
822
- ref: a
748
+ class: l.value,
749
+ ref: p
823
750
  }, [w("div", {
824
- ref: u,
751
+ ref: f,
825
752
  class: c.value
826
753
  }, [w("div", {
827
- ref: m,
754
+ ref: y,
828
755
  class: "d-inline-block f-response-content",
829
756
  style: "white-space: nowrap;"
830
- }, [n.value.filter((b) => b.visible).map((b) => b.children && b.children.length > 0 ? d(b) : O(b)), C.value && d(S.value)])])]);
757
+ }, [o.value.filter((b) => b.visible).map((b) => b.children && b.children.length > 0 ? d(b) : O(b)), v.value && d(D.value)])])]);
831
758
  }
832
759
  });
833
- function dt(r, e) {
834
- const n = $("design-item-context"), a = $("toolbar-item-handler", () => {
760
+ function pt(s, e) {
761
+ const o = L("design-item-context"), p = L("toolbar-item-handler", () => {
835
762
  });
836
- function u() {
837
- a && a();
763
+ function f() {
764
+ p && p();
838
765
  }
839
- function m(o) {
766
+ function y(n) {
840
767
  const t = {
841
768
  "dropdown-menu": !0
842
769
  };
843
- if (o.class) {
844
- const i = o.menuClass.split(" ");
845
- i && i.length && i.reduce((f, R) => (f[R] = !0, f), t);
770
+ if (n.class) {
771
+ const r = n.menuClass.split(" ");
772
+ r && r.length && r.reduce((u, R) => (u[R] = !0, u), t);
846
773
  }
847
774
  return t;
848
775
  }
849
- function v(o) {
776
+ function C(n) {
850
777
  const t = {
851
- disabled: !o.enable,
778
+ disabled: !n.enable,
852
779
  "dropdown-submenu": !0,
853
780
  "f-rt-dropdown": !0
854
- }, i = o.dropdownClass.split(" ");
855
- return i && i.length && i.reduce((f, R) => (f[R] = !0, f), t), t;
781
+ }, r = n.dropdownClass.split(" ");
782
+ return r && r.length && r.reduce((u, R) => (u[R] = !0, u), t), t;
856
783
  }
857
- function M(o) {
784
+ function k(n) {
858
785
  const t = {
859
- disabled: !o.enable,
786
+ disabled: !n.enable,
860
787
  "dropdown-item": !0,
861
788
  "f-rt-btn": !0,
862
789
  "position-relative": !0,
863
790
  "farris-component": !0
864
- }, i = o.class.split(" ");
865
- return i && i.length && i.reduce((f, R) => (f[R] = !0, f), t), t;
791
+ }, r = n.class.split(" ");
792
+ return r && r.length && r.reduce((u, R) => (u[R] = !0, u), t), t;
866
793
  }
867
- let S;
794
+ let D;
868
795
  const g = /* @__PURE__ */ new Map();
869
- function C(o, t, i) {
796
+ function v(n, t, r) {
870
797
  var R;
871
- ((R = o.target) == null ? void 0 : R.id) === t.id && o.stopPropagation();
872
- const f = i ? i.id : "__top_item__";
873
- if (t.children && t.children.length && (t.expanded = !t.expanded, t.expanded ? g.set(f, t) : g.delete(f)), g.has(f) && g.get(f) !== t) {
874
- const T = g.get(f);
875
- T && (T.expanded = !1);
798
+ ((R = n.target) == null ? void 0 : R.id) === t.id && n.stopPropagation();
799
+ const u = r ? r.id : "__top_item__";
800
+ 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) {
801
+ const x = g.get(u);
802
+ x && (x.expanded = !1);
876
803
  }
877
804
  }
878
- function p(o) {
879
- o && (o.stopPropagation(), o.preventDefault());
805
+ function l(n) {
806
+ n && (n.stopPropagation(), n.preventDefault());
880
807
  }
881
808
  function c() {
882
809
  Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((t) => t.classList.remove("dgComponentFocused"));
883
- const o = document.getElementsByClassName("dgComponentSelected");
884
- Array.from(o).forEach((t) => t.classList.remove("dgComponentSelected"));
810
+ const n = document.getElementsByClassName("dgComponentSelected");
811
+ Array.from(n).forEach((t) => t.classList.remove("dgComponentSelected"));
885
812
  }
886
- function d(o) {
887
- o.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
813
+ function d(n) {
814
+ n.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
888
815
  }
889
- function s(o) {
816
+ function i(n) {
890
817
  const {
891
818
  buttons: t = []
892
- } = n.schema;
893
- let i = [];
894
- t.forEach((T) => {
895
- i = i.concat(T.children || []);
819
+ } = o.schema;
820
+ let r = [];
821
+ t.forEach((x) => {
822
+ r = r.concat(x.children || []);
896
823
  });
897
- const f = i.findIndex((T) => T.id === o), R = f === -1 ? null : i[f];
824
+ const u = r.findIndex((x) => x.id === n), R = u === -1 ? null : r[u];
898
825
  return {
899
- index: f,
826
+ index: u,
900
827
  item: R
901
828
  };
902
829
  }
903
- function y(o) {
830
+ function m(n) {
904
831
  const {
905
832
  buttons: t = []
906
- } = n.schema, i = t.findIndex((R) => R.id === o), f = i === -1 ? null : t[i];
833
+ } = o.schema, r = t.findIndex((R) => R.id === n), u = r === -1 ? null : t[r];
907
834
  return {
908
- index: i,
909
- item: f
835
+ index: r,
836
+ item: u
910
837
  };
911
838
  }
912
- function h(o) {
913
- var f;
914
- n.schema;
839
+ function h(n) {
840
+ var u;
841
+ o.schema;
915
842
  const {
916
843
  index: t,
917
- item: i
918
- } = s(o);
919
- (f = n == null ? void 0 : n.setupContext) == null || f.emit("selectionChange", i == null ? void 0 : i.type, i);
844
+ item: r
845
+ } = i(n);
846
+ (u = o == null ? void 0 : o.setupContext) == null || u.emit("selectionChange", r == null ? void 0 : r.type, r);
920
847
  }
921
- const x = function(o) {
848
+ const T = function(n) {
922
849
  const {
923
850
  componentType: t
924
- } = o, i = q(t, o), f = t.toLowerCase().replace("-", "_");
925
- return i && !i.id && i.type === t && (i.id = `${f}_${Math.random().toString().slice(2, 6)}`), i;
851
+ } = n, r = q(t, n), u = t.toLowerCase().replace("-", "_");
852
+ return r && !r.id && r.type === t && (r.id = `${u}_${Math.random().toString().slice(2, 6)}`), r;
926
853
  }, O = function() {
927
- const o = {
854
+ const n = {
928
855
  componentType: "response-toolbar-item",
929
856
  parentComponentInstance: e.value,
930
857
  targetPosition: -1
931
858
  };
932
- return x(o);
859
+ return T(n);
933
860
  };
934
- function k(o, t) {
935
- p(o), c(), d(o), h(t.id);
936
- }
937
- function A(o, t, i) {
938
- p(o);
939
- const f = t.id, R = i && i.id, {
940
- buttons: T = []
941
- } = n.schema;
861
+ function P(n, t) {
862
+ l(n), c(), d(n), h(t.id);
863
+ }
864
+ function B(n, t, r) {
865
+ l(n);
866
+ const u = t.id, R = r && r.id, {
867
+ buttons: x = []
868
+ } = o.schema;
942
869
  if (!R)
943
870
  return;
944
871
  const {
945
- index: B
946
- } = y(R);
947
- if (B === -1)
872
+ index: M
873
+ } = m(R);
874
+ if (M === -1)
948
875
  return;
949
876
  const {
950
- index: _
951
- } = s(f);
952
- _ !== -1 && (T[B].children.splice(_, 1), u());
877
+ index: F
878
+ } = i(u);
879
+ F !== -1 && (x[M].children.splice(F, 1), f());
953
880
  }
954
- function N(o, t, i) {
955
- p(o);
956
- const f = i && i.id, {
881
+ function N(n, t, r) {
882
+ l(n);
883
+ const u = r && r.id, {
957
884
  buttons: R = []
958
- } = n.schema;
959
- if (!f)
885
+ } = o.schema;
886
+ if (!u)
960
887
  return;
961
888
  const {
962
- index: T
963
- } = y(f);
964
- if (T === -1)
889
+ index: x
890
+ } = m(u);
891
+ if (x === -1)
965
892
  return;
966
- const B = O(), _ = Object.assign({}, B, {
893
+ const M = O(), F = Object.assign({}, M, {
967
894
  text: t.text
968
895
  });
969
- R[T].children.push(_), u();
896
+ R[x].children.push(F), f();
970
897
  }
971
- function D(o, t, i) {
972
- p(o);
973
- const f = i && i.id, {
898
+ function j(n, t, r) {
899
+ l(n);
900
+ const u = r && r.id, {
974
901
  buttons: R = []
975
- } = n.schema;
976
- if (!f)
902
+ } = o.schema;
903
+ if (!u)
977
904
  return;
978
905
  const {
979
- index: T
980
- } = y(f);
981
- if (T === -1)
906
+ index: x
907
+ } = m(u);
908
+ if (x === -1)
982
909
  return;
983
- const B = O(), _ = Object.assign({}, B, {
910
+ const M = O(), F = Object.assign({}, M, {
984
911
  text: "按钮"
985
912
  });
986
- R[T].children.push(_), u();
913
+ R[x].children.push(F), f();
987
914
  }
988
- function b(o, t) {
915
+ function b(n, t) {
989
916
  return w("div", {
990
917
  class: "component-btn-group"
991
918
  }, [w("div", null, [w("div", {
@@ -994,7 +921,7 @@ function dt(r, e) {
994
921
  title: "删除",
995
922
  ref: "removeButton",
996
923
  style: "position:static;",
997
- onClick: (i) => A(i, o, t)
924
+ onClick: (r) => B(r, n, t)
998
925
  }, [w("i", {
999
926
  class: "f-icon f-icon-yxs_delete"
1000
927
  }, null)]), w("div", {
@@ -1003,7 +930,7 @@ function dt(r, e) {
1003
930
  title: "复制",
1004
931
  ref: "copyButton",
1005
932
  style: "position:static;",
1006
- onClick: (i) => N(i, o, t)
933
+ onClick: (r) => N(r, n, t)
1007
934
  }, [w("i", {
1008
935
  class: "f-icon f-icon-yxs_copy"
1009
936
  }, null)]), w("div", {
@@ -1012,174 +939,174 @@ function dt(r, e) {
1012
939
  title: "新增同级",
1013
940
  ref: "appendSame",
1014
941
  style: "width:85px!important;padding:0 5px;position:static;",
1015
- onClick: (i) => D(i, o, t)
942
+ onClick: (r) => j(r, n, t)
1016
943
  }, [w("i", {
1017
944
  class: "f-icon f-icon-plus-circle text-white mr-1"
1018
945
  }, null), w("span", {
1019
946
  style: "font-size:13px;margin:auto"
1020
947
  }, [ue("新增同级")])])])]);
1021
948
  }
1022
- function P(o) {
1023
- return o.children.map((t) => t.children && t.children.length ? w("li", {
1024
- class: v(t),
949
+ function I(n) {
950
+ return n.children.map((t) => t.children && t.children.length ? w("li", {
951
+ class: C(t),
1025
952
  id: t.id,
1026
- onClick: (i) => t.enable && C(i, t, o)
953
+ onClick: (r) => t.enable && v(r, t, n)
1027
954
  }, [w("span", {
1028
955
  id: t.id,
1029
- class: M(t),
1030
- onMouseover: (i) => t.enable && C(i, t, o)
956
+ class: k(t),
957
+ onMouseover: (r) => t.enable && v(r, t, n)
1031
958
  }, [t.text, w("i", {
1032
959
  class: "f-icon f-icon-arrow-chevron-right",
1033
960
  style: "display: inline-block;float: right;line-height: 1.25rem;"
1034
- }, null)]), S(t, t)]) : w("li", {
1035
- class: M(t),
961
+ }, null)]), D(t, t)]) : w("li", {
962
+ class: k(t),
1036
963
  id: t.id,
1037
- onClick: (i) => k(i, t)
1038
- }, [b(t, o), r.shouldShowIcon(t) && w("i", {
1039
- class: r.iconClass(t)
964
+ onClick: (r) => P(r, t)
965
+ }, [b(t, n), s.shouldShowIcon(t) && w("i", {
966
+ class: s.iconClass(t)
1040
967
  }, null), t.text]));
1041
968
  }
1042
- function E(o, t, i) {
1043
- const f = {
1044
- display: o.expanded ? "block" : "none",
969
+ function E(n, t, r) {
970
+ const u = {
971
+ display: n.expanded ? "block" : "none",
1045
972
  position: "fixed",
1046
973
  maxWidth: "300px",
1047
974
  width: "auto",
1048
975
  minWidth: "120px"
1049
- }, R = document.getElementsByTagName("body")[0].getClientRects()[0].width, T = t, B = T == null ? void 0 : T.getClientRects();
1050
- if (T && B && B.length) {
976
+ }, R = document.getElementsByTagName("body")[0].getClientRects()[0].width, x = t, M = x == null ? void 0 : x.getClientRects();
977
+ if (x && M && M.length) {
1051
978
  const {
1052
- top: _,
1053
- width: L,
1054
- left: V,
1055
- right: U,
1056
- height: z
1057
- } = B[0], Z = Math.ceil(z + _);
1058
- f.top = `${Z}px`, f.left = `${V}px`;
1059
- const Ie = o.id + "_menu", K = t ? t.querySelector("#" + Ie) : null;
1060
- if (K) {
1061
- f.display === "block" && (K.style.display = "block");
1062
- const ce = K.getBoundingClientRect();
1063
- if (i) {
1064
- f.top = `${_ - 6}px`;
1065
- const Me = Math.ceil(L + V);
1066
- f.left = `${Me}px`;
979
+ top: F,
980
+ width: _,
981
+ left: $,
982
+ right: V,
983
+ height: U
984
+ } = M[0], X = Math.ceil(U + F);
985
+ u.top = `${X}px`, u.left = `${$}px`;
986
+ const De = n.id + "_menu", Y = t ? t.querySelector("#" + De) : null;
987
+ if (Y) {
988
+ u.display === "block" && (Y.style.display = "block");
989
+ const ae = Y.getBoundingClientRect();
990
+ if (r) {
991
+ u.top = `${F - 6}px`;
992
+ const Ie = Math.ceil(_ + $);
993
+ u.left = `${Ie}px`;
1067
994
  }
1068
- R - V - L < ce.width && (f.left = `${(i ? V : U) - ce.width}px`);
995
+ R - $ - _ < ae.width && (u.left = `${(r ? $ : V) - ae.width}px`);
1069
996
  }
1070
997
  }
1071
- return f;
998
+ return u;
1072
999
  }
1073
- S = function(o, t) {
1074
- var T, B;
1075
- const i = de(), f = t ? t.id : o.id, R = (B = (T = i == null ? void 0 : i.exposed) == null ? void 0 : T.elementRef.value) == null ? void 0 : B.querySelector("#" + f);
1000
+ D = function(n, t) {
1001
+ var x, M;
1002
+ const r = de(), 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);
1076
1003
  return w("ul", {
1077
- class: m(o),
1078
- style: E(o, R, t),
1079
- id: o.id + "_menu"
1080
- }, [P(o)]);
1004
+ class: y(n),
1005
+ style: E(n, R, t),
1006
+ id: n.id + "_menu"
1007
+ }, [I(n)]);
1081
1008
  };
1082
- function l() {
1083
- g.forEach((o) => {
1084
- o.expanded = !1;
1009
+ function a() {
1010
+ g.forEach((n) => {
1011
+ n.expanded = !1;
1085
1012
  }), g.clear();
1086
1013
  }
1087
1014
  return {
1088
- renderDropdownMenu: S,
1089
- clearAllDropDownMenu: l
1015
+ renderDropdownMenu: D,
1016
+ clearAllDropDownMenu: a
1090
1017
  };
1091
1018
  }
1092
- function ut(r, e, n) {
1093
- const a = j(r.alignment), {
1094
- renderDropdownMenu: u,
1095
- clearAllDropDownMenu: m
1096
- } = dt(e, n), v = $("design-item-context"), M = $("toolbar-item-handler", () => {
1019
+ function dt(s, e, o) {
1020
+ const p = S(s.alignment), {
1021
+ renderDropdownMenu: f,
1022
+ clearAllDropDownMenu: y
1023
+ } = pt(e, o), C = L("design-item-context"), k = L("toolbar-item-handler", () => {
1097
1024
  });
1098
- function S() {
1099
- M && M();
1025
+ function D() {
1026
+ k && k();
1100
1027
  }
1101
- function g(l) {
1102
- const o = {
1028
+ function g(a) {
1029
+ const n = {
1103
1030
  "btn-group": !0,
1104
1031
  "f-rt-dropdown": !0,
1105
- "f-btn-ml": a.value === "right",
1106
- "f-btn-mr": a.value === "left"
1107
- }, t = l.dropdownClass.split(" ");
1108
- return t && t.length && t.reduce((i, f) => (i[f] = !0, i), o), o;
1032
+ "f-btn-ml": p.value === "right",
1033
+ "f-btn-mr": p.value === "left"
1034
+ }, t = a.dropdownClass.split(" ");
1035
+ return t && t.length && t.reduce((r, u) => (r[u] = !0, r), n), n;
1109
1036
  }
1110
- function C(l) {
1111
- const o = {
1037
+ function v(a) {
1038
+ const n = {
1112
1039
  btn: !0,
1113
- disabled: !l.enable,
1040
+ disabled: !a.enable,
1114
1041
  "position-relative": !0,
1115
1042
  "farris-component": !0,
1116
1043
  "f-rt-btn": !0,
1117
- "btn-icontext": !!(l.icon && l.icon.trim())
1044
+ "btn-icontext": !!(a.icon && a.icon.trim())
1118
1045
  };
1119
- if (l.class) {
1120
- const t = l.class.split(" ");
1121
- t && t.length && t.reduce((i, f) => (i[f] = !0, i), o);
1046
+ if (a.class) {
1047
+ const t = a.class.split(" ");
1048
+ t && t.length && t.reduce((r, u) => (r[u] = !0, r), n);
1122
1049
  }
1123
- return o;
1050
+ return n;
1124
1051
  }
1125
- function p(l) {
1126
- l && (l.stopPropagation(), l.preventDefault());
1052
+ function l(a) {
1053
+ a && (a.stopPropagation(), a.preventDefault());
1127
1054
  }
1128
- function c(l, o) {
1129
- p(l);
1130
- const t = o.expanded;
1131
- document.body.click(), o.expanded = !t;
1055
+ function c(a, n) {
1056
+ l(a);
1057
+ const t = n.expanded;
1058
+ document.body.click(), n.expanded = !t;
1132
1059
  }
1133
- const d = function(l) {
1060
+ const d = function(a) {
1134
1061
  const {
1135
- componentType: o
1136
- } = l, t = q(o, l), i = o.toLowerCase().replace("-", "_");
1137
- return t && !t.id && t.type === o && (t.id = `${i}_${Math.random().toString().slice(2, 6)}`), t;
1138
- }, s = function() {
1139
- const l = {
1062
+ componentType: n
1063
+ } = a, t = q(n, a), r = n.toLowerCase().replace("-", "_");
1064
+ return t && !t.id && t.type === n && (t.id = `${r}_${Math.random().toString().slice(2, 6)}`), t;
1065
+ }, i = function() {
1066
+ const a = {
1140
1067
  componentType: "response-toolbar-item",
1141
- parentComponentInstance: n.value,
1068
+ parentComponentInstance: o.value,
1142
1069
  targetPosition: -1
1143
1070
  };
1144
- return d(l);
1071
+ return d(a);
1145
1072
  };
1146
- function y(l) {
1147
- const o = v.schema.buttons || v.schema.contents, t = o == null ? void 0 : o.findIndex((f) => f.id === l), i = t === -1 ? null : o[t];
1073
+ function m(a) {
1074
+ const n = C.schema.buttons || C.schema.contents, t = n == null ? void 0 : n.findIndex((u) => u.id === a), r = t === -1 ? null : n[t];
1148
1075
  return {
1149
1076
  index: t,
1150
- toolbarItem: i
1077
+ toolbarItem: r
1151
1078
  };
1152
1079
  }
1153
- function h(l, o) {
1154
- var B;
1080
+ function h(a, n) {
1081
+ var M;
1155
1082
  const {
1156
1083
  index: t,
1157
- toolbarItem: i
1158
- } = y(o);
1084
+ toolbarItem: r
1085
+ } = m(n);
1159
1086
  if (t === -1)
1160
1087
  return;
1161
- const f = i.text || "按钮", R = s(), T = Object.assign({}, R, {
1162
- text: f
1088
+ const u = r.text || "按钮", R = i(), x = Object.assign({}, R, {
1089
+ text: u
1163
1090
  });
1164
- (B = v.schema.buttons) == null || B.push(T), S();
1091
+ (M = C.schema.buttons) == null || M.push(x), D();
1165
1092
  }
1166
- function x(l, o) {
1093
+ function T(a, n) {
1167
1094
  const {
1168
1095
  index: t,
1169
- toolbarItem: i
1170
- } = y(o);
1096
+ toolbarItem: r
1097
+ } = m(n);
1171
1098
  if (t === -1)
1172
1099
  return;
1173
- const f = i.text || "按钮", R = s(), T = Object.assign({}, R, {
1174
- text: f
1175
- }), B = v.schema.buttons[t].children || [];
1176
- B.push(T), v.schema.buttons[t].children = B, S();
1100
+ const u = r.text || "按钮", R = i(), x = Object.assign({}, R, {
1101
+ text: u
1102
+ }), M = C.schema.buttons[t].children || [];
1103
+ M.push(x), C.schema.buttons[t].children = M, D();
1177
1104
  }
1178
- function O(l, o) {
1179
- const t = v.schema.buttons || v.schema.contents, i = t == null ? void 0 : t.findIndex((f) => f.id === o);
1180
- i !== -1 && (t.splice(i, 1), S());
1105
+ function O(a, n) {
1106
+ const t = C.schema.buttons || C.schema.contents, r = t == null ? void 0 : t.findIndex((u) => u.id === n);
1107
+ r !== -1 && (t.splice(r, 1), D());
1181
1108
  }
1182
- function k(l) {
1109
+ function P(a) {
1183
1110
  return w("div", {
1184
1111
  class: "component-btn-group"
1185
1112
  }, [w("div", null, [w("div", {
@@ -1188,7 +1115,7 @@ function ut(r, e, n) {
1188
1115
  title: "删除",
1189
1116
  ref: "removeButton",
1190
1117
  style: "position:static;",
1191
- onClick: (o) => O(o, l)
1118
+ onClick: (n) => O(n, a)
1192
1119
  }, [w("i", {
1193
1120
  class: "f-icon f-icon-yxs_delete"
1194
1121
  }, null)]), w("div", {
@@ -1197,7 +1124,7 @@ function ut(r, e, n) {
1197
1124
  title: "复制",
1198
1125
  ref: "copyButton",
1199
1126
  style: "position:static;",
1200
- onClick: (o) => h(o, l)
1127
+ onClick: (n) => h(n, a)
1201
1128
  }, [w("i", {
1202
1129
  class: "f-icon f-icon-yxs_copy"
1203
1130
  }, null)]), w("div", {
@@ -1206,76 +1133,76 @@ function ut(r, e, n) {
1206
1133
  title: "新增子级",
1207
1134
  ref: "appendChildButton",
1208
1135
  style: "width:85px!important;padding:0 5px;position:static;",
1209
- onClick: (o) => x(o, l)
1136
+ onClick: (n) => T(n, a)
1210
1137
  }, [w("i", {
1211
1138
  class: "f-icon f-icon-plus-circle text-white mr-1"
1212
1139
  }, null), w("span", {
1213
1140
  style: "font-size:13px;margin:auto"
1214
1141
  }, [ue("新增子级")])])])]);
1215
1142
  }
1216
- function A() {
1217
- Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((o) => o.classList.remove("dgComponentFocused"));
1218
- const l = document.getElementsByClassName("dgComponentSelected");
1219
- Array.from(l).forEach((o) => o.classList.remove("dgComponentSelected"));
1143
+ function B() {
1144
+ Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((n) => n.classList.remove("dgComponentFocused"));
1145
+ const a = document.getElementsByClassName("dgComponentSelected");
1146
+ Array.from(a).forEach((n) => n.classList.remove("dgComponentSelected"));
1220
1147
  }
1221
- function N(l) {
1222
- l.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
1148
+ function N(a) {
1149
+ a.currentTarget.classList.add("dgComponentFocused", "dgComponentSelected");
1223
1150
  }
1224
- function D(l) {
1225
- var f;
1226
- const o = v.schema.buttons || v.schema.contents, t = o == null ? void 0 : o.findIndex((R) => R.id === l);
1151
+ function j(a) {
1152
+ var u;
1153
+ const n = C.schema.buttons || C.schema.contents, t = n == null ? void 0 : n.findIndex((R) => R.id === a);
1227
1154
  if (t === -1)
1228
1155
  return;
1229
- const i = o[t];
1230
- (f = v == null ? void 0 : v.setupContext) == null || f.emit("selectionChange", "response-toolbar-item", i);
1156
+ const r = n[t];
1157
+ (u = C == null ? void 0 : C.setupContext) == null || u.emit("selectionChange", "response-toolbar-item", r);
1231
1158
  }
1232
- function b(l, o) {
1233
- p(l), A(), N(l), p(l), c(l, o), D(o.id);
1159
+ function b(a, n) {
1160
+ l(a), B(), N(a), l(a), c(a, n), j(n.id);
1234
1161
  }
1235
- function P(l) {
1162
+ function I(a) {
1236
1163
  return w("div", {
1237
- id: l.id,
1238
- class: g(l)
1164
+ id: a.id,
1165
+ class: g(a)
1239
1166
  }, [w("div", {
1240
- class: C(l),
1167
+ class: v(a),
1241
1168
  style: "display: flex;padding-right: 0.1rem;",
1242
- onClick: (o) => l.enable && b(o, l)
1243
- }, [k(l.id), e.shouldShowIcon(l) && w("i", {
1244
- class: e.iconClass(l)
1245
- }, null), w("span", null, [l.text]), w("i", {
1169
+ onClick: (n) => a.enable && b(n, a)
1170
+ }, [P(a.id), e.shouldShowIcon(a) && w("i", {
1171
+ class: e.iconClass(a)
1172
+ }, null), w("span", null, [a.text]), w("i", {
1246
1173
  class: "f-icon f-icon-arrow-chevron-down",
1247
1174
  style: "display: inline-block;float: right;line-height: 1.25rem;margin-left: .25rem;margin-right: .25rem;"
1248
- }, null)]), u(l)]);
1175
+ }, null)]), f(a)]);
1249
1176
  }
1250
1177
  function E() {
1251
- m();
1178
+ y();
1252
1179
  }
1253
1180
  return {
1254
- renderToolbarDropdown: P,
1181
+ renderToolbarDropdown: I,
1255
1182
  clearAllDropDown: E
1256
1183
  };
1257
1184
  }
1258
- function ft() {
1259
- function r(e) {
1260
- var u, m;
1185
+ function ut() {
1186
+ function s(e) {
1187
+ var f, y;
1261
1188
  if (!e)
1262
1189
  return !1;
1263
- const n = ((u = e.targetContainer) == null ? void 0 : u.componentInstance) && e.targetContainer.componentInstance.value;
1264
- if (!n)
1190
+ const o = ((f = e.targetContainer) == null ? void 0 : f.componentInstance) && e.targetContainer.componentInstance.value;
1191
+ if (!o)
1265
1192
  return !1;
1266
- const a = (m = n.schema.appearance) == null ? void 0 : m.class;
1193
+ const p = (y = o.schema.appearance) == null ? void 0 : y.class;
1267
1194
  if (e.controlCategory === "input" || e.controlType === "form-group") {
1268
- const v = n.schema.type, M = (v === "response-form" || v === "content-container") && a && a.includes("farris-form");
1269
- if (n.schema.type !== "response-layout-item" && !M)
1195
+ const C = o.schema.type, k = (C === "response-form" || C === "content-container") && p && p.includes("farris-form");
1196
+ if (o.schema.type !== "response-layout-item" && !k)
1270
1197
  return !1;
1271
1198
  }
1272
1199
  return e.controlType !== "field-set";
1273
1200
  }
1274
1201
  return {
1275
- basalDragulaRuleForContainer: r
1202
+ basalDragulaRuleForContainer: s
1276
1203
  };
1277
1204
  }
1278
- const mt = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-design.gitee.io/dragging-rules.schema.json", yt = "Dragging Rules", ht = "The rules of designer canvas", bt = "object", vt = {
1205
+ const ft = "https://json-schema.org/draft/2020-12/schema", mt = "https://farris-design.gitee.io/dragging-rules.schema.json", gt = "Dragging Rules", ht = "The rules of designer canvas", bt = "object", yt = {
1279
1206
  "f-page": {
1280
1207
  description: "The root class of page designed by farris.",
1281
1208
  type: "object",
@@ -1839,209 +1766,143 @@ const mt = "https://json-schema.org/draft/2020-12/schema", gt = "https://farris-
1839
1766
  description: "",
1840
1767
  type: "object"
1841
1768
  }
1842
- }, Ct = [], wt = {
1843
- $schema: mt,
1844
- $id: gt,
1845
- title: yt,
1769
+ }, vt = [], Ct = {
1770
+ $schema: ft,
1771
+ $id: mt,
1772
+ title: gt,
1846
1773
  description: ht,
1847
1774
  type: bt,
1848
- properties: vt,
1849
- required: Ct
1850
- }, J = /* @__PURE__ */ new Map();
1851
- function xe() {
1852
- function r(s, y, h, x) {
1775
+ properties: yt,
1776
+ required: vt
1777
+ }, Z = /* @__PURE__ */ new Map();
1778
+ function Te() {
1779
+ function s(i, m, h, T) {
1853
1780
  var O;
1854
1781
  if (typeof h == "number")
1855
- return ((O = x[s]) == null ? void 0 : O.length) === h;
1782
+ return ((O = T[i]) == null ? void 0 : O.length) === h;
1856
1783
  if (typeof h == "object") {
1857
- const k = Object.keys(h)[0], A = h[k];
1858
- if (k === "not")
1859
- return Number(x[s].length) !== Number(A);
1860
- if (k === "moreThan")
1861
- return Number(x[s].length) >= Number(A);
1862
- if (k === "lessThan")
1863
- return Number(x[s].length) <= Number(A);
1784
+ const P = Object.keys(h)[0], B = h[P];
1785
+ if (P === "not")
1786
+ return Number(T[i].length) !== Number(B);
1787
+ if (P === "moreThan")
1788
+ return Number(T[i].length) >= Number(B);
1789
+ if (P === "lessThan")
1790
+ return Number(T[i].length) <= Number(B);
1864
1791
  }
1865
1792
  return !1;
1866
1793
  }
1867
- function e(s, y, h, x) {
1868
- return typeof h == "boolean" ? x.childrenClassList.includes(y) === !!h : !1;
1794
+ function e(i, m, h, T) {
1795
+ return typeof h == "boolean" ? T.childrenClassList.includes(m) === !!h : !1;
1869
1796
  }
1870
- function n(s, y, h, x) {
1871
- return typeof h == "boolean" ? x.parentClassList.includes(y) === !!h : !1;
1797
+ function o(i, m, h, T) {
1798
+ return typeof h == "boolean" ? T.parentClassList.includes(m) === !!h : !1;
1872
1799
  }
1873
- function a(s, y, h, x) {
1874
- return typeof h == "boolean" ? x.parentClassList.includes(y) === !!h : !1;
1800
+ function p(i, m, h, T) {
1801
+ return typeof h == "boolean" ? T.parentClassList.includes(m) === !!h : !1;
1875
1802
  }
1876
- const u = /* @__PURE__ */ new Map([
1877
- ["length", r],
1803
+ const f = /* @__PURE__ */ new Map([
1804
+ ["length", s],
1878
1805
  ["hasChildren", e],
1879
- ["hasSibling", a],
1880
- ["hasParent", n]
1806
+ ["hasSibling", p],
1807
+ ["hasParent", o]
1881
1808
  ]);
1882
- function m(s, y) {
1883
- const h = s;
1884
- return typeof y == "number" ? [{ target: h, operator: "length", param: null, value: Number(y) }] : typeof y == "object" ? Object.keys(y).map((x) => {
1885
- if (x === "length")
1886
- return { target: h, operator: "length", param: null, value: y[x] };
1887
- const O = x, k = y[x];
1888
- return { target: h, operator: s === "children" ? "hasChildren" : s === "parent" ? "hasParent" : "hasSibling", param: O, value: k };
1809
+ function y(i, m) {
1810
+ const h = i;
1811
+ return typeof m == "number" ? [{ target: h, operator: "length", param: null, value: Number(m) }] : typeof m == "object" ? Object.keys(m).map((T) => {
1812
+ if (T === "length")
1813
+ return { target: h, operator: "length", param: null, value: m[T] };
1814
+ const O = T, P = m[T];
1815
+ return { target: h, operator: i === "children" ? "hasChildren" : i === "parent" ? "hasParent" : "hasSibling", param: O, value: P };
1889
1816
  }) : [];
1890
1817
  }
1891
- function v(s, y) {
1892
- if (u.has(s.operator)) {
1893
- const h = u.get(s.operator);
1894
- return h && h(s.target, s.param, s.value, y) || !1;
1818
+ function C(i, m) {
1819
+ if (f.has(i.operator)) {
1820
+ const h = f.get(i.operator);
1821
+ return h && h(i.target, i.param, i.value, m) || !1;
1895
1822
  }
1896
1823
  return !1;
1897
1824
  }
1898
- function M(s, y) {
1899
- return Object.keys(s).reduce((k, A) => {
1900
- const N = m(A, s[A]);
1901
- return k.push(...N), k;
1902
- }, []).reduce((k, A) => k && v(A, y), !0);
1825
+ function k(i, m) {
1826
+ return Object.keys(i).reduce((P, B) => {
1827
+ const N = y(B, i[B]);
1828
+ return P.push(...N), P;
1829
+ }, []).reduce((P, B) => P && C(B, m), !0);
1903
1830
  }
1904
- function S(s, y) {
1905
- const h = Object.keys(s), x = h.includes("allOf"), O = h.includes("anyOf"), k = x || O, D = (k ? s[k ? x ? "allOf" : "anyOf" : "allOf"] : [s]).map((P) => M(P, y));
1906
- return x ? !D.includes(!1) : D.includes(!0);
1831
+ function D(i, m) {
1832
+ const h = Object.keys(i), T = h.includes("allOf"), O = h.includes("anyOf"), P = T || O, j = (P ? i[P ? T ? "allOf" : "anyOf" : "allOf"] : [i]).map((I) => k(I, m));
1833
+ return T ? !j.includes(!1) : j.includes(!0);
1907
1834
  }
1908
- function g(s, y) {
1909
- const h = s.const;
1910
- return h ? typeof h == "boolean" ? h : typeof h == "object" ? S(h, y) : !1 : !1;
1835
+ function g(i, m) {
1836
+ const h = i.const;
1837
+ return h ? typeof h == "boolean" ? h : typeof h == "object" ? D(h, m) : !1 : !1;
1911
1838
  }
1912
- function C(s) {
1913
- return (y) => {
1839
+ function v(i) {
1840
+ return (m) => {
1914
1841
  const h = { canAccept: !0, fixed: !1, hidePadding: !1 };
1915
- return s && s.properties && Object.keys(s.properties).reduce((x, O) => {
1916
- const k = s.properties[O];
1917
- return x[O] = g(k, y), x;
1842
+ return i && i.properties && Object.keys(i.properties).reduce((T, O) => {
1843
+ const P = i.properties[O];
1844
+ return T[O] = g(P, m), T;
1918
1845
  }, h), h;
1919
1846
  };
1920
1847
  }
1921
- function p(s, y, h) {
1922
- if (y.type === "object" && y.properties) {
1923
- const { rules: x, contents: O } = y.properties;
1924
- h.set(s, C(x)), O && Object.keys(O.properties).forEach(
1925
- (k) => p(k, O.properties[k], h)
1848
+ function l(i, m, h) {
1849
+ if (m.type === "object" && m.properties) {
1850
+ const { rules: T, contents: O } = m.properties;
1851
+ h.set(i, v(T)), O && Object.keys(O.properties).forEach(
1852
+ (P) => l(P, O.properties[P], h)
1926
1853
  );
1927
1854
  }
1928
1855
  }
1929
1856
  function c() {
1930
- const { properties: s } = wt;
1931
- Object.keys(s).forEach((y) => {
1932
- p(y, s[y], J);
1857
+ const { properties: i } = Ct;
1858
+ Object.keys(i).forEach((m) => {
1859
+ l(m, i[m], Z);
1933
1860
  });
1934
1861
  }
1935
- function d(s, y) {
1862
+ function d(i, m) {
1936
1863
  const h = { canAccept: !0, fixed: !1, hidePadding: !0 };
1937
- return J.has(s) ? J.get(s)(y) : h;
1864
+ return Z.has(i) ? Z.get(i)(m) : h;
1938
1865
  }
1939
1866
  return c(), { getRuleValue: d };
1940
1867
  }
1941
- class Se {
1942
- static getEditorTypesByMDataType(e) {
1943
- const n = this.fieldControlTypeMapping[e];
1944
- return n || [{ key: "", value: "" }];
1945
- }
1946
- }
1947
- /**
1948
- * <字段类型,可配置的控件类型列表>的映射
1949
- */
1950
- F(Se, "fieldControlTypeMapping", {
1951
- String: [
1952
- { key: I["input-group"].type, value: I["input-group"].name },
1953
- { key: I.lookup.type, value: I.lookup.name },
1954
- { key: I.Image.type, value: I.Image.name },
1955
- { key: I["date-picker"].type, value: I["date-picker"].name },
1956
- { key: I["check-box"].type, value: I["check-box"].name },
1957
- { key: I["radio-group"].type, value: I["radio-group"].name },
1958
- { key: I["combo-list"].type, value: I["combo-list"].name },
1959
- { key: I.textarea.type, value: I.textarea.name }
1960
- // { key: DgControl.Tags.type, value: DgControl.Tags.name },
1961
- ],
1962
- Text: [
1963
- { key: I.textarea.type, value: I.textarea.name },
1964
- { key: I.avatar.type, value: I.avatar.name },
1965
- { key: I.lookup.type, value: I.lookup.name }
1966
- ],
1967
- Decimal: [
1968
- { key: I["number-spinner"].type, value: I["number-spinner"].name }
1969
- ],
1970
- Integer: [
1971
- { key: I["number-spinner"].type, value: I["number-spinner"].name }
1972
- ],
1973
- Number: [
1974
- { key: I["number-spinner"].type, value: I["number-spinner"].name }
1975
- ],
1976
- BigNumber: [
1977
- { key: I["number-spinner"].type, value: I["number-spinner"].name }
1978
- ],
1979
- Date: [
1980
- { key: I["date-picker"].type, value: I["date-picker"].name }
1981
- ],
1982
- DateTime: [
1983
- { key: I["date-picker"].type, value: I["date-picker"].name }
1984
- ],
1985
- Boolean: [
1986
- { key: I.switch.type, value: I.switch.name },
1987
- { key: I["check-box"].type, value: I["check-box"].name }
1988
- ],
1989
- Enum: [
1990
- { key: I["combo-list"].type, value: I["combo-list"].name },
1991
- { key: I["radio-group"].type, value: I["radio-group"].name }
1992
- ],
1993
- Object: [
1994
- { key: I.lookup.type, value: I.lookup.name },
1995
- { key: I["combo-list"].type, value: I["combo-list"].name },
1996
- { key: I["radio-group"].type, value: I["radio-group"].name }
1997
- ],
1998
- EmployeeSelector: [
1999
- { key: I.EmployeeSelector.type, value: I.EmployeeSelector.name }
2000
- ],
2001
- AdminOrganizationSelector: [
2002
- { key: I.AdminOrganizationSelector.type, value: I.AdminOrganizationSelector.name }
2003
- ]
2004
- });
2005
- class ae {
2006
- constructor(e, n) {
2007
- F(this, "componentId");
2008
- F(this, "viewModelId");
2009
- F(this, "eventsEditorUtils");
2010
- F(this, "formSchemaUtils");
2011
- F(this, "formMetadataConverter");
2012
- F(this, "designViewModelUtils");
2013
- F(this, "designViewModelField");
2014
- F(this, "controlCreatorUtils");
2015
- F(this, "designerHostService");
2016
- F(this, "schemaService", null);
2017
- F(this, "metadataService", null);
2018
- F(this, "propertyConfig", {
1868
+ class ce {
1869
+ constructor(e, o) {
1870
+ A(this, "componentId");
1871
+ A(this, "viewModelId");
1872
+ A(this, "eventsEditorUtils");
1873
+ A(this, "formSchemaUtils");
1874
+ A(this, "formMetadataConverter");
1875
+ A(this, "designViewModelUtils");
1876
+ A(this, "designViewModelField");
1877
+ A(this, "controlCreatorUtils");
1878
+ A(this, "designerHostService");
1879
+ A(this, "schemaService", null);
1880
+ A(this, "metadataService", null);
1881
+ A(this, "propertyConfig", {
2019
1882
  type: "object",
2020
1883
  categories: {}
2021
1884
  });
2022
- var a;
2023
- this.componentId = e, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((a = this.formSchemaUtils) == null ? void 0 : a.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
1885
+ var p;
1886
+ this.componentId = e, this.designerHostService = o, this.eventsEditorUtils = o.eventsEditorUtils, this.formSchemaUtils = o.formSchemaUtils, this.formMetadataConverter = o.formMetadataConverter, this.viewModelId = ((p = this.formSchemaUtils) == null ? void 0 : p.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = o.designViewModelUtils, this.controlCreatorUtils = o.controlCreatorUtils, this.metadataService = o.metadataService, this.schemaService = o.schemaService;
2024
1887
  }
2025
1888
  getTableInfo() {
2026
1889
  var e;
2027
1890
  return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
2028
1891
  }
2029
1892
  setDesignViewModelField(e) {
2030
- const n = e.binding && e.binding.type === "Form" && e.binding.field;
2031
- if (n) {
1893
+ const o = e.binding && e.binding.type === "Form" && e.binding.field;
1894
+ if (o) {
2032
1895
  if (!this.designViewModelField) {
2033
- const a = this.designViewModelUtils.getDgViewModel(this.viewModelId);
2034
- this.designViewModelField = a.fields.find((u) => u.id === n);
1896
+ const p = this.designViewModelUtils.getDgViewModel(this.viewModelId);
1897
+ this.designViewModelField = p.fields.find((f) => f.id === o);
2035
1898
  }
2036
1899
  e.updateOn = this.designViewModelField.updateOn;
2037
1900
  }
2038
1901
  }
2039
- changeFieldEditorType(e, n) {
1902
+ changeFieldEditorType(e, o) {
2040
1903
  }
2041
1904
  getBasicPropConfig(e) {
2042
- var a, u;
2043
- var n = this;
2044
- return this.setDesignViewModelField(e), {
1905
+ return {
2045
1906
  description: "Basic Information",
2046
1907
  title: "基本信息",
2047
1908
  properties: {
@@ -2054,69 +1915,17 @@ class ae {
2054
1915
  type: {
2055
1916
  description: "组件类型",
2056
1917
  title: "控件类型",
2057
- type: "string",
2058
- refreshPanelAfterChanged: !0,
2059
- $converter: "/converter/change-editor.converter",
1918
+ type: "select",
2060
1919
  editor: {
2061
1920
  type: "combo-list",
2062
- textField: "value",
2063
- valueField: "key",
2064
- data: Se.getEditorTypesByMDataType(((u = (a = n.designViewModelField) == null ? void 0 : a.type) == null ? void 0 : u.name) || ""),
2065
- editable: !1
1921
+ textField: "name",
1922
+ valueField: "value",
1923
+ data: [{ value: e.type, name: se[e.type].name }]
2066
1924
  }
2067
- },
2068
- label: {
2069
- title: "标签",
2070
- type: "string",
2071
- $converter: "/converter/form-group-label.converter"
2072
1925
  }
2073
- },
2074
- setPropertyRelates(m, v) {
2075
- if (m)
2076
- switch (m && m.propertyID) {
2077
- case "type": {
2078
- n.changeControlType(e, m);
2079
- break;
2080
- }
2081
- }
2082
1926
  }
2083
1927
  };
2084
1928
  }
2085
- /**
2086
- * 卡片控件:切换控件类型后事件
2087
- * @param propertyData 控件DOM属性
2088
- * @param newControlType 新控件类型
2089
- */
2090
- changeControlType(e, n) {
2091
- var g, C, p, c, d;
2092
- const a = n.propertyValue, u = this.formSchemaUtils.getComponentById(this.componentId);
2093
- let m = this.getControlParentContainer(e.id, u);
2094
- if (!m)
2095
- return;
2096
- const v = m.contents.findIndex((s) => s.id === e.id), M = m.contents[v];
2097
- let S;
2098
- this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
2099
- editor: {
2100
- $type: a
2101
- },
2102
- name: this.designViewModelField.name,
2103
- require: this.designViewModelField.require,
2104
- readonly: this.designViewModelField.readonly
2105
- }, !1), S = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, a)), Object.assign(S, {
2106
- id: M.id,
2107
- appearance: M.appearance,
2108
- size: M.size,
2109
- label: M.label
2110
- }), Object.assign(S.editor, {
2111
- isTextArea: S.isTextArea && M.isTextArea,
2112
- type: a || "",
2113
- placeHolder: (g = M.editor) == null ? void 0 : g.placeHolder,
2114
- holdPlace: (C = M.editor) == null ? void 0 : C.holdPlace,
2115
- readonly: (p = M.editor) == null ? void 0 : p.readonly,
2116
- require: (c = M.editor) == null ? void 0 : c.require,
2117
- visible: (d = M.editor) == null ? void 0 : d.visible
2118
- }), m.contents.splice(v, 1, S);
2119
- }
2120
1929
  getAppearanceConfig(e = null) {
2121
1930
  return {
2122
1931
  title: "样式",
@@ -2133,61 +1942,14 @@ class ae {
2133
1942
  type: "string",
2134
1943
  description: "组件的样式",
2135
1944
  $converter: "/converter/appearance.converter"
2136
- },
2137
- responseLayout: {
2138
- description: "响应式列宽",
2139
- title: "响应式列宽",
2140
- type: "boolean",
2141
- visible: !1,
2142
- editor: {
2143
- type: "response-layout-editor-setting"
2144
- },
2145
- $converter: "/converter/response-form-layout.converter"
2146
1945
  }
2147
1946
  }
2148
1947
  };
2149
1948
  }
2150
- /**
2151
- * 获取控件:以contents为节点进行定位
2152
- * @param controlId 控件ID
2153
- * @param domJson 容器
2154
- */
2155
- getControlParentContainer(e, n) {
2156
- let a;
2157
- if (!n || !n.contents || n.contents.length === 0)
2158
- return null;
2159
- for (const u of n.contents) {
2160
- if (u.id === e)
2161
- return a = n, n;
2162
- if (a = this.getControlParentContainer(e, u), a)
2163
- return a;
2164
- }
2165
- }
2166
- getBindingFieldEditorOptions(e) {
2167
- const n = this.formSchemaUtils.getFormMetadataBasicInfo();
2168
- return {
2169
- type: "field-selector",
2170
- bindingType: { enable: !1 },
2171
- editorParams: {
2172
- propertyData: e,
2173
- formBasicInfo: n
2174
- },
2175
- columns: [
2176
- { field: "name", title: "字段名称" },
2177
- { field: "bindingField", title: "绑定字段" },
2178
- { field: "fieldType", title: "字段类型" }
2179
- ],
2180
- beforeOpenDialog: (a) => {
2181
- const u = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
2182
- a.instance.loadData(u);
2183
- },
2184
- textField: "bindingField"
2185
- };
2186
- }
2187
1949
  }
2188
- class Tt extends ae {
2189
- constructor(e, n) {
2190
- super(e, n);
1950
+ class wt extends ce {
1951
+ constructor(e, o) {
1952
+ super(e, o);
2191
1953
  }
2192
1954
  getPropertyConfig(e) {
2193
1955
  return this.getBasicPropConfig(e), this.getBehaviorProperties(e), this.propertyConfig;
@@ -2211,7 +1973,7 @@ class Tt extends ae {
2211
1973
  type: "combo-list",
2212
1974
  textField: "value",
2213
1975
  valueField: "key",
2214
- data: [{ key: "response-toolbar", value: I["response-toolbar"].name }]
1976
+ data: [{ key: "response-toolbar", value: se["response-toolbar"].name }]
2215
1977
  }
2216
1978
  }
2217
1979
  }
@@ -2254,85 +2016,85 @@ class Tt extends ae {
2254
2016
  };
2255
2017
  }
2256
2018
  }
2257
- function xt(r, e, n, a) {
2258
- const u = xe(), m = j(!1), v = j(!1);
2259
- let M = !0, S = !1, g;
2260
- function C(D) {
2261
- return g && g.componentClassList && g.componentClassList.includes("f-form-layout") && g.componentClassList.includes("farris-form") ? D.sourceType === "control" && D.controlCategory === "input" || D.sourceType === "move" && D.controlType === "form-group" : !0;
2019
+ function xt(s, e, o, p) {
2020
+ const f = Te(), y = S(!1), C = S(!1);
2021
+ let k = !0, D = !1, g;
2022
+ function v(j) {
2023
+ 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;
2262
2024
  }
2263
- function p(D) {
2264
- return !ft().basalDragulaRuleForContainer(D) || !M || !C(D), !1;
2025
+ function l(j) {
2026
+ return !ut().basalDragulaRuleForContainer(j) || !k || !v(j), !1;
2265
2027
  }
2266
2028
  function c() {
2267
- m.value = !1, v.value = !1;
2268
- const D = r, b = D.appearance && D.appearance.class || "", P = b.split(" "), E = D.buttons || [], l = E.length ? E[0] : null, o = l && l.appearance ? l.appearance.class : "", t = o ? o.split(" ") : [], i = E.length ? E.reduce((V, U) => {
2269
- const z = U && U.appearance ? U.appearance.class : "", Z = z ? z.split(" ") : [];
2270
- return V.push(...Z), V;
2271
- }, []) : [], f = n == null ? void 0 : n.schema, R = f && f.appearance && f.appearance.class || "", T = R ? R.split(" ") : [];
2029
+ y.value = !1, C.value = !1;
2030
+ const j = s, b = j.appearance && j.appearance.class || "", I = b.split(" "), E = j.buttons || [], a = E.length ? E[0] : null, n = a && a.appearance ? a.appearance.class : "", t = n ? n.split(" ") : [], r = E.length ? E.reduce(($, V) => {
2031
+ const U = V && V.appearance ? V.appearance.class : "", X = U ? U.split(" ") : [];
2032
+ return $.push(...X), $;
2033
+ }, []) : [], u = o == null ? void 0 : o.schema, R = u && u.appearance && u.appearance.class || "", x = R ? R.split(" ") : [];
2272
2034
  g = {
2273
2035
  componentClass: b,
2274
- componentClassList: P,
2036
+ componentClassList: I,
2275
2037
  childContents: E,
2276
- firstChildContent: l,
2277
- firstChildClass: o,
2038
+ firstChildContent: a,
2039
+ firstChildClass: n,
2278
2040
  firstChildClassList: t,
2279
- parent: f,
2041
+ parent: u,
2280
2042
  parentClass: R,
2281
- parentClassList: T,
2043
+ parentClassList: x,
2282
2044
  children: E,
2283
- childrenClassList: i
2045
+ childrenClassList: r
2284
2046
  };
2285
- const { canAccept: B, fixed: _, hidePadding: L } = u.getRuleValue(P[0], g);
2286
- return M = B, S = L, !0;
2047
+ const { canAccept: M, fixed: F, hidePadding: _ } = f.getRuleValue(I[0], g);
2048
+ return k = M, D = _, !0;
2287
2049
  }
2288
- function d(D) {
2050
+ function d(j) {
2289
2051
  }
2290
- function s() {
2291
- return r.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
2052
+ function i() {
2053
+ return s.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
2292
2054
  }
2293
- function y(D, b) {
2294
- return b.text = D.label, b;
2055
+ function m(j, b) {
2056
+ return b.text = j.label, b;
2295
2057
  }
2296
- function h(D, b, P) {
2297
- const E = r;
2058
+ function h(j, b, I) {
2059
+ const E = s;
2298
2060
  if ((E.appearance && E.appearance.class || "").split(" ").includes("f-form-layout")) {
2299
- const t = String(D.innerText), i = q("form-group");
2300
- return i.editor = P, i.label = t, i;
2061
+ const t = String(j.innerText), r = q("form-group");
2062
+ return r.editor = I, r.label = t, r;
2301
2063
  }
2302
- return P;
2064
+ return I;
2303
2065
  }
2304
- function x() {
2066
+ function T() {
2305
2067
  return !1;
2306
2068
  }
2307
2069
  function O() {
2308
2070
  return !1;
2309
2071
  }
2310
- function k() {
2072
+ function P() {
2311
2073
  return !0;
2312
2074
  }
2313
- function A() {
2314
- return S;
2075
+ function B() {
2076
+ return D;
2315
2077
  }
2316
- function N(D) {
2317
- return new Tt(D, e).getPropertyConfig(r);
2078
+ function N(j) {
2079
+ return new wt(j, e).getPropertyConfig(s);
2318
2080
  }
2319
2081
  return {
2320
- canAccepts: p,
2321
- checkCanAddComponent: k,
2082
+ canAccepts: l,
2083
+ checkCanAddComponent: P,
2322
2084
  checkCanDeleteComponent: O,
2323
- checkCanMoveComponent: x,
2324
- getStyles: s,
2325
- hideNestedPaddingInDesginerView: A,
2085
+ checkCanMoveComponent: T,
2086
+ getStyles: i,
2087
+ hideNestedPaddingInDesginerView: B,
2326
2088
  onAcceptNewChildElement: h,
2327
2089
  onAcceptMovedChildElement: d,
2328
- onResolveNewComponentSchema: y,
2090
+ onResolveNewComponentSchema: m,
2329
2091
  resolveComponentContext: c,
2330
2092
  getPropsConfig: N,
2331
- triggerBelongedComponentToMoveWhenMoved: m,
2332
- triggerBelongedComponentToDeleteWhenDeleted: v
2093
+ triggerBelongedComponentToMoveWhenMoved: y,
2094
+ triggerBelongedComponentToDeleteWhenDeleted: C
2333
2095
  };
2334
2096
  }
2335
- const St = {
2097
+ const Tt = {
2336
2098
  id: { type: String, default: "" },
2337
2099
  componentId: { type: String, default: "" },
2338
2100
  canAdd: { type: Boolean, default: !1 },
@@ -2345,192 +2107,192 @@ const St = {
2345
2107
  * 组件值
2346
2108
  */
2347
2109
  modelValue: { type: Object }
2348
- }, ee = j(0);
2349
- function Dt(r, e) {
2350
- const n = e.getBoundingClientRect(), a = r.getBoundingClientRect(), u = a.top >= n.top, m = a.top <= n.bottom;
2351
- return u && m;
2110
+ }, K = S(0);
2111
+ function jt(s, e) {
2112
+ const o = e.getBoundingClientRect(), p = s.getBoundingClientRect(), f = p.top >= o.top, y = p.top <= o.bottom;
2113
+ return f && y;
2352
2114
  }
2353
- function It(r) {
2354
- if (!r)
2115
+ function Dt(s) {
2116
+ if (!s)
2355
2117
  return;
2356
2118
  let e;
2357
- if (r.className.includes("dgComponentSelected") ? e = r : e = r.querySelector(".dgComponentSelected"), !e)
2119
+ if (s.className.includes("dgComponentSelected") ? e = s : e = s.querySelector(".dgComponentSelected"), !e)
2358
2120
  return;
2359
- const n = e.getBoundingClientRect();
2360
- if (n.width === 0 && n.height === 0)
2121
+ const o = e.getBoundingClientRect();
2122
+ if (o.width === 0 && o.height === 0)
2361
2123
  return;
2362
- const a = e.querySelector(".component-btn-group");
2363
- if (a) {
2364
- if (!Dt(e, r)) {
2365
- a.style.display = "none";
2124
+ const p = e.querySelector(".component-btn-group");
2125
+ if (p) {
2126
+ if (!jt(e, s)) {
2127
+ p.style.display = "none";
2366
2128
  return;
2367
2129
  }
2368
- a.style.display = "";
2369
- const m = a.getBoundingClientRect(), v = a.querySelector("div");
2370
- if (v) {
2371
- const M = v.getBoundingClientRect();
2372
- v.style.top = m.top + "px", v.style.left = m.left - M.width + "px";
2130
+ p.style.display = "";
2131
+ const y = p.getBoundingClientRect(), C = p.querySelector("div");
2132
+ if (C) {
2133
+ const k = C.getBoundingClientRect();
2134
+ C.style.top = y.top + "px", C.style.left = y.left - k.width + "px";
2373
2135
  }
2374
2136
  }
2375
2137
  }
2376
- function Mt(r, e, n) {
2138
+ function It(s, e, o) {
2377
2139
  var N;
2378
- function a() {
2140
+ function p() {
2379
2141
  }
2380
- const u = "", m = j();
2381
- function v() {
2142
+ const f = "", y = S();
2143
+ function C() {
2382
2144
  return !0;
2383
2145
  }
2384
- function M() {
2146
+ function k() {
2385
2147
  return !1;
2386
2148
  }
2387
- function S() {
2149
+ function D() {
2388
2150
  return !0;
2389
2151
  }
2390
2152
  function g() {
2391
2153
  return !0;
2392
2154
  }
2393
- function C() {
2155
+ function v() {
2394
2156
  return !0;
2395
2157
  }
2396
- function p(D) {
2397
- if (!D || !D.value)
2158
+ function l(j) {
2159
+ if (!j || !j.value)
2398
2160
  return null;
2399
- const b = j(D == null ? void 0 : D.value.parent), P = p(b);
2400
- return P || null;
2161
+ const b = S(j == null ? void 0 : j.value.parent), I = l(b);
2162
+ return I || null;
2401
2163
  }
2402
- function c(D = e) {
2403
- const { componentInstance: b, designerItemElementRef: P } = D;
2404
- return !b || !b.value ? null : b.value.canMove || b.value.canAdd || b.value.canDelete ? P : c(D.parent);
2164
+ function c(j = e) {
2165
+ const { componentInstance: b, designerItemElementRef: I } = j;
2166
+ return !b || !b.value ? null : b.value.canMove || b.value.canAdd || b.value.canDelete ? I : c(j.parent);
2405
2167
  }
2406
- function d(D) {
2407
- return !!n;
2168
+ function d(j) {
2169
+ return !!o;
2408
2170
  }
2409
- function s() {
2171
+ function i() {
2410
2172
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
2411
2173
  }
2412
- function y() {
2174
+ function m() {
2413
2175
  }
2414
- function h(D, b) {
2176
+ function h(j, b) {
2415
2177
  }
2416
- function x(D) {
2417
- const { componentType: b } = D;
2418
- let P = q(b, D);
2178
+ function T(j) {
2179
+ const { componentType: b } = j;
2180
+ let I = q(b, j);
2419
2181
  const E = b.toLowerCase().replace("-", "_");
2420
- return P && !P.id && P.type === b && (P.id = `${E}_${Math.random().toString().slice(2, 6)}`), P;
2182
+ return I && !I.id && I.type === b && (I.id = `${E}_${Math.random().toString().slice(2, 6)}`), I;
2421
2183
  }
2422
- function O(D, b) {
2423
- const P = String(D.getAttribute("data-controltype")), E = D.getAttribute("data-feature"), l = E ? JSON.parse(E) : {};
2424
- l.parentComponentInstance = m.value;
2425
- let o = q(P, l);
2426
- const t = P.toLowerCase().replace("-", "_");
2427
- return o && !o.id && o.type === P && (o.id = `${t}_${Math.random().toString().slice(2, 6)}`), o;
2184
+ function O(j, b) {
2185
+ const I = String(j.getAttribute("data-controltype")), E = j.getAttribute("data-feature"), a = E ? JSON.parse(E) : {};
2186
+ a.parentComponentInstance = y.value;
2187
+ let n = q(I, a);
2188
+ const t = I.toLowerCase().replace("-", "_");
2189
+ return n && !n.id && n.type === I && (n.id = `${t}_${Math.random().toString().slice(2, 6)}`), n;
2428
2190
  }
2429
- function k(D) {
2191
+ function P(j) {
2430
2192
  }
2431
- function A(...D) {
2193
+ function B(...j) {
2432
2194
  return [];
2433
2195
  }
2434
- return m.value = {
2435
- canMove: v(),
2436
- canSelectParent: M(),
2196
+ return y.value = {
2197
+ canMove: C(),
2198
+ canSelectParent: k(),
2437
2199
  canAdd: g(),
2438
- canDelete: S(),
2439
- canNested: !C(),
2200
+ canDelete: D(),
2201
+ canNested: !v(),
2440
2202
  contents: [],
2441
- elementRef: r,
2203
+ elementRef: s,
2442
2204
  parent: (N = e.parent) == null ? void 0 : N.componentInstance,
2443
2205
  schema: e.schema,
2444
- styles: u,
2206
+ styles: f,
2445
2207
  canAccepts: d,
2446
- getBelongedComponentInstance: p,
2208
+ getBelongedComponentInstance: l,
2447
2209
  getDraggableDesignItemElement: c,
2448
- getDraggingDisplayText: s,
2449
- getPropConfig: A,
2450
- getDragScopeElement: y,
2210
+ getDraggingDisplayText: i,
2211
+ getPropConfig: B,
2212
+ getDragScopeElement: m,
2451
2213
  onAcceptMovedChildElement: h,
2452
2214
  onAcceptNewChildElement: O,
2453
- onChildElementMovedOut: k,
2454
- addNewChildComponentSchema: x,
2455
- updateDragAndDropRules: a,
2456
- triggerBelongedComponentToMoveWhenMoved: j(!1),
2457
- triggerBelongedComponentToDeleteWhenDeleted: j(!1)
2458
- }, m;
2215
+ onChildElementMovedOut: P,
2216
+ addNewChildComponentSchema: T,
2217
+ updateDragAndDropRules: p,
2218
+ triggerBelongedComponentToMoveWhenMoved: S(!1),
2219
+ triggerBelongedComponentToDeleteWhenDeleted: S(!1)
2220
+ }, y;
2459
2221
  }
2460
- const Pt = /* @__PURE__ */ Y({
2222
+ const Pt = /* @__PURE__ */ Q({
2461
2223
  name: "FDesignerInnerItem",
2462
- props: St,
2224
+ props: Tt,
2463
2225
  emits: ["selectionChange", "addComponent", "removeComponent"],
2464
- setup(r, e) {
2465
- const n = j(r.canMove), a = j(r.canAdd), u = j(r.canDelete), m = j(!1), v = j(r.contentKey), M = j(r.childType), S = j(r.childLabel), g = j(r.modelValue), C = j(""), p = j(), c = $("canvas-dragula"), d = j(), s = $("design-item-context"), y = {
2466
- designerItemElementRef: p,
2226
+ setup(s, e) {
2227
+ const o = S(s.canMove), p = S(s.canAdd), f = S(s.canDelete), y = S(!1), C = S(s.contentKey), k = S(s.childType), D = S(s.childLabel), g = S(s.modelValue), v = S(""), l = S(), c = L("canvas-dragula"), d = S(), i = L("design-item-context"), m = {
2228
+ designerItemElementRef: l,
2467
2229
  componentInstance: d,
2468
2230
  schema: g.value,
2469
- parent: s,
2231
+ parent: i,
2470
2232
  setupContext: e
2471
2233
  };
2472
- Re("design-item-context", y);
2234
+ Ee("design-item-context", m);
2473
2235
  const h = W(() => ({
2474
2236
  "farris-component": !0,
2475
2237
  // 受position-relative影响,整个容器的高度不能被撑起
2476
- "flex-fill": r.id == "root-component",
2477
- "position-relative": n.value || u.value,
2478
- "farris-nested": m.value,
2479
- "can-move": n.value,
2480
- "d-none": p.value && p.value.classList.contains("d-none")
2481
- })), x = W(() => {
2238
+ "flex-fill": s.id == "root-component",
2239
+ "position-relative": o.value || f.value,
2240
+ "farris-nested": y.value,
2241
+ "can-move": o.value,
2242
+ "d-none": l.value && l.value.classList.contains("d-none")
2243
+ })), T = W(() => {
2482
2244
  const t = {};
2483
- return C.value && C.value.split(";").reduce((i, f) => {
2484
- const [R, T] = f.split(":");
2485
- return R && (i[R] = T), i;
2245
+ return v.value && v.value.split(";").reduce((r, u) => {
2246
+ const [R, x] = u.split(":");
2247
+ return R && (r[R] = x), r;
2486
2248
  }, t), t;
2487
2249
  });
2488
- function O(t, i) {
2489
- if (s && s.schema[v.value]) {
2490
- const f = s.schema[v.value].findIndex((R) => R.id === i.id);
2491
- if (f > -1) {
2492
- const R = s.schema[v.value].length, T = s.schema[v.value][f % R];
2493
- s.designerItemElementRef.value.querySelector(`#${T.id}-design-item`), s.schema[v.value].splice(f, 1), s.componentInstance.value.updateDragAndDropRules(), ee.value++, e.emit("removeComponent");
2250
+ function O(t, r) {
2251
+ if (i && i.schema[C.value]) {
2252
+ const u = i.schema[C.value].findIndex((R) => R.id === r.id);
2253
+ if (u > -1) {
2254
+ const R = i.schema[C.value].length, x = i.schema[C.value][u % R];
2255
+ i.designerItemElementRef.value.querySelector(`#${x.id}-design-item`), i.schema[C.value].splice(u, 1), i.componentInstance.value.updateDragAndDropRules(), K.value++, e.emit("removeComponent");
2494
2256
  }
2495
2257
  }
2496
2258
  }
2497
- function k(t) {
2259
+ function P(t) {
2498
2260
  if (d.value.addNewChildComponentSchema) {
2499
- const i = {
2500
- componentType: M.value,
2501
- label: S.value,
2261
+ const r = {
2262
+ componentType: k.value,
2263
+ label: D.value,
2502
2264
  parentComponentInstance: d.value,
2503
2265
  targetPosition: -1
2504
- }, f = d.value.addNewChildComponentSchema(i);
2505
- g.value[v.value].push(f), e.emit("addComponent");
2266
+ }, u = d.value.addNewChildComponentSchema(r);
2267
+ g.value[C.value].push(u), e.emit("addComponent");
2506
2268
  }
2507
2269
  }
2508
- function A() {
2509
- return a.value && w("div", {
2270
+ function B() {
2271
+ return p.value && w("div", {
2510
2272
  role: "button",
2511
2273
  class: "btn component-settings-button",
2512
2274
  title: "新增",
2513
2275
  ref: "removeComponent",
2514
2276
  onClick: (t) => {
2515
- k();
2277
+ P();
2516
2278
  }
2517
2279
  }, [w("i", {
2518
2280
  class: "f-icon f-icon-plus-circle"
2519
2281
  }, null)]);
2520
2282
  }
2521
2283
  function N(t) {
2522
- return u.value && w("div", {
2284
+ return f.value && w("div", {
2523
2285
  role: "button",
2524
2286
  class: "btn component-settings-button",
2525
2287
  title: "删除",
2526
2288
  ref: "removeComponent",
2527
- onClick: je((i) => O(i, t), ["stop"])
2289
+ onClick: Me((r) => O(r, t), ["stop"])
2528
2290
  }, [w("i", {
2529
2291
  class: "f-icon f-icon-yxs_delete"
2530
2292
  }, null)]);
2531
2293
  }
2532
- function D() {
2533
- return n.value && w("div", {
2294
+ function j() {
2295
+ return o.value && w("div", {
2534
2296
  role: "button",
2535
2297
  class: "btn component-settings-button",
2536
2298
  title: "移动",
@@ -2544,57 +2306,57 @@ const Pt = /* @__PURE__ */ Y({
2544
2306
  return w("div", {
2545
2307
  class: "component-btn-group",
2546
2308
  "data-noattach": "true"
2547
- }, [w("div", null, [A(), D(), N(t)])]);
2309
+ }, [w("div", null, [B(), j(), N(t)])]);
2548
2310
  }
2549
- Q(() => r.modelValue, (t) => {
2550
- g.value = t, y.schema = t;
2311
+ H(() => s.modelValue, (t) => {
2312
+ g.value = t, m.schema = t;
2551
2313
  });
2552
- function P(t) {
2553
- const i = t.target;
2554
- It(i);
2314
+ function I(t) {
2315
+ const r = t.target;
2316
+ Dt(r);
2555
2317
  }
2556
2318
  function E() {
2557
- var t, i;
2558
- (i = (t = g.value) == null ? void 0 : t.contents) != null && i.length && p.value && p.value.addEventListener("scroll", P);
2319
+ var t, r;
2320
+ (r = (t = g.value) == null ? void 0 : t.contents) != null && r.length && l.value && l.value.addEventListener("scroll", I);
2559
2321
  }
2560
- function l() {
2561
- const t = p.value, i = j(t.children[1]);
2562
- return Mt(i, y).value;
2322
+ function a() {
2323
+ const t = l.value, r = S(t.children[1]);
2324
+ return It(r, m).value;
2563
2325
  }
2564
- H(() => {
2565
- if (p.value) {
2566
- const t = p.value.querySelector(`[data-dragref='${g.value.id}-container']`);
2567
- d.value = t && t.componentInstance ? t.componentInstance.value : l(), c && t && c.attachComponents(t, g.value), m.value = d.value.canNested !== void 0 ? d.value.canNested : m.value, a.value = d.value.canAdd !== void 0 ? d.value.canAdd : a.value, u.value = d.value.canDelete !== void 0 ? d.value.canDelete : u.value, n.value = d.value.canMove !== void 0 ? d.value.canMove : n.value, C.value = d.value.styles || "", p.value && (p.value.componentInstance = d, p.value.designItemContext = y);
2326
+ z(() => {
2327
+ if (l.value) {
2328
+ const t = l.value.querySelector(`[data-dragref='${g.value.id}-container']`);
2329
+ d.value = t && t.componentInstance ? t.componentInstance.value : a(), c && t && c.attachComponents(t, g.value), y.value = d.value.canNested !== void 0 ? d.value.canNested : y.value, p.value = d.value.canAdd !== void 0 ? d.value.canAdd : p.value, f.value = d.value.canDelete !== void 0 ? d.value.canDelete : f.value, o.value = d.value.canMove !== void 0 ? d.value.canMove : o.value, v.value = d.value.styles || "", l.value && (l.value.componentInstance = d, l.value.designItemContext = m);
2568
2330
  }
2569
- E(), ee.value++;
2570
- }), Ee(() => {
2571
- p.value && p.value.removeEventListener("scroll", P);
2331
+ E(), K.value++;
2332
+ }), Se(() => {
2333
+ l.value && l.value.removeEventListener("scroll", I);
2572
2334
  });
2573
- function o(t) {
2574
- Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((f) => f.classList.remove("dgComponentFocused")), t && (t.preventDefault(), t.stopPropagation());
2575
- const i = p.value;
2576
- if (i) {
2577
- const f = document.getElementsByClassName("dgComponentSelected");
2578
- if (!(f && f.length === 1 && f[0] === p.value)) {
2579
- Array.from(f).forEach((B) => B.classList.remove("dgComponentSelected")), i.classList.add("dgComponentFocused"), e.emit("selectionChange", g.value.type, g.value, r.componentId, d.value);
2580
- const T = d.value.getDraggableDesignItemElement(y);
2581
- T && T.value && T.value.classList.add("dgComponentSelected");
2335
+ function n(t) {
2336
+ Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((u) => u.classList.remove("dgComponentFocused")), t && (t.preventDefault(), t.stopPropagation());
2337
+ const r = l.value;
2338
+ if (r) {
2339
+ const u = document.getElementsByClassName("dgComponentSelected");
2340
+ if (!(u && u.length === 1 && u[0] === l.value)) {
2341
+ Array.from(u).forEach((M) => M.classList.remove("dgComponentSelected")), r.classList.add("dgComponentFocused"), e.emit("selectionChange", g.value.type, g.value, s.componentId, d.value);
2342
+ const x = d.value.getDraggableDesignItemElement(m);
2343
+ x && x.value && x.value.classList.add("dgComponentSelected");
2582
2344
  }
2583
2345
  }
2584
- ee.value++;
2346
+ K.value++;
2585
2347
  }
2586
2348
  return () => w("div", {
2587
- id: `${r.id}-design-item`,
2588
- ref: p,
2349
+ id: `${s.id}-design-item`,
2350
+ ref: l,
2589
2351
  class: h.value,
2590
- style: x.value,
2591
- onClick: o
2352
+ style: T.value,
2353
+ onClick: n
2592
2354
  }, [b(g.value), e.slots.default && e.slots.default()]);
2593
2355
  }
2594
2356
  });
2595
- class kt extends ae {
2596
- constructor(e, n) {
2597
- super(e, n);
2357
+ class Rt extends ce {
2358
+ constructor(e, o) {
2359
+ super(e, o);
2598
2360
  }
2599
2361
  getPropertyConfig(e) {
2600
2362
  return this.getBasicPropConfig(e), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
@@ -2643,42 +2405,42 @@ class kt extends ae {
2643
2405
  title: "style样式"
2644
2406
  }
2645
2407
  },
2646
- setPropertyRelates(n, a) {
2408
+ setPropertyRelates(o, p) {
2647
2409
  }
2648
2410
  };
2649
2411
  }
2650
2412
  getEventPropConfig(e) {
2651
- const n = [
2413
+ const o = [
2652
2414
  {
2653
2415
  label: "click",
2654
2416
  name: "点击事件"
2655
2417
  }
2656
2418
  ];
2657
- var a = this;
2658
- const u = a.eventsEditorUtils.formProperties(e, a.viewModelId, n), m = {};
2659
- m[a.viewModelId] = {
2419
+ var p = this;
2420
+ const f = p.eventsEditorUtils.formProperties(e, p.viewModelId, o), y = {};
2421
+ y[p.viewModelId] = {
2660
2422
  type: "events-editor",
2661
2423
  editor: {
2662
- initialData: u
2424
+ initialData: f
2663
2425
  }
2664
2426
  }, this.propertyConfig.categories.eventsEditor = {
2665
2427
  title: "事件",
2666
2428
  hideTitle: !0,
2667
- properties: m,
2429
+ properties: y,
2668
2430
  // 这个属性,标记当属性变更得时候触发重新更新属性
2669
2431
  refreshPanelAfterChanged: !0,
2670
2432
  tabId: "commands",
2671
2433
  tabName: "交互",
2672
- setPropertyRelates(v, M) {
2673
- const S = v.propertyValue;
2674
- delete e[a.viewModelId], S && (S.setPropertyRelates = this.setPropertyRelates, a.eventsEditorUtils.saveRelatedParameters(e, a.viewModelId, S.events, S));
2434
+ setPropertyRelates(C, k) {
2435
+ const D = C.propertyValue;
2436
+ delete e[p.viewModelId], D && (D.setPropertyRelates = this.setPropertyRelates, p.eventsEditorUtils.saveRelatedParameters(e, p.viewModelId, D.events, D));
2675
2437
  }
2676
2438
  };
2677
2439
  }
2678
2440
  }
2679
- class Rt extends ae {
2680
- constructor(e, n) {
2681
- super(e, n);
2441
+ class Et extends ce {
2442
+ constructor(e, o) {
2443
+ super(e, o);
2682
2444
  }
2683
2445
  getPropertyConfig(e) {
2684
2446
  return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
@@ -2702,7 +2464,7 @@ class Rt extends ae {
2702
2464
  type: "combo-list",
2703
2465
  textField: "value",
2704
2466
  valueField: "key",
2705
- data: [{ key: "response-toolbar-item", value: I["response-toolbar-item"].name }]
2467
+ data: [{ key: "response-toolbar-item", value: se["response-toolbar-item"].name }]
2706
2468
  }
2707
2469
  },
2708
2470
  text: {
@@ -2722,289 +2484,289 @@ class Rt extends ae {
2722
2484
  getAppearanceProperties(e) {
2723
2485
  }
2724
2486
  getEventPropConfig(e) {
2725
- const n = [
2487
+ const o = [
2726
2488
  {
2727
2489
  label: "click",
2728
2490
  name: "点击事件"
2729
2491
  }
2730
- ], a = this, u = a.eventsEditorUtils.formProperties(e, a.viewModelId, n), m = {};
2731
- m[a.viewModelId] = {
2492
+ ], p = this, f = p.eventsEditorUtils.formProperties(e, p.viewModelId, o), y = {};
2493
+ y[p.viewModelId] = {
2732
2494
  type: "events-editor",
2733
2495
  editor: {
2734
- initialData: u
2496
+ initialData: f
2735
2497
  }
2736
2498
  }, this.propertyConfig.categories.eventsEditor = {
2737
2499
  title: "事件",
2738
2500
  hideTitle: !0,
2739
- properties: m,
2501
+ properties: y,
2740
2502
  // 这个属性,标记当属性变更得时候触发重新更新属性
2741
2503
  refreshPanelAfterChanged: !0,
2742
2504
  tabId: "commands",
2743
2505
  tabName: "交互",
2744
- setPropertyRelates(v, M) {
2745
- const S = v.propertyValue;
2746
- delete e[a.viewModelId], S && (S.setPropertyRelates = this.setPropertyRelates, a.eventsEditorUtils.saveRelatedParameters(e, a.viewModelId, S.events, S));
2506
+ setPropertyRelates(C, k) {
2507
+ const D = C.propertyValue;
2508
+ delete e[p.viewModelId], D && (D.setPropertyRelates = this.setPropertyRelates, p.eventsEditorUtils.saveRelatedParameters(e, p.viewModelId, D.events, D));
2747
2509
  }
2748
2510
  };
2749
2511
  }
2750
2512
  }
2751
- function Et(r, e) {
2752
- xe();
2753
- const n = j(!1), a = j(!1);
2754
- let u = !1, m = !1;
2755
- function v(h) {
2513
+ function St(s, e) {
2514
+ Te();
2515
+ const o = S(!1), p = S(!1);
2516
+ let f = !1, y = !1;
2517
+ function C(h) {
2756
2518
  return !1;
2757
2519
  }
2758
- function M(h) {
2520
+ function k(h) {
2759
2521
  }
2760
- function S() {
2522
+ function D() {
2761
2523
  return "";
2762
2524
  }
2763
- function g(h, x) {
2764
- return x.text = h.label, x;
2525
+ function g(h, T) {
2526
+ return T.text = h.label, T;
2765
2527
  }
2766
- function C(h, x, O) {
2767
- const k = r.schema;
2768
- if ((k.appearance && k.appearance.class || "").split(" ").includes("f-form-layout")) {
2769
- const D = String(h.innerText), b = q("form-group");
2770
- return b.editor = O, b.label = D, b;
2528
+ function v(h, T, O) {
2529
+ const P = s.schema;
2530
+ if ((P.appearance && P.appearance.class || "").split(" ").includes("f-form-layout")) {
2531
+ const j = String(h.innerText), b = q("form-group");
2532
+ return b.editor = O, b.label = j, b;
2771
2533
  }
2772
2534
  return O;
2773
2535
  }
2774
- function p() {
2536
+ function l() {
2775
2537
  return !1;
2776
2538
  }
2777
2539
  function c() {
2778
- return !m;
2540
+ return !y;
2779
2541
  }
2780
2542
  function d() {
2781
2543
  return !1;
2782
2544
  }
2783
- function s() {
2784
- return u;
2545
+ function i() {
2546
+ return f;
2785
2547
  }
2786
- function y(h) {
2787
- let x;
2788
- switch (r.schema.type) {
2548
+ function m(h) {
2549
+ let T;
2550
+ switch (s.schema.type) {
2789
2551
  case "tab-toolbar-item":
2790
- x = new kt(h, e);
2552
+ T = new Rt(h, e);
2791
2553
  break;
2792
2554
  default:
2793
- x = new Rt(h, e);
2555
+ T = new Et(h, e);
2794
2556
  }
2795
- return x.getPropertyConfig(r.schema);
2557
+ return T.getPropertyConfig(s.schema);
2796
2558
  }
2797
2559
  return {
2798
- canAccepts: v,
2560
+ canAccepts: C,
2799
2561
  checkCanAddComponent: d,
2800
2562
  checkCanDeleteComponent: c,
2801
- checkCanMoveComponent: p,
2802
- getStyles: S,
2803
- hideNestedPaddingInDesginerView: s,
2804
- onAcceptNewChildElement: C,
2805
- onAcceptMovedChildElement: M,
2563
+ checkCanMoveComponent: l,
2564
+ getStyles: D,
2565
+ hideNestedPaddingInDesginerView: i,
2566
+ onAcceptNewChildElement: v,
2567
+ onAcceptMovedChildElement: k,
2806
2568
  onResolveNewComponentSchema: g,
2807
- getPropsConfig: y,
2808
- triggerBelongedComponentToMoveWhenMoved: n,
2809
- triggerBelongedComponentToDeleteWhenDeleted: a
2569
+ getPropsConfig: m,
2570
+ triggerBelongedComponentToMoveWhenMoved: o,
2571
+ triggerBelongedComponentToDeleteWhenDeleted: p
2810
2572
  };
2811
2573
  }
2812
- const De = /* @__PURE__ */ Y({
2574
+ const je = /* @__PURE__ */ Q({
2813
2575
  name: "FResponseToolbarItemDesign",
2814
2576
  props: we,
2815
2577
  emits: ["Click"],
2816
- setup(r, e) {
2817
- j(), j();
2818
- const n = j(r.alignment), a = {
2578
+ setup(s, e) {
2579
+ S(), S();
2580
+ const o = S(s.alignment), p = {
2819
2581
  id: "__more_buttons__",
2820
2582
  text: "More"
2821
- }, u = j(new G(a));
2822
- W(() => u.value.children.length > 0);
2823
- const m = j(), v = $("designer-host-service"), M = $("design-item-context"), S = Et(M, v), g = fe(m, M, S);
2824
- $("toolbar-item-handler", () => {
2825
- }), H(() => {
2826
- m.value.componentInstance = g;
2583
+ }, f = S(new G(p));
2584
+ W(() => f.value.children.length > 0);
2585
+ const y = S(), C = L("designer-host-service"), k = L("design-item-context"), D = St(k, C), g = fe(y, k, D);
2586
+ L("toolbar-item-handler", () => {
2587
+ }), z(() => {
2588
+ y.value.componentInstance = g;
2827
2589
  }), e.expose(g.value);
2828
- function C() {
2590
+ function v() {
2829
2591
  const d = {
2830
2592
  "f-icon": !0
2831
2593
  };
2832
- if (r.icon) {
2833
- const s = r.icon.trim().split(" ");
2834
- s && s.length && s.reduce((y, h) => (y[h] = !0, y), d);
2594
+ if (s.icon) {
2595
+ const i = s.icon.trim().split(" ");
2596
+ i && i.length && i.reduce((m, h) => (m[h] = !0, m), d);
2835
2597
  }
2836
2598
  return d;
2837
2599
  }
2838
- function p() {
2839
- return !!(r.icon && r.icon.trim());
2600
+ function l() {
2601
+ return !!(s.icon && s.icon.trim());
2840
2602
  }
2841
2603
  function c() {
2842
2604
  const d = {
2843
2605
  btn: !0,
2844
2606
  "f-rt-btn": !0,
2845
- "f-btn-ml": n.value === "right",
2846
- "f-btn-mr": n.value === "left",
2847
- "btn-icontext": !!(r.icon && r.icon.trim())
2607
+ "f-btn-ml": o.value === "right",
2608
+ "f-btn-mr": o.value === "left",
2609
+ "btn-icontext": !!(s.icon && s.icon.trim())
2848
2610
  };
2849
- if (r.class) {
2850
- const s = r.class.split(" ");
2851
- s && s.length && s.reduce((y, h) => (y[h] = !0, y), d);
2611
+ if (s.class) {
2612
+ const i = s.class.split(" ");
2613
+ i && i.length && i.reduce((m, h) => (m[h] = !0, m), d);
2852
2614
  }
2853
2615
  return d;
2854
2616
  }
2855
- return H(() => {
2856
- }), ne(() => {
2617
+ return z(() => {
2618
+ }), te(() => {
2857
2619
  }), () => w("div", {
2858
- ref: m,
2859
- "data-dragref": `${M.schema.id}-container`,
2620
+ ref: y,
2621
+ "data-dragref": `${k.schema.id}-container`,
2860
2622
  class: "farris-component position-relative",
2861
2623
  style: "display:inline-block!important;"
2862
2624
  }, [w("button", {
2863
2625
  type: "button",
2864
2626
  class: c(),
2865
- id: r.id
2866
- }, [p() && w("i", {
2867
- class: C()
2868
- }, null), r.text])]);
2627
+ id: s.id
2628
+ }, [l() && w("i", {
2629
+ class: v()
2630
+ }, null), s.text])]);
2869
2631
  }
2870
- }), jt = /* @__PURE__ */ Y({
2632
+ }), Mt = /* @__PURE__ */ Q({
2871
2633
  name: "FResponseToolbarDesign",
2872
- props: at,
2634
+ props: it,
2873
2635
  emits: ["Click"],
2874
- setup(r, e) {
2875
- const n = j(r.items);
2876
- let a = new Array(n.value.length).fill(j());
2877
- const u = j(), m = j(), v = j(r.alignment), M = {
2636
+ setup(s, e) {
2637
+ const o = S(s.items);
2638
+ let p = new Array(o.value.length).fill(S());
2639
+ const f = S(), y = S(), C = S(s.alignment), k = {
2878
2640
  id: "__more_buttons__",
2879
2641
  text: "More"
2880
- }, S = j(new G(M)), g = Te();
2881
- W(() => S.value.children.length > 0);
2882
- const C = j(), p = $("designer-host-service"), c = $("design-item-context"), d = xt(c.schema, p, c), s = fe(C, c, d);
2883
- $("toolbar-item-handler", () => {
2884
- }), H(() => {
2885
- C.value.componentInstance = s;
2886
- }), e.expose(s.value);
2887
- const y = W(() => ({
2642
+ }, D = S(new G(k)), g = xe();
2643
+ W(() => D.value.children.length > 0);
2644
+ const v = S(), l = L("designer-host-service"), c = L("design-item-context"), d = xt(c.schema, l, c), i = fe(v, c, d);
2645
+ L("toolbar-item-handler", () => {
2646
+ }), z(() => {
2647
+ v.value.componentInstance = i;
2648
+ }), e.expose(i.value);
2649
+ const m = W(() => ({
2888
2650
  "f-toolbar": !0,
2889
2651
  "f-response-toolbar": !0,
2890
2652
  "position-relative": !0
2891
2653
  })), h = W(() => ({
2892
2654
  "d-flex": !0,
2893
2655
  "flex-nowrap": !0,
2894
- "justify-content-end": v.value === "right",
2895
- "justify-content-start": v.value === "left"
2656
+ "justify-content-end": C.value === "right",
2657
+ "justify-content-start": C.value === "left"
2896
2658
  })), {
2897
- renderToolbarDropdown: x,
2659
+ renderToolbarDropdown: T,
2898
2660
  clearAllDropDown: O
2899
- } = ut(r, g, s);
2900
- function k() {
2901
- n.value.filter((l) => l.children && l.children.length > 0).forEach((l) => {
2902
- l.expanded = !1;
2903
- }), S.value.expanded = !1, O();
2661
+ } = dt(s, g, i);
2662
+ function P() {
2663
+ o.value.filter((a) => a.children && a.children.length > 0).forEach((a) => {
2664
+ a.expanded = !1;
2665
+ }), D.value.expanded = !1, O();
2904
2666
  }
2905
- const A = /* @__PURE__ */ new Map(), N = [];
2906
- function D(l) {
2907
- const o = m.value;
2908
- let t = l;
2909
- const i = Array.from(o.children), f = i[i.length - 1].id === "__more_buttons__" ? i[i.length - 1] : null;
2910
- if (f) {
2911
- const L = f.computedStyleMap().get("margin-left"), V = f.computedStyleMap().get("margin-right"), U = (L ? L.value : 0) + f.getBoundingClientRect().width + (V ? V.value : 0);
2912
- t -= U;
2667
+ const B = /* @__PURE__ */ new Map(), N = [];
2668
+ function j(a) {
2669
+ const n = y.value;
2670
+ let t = a;
2671
+ const r = Array.from(n.children), u = r[r.length - 1].id === "__more_buttons__" ? r[r.length - 1] : null;
2672
+ if (u) {
2673
+ const _ = u.computedStyleMap().get("margin-left"), $ = u.computedStyleMap().get("margin-right"), V = (_ ? _.value : 0) + u.getBoundingClientRect().width + ($ ? $.value : 0);
2674
+ t -= V;
2913
2675
  }
2914
- const R = i.filter((L) => L.id !== "__more_buttons__");
2915
- for (const L of R) {
2916
- const V = L.computedStyleMap().get("margin-left"), U = L.computedStyleMap().get("margin-right"), z = (V ? V.value : 0) + L.getBoundingClientRect().width + (U ? U.value : 0);
2917
- t < z ? (A.set(L.id, !0), N.push({
2918
- id: L.id,
2919
- width: z
2920
- })) : t -= z;
2676
+ const R = r.filter((_) => _.id !== "__more_buttons__");
2677
+ for (const _ of R) {
2678
+ const $ = _.computedStyleMap().get("margin-left"), V = _.computedStyleMap().get("margin-right"), U = ($ ? $.value : 0) + _.getBoundingClientRect().width + (V ? V.value : 0);
2679
+ t < U ? (B.set(_.id, !0), N.push({
2680
+ id: _.id,
2681
+ width: U
2682
+ })) : t -= U;
2921
2683
  }
2922
2684
  if (N.length)
2923
- for (let L = N.length - 1; L >= 0; L--) {
2924
- const V = N[L].width;
2925
- if (t >= V)
2926
- t -= V, A.delete(N[L].id), N.pop();
2685
+ for (let _ = N.length - 1; _ >= 0; _--) {
2686
+ const $ = N[_].width;
2687
+ if (t >= $)
2688
+ t -= $, B.delete(N[_].id), N.pop();
2927
2689
  else
2928
2690
  break;
2929
2691
  }
2930
- const T = Object.assign({}, S.value);
2931
- T.children = [];
2932
- const B = new G(T), _ = n.value.reduce((L, V) => (A.has(V.id) && B.children.push(V), V.visible = !A.has(V.id), L.push(V), L), []);
2933
- S.value = B, n.value = _;
2692
+ const x = Object.assign({}, D.value);
2693
+ x.children = [];
2694
+ const M = new G(x), F = o.value.reduce((_, $) => (B.has($.id) && M.children.push($), $.visible = !B.has($.id), _.push($), _), []);
2695
+ D.value = M, o.value = F;
2934
2696
  }
2935
- const b = new ResizeObserver((l) => {
2936
- if (l.length) {
2937
- const t = l[0].contentRect.width, f = m.value.getBoundingClientRect().width;
2938
- (t < f || N.length) && D(t);
2697
+ const b = new ResizeObserver((a) => {
2698
+ if (a.length) {
2699
+ const t = a[0].contentRect.width, u = y.value.getBoundingClientRect().width;
2700
+ (t < u || N.length) && j(t);
2939
2701
  }
2940
2702
  });
2941
- H(() => {
2942
- const l = u.value;
2943
- b.observe(l), document.body.addEventListener("click", k);
2944
- }), ne(() => {
2945
- b.disconnect(), document.body.removeEventListener("click", k);
2946
- }), Q(() => r.items, () => {
2947
- n.value = r.items;
2703
+ z(() => {
2704
+ const a = f.value;
2705
+ b.observe(a), document.body.addEventListener("click", P);
2706
+ }), te(() => {
2707
+ b.disconnect(), document.body.removeEventListener("click", P);
2708
+ }), H(() => s.items, () => {
2709
+ o.value = s.items;
2948
2710
  }, {
2949
2711
  deep: !0
2950
- }), Q(n, (l) => {
2951
- a = new Array(n.value.length).fill(j());
2712
+ }), H(o, (a) => {
2713
+ p = new Array(o.value.length).fill(S());
2952
2714
  });
2953
- function P(l, o, t, i) {
2954
- c && c.setupContext && c.setupContext.emit("selectionChange", l, o, t, i);
2715
+ function I(a, n, t, r) {
2716
+ c && c.setupContext && c.setupContext.emit("selectionChange", a, n, t, r);
2955
2717
  }
2956
2718
  function E() {
2957
- const l = m.value.querySelector(".dgComponentFocused.dgComponentSelected");
2958
- l == null || l.classList.remove("dgComponentSelected"), l == null || l.classList.remove("dgComponentFocused");
2719
+ const a = y.value.querySelector(".dgComponentFocused.dgComponentSelected");
2720
+ a == null || a.classList.remove("dgComponentSelected"), a == null || a.classList.remove("dgComponentFocused");
2959
2721
  }
2960
2722
  return () => w("div", {
2961
- ref: C,
2723
+ ref: v,
2962
2724
  "data-dragref": `${c.schema.id}-container`,
2963
- class: y.value
2725
+ class: m.value
2964
2726
  }, [w("div", {
2965
- ref: u,
2727
+ ref: f,
2966
2728
  class: h.value
2967
2729
  }, [w("div", {
2968
- ref: m,
2730
+ ref: y,
2969
2731
  class: "d-inline-block f-response-content",
2970
2732
  style: "white-space: nowrap;"
2971
- }, [n.value.map((l, o) => w(Pt, {
2972
- ref: a[o],
2733
+ }, [o.value.map((a, n) => w(Pt, {
2734
+ ref: p[n],
2973
2735
  class: "p-0 display-inline-block",
2974
- modelValue: l,
2975
- "onUpdate:modelValue": (t) => l = t,
2736
+ modelValue: a,
2737
+ "onUpdate:modelValue": (t) => a = t,
2976
2738
  canMove: !0,
2977
2739
  childType: "response-toolbar-item",
2978
2740
  childLabel: "按钮",
2979
2741
  contentKey: "buttons",
2980
- componentId: r.componentId,
2981
- id: l.id,
2742
+ componentId: s.componentId,
2743
+ id: a.id,
2982
2744
  style: "padding:0 !important;display:inline-block",
2983
- onSelectionChange: P,
2745
+ onSelectionChange: I,
2984
2746
  onRemoveComponent: E
2985
2747
  }, {
2986
- default: () => [w(De, {
2987
- id: l.id,
2988
- disable: l.disable,
2989
- text: l.text,
2990
- icon: l.icon,
2991
- componentId: r.componentId
2748
+ default: () => [w(je, {
2749
+ id: a.id,
2750
+ disable: a.disable,
2751
+ text: a.text,
2752
+ icon: a.icon,
2753
+ componentId: s.componentId
2992
2754
  }, null)]
2993
2755
  }))])])]);
2994
2756
  }
2995
- }), Vt = ie;
2996
- X.register = (r, e, n) => {
2997
- r["response-toolbar"] = X, e["response-toolbar"] = ie;
2757
+ }), $t = ie;
2758
+ J.register = (s, e, o) => {
2759
+ s["response-toolbar"] = J, e["response-toolbar"] = ie;
2998
2760
  };
2999
- X.registerDesigner = (r, e, n) => {
3000
- r["response-toolbar"] = jt, e["response-toolbar"] = ie, r["response-toolbar-item"] = De, e["response-toolbar-item"] = ct;
2761
+ J.registerDesigner = (s, e, o) => {
2762
+ s["response-toolbar"] = Mt, e["response-toolbar"] = ie, s["response-toolbar-item"] = je, e["response-toolbar-item"] = ct;
3001
2763
  };
3002
- const _t = Ae(X);
2764
+ const Ft = Be(J);
3003
2765
  export {
3004
- X as FResponseToolbar,
2766
+ J as FResponseToolbar,
3005
2767
  G as ResponseToolbarDropDownItem,
3006
2768
  Nt as ResponseToolbarGroup,
3007
- Fe as ResponseToolbarItem,
3008
- _t as default,
3009
- Vt as responseToolbarResolver
2769
+ Ae as ResponseToolbarItem,
2770
+ Ft as default,
2771
+ $t as responseToolbarResolver
3010
2772
  };