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