@farris/ui-vue 1.2.7 → 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 (206) hide show
  1. package/components/accordion/index.esm.js +79 -79
  2. package/components/avatar/index.esm.js +393 -440
  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 +496 -542
  10. package/components/color-picker/index.esm.js +1 -1
  11. package/components/combo-list/index.esm.js +437 -483
  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 +839 -726
  15. package/components/content-container/index.esm.js +61 -61
  16. package/components/data-grid/index.esm.js +4702 -4972
  17. package/components/data-view/index.esm.js +2999 -2875
  18. package/components/date-picker/index.esm.js +2626 -2672
  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 +934 -976
  29. package/components/dynamic-resolver/index.esm.js +67 -35
  30. package/components/dynamic-view/index.esm.js +258 -249
  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 +1892 -1775
  35. package/components/field-selector/index.css +1 -1
  36. package/components/field-selector/index.esm.js +5245 -5514
  37. package/components/filter-bar/index.css +1 -1
  38. package/components/filter-bar/index.esm.js +1483 -1556
  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 +668 -714
  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 +1679 -1563
  45. package/components/lookup/index.css +1 -1
  46. package/components/lookup/index.esm.js +6596 -6865
  47. package/components/mapping-editor/index.esm.js +5592 -5862
  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 +988 -1034
  58. package/components/page-footer/index.esm.js +106 -106
  59. package/components/page-header/index.esm.js +1088 -1296
  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 +1416 -1462
  63. package/components/property-panel/index.css +1 -1
  64. package/components/property-panel/index.esm.js +757 -830
  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 +452 -498
  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 +117 -117
  74. package/components/response-toolbar/index.esm.js +1021 -1238
  75. package/components/schema-selector/index.esm.js +3215 -3308
  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 +442 -488
  83. package/components/tabs/index.esm.js +1835 -2004
  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 +451 -482
  87. package/components/time-picker/index.esm.js +1345 -1392
  88. package/components/transfer/index.esm.js +135 -135
  89. package/components/tree-grid/index.css +1 -1
  90. package/components/tree-grid/index.esm.js +5761 -6020
  91. package/components/tree-view/index.esm.js +2380 -2253
  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 +31630 -31224
  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/data-grid/src/designer/column-header.design.component.d.ts +1 -1
  102. package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
  103. package/types/data-view/composition/types.d.ts +1 -1
  104. package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
  105. package/types/designer-canvas/src/types.d.ts +1 -1
  106. package/types/dynamic-form/index.d.ts +1 -0
  107. package/types/dynamic-form/src/types.d.ts +1 -1
  108. package/types/dynamic-resolver/index.d.ts +1 -0
  109. package/types/dynamic-resolver/src/binding-resolver.d.ts +1 -0
  110. package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
  111. package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
  112. package/types/modal/src/modal.props.d.ts +1 -4
  113. package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
  114. package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
  115. package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
  116. package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
  117. package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
  118. package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
  119. package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
  120. package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
  121. package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
  122. package/components/accordion/index.umd.cjs +0 -1
  123. package/components/avatar/index.umd.cjs +0 -1
  124. package/components/border-editor/index.umd.cjs +0 -1
  125. package/components/button/index.umd.cjs +0 -1
  126. package/components/button-edit/index.umd.cjs +0 -1
  127. package/components/button-group/index.umd.cjs +0 -1
  128. package/components/calculator/index.umd.cjs +0 -1
  129. package/components/calendar/index.umd.cjs +0 -1
  130. package/components/capsule/index.umd.cjs +0 -1
  131. package/components/checkbox/index.umd.cjs +0 -1
  132. package/components/color-picker/index.umd.cjs +0 -3
  133. package/components/combo-list/index.umd.cjs +0 -1
  134. package/components/combo-tree/index.umd.cjs +0 -1
  135. package/components/common/index.umd.cjs +0 -1
  136. package/components/component/index.umd.cjs +0 -1
  137. package/components/condition/index.umd.cjs +0 -1
  138. package/components/content-container/index.umd.cjs +0 -1
  139. package/components/data-grid/index.umd.cjs +0 -1
  140. package/components/data-view/index.umd.cjs +0 -1
  141. package/components/date-picker/index.umd.cjs +0 -1
  142. package/components/designer-canvas/index.umd.cjs +0 -1
  143. package/components/designer-outline/index.umd.cjs +0 -1
  144. package/components/designer-toolbox/index.umd.cjs +0 -1
  145. package/components/discussion-editor/index.umd.cjs +0 -3
  146. package/components/discussion-list/index.umd.cjs +0 -1
  147. package/components/drawer/index.umd.cjs +0 -1
  148. package/components/dropdown/index.umd.cjs +0 -2
  149. package/components/dynamic-form/index.umd.cjs +0 -1
  150. package/components/dynamic-resolver/index.umd.cjs +0 -1
  151. package/components/dynamic-view/index.umd.cjs +0 -1
  152. package/components/enum-editor/index.umd.cjs +0 -1
  153. package/components/events-editor/index.umd.cjs +0 -1
  154. package/components/expression-editor/index.umd.cjs +0 -1
  155. package/components/external-container/index.umd.cjs +0 -1
  156. package/components/field-selector/index.umd.cjs +0 -1
  157. package/components/filter-bar/index.umd.cjs +0 -1
  158. package/components/flow-canvas/index.umd.cjs +0 -1
  159. package/components/image-cropper/index.umd.cjs +0 -1
  160. package/components/input-group/index.umd.cjs +0 -1
  161. package/components/layout/index.umd.cjs +0 -1
  162. package/components/list-nav/index.umd.cjs +0 -1
  163. package/components/list-view/index.umd.cjs +0 -1
  164. package/components/loading/index.umd.cjs +0 -8
  165. package/components/locale/index.umd.cjs +0 -1
  166. package/components/lookup/index.umd.cjs +0 -1
  167. package/components/mapping-editor/index.umd.cjs +0 -1
  168. package/components/message-box/index.umd.cjs +0 -1
  169. package/components/modal/index.umd.cjs +0 -1
  170. package/components/nav/index.umd.cjs +0 -3
  171. package/components/notify/index.umd.cjs +0 -1
  172. package/components/order/index.umd.cjs +0 -1
  173. package/components/page-footer/index.umd.cjs +0 -1
  174. package/components/page-header/index.umd.cjs +0 -1
  175. package/components/pagination/index.umd.cjs +0 -1
  176. package/components/popover/index.umd.cjs +0 -1
  177. package/components/progress/index.umd.cjs +0 -3
  178. package/components/property-editor/index.umd.cjs +0 -3
  179. package/components/property-panel/index.umd.cjs +0 -1
  180. package/components/radio-button/index.umd.cjs +0 -1
  181. package/components/radio-group/index.umd.cjs +0 -1
  182. package/components/rate/index.umd.cjs +0 -1
  183. package/components/response-layout/index.umd.cjs +0 -1
  184. package/components/response-layout-editor/index.umd.cjs +0 -1
  185. package/components/response-toolbar/index.umd.cjs +0 -1
  186. package/components/schema-selector/index.umd.cjs +0 -8
  187. package/components/search-box/index.umd.cjs +0 -1
  188. package/components/section/index.umd.cjs +0 -1
  189. package/components/smoke-detector/index.umd.cjs +0 -1
  190. package/components/spacing-editor/index.umd.cjs +0 -1
  191. package/components/splitter/index.umd.cjs +0 -1
  192. package/components/step/index.umd.cjs +0 -1
  193. package/components/switch/index.umd.cjs +0 -1
  194. package/components/tabs/index.umd.cjs +0 -1
  195. package/components/tags/index.umd.cjs +0 -1
  196. package/components/text/index.umd.cjs +0 -1
  197. package/components/textarea/index.umd.cjs +0 -1
  198. package/components/time-picker/index.umd.cjs +0 -1
  199. package/components/tooltip/index.umd.cjs +0 -1
  200. package/components/transfer/index.umd.cjs +0 -1
  201. package/components/tree-grid/index.umd.cjs +0 -1
  202. package/components/tree-view/index.umd.cjs +0 -1
  203. package/components/uploader/index.umd.cjs +0 -2
  204. package/components/verify-detail/index.umd.cjs +0 -1
  205. package/components/video/index.umd.cjs +0 -1
  206. package/components/weather/index.umd.cjs +0 -16
