@farris/ui-vue 1.2.9 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/components/accordion/index.esm.js +64 -64
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +521 -336
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.css +1 -1
  6. package/components/button-edit/index.esm.js +99 -97
  7. package/components/button-edit/index.umd.cjs +1 -1
  8. package/components/calendar/index.esm.js +496 -504
  9. package/components/calendar/index.umd.cjs +1 -1
  10. package/components/capsule/index.esm.js +251 -259
  11. package/components/capsule/index.umd.cjs +1 -1
  12. package/components/checkbox/index.esm.js +696 -519
  13. package/components/checkbox/index.umd.cjs +1 -1
  14. package/components/color-picker/index.esm.js +368 -376
  15. package/components/color-picker/index.umd.cjs +2 -2
  16. package/components/combo-list/index.css +1 -0
  17. package/components/combo-list/index.esm.js +1141 -340
  18. package/components/combo-list/index.umd.cjs +1 -1
  19. package/components/combo-tree/index.esm.js +116 -116
  20. package/components/combo-tree/index.umd.cjs +1 -1
  21. package/components/common/index.esm.js +986 -798
  22. package/components/common/index.umd.cjs +1 -1
  23. package/components/component/index.esm.js +463 -998
  24. package/components/component/index.umd.cjs +1 -1
  25. package/components/condition/index.css +1 -0
  26. package/components/condition/index.esm.js +2233 -1057
  27. package/components/condition/index.umd.cjs +1 -1
  28. package/components/content-container/index.esm.js +335 -1002
  29. package/components/content-container/index.umd.cjs +1 -1
  30. package/components/data-grid/index.css +1 -1
  31. package/components/data-grid/index.esm.js +6193 -4702
  32. package/components/data-grid/index.umd.cjs +1 -1
  33. package/components/data-view/index.css +1 -0
  34. package/components/data-view/index.esm.js +4562 -3294
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.css +1 -1
  37. package/components/date-picker/index.esm.js +3420 -2623
  38. package/components/date-picker/index.umd.cjs +1 -1
  39. package/components/designer-canvas/index.css +1 -1
  40. package/components/designer-canvas/index.esm.js +914 -883
  41. package/components/designer-canvas/index.umd.cjs +1 -1
  42. package/components/designer-outline/index.esm.js +14 -13
  43. package/components/designer-outline/index.umd.cjs +1 -1
  44. package/components/dropdown/index.esm.js +204 -212
  45. package/components/dropdown/index.umd.cjs +2 -2
  46. package/components/dynamic-form/index.css +1 -0
  47. package/components/dynamic-form/index.esm.js +2795 -1835
  48. package/components/dynamic-form/index.umd.cjs +1 -1
  49. package/components/dynamic-resolver/index.esm.js +180 -130
  50. package/components/dynamic-resolver/index.umd.cjs +1 -1
  51. package/components/dynamic-view/index.esm.js +303 -290
  52. package/components/dynamic-view/index.umd.cjs +1 -1
  53. package/components/events-editor/index.esm.js +328 -336
  54. package/components/events-editor/index.umd.cjs +1 -1
  55. package/components/expression-editor/index.esm.js +65 -65
  56. package/components/expression-editor/index.umd.cjs +1 -1
  57. package/components/external-container/index.css +1 -1
  58. package/components/external-container/index.esm.js +3349 -3626
  59. package/components/external-container/index.umd.cjs +1 -1
  60. package/components/field-selector/index.css +1 -1
  61. package/components/field-selector/index.esm.js +5344 -8588
  62. package/components/field-selector/index.umd.cjs +1 -1
  63. package/components/filter-bar/index.css +1 -1
  64. package/components/filter-bar/index.esm.js +2179 -2227
  65. package/components/filter-bar/index.umd.cjs +1 -1
  66. package/components/flow-canvas/index.css +1 -1
  67. package/components/flow-canvas/index.esm.js +684 -675
  68. package/components/flow-canvas/index.umd.cjs +1 -1
  69. package/components/image-cropper/index.esm.js +482 -490
  70. package/components/image-cropper/index.umd.cjs +1 -1
  71. package/components/input-group/index.esm.js +746 -569
  72. package/components/input-group/index.umd.cjs +1 -1
  73. package/components/layout/index.esm.js +409 -385
  74. package/components/layout/index.umd.cjs +1 -1
  75. package/components/list-nav/index.esm.js +348 -1019
  76. package/components/list-nav/index.umd.cjs +1 -1
  77. package/components/list-view/index.css +1 -1
  78. package/components/list-view/index.esm.js +3606 -2388
  79. package/components/list-view/index.umd.cjs +1 -1
  80. package/components/lookup/index.css +1 -1
  81. package/components/lookup/index.esm.js +10871 -8970
  82. package/components/lookup/index.umd.cjs +1 -1
  83. package/components/mapping-editor/index.css +1 -1
  84. package/components/mapping-editor/index.esm.js +6019 -5631
  85. package/components/mapping-editor/index.umd.cjs +1 -1
  86. package/components/message-box/index.css +1 -1
  87. package/components/message-box/index.esm.js +511 -471
  88. package/components/message-box/index.umd.cjs +1 -1
  89. package/components/modal/index.css +1 -1
  90. package/components/modal/index.esm.js +438 -398
  91. package/components/modal/index.umd.cjs +1 -1
  92. package/components/nav/index.esm.js +912 -1281
  93. package/components/nav/index.umd.cjs +3 -3
  94. package/components/notify/index.esm.js +59 -53
  95. package/components/notify/index.umd.cjs +1 -1
  96. package/components/number-range/index.esm.js +660 -484
  97. package/components/number-range/index.umd.cjs +1 -1
  98. package/components/number-spinner/index.esm.js +682 -506
  99. package/components/number-spinner/index.umd.cjs +1 -1
  100. package/components/order/index.css +1 -1
  101. package/components/order/index.esm.js +1848 -1658
  102. package/components/order/index.umd.cjs +1 -1
  103. package/components/page-footer/index.esm.js +100 -100
  104. package/components/page-footer/index.umd.cjs +1 -1
  105. package/components/page-header/index.esm.js +1120 -1923
  106. package/components/page-header/index.umd.cjs +1 -1
  107. package/components/pagination/index.esm.js +875 -1214
  108. package/components/pagination/index.umd.cjs +1 -1
  109. package/components/popover/index.esm.js +71 -70
  110. package/components/popover/index.umd.cjs +1 -1
  111. package/components/progress/index.esm.js +229 -237
  112. package/components/progress/index.umd.cjs +3 -3
  113. package/components/property-editor/index.css +1 -1
  114. package/components/property-editor/index.esm.js +2314 -1521
  115. package/components/property-editor/index.umd.cjs +3 -3
  116. package/components/property-panel/index.esm.js +867 -868
  117. package/components/property-panel/index.umd.cjs +1 -1
  118. package/components/query-solution/index.css +1 -1
  119. package/components/query-solution/index.esm.js +4332 -3623
  120. package/components/query-solution/index.umd.cjs +1 -1
  121. package/components/radio-button/index.esm.js +72 -72
  122. package/components/radio-button/index.umd.cjs +1 -1
  123. package/components/radio-group/index.esm.js +613 -437
  124. package/components/radio-group/index.umd.cjs +1 -1
  125. package/components/rate/index.esm.js +255 -263
  126. package/components/rate/index.umd.cjs +1 -1
  127. package/components/response-layout/index.esm.js +144 -152
  128. package/components/response-layout/index.umd.cjs +1 -1
  129. package/components/response-layout-editor/index.css +1 -1
  130. package/components/response-layout-editor/index.esm.js +1101 -1038
  131. package/components/response-layout-editor/index.umd.cjs +1 -1
  132. package/components/response-toolbar/index.esm.js +935 -1750
  133. package/components/response-toolbar/index.umd.cjs +1 -1
  134. package/components/schema-selector/index.css +1 -1
  135. package/components/schema-selector/index.esm.js +5264 -5677
  136. package/components/schema-selector/index.umd.cjs +2 -2
  137. package/components/search-box/index.esm.js +151 -154
  138. package/components/search-box/index.umd.cjs +1 -1
  139. package/components/section/index.esm.js +438 -1125
  140. package/components/section/index.umd.cjs +1 -1
  141. package/components/smoke-detector/index.esm.js +93 -101
  142. package/components/smoke-detector/index.umd.cjs +1 -1
  143. package/components/splitter/index.esm.js +563 -1202
  144. package/components/splitter/index.umd.cjs +1 -1
  145. package/components/splitter/style.js +2 -0
  146. package/components/step/index.esm.js +248 -256
  147. package/components/step/index.umd.cjs +1 -1
  148. package/components/switch/index.esm.js +549 -373
  149. package/components/switch/index.umd.cjs +1 -1
  150. package/components/tabs/index.css +1 -1
  151. package/components/tabs/index.esm.js +2436 -3110
  152. package/components/tabs/index.umd.cjs +1 -1
  153. package/components/tags/index.esm.js +328 -336
  154. package/components/tags/index.umd.cjs +1 -1
  155. package/components/text/index.esm.js +339 -347
  156. package/components/text/index.umd.cjs +1 -1
  157. package/components/textarea/index.esm.js +554 -378
  158. package/components/textarea/index.umd.cjs +1 -1
  159. package/components/time-picker/index.css +1 -1
  160. package/components/time-picker/index.esm.js +1322 -1144
  161. package/components/time-picker/index.umd.cjs +1 -1
  162. package/components/transfer/index.css +1 -1
  163. package/components/transfer/index.esm.js +537 -543
  164. package/components/transfer/index.umd.cjs +1 -1
  165. package/components/tree-grid/index.css +1 -1
  166. package/components/tree-grid/index.esm.js +5113 -9426
  167. package/components/tree-grid/index.umd.cjs +1 -1
  168. package/components/tree-view/index.css +1 -0
  169. package/components/tree-view/index.esm.js +3900 -2677
  170. package/components/tree-view/index.umd.cjs +1 -1
  171. package/components/uploader/index.esm.js +568 -570
  172. package/components/uploader/index.umd.cjs +2 -2
  173. package/components/verify-detail/index.esm.js +266 -274
  174. package/components/verify-detail/index.umd.cjs +1 -1
  175. package/components/video/index.esm.js +553 -1052
  176. package/components/video/index.umd.cjs +1 -1
  177. package/components/weather/index.esm.js +558 -566
  178. package/components/weather/index.umd.cjs +5 -5
  179. package/farris.all.esm.js +22009 -22688
  180. package/farris.all.umd.cjs +9 -9
  181. package/index.css +1 -1
  182. package/package.json +1 -1
  183. package/types/capsule/src/capsule.props.d.ts +2 -2
  184. package/types/combo-list/src/components/list-container.component.d.ts +0 -3
  185. package/types/combo-list/src/components/list-container.props.d.ts +0 -4
  186. package/types/common/directive/area-response.d.ts +10 -0
  187. package/types/common/index.d.ts +9 -0
  188. package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
  189. package/types/common/types.d.ts +1 -1
  190. package/types/common/utils/encrypt.d.ts +2 -0
  191. package/types/common/utils/resolve-field.d.ts +2 -0
  192. package/types/common/utils/use-class.d.ts +7 -0
  193. package/types/component/src/component.props.d.ts +7 -0
  194. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  195. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  196. package/types/components.d.ts +1 -0
  197. package/types/condition/src/types.d.ts +2 -1
  198. package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
  199. package/types/data-grid/index.d.ts +11 -5
  200. package/types/data-grid/src/data-grid.component.d.ts +4 -2
  201. package/types/data-grid/src/data-grid.props.d.ts +1 -0
  202. package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
  203. package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
  204. package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
  205. package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
  206. package/types/data-view/composition/types.d.ts +19 -4
  207. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  208. package/types/designer-canvas/index.d.ts +2 -1
  209. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  210. package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
  211. package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
  212. package/types/designer-canvas/src/composition/types.d.ts +2 -3
  213. package/types/designer-canvas/src/types.d.ts +2 -1
  214. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  215. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  216. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  217. package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
  218. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +1 -1
  219. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  220. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  221. package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
  222. package/types/dynamic-form/src/types.d.ts +12 -1
  223. package/types/dynamic-resolver/index.d.ts +1 -0
  224. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
  225. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  226. package/types/dynamic-resolver/src/types.d.ts +9 -0
  227. package/types/dynamic-view/index.d.ts +1 -0
  228. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  229. package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
  230. package/types/index.d.ts +2 -0
  231. package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
  232. package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
  233. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  234. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  235. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  236. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  237. package/types/lookup/src/composition/types.d.ts +8 -0
  238. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  239. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  240. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  241. package/types/lookup/src/composition/use-http.d.ts +9 -5
  242. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  243. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  244. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  245. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  246. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  247. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  248. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  249. package/types/modal/src/modal.component.d.ts +3 -0
  250. package/types/modal/src/modal.props.d.ts +4 -0
  251. package/types/page-header/src/page-header.props.d.ts +1 -0
  252. package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
  253. package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
  254. package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
  255. package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
  256. package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
  257. package/types/property-panel/index.d.ts +2 -1
  258. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  259. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  260. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
  261. package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
  262. package/types/{data-grid/src/designer/use-group-column.d.ts → query-solution/src/designer/query-solution-config/composition/use-property.d.ts} +4 -5
  263. package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
  264. package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
  265. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
  266. package/types/query-solution/src/solutions.d.ts +108 -509
  267. package/types/response-layout-editor/index.d.ts +3 -1
  268. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  269. package/types/response-layout-editor/src/type.d.ts +21 -0
  270. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
  271. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
  272. package/types/section/src/designer/use-designer-rules.d.ts +3 -3
  273. package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
  274. package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
  275. package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
  276. package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
  277. package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
  278. package/types/tabs/src/tabs.props.d.ts +1 -0
  279. package/types/tree-grid/index.d.ts +8 -2
  280. package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
  281. package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
  282. package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
  283. package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
  284. package/types/modal/src/composition/use-esc.d.ts +0 -1
  285. package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
  286. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  287. package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
