@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,102 +1,102 @@
1
1
  var ee = Object.defineProperty;
2
- var te = (t, e, n) => e in t ? ee(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var C = (t, e, n) => te(t, typeof e != "symbol" ? e + "" : e, n);
4
- import { computed as M, ref as k, createVNode as V, onMounted as L, nextTick as G, defineComponent as J, watch as U, inject as z } from "vue";
5
- import { cloneDeep as ne } from "lodash-es";
6
- import S from "bignumber.js";
7
- import { getSchemaByType as Z } from "../dynamic-resolver/index.esm.js";
8
- const Q = {}, X = {};
9
- function W(t) {
10
- const { properties: e, title: n, ignore: r } = t, l = r && Array.isArray(r), d = Object.keys(e).reduce((u, c) => ((!l || !r.find((s) => s == c)) && (u[c] = e[c].type === "object" && e[c].properties ? W(e[c]) : ne(e[c].default)), u), {});
11
- return (!l || !r.find((u) => u == "id")) && (d.id = `${n}-${Date.now()}`), d;
2
+ var te = (e, n, t) => n in e ? ee(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
+ var v = (e, n, t) => te(e, typeof n != "symbol" ? n + "" : n, t);
4
+ import { computed as F, ref as B, createVNode as E, onMounted as x, nextTick as j, defineComponent as q, watch as L, inject as W } from "vue";
5
+ import { isPlainObject as G, cloneDeep as z } from "lodash-es";
6
+ import N from "bignumber.js";
7
+ import { DgControl as $ } from "../designer-canvas/index.esm.js";
8
+ const Z = {}, X = {};
9
+ function O(e) {
10
+ const { properties: n, title: t, ignore: r } = e, i = r && Array.isArray(r), s = Object.keys(n).reduce((u, p) => ((!i || !r.find((d) => d == p)) && (u[p] = n[p].type === "object" && n[p].properties ? O(n[p]) : z(n[p].default)), u), {});
11
+ return t && (!i || !r.find((u) => u == "id")) && (s.id = `${t}-${Date.now()}`), s;
12
12
  }
13
- function $(t, e = {}, n) {
14
- const r = Q[t];
13
+ function J(e, n = {}, t) {
14
+ const r = Z[e];
15
15
  if (r) {
16
- let l = W(r);
17
- const d = X[t];
18
- return l = d ? d({ getSchemaByType: $ }, l, e, n) : l, l;
16
+ let i = O(r);
17
+ const s = X[e];
18
+ return i = s ? s({ getSchemaByType: J }, i, n, t) : i, i;
19
19
  }
20
20
  return null;
21
21
  }
22
- function oe(t, e) {
23
- const n = W(e);
24
- return Object.keys(t).reduce((r, l) => (r[l] && typeof r[l] == "object" ? Object.assign(r[l], t[l]) : r[l] = t[l], r), n), n;
22
+ function ne(e, n) {
23
+ const t = O(n);
24
+ return Object.keys(e).reduce((r, i) => (r[i] && G(r[i]) && G(e[i]) ? Object.assign(r[i], e[i]) : r[i] = e[i], r), t), t;
25
25
  }
26
- function re(t, e) {
27
- return Object.keys(t).filter((r) => t[r] != null).reduce((r, l) => {
28
- if (e.has(l)) {
29
- const d = e.get(l);
30
- if (typeof d == "string")
31
- r[d] = t[l];
26
+ function oe(e, n) {
27
+ return Object.keys(e).filter((r) => e[r] != null).reduce((r, i) => {
28
+ if (n.has(i)) {
29
+ const s = n.get(i);
30
+ if (typeof s == "string")
31
+ r[s] = e[i];
32
32
  else {
33
- const u = d(l, t[l], t);
33
+ const u = s(i, e[i], e);
34
34
  Object.assign(r, u);
35
35
  }
36
36
  } else
37
- r[l] = t[l];
37
+ r[i] = e[i];
38
38
  return r;
39
39
  }, {});
40
40
  }
41
- function ie(t, e, n = /* @__PURE__ */ new Map()) {
42
- const r = oe(t, e);
43
- return re(r, n);
41
+ function re(e, n, t = /* @__PURE__ */ new Map()) {
42
+ const r = ne(e, n);
43
+ return oe(r, t);
44
44
  }
45
- function ae(t = {}) {
46
- function e(o, i, a, p) {
47
- if (typeof a == "number")
48
- return p[o].length === a;
49
- if (typeof a == "object") {
50
- const f = Object.keys(a)[0], y = a[f];
45
+ function ie(e = {}) {
46
+ function n(a, l, o, c) {
47
+ if (typeof o == "number")
48
+ return c[a].length === o;
49
+ if (typeof o == "object") {
50
+ const f = Object.keys(o)[0], m = o[f];
51
51
  if (f === "not")
52
- return Number(p[o].length) !== Number(y);
52
+ return Number(c[a].length) !== Number(m);
53
53
  if (f === "moreThan")
54
- return Number(p[o].length) >= Number(y);
54
+ return Number(c[a].length) >= Number(m);
55
55
  if (f === "lessThan")
56
- return Number(p[o].length) <= Number(y);
56
+ return Number(c[a].length) <= Number(m);
57
57
  }
58
58
  return !1;
59
59
  }
60
- function n(o, i, a, p) {
61
- return p[o] && p[o].propertyValue && String(p[o].propertyValue.value) === String(a);
60
+ function t(a, l, o, c) {
61
+ return c[a] && c[a].propertyValue && String(c[a].propertyValue.value) === String(o);
62
62
  }
63
63
  const r = /* @__PURE__ */ new Map([
64
- ["length", e],
65
- ["getProperty", n]
64
+ ["length", n],
65
+ ["getProperty", t]
66
66
  ]);
67
- Object.keys(t).reduce((o, i) => (o.set(i, t[i]), o), r);
68
- function l(o, i) {
69
- const a = o;
70
- return typeof i == "number" ? [{ target: a, operator: "length", param: null, value: Number(i) }] : typeof i == "boolean" ? [{ target: a, operator: "getProperty", param: o, value: !!i }] : typeof i == "object" ? Object.keys(i).map((p) => {
71
- if (p === "length")
72
- return { target: a, operator: "length", param: null, value: i[p] };
73
- const f = p, y = i[p];
74
- return { target: a, operator: "getProperty", param: f, value: y };
67
+ Object.keys(e).reduce((a, l) => (a.set(l, e[l]), a), r);
68
+ function i(a, l) {
69
+ const o = a;
70
+ return typeof l == "number" ? [{ target: o, operator: "length", param: null, value: Number(l) }] : typeof l == "boolean" ? [{ target: o, operator: "getProperty", param: a, value: !!l }] : typeof l == "object" ? Object.keys(l).map((c) => {
71
+ if (c === "length")
72
+ return { target: o, operator: "length", param: null, value: l[c] };
73
+ const f = c, m = l[c];
74
+ return { target: o, operator: "getProperty", param: f, value: m };
75
75
  }) : [];
76
76
  }
77
- function d(o) {
78
- return Object.keys(o).reduce((a, p) => {
79
- const f = l(p, o[p]);
80
- return a.push(...f), a;
77
+ function s(a) {
78
+ return Object.keys(a).reduce((o, c) => {
79
+ const f = i(c, a[c]);
80
+ return o.push(...f), o;
81
81
  }, []);
82
82
  }
83
- function u(o, i) {
84
- if (r.has(o.operator)) {
85
- const a = r.get(o.operator);
86
- return a && a(o.target, o.param, o.value, i) || !1;
83
+ function u(a, l) {
84
+ if (r.has(a.operator)) {
85
+ const o = r.get(a.operator);
86
+ return o && o(a.target, a.param, a.value, l) || !1;
87
87
  }
88
88
  return !1;
89
89
  }
90
- function c(o, i) {
91
- return d(o).reduce((f, y) => f && u(y, i), !0);
90
+ function p(a, l) {
91
+ return s(a).reduce((f, m) => f && u(m, l), !0);
92
92
  }
93
- function s(o, i) {
94
- const a = Object.keys(o), p = a.includes("allOf"), f = a.includes("anyOf"), y = p || f, F = (y ? o[y ? p ? "allOf" : "anyOf" : "allOf"] : [o]).map((P) => c(P, i));
95
- return p ? !F.includes(!1) : F.includes(!0);
93
+ function d(a, l) {
94
+ const o = Object.keys(a), c = o.includes("allOf"), f = o.includes("anyOf"), m = c || f, w = (m ? a[m ? c ? "allOf" : "anyOf" : "allOf"] : [a]).map((T) => p(T, l));
95
+ return c ? !w.includes(!1) : w.includes(!0);
96
96
  }
97
- return { parseValueSchema: s };
97
+ return { parseValueSchema: d };
98
98
  }
99
- const m = {
99
+ const y = {
100
100
  button: { type: "button", name: "按钮", icon: "Button" },
101
101
  "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
102
102
  "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
@@ -133,21 +133,22 @@ const m = {
133
133
  uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
134
134
  "page-header": { type: "page-header", name: "页头", icon: "Header" },
135
135
  "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
136
- "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
137
- }, le = {}, ce = {};
138
- ae();
139
- function ue(t, e, n = /* @__PURE__ */ new Map(), r = (u, c, s) => c, l = {}, d = (u) => u) {
140
- return Q[e.title] = e, X[e.title] = r, le[e.title] = l, ce[e.title] = d, (u = {}) => {
141
- const c = ie(u, e, n), s = Object.keys(t).reduce((o, i) => (o[i] = t[i].default, o), {});
142
- return Object.assign(s, c);
136
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
137
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
138
+ }, ae = {}, le = {};
139
+ ie();
140
+ function se(e, n, t = /* @__PURE__ */ new Map(), r = (u, p, d) => p, i = {}, s = (u) => u) {
141
+ return Z[n.title] = n, X[n.title] = r, ae[n.title] = i, le[n.title] = s, (u = {}) => {
142
+ const p = re(u, n, t), d = Object.keys(e).reduce((a, l) => (a[l] = e[l].default, a), {});
143
+ return Object.assign(d, p);
143
144
  };
144
145
  }
145
- function se(t, e) {
146
- return { customClass: e.class, customStyle: e.style };
146
+ function ce(e, n) {
147
+ return { customClass: n.class, customStyle: n.style };
147
148
  }
148
- const pe = /* @__PURE__ */ new Map([
149
- ["appearance", se]
150
- ]), de = "https://json-schema.org/draft/2020-12/schema", me = "https://farris-design.gitee.io/number-spinner.schema.json", fe = "number-spinner", ye = "A Farris Input Component", ge = "object", be = {
149
+ const ue = /* @__PURE__ */ new Map([
150
+ ["appearance", ce]
151
+ ]), pe = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-design.gitee.io/number-spinner.schema.json", me = "number-spinner", fe = "A Farris Input Component", ye = "object", ge = {
151
152
  id: {
152
153
  description: "The unique identifier for a number spinner",
153
154
  type: "string"
@@ -251,24 +252,24 @@ const pe = /* @__PURE__ */ new Map([
251
252
  }, he = [
252
253
  "id",
253
254
  "type"
254
- ], ve = [
255
+ ], be = [
255
256
  "id",
256
257
  "appearance",
257
258
  "binding"
258
- ], we = {
259
- $schema: de,
260
- $id: me,
261
- title: fe,
262
- description: ye,
263
- type: ge,
264
- properties: be,
259
+ ], ve = {
260
+ $schema: pe,
261
+ $id: de,
262
+ title: me,
263
+ description: fe,
264
+ type: ye,
265
+ properties: ge,
265
266
  required: he,
266
- ignore: ve
267
+ ignore: be
267
268
  };
268
- function Ce(t, e, n) {
269
- return e;
269
+ function Ce(e, n, t) {
270
+ return n;
270
271
  }
271
- const q = {
272
+ const U = {
272
273
  /**
273
274
  * 组件标识
274
275
  */
@@ -372,358 +373,349 @@ const q = {
372
373
  * 作为内嵌编辑器被创建后默认选中文本
373
374
  */
374
375
  selectOnCreated: { type: Boolean, default: !1 }
375
- }, Y = ue(q, we, pe, Ce);
376
- function _(t, e, n, r) {
377
- const { format: l } = n, { displayValue: d, getRealValue: u, modelValue: c, onNumberValueChanged: s } = r;
378
- function o() {
379
- const w = new S(c.value || 0);
380
- return !(t.max && !new S(t.max).isNaN() && w.gte(new S(t.max)));
381
- }
382
- function i() {
383
- const w = new S(c.value || 0);
384
- return !(t.min && !new S(t.min).isNaN() && w.lte(new S(t.min)));
385
- }
386
- function a(w) {
387
- if (t.readonly || t.disabled)
376
+ }, Q = se(U, ve, ue, Ce);
377
+ function Y(e, n, t, r) {
378
+ const { format: i } = t, { displayValue: s, getRealValue: u, modelValue: p, onNumberValueChanged: d } = r;
379
+ function a() {
380
+ const b = new N(p.value || 0);
381
+ return !(e.max && !new N(e.max).isNaN() && b.gte(new N(e.max)));
382
+ }
383
+ function l() {
384
+ const b = new N(p.value || 0);
385
+ return !(e.min && !new N(e.min).isNaN() && b.lte(new N(e.min)));
386
+ }
387
+ function o(b) {
388
+ if (e.readonly || e.disabled)
388
389
  return;
389
- const F = w === "up" ? o : i, D = w === "up" ? "plus" : "minus";
390
- if (F()) {
391
- const b = new S(c.value || 0)[D](Number(t.step)), N = b.toFixed();
392
- d.value = l(N), s(u(b));
390
+ const w = b === "up" ? a : l, S = b === "up" ? "plus" : "minus";
391
+ if (w()) {
392
+ const C = new N(p.value || 0)[S](Number(e.step)), h = C.toFixed();
393
+ s.value = i(h), d(u(C));
393
394
  }
394
395
  }
395
- function p() {
396
- a("up");
396
+ function c() {
397
+ o("up");
397
398
  }
398
399
  function f() {
399
- a("down");
400
+ o("down");
400
401
  }
401
- function y(w) {
402
- p(), w.stopPropagation();
402
+ function m(b) {
403
+ c(), b.stopPropagation();
403
404
  }
404
- function v(w) {
405
- f(), w.stopPropagation();
405
+ function g(b) {
406
+ f(), b.stopPropagation();
406
407
  }
407
- return { canDownward: i, canUpward: o, downward: f, onClickDownButton: v, onClickUpButton: y, upward: p };
408
+ return { canDownward: l, canUpward: a, downward: f, onClickDownButton: g, onClickUpButton: m, upward: c };
408
409
  }
409
- function H(t, e, n) {
410
- const r = M(() => ({
411
- prefix: t.prefix,
412
- suffix: t.suffix,
413
- decimalSeparator: t.decimalSeparator,
414
- groupSeparator: t.useThousands ? t.groupSeparator : "",
415
- groupSize: t.groupSize
416
- })), { getValidNumberObject: l, precision: d } = n;
417
- function u(o) {
418
- return o = o == null || o === "" ? "" : String(o), o = o.replace(new RegExp(t.prefix, "g"), "").replace(new RegExp(t.suffix, "g"), "").replace(/,/g, ""), t.groupSeparator && t.groupSeparator !== "," && (o = o.replace(new RegExp(`\\${t.groupSeparator}`, "g"), "")), t.decimalSeparator && t.decimalSeparator !== "." && (o = o.replace(new RegExp(`\\${t.decimalSeparator}`, "g"), ".")), o;
419
- }
420
- function c(o, i) {
421
- return t.precision !== null && t.precision !== void 0 ? o.toFormat(d.value, i) : o.toFormat(i);
422
- }
423
- function s(o) {
424
- const i = u(o), a = new S(i, 10), p = l(a);
425
- return p.valueOf() === "0" && !t.showZero || p.isNaN() ? "" : t.formatter ? t.formatter(p.toNumber()) : c(p, r.value);
426
- }
427
- return { cleanFormat: u, format: s };
410
+ function H(e, n, t) {
411
+ const r = F(() => ({
412
+ prefix: e.prefix,
413
+ suffix: e.suffix,
414
+ decimalSeparator: e.decimalSeparator,
415
+ groupSeparator: e.useThousands ? e.groupSeparator : "",
416
+ groupSize: e.groupSize
417
+ })), { getValidNumberObject: i, precision: s } = t;
418
+ function u(a) {
419
+ return a = a == null || a === "" ? "" : String(a), a = a.replace(new RegExp(e.prefix, "g"), "").replace(new RegExp(e.suffix, "g"), "").replace(/,/g, ""), e.groupSeparator && e.groupSeparator !== "," && (a = a.replace(new RegExp(`\\${e.groupSeparator}`, "g"), "")), e.decimalSeparator && e.decimalSeparator !== "." && (a = a.replace(new RegExp(`\\${e.decimalSeparator}`, "g"), ".")), a;
420
+ }
421
+ function p(a, l) {
422
+ return e.precision !== null && e.precision !== void 0 ? a.toFormat(s.value, l) : a.toFormat(l);
423
+ }
424
+ function d(a) {
425
+ const l = u(a), o = new N(l, 10), c = i(o);
426
+ return c.valueOf() === "0" && !e.showZero || c.isNaN() ? "" : e.formatter ? e.formatter(c.toNumber()) : p(c, r.value);
427
+ }
428
+ return { cleanFormat: u, format: d };
428
429
  }
429
- function R(t, e) {
430
- const n = k(""), r = k(t.modelValue), l = M(() => Number(t.precision) || 0);
431
- function d(i) {
432
- return i.toFixed(l.value);
433
- }
434
- function u(i) {
435
- return isNaN(i) || i === null || i === void 0 || i === "";
436
- }
437
- function c(i) {
438
- const a = u(t.max) ? null : new S(String(t.max), 10), p = u(t.min) ? null : new S(String(t.min), 10);
439
- return a && i.gt(a) ? a : p && i.lt(p) ? p : i;
440
- }
441
- function s(i) {
442
- if (t.parser)
443
- return isNaN(Number(i)) ? t.parser(i) : i;
444
- let a = c(new S(i, 10));
445
- if (a.isNaN()) {
446
- if (t.canNull)
430
+ function _(e, n) {
431
+ const t = B(""), r = B(e.modelValue), i = F(() => Number(e.precision) || 0);
432
+ function s(l) {
433
+ return l.toFixed(i.value);
434
+ }
435
+ function u(l) {
436
+ return isNaN(l) || l === null || l === void 0 || l === "";
437
+ }
438
+ function p(l) {
439
+ const o = u(e.max) ? null : new N(String(e.max), 10), c = u(e.min) ? null : new N(String(e.min), 10);
440
+ return o && l.gt(o) ? o : c && l.lt(c) ? c : l;
441
+ }
442
+ function d(l) {
443
+ if (e.parser)
444
+ return isNaN(Number(l)) ? e.parser(l) : l;
445
+ let o = p(new N(l, 10));
446
+ if (o.isNaN()) {
447
+ if (e.canNull)
447
448
  return null;
448
- const f = new S("" + t.min, 10), y = new S("" + t.max, 10);
449
+ const f = new N("" + e.min, 10), m = new N("" + e.max, 10);
449
450
  if (!f.isNaN())
450
- a = f;
451
- else if (!y.isNaN())
452
- a = y;
451
+ o = f;
452
+ else if (!m.isNaN())
453
+ o = m;
453
454
  else
454
455
  return 0;
455
456
  }
456
- return d(a);
457
+ return s(o);
457
458
  }
458
- function o(i) {
459
- const a = Number(i);
460
- r.value = a, e.emit("update:modelValue", a), e.emit("valueChange", a), e.emit("change", a);
459
+ function a(l) {
460
+ const o = Number(l);
461
+ r.value = o, n.emit("update:modelValue", o), n.emit("valueChange", o), n.emit("change", o);
461
462
  }
462
- return { displayValue: n, getRealValue: s, modelValue: r, isEmpty: u, onNumberValueChanged: o, precision: l, getValidNumberObject: c };
463
+ return { displayValue: t, getRealValue: d, modelValue: r, isEmpty: u, onNumberValueChanged: a, precision: i, getValidNumberObject: p };
463
464
  }
464
- function Se(t, e, n, r, l) {
465
- const { cleanFormat: d, format: u } = n, { displayValue: c, getRealValue: s, modelValue: o, isEmpty: i, onNumberValueChanged: a } = r, { downward: p, upward: f } = l, y = k(!1), v = M(() => c.value);
466
- function w(b) {
467
- var h;
468
- if (b.stopPropagation(), y.value = !1, t.readonly || t.disabled)
465
+ function we(e, n, t, r, i) {
466
+ const { cleanFormat: s, format: u } = t, { displayValue: p, getRealValue: d, modelValue: a, isEmpty: l, onNumberValueChanged: o } = r, { downward: c, upward: f } = i, m = B(!1), g = F(() => p.value);
467
+ function b(C) {
468
+ var M;
469
+ if (C.stopPropagation(), m.value = !1, e.readonly || e.disabled)
469
470
  return;
470
- let N = (h = b.target) == null ? void 0 : h.value;
471
- t.canNull || (N = N || 0);
472
- const g = d(N);
473
- c.value = u(g), a(s(g)), e.emit("blur", { event: b, formatted: c.value, value: o.value });
474
- }
475
- function F(b) {
476
- b.stopPropagation(), y.value = !0, !(t.readonly || t.disabled) && (c.value = i(o.value) || !t.showZero && o.value === "0" ? "" : String(o.value), e.emit("focus", { event: b, formatted: c.value, value: o.value }));
477
- }
478
- function D(b) {
479
- var h;
480
- b.stopPropagation();
481
- let N = (h = b.target) == null ? void 0 : h.value;
482
- t.canNull || (N = N || 0);
483
- const g = d(N);
484
- c.value = g, a(s(g));
485
- }
486
- function P(b) {
487
- b.key === "ArrowDown" && (b.preventDefault(), p()), b.key === "ArrowUp" && (b.preventDefault(), f()), b.stopPropagation();
488
- }
489
- return { textBoxValue: v, onBlurTextBox: w, onFocusTextBox: F, onInput: D, onKeyDown: P, isFocus: y };
471
+ let h = (M = C.target) == null ? void 0 : M.value;
472
+ e.canNull || (h = h || 0);
473
+ const k = s(h);
474
+ p.value = u(k), o(d(k)), n.emit("blur", { event: C, formatted: p.value, value: a.value });
475
+ }
476
+ function w(C) {
477
+ C.stopPropagation(), m.value = !0, !(e.readonly || e.disabled) && (p.value = l(a.value) || !e.showZero && a.value === "0" ? "" : String(a.value), n.emit("focus", { event: C, formatted: p.value, value: a.value }));
478
+ }
479
+ function S(C) {
480
+ var M;
481
+ C.stopPropagation();
482
+ let h = (M = C.target) == null ? void 0 : M.value;
483
+ e.canNull || (h = h || 0);
484
+ const k = s(h);
485
+ p.value = k, o(d(k));
486
+ }
487
+ function T(C) {
488
+ C.key === "ArrowDown" && (C.preventDefault(), c()), C.key === "ArrowUp" && (C.preventDefault(), f()), C.stopPropagation();
489
+ }
490
+ return { textBoxValue: g, onBlurTextBox: b, onFocusTextBox: w, onInput: S, onKeyDown: T, isFocus: m };
490
491
  }
491
- function I(t, e, n) {
492
+ function K(e, n, t) {
492
493
  const {
493
494
  canDownward: r,
494
- canUpward: l,
495
- onClickDownButton: d,
495
+ canUpward: i,
496
+ onClickDownButton: s,
496
497
  onClickUpButton: u
497
- } = n, c = M(() => ({
498
+ } = t, p = F(() => ({
498
499
  "input-group-append": !0,
499
500
  "btn-group": !0,
500
501
  "btn-group-number": !0
501
- })), s = M(() => ({
502
+ })), d = F(() => ({
502
503
  btn: !0,
503
504
  "btn-secondary": !0,
504
505
  "btn-number-flag": !0
505
- })), o = M(() => ({
506
- cursor: l() ? "pointer" : "not-allowed",
506
+ })), a = F(() => ({
507
+ cursor: i() ? "pointer" : "not-allowed",
507
508
  "margin-left": 0
508
- })), i = M(() => ({
509
+ })), l = F(() => ({
509
510
  cursor: r() ? "pointer" : "not-allowed",
510
511
  "margin-left": 0
511
512
  }));
512
- return () => V("div", {
513
- class: c.value
514
- }, [V("button", {
513
+ return () => E("div", {
514
+ class: p.value
515
+ }, [E("button", {
515
516
  title: "upButton",
516
- class: s.value,
517
- style: o.value,
517
+ class: d.value,
518
+ style: a.value,
518
519
  onClick: u,
519
- disabled: !l()
520
- }, [V("span", {
520
+ disabled: !i()
521
+ }, [E("span", {
521
522
  class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
522
- }, null)]), V("button", {
523
+ }, null)]), E("button", {
523
524
  title: "downButton",
524
- class: s.value,
525
- style: i.value,
526
- onClick: d,
525
+ class: d.value,
526
+ style: l.value,
527
+ onClick: s,
527
528
  disabled: !r()
528
- }, [V("span", {
529
+ }, [E("span", {
529
530
  class: "f-icon f-icon-arrow-chevron-down number-arrow-chevron"
530
531
  }, null)])]);
531
532
  }
532
- function ke(t, e, n) {
533
- const r = k(), {
534
- onBlurTextBox: l,
535
- onFocusTextBox: d,
533
+ function Se(e, n, t) {
534
+ const r = B(), {
535
+ onBlurTextBox: i,
536
+ onFocusTextBox: s,
536
537
  onInput: u,
537
- onKeyDown: c,
538
- textBoxValue: s
539
- } = n, o = M(() => t.disabled || t.readonly || !t.editable ? "" : t.placeholder), i = M(() => ({
538
+ onKeyDown: p,
539
+ textBoxValue: d
540
+ } = t, a = F(() => e.disabled || e.readonly || !e.editable ? "" : e.placeholder), l = F(() => ({
540
541
  "form-control": !0,
541
542
  "f-utils-fill": !0
542
- })), a = M(() => ({
543
- "text-align": t.textAlign
543
+ })), o = F(() => ({
544
+ "text-align": e.textAlign
544
545
  }));
545
- function p(v) {
546
- v.stopPropagation();
546
+ function c(g) {
547
+ g.stopPropagation();
547
548
  }
548
549
  function f() {
549
- t.selectOnCreated, t.focusOnCreated;
550
+ e.selectOnCreated, e.focusOnCreated;
550
551
  }
551
- async function y(v) {
552
- d(v), await G, f();
552
+ async function m(g) {
553
+ s(g), await j, f();
553
554
  }
554
- return L(async () => {
555
- await G, f();
556
- }), () => V("input", {
555
+ return x(async () => {
556
+ await j, f();
557
+ }), () => E("input", {
557
558
  ref: r,
558
- class: i.value,
559
- style: a.value,
559
+ class: l.value,
560
+ style: o.value,
560
561
  type: "text",
561
- value: s.value,
562
- disabled: t.disabled,
563
- readonly: t.readonly || !t.editable,
564
- placeholder: o.value,
565
- onBlur: l,
566
- onChange: p,
567
- onFocus: y,
562
+ value: d.value,
563
+ disabled: e.disabled,
564
+ readonly: e.readonly || !e.editable,
565
+ placeholder: a.value,
566
+ onBlur: i,
567
+ onChange: c,
568
+ onFocus: m,
568
569
  onInput: u,
569
- onKeydown: c
570
+ onKeydown: p
570
571
  }, null);
571
572
  }
572
- const A = /* @__PURE__ */ J({
573
+ const P = /* @__PURE__ */ q({
573
574
  name: "FNumberSpinner",
574
- props: q,
575
+ props: U,
575
576
  emits: ["update:modelValue", "valueChange", "change", "blur", "focus", "click", "input"],
576
- setup(t, e) {
577
- const n = R(t, e), r = H(t, e, n), l = _(t, e, r, n), d = Se(t, e, r, n, l), u = I(t, e, l), {
578
- displayValue: c,
579
- modelValue: s,
580
- getRealValue: o
581
- } = n, i = ke(t, e, d), {
582
- format: a
577
+ setup(e, n) {
578
+ const t = _(e, n), r = H(e, n, t), i = Y(e, n, r, t), s = we(e, n, r, t, i), u = K(e, n, i), {
579
+ displayValue: p,
580
+ modelValue: d,
581
+ getRealValue: a
582
+ } = t, l = Se(e, n, s), {
583
+ format: o
583
584
  } = r, {
584
- isFocus: p
585
- } = d, f = M(() => !t.disabled && !t.readonly && t.showButton);
586
- return L(() => {
587
- const y = o(t.modelValue);
588
- c.value = a(y);
589
- }), U(() => [t.value], ([y]) => {
590
- const v = o(y);
591
- s.value = v, c.value = a(v);
592
- }), U(() => [t.modelValue], ([y]) => {
593
- y !== s.value && (s.value = y, !p.value && (c.value = a(o(y))));
594
- }), U(() => [t.precision, t.useThousands, t.prefix, t.suffix, t.showZero], () => {
595
- c.value = a(s.value);
596
- }), () => V("div", {
585
+ isFocus: c
586
+ } = s, f = F(() => !e.disabled && !e.readonly && e.showButton);
587
+ return x(() => {
588
+ const m = a(e.modelValue);
589
+ p.value = o(m);
590
+ }), L(() => [e.value], ([m]) => {
591
+ const g = a(m);
592
+ d.value = g, p.value = o(g);
593
+ }), L(() => [e.modelValue], ([m]) => {
594
+ m !== d.value && (d.value = m, !c.value && (p.value = o(a(m))));
595
+ }), L(() => [e.precision, e.useThousands, e.prefix, e.suffix, e.showZero], () => {
596
+ p.value = o(d.value);
597
+ }), () => E("div", {
597
598
  class: "input-group f-state-hover flex-row f-cmp-number-spinner"
598
- }, [i(), f.value && u()]);
599
+ }, [l(), f.value && u()]);
599
600
  }
600
601
  });
601
- function Ne(t, e, n) {
602
- var N;
602
+ function ke(e, n, t) {
603
+ var C;
603
604
  function r() {
604
- n != null && n.resolveComponentContext && n.resolveComponentContext();
605
+ t != null && t.resolveComponentContext && t.resolveComponentContext();
605
606
  }
606
607
  r();
607
- const l = n && n.getStyles && n.getStyles() || "", d = n && n.getDesignerClass && n.getDesignerClass() || "", u = k();
608
- function c() {
609
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
608
+ const i = t && t.getStyles && t.getStyles() || "", s = t && t.getDesignerClass && t.getDesignerClass() || "", u = B();
609
+ function p() {
610
+ return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
610
611
  }
611
- function s() {
612
+ function d() {
612
613
  return !1;
613
614
  }
614
- function o() {
615
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanDeleteComponent ? n.checkCanDeleteComponent() : !0;
615
+ function a() {
616
+ return (n == null ? void 0 : n.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
616
617
  }
617
- function i() {
618
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : n && n.hideNestedPaddingInDesginerView ? n.hideNestedPaddingInDesginerView() : !1;
618
+ function l() {
619
+ return (n == null ? void 0 : n.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
619
620
  }
620
- function a(g) {
621
- if (!g || !g.value)
621
+ function o(h) {
622
+ if (!h || !h.value)
622
623
  return null;
623
- if (g.value.schema && g.value.schema.type === "component")
624
- return g.value;
625
- const h = k(g == null ? void 0 : g.value.parent), B = a(h);
626
- return B || null;
624
+ if (h.value.schema && h.value.schema.type === "component")
625
+ return h.value;
626
+ const k = B(h == null ? void 0 : h.value.parent), M = o(k);
627
+ return M || null;
627
628
  }
628
- function p(g = e) {
629
- const { componentInstance: h, designerItemElementRef: B } = g;
630
- return !h || !h.value ? null : h.value.canMove ? B : p(g.parent);
629
+ function c(h = n) {
630
+ const { componentInstance: k, designerItemElementRef: M } = h;
631
+ return !k || !k.value ? null : k.value.canMove ? M : c(h.parent);
631
632
  }
632
- function f(g) {
633
- return !!n && n.canAccepts(g);
633
+ function f(h) {
634
+ return !!t && t.canAccepts(h);
634
635
  }
635
- function y() {
636
- return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
636
+ function m() {
637
+ return (n == null ? void 0 : n.schema.label) || (n == null ? void 0 : n.schema.title) || (n == null ? void 0 : n.schema.name);
637
638
  }
638
- function v() {
639
+ function g() {
639
640
  }
640
- function w(g, h) {
641
- h && n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(h);
641
+ function b(h, k) {
642
+ k && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(k);
642
643
  }
643
- function F(g, h) {
644
- const { componentType: B } = g;
645
- let T = $(B, g, h);
646
- n && n.onResolveNewComponentSchema && (T = n.onResolveNewComponentSchema(g, T));
647
- const O = B.toLowerCase().replace("-", "_");
648
- return T && !T.id && T.type === B && (T.id = `${O}_${Math.random().toString().slice(2, 6)}`), T;
644
+ function w(h, k) {
645
+ const { componentType: M } = h;
646
+ let V = J(M, h, k);
647
+ t && t.onResolveNewComponentSchema && (V = t.onResolveNewComponentSchema(h, V));
648
+ const A = M.toLowerCase().replace("-", "_");
649
+ return V && !V.id && V.type === M && (V.id = `${A}_${Math.random().toString().slice(2, 6)}`), V;
649
650
  }
650
- function D(g, h) {
651
- const B = String(g.getAttribute("data-controltype")), T = g.getAttribute("data-feature"), O = T ? JSON.parse(T) : {};
652
- O.parentComponentInstance = u.value;
653
- let x = $(B, O);
654
- n && n.onAcceptNewChildElement && (x = n.onAcceptNewChildElement(g, h, x));
655
- const K = B.toLowerCase().replace("-", "_");
656
- return x && !x.id && x.type === B && (x.id = `${K}_${Math.random().toString().slice(2, 6)}`), x;
651
+ function S(h) {
657
652
  }
658
- function P(g) {
659
- }
660
- function b(...g) {
661
- if (n && n.getPropsConfig)
662
- return n.getPropsConfig(...g);
653
+ function T(...h) {
654
+ if (t && t.getPropsConfig)
655
+ return t.getPropsConfig(...h);
663
656
  }
664
657
  return u.value = {
665
- canMove: c(),
666
- canSelectParent: s(),
667
- canDelete: o(),
668
- canNested: !i(),
669
- contents: e == null ? void 0 : e.schema.contents,
670
- elementRef: t,
671
- parent: (N = e == null ? void 0 : e.parent) == null ? void 0 : N.componentInstance,
672
- schema: e == null ? void 0 : e.schema,
673
- styles: l,
674
- designerClass: d,
658
+ canMove: p(),
659
+ canSelectParent: d(),
660
+ canDelete: a(),
661
+ canNested: !l(),
662
+ contents: n == null ? void 0 : n.schema.contents,
663
+ elementRef: e,
664
+ parent: (C = n == null ? void 0 : n.parent) == null ? void 0 : C.componentInstance,
665
+ schema: n == null ? void 0 : n.schema,
666
+ styles: i,
667
+ designerClass: s,
675
668
  canAccepts: f,
676
- getBelongedComponentInstance: a,
677
- getDraggableDesignItemElement: p,
678
- getDraggingDisplayText: y,
679
- getPropConfig: b,
680
- getDragScopeElement: v,
681
- onAcceptMovedChildElement: w,
682
- onAcceptNewChildElement: D,
683
- onChildElementMovedOut: P,
684
- addNewChildComponentSchema: F,
669
+ getBelongedComponentInstance: o,
670
+ getDraggableDesignItemElement: c,
671
+ getDraggingDisplayText: m,
672
+ getPropConfig: T,
673
+ getDragScopeElement: g,
674
+ onAcceptMovedChildElement: b,
675
+ onChildElementMovedOut: S,
676
+ addNewChildComponentSchema: w,
685
677
  updateDragAndDropRules: r,
686
- triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || k(!1),
687
- triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || k(!1)
678
+ triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || B(!1),
679
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || B(!1)
688
680
  }, u;
689
681
  }
690
- class Be {
691
- constructor(e, n) {
692
- C(this, "componentId");
693
- C(this, "viewModelId");
694
- C(this, "eventsEditorUtils");
695
- C(this, "formSchemaUtils");
696
- C(this, "formMetadataConverter");
697
- C(this, "designViewModelUtils");
698
- C(this, "designViewModelField");
699
- C(this, "controlCreatorUtils");
700
- C(this, "designerHostService");
701
- C(this, "schemaService", null);
702
- C(this, "metadataService", null);
703
- C(this, "propertyConfig", {
682
+ class Me {
683
+ constructor(n, t) {
684
+ v(this, "componentId");
685
+ v(this, "viewModelId");
686
+ v(this, "eventsEditorUtils");
687
+ v(this, "formSchemaUtils");
688
+ v(this, "formMetadataConverter");
689
+ v(this, "designViewModelUtils");
690
+ v(this, "designViewModelField");
691
+ v(this, "controlCreatorUtils");
692
+ v(this, "designerHostService");
693
+ v(this, "schemaService", null);
694
+ v(this, "metadataService", null);
695
+ v(this, "propertyConfig", {
704
696
  type: "object",
705
697
  categories: {}
706
698
  });
707
699
  var r;
708
- this.componentId = e, this.designerHostService = n, this.eventsEditorUtils = n.eventsEditorUtils, this.formSchemaUtils = n.formSchemaUtils, this.formMetadataConverter = n.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = n.designViewModelUtils, this.controlCreatorUtils = n.controlCreatorUtils, this.metadataService = n.metadataService, this.schemaService = n.schemaService;
700
+ this.componentId = n, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((r = this.formSchemaUtils) == null ? void 0 : r.getViewModelIdByComponentId(n)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
709
701
  }
710
702
  getTableInfo() {
711
- var e;
712
- return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
703
+ var n;
704
+ return (n = this.schemaService) == null ? void 0 : n.getTableInfoByViewModelId(this.viewModelId);
713
705
  }
714
- setDesignViewModelField(e) {
715
- const n = e.binding && e.binding.type === "Form" && e.binding.field;
716
- if (n) {
706
+ setDesignViewModelField(n) {
707
+ const t = n.binding && n.binding.type === "Form" && n.binding.field;
708
+ if (t) {
717
709
  if (!this.designViewModelField) {
718
710
  const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
719
- this.designViewModelField = r.fields.find((l) => l.id === n);
711
+ this.designViewModelField = r.fields.find((i) => i.id === t);
720
712
  }
721
- e.updateOn = this.designViewModelField.updateOn;
713
+ n.updateOn = this.designViewModelField.updateOn;
722
714
  }
723
715
  }
724
- changeFieldEditorType(e, n) {
716
+ changeFieldEditorType(n, t) {
725
717
  }
726
- getBasicPropConfig(e) {
718
+ getBasicPropConfig(n) {
727
719
  return {
728
720
  description: "Basic Information",
729
721
  title: "基本信息",
@@ -742,13 +734,13 @@ class Be {
742
734
  type: "combo-list",
743
735
  textField: "name",
744
736
  valueField: "value",
745
- data: [{ value: e.type, name: m[e.type].name }]
737
+ data: [{ value: n.type, name: y[n.type].name }]
746
738
  }
747
739
  }
748
740
  }
749
741
  };
750
742
  }
751
- getAppearanceConfig(e = null) {
743
+ getAppearanceConfig(n = null) {
752
744
  return {
753
745
  title: "样式",
754
746
  description: "Appearance",
@@ -768,90 +760,212 @@ class Be {
768
760
  }
769
761
  };
770
762
  }
763
+ /**
764
+ *
765
+ * @param propertyId
766
+ * @param componentInstance
767
+ * @returns
768
+ */
769
+ updateElementByParentContainer(n, t) {
770
+ const r = t && t.parent && t.parent.schema;
771
+ if (!r)
772
+ return;
773
+ const i = r.contents.findIndex((u) => u.id === n), s = z(r.contents[i]);
774
+ r.contents.splice(i, 1), r.contents.splice(i, 0, s);
775
+ }
771
776
  }
772
- const E = class E {
777
+ const D = class D {
773
778
  /**
774
779
  * 根据绑定字段类型获取可用的输入类控件
775
780
  */
776
- static getEditorTypesByMDataType(e) {
777
- const n = E.fieldControlTypeMapping[e];
778
- return n || [{ key: "", value: "" }];
781
+ static getEditorTypesByMDataType(n) {
782
+ const t = D.fieldControlTypeMapping[n];
783
+ return t || [{ key: "", value: "" }];
779
784
  }
780
785
  /**
781
786
  * 获取所有输入类控件
782
787
  */
783
788
  static getAllInputTypes() {
784
- const e = [];
785
- for (let n in E.fieldControlTypeMapping)
786
- E.fieldControlTypeMapping[n].forEach((r) => {
787
- e.find((l) => l.key === r.key && l.value === r.value) || e.push({ key: r.key, value: r.value });
789
+ const n = [];
790
+ for (let t in D.fieldControlTypeMapping)
791
+ D.fieldControlTypeMapping[t].forEach((r) => {
792
+ n.find((i) => i.key === r.key && i.value === r.value) || n.push({ key: r.key, value: r.value });
788
793
  });
789
- return e;
794
+ return n;
790
795
  }
791
796
  };
792
797
  /**
793
798
  * <字段类型,可配置的控件类型列表>的映射
794
799
  */
795
- C(E, "fieldControlTypeMapping", {
800
+ v(D, "fieldControlTypeMapping", {
796
801
  String: [
797
- { key: m["input-group"].type, value: m["input-group"].name },
798
- { key: m.lookup.type, value: m.lookup.name },
799
- { key: m["date-picker"].type, value: m["date-picker"].name },
800
- { key: m["check-box"].type, value: m["check-box"].name },
801
- { key: m["radio-group"].type, value: m["radio-group"].name },
802
- { key: m["combo-list"].type, value: m["combo-list"].name },
803
- { key: m.textarea.type, value: m.textarea.name }
802
+ { key: y["input-group"].type, value: y["input-group"].name },
803
+ { key: y.lookup.type, value: y.lookup.name },
804
+ { key: y["date-picker"].type, value: y["date-picker"].name },
805
+ { key: y["check-box"].type, value: y["check-box"].name },
806
+ { key: y["check-group"].type, value: y["check-group"].name },
807
+ { key: y["radio-group"].type, value: y["radio-group"].name },
808
+ { key: y["combo-list"].type, value: y["combo-list"].name },
809
+ { key: y.textarea.type, value: y.textarea.name }
804
810
  ],
805
811
  Text: [
806
- { key: m.textarea.type, value: m.textarea.name },
807
- { key: m.lookup.type, value: m.lookup.name }
812
+ { key: y.textarea.type, value: y.textarea.name },
813
+ { key: y.lookup.type, value: y.lookup.name }
808
814
  ],
809
815
  Decimal: [
810
- { key: m["number-spinner"].type, value: m["number-spinner"].name }
816
+ { key: y["number-spinner"].type, value: y["number-spinner"].name }
811
817
  ],
812
818
  Integer: [
813
- { key: m["number-spinner"].type, value: m["number-spinner"].name }
819
+ { key: y["number-spinner"].type, value: y["number-spinner"].name }
814
820
  ],
815
821
  Number: [
816
- { key: m["number-spinner"].type, value: m["number-spinner"].name }
822
+ { key: y["number-spinner"].type, value: y["number-spinner"].name }
817
823
  ],
818
824
  BigNumber: [
819
- { key: m["number-spinner"].type, value: m["number-spinner"].name }
825
+ { key: y["number-spinner"].type, value: y["number-spinner"].name }
820
826
  ],
821
827
  Date: [
822
- { key: m["date-picker"].type, value: m["date-picker"].name }
828
+ { key: y["date-picker"].type, value: y["date-picker"].name }
823
829
  ],
824
830
  DateTime: [
825
- { key: m["date-picker"].type, value: m["date-picker"].name }
831
+ { key: y["date-picker"].type, value: y["date-picker"].name }
826
832
  ],
827
833
  Boolean: [
828
- { key: m.switch.type, value: m.switch.name },
829
- { key: m["check-box"].type, value: m["check-box"].name }
834
+ { key: y.switch.type, value: y.switch.name },
835
+ { key: y["check-box"].type, value: y["check-box"].name }
830
836
  ],
831
837
  Enum: [
832
- { key: m["combo-list"].type, value: m["combo-list"].name },
833
- { key: m["radio-group"].type, value: m["radio-group"].name }
838
+ { key: y["combo-list"].type, value: y["combo-list"].name },
839
+ { key: y["radio-group"].type, value: y["radio-group"].name }
834
840
  ],
835
841
  Object: [
836
- { key: m.lookup.type, value: m.lookup.name },
837
- { key: m["combo-list"].type, value: m["combo-list"].name },
838
- { key: m["radio-group"].type, value: m["radio-group"].name }
842
+ { key: y.lookup.type, value: y.lookup.name },
843
+ { key: y["combo-list"].type, value: y["combo-list"].name },
844
+ { key: y["radio-group"].type, value: y["radio-group"].name }
839
845
  ]
840
846
  });
841
- let j = E;
842
- const Me = k(0);
843
- class Te extends Be {
844
- constructor(e, n) {
845
- super(e, n);
846
- }
847
- getPropertyConfig(e, n) {
848
- return this.propertyConfig.categories.basic = this.getBasicProperties(e, n), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
849
- }
850
- getBasicProperties(e, n) {
851
- var u;
852
- var r = this;
853
- this.setDesignViewModelField(e);
854
- const l = this.formSchemaUtils.getFormMetadataBasicInfo(), d = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
847
+ let I = D;
848
+ const Ne = B(0);
849
+ class Be {
850
+ constructor() {
851
+ /** 控件标题 */
852
+ v(this, "label", "");
853
+ /** 控件id */
854
+ v(this, "id", "");
855
+ /** 每个控件占用的栅格数 */
856
+ v(this, "columnInSM", 12);
857
+ v(this, "columnInMD", 6);
858
+ v(this, "columnInLG", 3);
859
+ v(this, "columnInEL", 2);
860
+ /** 每个控件占用的列数 */
861
+ v(this, "displayWidthInSM", 1);
862
+ v(this, "displayWidthInMD", 1);
863
+ v(this, "displayWidthInLG", 1);
864
+ v(this, "displayWidthInEL", 1);
865
+ /** 编辑器内部默认显示的屏幕大小-----可以去掉 */
866
+ v(this, "displayColumnCountAtBreakPoint", "md");
867
+ /** 控件所在行,传0即可-----编辑器内部使用 */
868
+ v(this, "tagRow", 0);
869
+ /** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
870
+ v(this, "showTopBorder", 0);
871
+ /** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
872
+ v(this, "group", 1);
873
+ /** 控件是否符合标准的class配置(设计器用的) */
874
+ v(this, "isSupportedClass", !0);
875
+ /** 控件所在分组id(设计器用的) */
876
+ v(this, "fieldSetId", "");
877
+ }
878
+ }
879
+ function Fe(e) {
880
+ let n, t;
881
+ const r = /* @__PURE__ */ new Map();
882
+ let i = [];
883
+ function s(l, o) {
884
+ const f = l.split(" ").filter((S) => S.startsWith("col-"));
885
+ if (f.length === 0) {
886
+ o.isSupportedClass = !1;
887
+ return;
888
+ }
889
+ let m = f.find((S) => /^col-([1-9]|10|11|12)$/.test(S)), g = f.find((S) => /^col-md-([1-9]|10|11|12)$/.test(S)), b = f.find((S) => /^col-xl-([1-9]|10|11|12)$/.test(S)), w = f.find((S) => /^col-el-([1-9]|10|11|12)$/.test(S));
890
+ m = m || "col-12", o.columnInSM = parseInt(m.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), g = g || "col-md-" + o.columnInSM, o.columnInMD = parseInt(g.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), b = b || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(b.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), w = w || "col-el-" + o.columnInLG, o.columnInEL = parseInt(w.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
891
+ }
892
+ function u(l, o, c, f = !1) {
893
+ let m = !1;
894
+ l.contents.forEach((g) => {
895
+ if (g.type === "fieldset") {
896
+ c += 1, u(g, o, c, !0), m = !0;
897
+ return;
898
+ }
899
+ m && (c += 1, m = !1);
900
+ const b = g.appearance && g.appearance.class, w = new Be();
901
+ b ? s(b, w) : w.isSupportedClass = !1, w.label = g.label || g.id, w.id = g.id, w.group = c, f && (w.fieldSetId = l.id), t === g.id && (n = c), r.set(g.id, g), o.push(w);
902
+ });
903
+ }
904
+ function p(l) {
905
+ const o = e.getComponentById(l);
906
+ if (!o || !o.componentType || !o.componentType.startsWith("form"))
907
+ return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
908
+ const c = e.selectNode(o, (f) => f.type === $["response-form"].type);
909
+ return !c || !c.contents || c.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: c };
910
+ }
911
+ function d(l, o) {
912
+ o = o || l.id;
913
+ const { result: c, message: f, formNode: m } = p(o);
914
+ if (!c)
915
+ return { result: c, message: f };
916
+ t = l.id, i = [], r.clear();
917
+ const g = m.contents[0].type === $.fieldset.type ? 0 : 1;
918
+ u(m, i, g);
919
+ const b = i.find((S) => !S.isSupportedClass);
920
+ return {
921
+ defaultState: {
922
+ defaultGroupNumber: n || 1,
923
+ model: b ? "customize" : "standard"
924
+ },
925
+ importData: i
926
+ };
927
+ }
928
+ function a(l, o) {
929
+ o = o;
930
+ const { result: c, formNode: f } = p(o);
931
+ if (!c)
932
+ return "";
933
+ const m = [];
934
+ return l.forEach((g) => {
935
+ var S;
936
+ const b = r.get(g.id), w = b.appearance && b.appearance.class;
937
+ if (w) {
938
+ const C = w.split(" ").filter((R) => !R.startsWith("col-")), h = "col-" + g.columnInSM, k = "col-md-" + g.columnInMD, M = "col-xl-" + g.columnInLG, V = "col-el-" + g.columnInEL, A = [h, k, M, V].concat(C);
939
+ b.appearance.class = A.join(" ");
940
+ }
941
+ if (g.fieldSetId) {
942
+ const T = f.contents.find((h) => h.id === g.fieldSetId), C = m.find((h) => h.id === g.fieldSetId);
943
+ C ? (S = C.contents) == null || S.push(b) : (m.push(T), T.contents = [b]);
944
+ } else
945
+ m.push(b);
946
+ }), f.contents = m, f.id;
947
+ }
948
+ return {
949
+ checkCanFindFormNode: p,
950
+ checkCanOpenLayoutEditor: d,
951
+ changeFormControlsByResponseLayoutConfig: a,
952
+ getResonseFormLayoutConfig: u
953
+ };
954
+ }
955
+ class Te extends Me {
956
+ constructor(t, r) {
957
+ super(t, r);
958
+ v(this, "responseLayoutEditorFunction");
959
+ this.responseLayoutEditorFunction = Fe(this.formSchemaUtils);
960
+ }
961
+ getPropertyConfig(t, r) {
962
+ return this.propertyConfig.categories.basic = this.getBasicProperties(t, r), this.propertyConfig.categories.appearance = this.getAppearanceProperties(t, r), this.propertyConfig.categories.editor = this.getEditorProperties(t), this.propertyConfig;
963
+ }
964
+ getBasicProperties(t, r) {
965
+ var p;
966
+ var i = this;
967
+ this.setDesignViewModelField(t);
968
+ const s = this.formSchemaUtils.getFormMetadataBasicInfo(), u = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
855
969
  return {
856
970
  description: "Basic Information",
857
971
  title: "基本信息",
@@ -873,7 +987,7 @@ class Te extends Be {
873
987
  textField: "value",
874
988
  valueField: "key",
875
989
  editable: !1,
876
- data: r.designViewModelField ? j.getEditorTypesByMDataType((u = r.designViewModelField.type) == null ? void 0 : u.name) : j.getAllInputTypes()
990
+ data: i.designViewModelField ? I.getEditorTypesByMDataType((p = i.designViewModelField.type) == null ? void 0 : p.name) : I.getAllInputTypes()
877
991
  }
878
992
  },
879
993
  label: {
@@ -889,8 +1003,8 @@ class Te extends Be {
889
1003
  type: "field-selector",
890
1004
  bindingType: { enable: !1 },
891
1005
  editorParams: {
892
- propertyData: e,
893
- formBasicInfo: l
1006
+ propertyData: t,
1007
+ formBasicInfo: s
894
1008
  },
895
1009
  columns: [
896
1010
  { field: "name", title: "字段名称" },
@@ -898,26 +1012,27 @@ class Te extends Be {
898
1012
  { field: "fieldType", title: "字段类型" }
899
1013
  ],
900
1014
  textField: "bindingField",
901
- data: d
1015
+ data: u
902
1016
  }
903
1017
  }
904
1018
  },
905
- setPropertyRelates(c, s) {
906
- if (c)
907
- switch (c && c.propertyID) {
1019
+ setPropertyRelates(d, a) {
1020
+ if (d)
1021
+ switch (d && d.propertyID) {
908
1022
  case "type": {
909
- r.changeControlType(e, c, n);
1023
+ i.changeControlType(t, d, r);
910
1024
  break;
911
1025
  }
912
1026
  case "label": {
913
- c.needRefreshControlTree = !0;
1027
+ d.needRefreshControlTree = !0;
914
1028
  break;
915
1029
  }
916
1030
  }
917
1031
  }
918
1032
  };
919
1033
  }
920
- getAppearanceProperties(e) {
1034
+ getAppearanceProperties(t, r) {
1035
+ var i = this;
921
1036
  return {
922
1037
  title: "样式",
923
1038
  description: "Appearance",
@@ -938,61 +1053,74 @@ class Te extends Be {
938
1053
  description: "响应式列宽",
939
1054
  title: "响应式列宽",
940
1055
  type: "boolean",
941
- visible: !1,
1056
+ visible: !0,
1057
+ // 这个属性,标记当属性变更得时候触发重新更新属性
1058
+ refreshPanelAfterChanged: !0,
942
1059
  editor: {
943
- type: "response-layout-editor-setting"
944
- },
945
- $converter: "/converter/response-form-layout.converter"
1060
+ type: "response-layout-editor-setting",
1061
+ initialState: i.responseLayoutEditorFunction.checkCanOpenLayoutEditor(t, i.componentId)
1062
+ }
946
1063
  }
1064
+ },
1065
+ setPropertyRelates(s, u) {
1066
+ if (s)
1067
+ switch (s && s.propertyID) {
1068
+ case "responseLayout":
1069
+ i.responseLayoutEditorFunction.changeFormControlsByResponseLayoutConfig(s.propertyValue, i.componentId || t.id), i.updateUnifiedLayoutAfterResponseLayoutChanged(i.componentId), i.updateElementByParentContainer(t.id, r), delete t.responseLayout;
1070
+ break;
1071
+ case "class":
1072
+ i.updateUnifiedLayoutAfterControlChanged(s.propertyValue, t.id, this.componentId), i.updateElementByParentContainer(t.id, r);
1073
+ break;
1074
+ }
947
1075
  }
948
1076
  };
949
1077
  }
950
- getEditorProperties(e) {
951
- return this.getComponentConfig(e);
1078
+ getEditorProperties(t) {
1079
+ return this.getComponentConfig(t);
952
1080
  }
953
1081
  /**
954
1082
  * 卡片控件:切换控件类型后事件
955
1083
  * @param propertyData 控件DOM属性
956
1084
  * @param newControlType 新控件类型
957
1085
  */
958
- changeControlType(e, n, r) {
959
- var o, i, a, p;
960
- const l = n.propertyValue, d = r && r.parent && r.parent.schema;
961
- if (!d)
1086
+ changeControlType(t, r, i) {
1087
+ var l, o, c, f;
1088
+ const s = r.propertyValue, u = i && i.parent && i.parent.schema;
1089
+ if (!u)
962
1090
  return;
963
- const u = d.contents.findIndex((f) => f.id === e.id), c = d.contents[u];
964
- let s;
1091
+ const p = u.contents.findIndex((m) => m.id === t.id), d = u.contents[p];
1092
+ let a;
965
1093
  this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
966
1094
  editor: {
967
- $type: l
1095
+ $type: s
968
1096
  },
969
1097
  name: this.designViewModelField.name,
970
1098
  require: this.designViewModelField.require,
971
1099
  readonly: this.designViewModelField.readonly
972
- }, !1), s = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, l)), s || (s = Z("form-group") || {}, s.editor = Z(l) || {}, delete s.editor.id, delete s.editor.binding, delete s.editor.appearance), Object.assign(s, {
973
- id: c.id,
974
- appearance: c.appearance,
975
- size: c.size,
976
- label: c.label,
977
- binding: c.binding,
978
- visible: c.visible
979
- }), Object.assign(s.editor, {
980
- isTextArea: s.isTextArea && c.isTextArea,
981
- placeholder: (o = c.editor) == null ? void 0 : o.placeholder,
982
- holdPlace: (i = c.editor) == null ? void 0 : i.holdPlace,
983
- readonly: (a = c.editor) == null ? void 0 : a.readonly,
984
- require: (p = c.editor) == null ? void 0 : p.require
985
- }), d.contents.splice(u, 1), d.contents.splice(u, 0, s), r.schema = Object.assign(c, s), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
986
- (f) => f.classList.remove("dgComponentSelected")
987
- ), Me.value++;
988
- }
989
- getComponentConfig(e, n = {}, r = {}) {
990
- const l = Object.assign({
1100
+ }, !1), a = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, s)), a || (a = this.controlCreatorUtils.createFormGroupWithoutField(s)), Object.assign(a, {
1101
+ id: d.id,
1102
+ appearance: d.appearance,
1103
+ size: d.size,
1104
+ label: d.label,
1105
+ binding: d.binding,
1106
+ visible: d.visible
1107
+ }), Object.assign(a.editor, {
1108
+ isTextArea: a.isTextArea && d.isTextArea,
1109
+ placeholder: (l = d.editor) == null ? void 0 : l.placeholder,
1110
+ holdPlace: (o = d.editor) == null ? void 0 : o.holdPlace,
1111
+ readonly: (c = d.editor) == null ? void 0 : c.readonly,
1112
+ require: (f = d.editor) == null ? void 0 : f.require
1113
+ }), u.contents.splice(p, 1), u.contents.splice(p, 0, a), i.schema = Object.assign(d, a), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
1114
+ (m) => m.classList.remove("dgComponentSelected")
1115
+ ), Ne.value++;
1116
+ }
1117
+ getComponentConfig(t, r = {}, i = {}) {
1118
+ const s = Object.assign({
991
1119
  description: "编辑器",
992
1120
  title: "编辑器",
993
1121
  type: "input-group",
994
1122
  $converter: "/converter/property-editor.converter"
995
- }, n), d = Object.assign({
1123
+ }, r), u = Object.assign({
996
1124
  readonly: {
997
1125
  description: "",
998
1126
  title: "只读",
@@ -1013,16 +1141,64 @@ class Te extends Be {
1013
1141
  title: "提示文本",
1014
1142
  type: "string"
1015
1143
  }
1016
- }, r);
1017
- return { ...l, properties: { ...d } };
1144
+ }, i);
1145
+ return { ...s, properties: { ...u } };
1146
+ }
1147
+ /**
1148
+ * 修改某一输入控件的样式后更新Form的统一布局配置
1149
+ * @param controlClass 控件样式
1150
+ * @param controlId 控件Id
1151
+ * @param componentId 控件所在组件id
1152
+ */
1153
+ updateUnifiedLayoutAfterControlChanged(t, r, i) {
1154
+ const s = t.split(" ");
1155
+ let u = s.find((o) => /^col-([1-9]|10|11|12)$/.test(o)), p = s.find((o) => /^col-md-([1-9]|10|11|12)$/.test(o)), d = s.find((o) => /^col-xl-([1-9]|10|11|12)$/.test(o)), a = s.find((o) => /^col-el-([1-9]|10|11|12)$/.test(o));
1156
+ u = u || "col-12", p = p || "col-md-" + u.replace("col-", ""), d = d || "col-xl-" + p.replace("col-md-", ""), a = a || "col-el-" + d.replace("col-xl-", "");
1157
+ const l = {
1158
+ id: r,
1159
+ columnInSM: parseInt(u.replace("col-", ""), 10),
1160
+ columnInMD: parseInt(p.replace("col-md-", ""), 10),
1161
+ columnInLG: parseInt(d.replace("col-xl-", ""), 10),
1162
+ columnInEL: parseInt(a.replace("col-el-", ""), 10)
1163
+ };
1164
+ this.updateUnifiedLayoutAfterResponseLayoutChanged(i, l);
1165
+ }
1166
+ /**
1167
+ * 修改控件布局配置后更新Form统一布局配置
1168
+ * @param componentId 组件Id
1169
+ * @param controlLayoutConfig 某单独变动的控件配置项,FormResponseLayoutContext类型
1170
+ */
1171
+ updateUnifiedLayoutAfterResponseLayoutChanged(t, r) {
1172
+ const { formNode: i } = this.responseLayoutEditorFunction.checkCanFindFormNode(t);
1173
+ if (!i || !i.unifiedLayout)
1174
+ return;
1175
+ const s = [];
1176
+ if (this.responseLayoutEditorFunction.getResonseFormLayoutConfig(i, s, 1), r) {
1177
+ const m = s.find((g) => g.id === r.id);
1178
+ Object.assign(m || {}, r);
1179
+ }
1180
+ const u = s.map((m) => m.columnInSM), p = s.map((m) => m.columnInMD), d = s.map((m) => m.columnInLG), a = s.map((m) => m.columnInEL), l = this.checkIsUniqueColumn(u) ? u[0] : null, o = this.checkIsUniqueColumn(p) ? p[0] : null, c = this.checkIsUniqueColumn(d) ? d[0] : null, f = this.checkIsUniqueColumn(a) ? a[0] : null;
1181
+ Object.assign(i.unifiedLayout, {
1182
+ uniqueColClassInSM: l,
1183
+ uniqueColClassInMD: o,
1184
+ uniqueColClassInLG: c,
1185
+ uniqueColClassInEL: f
1186
+ });
1187
+ }
1188
+ /**
1189
+ * 校验宽度样式值是否一致
1190
+ */
1191
+ checkIsUniqueColumn(t) {
1192
+ const r = new Set(t);
1193
+ return Array.from(r).length === 1;
1018
1194
  }
1019
1195
  }
1020
1196
  class Ve extends Te {
1021
- constructor(e, n) {
1022
- super(e, n);
1197
+ constructor(n, t) {
1198
+ super(n, t);
1023
1199
  }
1024
- getEditorProperties(e) {
1025
- return this.getComponentConfig(e, { type: "number-spinner" }, {
1200
+ getEditorProperties(n) {
1201
+ return this.getComponentConfig(n, { type: "number-spinner" }, {
1026
1202
  textAlign: {
1027
1203
  description: "",
1028
1204
  title: "对齐方式",
@@ -1050,106 +1226,106 @@ class Ve extends Te {
1050
1226
  });
1051
1227
  }
1052
1228
  }
1053
- function Fe(t, e) {
1054
- t.schema;
1055
- const n = k(!0), r = k(!0);
1056
- function l(a) {
1229
+ function Ee(e, n) {
1230
+ e.schema;
1231
+ const t = B(!0), r = B(!0);
1232
+ function i(o) {
1057
1233
  return !1;
1058
1234
  }
1059
- function d() {
1235
+ function s() {
1060
1236
  return !1;
1061
1237
  }
1062
1238
  function u() {
1063
1239
  return !1;
1064
1240
  }
1065
- function c() {
1241
+ function p() {
1066
1242
  return !0;
1067
1243
  }
1068
- function s(a) {
1244
+ function d(o) {
1069
1245
  }
1070
- function o() {
1246
+ function a() {
1071
1247
  }
1072
- function i(a) {
1248
+ function l(o) {
1073
1249
  return null;
1074
1250
  }
1075
1251
  return {
1076
- canAccepts: l,
1077
- checkCanDeleteComponent: d,
1252
+ canAccepts: i,
1253
+ checkCanDeleteComponent: s,
1078
1254
  checkCanMoveComponent: u,
1079
- hideNestedPaddingInDesginerView: c,
1080
- onAcceptMovedChildElement: s,
1081
- resolveComponentContext: o,
1082
- triggerBelongedComponentToMoveWhenMoved: n,
1255
+ hideNestedPaddingInDesginerView: p,
1256
+ onAcceptMovedChildElement: d,
1257
+ resolveComponentContext: a,
1258
+ triggerBelongedComponentToMoveWhenMoved: t,
1083
1259
  triggerBelongedComponentToDeleteWhenDeleted: r,
1084
- getPropsConfig: i
1260
+ getPropsConfig: l
1085
1261
  };
1086
1262
  }
1087
- function xe(t, e) {
1263
+ function De(e, n) {
1088
1264
  const {
1089
- canAccepts: n,
1265
+ canAccepts: t,
1090
1266
  checkCanDeleteComponent: r,
1091
- checkCanMoveComponent: l,
1092
- hideNestedPaddingInDesginerView: d,
1267
+ checkCanMoveComponent: i,
1268
+ hideNestedPaddingInDesginerView: s,
1093
1269
  onAcceptMovedChildElement: u,
1094
- resolveComponentContext: c,
1095
- triggerBelongedComponentToMoveWhenMoved: s,
1096
- triggerBelongedComponentToDeleteWhenDeleted: o
1097
- } = Fe(t), i = t.schema;
1098
- function a(p, f) {
1099
- return new Ve(p, e).getPropertyConfig(i, f);
1270
+ resolveComponentContext: p,
1271
+ triggerBelongedComponentToMoveWhenMoved: d,
1272
+ triggerBelongedComponentToDeleteWhenDeleted: a
1273
+ } = Ee(e), l = e.schema;
1274
+ function o(c, f) {
1275
+ return new Ve(c, n).getPropertyConfig(l, f);
1100
1276
  }
1101
1277
  return {
1102
- canAccepts: n,
1278
+ canAccepts: t,
1103
1279
  checkCanDeleteComponent: r,
1104
- checkCanMoveComponent: l,
1105
- hideNestedPaddingInDesginerView: d,
1280
+ checkCanMoveComponent: i,
1281
+ hideNestedPaddingInDesginerView: s,
1106
1282
  onAcceptMovedChildElement: u,
1107
- resolveComponentContext: c,
1108
- triggerBelongedComponentToMoveWhenMoved: s,
1109
- triggerBelongedComponentToDeleteWhenDeleted: o,
1110
- getPropsConfig: a
1283
+ resolveComponentContext: p,
1284
+ triggerBelongedComponentToMoveWhenMoved: d,
1285
+ triggerBelongedComponentToDeleteWhenDeleted: a,
1286
+ getPropsConfig: o
1111
1287
  };
1112
1288
  }
1113
- const De = /* @__PURE__ */ J({
1289
+ const Pe = /* @__PURE__ */ q({
1114
1290
  name: "FNumberSpinnerDesign",
1115
- props: q,
1291
+ props: U,
1116
1292
  emits: ["update:modelValue", "valueChange", "change", "blur", "focus", "click", "input"],
1117
- setup(t, e) {
1118
- const n = R(t, e), r = H(t, e, n), l = _(t, e, r, n), d = I(t, e, l), u = k(), c = z("designer-host-service"), s = z("design-item-context"), o = xe(s, c), i = Ne(u, s, o);
1119
- L(() => {
1120
- u.value.componentInstance = i, t.readonly = !0;
1121
- }), e.expose(i.value);
1122
- const a = k();
1123
- return () => V("div", {
1293
+ setup(e, n) {
1294
+ const t = _(e, n), r = H(e, n, t), i = Y(e, n, r, t), s = K(e, n, i), u = B(), p = W("designer-host-service"), d = W("design-item-context"), a = De(d, p), l = ke(u, d, a);
1295
+ x(() => {
1296
+ u.value.componentInstance = l, e.readonly = !0;
1297
+ }), n.expose(l.value);
1298
+ const o = B();
1299
+ return () => E("div", {
1124
1300
  ref: u,
1125
1301
  class: "input-group f-state-hover flex-row f-cmp-number-spinner test"
1126
- }, [V("input", {
1127
- ref: a,
1302
+ }, [E("input", {
1303
+ ref: o,
1128
1304
  class: "form-control",
1129
1305
  readonly: !0,
1130
- placeholder: t.placeholder
1131
- }, null), d()]);
1132
- }
1133
- }), Pe = (t) => {
1134
- const e = t;
1135
- return e.install = function(n) {
1136
- n.component(e.name, t);
1137
- }, t;
1306
+ placeholder: e.placeholder
1307
+ }, null), s()]);
1308
+ }
1309
+ }), Ie = (e) => {
1310
+ const n = e;
1311
+ return n.install = function(t) {
1312
+ t.component(n.name, e);
1313
+ }, e;
1138
1314
  };
1139
- A.register = (t, e, n, r) => {
1140
- t["number-spinner"] = A, e["number-spinner"] = Y;
1315
+ P.register = (e, n, t, r) => {
1316
+ e["number-spinner"] = P, n["number-spinner"] = Q;
1141
1317
  };
1142
- A.registerDesigner = (t, e, n) => {
1143
- t["number-spinner"] = De, e["number-spinner"] = Y;
1318
+ P.registerDesigner = (e, n, t) => {
1319
+ e["number-spinner"] = Pe, n["number-spinner"] = Q;
1144
1320
  };
1145
- const $e = Pe(A);
1321
+ const je = Ie(P);
1146
1322
  export {
1147
- A as FNumberSpinner,
1148
- $e as default,
1149
- q as numberSpinnerProps,
1150
- Y as propsResolver,
1323
+ P as FNumberSpinner,
1324
+ je as default,
1325
+ U as numberSpinnerProps,
1326
+ Q as propsResolver,
1151
1327
  H as useFormat,
1152
- R as useNumber,
1153
- _ as useSpinner,
1154
- Se as useTextBox
1328
+ _ as useNumber,
1329
+ Y as useSpinner,
1330
+ we as useTextBox
1155
1331
  };