@farris/ui-vue 1.3.1 → 1.3.3

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 (259) hide show
  1. package/components/accordion/index.esm.js +103 -99
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +301 -351
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/binding-selector/index.esm.js +444 -0
  6. package/components/binding-selector/index.umd.cjs +1 -0
  7. package/components/binding-selector/package.json +8 -0
  8. package/components/border-editor/index.esm.js +5 -3
  9. package/components/border-editor/index.umd.cjs +1 -1
  10. package/components/button-edit/index.esm.js +143 -139
  11. package/components/button-edit/index.umd.cjs +1 -1
  12. package/components/calendar/index.esm.js +407 -396
  13. package/components/calendar/index.umd.cjs +1 -1
  14. package/components/capsule/index.esm.js +266 -255
  15. package/components/capsule/index.umd.cjs +1 -1
  16. package/components/checkbox/index.esm.js +628 -641
  17. package/components/checkbox/index.umd.cjs +1 -1
  18. package/components/color-picker/index.esm.js +379 -374
  19. package/components/color-picker/index.umd.cjs +2 -2
  20. package/components/combo-list/index.esm.js +471 -471
  21. package/components/combo-list/index.umd.cjs +1 -1
  22. package/components/combo-tree/index.esm.js +155 -148
  23. package/components/combo-tree/index.umd.cjs +1 -1
  24. package/components/common/index.esm.js +487 -478
  25. package/components/common/index.umd.cjs +1 -1
  26. package/components/component/index.esm.js +330 -279
  27. package/components/component/index.umd.cjs +1 -1
  28. package/components/condition/index.esm.js +1171 -1277
  29. package/components/condition/index.umd.cjs +1 -1
  30. package/components/content-container/index.esm.js +220 -204
  31. package/components/content-container/index.umd.cjs +1 -1
  32. package/components/data-grid/index.esm.js +4743 -4641
  33. package/components/data-grid/index.umd.cjs +1 -1
  34. package/components/data-view/index.esm.js +2916 -3019
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.esm.js +2375 -2590
  37. package/components/date-picker/index.umd.cjs +1 -1
  38. package/components/designer-canvas/index.css +1 -1
  39. package/components/designer-canvas/index.esm.js +9518 -1198
  40. package/components/designer-canvas/index.umd.cjs +1 -1
  41. package/components/designer-outline/index.esm.js +2 -1
  42. package/components/designer-outline/index.umd.cjs +1 -1
  43. package/components/drawer/index.esm.js +34 -38
  44. package/components/drawer/index.umd.cjs +1 -1
  45. package/components/dropdown/index.esm.js +149 -138
  46. package/components/dropdown/index.umd.cjs +2 -2
  47. package/components/dynamic-form/index.esm.js +1602 -1740
  48. package/components/dynamic-form/index.umd.cjs +1 -1
  49. package/components/dynamic-resolver/index.esm.js +159 -151
  50. package/components/dynamic-resolver/index.umd.cjs +1 -1
  51. package/components/dynamic-view/index.esm.js +218 -218
  52. package/components/dynamic-view/index.umd.cjs +1 -1
  53. package/components/event-parameter/index.esm.js +311 -0
  54. package/components/event-parameter/index.umd.cjs +1 -0
  55. package/components/event-parameter/package.json +8 -0
  56. package/components/events-editor/index.css +1 -1
  57. package/components/events-editor/index.esm.js +533 -563
  58. package/components/events-editor/index.umd.cjs +1 -1
  59. package/components/expression-editor/index.esm.js +95 -91
  60. package/components/expression-editor/index.umd.cjs +1 -1
  61. package/components/external-container/index.esm.js +2356 -2455
  62. package/components/external-container/index.umd.cjs +1 -1
  63. package/components/field-selector/index.esm.js +3048 -3308
  64. package/components/field-selector/index.umd.cjs +1 -1
  65. package/components/filter-bar/index.css +1 -1
  66. package/components/filter-bar/index.esm.js +10537 -3249
  67. package/components/filter-bar/index.umd.cjs +1 -1
  68. package/components/flow-canvas/index.css +1 -1
  69. package/components/flow-canvas/index.esm.js +9781 -1327
  70. package/components/flow-canvas/index.umd.cjs +1 -1
  71. package/components/image-cropper/index.esm.js +353 -341
  72. package/components/image-cropper/index.umd.cjs +1 -1
  73. package/components/input-group/index.esm.js +510 -827
  74. package/components/input-group/index.umd.cjs +1 -1
  75. package/components/layout/index.esm.js +278 -268
  76. package/components/layout/index.umd.cjs +1 -1
  77. package/components/list-nav/index.esm.js +144 -136
  78. package/components/list-nav/index.umd.cjs +1 -1
  79. package/components/list-view/index.esm.js +2139 -2237
  80. package/components/list-view/index.umd.cjs +1 -1
  81. package/components/lookup/index.esm.js +6414 -6367
  82. package/components/lookup/index.umd.cjs +1 -1
  83. package/components/mapping-editor/index.esm.js +5216 -5114
  84. package/components/mapping-editor/index.umd.cjs +1 -1
  85. package/components/message-box/index.esm.js +252 -252
  86. package/components/message-box/index.umd.cjs +1 -1
  87. package/components/modal/index.esm.js +70 -70
  88. package/components/modal/index.umd.cjs +1 -1
  89. package/components/nav/index.esm.js +486 -984
  90. package/components/nav/index.umd.cjs +3 -3
  91. package/components/number-range/index.esm.js +446 -498
  92. package/components/number-range/index.umd.cjs +1 -1
  93. package/components/number-spinner/index.esm.js +363 -388
  94. package/components/number-spinner/index.umd.cjs +1 -1
  95. package/components/order/index.esm.js +1050 -1308
  96. package/components/order/index.umd.cjs +1 -1
  97. package/components/page-footer/index.esm.js +134 -131
  98. package/components/page-footer/index.umd.cjs +1 -1
  99. package/components/page-header/index.esm.js +1072 -1082
  100. package/components/page-header/index.umd.cjs +1 -1
  101. package/components/pagination/index.esm.js +412 -910
  102. package/components/pagination/index.umd.cjs +1 -1
  103. package/components/progress/index.esm.js +214 -203
  104. package/components/progress/index.umd.cjs +3 -3
  105. package/components/property-editor/index.esm.js +1361 -1536
  106. package/components/property-editor/index.umd.cjs +2 -2
  107. package/components/property-panel/index.esm.js +650 -677
  108. package/components/property-panel/index.umd.cjs +1 -1
  109. package/components/query-solution/index.css +1 -1
  110. package/components/query-solution/index.esm.js +12344 -5048
  111. package/components/query-solution/index.umd.cjs +6 -1
  112. package/components/radio-button/index.esm.js +97 -97
  113. package/components/radio-button/index.umd.cjs +1 -1
  114. package/components/radio-group/index.css +1 -1
  115. package/components/radio-group/index.esm.js +1821 -565
  116. package/components/radio-group/index.umd.cjs +1 -1
  117. package/components/rate/index.esm.js +251 -244
  118. package/components/rate/index.umd.cjs +1 -1
  119. package/components/response-layout/index.esm.js +151 -140
  120. package/components/response-layout/index.umd.cjs +1 -1
  121. package/components/response-layout-editor/index.esm.js +707 -676
  122. package/components/response-layout-editor/index.umd.cjs +1 -1
  123. package/components/response-toolbar/index.esm.js +719 -740
  124. package/components/response-toolbar/index.umd.cjs +1 -1
  125. package/components/schema-selector/index.esm.js +4977 -5249
  126. package/components/schema-selector/index.umd.cjs +2 -2
  127. package/components/search-box/index.esm.js +145 -134
  128. package/components/search-box/index.umd.cjs +1 -1
  129. package/components/section/index.esm.js +348 -337
  130. package/components/section/index.umd.cjs +1 -1
  131. package/components/smoke-detector/index.esm.js +141 -130
  132. package/components/smoke-detector/index.umd.cjs +1 -1
  133. package/components/splitter/index.esm.js +311 -301
  134. package/components/splitter/index.umd.cjs +1 -1
  135. package/components/step/index.esm.js +231 -220
  136. package/components/step/index.umd.cjs +1 -1
  137. package/components/switch/index.esm.js +385 -432
  138. package/components/switch/index.umd.cjs +1 -1
  139. package/components/tabs/index.esm.js +1932 -1914
  140. package/components/tabs/index.umd.cjs +1 -1
  141. package/components/tags/index.esm.js +351 -340
  142. package/components/tags/index.umd.cjs +1 -1
  143. package/components/text/index.esm.js +209 -199
  144. package/components/text/index.umd.cjs +1 -1
  145. package/components/textarea/index.esm.js +388 -415
  146. package/components/textarea/index.umd.cjs +1 -1
  147. package/components/time-picker/index.esm.js +619 -666
  148. package/components/time-picker/index.umd.cjs +1 -1
  149. package/components/transfer/index.esm.js +493 -486
  150. package/components/transfer/index.umd.cjs +1 -1
  151. package/components/tree-grid/index.esm.js +3169 -3278
  152. package/components/tree-grid/index.umd.cjs +1 -1
  153. package/components/tree-view/index.esm.js +2320 -2418
  154. package/components/tree-view/index.umd.cjs +1 -1
  155. package/components/uploader/index.esm.js +563 -554
  156. package/components/uploader/index.umd.cjs +2 -2
  157. package/components/verify-detail/index.esm.js +287 -276
  158. package/components/verify-detail/index.umd.cjs +1 -1
  159. package/components/video/index.esm.js +368 -324
  160. package/components/video/index.umd.cjs +1 -1
  161. package/components/weather/index.esm.js +498 -487
  162. package/components/weather/index.umd.cjs +5 -5
  163. package/farris.all.esm.js +51302 -47651
  164. package/farris.all.umd.cjs +14 -9
  165. package/index.css +1 -1
  166. package/package.json +1 -1
  167. package/types/binding-selector/index.d.ts +55 -0
  168. package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
  169. package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
  170. package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
  171. package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
  172. package/types/combo-list/src/components/list-container.component.d.ts +6 -6
  173. package/types/combo-list/src/components/list-container.props.d.ts +1 -1
  174. package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
  175. package/types/common/entity/entity-schema.d.ts +26 -11
  176. package/types/common/index.d.ts +1 -0
  177. package/types/common/types.d.ts +2 -2
  178. package/types/condition/src/condition-fields.design.component.d.ts +18 -0
  179. package/types/condition/src/types.d.ts +6 -6
  180. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
  181. package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
  182. package/types/data-grid/src/data-grid.props.d.ts +2 -2
  183. package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
  184. package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
  185. package/types/data-view/composition/types.d.ts +2 -2
  186. package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
  187. package/types/date-picker/src/components/month/month.component.d.ts +3 -3
  188. package/types/date-picker/src/components/year/year.component.d.ts +3 -3
  189. package/types/designer-canvas/index.d.ts +2 -1
  190. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  191. package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
  192. package/types/designer-canvas/src/composition/types.d.ts +49 -40
  193. package/types/designer-canvas/src/types.d.ts +8 -20
  194. package/types/dynamic-form/index.d.ts +1 -1
  195. package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
  196. package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
  197. package/types/dynamic-form/src/types.d.ts +1 -1
  198. package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +5 -0
  199. package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
  200. package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
  201. package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
  202. package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
  203. package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
  204. package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
  205. package/types/event-parameter/index.d.ts +31 -0
  206. package/types/event-parameter/src/composition/type.d.ts +77 -0
  207. package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
  208. package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
  209. package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
  210. package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
  211. package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
  212. package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
  213. package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
  214. package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
  215. package/types/field-selector/src/field-selector.component.d.ts +1 -2
  216. package/types/field-selector/src/field-selector.props.d.ts +0 -9
  217. package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
  218. package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
  219. package/types/list-view/src/list-view-table.component.d.ts +15 -0
  220. package/types/lookup/src/composition/use-user-data.d.ts +2 -2
  221. package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
  222. package/types/modal/src/composition/modal.service.d.ts +2 -1
  223. package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
  224. package/types/page-header/src/page-header.component.d.ts +1 -1
  225. package/types/property-panel/index.d.ts +2 -1
  226. package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
  227. package/types/property-panel/src/composition/type.d.ts +0 -13
  228. package/types/query-solution/src/composition/types.d.ts +35 -4
  229. package/types/query-solution/src/composition/use-header.d.ts +21 -0
  230. package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
  231. package/types/query-solution/src/composition/use-solution.d.ts +20 -0
  232. package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +17 -16
  233. package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
  234. package/types/query-solution/src/property-config/query-solution.property-config.d.ts +3 -51
  235. package/types/query-solution/src/query-solution.d.ts +10 -2
  236. package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
  237. package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
  238. package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
  239. package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
  240. package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
  241. package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
  242. package/types/section/src/property-config/section.property-config.d.ts +17 -17
  243. package/types/section/src/schema/schema-resolver.d.ts +1 -2
  244. package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
  245. package/types/tabs/src/composition/types.d.ts +4 -1
  246. package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
  247. package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
  248. package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
  249. package/types/text/src/composition/types.d.ts +4 -4
  250. package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
  251. package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
  252. package/types/weather/src/composition/use-weather-color.d.ts +15 -0
  253. package/types/weather/src/composition/use-weather-data.d.ts +15 -0
  254. package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
  255. package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
  256. package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
  257. package/types/weather/src/composition/types.d.ts +0 -2
  258. /package/types/dynamic-form/src/designer/{use-designer-rules.d.ts → response-form-use-designer-rules.d.ts} +0 -0
  259. /package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +0 -0