@@ -1,101 +1,101 @@
1
- var _ = Object.defineProperty;
2
- var H = (r, e, t) => e in r ? _(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var g = (r, e, t) => H(r, typeof e != "symbol" ? e + "" : e, t);
4
- import { defineComponent as G, toRefs as L, ref as k, computed as B, watch as W, createVNode as C, inject as q, onMounted as x } from "vue";
5
- import { cloneDeep as I } from "lodash-es";
6
- import { getSchemaByType as z } from "../dynamic-resolver/index.esm.js";
7
- const J = {}, Q = {};
8
- function $(r) {
9
- const { properties: e, title: t, ignore: n } = r, o = n && Array.isArray(n), c = Object.keys(e).reduce((u, s) => ((!o || !n.find((m) => m == s)) && (u[s] = e[s].type === "object" && e[s].properties ? $(e[s]) : I(e[s].default)), u), {});
10
- return (!o || !n.find((u) => u == "id")) && (c.id = `${t}-${Date.now()}`), c;
1
+ var Z = Object.defineProperty;
2
+ var H = (a, t, e) => t in a ? Z(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
+ var g = (a, t, e) => H(a, typeof t != "symbol" ? t + "" : t, e);
4
+ import { defineComponent as O, toRefs as j, ref as E, computed as D, watch as U, createVNode as F, inject as $, onMounted as _ } from "vue";
5
+ import { isPlainObject as W, cloneDeep as q } from "lodash-es";
6
+ import { DgControl as G } from "../designer-canvas/index.esm.js";
7
+ const z = {}, X = {};
8
+ function L(a) {
9
+ const { properties: t, title: e, ignore: r } = a, n = r && Array.isArray(r), l = Object.keys(t).reduce((p, f) => ((!n || !r.find((m) => m == f)) && (p[f] = t[f].type === "object" && t[f].properties ? L(t[f]) : q(t[f].default)), p), {});
10
+ return e && (!n || !r.find((p) => p == "id")) && (l.id = `${e}-${Date.now()}`), l;
11
11
  }
12
- function N(r, e = {}, t) {
13
- const n = J[r];
14
- if (n) {
15
- let o = $(n);
16
- const c = Q[r];
17
- return o = c ? c({ getSchemaByType: N }, o, e, t) : o, o;
12
+ function J(a, t = {}, e) {
13
+ const r = z[a];
14
+ if (r) {
15
+ let n = L(r);
16
+ const l = X[a];
17
+ return n = l ? l({ getSchemaByType: J }, n, t, e) : n, n;
18
18
  }
19
19
  return null;
20
20
  }
21
- function K(r, e) {
22
- const t = $(e);
23
- return Object.keys(r).reduce((n, o) => (n[o] && typeof n[o] == "object" ? Object.assign(n[o], r[o]) : n[o] = r[o], n), t), t;
21
+ function x(a, t) {
22
+ const e = L(t);
23
+ return Object.keys(a).reduce((r, n) => (r[n] && W(r[n]) && W(a[n]) ? Object.assign(r[n], a[n]) : r[n] = a[n], r), e), e;
24
24
  }
25
- function R(r, e) {
26
- return Object.keys(r).filter((n) => r[n] != null).reduce((n, o) => {
27
- if (e.has(o)) {
28
- const c = e.get(o);
29
- if (typeof c == "string")
30
- n[c] = r[o];
25
+ function K(a, t) {
26
+ return Object.keys(a).filter((r) => a[r] != null).reduce((r, n) => {
27
+ if (t.has(n)) {
28
+ const l = t.get(n);
29
+ if (typeof l == "string")
30
+ r[l] = a[n];
31
31
  else {
32
- const u = c(o, r[o], r);
33
- Object.assign(n, u);
32
+ const p = l(n, a[n], a);
33
+ Object.assign(r, p);
34
34
  }
35
35
  } else
36
- n[o] = r[o];
37
- return n;
36
+ r[n] = a[n];
37
+ return r;
38
38
  }, {});
39
39
  }
40
- function ee(r, e, t = /* @__PURE__ */ new Map()) {
41
- const n = K(r, e);
42
- return R(n, t);
40
+ function R(a, t, e = /* @__PURE__ */ new Map()) {
41
+ const r = x(a, t);
42
+ return K(r, e);
43
43
  }
44
- function te(r = {}) {
45
- function e(i, l, p, d) {
46
- if (typeof p == "number")
47
- return d[i].length === p;
48
- if (typeof p == "object") {
49
- const f = Object.keys(p)[0], h = p[f];
50
- if (f === "not")
51
- return Number(d[i].length) !== Number(h);
52
- if (f === "moreThan")
53
- return Number(d[i].length) >= Number(h);
54
- if (f === "lessThan")
55
- return Number(d[i].length) <= Number(h);
44
+ function ee(a = {}) {
45
+ function t(i, s, o, c) {
46
+ if (typeof o == "number")
47
+ return c[i].length === o;
48
+ if (typeof o == "object") {
49
+ const y = Object.keys(o)[0], d = o[y];
50
+ if (y === "not")
51
+ return Number(c[i].length) !== Number(d);
52
+ if (y === "moreThan")
53
+ return Number(c[i].length) >= Number(d);
54
+ if (y === "lessThan")
55
+ return Number(c[i].length) <= Number(d);
56
56
  }
57
57
  return !1;
58
58
  }
59
- function t(i, l, p, d) {
60
- return d[i] && d[i].propertyValue && String(d[i].propertyValue.value) === String(p);
59
+ function e(i, s, o, c) {
60
+ return c[i] && c[i].propertyValue && String(c[i].propertyValue.value) === String(o);
61
61
  }
62
- const n = /* @__PURE__ */ new Map([
63
- ["length", e],
64
- ["getProperty", t]
62
+ const r = /* @__PURE__ */ new Map([
63
+ ["length", t],
64
+ ["getProperty", e]
65
65
  ]);
66
- Object.keys(r).reduce((i, l) => (i.set(l, r[l]), i), n);
67
- function o(i, l) {
68
- const p = i;
69
- return typeof l == "number" ? [{ target: p, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: p, operator: "getProperty", param: i, value: !!l }] : typeof l == "object" ? Object.keys(l).map((d) => {
70
- if (d === "length")
71
- return { target: p, operator: "length", param: null, value: l[d] };
72
- const f = d, h = l[d];
73
- return { target: p, operator: "getProperty", param: f, value: h };
66
+ Object.keys(a).reduce((i, s) => (i.set(s, a[s]), i), r);
67
+ function n(i, s) {
68
+ const o = i;
69
+ return typeof s == "number" ? [{ target: o, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: o, operator: "getProperty", param: i, value: !!s }] : typeof s == "object" ? Object.keys(s).map((c) => {
70
+ if (c === "length")
71
+ return { target: o, operator: "length", param: null, value: s[c] };
72
+ const y = c, d = s[c];
73
+ return { target: o, operator: "getProperty", param: y, value: d };
74
74
  }) : [];
75
75
  }
76
- function c(i) {
77
- return Object.keys(i).reduce((p, d) => {
78
- const f = o(d, i[d]);
79
- return p.push(...f), p;
76
+ function l(i) {
77
+ return Object.keys(i).reduce((o, c) => {
78
+ const y = n(c, i[c]);
79
+ return o.push(...y), o;
80
80
  }, []);
81
81
  }
82
- function u(i, l) {
83
- if (n.has(i.operator)) {
84
- const p = n.get(i.operator);
85
- return p && p(i.target, i.param, i.value, l) || !1;
82
+ function p(i, s) {
83
+ if (r.has(i.operator)) {
84
+ const o = r.get(i.operator);
85
+ return o && o(i.target, i.param, i.value, s) || !1;
86
86
  }
87
87
  return !1;
88
88
  }
89
- function s(i, l) {
90
- return c(i).reduce((f, h) => f && u(h, l), !0);
89
+ function f(i, s) {
90
+ return l(i).reduce((y, d) => y && p(d, s), !0);
91
91
  }
92
- function m(i, l) {
93
- const p = Object.keys(i), d = p.includes("allOf"), f = p.includes("anyOf"), h = d || f, T = (h ? i[h ? d ? "allOf" : "anyOf" : "allOf"] : [i]).map((A) => s(A, l));
94
- return d ? !T.includes(!1) : T.includes(!0);
92
+ function m(i, s) {
93
+ const o = Object.keys(i), c = o.includes("allOf"), y = o.includes("anyOf"), d = c || y, b = (d ? i[d ? c ? "allOf" : "anyOf" : "allOf"] : [i]).map((T) => f(T, s));
94
+ return c ? !b.includes(!1) : b.includes(!0);
95
95
  }
96
96
  return { parseValueSchema: m };
97
97
  }
98
- const a = {
98
+ const u = {
99
99
  button: { type: "button", name: "按钮", icon: "Button" },
100
100
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
101
101
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -132,21 +132,22 @@ const a = {
132
132
  uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
133
133
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
134
134
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
135
- "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
136
- }, ne = {}, oe = {};
137
- te();
138
- function re(r, e, t = /* @__PURE__ */ new Map(), n = (u, s, m) => s, o = {}, c = (u) => u) {
139
- return J[e.title] = e, Q[e.title] = n, ne[e.title] = o, oe[e.title] = c, (u = {}) => {
140
- const s = ee(u, e, t), m = Object.keys(r).reduce((i, l) => (i[l] = r[l].default, i), {});
141
- return Object.assign(m, s);
135
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
136
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
137
+ }, te = {}, ne = {};
138
+ ee();
139
+ function oe(a, t, e = /* @__PURE__ */ new Map(), r = (p, f, m) => f, n = {}, l = (p) => p) {
140
+ return z[t.title] = t, X[t.title] = r, te[t.title] = n, ne[t.title] = l, (p = {}) => {
141
+ const f = R(p, t, e), m = Object.keys(a).reduce((i, s) => (i[s] = a[s].default, i), {});
142
+ return Object.assign(m, f);
142
143
  };
143
144
  }
144
- function ie(r, e) {
145
- return { customClass: e.class, customStyle: e.style };
145
+ function re(a, t) {
146
+ return { customClass: t.class, customStyle: t.style };
146
147
  }
147
- const ae = /* @__PURE__ */ new Map([
148
- ["appearance", ie]
149
- ]), le = "https://json-schema.org/draft/2020-12/schema", se = "https://farris-design.gitee.io/switch.schema.json", ce = "switch", pe = "A Farris Component", ue = "object", de = {
148
+ const ie = /* @__PURE__ */ new Map([
149
+ ["appearance", re]
150
+ ]), ae = "https://json-schema.org/draft/2020-12/schema", le = "https://farris-design.gitee.io/switch.schema.json", se = "switch", ce = "A Farris Component", pe = "object", ue = {
150
151
  id: {
151
152
  description: "The unique identifier for a switch",
152
153
  type: "string"
@@ -216,29 +217,29 @@ const ae = /* @__PURE__ */ new Map([
216
217
  size: {
217
218
  description: "",
218
219
  type: "enum",
219
- default: "middle"
220
+ default: "medium"
220
221
  }
221
- }, me = [
222
+ }, de = [
222
223
  "id",
223
224
  "type"
224
- ], ye = [
225
+ ], me = [
225
226
  "id",
226
227
  "appearance",
227
228
  "binding"
228
229
  ], fe = {
229
- $schema: le,
230
- $id: se,
231
- title: ce,
232
- description: pe,
233
- type: ue,
234
- properties: de,
235
- required: me,
236
- ignore: ye
230
+ $schema: ae,
231
+ $id: le,
232
+ title: se,
233
+ description: ce,
234
+ type: pe,
235
+ properties: ue,
236
+ required: de,
237
+ ignore: me
237
238
  };
238
- function he(r, e, t) {
239
- return e;
239
+ function ye(a, t, e) {
240
+ return t;
240
241
  }
241
- const U = {
242
+ const N = {
242
243
  /** 组件值*/
243
244
  modelValue: { type: Boolean, default: !1 },
244
245
  /** 禁用 */
@@ -254,154 +255,145 @@ const U = {
254
255
  /** 开关值变化事件 */
255
256
  onModelValueChanged: { type: Function, default: () => {
256
257
  } }
257
- }, X = re(U, fe, ae, he), F = /* @__PURE__ */ G({
258
+ }, Q = oe(N, fe, ie, ye), P = /* @__PURE__ */ O({
258
259
  name: "FSwitch",
259
- props: U,
260
+ props: N,
260
261
  emits: ["update:modelValue", "modelValueChanged"],
261
- setup(r, e) {
262
+ setup(a, t) {
262
263
  const {
263
- disabled: t,
264
- size: n,
265
- onLabel: o,
266
- offLabel: c,
267
- onBackground: u,
268
- offBackground: s,
264
+ disabled: e,
265
+ size: r,
266
+ onLabel: n,
267
+ offLabel: l,
268
+ onBackground: p,
269
+ offBackground: f,
269
270
  onColor: m,
270
271
  offColor: i
271
- } = L(r), l = k(r.modelValue), p = B(() => ({
272
+ } = j(a), s = E(a.modelValue), o = D(() => ({
272
273
  switch: !0,
273
274
  "f-cmp-switch": !0,
274
- checked: l.value,
275
- disabled: t.value,
276
- "switch-large": n.value === "large",
277
- "switch-medium": n.value === "medium",
278
- "switch-small": n.value === "small"
279
- })), d = B(() => l.value ? {
275
+ checked: s.value,
276
+ disabled: e.value,
277
+ "switch-large": r.value === "large",
278
+ "switch-medium": r.value === "medium",
279
+ "switch-small": r.value === "small"
280
+ })), c = D(() => s.value ? {
280
281
  outline: "none",
281
- background: u.value
282
+ background: p.value
282
283
  } : {
283
284
  outline: "none",
284
- backgroundColor: s.value
285
- }), f = B(() => l.value ? {
285
+ backgroundColor: f.value
286
+ }), y = D(() => s.value ? {
286
287
  background: m.value
287
288
  } : {
288
289
  backgroundColor: i.value
289
- }), h = B(() => (o == null ? void 0 : o.value) || (c == null ? void 0 : c.value));
290
- function P() {
291
- t.value || (l.value = !l.value, e.emit("update:modelValue", l.value));
290
+ }), d = D(() => (n == null ? void 0 : n.value) || (l == null ? void 0 : l.value));
291
+ function h() {
292
+ e.value || (s.value = !s.value, t.emit("update:modelValue", s.value));
292
293
  }
293
- return W(l, (M, T) => {
294
- M !== T && e.emit("modelValueChanged", M);
295
- }), W(() => r.modelValue, (M, T) => {
296
- M !== T && (l.value = M);
297
- }), () => C("span", {
294
+ return U(s, (C, b) => {
295
+ C !== b && t.emit("modelValueChanged", C);
296
+ }), U(() => a.modelValue, (C, b) => {
297
+ C !== b && (s.value = C);
298
+ }), () => F("span", {
298
299
  tabindex: "0",
299
300
  role: "button",
300
- class: p.value,
301
- style: d.value,
302
- onClick: P
303
- }, [h.value && C("span", {
301
+ class: o.value,
302
+ style: c.value,
303
+ onClick: h
304
+ }, [d.value && F("span", {
304
305
  class: "switch-pane"
305
- }, [C("span", {
306
+ }, [F("span", {
306
307
  class: "switch-label-checked"
307
- }, [o == null ? void 0 : o.value]), C("span", {
308
+ }, [n == null ? void 0 : n.value]), F("span", {
308
309
  class: "switch-label-unchecked"
309
- }, [c == null ? void 0 : c.value])]), C("small", {
310
- style: f.value
311
- }, [e.slots.default && e.slots.default()])]);
310
+ }, [l == null ? void 0 : l.value])]), F("small", {
311
+ style: y.value
312
+ }, [t.slots.default && t.slots.default()])]);
312
313
  }
313
314
  });
314
- function ge(r, e, t) {
315
- var O;
316
- function n() {
317
- t != null && t.resolveComponentContext && t.resolveComponentContext();
315
+ function he(a, t, e) {
316
+ var B;
317
+ function r() {
318
+ e != null && e.resolveComponentContext && e.resolveComponentContext();
318
319
  }
319
- n();
320
- const o = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "", u = k();
321
- function s() {
322
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
320
+ r();
321
+ const n = e && e.getStyles && e.getStyles() || "", l = e && e.getDesignerClass && e.getDesignerClass() || "", p = E();
322
+ function f() {
323
+ return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanMoveComponent ? e.checkCanMoveComponent() : !0;
323
324
  }
324
325
  function m() {
325
326
  return !1;
326
327
  }
327
328
  function i() {
328
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
329
+ return (t == null ? void 0 : t.schema.componentType) === "frame" ? !1 : e && e.checkCanDeleteComponent ? e.checkCanDeleteComponent() : !0;
329
330
  }
330
- function l() {
331
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
331
+ function s() {
332
+ return (t == null ? void 0 : t.schema.componentType) === "frame" ? !0 : e && e.hideNestedPaddingInDesginerView ? e.hideNestedPaddingInDesginerView() : !1;
332
333
  }
333
- function p(y) {
334
- if (!y || !y.value)
334
+ function o(v) {
335
+ if (!v || !v.value)
335
336
  return null;
336
- if (y.value.schema && y.value.schema.type === "component")
337
- return y.value;
338
- const v = k(y == null ? void 0 : y.value.parent), b = p(v);
339
- return b || null;
337
+ if (v.value.schema && v.value.schema.type === "component")
338
+ return v.value;
339
+ const M = E(v == null ? void 0 : v.value.parent), w = o(M);
340
+ return w || null;
340
341
  }
341
- function d(y = e) {
342
- const { componentInstance: v, designerItemElementRef: b } = y;
343
- return !v || !v.value ? null : v.value.canMove ? b : d(y.parent);
342
+ function c(v = t) {
343
+ const { componentInstance: M, designerItemElementRef: w } = v;
344
+ return !M || !M.value ? null : M.value.canMove ? w : c(v.parent);
344
345
  }
345
- function f(y) {
346
- return !!t && t.canAccepts(y);
346
+ function y(v) {
347
+ return !!e && e.canAccepts(v);
347
348
  }
348
- function h() {
349
- return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
350
- }
351
- function P() {
349
+ function d() {
350
+ return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
352
351
  }
353
- function M(y, v) {
354
- v && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(v);
352
+ function h() {
355
353
  }
356
- function T(y, v) {
357
- const { componentType: b } = y;
358
- let w = N(b, y, v);
359
- t && t.onResolveNewComponentSchema && (w = t.onResolveNewComponentSchema(y, w));
360
- const D = b.toLowerCase().replace("-", "_");
361
- return w && !w.id && w.type === b && (w.id = `${D}_${Math.random().toString().slice(2, 6)}`), w;
354
+ function C(v, M) {
355
+ M && e != null && e.onAcceptMovedChildElement && e.onAcceptMovedChildElement(M);
362
356
  }
363
- function j(y, v) {
364
- const b = String(y.getAttribute("data-controltype")), w = y.getAttribute("data-feature"), D = w ? JSON.parse(w) : {};
365
- D.parentComponentInstance = u.value;
366
- let S = N(b, D);
367
- t && t.onAcceptNewChildElement && (S = t.onAcceptNewChildElement(y, v, S));
368
- const Z = b.toLowerCase().replace("-", "_");
369
- return S && !S.id && S.type === b && (S.id = `${Z}_${Math.random().toString().slice(2, 6)}`), S;
357
+ function b(v, M) {
358
+ const { componentType: w } = v;
359
+ let S = J(w, v, M);
360
+ e && e.onResolveNewComponentSchema && (S = e.onResolveNewComponentSchema(v, S));
361
+ const A = w.toLowerCase().replace("-", "_");
362
+ return S && !S.id && S.type === w && (S.id = `${A}_${Math.random().toString().slice(2, 6)}`), S;
370
363
  }
371
- function A(y) {
364
+ function k(v) {
372
365
  }
373
- function Y(...y) {
374
- if (t && t.getPropsConfig)
375
- return t.getPropsConfig(...y);
366
+ function T(...v) {
367
+ if (e && e.getPropsConfig)
368
+ return e.getPropsConfig(...v);
376
369
  }
377
- return u.value = {
378
- canMove: s(),
370
+ return p.value = {
371
+ canMove: f(),
379
372
  canSelectParent: m(),
380
373
  canDelete: i(),
381
- canNested: !l(),
382
- contents: e == null ? void 0 : e.schema.contents,
383
- elementRef: r,
384
- parent: (O = e == null ? void 0 : e.parent) == null ? void 0 : O.componentInstance,
385
- schema: e == null ? void 0 : e.schema,
386
- styles: o,
387
- designerClass: c,
388
- canAccepts: f,
389
- getBelongedComponentInstance: p,
390
- getDraggableDesignItemElement: d,
391
- getDraggingDisplayText: h,
392
- getPropConfig: Y,
393
- getDragScopeElement: P,
394
- onAcceptMovedChildElement: M,
395
- onAcceptNewChildElement: j,
396
- onChildElementMovedOut: A,
397
- addNewChildComponentSchema: T,
398
- updateDragAndDropRules: n,
399
- triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || k(!1),
400
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
401
- }, u;
374
+ canNested: !s(),
375
+ contents: t == null ? void 0 : t.schema.contents,
376
+ elementRef: a,
377
+ parent: (B = t == null ? void 0 : t.parent) == null ? void 0 : B.componentInstance,
378
+ schema: t == null ? void 0 : t.schema,
379
+ styles: n,
380
+ designerClass: l,
381
+ canAccepts: y,
382
+ getBelongedComponentInstance: o,
383
+ getDraggableDesignItemElement: c,
384
+ getDraggingDisplayText: d,
385
+ getPropConfig: T,
386
+ getDragScopeElement: h,
387
+ onAcceptMovedChildElement: C,
388
+ onChildElementMovedOut: k,
389
+ addNewChildComponentSchema: b,
390
+ updateDragAndDropRules: r,
391
+ triggerBelongedComponentToMoveWhenMoved: !!e && e.triggerBelongedComponentToMoveWhenMoved || E(!1),
392
+ triggerBelongedComponentToDeleteWhenDeleted: !!e && e.triggerBelongedComponentToDeleteWhenDeleted || E(!1)
393
+ }, p;
402
394
  }
403
- class ve {
404
- constructor(e, t) {
395
+ class ge {
396
+ constructor(t, e) {
405
397
  g(this, "componentId");
406
398
  g(this, "viewModelId");
407
399
  g(this, "eventsEditorUtils");
@@ -417,26 +409,26 @@ class ve {
417
409
  type: "object",
418
410
  categories: {}
419
411
  });
420
- var n;
421
- this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((n = this.formSchemaUtils) == null ? void 0 : n.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
412
+ var r;
413
+ this.componentId = t, this.designerHostService = e, this.eventsEditorUtils = e.eventsEditorUtils, this.formSchemaUtils = e.formSchemaUtils, this.formMetadataConverter = e.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(t)) || "", this.designViewModelUtils = e.designViewModelUtils, this.controlCreatorUtils = e.controlCreatorUtils, this.metadataService = e.metadataService, this.schemaService = e.schemaService;
422
414
  }
423
415
  getTableInfo() {
424
- var e;
425
- return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
416
+ var t;
417
+ return (t = this.schemaService) == null ? void 0 : t.getTableInfoByViewModelId(this.viewModelId);
426
418
  }
427
- setDesignViewModelField(e) {
428
- const t = e.binding && e.binding.type === "Form" && e.binding.field;
429
- if (t) {
419
+ setDesignViewModelField(t) {
420
+ const e = t.binding && t.binding.type === "Form" && t.binding.field;
421
+ if (e) {
430
422
  if (!this.designViewModelField) {
431
- const n = this.designViewModelUtils.getDgViewModel(this.viewModelId);
432
- this.designViewModelField = n.fields.find((o) => o.id === t);
423
+ const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
424
+ this.designViewModelField = r.fields.find((n) => n.id === e);
433
425
  }
434
- e.updateOn = this.designViewModelField.updateOn;
426
+ t.updateOn = this.designViewModelField.updateOn;
435
427
  }
436
428
  }
437
- changeFieldEditorType(e, t) {
429
+ changeFieldEditorType(t, e) {
438
430
  }
439
- getBasicPropConfig(e) {
431
+ getBasicPropConfig(t) {
440
432
  return {
441
433
  description: "Basic Information",
442
434
  title: "基本信息",
@@ -455,13 +447,13 @@ class ve {
455
447
  type: "combo-list",
456
448
  textField: "name",
457
449
  valueField: "value",
458
- data: [{ value: e.type, name: a[e.type].name }]
450
+ data: [{ value: t.type, name: u[t.type].name }]
459
451
  }
460
452
  }
461
453
  }
462
454
  };
463
455
  }
464
- getAppearanceConfig(e = null) {
456
+ getAppearanceConfig(t = null) {
465
457
  return {
466
458
  title: "样式",
467
459
  description: "Appearance",
@@ -481,90 +473,212 @@ class ve {
481
473
  }
482
474
  };
483
475
  }
476
+ /**
477
+ *
478
+ * @param propertyId
479
+ * @param componentInstance
480
+ * @returns
481
+ */
482
+ updateElementByParentContainer(t, e) {
483
+ const r = e && e.parent && e.parent.schema;
484
+ if (!r)
485
+ return;
486
+ const n = r.contents.findIndex((p) => p.id === t), l = q(r.contents[n]);
487
+ r.contents.splice(n, 1), r.contents.splice(n, 0, l);
488
+ }
484
489
  }
485
- const V = class V {
490
+ const I = class I {
486
491
  /**
487
492
  * 根据绑定字段类型获取可用的输入类控件
488
493
  */
489
- static getEditorTypesByMDataType(e) {
490
- const t = V.fieldControlTypeMapping[e];
491
- return t || [{ key: "", value: "" }];
494
+ static getEditorTypesByMDataType(t) {
495
+ const e = I.fieldControlTypeMapping[t];
496
+ return e || [{ key: "", value: "" }];
492
497
  }
493
498
  /**
494
499
  * 获取所有输入类控件
495
500
  */
496
501
  static getAllInputTypes() {
497
- const e = [];
498
- for (let t in V.fieldControlTypeMapping)
499
- V.fieldControlTypeMapping[t].forEach((n) => {
500
- e.find((o) => o.key === n.key && o.value === n.value) || e.push({ key: n.key, value: n.value });
502
+ const t = [];
503
+ for (let e in I.fieldControlTypeMapping)
504
+ I.fieldControlTypeMapping[e].forEach((r) => {
505
+ t.find((n) => n.key === r.key && n.value === r.value) || t.push({ key: r.key, value: r.value });
501
506
  });
502
- return e;
507
+ return t;
503
508
  }
504
509
  };
505
510
  /**
506
511
  * <字段类型,可配置的控件类型列表>的映射
507
512
  */
508
- g(V, "fieldControlTypeMapping", {
513
+ g(I, "fieldControlTypeMapping", {
509
514
  String: [
510
- { key: a["input-group"].type, value: a["input-group"].name },
511
- { key: a.lookup.type, value: a.lookup.name },
512
- { key: a["date-picker"].type, value: a["date-picker"].name },
513
- { key: a["check-box"].type, value: a["check-box"].name },
514
- { key: a["radio-group"].type, value: a["radio-group"].name },
515
- { key: a["combo-list"].type, value: a["combo-list"].name },
516
- { key: a.textarea.type, value: a.textarea.name }
515
+ { key: u["input-group"].type, value: u["input-group"].name },
516
+ { key: u.lookup.type, value: u.lookup.name },
517
+ { key: u["date-picker"].type, value: u["date-picker"].name },
518
+ { key: u["check-box"].type, value: u["check-box"].name },
519
+ { key: u["check-group"].type, value: u["check-group"].name },
520
+ { key: u["radio-group"].type, value: u["radio-group"].name },
521
+ { key: u["combo-list"].type, value: u["combo-list"].name },
522
+ { key: u.textarea.type, value: u.textarea.name }
517
523
  ],
518
524
  Text: [
519
- { key: a.textarea.type, value: a.textarea.name },
520
- { key: a.lookup.type, value: a.lookup.name }
525
+ { key: u.textarea.type, value: u.textarea.name },
526
+ { key: u.lookup.type, value: u.lookup.name }
521
527
  ],
522
528
  Decimal: [
523
- { key: a["number-spinner"].type, value: a["number-spinner"].name }
529
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
524
530
  ],
525
531
  Integer: [
526
- { key: a["number-spinner"].type, value: a["number-spinner"].name }
532
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
527
533
  ],
528
534
  Number: [
529
- { key: a["number-spinner"].type, value: a["number-spinner"].name }
535
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
530
536
  ],
531
537
  BigNumber: [
532
- { key: a["number-spinner"].type, value: a["number-spinner"].name }
538
+ { key: u["number-spinner"].type, value: u["number-spinner"].name }
533
539
  ],
534
540
  Date: [
535
- { key: a["date-picker"].type, value: a["date-picker"].name }
541
+ { key: u["date-picker"].type, value: u["date-picker"].name }
536
542
  ],
537
543
  DateTime: [
538
- { key: a["date-picker"].type, value: a["date-picker"].name }
544
+ { key: u["date-picker"].type, value: u["date-picker"].name }
539
545
  ],
540
546
  Boolean: [
541
- { key: a.switch.type, value: a.switch.name },
542
- { key: a["check-box"].type, value: a["check-box"].name }
547
+ { key: u.switch.type, value: u.switch.name },
548
+ { key: u["check-box"].type, value: u["check-box"].name }
543
549
  ],
544
550
  Enum: [
545
- { key: a["combo-list"].type, value: a["combo-list"].name },
546
- { key: a["radio-group"].type, value: a["radio-group"].name }
551
+ { key: u["combo-list"].type, value: u["combo-list"].name },
552
+ { key: u["radio-group"].type, value: u["radio-group"].name }
547
553
  ],
548
554
  Object: [
549
- { key: a.lookup.type, value: a.lookup.name },
550
- { key: a["combo-list"].type, value: a["combo-list"].name },
551
- { key: a["radio-group"].type, value: a["radio-group"].name }
555
+ { key: u.lookup.type, value: u.lookup.name },
556
+ { key: u["combo-list"].type, value: u["combo-list"].name },
557
+ { key: u["radio-group"].type, value: u["radio-group"].name }
552
558
  ]
553
559
  });
554
- let E = V;
555
- const be = k(0);
556
- class we extends ve {
557
- constructor(e, t) {
558
- super(e, t);
560
+ let V = I;
561
+ const ve = E(0);
562
+ class Ce {
563
+ constructor() {
564
+ /** 控件标题 */
565
+ g(this, "label", "");
566
+ /** 控件id */
567
+ g(this, "id", "");
568
+ /** 每个控件占用的栅格数 */
569
+ g(this, "columnInSM", 12);
570
+ g(this, "columnInMD", 6);
571
+ g(this, "columnInLG", 3);
572
+ g(this, "columnInEL", 2);
573
+ /** 每个控件占用的列数 */
574
+ g(this, "displayWidthInSM", 1);
575
+ g(this, "displayWidthInMD", 1);
576
+ g(this, "displayWidthInLG", 1);
577
+ g(this, "displayWidthInEL", 1);
578
+ /** 编辑器内部默认显示的屏幕大小-----可以去掉 */
579
+ g(this, "displayColumnCountAtBreakPoint", "md");
580
+ /** 控件所在行,传0即可-----编辑器内部使用 */
581
+ g(this, "tagRow", 0);
582
+ /** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
583
+ g(this, "showTopBorder", 0);
584
+ /** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
585
+ g(this, "group", 1);
586
+ /** 控件是否符合标准的class配置(设计器用的) */
587
+ g(this, "isSupportedClass", !0);
588
+ /** 控件所在分组id(设计器用的) */
589
+ g(this, "fieldSetId", "");
590
+ }
591
+ }
592
+ function be(a) {
593
+ let t, e;
594
+ const r = /* @__PURE__ */ new Map();
595
+ let n = [];
596
+ function l(s, o) {
597
+ const y = s.split(" ").filter((k) => k.startsWith("col-"));
598
+ if (y.length === 0) {
599
+ o.isSupportedClass = !1;
600
+ return;
601
+ }
602
+ let d = y.find((k) => /^col-([1-9]|10|11|12)$/.test(k)), h = y.find((k) => /^col-md-([1-9]|10|11|12)$/.test(k)), C = y.find((k) => /^col-xl-([1-9]|10|11|12)$/.test(k)), b = y.find((k) => /^col-el-([1-9]|10|11|12)$/.test(k));
603
+ d = d || "col-12", o.columnInSM = parseInt(d.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), h = h || "col-md-" + o.columnInSM, o.columnInMD = parseInt(h.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), C = C || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(C.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), b = b || "col-el-" + o.columnInLG, o.columnInEL = parseInt(b.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
559
604
  }
560
- getPropertyConfig(e, t) {
561
- return this.propertyConfig.categories.basic = this.getBasicProperties(e, t), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
605
+ function p(s, o, c, y = !1) {
606
+ let d = !1;
607
+ s.contents.forEach((h) => {
608
+ if (h.type === "fieldset") {
609
+ c += 1, p(h, o, c, !0), d = !0;
610
+ return;
611
+ }
612
+ d && (c += 1, d = !1);
613
+ const C = h.appearance && h.appearance.class, b = new Ce();
614
+ C ? l(C, b) : b.isSupportedClass = !1, b.label = h.label || h.id, b.id = h.id, b.group = c, y && (b.fieldSetId = s.id), e === h.id && (t = c), r.set(h.id, h), o.push(b);
615
+ });
616
+ }
617
+ function f(s) {
618
+ const o = a.getComponentById(s);
619
+ if (!o || !o.componentType || !o.componentType.startsWith("form"))
620
+ return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
621
+ const c = a.selectNode(o, (y) => y.type === G["response-form"].type);
622
+ return !c || !c.contents || c.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: c };
623
+ }
624
+ function m(s, o) {
625
+ o = o || s.id;
626
+ const { result: c, message: y, formNode: d } = f(o);
627
+ if (!c)
628
+ return { result: c, message: y };
629
+ e = s.id, n = [], r.clear();
630
+ const h = d.contents[0].type === G.fieldset.type ? 0 : 1;
631
+ p(d, n, h);
632
+ const C = n.find((k) => !k.isSupportedClass);
633
+ return {
634
+ defaultState: {
635
+ defaultGroupNumber: t || 1,
636
+ model: C ? "customize" : "standard"
637
+ },
638
+ importData: n
639
+ };
640
+ }
641
+ function i(s, o) {
642
+ o = o;
643
+ const { result: c, formNode: y } = f(o);
644
+ if (!c)
645
+ return "";
646
+ const d = [];
647
+ return s.forEach((h) => {
648
+ var k;
649
+ const C = r.get(h.id), b = C.appearance && C.appearance.class;
650
+ if (b) {
651
+ const B = b.split(" ").filter((Y) => !Y.startsWith("col-")), v = "col-" + h.columnInSM, M = "col-md-" + h.columnInMD, w = "col-xl-" + h.columnInLG, S = "col-el-" + h.columnInEL, A = [v, M, w, S].concat(B);
652
+ C.appearance.class = A.join(" ");
653
+ }
654
+ if (h.fieldSetId) {
655
+ const T = y.contents.find((v) => v.id === h.fieldSetId), B = d.find((v) => v.id === h.fieldSetId);
656
+ B ? (k = B.contents) == null || k.push(C) : (d.push(T), T.contents = [C]);
657
+ } else
658
+ d.push(C);
659
+ }), y.contents = d, y.id;
562
660
  }
563
- getBasicProperties(e, t) {
564
- var u;
661
+ return {
662
+ checkCanFindFormNode: f,
663
+ checkCanOpenLayoutEditor: m,
664
+ changeFormControlsByResponseLayoutConfig: i,
665
+ getResonseFormLayoutConfig: p
666
+ };
667
+ }
668
+ class ke extends ge {
669
+ constructor(e, r) {
670
+ super(e, r);
671
+ g(this, "responseLayoutEditorFunction");
672
+ this.responseLayoutEditorFunction = be(this.formSchemaUtils);
673
+ }
674
+ getPropertyConfig(e, r) {
675
+ return this.propertyConfig.categories.basic = this.getBasicProperties(e, r), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e, r), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
676
+ }
677
+ getBasicProperties(e, r) {
678
+ var f;
565
679
  var n = this;
566
680
  this.setDesignViewModelField(e);
567
- const o = this.formSchemaUtils.getFormMetadataBasicInfo(), c = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
681
+ const l = this.formSchemaUtils.getFormMetadataBasicInfo(), p = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
568
682
  return {
569
683
  description: "Basic Information",
570
684
  title: "基本信息",
@@ -586,7 +700,7 @@ class we extends ve {
586
700
  textField: "value",
587
701
  valueField: "key",
588
702
  editable: !1,
589
- data: n.designViewModelField ? E.getEditorTypesByMDataType((u = n.designViewModelField.type) == null ? void 0 : u.name) : E.getAllInputTypes()
703
+ data: n.designViewModelField ? V.getEditorTypesByMDataType((f = n.designViewModelField.type) == null ? void 0 : f.name) : V.getAllInputTypes()
590
704
  }
591
705
  },
592
706
  label: {
@@ -603,7 +717,7 @@ class we extends ve {
603
717
  bindingType: { enable: !1 },
604
718
  editorParams: {
605
719
  propertyData: e,
606
- formBasicInfo: o
720
+ formBasicInfo: l
607
721
  },
608
722
  columns: [
609
723
  { field: "name", title: "字段名称" },
@@ -611,26 +725,27 @@ class we extends ve {
611
725
  { field: "fieldType", title: "字段类型" }
612
726
  ],
613
727
  textField: "bindingField",
614
- data: c
728
+ data: p
615
729
  }
616
730
  }
617
731
  },
618
- setPropertyRelates(s, m) {
619
- if (s)
620
- switch (s && s.propertyID) {
732
+ setPropertyRelates(m, i) {
733
+ if (m)
734
+ switch (m && m.propertyID) {
621
735
  case "type": {
622
- n.changeControlType(e, s, t);
736
+ n.changeControlType(e, m, r);
623
737
  break;
624
738
  }
625
739
  case "label": {
626
- s.needRefreshControlTree = !0;
740
+ m.needRefreshControlTree = !0;
627
741
  break;
628
742
  }
629
743
  }
630
744
  }
631
745
  };
632
746
  }
633
- getAppearanceProperties(e) {
747
+ getAppearanceProperties(e, r) {
748
+ var n = this;
634
749
  return {
635
750
  title: "样式",
636
751
  description: "Appearance",
@@ -651,12 +766,25 @@ class we extends ve {
651
766
  description: "响应式列宽",
652
767
  title: "响应式列宽",
653
768
  type: "boolean",
654
- visible: !1,
769
+ visible: !0,
770
+ // 这个属性,标记当属性变更得时候触发重新更新属性
771
+ refreshPanelAfterChanged: !0,
655
772
  editor: {
656
- type: "response-layout-editor-setting"
657
- },
658
- $converter: "/converter/response-form-layout.converter"
773
+ type: "response-layout-editor-setting",
774
+ initialState: n.responseLayoutEditorFunction.checkCanOpenLayoutEditor(e, n.componentId)
775
+ }
659
776
  }
777
+ },
778
+ setPropertyRelates(l, p) {
779
+ if (l)
780
+ switch (l && l.propertyID) {
781
+ case "responseLayout":
782
+ n.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(l.propertyValue, n.componentId || e.id), n.updateUnifiedLayoutAfterResponseLayoutChanged(n.componentId), n.updateElementByParentContainer(e.id, r), delete e.responseLayout;
783
+ break;
784
+ case "class":
785
+ n.updateUnifiedLayoutAfterControlChanged(l.propertyValue, e.id, this.componentId), n.updateElementByParentContainer(e.id, r);
786
+ break;
787
+ }
660
788
  }
661
789
  };
662
790
  }
@@ -668,44 +796,44 @@ class we extends ve {
668
796
  * @param propertyData 控件DOM属性
669
797
  * @param newControlType 新控件类型
670
798
  */
671
- changeControlType(e, t, n) {
672
- var i, l, p, d;
673
- const o = t.propertyValue, c = n && n.parent && n.parent.schema;
674
- if (!c)
799
+ changeControlType(e, r, n) {
800
+ var s, o, c, y;
801
+ const l = r.propertyValue, p = n && n.parent && n.parent.schema;
802
+ if (!p)
675
803
  return;
676
- const u = c.contents.findIndex((f) => f.id === e.id), s = c.contents[u];
677
- let m;
804
+ const f = p.contents.findIndex((d) => d.id === e.id), m = p.contents[f];
805
+ let i;
678
806
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
679
807
  editor: {
680
- $type: o
808
+ $type: l
681
809
  },
682
810
  name: this.designViewModelField.name,
683
811
  require: this.designViewModelField.require,
684
812
  readonly: this.designViewModelField.readonly
685
- }, !1), m = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, o)), m || (m = z("form-group") || {}, m.editor = z(o) || {}, delete m.editor.id, delete m.editor.binding, delete m.editor.appearance), Object.assign(m, {
686
- id: s.id,
687
- appearance: s.appearance,
688
- size: s.size,
689
- label: s.label,
690
- binding: s.binding,
691
- visible: s.visible
692
- }), Object.assign(m.editor, {
693
- isTextArea: m.isTextArea && s.isTextArea,
694
- placeholder: (i = s.editor) == null ? void 0 : i.placeholder,
695
- holdPlace: (l = s.editor) == null ? void 0 : l.holdPlace,
696
- readonly: (p = s.editor) == null ? void 0 : p.readonly,
697
- require: (d = s.editor) == null ? void 0 : d.require
698
- }), c.contents.splice(u, 1), c.contents.splice(u, 0, m), n.schema = Object.assign(s, m), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
699
- (f) => f.classList.remove("dgComponentSelected")
700
- ), be.value++;
701
- }
702
- getComponentConfig(e, t = {}, n = {}) {
703
- const o = Object.assign({
813
+ }, !1), i = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), i || (i = this.controlCreatorUtils.createFormGroupWithoutField(l)), Object.assign(i, {
814
+ id: m.id,
815
+ appearance: m.appearance,
816
+ size: m.size,
817
+ label: m.label,
818
+ binding: m.binding,
819
+ visible: m.visible
820
+ }), Object.assign(i.editor, {
821
+ isTextArea: i.isTextArea && m.isTextArea,
822
+ placeholder: (s = m.editor) == null ? void 0 : s.placeholder,
823
+ holdPlace: (o = m.editor) == null ? void 0 : o.holdPlace,
824
+ readonly: (c = m.editor) == null ? void 0 : c.readonly,
825
+ require: (y = m.editor) == null ? void 0 : y.require
826
+ }), p.contents.splice(f, 1), p.contents.splice(f, 0, i), n.schema = Object.assign(m, i), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
827
+ (d) => d.classList.remove("dgComponentSelected")
828
+ ), ve.value++;
829
+ }
830
+ getComponentConfig(e, r = {}, n = {}) {
831
+ const l = Object.assign({
704
832
  description: "编辑器",
705
833
  title: "编辑器",
706
834
  type: "input-group",
707
835
  $converter: "/converter/property-editor.converter"
708
- }, t), c = Object.assign({
836
+ }, r), p = Object.assign({
709
837
  readonly: {
710
838
  description: "",
711
839
  title: "只读",
@@ -727,15 +855,63 @@ class we extends ve {
727
855
  type: "string"
728
856
  }
729
857
  }, n);
730
- return { ...o, properties: { ...c } };
858
+ return { ...l, properties: { ...p } };
859
+ }
860
+ /**
861
+ * 修改某一输入控件的样式后更新Form的统一布局配置
862
+ * @param controlClass 控件样式
863
+ * @param controlId 控件Id
864
+ * @param componentId 控件所在组件id
865
+ */
866
+ updateUnifiedLayoutAfterControlChanged(e, r, n) {
867
+ const l = e.split(" ");
868
+ let p = l.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), f = l.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), m = l.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), i = l.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
869
+ p = p || "col-12", f = f || "col-md-" + p.replace("col-", ""), m = m || "col-xl-" + f.replace("col-md-", ""), i = i || "col-el-" + m.replace("col-xl-", "");
870
+ const s = {
871
+ id: r,
872
+ columnInSM: parseInt(p.replace("col-", ""), 10),
873
+ columnInMD: parseInt(f.replace("col-md-", ""), 10),
874
+ columnInLG: parseInt(m.replace("col-xl-", ""), 10),
875
+ columnInEL: parseInt(i.replace("col-el-", ""), 10)
876
+ };
877
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(n, s);
878
+ }
879
+ /**
880
+ * 修改控件布局配置后更新Form统一布局配置
881
+ * @param componentId 组件Id
882
+ * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
883
+ */
884
+ updateUnifiedLayoutAfterResponseLayoutChanged(e, r) {
885
+ const { formNode: n } = this.responseLayoutEditorFunction.checkCanFindFormNode(e);
886
+ if (!n || !n.unifiedLayout)
887
+ return;
888
+ const l = [];
889
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(n, l, 1), r) {
890
+ const d = l.find((h) => h.id === r.id);
891
+ Object.assign(d || {}, r);
892
+ }
893
+ const p = l.map((d) => d.columnInSM), f = l.map((d) => d.columnInMD), m = l.map((d) => d.columnInLG), i = l.map((d) => d.columnInEL), s = this.checkIsUniqueColumn(p) ? p[0] : null, o = this.checkIsUniqueColumn(f) ? f[0] : null, c = this.checkIsUniqueColumn(m) ? m[0] : null, y = this.checkIsUniqueColumn(i) ? i[0] : null;
894
+ Object.assign(n.unifiedLayout, {
895
+ uniqueColClassInSM: s,
896
+ uniqueColClassInMD: o,
897
+ uniqueColClassInLG: c,
898
+ uniqueColClassInEL: y
899
+ });
900
+ }
901
+ /**
902
+ * 校验宽度样式值是否一致
903
+ */
904
+ checkIsUniqueColumn(e) {
905
+ const r = new Set(e);
906
+ return Array.from(r).length === 1;
731
907
  }
732
908
  }
733
- class Ce extends we {
734
- constructor(e, t) {
735
- super(e, t);
909
+ class Me extends ke {
910
+ constructor(t, e) {
911
+ super(t, e);
736
912
  }
737
- getEditorProperties(e) {
738
- return this.getComponentConfig(e, { type: "switch" }, {
913
+ getEditorProperties(t) {
914
+ return this.getComponentConfig(t, { type: "switch" }, {
739
915
  readonly: {
740
916
  visible: !1
741
917
  },
@@ -786,114 +962,114 @@ class Ce extends we {
786
962
  });
787
963
  }
788
964
  }
789
- function ke(r, e) {
790
- r.schema;
791
- const t = k(!0), n = k(!0);
792
- function o(p) {
965
+ function we(a, t) {
966
+ a.schema;
967
+ const e = E(!0), r = E(!0);
968
+ function n(o) {
793
969
  return !1;
794
970
  }
795
- function c() {
971
+ function l() {
796
972
  return !1;
797
973
  }
798
- function u() {
974
+ function p() {
799
975
  return !1;
800
976
  }
801
- function s() {
977
+ function f() {
802
978
  return !0;
803
979
  }
804
- function m(p) {
980
+ function m(o) {
805
981
  }
806
982
  function i() {
807
983
  }
808
- function l(p) {
984
+ function s(o) {
809
985
  return null;
810
986
  }
811
987
  return {
812
- canAccepts: o,
813
- checkCanDeleteComponent: c,
814
- checkCanMoveComponent: u,
815
- hideNestedPaddingInDesginerView: s,
988
+ canAccepts: n,
989
+ checkCanDeleteComponent: l,
990
+ checkCanMoveComponent: p,
991
+ hideNestedPaddingInDesginerView: f,
816
992
  onAcceptMovedChildElement: m,
817
993
  resolveComponentContext: i,
818
- triggerBelongedComponentToMoveWhenMoved: t,
819
- triggerBelongedComponentToDeleteWhenDeleted: n,
820
- getPropsConfig: l
994
+ triggerBelongedComponentToMoveWhenMoved: e,
995
+ triggerBelongedComponentToDeleteWhenDeleted: r,
996
+ getPropsConfig: s
821
997
  };
822
998
  }
823
- function Me(r, e) {
999
+ function Se(a, t) {
824
1000
  const {
825
- canAccepts: t,
826
- checkCanDeleteComponent: n,
827
- checkCanMoveComponent: o,
828
- hideNestedPaddingInDesginerView: c,
829
- onAcceptMovedChildElement: u,
830
- resolveComponentContext: s,
1001
+ canAccepts: e,
1002
+ checkCanDeleteComponent: r,
1003
+ checkCanMoveComponent: n,
1004
+ hideNestedPaddingInDesginerView: l,
1005
+ onAcceptMovedChildElement: p,
1006
+ resolveComponentContext: f,
831
1007
  triggerBelongedComponentToMoveWhenMoved: m,
832
1008
  triggerBelongedComponentToDeleteWhenDeleted: i
833
- } = ke(r), l = r.schema;
834
- function p(d, f) {
835
- return new Ce(d, e).getPropertyConfig(l, f);
1009
+ } = we(a), s = a.schema;
1010
+ function o(c, y) {
1011
+ return new Me(c, t).getPropertyConfig(s, y);
836
1012
  }
837
1013
  return {
838
- canAccepts: t,
839
- checkCanDeleteComponent: n,
840
- checkCanMoveComponent: o,
841
- hideNestedPaddingInDesginerView: c,
842
- onAcceptMovedChildElement: u,
843
- resolveComponentContext: s,
1014
+ canAccepts: e,
1015
+ checkCanDeleteComponent: r,
1016
+ checkCanMoveComponent: n,
1017
+ hideNestedPaddingInDesginerView: l,
1018
+ onAcceptMovedChildElement: p,
1019
+ resolveComponentContext: f,
844
1020
  triggerBelongedComponentToMoveWhenMoved: m,
845
1021
  triggerBelongedComponentToDeleteWhenDeleted: i,
846
- getPropsConfig: p
1022
+ getPropsConfig: o
847
1023
  };
848
1024
  }
849
- const Te = /* @__PURE__ */ G({
1025
+ const Fe = /* @__PURE__ */ O({
850
1026
  name: "FSwitchDesign",
851
- props: U,
1027
+ props: N,
852
1028
  emits: ["update:modelValue"],
853
- setup(r, e) {
1029
+ setup(a, t) {
854
1030
  const {
855
- size: t,
856
- onLabel: n,
857
- offLabel: o
858
- } = L(r), c = k(), u = q("designer-host-service"), s = q("design-item-context"), m = Me(s, u), i = ge(c, s, m);
859
- x(() => {
860
- c.value.componentInstance = i;
861
- }), e.expose(i.value);
862
- const l = B(() => ({
1031
+ size: e,
1032
+ onLabel: r,
1033
+ offLabel: n
1034
+ } = j(a), l = E(), p = $("designer-host-service"), f = $("design-item-context"), m = Se(f, p), i = he(l, f, m);
1035
+ _(() => {
1036
+ l.value.componentInstance = i;
1037
+ }), t.expose(i.value);
1038
+ const s = D(() => ({
863
1039
  switch: !0,
864
1040
  "f-cmp-switch": !0,
865
1041
  checked: !1,
866
- "switch-large": t.value === "large",
867
- "switch-medium": t.value === "medium",
868
- "switch-small": t.value === "small"
869
- })), p = B(() => (n == null ? void 0 : n.value) || (o == null ? void 0 : o.value));
870
- return () => C("span", {
871
- ref: c,
1042
+ "switch-large": e.value === "large",
1043
+ "switch-medium": e.value === "medium",
1044
+ "switch-small": e.value === "small"
1045
+ })), o = D(() => (r == null ? void 0 : r.value) || (n == null ? void 0 : n.value));
1046
+ return () => F("span", {
1047
+ ref: l,
872
1048
  tabindex: "0",
873
1049
  role: "button",
874
- class: l.value
875
- }, [p.value && C("span", {
1050
+ class: s.value
1051
+ }, [o.value && F("span", {
876
1052
  class: "switch-pane"
877
- }, [C("span", {
1053
+ }, [F("span", {
878
1054
  class: "switch-label-unchecked"
879
- }, [o == null ? void 0 : o.value])]), C("small", null, [e.slots.default && e.slots.default()])]);
1055
+ }, [n == null ? void 0 : n.value])]), F("small", null, [t.slots.default && t.slots.default()])]);
880
1056
  }
881
- }), Se = (r) => {
882
- const e = r;
883
- return e.install = function(t) {
884
- t.component(e.name, r);
885
- }, r;
1057
+ }), Ee = (a) => {
1058
+ const t = a;
1059
+ return t.install = function(e) {
1060
+ e.component(t.name, a);
1061
+ }, a;
886
1062
  };
887
- F.register = (r, e, t, n) => {
888
- r.switch = F, e.switch = X;
1063
+ P.register = (a, t, e, r) => {
1064
+ a.switch = P, t.switch = Q;
889
1065
  };
890
- F.registerDesigner = (r, e, t) => {
891
- r.switch = Te, e.switch = X;
1066
+ P.registerDesigner = (a, t, e) => {
1067
+ a.switch = Fe, t.switch = Q;
892
1068
  };
893
- const Fe = Se(F);
1069
+ const Pe = Ee(P);
894
1070
  export {
895
- F as FSwitch,
896
- Fe as default,
897
- X as propsResolver,
898
- U as switchProps
1071
+ P as FSwitch,
1072
+ Pe as default,
1073
+ Q as propsResolver,
1074
+ N as switchProps
899
1075
  };