@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,111 +1,154 @@
1
- import { ref as N, watch as B, createVNode as p, computed as w, defineComponent as R, watchEffect as pe, Fragment as _, createTextVNode as H, nextTick as ue, inject as fe, onMounted as de } from "vue";
2
- import { cloneDeep as ge } from "lodash-es";
3
- import { withInstall as be } from "../common/index.esm.js";
4
- const K = {}, ee = {};
5
- function Y(n) {
6
- const { properties: e, title: t, ignore: i } = n, a = i && Array.isArray(i), d = Object.keys(e).reduce((o, s) => ((!a || !i.find((r) => r == s)) && (o[s] = e[s].type === "object" && e[s].properties ? Y(e[s]) : ge(e[s].default)), o), {});
7
- return (!a || !i.find((o) => o == "id")) && (d.id = `${t}-${Date.now()}`), d;
1
+ var de = Object.defineProperty;
2
+ var fe = (a, e, t) => e in a ? de(a, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[e] = t;
3
+ var P = (a, e, t) => fe(a, typeof e != "symbol" ? e + "" : e, t);
4
+ import { ref as S, watch as N, createVNode as f, computed as w, defineComponent as R, watchEffect as me, Fragment as $, createTextVNode as G, nextTick as ve, inject as ge, onMounted as he } from "vue";
5
+ import { isPlainObject as Z, cloneDeep as K } from "lodash-es";
6
+ import { DgControl as x } from "../designer-canvas/index.esm.js";
7
+ import { withInstall as ye } from "../common/index.esm.js";
8
+ const H = {}, ee = {};
9
+ function X(a) {
10
+ const { properties: e, title: t, ignore: r } = a, l = r && Array.isArray(r), c = Object.keys(e).reduce((n, p) => ((!l || !r.find((u) => u == p)) && (n[p] = e[p].type === "object" && e[p].properties ? X(e[p]) : K(e[p].default)), n), {});
11
+ return t && (!l || !r.find((n) => n == "id")) && (c.id = `${t}-${Date.now()}`), c;
8
12
  }
9
- function q(n, e = {}, t) {
10
- const i = K[n];
11
- if (i) {
12
- let a = Y(i);
13
- const d = ee[n];
14
- return a = d ? d({ getSchemaByType: q }, a, e, t) : a, a;
13
+ function _(a, e = {}, t) {
14
+ const r = H[a];
15
+ if (r) {
16
+ let l = X(r);
17
+ const c = ee[a];
18
+ return l = c ? c({ getSchemaByType: _ }, l, e, t) : l, l;
15
19
  }
16
20
  return null;
17
21
  }
18
- function ye(n, e) {
19
- const t = Y(e);
20
- return Object.keys(n).reduce((i, a) => (i[a] && typeof i[a] == "object" ? Object.assign(i[a], n[a]) : i[a] = n[a], i), t), t;
22
+ function Ce(a, e) {
23
+ const t = X(e);
24
+ return Object.keys(a).reduce((r, l) => (r[l] && Z(r[l]) && Z(a[l]) ? Object.assign(r[l], a[l]) : r[l] = a[l], r), t), t;
21
25
  }
22
- function he(n, e) {
23
- return Object.keys(n).filter((i) => n[i] != null).reduce((i, a) => {
24
- if (e.has(a)) {
25
- const d = e.get(a);
26
- if (typeof d == "string")
27
- i[d] = n[a];
26
+ function be(a, e) {
27
+ return Object.keys(a).filter((r) => a[r] != null).reduce((r, l) => {
28
+ if (e.has(l)) {
29
+ const c = e.get(l);
30
+ if (typeof c == "string")
31
+ r[c] = a[l];
28
32
  else {
29
- const o = d(a, n[a], n);
30
- Object.assign(i, o);
33
+ const n = c(l, a[l], a);
34
+ Object.assign(r, n);
31
35
  }
32
36
  } else
33
- i[a] = n[a];
34
- return i;
37
+ r[l] = a[l];
38
+ return r;
35
39
  }, {});
36
40
  }
37
- function me(n, e, t = /* @__PURE__ */ new Map()) {
38
- const i = ye(n, e);
39
- return he(i, t);
41
+ function Me(a, e, t = /* @__PURE__ */ new Map()) {
42
+ const r = Ce(a, e);
43
+ return be(r, t);
40
44
  }
41
- function ve(n = {}) {
42
- function e(f, g, v, m) {
43
- if (typeof v == "number")
44
- return m[f].length === v;
45
- if (typeof v == "object") {
46
- const C = Object.keys(v)[0], l = v[C];
47
- if (C === "not")
48
- return Number(m[f].length) !== Number(l);
49
- if (C === "moreThan")
50
- return Number(m[f].length) >= Number(l);
51
- if (C === "lessThan")
52
- return Number(m[f].length) <= Number(l);
45
+ function we(a = {}) {
46
+ function e(s, i, o, d) {
47
+ if (typeof o == "number")
48
+ return d[s].length === o;
49
+ if (typeof o == "object") {
50
+ const m = Object.keys(o)[0], C = o[m];
51
+ if (m === "not")
52
+ return Number(d[s].length) !== Number(C);
53
+ if (m === "moreThan")
54
+ return Number(d[s].length) >= Number(C);
55
+ if (m === "lessThan")
56
+ return Number(d[s].length) <= Number(C);
53
57
  }
54
58
  return !1;
55
59
  }
56
- function t(f, g, v, m) {
57
- return m[f] && m[f].propertyValue && String(m[f].propertyValue.value) === String(v);
60
+ function t(s, i, o, d) {
61
+ return d[s] && d[s].propertyValue && String(d[s].propertyValue.value) === String(o);
58
62
  }
59
- const i = /* @__PURE__ */ new Map([
63
+ const r = /* @__PURE__ */ new Map([
60
64
  ["length", e],
61
65
  ["getProperty", t]
62
66
  ]);
63
- Object.keys(n).reduce((f, g) => (f.set(g, n[g]), f), i);
64
- function a(f, g) {
65
- const v = f;
66
- return typeof g == "number" ? [{ target: v, operator: "length", param: null, value: Number(g) }] : typeof g == "boolean" ? [{ target: v, operator: "getProperty", param: f, value: !!g }] : typeof g == "object" ? Object.keys(g).map((m) => {
67
- if (m === "length")
68
- return { target: v, operator: "length", param: null, value: g[m] };
69
- const C = m, l = g[m];
70
- return { target: v, operator: "getProperty", param: C, value: l };
67
+ Object.keys(a).reduce((s, i) => (s.set(i, a[i]), s), r);
68
+ function l(s, i) {
69
+ const o = s;
70
+ return typeof i == "number" ? [{ target: o, operator: "length", param: null, value: Number(i) }] : typeof i == "boolean" ? [{ target: o, operator: "getProperty", param: s, value: !!i }] : typeof i == "object" ? Object.keys(i).map((d) => {
71
+ if (d === "length")
72
+ return { target: o, operator: "length", param: null, value: i[d] };
73
+ const m = d, C = i[d];
74
+ return { target: o, operator: "getProperty", param: m, value: C };
71
75
  }) : [];
72
76
  }
73
- function d(f) {
74
- return Object.keys(f).reduce((v, m) => {
75
- const C = a(m, f[m]);
76
- return v.push(...C), v;
77
+ function c(s) {
78
+ return Object.keys(s).reduce((o, d) => {
79
+ const m = l(d, s[d]);
80
+ return o.push(...m), o;
77
81
  }, []);
78
82
  }
79
- function o(f, g) {
80
- if (i.has(f.operator)) {
81
- const v = i.get(f.operator);
82
- return v && v(f.target, f.param, f.value, g) || !1;
83
+ function n(s, i) {
84
+ if (r.has(s.operator)) {
85
+ const o = r.get(s.operator);
86
+ return o && o(s.target, s.param, s.value, i) || !1;
83
87
  }
84
88
  return !1;
85
89
  }
86
- function s(f, g) {
87
- return d(f).reduce((C, l) => C && o(l, g), !0);
90
+ function p(s, i) {
91
+ return c(s).reduce((m, C) => m && n(C, i), !0);
88
92
  }
89
- function r(f, g) {
90
- const v = Object.keys(f), m = v.includes("allOf"), C = v.includes("anyOf"), l = m || C, b = (l ? f[l ? m ? "allOf" : "anyOf" : "allOf"] : [f]).map((P) => s(P, g));
91
- return m ? !b.includes(!1) : b.includes(!0);
93
+ function u(s, i) {
94
+ const o = Object.keys(s), d = o.includes("allOf"), m = o.includes("anyOf"), C = d || m, b = (C ? s[C ? d ? "allOf" : "anyOf" : "allOf"] : [s]).map((M) => p(M, i));
95
+ return d ? !b.includes(!1) : b.includes(!0);
92
96
  }
93
- return { parseValueSchema: r };
97
+ return { parseValueSchema: u };
94
98
  }
95
- const je = {}, Pe = {};
96
- ve();
97
- function Ce(n, e, t = /* @__PURE__ */ new Map(), i = (o, s, r) => s, a = {}, d = (o) => o) {
98
- return K[e.title] = e, ee[e.title] = i, je[e.title] = a, Pe[e.title] = d, (o = {}) => {
99
- const s = me(o, e, t), r = Object.keys(n).reduce((f, g) => (f[g] = n[g].default, f), {});
100
- return Object.assign(r, s);
99
+ const F = {
100
+ button: { type: "button", name: "按钮", icon: "Button" },
101
+ "response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
102
+ "response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
103
+ "content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
104
+ "input-group": { type: "input-group", name: "文本", icon: "TextBox" },
105
+ textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
106
+ lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
107
+ "number-spinner": { type: "number-spinner", name: "数值", icon: "NumericBox" },
108
+ "date-picker": { type: "date-picker", name: "日期", icon: "DateBox" },
109
+ switch: { type: "switch", name: "开关", icon: "SwitchField" },
110
+ "radio-group": { type: "radio-group", name: "单选组", icon: "RadioGroup" },
111
+ "check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
112
+ "check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
113
+ "combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
114
+ "response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
115
+ "response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
116
+ "response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
117
+ "tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
118
+ "tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
119
+ "data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
120
+ "data-grid-column": { type: "data-grid-column", name: "表格列" },
121
+ module: { type: "Module", name: "模块", icon: "Module" },
122
+ component: { type: "component", name: "组件", icon: "Component" },
123
+ tabs: { type: "tabs", name: "标签页", icon: "Tab" },
124
+ "tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
125
+ "tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
126
+ "time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
127
+ section: { type: "section", name: "分组面板", icon: "Section" },
128
+ "section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
129
+ "section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
130
+ splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
131
+ "splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
132
+ "component-ref": { type: "component-ref", name: "组件引用节点" },
133
+ uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
134
+ "page-header": { type: "page-header", name: "页头", icon: "Header" },
135
+ "page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
136
+ "tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" },
137
+ fieldset: { type: "fieldset", name: "分组", icon: "fieldset" }
138
+ }, Le = {}, Ie = {};
139
+ we();
140
+ function Pe(a, e, t = /* @__PURE__ */ new Map(), r = (n, p, u) => p, l = {}, c = (n) => n) {
141
+ return H[e.title] = e, ee[e.title] = r, Le[e.title] = l, Ie[e.title] = c, (n = {}) => {
142
+ const p = Me(n, e, t), u = Object.keys(a).reduce((s, i) => (s[i] = a[i].default, s), {});
143
+ return Object.assign(u, p);
101
144
  };
102
145
  }
103
- function we(n, e) {
146
+ function Se(a, e) {
104
147
  return { customClass: e.class, customStyle: e.style };
105
148
  }
106
- const Ne = /* @__PURE__ */ new Map([
107
- ["appearance", we]
108
- ]), Oe = "https://json-schema.org/draft/2020-12/schema", Te = "https://farris-design.gitee.io/pagination.schema.json", ke = "pagination", Ae = "A Farris Component", Se = "object", Me = {
149
+ const ke = /* @__PURE__ */ new Map([
150
+ ["appearance", Se]
151
+ ]), Te = "https://json-schema.org/draft/2020-12/schema", De = "https://farris-design.gitee.io/pagination.schema.json", Ne = "pagination", Be = "A Farris Component", Fe = "object", Ee = {
109
152
  id: {
110
153
  description: "The unique identifier for a pagination",
111
154
  type: "string"
@@ -197,18 +240,18 @@ const Ne = /* @__PURE__ */ new Map([
197
240
  type: "sting",
198
241
  default: ""
199
242
  }
200
- }, Le = [
243
+ }, je = [
201
244
  "id",
202
245
  "type"
203
- ], De = {
204
- $schema: Oe,
205
- $id: Te,
206
- title: ke,
207
- description: Ae,
208
- type: Se,
209
- properties: Me,
210
- required: Le
211
- }, xe = "pagination", Ee = "A Farris Component", Be = "object", $e = {
246
+ ], Ae = {
247
+ $schema: Te,
248
+ $id: De,
249
+ title: Ne,
250
+ description: Be,
251
+ type: Fe,
252
+ properties: Ee,
253
+ required: je
254
+ }, Oe = "pagination", Ve = "A Farris Component", $e = "object", Ge = {
212
255
  basic: {
213
256
  description: "Basic Infomation",
214
257
  title: "基本信息",
@@ -290,16 +333,16 @@ const Ne = /* @__PURE__ */ new Map([
290
333
  }
291
334
  }
292
335
  }
293
- }, Fe = {
294
- title: xe,
295
- description: Ee,
296
- type: Be,
297
- categories: $e
336
+ }, Ue = {
337
+ title: Oe,
338
+ description: Ve,
339
+ type: $e,
340
+ categories: Ge
298
341
  };
299
- function Ve(n, e, t) {
342
+ function We(a, e, t) {
300
343
  return e;
301
344
  }
302
- const Z = {
345
+ const J = {
303
346
  /**
304
347
  * 当前页码
305
348
  */
@@ -332,1373 +375,991 @@ const Z = {
332
375
  * 自定义每页数量
333
376
  */
334
377
  pageList: { type: Array, default: [20, 50, 100] }
335
- }, te = Ce(Z, De, Ne, Ve, Fe);
336
- function ne(n, e) {
337
- const t = N("跳转至"), i = N(""), a = N(n.value);
338
- B(a, (r, f) => {
339
- r >= 1 && r <= e.value ? n.value = r : a.value = f;
340
- }), B(n, (r) => {
341
- a.value !== r && (a.value = r);
378
+ }, te = Pe(J, Ae, ke, We, Ue);
379
+ function ne(a, e, t, r) {
380
+ const l = S("跳转至"), c = S(""), n = S(a.value);
381
+ N(n, (i, o) => {
382
+ i >= 1 && i <= e.value ? a.value = i : n.value = o;
383
+ }), N(a, (i) => {
384
+ n.value !== i && (n.value = i);
342
385
  });
343
- function d(r) {
344
- a.value = r.target.valueAsNumber;
386
+ function p(i) {
387
+ n.value = i.target.valueAsNumber, r.emit("change", {
388
+ pageIndex: n.value,
389
+ pageSize: t.value
390
+ });
345
391
  }
346
- function o(r) {
347
- r.key === "Enter" && (a.value = r.target.valueAsNumber);
392
+ function u(i) {
393
+ i.key === "Enter" && (n.value = i.target.valueAsNumber, r.emit("change", {
394
+ pageIndex: n.value,
395
+ pageSize: t.value
396
+ }));
348
397
  }
349
398
  function s() {
350
- return p("li", {
399
+ return f("li", {
351
400
  class: "page-goto-input d-flex flex-row",
352
401
  style: "padding-left: 10px; white-space: nowrap;"
353
- }, [p("span", {
402
+ }, [f("span", {
354
403
  class: "pg-message-text"
355
- }, [t.value]), p("input", {
404
+ }, [l.value]), f("input", {
356
405
  type: "number",
357
406
  class: "form-control farris-gotopagenumber",
358
- value: a.value,
407
+ value: n.value,
359
408
  min: "1",
360
409
  max: e.value,
361
410
  style: "display: inline-block;margin-left:3px;",
362
- onBlur: (r) => d(r),
363
- onKeyup: (r) => o(r)
364
- }, null), i.value]);
411
+ onBlur: (i) => p(i),
412
+ onKeyup: (i) => u(i)
413
+ }, null), c.value]);
365
414
  }
366
415
  return {
367
416
  renderGotoButton: s
368
417
  };
369
418
  }
370
- function oe(n, e, t) {
371
- const i = w(() => ({
419
+ function ae(a, e, t, r, l) {
420
+ const c = w(() => ({
372
421
  "page-item": !0,
373
422
  disabled: e.value
374
423
  }));
375
- function a(r) {
376
- n.value = n.value < t.value ? n.value + 1 : t.value;
424
+ function n(i) {
425
+ a.value = a.value < t.value ? a.value + 1 : t.value, l.emit("change", {
426
+ pageIndex: a.value,
427
+ pageSize: r.value
428
+ });
377
429
  }
378
- function d(r) {
379
- n.value = t.value;
430
+ function p(i) {
431
+ a.value = t.value, l.emit("change", {
432
+ pageIndex: a.value,
433
+ pageSize: r.value
434
+ });
380
435
  }
381
- function o() {
382
- return p("li", {
383
- class: i.value
384
- }, [!e.value && p("a", {
436
+ function u() {
437
+ return f("li", {
438
+ class: c.value
439
+ }, [!e.value && f("a", {
385
440
  class: "page-link",
386
441
  tabindex: "0",
387
- onClick: (r) => a()
388
- }, [p("span", {
442
+ onClick: (i) => n()
443
+ }, [f("span", {
389
444
  class: "f-icon f-page-next"
390
- }, null)]), e.value && p("span", {
445
+ }, null)]), e.value && f("span", {
391
446
  class: "page-link"
392
- }, [p("span", {
447
+ }, [f("span", {
393
448
  class: "f-icon f-page-next"
394
449
  }, null)])]);
395
450
  }
396
451
  function s() {
397
- return p("li", {
398
- class: i.value
399
- }, [!e.value && p("a", {
452
+ return f("li", {
453
+ class: c.value
454
+ }, [!e.value && f("a", {
400
455
  class: "page-link",
401
456
  tabindex: "0",
402
- onClick: (r) => d()
403
- }, [p("span", {
457
+ onClick: (i) => p()
458
+ }, [f("span", {
404
459
  class: "f-icon f-page-last"
405
- }, null)]), e.value && p("span", {
460
+ }, null)]), e.value && f("span", {
406
461
  class: "page-link"
407
- }, [p("span", {
462
+ }, [f("span", {
408
463
  class: "f-icon f-page-last"
409
464
  }, null)])]);
410
465
  }
411
466
  return {
412
467
  renderLastPage: s,
413
- renderNextPage: o
468
+ renderNextPage: u
414
469
  };
415
470
  }
416
- function ae(n, e) {
417
- const t = N("共"), i = N("条"), a = w(() => ({
471
+ function oe(a, e) {
472
+ const t = S("共"), r = S("条"), l = w(() => ({
418
473
  "pagination-message": !0,
419
474
  "text-truncate": !0,
420
475
  "d-flex": !0,
421
- "ml-auto": n.value === "right",
422
- "flex-fill": n.value === "right"
476
+ "ml-auto": a.value === "right",
477
+ "flex-fill": a.value === "right"
423
478
  }));
424
- function d() {
425
- return p("li", {
426
- class: a.value
427
- }, [p("div", {
479
+ function c() {
480
+ return f("li", {
481
+ class: l.value
482
+ }, [f("div", {
428
483
  class: "text-truncate",
429
484
  style: "line-height: 26px"
430
- }, [p("span", {
485
+ }, [f("span", {
431
486
  class: "pg-message-text"
432
- }, [t.value]), p("b", {
487
+ }, [t.value]), f("b", {
433
488
  class: "pg-message-total"
434
- }, [e.value]), p("span", {
489
+ }, [e.value]), f("span", {
435
490
  class: "pg-message-text"
436
- }, [i.value])])]);
491
+ }, [r.value])])]);
437
492
  }
438
493
  return {
439
- renderPageInfo: d
494
+ renderPageInfo: c
440
495
  };
441
496
  }
442
- function se(n, e, t, i) {
443
- const a = N(!1), d = N("显示"), o = N("条"), s = w(() => ({
497
+ function le(a, e, t, r, l) {
498
+ const c = S(!1), n = S("显示"), p = S("条"), u = w(() => ({
444
499
  dropup: !0,
445
500
  "dropdown-right": !0,
446
501
  "pg-pagelist": !0,
447
- "pagelist-disabled": i.value === 0,
448
- show: a.value
449
- })), r = w(() => ({
502
+ "pagelist-disabled": r.value === 0,
503
+ show: c.value
504
+ })), s = w(() => ({
450
505
  "dropdown-menu": !0,
451
- show: a.value
452
- })), f = (c) => ({
506
+ show: c.value
507
+ })), i = (h) => ({
453
508
  "w-100": !0,
454
509
  "dropdown-item": !0,
455
- active: e.value === c
510
+ active: e.value === h
456
511
  });
457
- function g(c) {
458
- a.value = !0;
512
+ function o(h) {
513
+ c.value = !0;
459
514
  }
460
- function v(c) {
461
- a.value = !1;
515
+ function d(h) {
516
+ c.value = !1;
462
517
  }
463
- function m(c, u, b) {
464
- const P = c * u - u + 1;
465
- return Math.ceil(P / b);
518
+ function m(h, b, g) {
519
+ const I = h * b - b + 1;
520
+ return Math.ceil(I / g);
466
521
  }
467
- function C(c, u) {
468
- n.value = m(n.value, e.value, u), e.value = u, a.value = !1;
522
+ function C(h, b) {
523
+ a.value = m(a.value, e.value, b), e.value = b, c.value = !1, l.emit("change", {
524
+ pageIndex: a.value,
525
+ pageSize: e.value
526
+ });
469
527
  }
470
- function l() {
471
- return p("li", {
528
+ function v() {
529
+ return f("li", {
472
530
  class: "pagination-pagelist"
473
- }, [p("div", {
474
- class: s.value,
475
- onMouseenter: (c) => g(),
476
- onMouseleave: (c) => v()
477
- }, [p("div", {
531
+ }, [f("div", {
532
+ class: u.value,
533
+ onMouseenter: (h) => o(),
534
+ onMouseleave: (h) => d()
535
+ }, [f("div", {
478
536
  class: "pg-pagelist-info"
479
- }, [p("span", {
537
+ }, [f("span", {
480
538
  class: "pagelist-text"
481
- }, [d.value]), p("b", {
539
+ }, [n.value]), f("b", {
482
540
  class: "cur-pagesize"
483
- }, [e.value]), p("span", {
541
+ }, [e.value]), f("span", {
484
542
  class: "pagelist-text"
485
- }, [o.value]), p("i", {
543
+ }, [p.value]), f("i", {
486
544
  class: "f-icon f-icon-dropdown"
487
- }, null)]), p("div", {
488
- class: r.value,
545
+ }, null)]), f("div", {
546
+ class: s.value,
489
547
  style: "margin-bottom: -1px;"
490
- }, [t.value.map((c) => p("li", {
491
- class: f(c),
492
- onClick: (u) => C(u, c)
493
- }, [p("span", null, [c])]))])])]);
548
+ }, [t.value.map((h) => f("li", {
549
+ class: i(h),
550
+ onClick: (b) => C(b, h)
551
+ }, [f("span", null, [h])]))])])]);
494
552
  }
495
553
  return {
496
- renderPageList: l
554
+ renderPageList: v
497
555
  };
498
556
  }
499
- function re(n, e) {
500
- const t = (o) => ({
557
+ function se(a, e, t, r) {
558
+ const l = (u) => ({
501
559
  "page-item": !0,
502
- current: n.value === o.value,
503
- ellipsis: o.label === "..."
504
- }), i = (o) => ({
560
+ current: a.value === u.value,
561
+ ellipsis: u.label === "..."
562
+ }), c = (u) => ({
505
563
  "f-icon": !0,
506
- "f-icon-arrow-seek-left": o.value < n.value,
507
- "f-icon-arrow-seek-right": o.value > n.value
564
+ "f-icon-arrow-seek-left": u.value < a.value,
565
+ "f-icon-arrow-seek-right": u.value > a.value
508
566
  });
509
- function a(o, s) {
510
- n.value = s;
567
+ function n(u, s) {
568
+ a.value = s, r.emit("change", {
569
+ pageIndex: a.value,
570
+ pageSize: t.value
571
+ });
511
572
  }
512
- function d() {
513
- return e.value.map((o) => p("li", {
514
- class: t(o)
515
- }, [n.value !== o.value && p("a", {
573
+ function p() {
574
+ return e.value.map((u) => f("li", {
575
+ class: l(u)
576
+ }, [a.value !== u.value && f("a", {
516
577
  class: "page-link",
517
578
  tabindex: "0",
518
- onClick: (s) => a(s, o.value)
519
- }, [p("span", {
579
+ onClick: (s) => n(s, u.value)
580
+ }, [f("span", {
520
581
  class: "page-link-label"
521
- }, [o.label]), o.label === "..." && p("i", {
522
- class: i(o)
523
- }, null)]), n.value === o.value && p("span", {
582
+ }, [u.label]), u.label === "..." && f("i", {
583
+ class: c(u)
584
+ }, null)]), a.value === u.value && f("span", {
524
585
  class: "page-link"
525
- }, [o.label])]));
586
+ }, [u.label])]));
526
587
  }
527
588
  return {
528
- renderPageNumbers: d
589
+ renderPageNumbers: p
529
590
  };
530
591
  }
531
- function ce(n, e, t) {
532
- const i = w(() => ({
592
+ function ie(a, e, t, r, l) {
593
+ const c = w(() => ({
533
594
  "page-item": !0,
534
595
  disabled: e.value
535
596
  }));
536
- function a(r) {
537
- n.value = 1;
597
+ function n(i) {
598
+ a.value = 1, l.emit("change", {
599
+ pageIndex: a.value,
600
+ pageSize: r.value
601
+ });
538
602
  }
539
- function d(r) {
540
- n.value = n.value > 2 ? n.value - 1 : 1;
603
+ function p(i) {
604
+ a.value = a.value > 2 ? a.value - 1 : 1, l.emit("change", {
605
+ pageIndex: a.value,
606
+ pageSize: r.value
607
+ });
541
608
  }
542
- function o() {
543
- return p("li", {
544
- class: i.value
545
- }, [t.value && p("a", {
609
+ function u() {
610
+ return f("li", {
611
+ class: c.value
612
+ }, [t.value && f("a", {
546
613
  tabindex: "0",
547
614
  class: "page-link",
548
- onClick: (r) => a()
549
- }, [p("span", {
615
+ onClick: (i) => n()
616
+ }, [f("span", {
550
617
  class: "f-icon f-page-first"
551
- }, null)]), e.value && p("span", {
618
+ }, null)]), e.value && f("span", {
552
619
  class: "page-link"
553
- }, [p("span", {
620
+ }, [f("span", {
554
621
  class: "f-icon f-page-first"
555
622
  }, null)])]);
556
623
  }
557
624
  function s() {
558
- return p("li", {
559
- class: i.value
560
- }, [t.value && p("a", {
625
+ return f("li", {
626
+ class: c.value
627
+ }, [t.value && f("a", {
561
628
  tabindex: "0",
562
629
  class: "page-link",
563
- onClick: (r) => d()
564
- }, [p("span", {
630
+ onClick: (i) => p()
631
+ }, [f("span", {
565
632
  class: "f-icon f-page-pre"
566
- }, null)]), e.value && p("span", {
633
+ }, null)]), e.value && f("span", {
567
634
  class: "page-link"
568
- }, [p("span", {
635
+ }, [f("span", {
569
636
  class: "f-icon f-page-pre"
570
637
  }, null)])]);
571
638
  }
572
639
  return {
573
- renderFirstPage: o,
640
+ renderFirstPage: u,
574
641
  renderPreviousPage: s
575
642
  };
576
643
  }
577
- function le(n) {
578
- const e = N([]);
579
- function t(a, d, o, s) {
580
- const r = Math.ceil(o / 2);
581
- return a === o ? s : a === 1 ? a : o < s ? s - r < d ? s - o + a : r < d ? d - r + a : a : a;
582
- }
583
- function i(a, d, o, s) {
584
- const r = [], f = Math.ceil(o / d), g = Math.ceil(s / 2), v = a <= g, m = f - g < a, C = !v && !m, l = s < f;
585
- let c = 1;
586
- for (; c <= f && c <= s; ) {
587
- const u = t(c, a, s, f), b = c === 2 && (C || m), O = c === s - 1 && (C || v), P = l && (b || O) ? "..." : "" + u;
588
- r.push({ label: P, value: u }), c++;
644
+ function re(a) {
645
+ const e = S([]);
646
+ function t(l, c, n, p) {
647
+ const u = Math.ceil(n / 2);
648
+ return l === n ? p : l === 1 ? l : n < p ? p - u < c ? p - n + l : u < c ? c - u + l : l : l;
649
+ }
650
+ function r(l, c, n, p) {
651
+ const u = [], s = Math.ceil(n / c), i = Math.ceil(p / 2), o = l <= i, d = s - i < l, m = !o && !d, C = p < s;
652
+ let v = 1;
653
+ for (; v <= s && v <= p; ) {
654
+ const h = t(v, l, p, s), b = v === 2 && (m || d), g = v === p - 1 && (m || o), M = C && (b || g) ? "..." : "" + h;
655
+ u.push({ label: M, value: h }), v++;
589
656
  }
590
- e.value = r;
657
+ e.value = u;
591
658
  }
592
- return { pages: e, updatePages: i };
659
+ return { pages: e, updatePages: r };
593
660
  }
594
- const J = /* @__PURE__ */ R({
661
+ const U = /* @__PURE__ */ R({
595
662
  name: "FPagination",
596
- props: Z,
597
- emits: ["pageIndexChanged", "pageSizeChanged", "update:currentPage", "update:pageSize"],
598
- setup(n, e) {
599
- const t = N(!1), i = N(n.mode), a = N(""), d = N(!1), o = N(n.pageSize), s = N(n.currentPage), r = N(n.totalItems), {
600
- pages: f,
601
- updatePages: g
602
- } = le(), v = w(() => s.value === 1), m = w(() => n.pageList), C = w(() => Math.ceil(r.value / o.value)), l = w(() => s.value === C.value), c = w(() => n.showGoButton), u = w(() => s.value > 1), b = w(() => !(d.value && f.value.length <= 1)), O = w(() => !0), P = w(() => n.showPageList), S = w(() => n.showPageNumbers), M = w(() => !0), {
603
- renderFirstPage: j,
604
- renderPreviousPage: k
605
- } = ce(s, v, u), {
606
- renderLastPage: y,
607
- renderNextPage: h
608
- } = oe(s, l, C), {
609
- renderPageInfo: A
610
- } = ae(a, r), {
611
- renderPageList: T
612
- } = se(s, o, m, r), {
613
- renderPageNumbers: D
614
- } = re(s, f), {
615
- renderGotoButton: x
616
- } = ne(s, C);
617
- g(s.value, o.value, r.value, 7), B(() => n.totalItems, (E) => {
618
- r.value = E;
619
- }), B([s, o, r], () => {
620
- g(s.value, o.value, r.value, 7);
621
- }), B(s, () => {
622
- e.emit("update:currentPage", s.value), e.emit("pageIndexChanged", s.value);
623
- }), B(o, () => {
624
- e.emit("update:pageSize", o.value), e.emit("pageSizeChanged", o.value);
625
- }), B(() => n.totalItems, (E) => {
626
- r.value = E, g(s.value, o.value, r.value, 7);
627
- }), pe(() => {
628
- const E = m.value.includes(o.value);
629
- o.value = E ? o.value : m.value[0];
663
+ props: J,
664
+ emits: ["change", "pageIndexChanged", "pageSizeChanged", "update:currentPage", "update:pageSize"],
665
+ setup(a, e) {
666
+ const t = S(!1), r = S(a.mode), l = S(""), c = S(!1), n = S(a.pageSize), p = S(a.currentPage), u = S(a.totalItems), {
667
+ pages: s,
668
+ updatePages: i
669
+ } = re(), o = w(() => p.value === 1), d = w(() => a.pageList), m = w(() => Math.ceil(u.value / n.value)), C = w(() => p.value === m.value), v = w(() => a.showGoButton), h = w(() => p.value > 1), b = w(() => !(c.value && s.value.length <= 1)), g = w(() => !0), M = w(() => a.showPageList), I = w(() => a.showPageNumbers), y = w(() => !0), {
670
+ renderFirstPage: L,
671
+ renderPreviousPage: T
672
+ } = ie(p, o, h, n, e), {
673
+ renderLastPage: k,
674
+ renderNextPage: D
675
+ } = ae(p, C, m, n, e), {
676
+ renderPageInfo: E
677
+ } = oe(l, u), {
678
+ renderPageList: A
679
+ } = le(p, n, d, u, e), {
680
+ renderPageNumbers: O
681
+ } = se(p, s, n, e), {
682
+ renderGotoButton: j
683
+ } = ne(p, m, n, e);
684
+ i(p.value, n.value, u.value, 7), N(() => a.totalItems, (B) => {
685
+ u.value = B;
686
+ }), N([p, n, u], () => {
687
+ i(p.value, n.value, u.value, 7);
688
+ }), N(p, () => {
689
+ e.emit("update:currentPage", p.value), e.emit("pageIndexChanged", {
690
+ pageIndex: p.value,
691
+ pageSize: n.value
692
+ });
693
+ }), N(n, () => {
694
+ e.emit("update:pageSize", n.value), e.emit("pageSizeChanged", {
695
+ pageIndex: p.value,
696
+ pageSize: n.value
697
+ });
698
+ }), N(() => a.totalItems, (B) => {
699
+ u.value = B, i(p.value, n.value, u.value, 7);
700
+ }), me(() => {
701
+ const B = d.value.includes(n.value);
702
+ n.value = B ? n.value : d.value[0];
630
703
  })();
631
- const $ = w(() => ({
704
+ const W = w(() => ({
632
705
  "ngx-pagination": !0,
633
706
  pagination: !0,
634
707
  responsive: t.value,
635
- "pager-viewmode-default": i.value === "default",
636
- "pager-viewmode-simple": i.value === "simple"
637
- })), F = w(() => ({
708
+ "pager-viewmode-default": r.value === "default",
709
+ "pager-viewmode-simple": r.value === "simple"
710
+ })), z = w(() => ({
638
711
  position: "relative",
639
- "justify-content": a.value === "center" ? "center" : "start"
712
+ "justify-content": l.value === "center" ? "center" : "start"
640
713
  }));
641
714
  function V() {
642
- return p(_, null, [O.value && A(), P.value && T(), M.value && j(), M.value && k(), S.value && D(), M.value && h(), M.value && y(), c.value && x()]);
715
+ return f($, null, [g.value && E(), M.value && A(), y.value && L(), y.value && T(), I.value && O(), y.value && D(), y.value && k(), v.value && j()]);
643
716
  }
644
- function z() {
645
- return p(_, null, [p("li", {
717
+ function q() {
718
+ return f($, null, [f("li", {
646
719
  class: "page-item d-flex flex-fill"
647
- }, null), M.value && j(), M.value && k(), x(), p("li", {
720
+ }, null), y.value && L(), y.value && T(), j(), f("li", {
648
721
  class: "page-item page-separator",
649
722
  style: "margin-left: 10px"
650
- }, [p("span", {
723
+ }, [f("span", {
651
724
  style: "font-size: 15px; font-weight: 200;"
652
- }, [H(" /")])]), p("li", {
725
+ }, [G(" /")])]), f("li", {
653
726
  class: "page-item page-total",
654
727
  style: "margin-left: 5px"
655
- }, [p("span", {
728
+ }, [f("span", {
656
729
  style: "font-size: 16px; font-weight: 600;"
657
- }, [H(" "), C.value])]), M.value && h(), M.value && y()]);
730
+ }, [G(" "), m.value])]), y.value && D(), y.value && k()]);
658
731
  }
659
- return () => p("div", {
732
+ return () => f("div", {
660
733
  class: "pagination-container"
661
- }, [b.value && p("ul", {
734
+ }, [b.value && f("ul", {
662
735
  role: "navigation",
663
- class: $.value,
664
- style: F.value
665
- }, [i.value === "default" ? V() : z()])]);
736
+ class: W.value,
737
+ style: z.value
738
+ }, [r.value === "default" ? V() : q()])]);
666
739
  }
667
740
  });
668
- function ze(n, e, t) {
669
- var M;
670
- function i() {
741
+ function ze(a, e, t) {
742
+ var I;
743
+ function r() {
671
744
  t != null && t.resolveComponentContext && t.resolveComponentContext();
672
745
  }
673
- i();
674
- const a = t && t.getStyles && t.getStyles() || "", d = t && t.getDesignerClass && t.getDesignerClass() || "", o = N();
675
- function s() {
746
+ r();
747
+ const l = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "", n = S();
748
+ function p() {
676
749
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
677
750
  }
678
- function r() {
751
+ function u() {
679
752
  return !1;
680
753
  }
681
- function f() {
754
+ function s() {
682
755
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
683
756
  }
684
- function g() {
757
+ function i() {
685
758
  return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
686
759
  }
687
- function v(j) {
688
- if (!j || !j.value)
760
+ function o(y) {
761
+ if (!y || !y.value)
689
762
  return null;
690
- if (j.value.schema && j.value.schema.type === "component")
691
- return j.value;
692
- const k = N(j == null ? void 0 : j.value.parent), y = v(k);
693
- return y || null;
763
+ if (y.value.schema && y.value.schema.type === "component")
764
+ return y.value;
765
+ const L = S(y == null ? void 0 : y.value.parent), T = o(L);
766
+ return T || null;
694
767
  }
695
- function m(j = e) {
696
- const { componentInstance: k, designerItemElementRef: y } = j;
697
- return !k || !k.value ? null : k.value.canMove ? y : m(j.parent);
768
+ function d(y = e) {
769
+ const { componentInstance: L, designerItemElementRef: T } = y;
770
+ return !L || !L.value ? null : L.value.canMove ? T : d(y.parent);
698
771
  }
699
- function C(j) {
700
- return !!t && t.canAccepts(j);
772
+ function m(y) {
773
+ return !!t && t.canAccepts(y);
701
774
  }
702
- function l() {
775
+ function C() {
703
776
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
704
777
  }
705
- function c() {
706
- }
707
- function u(j, k) {
708
- k && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(k);
778
+ function v() {
709
779
  }
710
- function b(j, k) {
711
- const { componentType: y } = j;
712
- let h = q(y, j, k);
713
- t && t.onResolveNewComponentSchema && (h = t.onResolveNewComponentSchema(j, h));
714
- const A = y.toLowerCase().replace("-", "_");
715
- return h && !h.id && h.type === y && (h.id = `${A}_${Math.random().toString().slice(2, 6)}`), h;
780
+ function h(y, L) {
781
+ L && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(L);
716
782
  }
717
- function O(j, k) {
718
- const y = String(j.getAttribute("data-controltype")), h = j.getAttribute("data-feature"), A = h ? JSON.parse(h) : {};
719
- A.parentComponentInstance = o.value;
720
- let T = q(y, A);
721
- t && t.onAcceptNewChildElement && (T = t.onAcceptNewChildElement(j, k, T));
722
- const D = y.toLowerCase().replace("-", "_");
723
- return T && !T.id && T.type === y && (T.id = `${D}_${Math.random().toString().slice(2, 6)}`), T;
783
+ function b(y, L) {
784
+ const { componentType: T } = y;
785
+ let k = _(T, y, L);
786
+ t && t.onResolveNewComponentSchema && (k = t.onResolveNewComponentSchema(y, k));
787
+ const D = T.toLowerCase().replace("-", "_");
788
+ return k && !k.id && k.type === T && (k.id = `${D}_${Math.random().toString().slice(2, 6)}`), k;
724
789
  }
725
- function P(j) {
790
+ function g(y) {
726
791
  }
727
- function S(...j) {
792
+ function M(...y) {
728
793
  if (t && t.getPropsConfig)
729
- return t.getPropsConfig(...j);
794
+ return t.getPropsConfig(...y);
730
795
  }
731
- return o.value = {
732
- canMove: s(),
733
- canSelectParent: r(),
734
- canDelete: f(),
735
- canNested: !g(),
796
+ return n.value = {
797
+ canMove: p(),
798
+ canSelectParent: u(),
799
+ canDelete: s(),
800
+ canNested: !i(),
736
801
  contents: e == null ? void 0 : e.schema.contents,
737
- elementRef: n,
738
- parent: (M = e == null ? void 0 : e.parent) == null ? void 0 : M.componentInstance,
802
+ elementRef: a,
803
+ parent: (I = e == null ? void 0 : e.parent) == null ? void 0 : I.componentInstance,
739
804
  schema: e == null ? void 0 : e.schema,
740
- styles: a,
741
- designerClass: d,
742
- canAccepts: C,
743
- getBelongedComponentInstance: v,
744
- getDraggableDesignItemElement: m,
745
- getDraggingDisplayText: l,
746
- getPropConfig: S,
747
- getDragScopeElement: c,
748
- onAcceptMovedChildElement: u,
749
- onAcceptNewChildElement: O,
750
- onChildElementMovedOut: P,
805
+ styles: l,
806
+ designerClass: c,
807
+ canAccepts: m,
808
+ getBelongedComponentInstance: o,
809
+ getDraggableDesignItemElement: d,
810
+ getDraggingDisplayText: C,
811
+ getPropConfig: M,
812
+ getDragScopeElement: v,
813
+ onAcceptMovedChildElement: h,
814
+ onChildElementMovedOut: g,
751
815
  addNewChildComponentSchema: b,
752
- updateDragAndDropRules: i,
753
- triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || N(!1),
754
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || N(!1)
755
- }, o;
816
+ updateDragAndDropRules: r,
817
+ triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || S(!1),
818
+ triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || S(!1)
819
+ }, n;
756
820
  }
757
- function We() {
758
- function n(e) {
759
- var a, d;
821
+ function qe() {
822
+ function a(e, t) {
823
+ var n;
760
824
  if (!e)
761
825
  return !1;
762
- const t = ((a = e.targetContainer) == null ? void 0 : a.componentInstance) && e.targetContainer.componentInstance.value;
763
- if (!t)
826
+ const r = ((n = e.targetContainer) == null ? void 0 : n.componentInstance) && e.targetContainer.componentInstance.value;
827
+ if (!r)
764
828
  return !1;
765
- const i = (d = t.schema.appearance) == null ? void 0 : d.class;
766
- if (e.controlCategory === "input" || e.controlType === "form-group") {
767
- const o = t.schema.type, s = (o === "response-form" || o === "content-container") && i && i.includes("farris-form");
768
- if (t.schema.type !== "response-layout-item" && !s)
769
- return !1;
770
- }
771
- return e.controlType !== "field-set";
829
+ const l = r.schema.type, c = t == null ? void 0 : t.formSchemaUtils.getComponentById(r.belongedComponentId);
830
+ return !((e.controlCategory === "input" || e.controlType === "form-group") && ![F["response-layout-item"].type, F["response-form"].type].includes(l) || (e.controlType === F.tabs.type || e.controlType === F.section.type) && ((c == null ? void 0 : c.componentType) !== "frame" || ![F["content-container"].type, F["splitter-pane"].type, F["response-layout-item"].type].includes(l)));
772
831
  }
773
832
  return {
774
- basalDragulaRuleForContainer: n
833
+ basalDragulaRuleForContainer: a
775
834
  };
776
835
  }
777
- const Ge = "https://json-schema.org/draft/2020-12/schema", qe = "https://farris-design.gitee.io/dragging-rules.schema.json", _e = "Dragging Rules", He = "The rules of designer canvas", Je = "object", Qe = {
778
- "f-page": {
779
- description: "The root class of page designed by farris.",
780
- type: "object",
781
- properties: {
782
- contents: {
783
- type: "object",
784
- properties: {
785
- "f-page-header": {
786
- description: "The class of page header designed by farris.",
787
- type: "string"
788
- },
789
- "f-page-main": {
790
- description: "The class of page body designed by farris.",
791
- type: "object",
792
- properties: {
793
- contents: {
794
- type: "object",
795
- properties: {
796
- "f-struct-like-card": {
797
- description: "",
798
- type: "object",
799
- properties: {
800
- contents: {
801
- type: "object",
802
- properties: {
803
- "f-struct-form": {
804
- description: "The class of form component which has a hierarchical structure of component -> section -> respnse-form.",
805
- type: "object",
806
- properties: {
807
- contents: {
808
- type: "object",
809
- properties: {
810
- "f-section-form": {
811
- description: "The class of section which has wrapped a reponse-form component.",
812
- type: "object",
813
- properties: {
814
- contents: {
815
- type: "object",
816
- properties: {
817
- "f-form-layout": {
818
- description: "The class of reponse form",
819
- type: "object",
820
- properties: {
821
- rules: {
822
- type: "object",
823
- properties: {
824
- canAccept: {
825
- type: "boolean",
826
- const: !0
827
- },
828
- fixed: {
829
- type: "boolean",
830
- const: !0
831
- },
832
- hidePadding: {
833
- type: "boolean",
834
- const: !1
835
- }
836
- }
837
- }
838
- }
839
- }
840
- }
841
- },
842
- rules: {
843
- type: "object",
844
- properties: {
845
- canAccept: {
846
- type: "boolean",
847
- const: !1
848
- },
849
- fixed: {
850
- type: "boolean",
851
- const: !0
852
- },
853
- hidePadding: {
854
- type: "boolean",
855
- const: !0
856
- }
857
- }
858
- }
859
- }
860
- }
861
- }
862
- },
863
- rules: {
864
- type: "object",
865
- properties: {
866
- canAccept: {
867
- type: "boolean",
868
- const: !1
869
- },
870
- fixed: {
871
- type: "boolean",
872
- const: !1
873
- },
874
- hidePadding: {
875
- type: "boolean",
876
- const: !0
877
- }
878
- }
879
- }
880
- }
881
- },
882
- "f-struct-wrapper": {
883
- description: "",
884
- type: "object",
885
- properties: {
886
- contents: {
887
- type: "object",
888
- properties: {
889
- "f-section-tabs": {
890
- description: "The class of section which has wrapped sub-grid tabs.",
891
- type: "object",
892
- properties: {
893
- contents: {
894
- type: "object",
895
- properties: {
896
- "f-tabs-in-card": {
897
- description: "The class of tabs which contains sub-grid.",
898
- type: "object",
899
- properties: {
900
- contents: {
901
- type: "object",
902
- properties: {
903
- "f-struct-data-grid-in-card": {
904
- description: "The class of sub-grid component",
905
- type: "object",
906
- properties: {
907
- contents: {
908
- type: "object",
909
- properties: {
910
- "f-grid-is-sub": {
911
- description: "The class of sub-grid",
912
- type: "object",
913
- properties: {
914
- rules: {
915
- type: "object",
916
- properties: {
917
- canAccept: {
918
- type: "boolean",
919
- const: !0
920
- },
921
- fixed: {
922
- type: "boolean",
923
- const: !0
924
- },
925
- hidePadding: {
926
- type: "boolean",
927
- const: !1
928
- }
929
- }
930
- }
931
- }
932
- }
933
- }
934
- },
935
- rules: {
936
- type: "object",
937
- properties: {
938
- canAccept: {
939
- type: "boolean",
940
- const: !1
941
- },
942
- fixed: {
943
- type: "boolean",
944
- const: !1
945
- },
946
- hidePadding: {
947
- type: "boolean",
948
- const: !0
949
- }
950
- }
951
- }
952
- }
953
- }
954
- }
955
- },
956
- rules: {
957
- type: "object",
958
- properties: {
959
- canAccept: {
960
- type: "boolean",
961
- const: !1
962
- },
963
- fixed: {
964
- type: "boolean",
965
- const: !0
966
- },
967
- hidePadding: {
968
- type: "boolean",
969
- const: !0
970
- }
971
- }
972
- }
973
- }
974
- }
975
- }
976
- },
977
- rules: {
978
- type: "object",
979
- properties: {
980
- canAccept: {
981
- type: "boolean",
982
- const: !1
983
- },
984
- fixed: {
985
- type: "boolean",
986
- const: !0
987
- },
988
- hidePadding: {
989
- type: "boolean",
990
- const: !0
991
- }
992
- }
993
- }
994
- }
995
- },
996
- "f-section-in-main": {
997
- description: "The class of section which has wrapped a reponse-form component.",
998
- type: "object",
999
- properties: {
1000
- rules: {
1001
- type: "object",
1002
- properties: {
1003
- canAccept: {
1004
- type: "boolean",
1005
- const: !0
1006
- },
1007
- fixed: {
1008
- type: "boolean",
1009
- const: !0
1010
- },
1011
- hidePadding: {
1012
- type: "boolean",
1013
- const: !1
1014
- }
1015
- }
1016
- }
1017
- }
1018
- }
1019
- }
1020
- },
1021
- rules: {
1022
- type: "object",
1023
- properties: {
1024
- canAccept: {
1025
- type: "boolean",
1026
- const: !1
1027
- },
1028
- fixed: {
1029
- type: "boolean",
1030
- const: !1
1031
- },
1032
- hidePadding: {
1033
- type: "boolean",
1034
- const: !0
1035
- }
1036
- }
1037
- }
1038
- }
1039
- }
1040
- }
1041
- },
1042
- rules: {
1043
- type: "object",
1044
- properties: {
1045
- canAccept: {
1046
- type: "boolean",
1047
- const: !0
1048
- },
1049
- fixed: {
1050
- type: "boolean",
1051
- const: !0
1052
- },
1053
- hidePadding: {
1054
- type: "object",
1055
- const: {
1056
- allOf: [
1057
- {
1058
- sibling: 0,
1059
- parent: {
1060
- "f-page-main": !0
1061
- }
1062
- }
1063
- ]
1064
- }
1065
- }
1066
- }
1067
- }
1068
- }
1069
- },
1070
- "f-struct-data-grid": {
1071
- description: "",
1072
- type: "object",
1073
- properties: {
1074
- rules: {
1075
- type: "object",
1076
- properties: {
1077
- canAccept: {
1078
- type: "object",
1079
- const: !0
1080
- },
1081
- fixed: {
1082
- type: "boolean",
1083
- const: !0
1084
- },
1085
- hidePadding: {
1086
- type: "boolean",
1087
- const: !0
1088
- }
1089
- }
1090
- }
1091
- }
1092
- },
1093
- "f-page-main-content": {
1094
- description: "",
1095
- type: "object",
1096
- properties: {
1097
- contents: {
1098
- type: "object",
1099
- properties: {
1100
- "f-page-content-nav": {
1101
- description: "",
1102
- type: "object",
1103
- properties: {
1104
- contents: {
1105
- type: "object",
1106
- properties: {
1107
- "f-struct-data-grid-in-nav": {
1108
- description: "",
1109
- type: "object",
1110
- properties: {
1111
- contents: {
1112
- type: "object",
1113
- properties: {
1114
- "f-page-content-nav-extend": {
1115
- description: "",
1116
- type: "object"
1117
- },
1118
- "f-section-in-nav": {
1119
- description: "",
1120
- type: "object",
1121
- properties: {
1122
- rules: {
1123
- type: "object",
1124
- properties: {
1125
- canAccept: {
1126
- type: "boolean",
1127
- const: !1
1128
- },
1129
- fixed: {
1130
- type: "boolean",
1131
- const: !0
1132
- },
1133
- hidePadding: {
1134
- type: "boolean",
1135
- const: !1
1136
- }
1137
- }
1138
- }
1139
- }
1140
- }
1141
- }
1142
- },
1143
- rules: {
1144
- type: "object",
1145
- properties: {
1146
- canAccept: {
1147
- type: "boolean",
1148
- const: !0
1149
- },
1150
- fixed: {
1151
- type: "boolean",
1152
- const: !1
1153
- },
1154
- hidePadding: {
1155
- type: "boolean",
1156
- const: !0
1157
- }
1158
- }
1159
- }
1160
- }
1161
- }
1162
- }
1163
- }
1164
- }
1165
- },
1166
- "f-page-content-main": {
1167
- description: "",
1168
- type: "object",
1169
- properties: {}
1170
- }
1171
- }
1172
- }
1173
- }
1174
- },
1175
- "f-page-content": {
1176
- description: "",
1177
- type: "object",
1178
- properties: {
1179
- contents: {
1180
- type: "object",
1181
- properties: {
1182
- "f-page-content-nav": {
1183
- description: "",
1184
- type: "object",
1185
- properties: {
1186
- contents: {
1187
- type: "object",
1188
- properties: {
1189
- "f-list-nav": {
1190
- description: "",
1191
- type: "object"
1192
- },
1193
- "f-list-nav-left": {
1194
- description: "",
1195
- type: "object"
1196
- },
1197
- "f-struct-data-grid-in-nav": {
1198
- description: "",
1199
- type: "object",
1200
- properties: {
1201
- contents: {
1202
- type: "object",
1203
- properties: {
1204
- "f-section-form": {
1205
- description: "",
1206
- type: "object",
1207
- properties: {
1208
- rules: {
1209
- type: "object",
1210
- properties: {
1211
- canAccept: {
1212
- type: "boolean",
1213
- const: !1
1214
- },
1215
- fixed: {
1216
- type: "boolean",
1217
- const: !0
1218
- },
1219
- hidePadding: {
1220
- type: "boolean",
1221
- const: !0
1222
- }
1223
- }
1224
- }
1225
- }
1226
- },
1227
- "f-section-grid": {
1228
- description: "",
1229
- type: "object",
1230
- properties: {
1231
- rules: {
1232
- type: "object",
1233
- properties: {
1234
- canAccept: {
1235
- type: "boolean",
1236
- const: !1
1237
- },
1238
- fixed: {
1239
- type: "boolean",
1240
- const: !0
1241
- },
1242
- hidePadding: {
1243
- type: "boolean",
1244
- const: !0
1245
- }
1246
- }
1247
- }
1248
- }
1249
- }
1250
- }
1251
- },
1252
- rules: {
1253
- type: "object",
1254
- properties: {
1255
- canAccept: {
1256
- type: "boolean",
1257
- const: !1
1258
- },
1259
- fixed: {
1260
- type: "boolean",
1261
- const: !0
1262
- },
1263
- hidePadding: {
1264
- type: "boolean",
1265
- const: !0
1266
- }
1267
- }
1268
- }
1269
- }
1270
- }
1271
- }
1272
- }
1273
- },
1274
- rules: {
1275
- type: "object",
1276
- properties: {
1277
- canAccept: {
1278
- type: "boolean",
1279
- const: !1
1280
- },
1281
- fixed: {
1282
- type: "boolean",
1283
- const: !0
1284
- },
1285
- hidePadding: {
1286
- type: "boolean",
1287
- const: !0
1288
- }
1289
- }
1290
- }
1291
- },
1292
- "f-page-content-main": {
1293
- description: "",
1294
- type: "object",
1295
- properties: {
1296
- rules: {
1297
- type: "object",
1298
- properties: {
1299
- canAccept: {
1300
- type: "boolean",
1301
- const: !1
1302
- },
1303
- fixed: {
1304
- type: "boolean",
1305
- const: !1
1306
- },
1307
- hidePadding: {
1308
- type: "boolean",
1309
- const: !0
1310
- }
1311
- }
1312
- }
1313
- }
1314
- }
1315
- }
1316
- },
1317
- rules: {
1318
- type: "object",
1319
- properties: {
1320
- canAccept: {
1321
- type: "boolean",
1322
- const: !1
1323
- },
1324
- fixed: {
1325
- type: "boolean",
1326
- const: !0
1327
- },
1328
- hidePadding: {
1329
- type: "boolean",
1330
- const: !0
1331
- }
1332
- }
1333
- }
1334
- }
1335
- }
1336
- }
1337
- },
1338
- rules: {
1339
- type: "object",
1340
- properties: {
1341
- canAccept: {
1342
- type: "object",
1343
- const: {
1344
- anyOf: [
1345
- {
1346
- children: 0
1347
- },
1348
- {
1349
- children: {
1350
- length: {
1351
- not: 1
1352
- },
1353
- "f-struct-like-card": !0
1354
- }
1355
- },
1356
- {
1357
- children: {
1358
- "scroll-spy": !1,
1359
- "f-page-content": !1,
1360
- "f-struct-like-card": !1
1361
- }
1362
- }
1363
- ]
1364
- }
1365
- },
1366
- fixed: {
1367
- type: "boolean",
1368
- const: !0
1369
- },
1370
- hidePadding: {
1371
- type: "boolean",
1372
- const: !0
1373
- }
1374
- }
1375
- }
1376
- }
1377
- },
1378
- "f-page-footer": {
1379
- description: "The class of page footer designed by farris.",
1380
- type: "string"
836
+ class xe {
837
+ getTemplateRule(e, t) {
838
+ const r = t == null ? void 0 : t.formSchemaUtils, l = r == null ? void 0 : r.getFormTemplateRule(), c = { canAccept: !0, canDelete: !0, canMove: !0 };
839
+ if (!l)
840
+ return c;
841
+ const n = this.getComponentContext(e);
842
+ return n.componentClassList.forEach((u) => {
843
+ if (!u || !l[u])
844
+ return;
845
+ const { canMove: s, canDelete: i, canAccept: o } = l[u];
846
+ c.canMove = c.canMove && this.resolveRuleValue(s, n), c.canDelete = c.canDelete && this.resolveRuleValue(i, n), c.canAccept = c.canAccept && this.resolveRuleValue(o, n);
847
+ }), c;
848
+ }
849
+ resolveRuleValue(e, t) {
850
+ return typeof e == "boolean" ? e : this.parseRuleValueSchema(e, t);
851
+ }
852
+ parseRuleValueSchema(e, t) {
853
+ const r = e.invalidContext || [];
854
+ let l = !0;
855
+ for (const c of r) {
856
+ if (c.firstLevelChild) {
857
+ if (c.firstLevelChild.class) {
858
+ const n = t.firstLevelChildClassList;
859
+ if (n && !n.includes(c.firstLevelChild.class)) {
860
+ l = !1;
861
+ continue;
1381
862
  }
1382
863
  }
1383
- },
1384
- rules: {
1385
- type: "object",
1386
- properties: {
1387
- canAccept: {
1388
- type: "boolean",
1389
- const: !1
1390
- },
1391
- fixed: {
1392
- type: "boolean",
1393
- const: !0
1394
- },
1395
- hidePadding: {
1396
- type: "boolean",
1397
- const: !0
864
+ if (c.firstLevelChild.type) {
865
+ const n = t.firstLevelChildSchema;
866
+ if (n && n.type !== c.firstLevelChild.type) {
867
+ l = !1;
868
+ continue;
1398
869
  }
1399
870
  }
1400
871
  }
872
+ if (c.secondLevelChild) {
873
+ if (c.secondLevelChild.class) {
874
+ const n = t.secondLevelChildClassList;
875
+ if (n && !n.includes(c.secondLevelChild.class)) {
876
+ l = !1;
877
+ continue;
878
+ }
879
+ }
880
+ if (c.secondLevelChild.type) {
881
+ const n = t.secondLevelChildSchema;
882
+ if (n && n.type !== c.secondLevelChild.type) {
883
+ l = !1;
884
+ continue;
885
+ }
886
+ }
887
+ }
888
+ if (c.parent) {
889
+ if (c.parent.class) {
890
+ const n = t.parentClassList;
891
+ if (n && !n.includes(c.parent.class)) {
892
+ l = !1;
893
+ continue;
894
+ }
895
+ }
896
+ if (c.parent.type) {
897
+ const n = t.parentSchema;
898
+ if (n && n.type !== c.parent.type) {
899
+ l = !1;
900
+ continue;
901
+ }
902
+ }
903
+ }
904
+ l = !0;
905
+ break;
1401
906
  }
1402
- },
1403
- "f-page-is-managelist": {
1404
- description: "The root class of mangement list page.",
1405
- type: "string"
1406
- },
1407
- "f-page-card": {
1408
- description: "",
1409
- type: "object"
1410
- },
1411
- "f-page-is-mainsubcard": {
1412
- description: "",
1413
- type: "object"
907
+ return !l;
908
+ }
909
+ getComponentContext(e) {
910
+ var v, h, b, g;
911
+ const t = e.schema, r = t.appearance && t.appearance.class || "", l = r.split(" ") || [], c = t.contents || [], n = c.length ? c[0] : null, p = n && n.appearance ? n.appearance.class : "", u = p ? p.split(" ") : [], s = (v = n == null ? void 0 : n.contents) != null && v.length ? n == null ? void 0 : n.contents[0] : null, i = s && s.appearance ? s.appearance.class : "", o = i ? i.split(" ") : [], d = t.type === "component" ? (b = (h = e.parent) == null ? void 0 : h.parent) == null ? void 0 : b.schema : (g = e.parent) == null ? void 0 : g.schema, m = d && d.appearance && d.appearance.class || "", C = m ? m.split(" ") : [];
912
+ return {
913
+ componentClass: r,
914
+ componentClassList: l,
915
+ childContents: c,
916
+ firstLevelChildSchema: n,
917
+ firstLevelChildClass: p,
918
+ firstLevelChildClassList: u,
919
+ secondLevelChildSchema: s,
920
+ secondLevelChildClass: i,
921
+ secondLevelChildClassList: o,
922
+ parentSchema: d,
923
+ parentClass: m,
924
+ parentClassList: C
925
+ };
1414
926
  }
1415
- }, Ue = {
1416
- $schema: Ge,
1417
- $id: qe,
1418
- title: _e,
1419
- description: He,
1420
- type: Je,
1421
- properties: Qe
1422
- }, X = /* @__PURE__ */ new Map();
1423
- function Xe() {
1424
- function n(l, c, u, b) {
1425
- var O;
1426
- if (typeof u == "number")
1427
- return ((O = b[l]) == null ? void 0 : O.length) === u;
1428
- if (typeof u == "object") {
1429
- const P = Object.keys(u)[0], S = u[P];
1430
- if (P === "not")
1431
- return Number(b[l].length) !== Number(S);
1432
- if (P === "moreThan")
1433
- return Number(b[l].length) >= Number(S);
1434
- if (P === "lessThan")
1435
- return Number(b[l].length) <= Number(S);
927
+ }
928
+ class Xe {
929
+ constructor(e, t) {
930
+ P(this, "componentId");
931
+ P(this, "viewModelId");
932
+ P(this, "eventsEditorUtils");
933
+ P(this, "formSchemaUtils");
934
+ P(this, "formMetadataConverter");
935
+ P(this, "designViewModelUtils");
936
+ P(this, "designViewModelField");
937
+ P(this, "controlCreatorUtils");
938
+ P(this, "designerHostService");
939
+ P(this, "schemaService", null);
940
+ P(this, "metadataService", null);
941
+ P(this, "propertyConfig", {
942
+ type: "object",
943
+ categories: {}
944
+ });
945
+ var r;
946
+ this.componentId = e, 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(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
947
+ }
948
+ getTableInfo() {
949
+ var e;
950
+ return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
951
+ }
952
+ setDesignViewModelField(e) {
953
+ const t = e.binding && e.binding.type === "Form" && e.binding.field;
954
+ if (t) {
955
+ if (!this.designViewModelField) {
956
+ const r = this.designViewModelUtils.getDgViewModel(this.viewModelId);
957
+ this.designViewModelField = r.fields.find((l) => l.id === t);
958
+ }
959
+ e.updateOn = this.designViewModelField.updateOn;
1436
960
  }
1437
- return !1;
1438
961
  }
1439
- function e(l, c, u, b) {
1440
- return typeof u == "boolean" ? b.childrenClassList.includes(c) === !!u : !1;
962
+ changeFieldEditorType(e, t) {
963
+ }
964
+ getBasicPropConfig(e) {
965
+ return {
966
+ description: "Basic Information",
967
+ title: "基本信息",
968
+ properties: {
969
+ id: {
970
+ description: "组件标识",
971
+ title: "标识",
972
+ type: "string",
973
+ readonly: !0
974
+ },
975
+ type: {
976
+ description: "组件类型",
977
+ title: "控件类型",
978
+ type: "select",
979
+ editor: {
980
+ type: "combo-list",
981
+ textField: "name",
982
+ valueField: "value",
983
+ data: [{ value: e.type, name: F[e.type].name }]
984
+ }
985
+ }
986
+ }
987
+ };
1441
988
  }
1442
- function t(l, c, u, b) {
1443
- return typeof u == "boolean" ? b.parentClassList.includes(c) === !!u : !1;
989
+ getAppearanceConfig(e = null) {
990
+ return {
991
+ title: "样式",
992
+ description: "Appearance",
993
+ properties: {
994
+ class: {
995
+ title: "class样式",
996
+ type: "string",
997
+ description: "组件的CSS样式",
998
+ $converter: "/converter/appearance.converter"
999
+ },
1000
+ style: {
1001
+ title: "style样式",
1002
+ type: "string",
1003
+ description: "组件的样式",
1004
+ $converter: "/converter/appearance.converter"
1005
+ }
1006
+ }
1007
+ };
1444
1008
  }
1445
- function i(l, c, u, b) {
1446
- return typeof u == "boolean" ? b.parentClassList.includes(c) === !!u : !1;
1009
+ /**
1010
+ *
1011
+ * @param propertyId
1012
+ * @param componentInstance
1013
+ * @returns
1014
+ */
1015
+ updateElementByParentContainer(e, t) {
1016
+ const r = t && t.parent && t.parent.schema;
1017
+ if (!r)
1018
+ return;
1019
+ const l = r.contents.findIndex((n) => n.id === e), c = K(r.contents[l]);
1020
+ r.contents.splice(l, 1), r.contents.splice(l, 0, c);
1447
1021
  }
1448
- const a = /* @__PURE__ */ new Map([
1449
- ["length", n],
1450
- ["hasChildren", e],
1451
- ["hasSibling", i],
1452
- ["hasParent", t]
1453
- ]);
1454
- function d(l, c) {
1455
- const u = l;
1456
- return typeof c == "number" ? [{ target: u, operator: "length", param: null, value: Number(c) }] : typeof c == "object" ? Object.keys(c).map((b) => {
1457
- if (b === "length")
1458
- return { target: u, operator: "length", param: null, value: c[b] };
1459
- const O = b, P = c[b];
1460
- return { target: u, operator: l === "children" ? "hasChildren" : l === "parent" ? "hasParent" : "hasSibling", param: O, value: P };
1461
- }) : [];
1022
+ }
1023
+ class _e {
1024
+ constructor() {
1025
+ /** 控件标题 */
1026
+ P(this, "label", "");
1027
+ /** 控件id */
1028
+ P(this, "id", "");
1029
+ /** 每个控件占用的栅格数 */
1030
+ P(this, "columnInSM", 12);
1031
+ P(this, "columnInMD", 6);
1032
+ P(this, "columnInLG", 3);
1033
+ P(this, "columnInEL", 2);
1034
+ /** 每个控件占用的列数 */
1035
+ P(this, "displayWidthInSM", 1);
1036
+ P(this, "displayWidthInMD", 1);
1037
+ P(this, "displayWidthInLG", 1);
1038
+ P(this, "displayWidthInEL", 1);
1039
+ /** 编辑器内部默认显示的屏幕大小-----可以去掉 */
1040
+ P(this, "displayColumnCountAtBreakPoint", "md");
1041
+ /** 控件所在行,传0即可-----编辑器内部使用 */
1042
+ P(this, "tagRow", 0);
1043
+ /** 控件是否显示上方空白:传0即可-----编辑器内部使用 */
1044
+ P(this, "showTopBorder", 0);
1045
+ /** 区域,从1开始。卡片内的控件从上往下,从左往右划分区域,遇到分组fieldSet时group+1,分组结束后group+1 */
1046
+ P(this, "group", 1);
1047
+ /** 控件是否符合标准的class配置(设计器用的) */
1048
+ P(this, "isSupportedClass", !0);
1049
+ /** 控件所在分组id(设计器用的) */
1050
+ P(this, "fieldSetId", "");
1462
1051
  }
1463
- function o(l, c) {
1464
- if (a.has(l.operator)) {
1465
- const u = a.get(l.operator);
1466
- return u && u(l.target, l.param, l.value, c) || !1;
1052
+ }
1053
+ function Je(a) {
1054
+ let e, t;
1055
+ const r = /* @__PURE__ */ new Map();
1056
+ let l = [];
1057
+ function c(i, o) {
1058
+ const m = i.split(" ").filter((g) => g.startsWith("col-"));
1059
+ if (m.length === 0) {
1060
+ o.isSupportedClass = !1;
1061
+ return;
1467
1062
  }
1468
- return !1;
1063
+ let C = m.find((g) => /^col-([1-9]|10|11|12)$/.test(g)), v = m.find((g) => /^col-md-([1-9]|10|11|12)$/.test(g)), h = m.find((g) => /^col-xl-([1-9]|10|11|12)$/.test(g)), b = m.find((g) => /^col-el-([1-9]|10|11|12)$/.test(g));
1064
+ C = C || "col-12", o.columnInSM = parseInt(C.replace("col-", ""), 10), o.displayWidthInSM = o.columnInSM / 12, o.displayWidthInSM !== 1 && (o.isSupportedClass = !1), v = v || "col-md-" + o.columnInSM, o.columnInMD = parseInt(v.replace("col-md-", ""), 10), o.displayWidthInMD = o.columnInMD / 6, [1, 2].includes(o.displayWidthInMD) || (o.isSupportedClass = !1), h = h || "col-xl-" + o.columnInMD, o.columnInLG = parseInt(h.replace("col-xl-", ""), 10), o.displayWidthInLG = o.columnInLG / 3, [1, 2, 3, 4].includes(o.displayWidthInLG) || (o.isSupportedClass = !1), b = b || "col-el-" + o.columnInLG, o.columnInEL = parseInt(b.replace("col-el-", ""), 10), o.displayWidthInEL = o.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(o.displayWidthInEL) || (o.isSupportedClass = !1);
1065
+ }
1066
+ function n(i, o, d, m = !1) {
1067
+ let C = !1;
1068
+ i.contents.forEach((v) => {
1069
+ if (v.type === "fieldset") {
1070
+ d += 1, n(v, o, d, !0), C = !0;
1071
+ return;
1072
+ }
1073
+ C && (d += 1, C = !1);
1074
+ const h = v.appearance && v.appearance.class, b = new _e();
1075
+ h ? c(h, b) : b.isSupportedClass = !1, b.label = v.label || v.id, b.id = v.id, b.group = d, m && (b.fieldSetId = i.id), t === v.id && (e = d), r.set(v.id, v), o.push(b);
1076
+ });
1469
1077
  }
1470
- function s(l, c) {
1471
- return Object.keys(l).reduce((P, S) => {
1472
- const M = d(S, l[S]);
1473
- return P.push(...M), P;
1474
- }, []).reduce((P, S) => P && o(S, c), !0);
1475
- }
1476
- function r(l, c) {
1477
- const u = Object.keys(l), b = u.includes("allOf"), O = u.includes("anyOf"), P = b || O, j = (P ? l[P ? b ? "allOf" : "anyOf" : "allOf"] : [l]).map((y) => s(y, c));
1478
- return b ? !j.includes(!1) : j.includes(!0);
1479
- }
1480
- function f(l, c) {
1481
- const u = l.const;
1482
- return u ? typeof u == "boolean" ? u : typeof u == "object" ? r(u, c) : !1 : !1;
1483
- }
1484
- function g(l) {
1485
- return (c) => {
1486
- const u = { canAccept: !0, fixed: !1, hidePadding: !1 };
1487
- return l && l.properties && Object.keys(l.properties).reduce((b, O) => {
1488
- const P = l.properties[O];
1489
- return b[O] = f(P, c), b;
1490
- }, u), u;
1078
+ function p(i) {
1079
+ const o = a.getComponentById(i);
1080
+ if (!o || !o.componentType || !o.componentType.startsWith("form"))
1081
+ return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
1082
+ const d = a.selectNode(o, (m) => m.type === x["response-form"].type);
1083
+ return !d || !d.contents || d.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: d };
1084
+ }
1085
+ function u(i, o) {
1086
+ o = o || i.id;
1087
+ const { result: d, message: m, formNode: C } = p(o);
1088
+ if (!d)
1089
+ return { result: d, message: m };
1090
+ t = i.id, l = [], r.clear();
1091
+ const v = C.contents[0].type === x.fieldset.type ? 0 : 1;
1092
+ n(C, l, v);
1093
+ const h = l.find((g) => !g.isSupportedClass);
1094
+ return {
1095
+ defaultState: {
1096
+ defaultGroupNumber: e || 1,
1097
+ model: h ? "customize" : "standard"
1098
+ },
1099
+ importData: l
1491
1100
  };
1492
1101
  }
1493
- function v(l, c, u) {
1494
- if (c.type === "object" && c.properties) {
1495
- const { rules: b, contents: O } = c.properties;
1496
- u.set(l, g(b)), O && Object.keys(O.properties).forEach(
1497
- (P) => v(P, O.properties[P], u)
1498
- );
1499
- }
1102
+ function s(i, o) {
1103
+ o = o;
1104
+ const { result: d, formNode: m } = p(o);
1105
+ if (!d)
1106
+ return "";
1107
+ const C = [];
1108
+ return i.forEach((v) => {
1109
+ var g;
1110
+ const h = r.get(v.id), b = h.appearance && h.appearance.class;
1111
+ if (b) {
1112
+ const I = b.split(" ").filter((E) => !E.startsWith("col-")), y = "col-" + v.columnInSM, L = "col-md-" + v.columnInMD, T = "col-xl-" + v.columnInLG, k = "col-el-" + v.columnInEL, D = [y, L, T, k].concat(I);
1113
+ h.appearance.class = D.join(" ");
1114
+ }
1115
+ if (v.fieldSetId) {
1116
+ const M = m.contents.find((y) => y.id === v.fieldSetId), I = C.find((y) => y.id === v.fieldSetId);
1117
+ I ? (g = I.contents) == null || g.push(h) : (C.push(M), M.contents = [h]);
1118
+ } else
1119
+ C.push(h);
1120
+ }), m.contents = C, m.id;
1500
1121
  }
1501
- function m() {
1502
- const { properties: l } = Ue;
1503
- Object.keys(l).forEach((c) => {
1504
- v(c, l[c], X);
1122
+ return {
1123
+ checkCanFindFormNode: p,
1124
+ checkCanOpenLayoutEditor: u,
1125
+ changeFormControlsByResponseLayoutConfig: s,
1126
+ getResonseFormLayoutConfig: n
1127
+ };
1128
+ }
1129
+ function Qe(a, e) {
1130
+ function t(u, s = null) {
1131
+ if (s) return s;
1132
+ const i = a.getComponentById(e);
1133
+ return a.selectNode(i, (o) => o.id === u);
1134
+ }
1135
+ function r(u) {
1136
+ const s = a.getComponentById(u);
1137
+ return !(!s || !s.componentType || !s.componentType.startsWith("form"));
1138
+ }
1139
+ function l(u) {
1140
+ const s = t(u.id), i = Je(a), o = [];
1141
+ i.getResonseFormLayoutConfig(s, o, 1);
1142
+ const d = o.map((I) => I.columnInSM), m = o.map((I) => I.columnInMD), C = o.map((I) => I.columnInLG), v = o.map((I) => I.columnInEL), h = c(d) ? d[0] : 0, b = c(m) ? m[0] : 0, g = c(C) ? C[0] : 0, M = c(v) ? v[0] : 0;
1143
+ return {
1144
+ uniqueColClassInSM: h,
1145
+ uniqueColClassInMD: b,
1146
+ uniqueColClassInLG: g,
1147
+ uniqueColClassInEL: M
1148
+ };
1149
+ }
1150
+ function c(u) {
1151
+ const s = new Set(u);
1152
+ return Array.from(s).length === 1;
1153
+ }
1154
+ function n(u, s, i) {
1155
+ u = t(i, u), u.contents.forEach((o) => {
1156
+ if (o.type === x.fieldset.type) {
1157
+ n(o, s, o.id);
1158
+ return;
1159
+ }
1160
+ o.appearance || (o.appearance = {});
1161
+ const d = o.appearance.class;
1162
+ o.appearance.class = p(d, s);
1505
1163
  });
1506
1164
  }
1507
- function C(l, c) {
1508
- const u = { canAccept: !0, fixed: !1, hidePadding: !0 };
1509
- return X.has(l) ? X.get(l)(c) : u;
1165
+ function p(u, s) {
1166
+ let i, o, d, m, C = [];
1167
+ if (u) {
1168
+ const I = u.split(" "), y = I.filter((L) => L.startsWith("col-"));
1169
+ i = y.find((L) => /^col-([1-9]|10|11|12)$/.test(L)), o = y.find((L) => /^col-md-([1-9]|10|11|12)$/.test(L)), d = y.find((L) => /^col-xl-([1-9]|10|11|12)$/.test(L)), m = y.find((L) => /^col-el-([1-9]|10|11|12)$/.test(L)), C = I.filter((L) => !L.startsWith("col-"));
1170
+ }
1171
+ const v = s.uniqueColClassInSM ? "col-" + s.uniqueColClassInSM : i, h = s.uniqueColClassInMD ? "col-md-" + s.uniqueColClassInMD : o, b = s.uniqueColClassInLG ? "col-xl-" + s.uniqueColClassInLG : d, g = s.uniqueColClassInEL ? "col-el-" + s.uniqueColClassInEL : m;
1172
+ return [v, h, b, g].concat(C).join(" ");
1510
1173
  }
1511
- return m(), { getRuleValue: C };
1174
+ return { checkIsInFormComponent: r, assembleUnifiedLayoutContext: l, changeFormControlsByUnifiedLayoutConfig: n };
1512
1175
  }
1513
- function Ye(n, e) {
1514
- var k;
1515
- const t = n.schema, i = (k = n.parent) == null ? void 0 : k.schema, a = Xe(), d = N(!1), o = N(!1);
1516
- let s = !0, r = !1, f, g = !1;
1517
- function v(y) {
1518
- return f && f.componentClassList && f.componentClassList.includes("f-form-layout") && f.componentClassList.includes("farris-form") ? y.sourceType === "control" && y.controlCategory === "input" || y.sourceType === "move" && y.controlType === "form-group" : !0;
1176
+ class Ye extends Xe {
1177
+ constructor(e, t) {
1178
+ super(e, t);
1179
+ }
1180
+ getPropertyConfig(e, t) {
1181
+ var r = this;
1182
+ this.propertyConfig.categories.basic = this.getBasicPropConfig(e);
1183
+ const { checkIsInFormComponent: l, assembleUnifiedLayoutContext: c, changeFormControlsByUnifiedLayoutConfig: n } = Qe(this.formSchemaUtils, this.componentId), p = this.getAppearanceConfig(e);
1184
+ return p.properties.unifiedLayout = {
1185
+ title: "统一布局配置",
1186
+ description: "统一配置卡片区域内所有控件的宽度,只支持标准模式",
1187
+ visible: l(this.componentId),
1188
+ refreshPanelAfterChanged: !0,
1189
+ editor: {
1190
+ type: "response-form-layout-setting",
1191
+ initialState: c(e)
1192
+ }
1193
+ }, p.setPropertyRelates = function(u, s) {
1194
+ if (u)
1195
+ switch (u && u.propertyID) {
1196
+ case "unifiedLayout": {
1197
+ n(null, u.propertyValue, e.id), r.updateElementByParentContainer(e.id, t);
1198
+ break;
1199
+ }
1200
+ }
1201
+ }, this.propertyConfig.categories.appearance = p, this.propertyConfig;
1519
1202
  }
1520
- function m(y) {
1521
- return !(!We().basalDragulaRuleForContainer(y) || !s || !v(y));
1203
+ }
1204
+ function Ze(a, e) {
1205
+ const t = a.schema, r = new xe(), { canMove: l, canAccept: c, canDelete: n } = r.getTemplateRule(a, e);
1206
+ function p(g) {
1207
+ const M = r.getComponentContext(a);
1208
+ return M && M.componentClassList && M.componentClassList.includes("f-form-layout") && M.componentClassList.includes("farris-form") ? g.sourceType === "control" && g.controlCategory === "input" || g.sourceType === "move" && g.controlType === "form-group" : !0;
1522
1209
  }
1523
- function C() {
1524
- d.value = !1, o.value = !1;
1525
- const y = t, h = y.appearance && y.appearance.class || "", A = h.split(" "), T = y.contents || [], D = T.length ? T[0] : null, x = D && D.appearance ? D.appearance.class : "", L = x ? x.split(" ") : [], $ = T.length ? T.reduce((W, G) => {
1526
- const I = G && G.appearance ? G.appearance.class : "", ie = I ? I.split(" ") : [];
1527
- return W.push(...ie), W;
1528
- }, []) : [], F = i, V = F && F.appearance && F.appearance.class || "", z = V ? V.split(" ") : [];
1529
- f = {
1530
- componentClass: h,
1531
- componentClassList: A,
1532
- childContents: T,
1533
- firstChildContent: D,
1534
- firstChildClass: x,
1535
- firstChildClassList: L,
1536
- parent: F,
1537
- parentClass: V,
1538
- parentClassList: z,
1539
- children: T,
1540
- childrenClassList: $
1541
- };
1542
- const { canAccept: E, fixed: Q, hidePadding: U } = a.getRuleValue(A[0], f);
1543
- return s = E, r = U, g = Q, !0;
1210
+ function u(g) {
1211
+ return !(!qe().basalDragulaRuleForContainer(g, e) || !c || !p(g));
1544
1212
  }
1545
- function l(y) {
1546
- ue();
1213
+ function s(g) {
1214
+ ve();
1547
1215
  }
1548
- function c() {
1216
+ function i() {
1549
1217
  return t.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
1550
1218
  }
1551
- function u(y, h) {
1552
- const A = t;
1553
- if ((A.appearance && A.appearance.class || "").split(" ").includes("f-form-layout")) {
1554
- const { label: x } = y, L = q("form-group");
1555
- return L.editor = h, L.label = x, b(L), delete L.editor.id, delete L.editor.binding, delete L.editor.appearance, delete L.editor.visible, L;
1219
+ function o(g, M) {
1220
+ const I = t;
1221
+ if ((I.appearance && I.appearance.class || "").split(" ").includes("f-form-layout")) {
1222
+ const { label: T } = g, k = _("form-group");
1223
+ return k.editor = M, k.label = T, d(k), delete k.editor.id, delete k.editor.binding, delete k.editor.appearance, delete k.editor.visible, k;
1556
1224
  }
1557
- return h;
1558
- }
1559
- function b(y) {
1560
- const h = n.componentInstance.value.getBelongedComponentInstance(n.componentInstance);
1561
- if (h && h.schema && h.schema.componentType) {
1562
- const A = h.schema.formColumns, T = O(A);
1563
- y.appearance || (y.appearance = {}), y.appearance.class = T;
1225
+ return M;
1226
+ }
1227
+ function d(g) {
1228
+ const M = a.componentInstance.value.getBelongedComponentInstance(a.componentInstance);
1229
+ if (M && M.schema && M.schema.componentType) {
1230
+ const I = M.schema.formColumns;
1231
+ let y = m(I);
1232
+ y = e == null ? void 0 : e.formSchemaUtils.getControlClassByFormUnifiedLayout(y, "", a.schema), g.appearance || (g.appearance = {}), g.appearance.class = y;
1564
1233
  }
1565
1234
  }
1566
- function O(y) {
1567
- let h = "";
1568
- switch (y) {
1235
+ function m(g) {
1236
+ let M = "";
1237
+ switch (g) {
1569
1238
  case 1: {
1570
- h = "col-12 col-md-12 col-xl-12 col-el-12";
1239
+ M = "col-12";
1571
1240
  break;
1572
1241
  }
1573
1242
  case 2: {
1574
- h = "col-12 col-md-6 col-xl-6 col-el-6";
1243
+ M = "col-12 col-md-6 col-xl-6 col-el-6";
1575
1244
  break;
1576
1245
  }
1577
1246
  case 3: {
1578
- h = "col-12 col-md-6 col-xl-4 col-el-4";
1247
+ M = "col-12 col-md-6 col-xl-4 col-el-4";
1579
1248
  break;
1580
1249
  }
1581
1250
  case 4: {
1582
- h = "col-12 col-md-6 col-xl-3 col-el-2";
1251
+ M = "col-12 col-md-6 col-xl-3 col-el-2";
1583
1252
  break;
1584
1253
  }
1585
1254
  }
1586
- return h;
1255
+ return M;
1587
1256
  }
1588
- function P(y, h, A) {
1589
- const T = t;
1590
- if ((T.appearance && T.appearance.class || "").split(" ").includes("f-form-layout")) {
1591
- const L = String(y.innerText), $ = q("form-group");
1592
- return $.editor = A, $.label = L, $;
1593
- }
1594
- return A;
1257
+ function C() {
1258
+ return l;
1595
1259
  }
1596
- function S() {
1597
- return !g;
1260
+ function v() {
1261
+ return n;
1598
1262
  }
1599
- function M() {
1600
- return !g;
1263
+ function h() {
1264
+ return !1;
1601
1265
  }
1602
- function j() {
1603
- return r;
1266
+ function b(g) {
1267
+ return new Ye(g, e).getPropertyConfig(t, a.componentInstance.value);
1604
1268
  }
1605
1269
  return {
1606
- canAccepts: m,
1607
- checkCanDeleteComponent: M,
1608
- checkCanMoveComponent: S,
1609
- getStyles: c,
1610
- hideNestedPaddingInDesginerView: j,
1611
- onAcceptNewChildElement: P,
1612
- onAcceptMovedChildElement: l,
1613
- resolveComponentContext: C,
1614
- onResolveNewComponentSchema: u,
1615
- triggerBelongedComponentToMoveWhenMoved: d,
1616
- triggerBelongedComponentToDeleteWhenDeleted: o
1270
+ canAccepts: u,
1271
+ checkCanDeleteComponent: v,
1272
+ checkCanMoveComponent: C,
1273
+ getStyles: i,
1274
+ getPropsConfig: b,
1275
+ hideNestedPaddingInDesginerView: h,
1276
+ onAcceptMovedChildElement: s,
1277
+ onResolveNewComponentSchema: o
1617
1278
  };
1618
1279
  }
1619
- const Ze = /* @__PURE__ */ R({
1280
+ const Re = /* @__PURE__ */ R({
1620
1281
  name: "FPagination",
1621
- props: Z,
1282
+ props: J,
1622
1283
  emits: ["pageIndexChanged", "pageSizeChanged"],
1623
- setup(n, e) {
1624
- var W;
1625
- const t = N(!1), i = N(n.mode), a = N(""), d = N(!1), o = N(n.pageSize), s = N(n.currentPage), r = N(n.totalItems), f = N(), g = fe("design-item-context"), v = Ye(g.schema, (W = g.parent) == null ? void 0 : W.schema), m = ze(f, g, v);
1626
- de(() => {
1627
- f.value.componentInstance = m;
1628
- }), e.expose(m.value);
1284
+ setup(a, e) {
1285
+ var Y;
1286
+ const t = S(!1), r = S(a.mode), l = S(""), c = S(!1), n = S(a.pageSize), p = S(a.currentPage), u = S(a.totalItems), s = S(), i = ge("design-item-context"), o = Ze(i.schema, (Y = i.parent) == null ? void 0 : Y.schema), d = ze(s, i, o);
1287
+ he(() => {
1288
+ s.value.componentInstance = d;
1289
+ }), e.expose(d.value);
1629
1290
  const {
1630
- pages: C,
1631
- updatePages: l
1632
- } = le(), c = w(() => s.value === 1), u = w(() => [20, 50, 100]), b = w(() => Math.ceil(r.value / o.value)), O = w(() => s.value === b.value), P = w(() => !0), S = w(() => s.value > 1), M = w(() => !(d.value && C.value.length <= 1)), j = w(() => !0), k = w(() => !0), y = w(() => !0), h = w(() => !0), {
1633
- renderFirstPage: A,
1634
- renderPreviousPage: T
1635
- } = ce(s, c, S), {
1636
- renderLastPage: D,
1637
- renderNextPage: x
1638
- } = oe(s, O, b), {
1639
- renderPageInfo: L
1640
- } = ae(a, r), {
1641
- renderPageList: $
1642
- } = se(s, o, u, r), {
1643
- renderPageNumbers: F
1644
- } = re(s, C), {
1291
+ pages: m,
1292
+ updatePages: C
1293
+ } = re(), v = w(() => p.value === 1), h = w(() => [20, 50, 100]), b = w(() => Math.ceil(u.value / n.value)), g = w(() => p.value === b.value), M = w(() => !0), I = w(() => p.value > 1), y = w(() => !(c.value && m.value.length <= 1)), L = w(() => !0), T = w(() => !0), k = w(() => !0), D = w(() => !0), {
1294
+ renderFirstPage: E,
1295
+ renderPreviousPage: A
1296
+ } = ie(p, v, I, n, e), {
1297
+ renderLastPage: O,
1298
+ renderNextPage: j
1299
+ } = ae(p, g, b, n, e), {
1300
+ renderPageInfo: Q
1301
+ } = oe(l, u), {
1302
+ renderPageList: W
1303
+ } = le(p, n, h, u, e), {
1304
+ renderPageNumbers: z
1305
+ } = se(p, m, n, e), {
1645
1306
  renderGotoButton: V
1646
- } = ne(s, b);
1647
- l(s.value, o.value, r.value, 7), B([s, o], () => {
1648
- l(s.value, o.value, r.value, 7);
1649
- }), B(s, () => {
1650
- e.emit("pageIndexChanged", s.value);
1651
- }), B(o, () => {
1652
- e.emit("pageSizeChanged", o.value);
1307
+ } = ne(p, b, n, e);
1308
+ C(p.value, n.value, u.value, 7), N([p, n], () => {
1309
+ C(p.value, n.value, u.value, 7);
1310
+ }), N(p, () => {
1311
+ e.emit("pageIndexChanged", p.value);
1312
+ }), N(n, () => {
1313
+ e.emit("pageSizeChanged", n.value);
1653
1314
  });
1654
- const z = w(() => ({
1315
+ const q = w(() => ({
1655
1316
  "ngx-pagination": !0,
1656
1317
  pagination: !0,
1657
1318
  responsive: t.value,
1658
- "pager-viewmode-default": i.value === "default",
1659
- "pager-viewmode-simple": i.value === "simple"
1660
- })), E = w(() => ({
1319
+ "pager-viewmode-default": r.value === "default",
1320
+ "pager-viewmode-simple": r.value === "simple"
1321
+ })), B = w(() => ({
1661
1322
  position: "relative",
1662
- "justify-content": a.value === "center" ? "center" : "start"
1323
+ "justify-content": l.value === "center" ? "center" : "start"
1663
1324
  }));
1664
- function Q() {
1665
- return p(_, null, [j.value && L(), k.value && $(), h.value && A(), h.value && T(), y.value && F(), h.value && x(), h.value && D(), P.value && V()]);
1325
+ function ce() {
1326
+ return f($, null, [L.value && Q(), T.value && W(), D.value && E(), D.value && A(), k.value && z(), D.value && j(), D.value && O(), M.value && V()]);
1666
1327
  }
1667
- function U() {
1668
- return p(_, null, [p("li", {
1328
+ function ue() {
1329
+ return f($, null, [f("li", {
1669
1330
  class: "page-item d-flex flex-fill"
1670
- }, null), h.value && A(), h.value && T(), V(), p("li", {
1331
+ }, null), D.value && E(), D.value && A(), V(), f("li", {
1671
1332
  class: "page-item page-separator",
1672
1333
  style: "margin-left: 10px"
1673
- }, [p("span", {
1334
+ }, [f("span", {
1674
1335
  style: "font-size: 15px; font-weight: 200;"
1675
- }, [H(" /")])]), p("li", {
1336
+ }, [G(" /")])]), f("li", {
1676
1337
  class: "page-item page-total",
1677
1338
  style: "margin-left: 5px"
1678
- }, [p("span", {
1339
+ }, [f("span", {
1679
1340
  style: "font-size: 16px; font-weight: 600;"
1680
- }, [H(" "), b.value])]), h.value && x(), h.value && D()]);
1341
+ }, [G(" "), b.value])]), D.value && j(), D.value && O()]);
1681
1342
  }
1682
- return () => p("div", {
1683
- ref: f,
1343
+ return () => f("div", {
1344
+ ref: s,
1684
1345
  class: "pagination-container"
1685
- }, [M.value && p("ul", {
1346
+ }, [y.value && f("ul", {
1686
1347
  role: "navigation",
1687
- class: z.value,
1688
- style: E.value
1689
- }, [i.value === "default" ? Q() : U()])]);
1348
+ class: q.value,
1349
+ style: B.value
1350
+ }, [r.value === "default" ? ce() : ue()])]);
1690
1351
  }
1691
1352
  });
1692
- J.register = (n, e, t) => {
1693
- n.pagination = J, e.pagination = te;
1353
+ U.register = (a, e, t) => {
1354
+ a.pagination = U, e.pagination = te;
1694
1355
  };
1695
- J.registerDesigner = (n, e, t) => {
1696
- n.pagination = Ze, e.pagination = te;
1356
+ U.registerDesigner = (a, e, t) => {
1357
+ a.pagination = Re, e.pagination = te;
1697
1358
  };
1698
- const et = be(J);
1359
+ const at = ye(U);
1699
1360
  export {
1700
- J as FPagination,
1701
- et as default,
1702
- Z as paginationProps,
1361
+ U as FPagination,
1362
+ at as default,
1363
+ J as paginationProps,
1703
1364
  te as propsResolver
1704
1365
  };