@@ -1,154 +1,115 @@
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;
1
+ import { ref as m, watch as M, createVNode as r, computed as d, defineComponent as J, watchEffect as oe, Fragment as A, createTextVNode as R, inject as re, onMounted as ie } from "vue";
2
+ import { isPlainObject as H, cloneDeep as ue } from "lodash-es";
3
+ import { withInstall as ce } from "../common/index.esm.js";
4
+ const Q = {}, U = {};
5
+ function q(t) {
6
+ const { properties: e, title: p, ignore: i } = t, l = i && Array.isArray(i), c = Object.keys(e).reduce((a, n) => ((!l || !i.find((u) => u === n)) && (a[n] = e[n].type === "object" && e[n].properties ? q(e[n]) : ue(e[n].default)), a), {});
7
+ if (p && (!l || !i.find((a) => a === "id"))) {
8
+ const a = p.toLowerCase().replace(/-/g, "_");
9
+ c.id = `${a}_${Math.random().toString().slice(2, 6)}`;
10
+ }
11
+ return c;
12
12
  }
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;
13
+ function X(t, e = {}, p) {
14
+ const i = Q[t];
15
+ if (i) {
16
+ let l = q(i);
17
+ const c = U[t];
18
+ return l = c ? c({ getSchemaByType: X }, l, e, p) : l, l;
19
19
  }
20
20
  return null;
21
21
  }
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;
22
+ function pe(t, e) {
23
+ const p = q(e);
24
+ return Object.keys(p).reduce((i, l) => (i[l] && H(i[l]) && H(t[l] || !t[l]) ? Object.assign(i[l], t[l] || {}) : i[l] = t[l], i), p), p;
25
25
  }