@@ -1,40 +1,40 @@
1
- var ke = Object.defineProperty;
2
- var Pe = (r, e, n) => e in r ? ke(r, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : r[e] = n;
3
- var F = (r, e, n) => Pe(r, typeof e != "symbol" ? e + "" : e, n);
4
- import { computed as z, 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";
1
+ var Pe = Object.defineProperty;
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,13 +50,13 @@ class me {
50
50
  "tipsText",
51
51
  "onClick"
52
52
  ];
53
- Object.keys(e).filter((c) => n.indexOf(c) > -1).forEach((c) => {
54
- this[c] = e[c];
53
+ Object.keys(e).filter((p) => o.indexOf(p) > -1).forEach((p) => {
54
+ this[p] = e[p];
55
55
  });
56
56
  }
57
57
  /** 是否可用 */
58
58
  get enable() {
59
- return Object.keys(this.options).indexOf("enable") > -1 ? this.options.enable : z(() => !0);
59
+ return Object.keys(this.options).indexOf("enable") > -1 ? this.options.enable : W(() => !0);
60
60
  }
61
61
  /** 设置宽度 */
62
62
  setWidth(e) {
@@ -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((c, u) => (u.children && u.children.length > 0 ? c.push(new G(u)) : c.push(new Fe(u)), c), 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 c = ["isDP", "class", "dropdownClass", "menuClass", "placement", "split", "expanded"];
97
- Object.keys(n).filter((u) => c.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, c = 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 c.id = `${n}-${Date.now()}`, c;
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 c = re(n);
156
- const u = ye[r];
157
- return c = u ? u({ getSchemaByType: q }, c, e) : c, c;
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((c, u) => (c[u] = r[u], c), 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((c) => r[c] != null).reduce((c, u) => {
167
- if (e.has(u)) {
168
- const m = e.get(u);
169
- if (typeof m == "string")
170
- c[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(c, v);
172
+ const C = y(f, s[f], s);
173
+ Object.assign(p, C);
174
174
  }
175
175
  } else
176
- c[u] = r[u];
177
- return c;
176
+ p[f] = s[f];
177
+ return p;
178
178
  }, {});
179
179
  }
180
- function Ve(r, e, n = /* @__PURE__ */ new Map()) {
181
- const c = Le(r, e);
182
- return Ne(c, 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, a) {
186
- if (typeof p == "number")
187
- return a[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(a[g].length) !== Number(s);
191
+ return Number(c[g].length) !== Number(i);
192
192
  if (d === "moreThan")
193
- return Number(a[g].length) >= Number(s);
193
+ return Number(c[g].length) >= Number(i);
194
194
  if (d === "lessThan")
195
- return Number(a[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, a) {
200
- return a[g] && a[g].propertyValue && String(a[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 c = /* @__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), c);
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((a) => {
210
- if (a === "length")
211
- return { target: p, operator: "length", param: null, value: C[a] };
212
- const d = a, s = C[a];
213
- return { target: p, operator: "getProperty", param: d, value: s };
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
+ if (c === "length")
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, a) => {
218
- const d = u(a, g[a]);
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 (c.has(g.operator)) {
224
- const p = c.get(g.operator);
225
- return p && p(g.target, g.param, g.value, C) || !1;
222
+ function 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), a = p.includes("allOf"), d = p.includes("anyOf"), s = a || d, x = (s ? g[s ? a ? "allOf" : "anyOf" : "allOf"] : [g]).map((P) => M(P, C));
234
- return a ? !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(), c = (v, M, S) => M, u = {}, m = (v) => v) {
352
- return oe[e.title] = e, ye[e.title] = c, 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 We = "https://json-schema.org/draft/2020-12/schema", ze = "https://farris-design.gitee.io/response-toolbar.schema.json", Ue = "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 We = "https://json-schema.org/draft/2020-12/schema", ze = "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: We,
402
- $id: ze,
327
+ ], Je = {
328
+ $schema: Ve,
329
+ $id: We,
403
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 We = "https://json-schema.org/draft/2020-12/schema", ze = "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 We = "https://json-schema.org/draft/2020-12/schema", ze = "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 We = "https://json-schema.org/draft/2020-12/schema", ze = "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 c = {
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), c);
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 c;
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) {
545
- const a = {
470
+ function at(s) {
471
+ function e(l) {
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), a);
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
- return a;
479
+ return c;
553
480
  }
554
- function n(p) {
555
- const a = {
556
- disabled: !p.enable,
481
+ function o(l) {
482
+ const c = {
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), a), a;
486
+ }, d = l.dropdownClass.split(" ");
487
+ return d && d.length && d.reduce((i, m) => (i[m] = !0, i), c), c;
561
488
  }
562
- function c(p) {
563
- const a = {
564
- disabled: !p.enable,
489
+ function p(l) {
490
+ const c = {
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), a), a;
569
- }
570
- let u;
571
- const m = /* @__PURE__ */ new Map();
572
- function v(p, a, d) {
573
- var y;
574
- ((y = p.target) == null ? void 0 : y.id) === a.id && p.stopPropagation();
575
- const s = d ? d.id : "__top_item__";
576
- if (a.children && a.children.length && (a.expanded = !a.expanded, a.expanded ? m.set(s, a) : m.delete(s)), m.has(s) && m.get(s) !== a) {
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, a) {
582
- document.body.click(), a.enable && a.onClick(p, a.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((a) => a.children && a.children.length ? w("li", {
586
- class: n(a),
587
- id: a.id,
588
- onClick: (d) => a.enable && v(d, a, p)
511
+ function D(l) {
512
+ return l.children.map((c) => c.children && c.children.length ? w("li", {
513
+ class: o(c),
514
+ id: c.id,
515
+ onClick: (d) => c.enable && C(d, c, l)
589
516
  }, [w("span", {
590
- id: a.id,
591
- class: c(a),
592
- onMouseover: (d) => a.enable && v(d, a, p)
593
- }, [a.text, w("i", {
517
+ id: c.id,
518
+ class: p(c),
519
+ onMouseover: (d) => c.enable && C(d, c, l)
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(a, a)]) : w("li", {
597
- class: c(a),
598
- id: a.id,
599
- onClick: (d) => M(d, a),
600
- onMouseover: (d) => a.enable && v(d, a, p)
601
- }, [r.shouldShowIcon(a) && w("i", {
602
- class: r.iconClass(a)
603
- }, null), a.text]));
604
- }
605
- function g(p, a, d) {
606
- const s = {
607
- display: p.expanded ? "block" : "none",
523
+ }, null)]), f(c, c)]) : w("li", {
524
+ class: p(c),
525
+ id: c.id,
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)
530
+ }, null), c.text]));
531
+ }
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 = a, 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
543
  width: P,
617
- left: A,
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 k = p.id + "_menu", E = a ? a.querySelector("#" + k) : 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(P + 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 - P < 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, a) {
637
- var h, x;
638
- const d = de(), s = a ? a.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, a),
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: c,
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
- }, a = C.dropdownClass.split(" ");
667
- return a && a.length && a.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 a = C.class.split(" ");
678
- a && a.length && a.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 a = p.expanded;
685
- document.body.click(), p.expanded = !a;
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)]), c(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)), c = 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 = z(() => S.value.children.length > 0), p = z(() => {
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 k = r.customClass.split(" ");
728
- k && k.length && k.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
- }), a = z(() => ({
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 k = {
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), k);
682
+ E && E.length && E.reduce((a, n) => (a[n] = !0, a), I);
756
683
  }
757
- return k;
684
+ return I;
758
685
  }
759
- function x(b, k) {
760
- document.body.click(), k.onClick(b, k.id), e.emit("click", b, k.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: (k) => x(k, 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 P = /* @__PURE__ */ new Map(), A = [];
700
+ const P = /* @__PURE__ */ new Map(), B = [];
774
701
  function N(b) {
775
- const k = m.value;
702
+ const I = y.value;
776
703
  let E = b;
777
- const l = Array.from(k.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 ? (P.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, P.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) => (P.has(B.id) && f.children.push(B), B.visible = !P.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: c
746
+ elementRef: p
820
747
  }), () => w("div", {
821
- class: p.value,
822
- ref: c
748
+ class: l.value,
749
+ ref: p
823
750
  }, [w("div", {
824
- ref: u,
825
- class: a.value
751
+ ref: f,
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"), c = $("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
- c && c();
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
- function a() {
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 P(o, t) {
935
- p(o), a(), 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 k(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) => P(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: W,
979
+ top: F,
980
+ width: _,
981
+ left: $,
982
+ right: V,
1056
983
  height: U
1057
- } = B[0], Z = Math.ceil(U + _);
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`;
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 : W) - 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
- }, [k(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 c = 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": c.value === "right",
1106
- "f-btn-mr": c.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 a(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 P(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), a(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 k(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
- }, [P(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: k,
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 c = (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") && c && c.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 P = Object.keys(h)[0], A = h[P];
1784
+ const P = Object.keys(h)[0], B = h[P];
1858
1785
  if (P === "not")
1859
- return Number(x[s].length) !== Number(A);
1786
+ return Number(T[i].length) !== Number(B);
1860
1787
  if (P === "moreThan")
1861
- return Number(x[s].length) >= Number(A);
1788
+ return Number(T[i].length) >= Number(B);
1862
1789
  if (P === "lessThan")
1863
- return Number(x[s].length) <= Number(A);
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 c(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", c],
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, P = y[x];
1888
- return { target: h, operator: s === "children" ? "hasChildren" : s === "parent" ? "hasParent" : "hasSibling", param: O, value: P };
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((P, A) => {
1900
- const N = m(A, s[A]);
1825
+ function k(i, m) {
1826
+ return Object.keys(i).reduce((P, B) => {
1827
+ const N = y(B, i[B]);
1901
1828
  return P.push(...N), P;
1902
- }, []).reduce((P, A) => P && v(A, y), !0);
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"), P = x || O, D = (P ? s[P ? x ? "allOf" : "anyOf" : "allOf"] : [s]).map((k) => M(k, 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 P = s.properties[O];
1917
- return x[O] = g(P, 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
- (P) => p(P, O.properties[P], 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
- function a() {
1930
- const { properties: s } = wt;
1931
- Object.keys(s).forEach((y) => {
1932
- p(y, s[y], J);
1856
+ function c() {
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;
1938
- }
1939
- return a(), { getRuleValue: d };
1940
- }
1941
- class Se {
1942
- static getEditorTypesByMDataType(e) {
1943
- const n = this.fieldControlTypeMapping[e];
1944
- return n || [{ key: "", value: "" }];
1864
+ return Z.has(i) ? Z.get(i)(m) : h;
1945
1865
  }
1866
+ return c(), { getRuleValue: d };
1946
1867
  }
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 c;
2023
- this.componentId = e, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((c = this.formSchemaUtils) == null ? void 0 : c.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 c = this.designViewModelUtils.getDgViewModel(this.viewModelId);
2034
- this.designViewModelField = c.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 c, 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 = (c = n.designViewModelField) == null ? void 0 : c.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, a, d;
2092
- const c = 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: c
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, c)), 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: c || "",
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: (a = M.editor) == null ? void 0 : a.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,40 +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 c;
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 c = n, n;
2162
- if (c = this.getControlParentContainer(e, u), c)
2163
- return c;
2164
- }
2165
- }
2166
1949
  }
2167
- class Tt extends ae {
2168
- constructor(e, n) {
2169
- super(e, n);
1950
+ class wt extends ce {
1951
+ constructor(e, o) {
1952
+ super(e, o);
2170
1953
  }
2171
1954
  getPropertyConfig(e) {
2172
1955
  return this.getBasicPropConfig(e), this.getBehaviorProperties(e), this.propertyConfig;
@@ -2190,7 +1973,7 @@ class Tt extends ae {
2190
1973
  type: "combo-list",
2191
1974
  textField: "value",
2192
1975
  valueField: "key",
2193
- data: [{ key: "response-toolbar", value: I["response-toolbar"].name }]
1976
+ data: [{ key: "response-toolbar", value: se["response-toolbar"].name }]
2194
1977
  }
2195
1978
  }
2196
1979
  }
@@ -2233,54 +2016,54 @@ class Tt extends ae {
2233
2016
  };
2234
2017
  }
2235
2018
  }
2236
- function xt(r, e, n, c) {
2237
- const u = xe(), m = j(!1), v = j(!1);
2238
- let M = !0, S = !1, g;
2239
- function C(D) {
2240
- 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;
2241
2024
  }
2242
- function p(D) {
2243
- return !ft().basalDragulaRuleForContainer(D) || !M || !C(D), !1;
2025
+ function l(j) {
2026
+ return !ut().basalDragulaRuleForContainer(j) || !k || !v(j), !1;
2244
2027
  }
2245
- function a() {
2246
- m.value = !1, v.value = !1;
2247
- const D = r, b = D.appearance && D.appearance.class || "", k = 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, W) => {
2248
- const U = W && W.appearance ? W.appearance.class : "", Z = U ? U.split(" ") : [];
2249
- return V.push(...Z), V;
2250
- }, []) : [], f = n == null ? void 0 : n.schema, R = f && f.appearance && f.appearance.class || "", T = R ? R.split(" ") : [];
2028
+ function c() {
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(" ") : [];
2251
2034
  g = {
2252
2035
  componentClass: b,
2253
- componentClassList: k,
2036
+ componentClassList: I,
2254
2037
  childContents: E,
2255
- firstChildContent: l,
2256
- firstChildClass: o,
2038
+ firstChildContent: a,
2039
+ firstChildClass: n,
2257
2040
  firstChildClassList: t,
2258
- parent: f,
2041
+ parent: u,
2259
2042
  parentClass: R,
2260
- parentClassList: T,
2043
+ parentClassList: x,
2261
2044
  children: E,
2262
- childrenClassList: i
2045
+ childrenClassList: r
2263
2046
  };
2264
- const { canAccept: B, fixed: _, hidePadding: L } = u.getRuleValue(k[0], g);
2265
- return M = B, S = L, !0;
2047
+ const { canAccept: M, fixed: F, hidePadding: _ } = f.getRuleValue(I[0], g);
2048
+ return k = M, D = _, !0;
2266
2049
  }
2267
- function d(D) {
2050
+ function d(j) {
2268
2051
  }
2269
- function s() {
2270
- 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" : "";
2271
2054
  }
2272
- function y(D, b) {
2273
- return b.text = D.label, b;
2055
+ function m(j, b) {
2056
+ return b.text = j.label, b;
2274
2057
  }
2275
- function h(D, b, k) {
2276
- const E = r;
2058
+ function h(j, b, I) {
2059
+ const E = s;
2277
2060
  if ((E.appearance && E.appearance.class || "").split(" ").includes("f-form-layout")) {
2278
- const t = String(D.innerText), i = q("form-group");
2279
- return i.editor = k, i.label = t, i;
2061
+ const t = String(j.innerText), r = q("form-group");
2062
+ return r.editor = I, r.label = t, r;
2280
2063
  }
2281
- return k;
2064
+ return I;
2282
2065
  }
2283
- function x() {
2066
+ function T() {
2284
2067
  return !1;
2285
2068
  }
2286
2069
  function O() {
@@ -2289,29 +2072,29 @@ function xt(r, e, n, c) {
2289
2072
  function P() {
2290
2073
  return !0;
2291
2074
  }
2292
- function A() {
2293
- return S;
2075
+ function B() {
2076
+ return D;
2294
2077
  }
2295
- function N(D) {
2296
- return new Tt(D, e).getPropertyConfig(r);
2078
+ function N(j) {
2079
+ return new wt(j, e).getPropertyConfig(s);
2297
2080
  }
2298
2081
  return {
2299
- canAccepts: p,
2082
+ canAccepts: l,
2300
2083
  checkCanAddComponent: P,
2301
2084
  checkCanDeleteComponent: O,
2302
- checkCanMoveComponent: x,
2303
- getStyles: s,
2304
- hideNestedPaddingInDesginerView: A,
2085
+ checkCanMoveComponent: T,
2086
+ getStyles: i,
2087
+ hideNestedPaddingInDesginerView: B,
2305
2088
  onAcceptNewChildElement: h,
2306
2089
  onAcceptMovedChildElement: d,
2307
- onResolveNewComponentSchema: y,
2308
- resolveComponentContext: a,
2090
+ onResolveNewComponentSchema: m,
2091
+ resolveComponentContext: c,
2309
2092
  getPropsConfig: N,
2310
- triggerBelongedComponentToMoveWhenMoved: m,
2311
- triggerBelongedComponentToDeleteWhenDeleted: v
2093
+ triggerBelongedComponentToMoveWhenMoved: y,
2094
+ triggerBelongedComponentToDeleteWhenDeleted: C
2312
2095
  };
2313
2096
  }
2314
- const St = {
2097
+ const Tt = {
2315
2098
  id: { type: String, default: "" },
2316
2099
  componentId: { type: String, default: "" },
2317
2100
  canAdd: { type: Boolean, default: !1 },
@@ -2324,168 +2107,168 @@ const St = {
2324
2107
  * 组件值
2325
2108
  */
2326
2109
  modelValue: { type: Object }
2327
- }, ee = j(0);
2328
- function Dt(r, e) {
2329
- const n = e.getBoundingClientRect(), c = r.getBoundingClientRect(), u = c.top >= n.top, m = c.top <= n.bottom;
2330
- 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;
2331
2114
  }
2332
- function It(r) {
2333
- if (!r)
2115
+ function Dt(s) {
2116
+ if (!s)
2334
2117
  return;
2335
2118
  let e;
2336
- 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)
2337
2120
  return;
2338
- const n = e.getBoundingClientRect();
2339
- if (n.width === 0 && n.height === 0)
2121
+ const o = e.getBoundingClientRect();
2122
+ if (o.width === 0 && o.height === 0)
2340
2123
  return;
2341
- const c = e.querySelector(".component-btn-group");
2342
- if (c) {
2343
- if (!Dt(e, r)) {
2344
- c.style.display = "none";
2124
+ const p = e.querySelector(".component-btn-group");
2125
+ if (p) {
2126
+ if (!jt(e, s)) {
2127
+ p.style.display = "none";
2345
2128
  return;
2346
2129
  }
2347
- c.style.display = "";
2348
- const m = c.getBoundingClientRect(), v = c.querySelector("div");
2349
- if (v) {
2350
- const M = v.getBoundingClientRect();
2351
- 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";
2352
2135
  }
2353
2136
  }
2354
2137
  }
2355
- function Mt(r, e, n) {
2138
+ function It(s, e, o) {
2356
2139
  var N;
2357
- function c() {
2140
+ function p() {
2358
2141
  }
2359
- const u = "", m = j();
2360
- function v() {
2142
+ const f = "", y = S();
2143
+ function C() {
2361
2144
  return !0;
2362
2145
  }
2363
- function M() {
2146
+ function k() {
2364
2147
  return !1;
2365
2148
  }
2366
- function S() {
2149
+ function D() {
2367
2150
  return !0;
2368
2151
  }
2369
2152
  function g() {
2370
2153
  return !0;
2371
2154
  }
2372
- function C() {
2155
+ function v() {
2373
2156
  return !0;
2374
2157
  }
2375
- function p(D) {
2376
- if (!D || !D.value)
2158
+ function l(j) {
2159
+ if (!j || !j.value)
2377
2160
  return null;
2378
- const b = j(D == null ? void 0 : D.value.parent), k = p(b);
2379
- return k || null;
2161
+ const b = S(j == null ? void 0 : j.value.parent), I = l(b);
2162
+ return I || null;
2380
2163
  }
2381
- function a(D = e) {
2382
- const { componentInstance: b, designerItemElementRef: k } = D;
2383
- return !b || !b.value ? null : b.value.canMove || b.value.canAdd || b.value.canDelete ? k : a(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);
2384
2167
  }
2385
- function d(D) {
2386
- return !!n;
2168
+ function d(j) {
2169
+ return !!o;
2387
2170
  }
2388
- function s() {
2171
+ function i() {
2389
2172
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
2390
2173
  }
2391
- function y() {
2174
+ function m() {
2392
2175
  }
2393
- function h(D, b) {
2176
+ function h(j, b) {
2394
2177
  }
2395
- function x(D) {
2396
- const { componentType: b } = D;
2397
- let k = q(b, D);
2178
+ function T(j) {
2179
+ const { componentType: b } = j;
2180
+ let I = q(b, j);
2398
2181
  const E = b.toLowerCase().replace("-", "_");
2399
- return k && !k.id && k.type === b && (k.id = `${E}_${Math.random().toString().slice(2, 6)}`), k;
2182
+ return I && !I.id && I.type === b && (I.id = `${E}_${Math.random().toString().slice(2, 6)}`), I;
2400
2183
  }
2401
- function O(D, b) {
2402
- const k = String(D.getAttribute("data-controltype")), E = D.getAttribute("data-feature"), l = E ? JSON.parse(E) : {};
2403
- l.parentComponentInstance = m.value;
2404
- let o = q(k, l);
2405
- const t = k.toLowerCase().replace("-", "_");
2406
- return o && !o.id && o.type === k && (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;
2407
2190
  }
2408
- function P(D) {
2191
+ function P(j) {
2409
2192
  }
2410
- function A(...D) {
2193
+ function B(...j) {
2411
2194
  return [];
2412
2195
  }
2413
- return m.value = {
2414
- canMove: v(),
2415
- canSelectParent: M(),
2196
+ return y.value = {
2197
+ canMove: C(),
2198
+ canSelectParent: k(),
2416
2199
  canAdd: g(),
2417
- canDelete: S(),
2418
- canNested: !C(),
2200
+ canDelete: D(),
2201
+ canNested: !v(),
2419
2202
  contents: [],
2420
- elementRef: r,
2203
+ elementRef: s,
2421
2204
  parent: (N = e.parent) == null ? void 0 : N.componentInstance,
2422
2205
  schema: e.schema,
2423
- styles: u,
2206
+ styles: f,
2424
2207
  canAccepts: d,
2425
- getBelongedComponentInstance: p,
2426
- getDraggableDesignItemElement: a,
2427
- getDraggingDisplayText: s,
2428
- getPropConfig: A,
2429
- getDragScopeElement: y,
2208
+ getBelongedComponentInstance: l,
2209
+ getDraggableDesignItemElement: c,
2210
+ getDraggingDisplayText: i,
2211
+ getPropConfig: B,
2212
+ getDragScopeElement: m,
2430
2213
  onAcceptMovedChildElement: h,
2431
2214
  onAcceptNewChildElement: O,
2432
2215
  onChildElementMovedOut: P,
2433
- addNewChildComponentSchema: x,
2434
- updateDragAndDropRules: c,
2435
- triggerBelongedComponentToMoveWhenMoved: j(!1),
2436
- triggerBelongedComponentToDeleteWhenDeleted: j(!1)
2437
- }, m;
2216
+ addNewChildComponentSchema: T,
2217
+ updateDragAndDropRules: p,
2218
+ triggerBelongedComponentToMoveWhenMoved: S(!1),
2219
+ triggerBelongedComponentToDeleteWhenDeleted: S(!1)
2220
+ }, y;
2438
2221
  }
2439
- const kt = /* @__PURE__ */ Y({
2222
+ const Pt = /* @__PURE__ */ Q({
2440
2223
  name: "FDesignerInnerItem",
2441
- props: St,
2224
+ props: Tt,
2442
2225
  emits: ["selectionChange", "addComponent", "removeComponent"],
2443
- setup(r, e) {
2444
- const n = j(r.canMove), c = 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(), a = $("canvas-dragula"), d = j(), s = $("design-item-context"), y = {
2445
- 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,
2446
2229
  componentInstance: d,
2447
2230
  schema: g.value,
2448
- parent: s,
2231
+ parent: i,
2449
2232
  setupContext: e
2450
2233
  };
2451
- Re("design-item-context", y);
2452
- const h = z(() => ({
2234
+ Ee("design-item-context", m);
2235
+ const h = W(() => ({
2453
2236
  "farris-component": !0,
2454
2237
  // 受position-relative影响,整个容器的高度不能被撑起
2455
- "flex-fill": r.id == "root-component",
2456
- "position-relative": n.value || u.value,
2457
- "farris-nested": m.value,
2458
- "can-move": n.value,
2459
- "d-none": p.value && p.value.classList.contains("d-none")
2460
- })), x = z(() => {
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(() => {
2461
2244
  const t = {};
2462
- return C.value && C.value.split(";").reduce((i, f) => {
2463
- const [R, T] = f.split(":");
2464
- 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;
2465
2248
  }, t), t;
2466
2249
  });
2467
- function O(t, i) {
2468
- if (s && s.schema[v.value]) {
2469
- const f = s.schema[v.value].findIndex((R) => R.id === i.id);
2470
- if (f > -1) {
2471
- const R = s.schema[v.value].length, T = s.schema[v.value][f % R];
2472
- 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");
2473
2256
  }
2474
2257
  }
2475
2258
  }
2476
2259
  function P(t) {
2477
2260
  if (d.value.addNewChildComponentSchema) {
2478
- const i = {
2479
- componentType: M.value,
2480
- label: S.value,
2261
+ const r = {
2262
+ componentType: k.value,
2263
+ label: D.value,
2481
2264
  parentComponentInstance: d.value,
2482
2265
  targetPosition: -1
2483
- }, f = d.value.addNewChildComponentSchema(i);
2484
- 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");
2485
2268
  }
2486
2269
  }
2487
- function A() {
2488
- return c.value && w("div", {
2270
+ function B() {
2271
+ return p.value && w("div", {
2489
2272
  role: "button",
2490
2273
  class: "btn component-settings-button",
2491
2274
  title: "新增",
@@ -2498,18 +2281,18 @@ const kt = /* @__PURE__ */ Y({
2498
2281
  }, null)]);
2499
2282
  }
2500
2283
  function N(t) {
2501
- return u.value && w("div", {
2284
+ return f.value && w("div", {
2502
2285
  role: "button",
2503
2286
  class: "btn component-settings-button",
2504
2287
  title: "删除",
2505
2288
  ref: "removeComponent",
2506
- onClick: je((i) => O(i, t), ["stop"])
2289
+ onClick: Me((r) => O(r, t), ["stop"])
2507
2290
  }, [w("i", {
2508
2291
  class: "f-icon f-icon-yxs_delete"
2509
2292
  }, null)]);
2510
2293
  }
2511
- function D() {
2512
- return n.value && w("div", {
2294
+ function j() {
2295
+ return o.value && w("div", {
2513
2296
  role: "button",
2514
2297
  class: "btn component-settings-button",
2515
2298
  title: "移动",
@@ -2523,57 +2306,57 @@ const kt = /* @__PURE__ */ Y({
2523
2306
  return w("div", {
2524
2307
  class: "component-btn-group",
2525
2308
  "data-noattach": "true"
2526
- }, [w("div", null, [A(), D(), N(t)])]);
2309
+ }, [w("div", null, [B(), j(), N(t)])]);
2527
2310
  }
2528
- Q(() => r.modelValue, (t) => {
2529
- g.value = t, y.schema = t;
2311
+ H(() => s.modelValue, (t) => {
2312
+ g.value = t, m.schema = t;
2530
2313
  });
2531
- function k(t) {
2532
- const i = t.target;
2533
- It(i);
2314
+ function I(t) {
2315
+ const r = t.target;
2316
+ Dt(r);
2534
2317
  }
2535
2318
  function E() {
2536
- var t, i;
2537
- (i = (t = g.value) == null ? void 0 : t.contents) != null && i.length && p.value && p.value.addEventListener("scroll", k);
2319
+ var t, r;
2320
+ (r = (t = g.value) == null ? void 0 : t.contents) != null && r.length && l.value && l.value.addEventListener("scroll", I);
2538
2321
  }
2539
- function l() {
2540
- const t = p.value, i = j(t.children[1]);
2541
- return Mt(i, y).value;
2322
+ function a() {
2323
+ const t = l.value, r = S(t.children[1]);
2324
+ return It(r, m).value;
2542
2325
  }
2543
- H(() => {
2544
- if (p.value) {
2545
- const t = p.value.querySelector(`[data-dragref='${g.value.id}-container']`);
2546
- d.value = t && t.componentInstance ? t.componentInstance.value : l(), a && t && a.attachComponents(t, g.value), m.value = d.value.canNested !== void 0 ? d.value.canNested : m.value, c.value = d.value.canAdd !== void 0 ? d.value.canAdd : c.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);
2547
2330
  }
2548
- E(), ee.value++;
2549
- }), Ee(() => {
2550
- p.value && p.value.removeEventListener("scroll", k);
2331
+ E(), K.value++;
2332
+ }), Se(() => {
2333
+ l.value && l.value.removeEventListener("scroll", I);
2551
2334
  });
2552
- function o(t) {
2553
- Array.from(document.getElementsByClassName("dgComponentFocused")).forEach((f) => f.classList.remove("dgComponentFocused")), t && (t.preventDefault(), t.stopPropagation());
2554
- const i = p.value;
2555
- if (i) {
2556
- const f = document.getElementsByClassName("dgComponentSelected");
2557
- if (!(f && f.length === 1 && f[0] === p.value)) {
2558
- 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);
2559
- const T = d.value.getDraggableDesignItemElement(y);
2560
- 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");
2561
2344
  }
2562
2345
  }
2563
- ee.value++;
2346
+ K.value++;
2564
2347
  }
2565
2348
  return () => w("div", {
2566
- id: `${r.id}-design-item`,
2567
- ref: p,
2349
+ id: `${s.id}-design-item`,
2350
+ ref: l,
2568
2351
  class: h.value,
2569
- style: x.value,
2570
- onClick: o
2352
+ style: T.value,
2353
+ onClick: n
2571
2354
  }, [b(g.value), e.slots.default && e.slots.default()]);
2572
2355
  }
2573
2356
  });
2574
- class Pt extends ae {
2575
- constructor(e, n) {
2576
- super(e, n);
2357
+ class Rt extends ce {
2358
+ constructor(e, o) {
2359
+ super(e, o);
2577
2360
  }
2578
2361
  getPropertyConfig(e) {
2579
2362
  return this.getBasicPropConfig(e), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
@@ -2622,42 +2405,42 @@ class Pt extends ae {
2622
2405
  title: "style样式"
2623
2406
  }
2624
2407
  },
2625
- setPropertyRelates(n, c) {
2408
+ setPropertyRelates(o, p) {
2626
2409
  }
2627
2410
  };
2628
2411
  }
2629
2412
  getEventPropConfig(e) {
2630
- const n = [
2413
+ const o = [
2631
2414
  {
2632
2415
  label: "click",
2633
2416
  name: "点击事件"
2634
2417
  }
2635
2418
  ];
2636
- var c = this;
2637
- const u = c.eventsEditorUtils.formProperties(e, c.viewModelId, n), m = {};
2638
- m[c.viewModelId] = {
2419
+ var p = this;
2420
+ const f = p.eventsEditorUtils.formProperties(e, p.viewModelId, o), y = {};
2421
+ y[p.viewModelId] = {
2639
2422
  type: "events-editor",
2640
2423
  editor: {
2641
- initialData: u
2424
+ initialData: f
2642
2425
  }
2643
2426
  }, this.propertyConfig.categories.eventsEditor = {
2644
2427
  title: "事件",
2645
2428
  hideTitle: !0,
2646
- properties: m,
2429
+ properties: y,
2647
2430
  // 这个属性,标记当属性变更得时候触发重新更新属性
2648
2431
  refreshPanelAfterChanged: !0,
2649
2432
  tabId: "commands",
2650
2433
  tabName: "交互",
2651
- setPropertyRelates(v, M) {
2652
- const S = v.propertyValue;
2653
- delete e[c.viewModelId], S && (S.setPropertyRelates = this.setPropertyRelates, c.eventsEditorUtils.saveRelatedParameters(e, c.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));
2654
2437
  }
2655
2438
  };
2656
2439
  }
2657
2440
  }
2658
- class Rt extends ae {
2659
- constructor(e, n) {
2660
- super(e, n);
2441
+ class Et extends ce {
2442
+ constructor(e, o) {
2443
+ super(e, o);
2661
2444
  }
2662
2445
  getPropertyConfig(e) {
2663
2446
  return this.getBasicPropConfig(), this.getAppearanceProperties(e), this.getEventPropConfig(e), this.propertyConfig;
@@ -2681,7 +2464,7 @@ class Rt extends ae {
2681
2464
  type: "combo-list",
2682
2465
  textField: "value",
2683
2466
  valueField: "key",
2684
- data: [{ key: "response-toolbar-item", value: I["response-toolbar-item"].name }]
2467
+ data: [{ key: "response-toolbar-item", value: se["response-toolbar-item"].name }]
2685
2468
  }
2686
2469
  },
2687
2470
  text: {
@@ -2701,289 +2484,289 @@ class Rt extends ae {
2701
2484
  getAppearanceProperties(e) {
2702
2485
  }
2703
2486
  getEventPropConfig(e) {
2704
- const n = [
2487
+ const o = [
2705
2488
  {
2706
2489
  label: "click",
2707
2490
  name: "点击事件"
2708
2491
  }
2709
- ], c = this, u = c.eventsEditorUtils.formProperties(e, c.viewModelId, n), m = {};
2710
- m[c.viewModelId] = {
2492
+ ], p = this, f = p.eventsEditorUtils.formProperties(e, p.viewModelId, o), y = {};
2493
+ y[p.viewModelId] = {
2711
2494
  type: "events-editor",
2712
2495
  editor: {
2713
- initialData: u
2496
+ initialData: f
2714
2497
  }
2715
2498
  }, this.propertyConfig.categories.eventsEditor = {
2716
2499
  title: "事件",
2717
2500
  hideTitle: !0,
2718
- properties: m,
2501
+ properties: y,
2719
2502
  // 这个属性,标记当属性变更得时候触发重新更新属性
2720
2503
  refreshPanelAfterChanged: !0,
2721
2504
  tabId: "commands",
2722
2505
  tabName: "交互",
2723
- setPropertyRelates(v, M) {
2724
- const S = v.propertyValue;
2725
- delete e[c.viewModelId], S && (S.setPropertyRelates = this.setPropertyRelates, c.eventsEditorUtils.saveRelatedParameters(e, c.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));
2726
2509
  }
2727
2510
  };
2728
2511
  }
2729
2512
  }
2730
- function Et(r, e) {
2731
- xe();
2732
- const n = j(!1), c = j(!1);
2733
- let u = !1, m = !1;
2734
- 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) {
2735
2518
  return !1;
2736
2519
  }
2737
- function M(h) {
2520
+ function k(h) {
2738
2521
  }
2739
- function S() {
2522
+ function D() {
2740
2523
  return "";
2741
2524
  }
2742
- function g(h, x) {
2743
- return x.text = h.label, x;
2525
+ function g(h, T) {
2526
+ return T.text = h.label, T;
2744
2527
  }
2745
- function C(h, x, O) {
2746
- const P = r.schema;
2528
+ function v(h, T, O) {
2529
+ const P = s.schema;
2747
2530
  if ((P.appearance && P.appearance.class || "").split(" ").includes("f-form-layout")) {
2748
- const D = String(h.innerText), b = q("form-group");
2749
- return b.editor = O, b.label = D, b;
2531
+ const j = String(h.innerText), b = q("form-group");
2532
+ return b.editor = O, b.label = j, b;
2750
2533
  }
2751
2534
  return O;
2752
2535
  }
2753
- function p() {
2536
+ function l() {
2754
2537
  return !1;
2755
2538
  }
2756
- function a() {
2757
- return !m;
2539
+ function c() {
2540
+ return !y;
2758
2541
  }
2759
2542
  function d() {
2760
2543
  return !1;
2761
2544
  }
2762
- function s() {
2763
- return u;
2545
+ function i() {
2546
+ return f;
2764
2547
  }
2765
- function y(h) {
2766
- let x;
2767
- switch (r.schema.type) {
2548
+ function m(h) {
2549
+ let T;
2550
+ switch (s.schema.type) {
2768
2551
  case "tab-toolbar-item":
2769
- x = new Pt(h, e);
2552
+ T = new Rt(h, e);
2770
2553
  break;
2771
2554
  default:
2772
- x = new Rt(h, e);
2555
+ T = new Et(h, e);
2773
2556
  }
2774
- return x.getPropertyConfig(r.schema);
2557
+ return T.getPropertyConfig(s.schema);
2775
2558
  }
2776
2559
  return {
2777
- canAccepts: v,
2560
+ canAccepts: C,
2778
2561
  checkCanAddComponent: d,
2779
- checkCanDeleteComponent: a,
2780
- checkCanMoveComponent: p,
2781
- getStyles: S,
2782
- hideNestedPaddingInDesginerView: s,
2783
- onAcceptNewChildElement: C,
2784
- onAcceptMovedChildElement: M,
2562
+ checkCanDeleteComponent: c,
2563
+ checkCanMoveComponent: l,
2564
+ getStyles: D,
2565
+ hideNestedPaddingInDesginerView: i,
2566
+ onAcceptNewChildElement: v,
2567
+ onAcceptMovedChildElement: k,
2785
2568
  onResolveNewComponentSchema: g,
2786
- getPropsConfig: y,
2787
- triggerBelongedComponentToMoveWhenMoved: n,
2788
- triggerBelongedComponentToDeleteWhenDeleted: c
2569
+ getPropsConfig: m,
2570
+ triggerBelongedComponentToMoveWhenMoved: o,
2571
+ triggerBelongedComponentToDeleteWhenDeleted: p
2789
2572
  };
2790
2573
  }
2791
- const De = /* @__PURE__ */ Y({
2574
+ const je = /* @__PURE__ */ Q({
2792
2575
  name: "FResponseToolbarItemDesign",
2793
2576
  props: we,
2794
2577
  emits: ["Click"],
2795
- setup(r, e) {
2796
- j(), j();
2797
- const n = j(r.alignment), c = {
2578
+ setup(s, e) {
2579
+ S(), S();
2580
+ const o = S(s.alignment), p = {
2798
2581
  id: "__more_buttons__",
2799
2582
  text: "More"
2800
- }, u = j(new G(c));
2801
- z(() => u.value.children.length > 0);
2802
- const m = j(), v = $("designer-host-service"), M = $("design-item-context"), S = Et(M, v), g = fe(m, M, S);
2803
- $("toolbar-item-handler", () => {
2804
- }), H(() => {
2805
- 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;
2806
2589
  }), e.expose(g.value);
2807
- function C() {
2590
+ function v() {
2808
2591
  const d = {
2809
2592
  "f-icon": !0
2810
2593
  };
2811
- if (r.icon) {
2812
- const s = r.icon.trim().split(" ");
2813
- 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);
2814
2597
  }
2815
2598
  return d;
2816
2599
  }
2817
- function p() {
2818
- return !!(r.icon && r.icon.trim());
2600
+ function l() {
2601
+ return !!(s.icon && s.icon.trim());
2819
2602
  }
2820
- function a() {
2603
+ function c() {
2821
2604
  const d = {
2822
2605
  btn: !0,
2823
2606
  "f-rt-btn": !0,
2824
- "f-btn-ml": n.value === "right",
2825
- "f-btn-mr": n.value === "left",
2826
- "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())
2827
2610
  };
2828
- if (r.class) {
2829
- const s = r.class.split(" ");
2830
- 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);
2831
2614
  }
2832
2615
  return d;
2833
2616
  }
2834
- return H(() => {
2835
- }), ne(() => {
2617
+ return z(() => {
2618
+ }), te(() => {
2836
2619
  }), () => w("div", {
2837
- ref: m,
2838
- "data-dragref": `${M.schema.id}-container`,
2620
+ ref: y,
2621
+ "data-dragref": `${k.schema.id}-container`,
2839
2622
  class: "farris-component position-relative",
2840
2623
  style: "display:inline-block!important;"
2841
2624
  }, [w("button", {
2842
2625
  type: "button",
2843
- class: a(),
2844
- id: r.id
2845
- }, [p() && w("i", {
2846
- class: C()
2847
- }, null), r.text])]);
2626
+ class: c(),
2627
+ id: s.id
2628
+ }, [l() && w("i", {
2629
+ class: v()
2630
+ }, null), s.text])]);
2848
2631
  }
2849
- }), jt = /* @__PURE__ */ Y({
2632
+ }), Mt = /* @__PURE__ */ Q({
2850
2633
  name: "FResponseToolbarDesign",
2851
- props: at,
2634
+ props: it,
2852
2635
  emits: ["Click"],
2853
- setup(r, e) {
2854
- const n = j(r.items);
2855
- let c = new Array(n.value.length).fill(j());
2856
- 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 = {
2857
2640
  id: "__more_buttons__",
2858
2641
  text: "More"
2859
- }, S = j(new G(M)), g = Te();
2860
- z(() => S.value.children.length > 0);
2861
- const C = j(), p = $("designer-host-service"), a = $("design-item-context"), d = xt(a.schema, p, a), s = fe(C, a, d);
2862
- $("toolbar-item-handler", () => {
2863
- }), H(() => {
2864
- C.value.componentInstance = s;
2865
- }), e.expose(s.value);
2866
- const y = z(() => ({
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(() => ({
2867
2650
  "f-toolbar": !0,
2868
2651
  "f-response-toolbar": !0,
2869
2652
  "position-relative": !0
2870
- })), h = z(() => ({
2653
+ })), h = W(() => ({
2871
2654
  "d-flex": !0,
2872
2655
  "flex-nowrap": !0,
2873
- "justify-content-end": v.value === "right",
2874
- "justify-content-start": v.value === "left"
2656
+ "justify-content-end": C.value === "right",
2657
+ "justify-content-start": C.value === "left"
2875
2658
  })), {
2876
- renderToolbarDropdown: x,
2659
+ renderToolbarDropdown: T,
2877
2660
  clearAllDropDown: O
2878
- } = ut(r, g, s);
2661
+ } = dt(s, g, i);
2879
2662
  function P() {
2880
- n.value.filter((l) => l.children && l.children.length > 0).forEach((l) => {
2881
- l.expanded = !1;
2882
- }), S.value.expanded = !1, O();
2663
+ o.value.filter((a) => a.children && a.children.length > 0).forEach((a) => {
2664
+ a.expanded = !1;
2665
+ }), D.value.expanded = !1, O();
2883
2666
  }
2884
- const A = /* @__PURE__ */ new Map(), N = [];
2885
- function D(l) {
2886
- const o = m.value;
2887
- let t = l;
2888
- const i = Array.from(o.children), f = i[i.length - 1].id === "__more_buttons__" ? i[i.length - 1] : null;
2889
- if (f) {
2890
- const L = f.computedStyleMap().get("margin-left"), V = f.computedStyleMap().get("margin-right"), W = (L ? L.value : 0) + f.getBoundingClientRect().width + (V ? V.value : 0);
2891
- t -= W;
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;
2892
2675
  }
2893
- const R = i.filter((L) => L.id !== "__more_buttons__");
2894
- for (const L of R) {
2895
- const V = L.computedStyleMap().get("margin-left"), W = L.computedStyleMap().get("margin-right"), U = (V ? V.value : 0) + L.getBoundingClientRect().width + (W ? W.value : 0);
2896
- t < U ? (A.set(L.id, !0), N.push({
2897
- id: L.id,
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,
2898
2681
  width: U
2899
2682
  })) : t -= U;
2900
2683
  }
2901
2684
  if (N.length)
2902
- for (let L = N.length - 1; L >= 0; L--) {
2903
- const V = N[L].width;
2904
- if (t >= V)
2905
- 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();
2906
2689
  else
2907
2690
  break;
2908
2691
  }
2909
- const T = Object.assign({}, S.value);
2910
- T.children = [];
2911
- 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), []);
2912
- 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;
2913
2696
  }
2914
- const b = new ResizeObserver((l) => {
2915
- if (l.length) {
2916
- const t = l[0].contentRect.width, f = m.value.getBoundingClientRect().width;
2917
- (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);
2918
2701
  }
2919
2702
  });
2920
- H(() => {
2921
- const l = u.value;
2922
- b.observe(l), document.body.addEventListener("click", P);
2923
- }), ne(() => {
2703
+ z(() => {
2704
+ const a = f.value;
2705
+ b.observe(a), document.body.addEventListener("click", P);
2706
+ }), te(() => {
2924
2707
  b.disconnect(), document.body.removeEventListener("click", P);
2925
- }), Q(() => r.items, () => {
2926
- n.value = r.items;
2708
+ }), H(() => s.items, () => {
2709
+ o.value = s.items;
2927
2710
  }, {
2928
2711
  deep: !0
2929
- }), Q(n, (l) => {
2930
- c = new Array(n.value.length).fill(j());
2712
+ }), H(o, (a) => {
2713
+ p = new Array(o.value.length).fill(S());
2931
2714
  });
2932
- function k(l, o, t, i) {
2933
- a && a.setupContext && a.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);
2934
2717
  }
2935
2718
  function E() {
2936
- const l = m.value.querySelector(".dgComponentFocused.dgComponentSelected");
2937
- 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");
2938
2721
  }
2939
2722
  return () => w("div", {
2940
- ref: C,
2941
- "data-dragref": `${a.schema.id}-container`,
2942
- class: y.value
2723
+ ref: v,
2724
+ "data-dragref": `${c.schema.id}-container`,
2725
+ class: m.value
2943
2726
  }, [w("div", {
2944
- ref: u,
2727
+ ref: f,
2945
2728
  class: h.value
2946
2729
  }, [w("div", {
2947
- ref: m,
2730
+ ref: y,
2948
2731
  class: "d-inline-block f-response-content",
2949
2732
  style: "white-space: nowrap;"
2950
- }, [n.value.map((l, o) => w(kt, {
2951
- ref: c[o],
2733
+ }, [o.value.map((a, n) => w(Pt, {
2734
+ ref: p[n],
2952
2735
  class: "p-0 display-inline-block",
2953
- modelValue: l,
2954
- "onUpdate:modelValue": (t) => l = t,
2736
+ modelValue: a,
2737
+ "onUpdate:modelValue": (t) => a = t,
2955
2738
  canMove: !0,
2956
2739
  childType: "response-toolbar-item",
2957
2740
  childLabel: "按钮",
2958
2741
  contentKey: "buttons",
2959
- componentId: r.componentId,
2960
- id: l.id,
2742
+ componentId: s.componentId,
2743
+ id: a.id,
2961
2744
  style: "padding:0 !important;display:inline-block",
2962
- onSelectionChange: k,
2745
+ onSelectionChange: I,
2963
2746
  onRemoveComponent: E
2964
2747
  }, {
2965
- default: () => [w(De, {
2966
- id: l.id,
2967
- disable: l.disable,
2968
- text: l.text,
2969
- icon: l.icon,
2970
- 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
2971
2754
  }, null)]
2972
2755
  }))])])]);
2973
2756
  }
2974
- }), Vt = ie;
2975
- X.register = (r, e, n) => {
2976
- 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;
2977
2760
  };
2978
- X.registerDesigner = (r, e, n) => {
2979
- 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;
2980
2763
  };
2981
- const _t = Ae(X);
2764
+ const Ft = Be(J);
2982
2765
  export {
2983
- X as FResponseToolbar,
2766
+ J as FResponseToolbar,
2984
2767
  G as ResponseToolbarDropDownItem,
2985
2768
  Nt as ResponseToolbarGroup,
2986
- Fe as ResponseToolbarItem,
2987
- _t as default,
2988
- Vt as responseToolbarResolver
2769
+ Ae as ResponseToolbarItem,
2770
+ Ft as default,
2771
+ $t as responseToolbarResolver
2989
2772
  };