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