26
- function be(a, e) {
27
- return Object.keys(a).filter((r) => a[r] != null).reduce((r, l) => {
26
+ function fe(t, e) {
27
+ return Object.keys(t).filter((i) => t[i] != null).reduce((i, l) => {
28
28
  if (e.has(l)) {
29
29
  const c = e.get(l);
30
30
  if (typeof c == "string")
31
- r[c] = a[l];
31
+ i[c] = t[l];
32
32
  else {
33
- const n = c(l, a[l], a);
34
- Object.assign(r, n);
33
+ const a = c(l, t[l], t);
34
+ Object.assign(i, a);
35
35
  }
36
36
  } else
37
- r[l] = a[l];
38
- return r;
37
+ i[l] = t[l];
38
+ return i;
39
39
  }, {});
40
40
  }
41
- function Me(a, e, t = /* @__PURE__ */ new Map()) {
42
- const r = Ce(a, e);
43
- return be(r, t);
41
+ function ve(t, e, p = /* @__PURE__ */ new Map()) {
42
+ const i = pe(t, e);
43
+ return fe(i, p);
44
44
  }
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);
45
+ function ge(t = {}) {
46
+ function e(o, s, f, v) {
47
+ if (typeof f == "number")
48
+ return v[o].length === f;
49
+ if (typeof f == "object") {
50
+ const h = Object.keys(f)[0], y = f[h];
51
+ if (h === "not")
52
+ return Number(v[o].length) !== Number(y);
53
+ if (h === "moreThan")
54
+ return Number(v[o].length) >= Number(y);
55
+ if (h === "lessThan")
56
+ return Number(v[o].length) <= Number(y);
57
57
  }
58
58
  return !1;
59
59
  }
60
- function t(s, i, o, d) {
61
- return d[s] && d[s].propertyValue && String(d[s].propertyValue.value) === String(o);
60
+ function p(o, s, f, v) {
61
+ return v[o] && v[o].propertyValue && String(v[o].propertyValue.value) === String(f);
62
62
  }
63
- const r = /* @__PURE__ */ new Map([
63
+ const i = /* @__PURE__ */ new Map([
64
64
  ["length", e],
65
- ["getProperty", t]
65
+ ["getProperty", p]
66
66
  ]);
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 };
67
+ Object.keys(t).reduce((o, s) => (o.set(s, t[s]), o), i);
68
+ function l(o, s) {
69
+ const f = o;
70
+ return typeof s == "number" ? [{ target: f, operator: "length", param: null, value: Number(s) }] : typeof s == "boolean" ? [{ target: f, operator: "getProperty", param: o, value: !!s }] : typeof s == "object" ? Object.keys(s).map((v) => {
71
+ if (v === "length")
72
+ return { target: f, operator: "length", param: null, value: s[v] };
73
+ const h = v, y = s[v];
74
+ return { target: f, operator: "getProperty", param: h, value: y };
75
75
  }) : [];
76
76
  }
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
+ function c(o) {
78
+ return Object.keys(o).reduce((f, v) => {
79
+ const h = l(v, o[v]);
80
+ return f.push(...h), f;
81
81
  }, []);
82
82
  }
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
+ function a(o, s) {
84
+ if (i.has(o.operator)) {
85
+ const f = i.get(o.operator);
86
+ return f && f(o.target, o.param, o.value, s) || !1;
87
87
  }
88
88
  return !1;
89
89
  }
90
- function p(s, i) {
91
- return c(s).reduce((m, C) => m && n(C, i), !0);
90
+ function n(o, s) {
91
+ return c(o).reduce((h, y) => h && a(y, s), !0);
92
92
  }
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);
93
+ function u(o, s) {
94
+ const f = Object.keys(o), v = f.includes("allOf"), h = f.includes("anyOf"), y = v || h, w = (y ? o[y ? v ? "allOf" : "anyOf" : "allOf"] : [o]).map((O) => n(O, s));
95
+ return v ? !w.includes(!1) : w.includes(!0);
96
96
  }
97
97
  return { parseValueSchema: u };
98
98
  }
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);
99
+ const de = {}, me = {};
100
+ ge();
101
+ function he(t, e, p = /* @__PURE__ */ new Map(), i = (a, n, u, o) => n, l = {}, c = (a) => a) {
102
+ return Q[e.title] = e, U[e.title] = i, de[e.title] = l, me[e.title] = c, (a = {}) => {
103
+ const n = ve(a, e, p), u = Object.keys(t).reduce((o, s) => (o[s] = t[s].default, o), {});
104
+ return Object.assign(u, n);
144
105
  };
145
106
  }
146
- function Se(a, e) {
107
+ function be(t, e) {
147
108
  return { customClass: e.class, customStyle: e.style };
148
109
  }
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 = {
110
+ const ye = /* @__PURE__ */ new Map([
111
+ ["appearance", be]
112
+ ]), Pe = "https://json-schema.org/draft/2020-12/schema", we = "https://farris-design.gitee.io/pagination.schema.json", Se = "pagination", je = "A Farris Component", ke = "object", Ne = {
152
113
  id: {
153
114
  description: "The unique identifier for a pagination",
154
115
  type: "string"
@@ -240,18 +201,18 @@ const ke = /* @__PURE__ */ new Map([
240
201
  type: "sting",
241
202
  default: ""
242
203
  }
243
- }, je = [
204
+ }, Oe = [
244
205
  "id",
245
206
  "type"
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 = {
207
+ ], Me = {
208
+ $schema: Pe,
209
+ $id: we,
210
+ title: Se,
211
+ description: je,
212
+ type: ke,
213
+ properties: Ne,
214
+ required: Oe
215
+ }, Le = "pagination", Te = "A Farris Component", Be = "object", Ee = {
255
216
  basic: {
256
217
  description: "Basic Infomation",
257
218
  title: "基本信息",
@@ -322,7 +283,7 @@ const ke = /* @__PURE__ */ new Map([
322
283
  },
323
284
  {
324
285
  value: "center",
325
- name: "居中对齐"
286
+ name: "居中"
326
287
  },
327
288
  {
328
289
  value: "right",
@@ -333,16 +294,16 @@ const ke = /* @__PURE__ */ new Map([
333
294
  }
334
295
  }
335
296
  }
336
- }, Ue = {
337
- title: Oe,
338
- description: Ve,
339
- type: $e,
340
- categories: Ge
297
+ }, ze = {
298
+ title: Le,
299
+ description: Te,
300
+ type: Be,
301
+ categories: Ee
341
302
  };
342
- function We(a, e, t) {
303
+ function $e(t, e, p) {
343
304
  return e;
344
305
  }
345
- const J = {
306
+ const W = {
346
307
  /**
347
308
  * 当前页码
348
309
  */
@@ -375,991 +336,532 @@ const J = {
375
336
  * 自定义每页数量
376
337
  */
377
338
  pageList: { type: Array, default: [20, 50, 100] }
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);
339
+ }, Y = he(W, Me, ye, $e, ze);
340
+ function Z(t, e, p, i) {
341
+ const l = m("跳转至"), c = m(""), a = m(t.value);
342
+ M(a, (s, f) => {
343
+ s >= 1 && s <= e.value ? t.value = s : a.value = f;
344
+ }), M(t, (s) => {
345
+ a.value !== s && (a.value = s);
385
346
  });
386
- function p(i) {
387
- n.value = i.target.valueAsNumber, r.emit("change", {
388
- pageIndex: n.value,
389
- pageSize: t.value
347
+ function n(s) {
348
+ a.value = s.target.valueAsNumber, i.emit("change", {
349
+ pageIndex: a.value,
350
+ pageSize: p.value
390
351
  });
391
352
  }
392
- function u(i) {
393
- i.key === "Enter" && (n.value = i.target.valueAsNumber, r.emit("change", {
394
- pageIndex: n.value,
395
- pageSize: t.value
353
+ function u(s) {
354
+ s.key === "Enter" && (a.value = s.target.valueAsNumber, i.emit("change", {
355
+ pageIndex: a.value,
356
+ pageSize: p.value
396
357
  }));
397
358
  }
398
- function s() {
399
- return f("li", {
359
+ function o() {
360
+ return r("li", {
400
361
  class: "page-goto-input d-flex flex-row",
401
362
  style: "padding-left: 10px; white-space: nowrap;"
402
- }, [f("span", {
363
+ }, [r("span", {
403
364
  class: "pg-message-text"
404
- }, [l.value]), f("input", {
365
+ }, [l.value]), r("input", {
405
366
  type: "number",
406
367
  class: "form-control farris-gotopagenumber",
407
- value: n.value,
368
+ value: a.value,
408
369
  min: "1",
409
370
  max: e.value,
410
371
  style: "display: inline-block;margin-left:3px;",
411
- onBlur: (i) => p(i),
412
- onKeyup: (i) => u(i)
372
+ onBlur: (s) => n(s),
373
+ onKeyup: (s) => u(s)
413
374
  }, null), c.value]);
414
375
  }
415
376
  return {
416
- renderGotoButton: s
377
+ renderGotoButton: o
417
378
  };
418
379
  }
419
- function ae(a, e, t, r, l) {
420
- const c = w(() => ({
380
+ function I(t, e, p, i, l) {
381
+ const c = d(() => ({
421
382
  "page-item": !0,
422
383
  disabled: e.value
423
384
  }));
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
385
+ function a(s) {
386
+ t.value = t.value < p.value ? t.value + 1 : p.value, l.emit("change", {
387
+ pageIndex: t.value,
388
+ pageSize: i.value
428
389
  });
429
390
  }
430
- function p(i) {
431
- a.value = t.value, l.emit("change", {
432
- pageIndex: a.value,
433
- pageSize: r.value
391
+ function n(s) {
392
+ t.value = p.value, l.emit("change", {
393
+ pageIndex: t.value,
394
+ pageSize: i.value
434
395
  });
435
396
  }
436
397
  function u() {
437
- return f("li", {
398
+ return r("li", {
438
399
  class: c.value
439
- }, [!e.value && f("a", {
400
+ }, [!e.value && r("a", {
440
401
  class: "page-link",
441
402
  tabindex: "0",
442
- onClick: (i) => n()
443
- }, [f("span", {
403
+ onClick: (s) => a()
404
+ }, [r("span", {
444
405
  class: "f-icon f-page-next"
445
- }, null)]), e.value && f("span", {
406
+ }, null)]), e.value && r("span", {
446
407
  class: "page-link"
447
- }, [f("span", {
408
+ }, [r("span", {
448
409
  class: "f-icon f-page-next"
449
410
  }, null)])]);
450
411
  }
451
- function s() {
452
- return f("li", {
412
+ function o() {
413
+ return r("li", {
453
414
  class: c.value
454
- }, [!e.value && f("a", {
415
+ }, [!e.value && r("a", {
455
416
  class: "page-link",
456
417
  tabindex: "0",
457
- onClick: (i) => p()
458
- }, [f("span", {
418
+ onClick: (s) => n()
419
+ }, [r("span", {
459
420
  class: "f-icon f-page-last"
460
- }, null)]), e.value && f("span", {
421
+ }, null)]), e.value && r("span", {
461
422
  class: "page-link"
462
- }, [f("span", {
423
+ }, [r("span", {
463
424
  class: "f-icon f-page-last"
464
425
  }, null)])]);
465
426
  }
466
427
  return {
467
- renderLastPage: s,
428
+ renderLastPage: o,
468
429
  renderNextPage: u
469
430
  };
470
431
  }
471
- function oe(a, e) {
472
- const t = S("共"), r = S("条"), l = w(() => ({
432
+ function K(t, e) {
433
+ const p = m("共"), i = m("条"), l = d(() => ({
473
434
  "pagination-message": !0,
474
435
  "text-truncate": !0,
475
436
  "d-flex": !0,
476
- "ml-auto": a.value === "right",
477
- "flex-fill": a.value === "right"
437
+ "ml-auto": t.value === "right",
438
+ "flex-fill": t.value === "right"
478
439
  }));
479
440
  function c() {
480
- return f("li", {
441
+ return r("li", {
481
442
  class: l.value
482
- }, [f("div", {
443
+ }, [r("div", {
483
444
  class: "text-truncate",
484
445
  style: "line-height: 26px"
485
- }, [f("span", {
446
+ }, [r("span", {
486
447
  class: "pg-message-text"
487
- }, [t.value]), f("b", {
448
+ }, [p.value]), r("b", {
488
449
  class: "pg-message-total"
489
- }, [e.value]), f("span", {
450
+ }, [e.value]), r("span", {
490
451
  class: "pg-message-text"
491
- }, [r.value])])]);
452
+ }, [i.value])])]);
492
453
  }
493
454
  return {
494
455
  renderPageInfo: c
495
456
  };
496
457
  }
497
- function le(a, e, t, r, l) {
498
- const c = S(!1), n = S("显示"), p = S("条"), u = w(() => ({
458
+ function ee(t, e, p, i, l) {
459
+ const c = m(!1), a = m("显示"), n = m("条"), u = d(() => ({
499
460
  dropup: !0,
500
461
  "dropdown-right": !0,
501
462
  "pg-pagelist": !0,
502
- "pagelist-disabled": r.value === 0,
463
+ "pagelist-disabled": i.value === 0,
503
464
  show: c.value
504
- })), s = w(() => ({
465
+ })), o = d(() => ({
505
466
  "dropdown-menu": !0,
506
467
  show: c.value
507
- })), i = (h) => ({
468
+ })), s = (b) => ({
508
469
  "w-100": !0,
509
470
  "dropdown-item": !0,
510
- active: e.value === h
471
+ active: e.value === b
511
472
  });
512
- function o(h) {
473
+ function f(b) {
513
474
  c.value = !0;
514
475
  }
515
- function d(h) {
476
+ function v(b) {
516
477
  c.value = !1;
517
478
  }
518
- function m(h, b, g) {
519
- const I = h * b - b + 1;
520
- return Math.ceil(I / g);
479
+ function h(b, w, N) {
480
+ const T = b * w - w + 1;
481
+ return Math.ceil(T / N);
521
482
  }
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,
483
+ function y(b, w) {
484
+ t.value = h(t.value, e.value, w), e.value = w, c.value = !1, l.emit("change", {
485
+ pageIndex: t.value,
525
486
  pageSize: e.value
526
487
  });
527
488
  }
528
- function v() {
529
- return f("li", {
489
+ function k() {
490
+ return r("li", {
530
491
  class: "pagination-pagelist"
531
- }, [f("div", {
492
+ }, [r("div", {
532
493
  class: u.value,
533
- onMouseenter: (h) => o(),
534
- onMouseleave: (h) => d()
535
- }, [f("div", {
494
+ onMouseenter: (b) => f(),
495
+ onMouseleave: (b) => v()
496
+ }, [r("div", {
536
497
  class: "pg-pagelist-info"
537
- }, [f("span", {
498
+ }, [r("span", {
538
499
  class: "pagelist-text"
539
- }, [n.value]), f("b", {
500
+ }, [a.value]), r("b", {
540
501
  class: "cur-pagesize"
541
- }, [e.value]), f("span", {
502
+ }, [e.value]), r("span", {
542
503
  class: "pagelist-text"
543
- }, [p.value]), f("i", {
504
+ }, [n.value]), r("i", {
544
505
  class: "f-icon f-icon-dropdown"
545
- }, null)]), f("div", {
546
- class: s.value,
506
+ }, null)]), r("div", {
507
+ class: o.value,
547
508
  style: "margin-bottom: -1px;"
548
- }, [t.value.map((h) => f("li", {
549
- class: i(h),
550
- onClick: (b) => C(b, h)
551
- }, [f("span", null, [h])]))])])]);
509
+ }, [p.value.map((b) => r("li", {
510
+ class: s(b),
511
+ onClick: (w) => y(w, b)
512
+ }, [r("span", null, [b])]))])])]);
552
513
  }
553
514
  return {
554
- renderPageList: v
515
+ renderPageList: k
555
516
  };
556
517
  }
557
- function se(a, e, t, r) {
518
+ function te(t, e, p, i) {
558
519
  const l = (u) => ({
559
520
  "page-item": !0,
560
- current: a.value === u.value,
521
+ current: t.value === u.value,
561
522
  ellipsis: u.label === "..."
562
523
  }), c = (u) => ({
563
524
  "f-icon": !0,
564
- "f-icon-arrow-seek-left": u.value < a.value,
565
- "f-icon-arrow-seek-right": u.value > a.value
525
+ "f-icon-arrow-seek-left": u.value < t.value,
526
+ "f-icon-arrow-seek-right": u.value > t.value
566
527
  });
567
- function n(u, s) {
568
- a.value = s, r.emit("change", {
569
- pageIndex: a.value,
570
- pageSize: t.value
528
+ function a(u, o) {
529
+ t.value = o, i.emit("change", {
530
+ pageIndex: t.value,
531
+ pageSize: p.value
571
532
  });
572
533
  }
573
- function p() {
574
- return e.value.map((u) => f("li", {
534
+ function n() {
535
+ return e.value.map((u) => r("li", {
575
536
  class: l(u)
576
- }, [a.value !== u.value && f("a", {
537
+ }, [t.value !== u.value && r("a", {
577
538
  class: "page-link",
578
539
  tabindex: "0",
579
- onClick: (s) => n(s, u.value)
580
- }, [f("span", {
540
+ onClick: (o) => a(o, u.value)
541
+ }, [r("span", {
581
542
  class: "page-link-label"
582
- }, [u.label]), u.label === "..." && f("i", {
543
+ }, [u.label]), u.label === "..." && r("i", {
583
544
  class: c(u)
584
- }, null)]), a.value === u.value && f("span", {
545
+ }, null)]), t.value === u.value && r("span", {
585
546
  class: "page-link"
586
547
  }, [u.label])]));
587
548
  }
588
549
  return {
589
- renderPageNumbers: p
550
+ renderPageNumbers: n
590
551
  };
591
552
  }
592
- function ie(a, e, t, r, l) {
593
- const c = w(() => ({
553
+ function ae(t, e, p, i, l) {
554
+ const c = d(() => ({
594
555
  "page-item": !0,
595
556
  disabled: e.value
596
557
  }));
597
- function n(i) {
598
- a.value = 1, l.emit("change", {
599
- pageIndex: a.value,
600
- pageSize: r.value
558
+ function a(s) {
559
+ t.value = 1, l.emit("change", {
560
+ pageIndex: t.value,
561
+ pageSize: i.value
601
562
  });
602
563
  }
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
564
+ function n(s) {
565
+ t.value = t.value > 2 ? t.value - 1 : 1, l.emit("change", {
566
+ pageIndex: t.value,
567
+ pageSize: i.value
607
568
  });
608
569
  }
609
570
  function u() {
610
- return f("li", {
571
+ return r("li", {
611
572
  class: c.value
612
- }, [t.value && f("a", {
573
+ }, [p.value && r("a", {
613
574
  tabindex: "0",
614
575
  class: "page-link",
615
- onClick: (i) => n()
616
- }, [f("span", {
576
+ onClick: (s) => a()
577
+ }, [r("span", {
617
578
  class: "f-icon f-page-first"
618
- }, null)]), e.value && f("span", {
579
+ }, null)]), e.value && r("span", {
619
580
  class: "page-link"
620
- }, [f("span", {
581
+ }, [r("span", {
621
582
  class: "f-icon f-page-first"
622
583
  }, null)])]);
623
584
  }
624
- function s() {
625
- return f("li", {
585
+ function o() {
586
+ return r("li", {
626
587
  class: c.value
627
- }, [t.value && f("a", {
588
+ }, [p.value && r("a", {
628
589
  tabindex: "0",
629
590
  class: "page-link",
630
- onClick: (i) => p()
631
- }, [f("span", {
591
+ onClick: (s) => n()
592
+ }, [r("span", {
632
593
  class: "f-icon f-page-pre"
633
- }, null)]), e.value && f("span", {
594
+ }, null)]), e.value && r("span", {
634
595
  class: "page-link"
635
- }, [f("span", {
596
+ }, [r("span", {
636
597
  class: "f-icon f-page-pre"
637
598
  }, null)])]);
638
599
  }
639
600
  return {
640
601
  renderFirstPage: u,
641
- renderPreviousPage: s
602
+ renderPreviousPage: o
642
603
  };
643
604
  }
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++;
605
+ function ne(t) {
606
+ const e = m([]);
607
+ function p(l, c, a, n) {
608
+ const u = Math.ceil(a / 2);
609
+ return l === a ? n : l === 1 ? l : a < n ? n - u < c ? n - a + l : u < c ? c - u + l : l : l;
610
+ }
611
+ function i(l, c, a, n) {
612
+ const u = [], o = Math.ceil(a / c), s = Math.ceil(n / 2), f = l <= s, v = o - s < l, h = !f && !v, y = n < o;
613
+ let k = 1;
614
+ for (; k <= o && k <= n; ) {
615
+ const b = p(k, l, n, o), w = k === 2 && (h || v), N = k === n - 1 && (h || f), O = y && (w || N) ? "..." : "" + b;
616
+ u.push({ label: O, value: b }), k++;
656
617
  }
657
618
  e.value = u;
658
619
  }
659
- return { pages: e, updatePages: r };
620
+ return { pages: e, updatePages: i };
660
621
  }
661
- const U = /* @__PURE__ */ R({
622
+ const V = /* @__PURE__ */ J({
662
623
  name: "FPagination",
663
- props: J,
624
+ props: W,
664
625
  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), {
626
+ setup(t, e) {
627
+ const p = m(!1), i = m(t.mode), l = m(""), c = m(!1), a = m(t.pageSize), n = m(t.currentPage), u = m(t.totalItems), {
628
+ pages: o,
629
+ updatePages: s
630
+ } = ne(), f = d(() => n.value === 1), v = d(() => t.pageList), h = d(() => Math.ceil(u.value / a.value)), y = d(() => n.value === h.value), k = d(() => t.showGoButton), b = d(() => n.value > 1), w = d(() => !(c.value && o.value.length <= 1)), N = d(() => !0), O = d(() => t.showPageList), T = d(() => t.showPageNumbers), g = d(() => !0), {
631
+ renderFirstPage: j,
632
+ renderPreviousPage: S
633
+ } = ae(n, f, b, a, e), {
634
+ renderLastPage: P,
635
+ renderNextPage: B
636
+ } = I(n, y, h, a, e), {
676
637
  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
638
+ } = K(l, u), {
639
+ renderPageList: z
640
+ } = ee(n, a, v, u, e), {
641
+ renderPageNumbers: $
642
+ } = te(n, o, a, e), {
643
+ renderGotoButton: D
644
+ } = Z(n, h, a, e);
645
+ s(n.value, a.value, u.value, 7), M(() => t.totalItems, (L) => {
646
+ u.value = L;
647
+ }), M([n, a, u], () => {
648
+ s(n.value, a.value, u.value, 7);
649
+ }), M(n, () => {
650
+ e.emit("update:currentPage", n.value), e.emit("pageIndexChanged", {
651
+ pageIndex: n.value,
652
+ pageSize: a.value
692
653
  });
693
- }), N(n, () => {
694
- e.emit("update:pageSize", n.value), e.emit("pageSizeChanged", {
695
- pageIndex: p.value,
696
- pageSize: n.value
654
+ }), M(a, () => {
655
+ e.emit("update:pageSize", a.value), e.emit("pageSizeChanged", {
656
+ pageIndex: n.value,
657
+ pageSize: a.value
697
658
  });
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];
659
+ }), M(() => t.totalItems, (L) => {
660
+ u.value = L, s(n.value, a.value, u.value, 7);
661
+ }), oe(() => {
662
+ const L = v.value.includes(a.value);
663
+ a.value = L ? a.value : v.value[0];
703
664
  })();
704
- const W = w(() => ({
665
+ const x = d(() => ({
705
666
  "ngx-pagination": !0,
706
667
  pagination: !0,
707
- responsive: t.value,
708
- "pager-viewmode-default": r.value === "default",
709
- "pager-viewmode-simple": r.value === "simple"
710
- })), z = w(() => ({
668
+ responsive: p.value,
669
+ "pager-viewmode-default": i.value === "default",
670
+ "pager-viewmode-simple": i.value === "simple"
671
+ })), F = d(() => ({
711
672
  position: "relative",
712
673
  "justify-content": l.value === "center" ? "center" : "start"
713
674
  }));
714
- function V() {
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()]);
675
+ function C() {
676
+ return r(A, null, [N.value && E(), O.value && z(), g.value && j(), g.value && S(), T.value && $(), g.value && B(), g.value && P(), k.value && D()]);
716
677
  }
717
- function q() {
718
- return f($, null, [f("li", {
678
+ function G() {
679
+ return r(A, null, [r("li", {
719
680
  class: "page-item d-flex flex-fill"
720
- }, null), y.value && L(), y.value && T(), j(), f("li", {
681
+ }, null), g.value && j(), g.value && S(), D(), r("li", {
721
682
  class: "page-item page-separator",
722
683
  style: "margin-left: 10px"
723
- }, [f("span", {
684
+ }, [r("span", {
724
685
  style: "font-size: 15px; font-weight: 200;"
725
- }, [G(" /")])]), f("li", {
686
+ }, [R(" /")])]), r("li", {
726
687
  class: "page-item page-total",
727
688
  style: "margin-left: 5px"
728
- }, [f("span", {
689
+ }, [r("span", {
729
690
  style: "font-size: 16px; font-weight: 600;"
730
- }, [G(" "), m.value])]), y.value && D(), y.value && k()]);
691
+ }, [R(" "), h.value])]), g.value && B(), g.value && P()]);
731
692
  }
732
- return () => f("div", {
693
+ return () => r("div", {
733
694
  class: "pagination-container"
734
- }, [b.value && f("ul", {
695
+ }, [w.value && r("ul", {
735
696
  role: "navigation",
736
- class: W.value,
737
- style: z.value
738
- }, [r.value === "default" ? V() : q()])]);
697
+ class: x.value,
698
+ style: F.value
699
+ }, [i.value === "default" ? C() : G()])]);
739
700
  }
740
701
  });
741
- function ze(a, e, t) {
742
- var I;
743
- function r() {
744
- t != null && t.resolveComponentContext && t.resolveComponentContext();
702
+ function De(t, e, p) {
703
+ var T;
704
+ const i = "", l = "", c = m();
705
+ function a() {
706
+ return (e == null ? void 0 : e.schema.componentType) !== "frame";
745
707
  }
746
- r();
747
- const l = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "", n = S();
748
- function p() {
749
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
750
- }
751
- function u() {
708
+ function n() {
752
709
  return !1;
753
710
  }
754
- function s() {
755
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
711
+ function u() {
712
+ return (e == null ? void 0 : e.schema.componentType) !== "frame";
756
713
  }
757
- function i() {
758
- return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
714
+ function o() {
715
+ return (e == null ? void 0 : e.schema.componentType) === "frame";
759
716
  }
760
- function o(y) {
761
- if (!y || !y.value)
717
+ function s(g) {
718
+ if (!g || !g.value)
762
719
  return 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;
720
+ if (g.value.schema && g.value.schema.type === "component")
721
+ return g.value;
722
+ const j = m(g == null ? void 0 : g.value.parent), S = s(j);
723
+ return S || null;
767
724
  }
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);
725
+ function f(g = e) {
726
+ const { componentInstance: j, designerItemElementRef: S } = g;
727
+ return !j || !j.value ? null : j.value.canMove ? S : f(g.parent);
771
728
  }
772
- function m(y) {
773
- return !!t && t.canAccepts(y);
729
+ function v(g) {
730
+ return !!p;
774
731
  }
775
- function C() {
732
+ function h() {
776
733
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
777
734
  }
778
- function v() {
735
+ function y() {
779
736
  }
780
- function h(y, L) {
781
- L && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(L);
737
+ function k(g, j) {
782
738
  }
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;
739
+ function b(g, j) {
740
+ const { componentType: S } = g;
741
+ let P = X(S, g, j);
742
+ const B = S.toLowerCase().replace(/-/g, "_");
743
+ return P && !P.id && P.type === S && (P.id = `${B}_${Math.random().toString().slice(2, 6)}`), P;
789
744
  }
790
- function g(y) {
745
+ function w(g) {
791
746
  }
792
- function M(...y) {
793
- if (t && t.getPropsConfig)
794
- return t.getPropsConfig(...y);
747
+ function N(...g) {
795
748
  }
796
- return n.value = {
797
- canMove: p(),
798
- canSelectParent: u(),
799
- canDelete: s(),
800
- canNested: !i(),
749
+ function O() {
750
+ e != null && e.schema.contents && e.schema.contents.map((g) => {
751
+ var P;
752
+ let j = g.id;
753
+ g.type === "component-ref" && (j = g.component);
754
+ const S = t.value.querySelector(`#${j}-design-item`);
755
+ (P = S == null ? void 0 : S.componentInstance) != null && P.value.onRemoveComponent && S.componentInstance.value.onRemoveComponent();
756
+ });
757
+ }
758
+ return c.value = {
759
+ canMove: a(),
760
+ canSelectParent: n(),
761
+ canDelete: u(),
762
+ canNested: !o(),
801
763
  contents: e == null ? void 0 : e.schema.contents,
802
- elementRef: a,
803
- parent: (I = e == null ? void 0 : e.parent) == null ? void 0 : I.componentInstance,
764
+ elementRef: t,
765
+ parent: (T = e == null ? void 0 : e.parent) == null ? void 0 : T.componentInstance,
804
766
  schema: e == null ? void 0 : e.schema,
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,
767
+ styles: i,
768
+ designerClass: l,
769
+ canAccepts: v,
770
+ getBelongedComponentInstance: s,
771
+ getDraggableDesignItemElement: f,
772
+ getDraggingDisplayText: h,
773
+ getPropConfig: N,
774
+ getDragScopeElement: y,
775
+ onAcceptMovedChildElement: k,
776
+ onChildElementMovedOut: w,
815
777
  addNewChildComponentSchema: b,
816
- updateDragAndDropRules: r,
817
- triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || S(!1),
818
- triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || S(!1)
819
- }, n;
820
- }
821
- function qe() {
822
- function a(e, t) {
823
- var n;
824
- if (!e)
825
- return !1;
826
- const r = ((n = e.targetContainer) == null ? void 0 : n.componentInstance) && e.targetContainer.componentInstance.value;
827
- if (!r)
828
- return !1;
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)));
831
- }
832
- return {
833
- basalDragulaRuleForContainer: a
834
- };
835
- }
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;
862
- }
863
- }
864
- if (c.firstLevelChild.type) {
865
- const n = t.firstLevelChildSchema;
866
- if (n && n.type !== c.firstLevelChild.type) {
867
- l = !1;
868
- continue;
869
- }
870
- }
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;
906
- }
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
- };
926
- }
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;
960
- }
961
- }
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
- };
988
- }
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
- };
1008
- }
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);
1021
- }
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", "");
1051
- }
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;
1062
- }
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
- });
1077
- }
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
1100
- };
1101
- }
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;
1121
- }
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);
1163
- });
1164
- }
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(" ");
1173
- }
1174
- return { checkIsInFormComponent: r, assembleUnifiedLayoutContext: l, changeFormControlsByUnifiedLayoutConfig: n };
1175
- }
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;
1202
- }
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;
1209
- }
1210
- function u(g) {
1211
- return !(!qe().basalDragulaRuleForContainer(g, e) || !c || !p(g));
1212
- }
1213
- function s(g) {
1214
- ve();
1215
- }
1216
- function i() {
1217
- return t.componentType ? "display:inherit;flex-direction:inherit;margin-bottom:10px" : "";
1218
- }
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;
1224
- }
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;
1233
- }
1234
- }
1235
- function m(g) {
1236
- let M = "";
1237
- switch (g) {
1238
- case 1: {
1239
- M = "col-12";
1240
- break;
1241
- }
1242
- case 2: {
1243
- M = "col-12 col-md-6 col-xl-6 col-el-6";
1244
- break;
1245
- }
1246
- case 3: {
1247
- M = "col-12 col-md-6 col-xl-4 col-el-4";
1248
- break;
1249
- }
1250
- case 4: {
1251
- M = "col-12 col-md-6 col-xl-3 col-el-2";
1252
- break;
1253
- }
1254
- }
1255
- return M;
1256
- }
1257
- function C() {
1258
- return l;
1259
- }
1260
- function v() {
1261
- return n;
1262
- }
1263
- function h() {
1264
- return !1;
1265
- }
1266
- function b(g) {
1267
- return new Ye(g, e).getPropertyConfig(t, a.componentInstance.value);
1268
- }
1269
- return {
1270
- canAccepts: u,
1271
- checkCanDeleteComponent: v,
1272
- checkCanMoveComponent: C,
1273
- getStyles: i,
1274
- getPropsConfig: b,
1275
- hideNestedPaddingInDesginerView: h,
1276
- onAcceptMovedChildElement: s,
1277
- onResolveNewComponentSchema: o
1278
- };
778
+ triggerBelongedComponentToMoveWhenMoved: m(!1),
779
+ triggerBelongedComponentToDeleteWhenDeleted: m(!1),
780
+ onRemoveComponent: O
781
+ }, c;
1279
782
  }
1280
- const Re = /* @__PURE__ */ R({
783
+ const Fe = /* @__PURE__ */ J({
1281
784
  name: "FPagination",
1282
- props: J,
785
+ props: W,
1283
786
  emits: ["pageIndexChanged", "pageSizeChanged"],
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);
787
+ setup(t, e) {
788
+ const p = m(!1), i = m(t.mode), l = m(""), c = m(!1), a = m(t.pageSize), n = m(t.currentPage), u = m(t.totalItems), o = m(), s = re("design-item-context"), f = De(o, s);
789
+ ie(() => {
790
+ o.value.componentInstance = f;
791
+ }), e.expose(f.value);
1290
792
  const {
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), {
1306
- renderGotoButton: V
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);
793
+ pages: v,
794
+ updatePages: h
795
+ } = ne(), y = d(() => n.value === 1), k = d(() => [20, 50, 100]), b = d(() => Math.ceil(u.value / a.value)), w = d(() => n.value === b.value), N = d(() => !0), O = d(() => n.value > 1), T = d(() => !(c.value && v.value.length <= 1)), g = d(() => !0), j = d(() => !0), S = d(() => !0), P = d(() => !0), {
796
+ renderFirstPage: B,
797
+ renderPreviousPage: E
798
+ } = ae(n, y, O, a, e), {
799
+ renderLastPage: z,
800
+ renderNextPage: $
801
+ } = I(n, w, b, a, e), {
802
+ renderPageInfo: D
803
+ } = K(l, u), {
804
+ renderPageList: _
805
+ } = ee(n, a, k, u, e), {
806
+ renderPageNumbers: x
807
+ } = te(n, v, a, e), {
808
+ renderGotoButton: F
809
+ } = Z(n, b, a, e);
810
+ h(n.value, a.value, u.value, 7), M([n, a], () => {
811
+ h(n.value, a.value, u.value, 7);
812
+ }), M(n, () => {
813
+ e.emit("pageIndexChanged", n.value);
814
+ }), M(a, () => {
815
+ e.emit("pageSizeChanged", a.value);
1314
816
  });
1315
- const q = w(() => ({
817
+ const C = d(() => ({
1316
818
  "ngx-pagination": !0,
1317
819
  pagination: !0,
1318
- responsive: t.value,
1319
- "pager-viewmode-default": r.value === "default",
1320
- "pager-viewmode-simple": r.value === "simple"
1321
- })), B = w(() => ({
820
+ responsive: p.value,
821
+ "pager-viewmode-default": i.value === "default",
822
+ "pager-viewmode-simple": i.value === "simple"
823
+ })), G = d(() => ({
1322
824
  position: "relative",
1323
825
  "justify-content": l.value === "center" ? "center" : "start"
1324
826
  }));
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()]);
827
+ function L() {
828
+ return r(A, null, [g.value && D(), j.value && _(), P.value && B(), P.value && E(), S.value && x(), P.value && $(), P.value && z(), N.value && F()]);
1327
829
  }
1328
- function ue() {
1329
- return f($, null, [f("li", {
830
+ function le() {
831
+ return r(A, null, [r("li", {
1330
832
  class: "page-item d-flex flex-fill"
1331
- }, null), D.value && E(), D.value && A(), V(), f("li", {
833
+ }, null), P.value && B(), P.value && E(), F(), r("li", {
1332
834
  class: "page-item page-separator",
1333
835
  style: "margin-left: 10px"
1334
- }, [f("span", {
836
+ }, [r("span", {
1335
837
  style: "font-size: 15px; font-weight: 200;"
1336
- }, [G(" /")])]), f("li", {
838
+ }, [R(" /")])]), r("li", {
1337
839
  class: "page-item page-total",
1338
840
  style: "margin-left: 5px"
1339
- }, [f("span", {
841
+ }, [r("span", {
1340
842
  style: "font-size: 16px; font-weight: 600;"
1341
- }, [G(" "), b.value])]), D.value && j(), D.value && O()]);
843
+ }, [R(" "), b.value])]), P.value && $(), P.value && z()]);
1342
844
  }
1343
- return () => f("div", {
1344
- ref: s,
845
+ return () => r("div", {
846
+ ref: o,
1345
847
  class: "pagination-container"
1346
- }, [y.value && f("ul", {
848
+ }, [T.value && r("ul", {
1347
849
  role: "navigation",
1348
- class: q.value,
1349
- style: B.value
1350
- }, [r.value === "default" ? ce() : ue()])]);
850
+ class: C.value,
851
+ style: G.value
852
+ }, [i.value === "default" ? L() : le()])]);
1351
853
  }
1352
854
  });
1353
- U.register = (a, e, t) => {
1354
- a.pagination = U, e.pagination = te;
855
+ V.register = (t, e, p) => {
856
+ t.pagination = V, e.pagination = Y;
1355
857
  };
1356
- U.registerDesigner = (a, e, t) => {
1357
- a.pagination = Re, e.pagination = te;
858
+ V.registerDesigner = (t, e, p) => {
859
+ t.pagination = Fe, e.pagination = Y;
1358
860
  };
1359
- const at = ye(U);
861
+ const xe = ce(V);
1360
862
  export {
1361
- U as FPagination,
1362
- at as default,
1363
- J as paginationProps,
1364
- te as propsResolver
863
+ V as FPagination,
864
+ xe as default,
865
+ W as paginationProps,
866
+ Y as propsResolver
1365
867
  };