@vef-framework/components 1.0.5

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 (499) hide show
  1. package/README.md +27 -0
  2. package/dist/index.d.ts +65 -0
  3. package/dist/index.js +3 -0
  4. package/dist/internal/index.d.ts +1 -0
  5. package/dist/internal/index.js +3 -0
  6. package/dist/internal/utils.d.ts +9 -0
  7. package/dist/internal/utils.js +3 -0
  8. package/dist/vef-access-denied/access-denied-icon.d.ts +4 -0
  9. package/dist/vef-access-denied/access-denied-icon.js +3 -0
  10. package/dist/vef-access-denied/index.d.ts +5 -0
  11. package/dist/vef-access-denied/index.js +29 -0
  12. package/dist/vef-access-denied/props.d.ts +18 -0
  13. package/dist/vef-action-buttons/index.d.ts +6 -0
  14. package/dist/vef-action-buttons/index.js +3 -0
  15. package/dist/vef-action-buttons/props.d.ts +23 -0
  16. package/dist/vef-badge/index.d.ts +5 -0
  17. package/dist/vef-badge/index.js +3 -0
  18. package/dist/vef-badge/props.d.ts +28 -0
  19. package/dist/vef-bool/hooks/use-bool-instance.d.ts +6 -0
  20. package/dist/vef-bool/hooks/use-bool-instance.js +3 -0
  21. package/dist/vef-bool/index.d.ts +4 -0
  22. package/dist/vef-bool/index.js +3 -0
  23. package/dist/vef-bool/props.d.ts +63 -0
  24. package/dist/vef-button/components/base-button.d.ts +9 -0
  25. package/dist/vef-button/components/base-button.js +3 -0
  26. package/dist/vef-button/index.d.ts +4 -0
  27. package/dist/vef-button/index.js +3 -0
  28. package/dist/vef-button/props.d.ts +79 -0
  29. package/dist/vef-card/index.d.ts +5 -0
  30. package/dist/vef-card/index.js +3 -0
  31. package/dist/vef-card/props.d.ts +27 -0
  32. package/dist/vef-card-meta/index.d.ts +5 -0
  33. package/dist/vef-card-meta/index.js +3 -0
  34. package/dist/vef-card-meta/props.d.ts +7 -0
  35. package/dist/vef-checkbox/hooks/use-checkbox-instance.d.ts +11 -0
  36. package/dist/vef-checkbox/hooks/use-checkbox-instance.js +3 -0
  37. package/dist/vef-checkbox/hooks/use-data-options.d.ts +34 -0
  38. package/dist/vef-checkbox/hooks/use-data-options.js +3 -0
  39. package/dist/vef-checkbox/index.d.ts +6 -0
  40. package/dist/vef-checkbox/index.js +5 -0
  41. package/dist/vef-checkbox/props.d.ts +41 -0
  42. package/dist/vef-col/index.d.ts +5 -0
  43. package/dist/vef-col/index.js +3 -0
  44. package/dist/vef-col/props.d.ts +5 -0
  45. package/dist/vef-color-picker/index.d.ts +5 -0
  46. package/dist/vef-color-picker/index.js +3 -0
  47. package/dist/vef-color-picker/props.d.ts +28 -0
  48. package/dist/vef-compact/index.d.ts +5 -0
  49. package/dist/vef-compact/index.js +3 -0
  50. package/dist/vef-compact/props.d.ts +11 -0
  51. package/dist/vef-config-provider/fonts/din/bold.woff2.js +3 -0
  52. package/dist/vef-config-provider/fonts/din/regular.woff2.js +3 -0
  53. package/dist/vef-config-provider/hooks/use-ui-config.d.ts +46 -0
  54. package/dist/vef-config-provider/hooks/use-ui-config.js +3 -0
  55. package/dist/vef-config-provider/index.d.ts +5 -0
  56. package/dist/vef-config-provider/index.js +111 -0
  57. package/dist/vef-config-provider/props.d.ts +24 -0
  58. package/dist/vef-config-provider/reset-style.d.ts +4 -0
  59. package/dist/vef-config-provider/reset-style.js +257 -0
  60. package/dist/vef-config-provider/store.d.ts +12 -0
  61. package/dist/vef-config-provider/store.js +3 -0
  62. package/dist/vef-container/index.d.ts +5 -0
  63. package/dist/vef-container/index.js +3 -0
  64. package/dist/vef-container/props.d.ts +6 -0
  65. package/dist/vef-crud-page/components/crud-actions.d.ts +21 -0
  66. package/dist/vef-crud-page/components/crud-actions.js +3 -0
  67. package/dist/vef-crud-page/components/crud-filter.d.ts +31 -0
  68. package/dist/vef-crud-page/components/crud-filter.js +3 -0
  69. package/dist/vef-crud-page/components/crud-footer.d.ts +31 -0
  70. package/dist/vef-crud-page/components/crud-footer.js +9 -0
  71. package/dist/vef-crud-page/components/crud-form-modal.d.ts +18 -0
  72. package/dist/vef-crud-page/components/crud-form-modal.js +3 -0
  73. package/dist/vef-crud-page/components/crud-header.d.ts +32 -0
  74. package/dist/vef-crud-page/components/crud-header.js +3 -0
  75. package/dist/vef-crud-page/components/crud-table.d.ts +57 -0
  76. package/dist/vef-crud-page/components/crud-table.js +3 -0
  77. package/dist/vef-crud-page/hooks/use-action-buttons.d.ts +16 -0
  78. package/dist/vef-crud-page/hooks/use-action-buttons.js +3 -0
  79. package/dist/vef-crud-page/hooks/use-crud-context.d.ts +8 -0
  80. package/dist/vef-crud-page/hooks/use-crud-context.js +3 -0
  81. package/dist/vef-crud-page/hooks/use-crud-schema.d.ts +17 -0
  82. package/dist/vef-crud-page/hooks/use-crud-schema.js +3 -0
  83. package/dist/vef-crud-page/hooks/use-operation-buttons.d.ts +11 -0
  84. package/dist/vef-crud-page/hooks/use-operation-buttons.js +3 -0
  85. package/dist/vef-crud-page/index.d.ts +6 -0
  86. package/dist/vef-crud-page/index.js +3 -0
  87. package/dist/vef-crud-page/props.d.ts +84 -0
  88. package/dist/vef-crud-page/store.d.ts +119 -0
  89. package/dist/vef-crud-page/store.js +3 -0
  90. package/dist/vef-crud-page/types.d.ts +173 -0
  91. package/dist/vef-divider/index.d.ts +5 -0
  92. package/dist/vef-divider/index.js +3 -0
  93. package/dist/vef-divider/props.d.ts +25 -0
  94. package/dist/vef-drawer/components/action-button-wrapper.d.ts +14 -0
  95. package/dist/vef-drawer/components/action-button-wrapper.js +3 -0
  96. package/dist/vef-drawer/components/button-props.d.ts +15 -0
  97. package/dist/vef-drawer/components/button-props.js +2 -0
  98. package/dist/vef-drawer/components/cancel-action-button.d.ts +4 -0
  99. package/dist/vef-drawer/components/cancel-action-button.js +3 -0
  100. package/dist/vef-drawer/components/ok-action-button.d.ts +4 -0
  101. package/dist/vef-drawer/components/ok-action-button.js +3 -0
  102. package/dist/vef-drawer/context.d.ts +27 -0
  103. package/dist/vef-drawer/context.js +3 -0
  104. package/dist/vef-drawer/index.d.ts +5 -0
  105. package/dist/vef-drawer/index.js +10 -0
  106. package/dist/vef-drawer/props.d.ts +97 -0
  107. package/dist/vef-dropdown/index.d.ts +4 -0
  108. package/dist/vef-dropdown/index.js +3 -0
  109. package/dist/vef-dropdown/props.d.ts +68 -0
  110. package/dist/vef-empty/index.d.ts +5 -0
  111. package/dist/vef-empty/index.js +3 -0
  112. package/dist/vef-empty/props.d.ts +7 -0
  113. package/dist/vef-empty-placeholder/index.d.ts +5 -0
  114. package/dist/vef-empty-placeholder/index.js +7 -0
  115. package/dist/vef-empty-placeholder/props.d.ts +6 -0
  116. package/dist/vef-error/error-icon.d.ts +4 -0
  117. package/dist/vef-error/error-icon.js +3 -0
  118. package/dist/vef-error/index.d.ts +5 -0
  119. package/dist/vef-error/index.js +30 -0
  120. package/dist/vef-error/props.d.ts +18 -0
  121. package/dist/vef-filter/components/action-buttons.d.ts +3 -0
  122. package/dist/vef-filter/components/action-buttons.js +21 -0
  123. package/dist/vef-filter/components/advanced-filter.d.ts +13 -0
  124. package/dist/vef-filter/components/advanced-filter.js +11 -0
  125. package/dist/vef-filter/components/basic-filter.d.ts +14 -0
  126. package/dist/vef-filter/components/basic-filter.js +21 -0
  127. package/dist/vef-filter/components/fields/index.d.ts +9 -0
  128. package/dist/vef-filter/components/fields/index.js +3 -0
  129. package/dist/vef-filter/components/fields/input-number.d.ts +4 -0
  130. package/dist/vef-filter/components/fields/input-number.js +3 -0
  131. package/dist/vef-filter/components/fields/input.d.ts +4 -0
  132. package/dist/vef-filter/components/fields/input.js +3 -0
  133. package/dist/vef-filter/components/fields/props.d.ts +32 -0
  134. package/dist/vef-filter/components/filter-field.d.ts +4 -0
  135. package/dist/vef-filter/components/filter-field.js +3 -0
  136. package/dist/vef-filter/components/filter-item.d.ts +15 -0
  137. package/dist/vef-filter/components/filter-item.js +3 -0
  138. package/dist/vef-filter/event.d.ts +12 -0
  139. package/dist/vef-filter/event.js +3 -0
  140. package/dist/vef-filter/helper.d.ts +10 -0
  141. package/dist/vef-filter/helper.js +3 -0
  142. package/dist/vef-filter/hooks/use-action-handlers.d.ts +20 -0
  143. package/dist/vef-filter/hooks/use-action-handlers.js +3 -0
  144. package/dist/vef-filter/hooks/use-computed-values.d.ts +42 -0
  145. package/dist/vef-filter/hooks/use-computed-values.js +3 -0
  146. package/dist/vef-filter/hooks/use-filter-context.d.ts +8 -0
  147. package/dist/vef-filter/hooks/use-filter-context.js +3 -0
  148. package/dist/vef-filter/hooks/use-filter-initialization.d.ts +7 -0
  149. package/dist/vef-filter/hooks/use-filter-initialization.js +3 -0
  150. package/dist/vef-filter/hooks/use-filter-instance.d.ts +10 -0
  151. package/dist/vef-filter/hooks/use-filter-instance.js +3 -0
  152. package/dist/vef-filter/hooks/use-filter-items.d.ts +13 -0
  153. package/dist/vef-filter/hooks/use-filter-items.js +3 -0
  154. package/dist/vef-filter/hooks/use-filter-values-change.d.ts +11 -0
  155. package/dist/vef-filter/hooks/use-filter-values-change.js +3 -0
  156. package/dist/vef-filter/hooks/use-label-config.d.ts +14 -0
  157. package/dist/vef-filter/hooks/use-label-config.js +3 -0
  158. package/dist/vef-filter/index.d.ts +8 -0
  159. package/dist/vef-filter/index.js +10 -0
  160. package/dist/vef-filter/props.d.ts +106 -0
  161. package/dist/vef-filter/store.d.ts +77 -0
  162. package/dist/vef-filter/store.js +3 -0
  163. package/dist/vef-filter/types.d.ts +224 -0
  164. package/dist/vef-flex/index.d.ts +5 -0
  165. package/dist/vef-flex/index.js +3 -0
  166. package/dist/vef-flex/props.d.ts +12 -0
  167. package/dist/vef-float-button/index.d.ts +5 -0
  168. package/dist/vef-float-button/index.js +3 -0
  169. package/dist/vef-float-button/props.d.ts +26 -0
  170. package/dist/vef-float-button-group/index.d.ts +5 -0
  171. package/dist/vef-float-button-group/index.js +3 -0
  172. package/dist/vef-float-button-group/props.d.ts +11 -0
  173. package/dist/vef-form/components/fields/index.d.ts +10 -0
  174. package/dist/vef-form/components/fields/index.js +3 -0
  175. package/dist/vef-form/components/fields/input-number.d.ts +5 -0
  176. package/dist/vef-form/components/fields/input-number.js +3 -0
  177. package/dist/vef-form/components/fields/input.d.ts +5 -0
  178. package/dist/vef-form/components/fields/input.js +3 -0
  179. package/dist/vef-form/components/fields/props.d.ts +33 -0
  180. package/dist/vef-form/components/form-actions.d.ts +20 -0
  181. package/dist/vef-form/components/form-actions.js +5 -0
  182. package/dist/vef-form/components/form-content.d.ts +18 -0
  183. package/dist/vef-form/components/form-content.js +6 -0
  184. package/dist/vef-form/components/form-field.d.ts +5 -0
  185. package/dist/vef-form/components/form-field.js +3 -0
  186. package/dist/vef-form/components/form-group.d.ts +22 -0
  187. package/dist/vef-form/components/form-group.js +13 -0
  188. package/dist/vef-form/components/form-hidden-item.d.ts +14 -0
  189. package/dist/vef-form/components/form-hidden-item.js +3 -0
  190. package/dist/vef-form/components/form-item.d.ts +18 -0
  191. package/dist/vef-form/components/form-item.js +3 -0
  192. package/dist/vef-form/components/form-row.d.ts +26 -0
  193. package/dist/vef-form/components/form-row.js +3 -0
  194. package/dist/vef-form/event.d.ts +15 -0
  195. package/dist/vef-form/event.js +3 -0
  196. package/dist/vef-form/helper.d.ts +11 -0
  197. package/dist/vef-form/helper.js +3 -0
  198. package/dist/vef-form/hooks/use-action-handlers.d.ts +14 -0
  199. package/dist/vef-form/hooks/use-action-handlers.js +3 -0
  200. package/dist/vef-form/hooks/use-columns-layout.d.ts +12 -0
  201. package/dist/vef-form/hooks/use-columns-layout.js +3 -0
  202. package/dist/vef-form/hooks/use-computed-values.d.ts +42 -0
  203. package/dist/vef-form/hooks/use-computed-values.js +3 -0
  204. package/dist/vef-form/hooks/use-form-context.d.ts +6 -0
  205. package/dist/vef-form/hooks/use-form-context.js +3 -0
  206. package/dist/vef-form/hooks/use-form-initialization.d.ts +14 -0
  207. package/dist/vef-form/hooks/use-form-initialization.js +3 -0
  208. package/dist/vef-form/hooks/use-form-instance.d.ts +10 -0
  209. package/dist/vef-form/hooks/use-form-instance.js +3 -0
  210. package/dist/vef-form/hooks/use-form-values-change.d.ts +11 -0
  211. package/dist/vef-form/hooks/use-form-values-change.js +3 -0
  212. package/dist/vef-form/hooks/use-label-width.d.ts +9 -0
  213. package/dist/vef-form/hooks/use-label-width.js +3 -0
  214. package/dist/vef-form/index.d.ts +8 -0
  215. package/dist/vef-form/index.js +5 -0
  216. package/dist/vef-form/props.d.ts +158 -0
  217. package/dist/vef-form/store.d.ts +89 -0
  218. package/dist/vef-form/store.js +3 -0
  219. package/dist/vef-form/types.d.ts +335 -0
  220. package/dist/vef-form/validation-rules.d.ts +175 -0
  221. package/dist/vef-form/validation-rules.js +3 -0
  222. package/dist/vef-form-drawer/index.d.ts +9 -0
  223. package/dist/vef-form-drawer/index.js +3 -0
  224. package/dist/vef-form-drawer/props.d.ts +17 -0
  225. package/dist/vef-form-modal/index.d.ts +9 -0
  226. package/dist/vef-form-modal/index.js +3 -0
  227. package/dist/vef-form-modal/props.d.ts +20 -0
  228. package/dist/vef-grid/index.d.ts +5 -0
  229. package/dist/vef-grid/index.js +14 -0
  230. package/dist/vef-grid/props.d.ts +25 -0
  231. package/dist/vef-grid/props.js +3 -0
  232. package/dist/vef-grid-item/index.d.ts +5 -0
  233. package/dist/vef-grid-item/index.js +3 -0
  234. package/dist/vef-grid-item/props.d.ts +34 -0
  235. package/dist/vef-icon/index.d.ts +4 -0
  236. package/dist/vef-icon/index.js +3 -0
  237. package/dist/vef-icon/props.d.ts +12 -0
  238. package/dist/vef-input/hooks/use-input-instance.d.ts +12 -0
  239. package/dist/vef-input/hooks/use-input-instance.js +3 -0
  240. package/dist/vef-input/index.d.ts +4 -0
  241. package/dist/vef-input/index.js +3 -0
  242. package/dist/vef-input/props.d.ts +67 -0
  243. package/dist/vef-input-number/hooks/use-input-number-instance.d.ts +12 -0
  244. package/dist/vef-input-number/hooks/use-input-number-instance.js +3 -0
  245. package/dist/vef-input-number/index.d.ts +4 -0
  246. package/dist/vef-input-number/index.js +3 -0
  247. package/dist/vef-input-number/props.d.ts +124 -0
  248. package/dist/vef-loading-placeholder/index.d.ts +5 -0
  249. package/dist/vef-loading-placeholder/index.js +7 -0
  250. package/dist/vef-loading-placeholder/props.d.ts +6 -0
  251. package/dist/vef-login/index.d.ts +5 -0
  252. package/dist/vef-login/index.js +53 -0
  253. package/dist/vef-login/login-icon.d.ts +4 -0
  254. package/dist/vef-login/login-icon.js +3 -0
  255. package/dist/vef-login/props.d.ts +57 -0
  256. package/dist/vef-modal/components/action-button-wrapper.d.ts +14 -0
  257. package/dist/vef-modal/components/action-button-wrapper.js +3 -0
  258. package/dist/vef-modal/components/button-props.d.ts +15 -0
  259. package/dist/vef-modal/components/button-props.js +2 -0
  260. package/dist/vef-modal/components/cancel-action-button.d.ts +4 -0
  261. package/dist/vef-modal/components/cancel-action-button.js +3 -0
  262. package/dist/vef-modal/components/ok-action-button.d.ts +4 -0
  263. package/dist/vef-modal/components/ok-action-button.js +3 -0
  264. package/dist/vef-modal/context.d.ts +27 -0
  265. package/dist/vef-modal/context.js +3 -0
  266. package/dist/vef-modal/index.d.ts +5 -0
  267. package/dist/vef-modal/index.js +6 -0
  268. package/dist/vef-modal/props.d.ts +88 -0
  269. package/dist/vef-not-found/index.d.ts +5 -0
  270. package/dist/vef-not-found/index.js +30 -0
  271. package/dist/vef-not-found/not-found-icon.d.ts +4 -0
  272. package/dist/vef-not-found/not-found-icon.js +3 -0
  273. package/dist/vef-not-found/props.d.ts +18 -0
  274. package/dist/vef-page/index.d.ts +5 -0
  275. package/dist/vef-page/index.js +59 -0
  276. package/dist/vef-page/props.d.ts +29 -0
  277. package/dist/vef-pagination/index.d.ts +4 -0
  278. package/dist/vef-pagination/index.js +3 -0
  279. package/dist/vef-pagination/props.d.ts +59 -0
  280. package/dist/vef-pagination/props.js +3 -0
  281. package/dist/vef-paragraph/index.d.ts +5 -0
  282. package/dist/vef-paragraph/index.js +3 -0
  283. package/dist/vef-paragraph/props.d.ts +55 -0
  284. package/dist/vef-password/hooks/use-password-instance.d.ts +13 -0
  285. package/dist/vef-password/hooks/use-password-instance.js +3 -0
  286. package/dist/vef-password/index.d.ts +4 -0
  287. package/dist/vef-password/index.js +3 -0
  288. package/dist/vef-password/props.d.ts +58 -0
  289. package/dist/vef-popconfirm/index.d.ts +5 -0
  290. package/dist/vef-popconfirm/index.js +3 -0
  291. package/dist/vef-popconfirm/props.d.ts +33 -0
  292. package/dist/vef-popover/index.d.ts +5 -0
  293. package/dist/vef-popover/index.js +3 -0
  294. package/dist/vef-popover/props.d.ts +29 -0
  295. package/dist/vef-radio/hooks/use-data-options.d.ts +35 -0
  296. package/dist/vef-radio/hooks/use-data-options.js +3 -0
  297. package/dist/vef-radio/hooks/use-radio-instance.d.ts +11 -0
  298. package/dist/vef-radio/hooks/use-radio-instance.js +3 -0
  299. package/dist/vef-radio/index.d.ts +7 -0
  300. package/dist/vef-radio/index.js +5 -0
  301. package/dist/vef-radio/props.d.ts +59 -0
  302. package/dist/vef-rate/hooks/use-rate-instance.d.ts +12 -0
  303. package/dist/vef-rate/hooks/use-rate-instance.js +3 -0
  304. package/dist/vef-rate/index.d.ts +4 -0
  305. package/dist/vef-rate/index.js +3 -0
  306. package/dist/vef-rate/props.d.ts +25 -0
  307. package/dist/vef-responsive-container/index.d.ts +4 -0
  308. package/dist/vef-responsive-container/index.js +7 -0
  309. package/dist/vef-responsive-container/props.d.ts +21 -0
  310. package/dist/vef-responsive-item/index.d.ts +4 -0
  311. package/dist/vef-responsive-item/index.js +5 -0
  312. package/dist/vef-responsive-item/props.d.ts +12 -0
  313. package/dist/vef-ribbon/index.d.ts +5 -0
  314. package/dist/vef-ribbon/index.js +3 -0
  315. package/dist/vef-ribbon/props.d.ts +15 -0
  316. package/dist/vef-row/index.d.ts +5 -0
  317. package/dist/vef-row/index.js +3 -0
  318. package/dist/vef-row/props.d.ts +7 -0
  319. package/dist/vef-scroll-area/components/scrollbar.d.ts +2 -0
  320. package/dist/vef-scroll-area/components/scrollbar.js +34 -0
  321. package/dist/vef-scroll-area/index.d.ts +4 -0
  322. package/dist/vef-scroll-area/index.js +10 -0
  323. package/dist/vef-scroll-area/props.d.ts +24 -0
  324. package/dist/vef-select/components/option.d.ts +7 -0
  325. package/dist/vef-select/components/option.js +11 -0
  326. package/dist/vef-select/hooks/use-data-options.d.ts +37 -0
  327. package/dist/vef-select/hooks/use-data-options.js +3 -0
  328. package/dist/vef-select/hooks/use-field-names.d.ts +9 -0
  329. package/dist/vef-select/hooks/use-field-names.js +3 -0
  330. package/dist/vef-select/hooks/use-label-render.d.ts +11 -0
  331. package/dist/vef-select/hooks/use-label-render.js +10 -0
  332. package/dist/vef-select/hooks/use-option-render.d.ts +11 -0
  333. package/dist/vef-select/hooks/use-option-render.js +3 -0
  334. package/dist/vef-select/hooks/use-select-instance.d.ts +11 -0
  335. package/dist/vef-select/hooks/use-select-instance.js +3 -0
  336. package/dist/vef-select/index.d.ts +7 -0
  337. package/dist/vef-select/index.js +3 -0
  338. package/dist/vef-select/props.d.ts +153 -0
  339. package/dist/vef-slider/hooks/use-slider-instance.d.ts +12 -0
  340. package/dist/vef-slider/hooks/use-slider-instance.js +3 -0
  341. package/dist/vef-slider/index.d.ts +4 -0
  342. package/dist/vef-slider/index.js +3 -0
  343. package/dist/vef-slider/props.d.ts +72 -0
  344. package/dist/vef-sortable-list/components/overlay-item.d.ts +9 -0
  345. package/dist/vef-sortable-list/components/overlay-item.js +7 -0
  346. package/dist/vef-sortable-list/components/sortable-item.d.ts +21 -0
  347. package/dist/vef-sortable-list/components/sortable-item.js +7 -0
  348. package/dist/vef-sortable-list/hooks/use-merged-items.d.ts +10 -0
  349. package/dist/vef-sortable-list/hooks/use-merged-items.js +3 -0
  350. package/dist/vef-sortable-list/index.d.ts +7 -0
  351. package/dist/vef-sortable-list/index.js +3 -0
  352. package/dist/vef-sortable-list/props.d.ts +77 -0
  353. package/dist/vef-space/index.d.ts +5 -0
  354. package/dist/vef-space/index.js +3 -0
  355. package/dist/vef-space/props.d.ts +12 -0
  356. package/dist/vef-spin/index.d.ts +5 -0
  357. package/dist/vef-spin/index.js +3 -0
  358. package/dist/vef-spin/props.d.ts +12 -0
  359. package/dist/vef-splitter/index.d.ts +5 -0
  360. package/dist/vef-splitter/index.js +3 -0
  361. package/dist/vef-splitter/props.d.ts +16 -0
  362. package/dist/vef-splitter-panel/index.d.ts +5 -0
  363. package/dist/vef-splitter-panel/index.js +3 -0
  364. package/dist/vef-splitter-panel/props.d.ts +6 -0
  365. package/dist/vef-status/index.d.ts +5 -0
  366. package/dist/vef-status/index.js +3 -0
  367. package/dist/vef-status/props.d.ts +17 -0
  368. package/dist/vef-table/components/columns/bool.d.ts +5 -0
  369. package/dist/vef-table/components/columns/bool.js +3 -0
  370. package/dist/vef-table/components/columns/code.d.ts +4 -0
  371. package/dist/vef-table/components/columns/code.js +3 -0
  372. package/dist/vef-table/components/columns/data-dictionary.d.ts +4 -0
  373. package/dist/vef-table/components/columns/data-dictionary.js +3 -0
  374. package/dist/vef-table/components/columns/enum.d.ts +4 -0
  375. package/dist/vef-table/components/columns/enum.js +3 -0
  376. package/dist/vef-table/components/columns/file.d.ts +4 -0
  377. package/dist/vef-table/components/columns/file.js +3 -0
  378. package/dist/vef-table/components/columns/icon.d.ts +4 -0
  379. package/dist/vef-table/components/columns/icon.js +3 -0
  380. package/dist/vef-table/components/columns/id.d.ts +4 -0
  381. package/dist/vef-table/components/columns/id.js +3 -0
  382. package/dist/vef-table/components/columns/image.d.ts +4 -0
  383. package/dist/vef-table/components/columns/image.js +3 -0
  384. package/dist/vef-table/components/columns/index.d.ts +31 -0
  385. package/dist/vef-table/components/columns/index.js +3 -0
  386. package/dist/vef-table/components/columns/markdown.d.ts +4 -0
  387. package/dist/vef-table/components/columns/markdown.js +3 -0
  388. package/dist/vef-table/components/columns/number.d.ts +4 -0
  389. package/dist/vef-table/components/columns/number.js +3 -0
  390. package/dist/vef-table/components/columns/props.d.ts +24 -0
  391. package/dist/vef-table/components/columns/render.d.ts +4 -0
  392. package/dist/vef-table/components/columns/render.js +3 -0
  393. package/dist/vef-table/components/columns/rich-text.d.ts +4 -0
  394. package/dist/vef-table/components/columns/rich-text.js +3 -0
  395. package/dist/vef-table/components/columns/text.d.ts +4 -0
  396. package/dist/vef-table/components/columns/text.js +3 -0
  397. package/dist/vef-table/components/columns-settings.d.ts +2 -0
  398. package/dist/vef-table/components/columns-settings.js +54 -0
  399. package/dist/vef-table/components/operation-buttons.d.ts +22 -0
  400. package/dist/vef-table/components/operation-buttons.js +12 -0
  401. package/dist/vef-table/components/settings-icon.d.ts +2 -0
  402. package/dist/vef-table/components/settings-icon.js +5 -0
  403. package/dist/vef-table/components/table-footer.d.ts +34 -0
  404. package/dist/vef-table/components/table-footer.js +19 -0
  405. package/dist/vef-table/helper.d.ts +12 -0
  406. package/dist/vef-table/helper.js +3 -0
  407. package/dist/vef-table/hooks/use-computed-batch-buttons.d.ts +13 -0
  408. package/dist/vef-table/hooks/use-computed-batch-buttons.js +3 -0
  409. package/dist/vef-table/hooks/use-computed-columns.d.ts +10 -0
  410. package/dist/vef-table/hooks/use-computed-columns.js +3 -0
  411. package/dist/vef-table/hooks/use-computed-values.d.ts +45 -0
  412. package/dist/vef-table/hooks/use-computed-values.js +3 -0
  413. package/dist/vef-table/hooks/use-data.d.ts +11 -0
  414. package/dist/vef-table/hooks/use-data.js +3 -0
  415. package/dist/vef-table/hooks/use-default-column-configs.d.ts +9 -0
  416. package/dist/vef-table/hooks/use-default-column-configs.js +3 -0
  417. package/dist/vef-table/hooks/use-display-value.d.ts +32 -0
  418. package/dist/vef-table/hooks/use-display-value.js +3 -0
  419. package/dist/vef-table/hooks/use-helper-columns.d.ts +6 -0
  420. package/dist/vef-table/hooks/use-helper-columns.js +3 -0
  421. package/dist/vef-table/hooks/use-merged-value.d.ts +10 -0
  422. package/dist/vef-table/hooks/use-merged-value.js +3 -0
  423. package/dist/vef-table/hooks/use-operation-column-width.d.ts +11 -0
  424. package/dist/vef-table/hooks/use-operation-column-width.js +3 -0
  425. package/dist/vef-table/hooks/use-pagination-props.d.ts +17 -0
  426. package/dist/vef-table/hooks/use-pagination-props.js +3 -0
  427. package/dist/vef-table/hooks/use-row-props.d.ts +11 -0
  428. package/dist/vef-table/hooks/use-row-props.js +3 -0
  429. package/dist/vef-table/hooks/use-row-selection-config.d.ts +11 -0
  430. package/dist/vef-table/hooks/use-row-selection-config.js +3 -0
  431. package/dist/vef-table/hooks/use-table-columns.d.ts +12 -0
  432. package/dist/vef-table/hooks/use-table-columns.js +3 -0
  433. package/dist/vef-table/hooks/use-table-context.d.ts +9 -0
  434. package/dist/vef-table/hooks/use-table-context.js +3 -0
  435. package/dist/vef-table/hooks/use-table-instance.d.ts +10 -0
  436. package/dist/vef-table/hooks/use-table-instance.js +3 -0
  437. package/dist/vef-table/hooks/use-table-summary.d.ts +10 -0
  438. package/dist/vef-table/hooks/use-table-summary.js +3 -0
  439. package/dist/vef-table/hooks/use-table-width.d.ts +9 -0
  440. package/dist/vef-table/hooks/use-table-width.js +3 -0
  441. package/dist/vef-table/index.d.ts +7 -0
  442. package/dist/vef-table/index.js +56 -0
  443. package/dist/vef-table/props.d.ts +330 -0
  444. package/dist/vef-table/store.d.ts +21 -0
  445. package/dist/vef-table/store.js +3 -0
  446. package/dist/vef-table/types.d.ts +481 -0
  447. package/dist/vef-tabs/index.d.ts +5 -0
  448. package/dist/vef-tabs/index.js +3 -0
  449. package/dist/vef-tabs/props.d.ts +12 -0
  450. package/dist/vef-tag/index.d.ts +5 -0
  451. package/dist/vef-tag/index.js +3 -0
  452. package/dist/vef-tag/props.d.ts +20 -0
  453. package/dist/vef-temporal-picker/hooks/use-dayjs-value.d.ts +10 -0
  454. package/dist/vef-temporal-picker/hooks/use-dayjs-value.js +3 -0
  455. package/dist/vef-temporal-picker/hooks/use-temporal-formats.d.ts +8 -0
  456. package/dist/vef-temporal-picker/hooks/use-temporal-formats.js +3 -0
  457. package/dist/vef-temporal-picker/hooks/use-temporal-limit.d.ts +13 -0
  458. package/dist/vef-temporal-picker/hooks/use-temporal-limit.js +3 -0
  459. package/dist/vef-temporal-picker/hooks/use-temporal-picker-instance.d.ts +12 -0
  460. package/dist/vef-temporal-picker/hooks/use-temporal-picker-instance.js +3 -0
  461. package/dist/vef-temporal-picker/index.d.ts +5 -0
  462. package/dist/vef-temporal-picker/index.js +3 -0
  463. package/dist/vef-temporal-picker/props.d.ts +101 -0
  464. package/dist/vef-temporal-range-picker/hooks/use-dayjs-values.d.ts +10 -0
  465. package/dist/vef-temporal-range-picker/hooks/use-dayjs-values.js +3 -0
  466. package/dist/vef-temporal-range-picker/hooks/use-temporal-formats.d.ts +8 -0
  467. package/dist/vef-temporal-range-picker/hooks/use-temporal-formats.js +3 -0
  468. package/dist/vef-temporal-range-picker/hooks/use-temporal-limit.d.ts +13 -0
  469. package/dist/vef-temporal-range-picker/hooks/use-temporal-limit.js +3 -0
  470. package/dist/vef-temporal-range-picker/hooks/use-temporal-range-picker-instance.d.ts +12 -0
  471. package/dist/vef-temporal-range-picker/hooks/use-temporal-range-picker-instance.js +3 -0
  472. package/dist/vef-temporal-range-picker/index.d.ts +5 -0
  473. package/dist/vef-temporal-range-picker/index.js +3 -0
  474. package/dist/vef-temporal-range-picker/props.d.ts +82 -0
  475. package/dist/vef-temporal-range-picker/props.js +3 -0
  476. package/dist/vef-text/index.d.ts +5 -0
  477. package/dist/vef-text/index.js +3 -0
  478. package/dist/vef-text/props.d.ts +47 -0
  479. package/dist/vef-textarea/hooks/use-textarea-instance.d.ts +13 -0
  480. package/dist/vef-textarea/hooks/use-textarea-instance.js +3 -0
  481. package/dist/vef-textarea/index.d.ts +4 -0
  482. package/dist/vef-textarea/index.js +3 -0
  483. package/dist/vef-textarea/props.d.ts +58 -0
  484. package/dist/vef-title/index.d.ts +5 -0
  485. package/dist/vef-title/index.js +15 -0
  486. package/dist/vef-title/props.d.ts +39 -0
  487. package/dist/vef-tooltip/index.d.ts +5 -0
  488. package/dist/vef-tooltip/index.js +3 -0
  489. package/dist/vef-tooltip/props.d.ts +30 -0
  490. package/dist/vef-tree-select/hooks/use-change-handler.d.ts +10 -0
  491. package/dist/vef-tree-select/hooks/use-change-handler.js +3 -0
  492. package/dist/vef-tree-select/hooks/use-data-options.d.ts +36 -0
  493. package/dist/vef-tree-select/hooks/use-data-options.js +3 -0
  494. package/dist/vef-tree-select/hooks/use-tree-select-instance.d.ts +11 -0
  495. package/dist/vef-tree-select/hooks/use-tree-select-instance.js +3 -0
  496. package/dist/vef-tree-select/index.d.ts +7 -0
  497. package/dist/vef-tree-select/index.js +3 -0
  498. package/dist/vef-tree-select/props.d.ts +142 -0
  499. package/package.json +56 -0
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{jsx as e}from"@emotion/react/jsx-runtime";function r({value:r}){return e("span",{children:r})}export{r as default};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,4 @@
1
+ import { type ObjectType, type StringKey } from "@vef-framework/shared";
2
+ import type { TableColumnProps } from "./props";
3
+ declare function Text<T extends ObjectType, K extends StringKey<T>>({ value, record, rowIndex, columnProps, }: TableColumnProps<T, K>): import("@emotion/react/jsx-runtime").JSX.Element | null;
4
+ export default Text;
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{jsx as e}from"@emotion/react/jsx-runtime";import{css as o}from"@emotion/react";import{VefError as r,isNullish as t}from"@vef-framework/shared";import{useMemo as l}from"react";import i from"../../../vef-text/index.js";import{useComputedValues as a}from"../../hooks/use-computed-values.js";import{useDisplayValue as u}from"../../hooks/use-display-value.js";function f({value:f,record:m,rowIndex:s,columnProps:p}){if("Text"!==p.type)throw new r(-1,"Column type must be Text");const{defaultValue:c,formatter:d,prefix:n,suffix:x,ellipsis:w,bold:y,italic:h,color:V,copyable:b,width:k}=p,[v,j,T]=a([{key:"bold",rawValue:y,defaultValue:!1},{key:"italic",rawValue:h,defaultValue:!1},{key:"color",rawValue:V}],f,m,s),C=u(f,m,s,{defaultValue:c,formatter:d,prefix:n,suffix:x}),I=l((()=>{if(k)return o({maxWidth:`${k}px !important`})}),[k]);return t(C)?null:e(i,{bold:v,color:T,copyable:b,css:I,ellipsis:w,ellipsisTip:w?C:void 0,italic:j,children:C})}export{f as default};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,2 @@
1
+ declare const VefColumnsSettings: import("react").NamedExoticComponent<{}>;
2
+ export default VefColumnsSettings;
@@ -0,0 +1,54 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{jsxs as e,jsx as n,Fragment as t}from"@emotion/react/jsx-runtime";import{RollbackOutlined as i,VerticalRightOutlined as l,VerticalLeftOutlined as a}from"@ant-design/icons";import{css as o}from"@emotion/react";import{themeVariables as r}from"@vef-framework/shared";import{Checkbox as s}from"antd";import{useMemo as d,useCallback as m,memo as c}from"react";import f from"../../vef-bool/index.js";import u from"../../vef-button/index.js";import p from"../../vef-divider/index.js";import g from"../../vef-sortable-list/index.js";import v from"../../vef-text/index.js";import{useTableContextSelector as h}from"../hooks/use-table-context.js";const b=o`
3
+ width: 260px;
4
+ padding: ${r.paddingSm};
5
+
6
+ .vef-divider-horizontal {
7
+ margin: ${r.marginSm} 0;
8
+ }
9
+
10
+ .vef-table-columns-settings-panel-header {
11
+ display: flex;
12
+ justify-content: space-between;
13
+ align-items: center;
14
+ padding-left: ${r.paddingSm};
15
+ }
16
+
17
+ .vef-table-columns-settings-panel-body {
18
+ width: 100%;
19
+
20
+ .vef-table-columns-settings-panel-columns {
21
+ width: 100%;
22
+ display: flex;
23
+ flex-direction: column;
24
+
25
+ .vef-table-columns-settings-panel-column {
26
+ display: grid;
27
+ grid-template-columns: max-content 1fr max-content;
28
+ align-items: center;
29
+ padding: ${r.paddingXs};
30
+ border-radius: ${r.borderRadius};
31
+
32
+ &:hover {
33
+ background-color: ${r.colorPrimaryBg};
34
+ }
35
+
36
+ .vef-table-columns-settings-panel-column-drag-icon {
37
+ cursor: move;
38
+ color: ${r.colorTextSecondary};
39
+ padding-right: ${r.padding};
40
+ }
41
+
42
+ .vef-table-columns-settings-panel-column-fixed-icon {
43
+ display: flex;
44
+ align-items: center;
45
+
46
+ .vef-divider {
47
+ --vef-divider-vertical-margin-inline: 0;
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ `,x=c((()=>{const{defaultColumnConfigMap:o,columnConfigMap:r,setColumnConfigMap:c}=h((e=>{const{defaultColumnConfigMap:n,columnConfigMap:t,setColumnConfigMap:i}=e;return{defaultColumnConfigMap:n,columnConfigMap:t,setColumnConfigMap:i}})),x=d((()=>[...r.entries()].sort((([e,n],[t,i])=>n.order-i.order)).map((([e,n])=>{const{title:t,configurable:i,...l}=n;return{value:e,label:t,disabled:!i,...l}}))),[r]),C=m((e=>{const n=e.reduce(((e,n,t)=>{const{value:i,label:l,disabled:a,order:o,...r}=n,s={title:l,configurable:!a,order:t+1,...r};return e.set(i,s),e}),new Map);c(n)}),[c]),y=d((()=>x.filter((e=>e.show)).map((e=>e.value))),[x]),k=d((()=>{const e=y.length;return e===x.length?"checked":e>0?"indeterminate":"unchecked"}),[y.length,x.length]),w=m((e=>{const n=new Set(e),t=x.map((e=>({...e,show:n.has(e.value)})));C(t)}),[x,C]),M=m(((e,n)=>{const t=x.map((t=>({...t,fixed:t.value===e?n:t.fixed})));C(t)}),[x,C]),j=m((e=>{C(e)}),[C]),$=m((()=>{c(new Map(o))}),[o,c]);return e("div",{css:b,children:[e("div",{className:"vef-table-columns-settings-panel-header",children:[n(f,{indeterminate:"indeterminate"===k,label:n(v,{bold:!0,children:"列显示"}),value:"checked"===k,variant:"checkbox",onChange:e=>{w(e?x.map((e=>e.value)):[])}}),n(u,{color:"primary",variant:"text",onClick:$,children:"重置"})]}),n(p,{}),n(s.Group,{className:"vef-table-columns-settings-panel-body",value:y,onChange:w,children:n(g,{useHandle:!0,className:"vef-table-columns-settings-panel-columns",handleClassName:"vef-table-columns-settings-panel-column-drag-icon",itemClassName:"vef-table-columns-settings-panel-column",itemKey:"value",items:x,useOverlay:!1,renderItem:({value:o,label:r,disabled:d,fixed:m,show:c})=>e(t,{children:[n(s,{disabled:d,value:o,children:r}),e("span",{className:"vef-table-columns-settings-panel-column-fixed-icon",children:[n(u,{color:"left"===m?"primary":"default",disabled:d||!c,icon:n("left"===m?i:l,{}),size:"small",tip:"left"===m?"取消左侧固定":"固定到左侧",variant:"link",onClick:()=>{"left"===m?M(o):M(o,"left")}}),n(p,{direction:"vertical"}),n(u,{color:"right"===m?"primary":"default",disabled:d||!c,icon:n("right"===m?i:a,{}),size:"small",tip:"right"===m?"取消右侧固定":"固定到右侧",variant:"link",onClick:()=>{"right"===m?M(o):M(o,"right")}})]})]}),onChange:j})})]})}),(()=>!1));x.displayName="VefColumnsSettings";export{x as default};
54
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,22 @@
1
+ import { type ActionButton, type ObjectType } from "@vef-framework/shared";
2
+ import type { OperationButtonContext } from "../types";
3
+ export interface VefOperationButtonsProps<T extends ObjectType, C extends ObjectType> {
4
+ /**
5
+ * The record of the row.
6
+ */
7
+ record: T;
8
+ /**
9
+ * The index of the row.
10
+ */
11
+ rowIndex: number;
12
+ /**
13
+ * The operation buttons of the table.
14
+ */
15
+ operationButtons: Array<ActionButton<OperationButtonContext<T, C>>>;
16
+ /**
17
+ * The maximum number of visible operation buttons.
18
+ */
19
+ maxVisibleOperationButtons: number;
20
+ }
21
+ declare function VefOperationButtons<T extends ObjectType, C extends ObjectType>({ record, rowIndex, operationButtons, maxVisibleOperationButtons, }: VefOperationButtonsProps<T, C>): import("@emotion/react/jsx-runtime").JSX.Element;
22
+ export default VefOperationButtons;
@@ -0,0 +1,12 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{jsxs as e,jsx as n}from"@emotion/react/jsx-runtime";import{MoreOutlined as o}from"@ant-design/icons";import{css as t}from"@emotion/react";import{useComputedActionButtons as i}from"@vef-framework/hooks";import{invokeMaybeAsyncFn as r,showConfirmation as l}from"@vef-framework/shared";import{useMemo as c,useState as a,useCallback as s}from"react";import d from"../../vef-button/index.js";import m from"../../vef-dropdown/index.js";import f from"../../vef-flex/index.js";import p from"../../vef-popconfirm/index.js";import{useTableContextSelector as h}from"../hooks/use-table-context.js";const u=t`
3
+ .vef-btn-sm {
4
+ --vef-control-height-sm: 24px;
5
+ --vef-button-padding-inline-sm: 4px;
6
+
7
+ &.vef-btn-icon-only {
8
+ padding-inline: 2px;
9
+ }
10
+ }
11
+ `;function x({record:t,rowIndex:x,operationButtons:b,maxVisibleOperationButtons:k}){const{externalContext:g,refetch:y,isFetching:C,selectedKeys:v,selectedRecords:j}=h((e=>{const{externalContext:n,refetch:o,isFetching:t,selectedKeys:i,selectedRecords:r}=e;return{externalContext:n,refetch:o,isFetching:t,selectedKeys:i,selectedRecords:r}})),w=c((()=>({record:t,rowIndex:x,refetch:y,isFetching:C,selectedKeys:v,selectedRecords:j,...g??{}})),[g,C,t,y,x,v,j]),F=i(b,w),[K,R]=a(!1),q=c((()=>F.length>k?F.slice(k).map((e=>{const{key:n,label:o,icon:t,disabled:i}=e;return{type:"item",key:n,label:o,icon:t,disabled:i}})):[]),[F,k]),[z,I]=a(!1),[M,O]=a(null),T=s((()=>{I(!1),O(null)}),[]),B=c((()=>{if(0!==q.length)return async e=>{const{requireConfirmation:n,confirmationMode:o,confirmationTitle:t,confirmationContent:i,onClick:c}=F.find((n=>n.key===e)),a=async()=>{try{await r(c,{beforeInvoke:()=>{R(!0)},onFinally:()=>{R(!1)}},w)}finally{T()}};n?"simple"===o?(O({title:t,content:i,okHandler:a}),I(!0)):l(t,i,a,{onCancel:()=>{O(null)}}):await a()}}),[F,w,T,q.length]);return e(f,{align:"center",css:u,gap:"small",justify:"center",children:[F.slice(0,k).map((e=>{const{key:o,label:t,icon:i,color:r,disabled:l,requireConfirmation:c,confirmationMode:a,confirmationTitle:s,confirmationContent:m,onClick:f}=e;return n(d,c?{requireConfirmation:!0,color:r,confirmationContent:m,confirmationMode:a,confirmationTitle:s,disabled:l||K,icon:i,size:"small",variant:"filled",onConfirmationOk:()=>f(w),children:t}:{color:r,disabled:l||K,icon:i,size:"small",variant:"filled",onClick:e=>(e.stopPropagation(),f(w)),children:t},o)})),F.length>k&&n(m,{disabled:K,items:q,onClick:B,children:n(p,{content:M?.content,disabled:K,open:z,title:M?.title,onCancel:T,onOk:M?.okHandler,children:n(d,{color:"primary",disabled:K,icon:n(o,{}),loading:K,size:"small",variant:"filled",onClick:e=>e.stopPropagation()})})})]})}export{x as default};
12
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,2 @@
1
+ declare const VefSettingsIcon: import("react").NamedExoticComponent<{}>;
2
+ export default VefSettingsIcon;
@@ -0,0 +1,5 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{jsx as o}from"@emotion/react/jsx-runtime";import{SettingOutlined as r}from"@ant-design/icons";import{css as t}from"@emotion/react";import{themeVariables as m}from"@vef-framework/shared";import{memo as e}from"react";import{useTableContextSelector as i}from"../hooks/use-table-context.js";const a=t`
3
+ color: ${m.colorPrimary};
4
+ `,n=e((()=>{const t=i((o=>o.columnConfigMapHasChanged));return o(r,{css:t?a:void 0})}),(()=>!1));export{n as default};
5
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,34 @@
1
+ import type { ComputedActionButton } from "@vef-framework/hooks";
2
+ import { type ObjectType } from "@vef-framework/shared";
3
+ import { type FC } from "react";
4
+ import type { VefTableProps } from "../props";
5
+ import type { BatchActionButtonContext } from "../types";
6
+ import { type VefPaginationProps } from "../../vef-pagination";
7
+ /**
8
+ * The props of the table footer.
9
+ */
10
+ export interface VefTableFooterProps<T extends ObjectType, C extends ObjectType> {
11
+ /**
12
+ * The text of the selection summary.
13
+ */
14
+ selectionSummary: VefTableProps<T, any, any, C>["selectionSummary"];
15
+ /**
16
+ * The size of the table.
17
+ */
18
+ size: NonNullable<VefTableProps<T, any, any, C>["size"]>;
19
+ /**
20
+ * The props of the pagination.
21
+ */
22
+ paginationProps?: VefPaginationProps;
23
+ /**
24
+ * The batch action buttons.
25
+ */
26
+ batchActionButtons: Array<ComputedActionButton<BatchActionButtonContext<T, C>>>;
27
+ /**
28
+ * The context of the batch action button.
29
+ */
30
+ batchActionButtonContext: BatchActionButtonContext<T, C>;
31
+ }
32
+ declare function VefTableFooterBase<T extends ObjectType, C extends ObjectType>({ selectionSummary, size, paginationProps, batchActionButtons, batchActionButtonContext, }: VefTableFooterProps<T, C>): import("@emotion/react/jsx-runtime").JSX.Element;
33
+ declare const VefTableFooter: typeof VefTableFooterBase & Pick<FC, "displayName">;
34
+ export default VefTableFooter;
@@ -0,0 +1,19 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{jsxs as o,jsx as e}from"@emotion/react/jsx-runtime";import{css as i}from"@emotion/react";import{themeVariables as t,invokeMaybeAsyncFn as n}from"@vef-framework/shared";import{useMemo as r,memo as a}from"react";import l from"../../vef-button/index.js";import c from"../../vef-pagination/index.js";import m from"../../vef-text/index.js";import{useTableContextSelector as d}from"../hooks/use-table-context.js";const f=i`
3
+ width: 100%;
4
+ display: flex;
5
+ align-items: center;
6
+ gap: var(--vef-table-footer-gap);
7
+
8
+ > div {
9
+ flex: auto;
10
+ display: flex;
11
+ align-items: center;
12
+ gap: ${t.padding};
13
+ }
14
+
15
+ > .vef-pagination {
16
+ flex: none;
17
+ }
18
+ `;const s=a((function({selectionSummary:i,size:t,paginationProps:a,batchActionButtons:s,batchActionButtonContext:p}){const u=d((o=>o.selectedRecords)),b=r((()=>{if(!1!==i)return i?i(u):u.length>0?o(m,{color:"secondary",children:["已选择"," ",e(m,{bold:!0,color:"blue",children:u.length})," ","项"]}):void 0}),[i,u]),v=r((()=>s.map((o=>{const{key:i,label:t,icon:r,disabled:a,color:c,requireConfirmation:m,confirmationMode:d,confirmationTitle:f,confirmationContent:s,onClick:u}=o,b=async()=>{await n(u,{},p)};return e(l,m?{requireConfirmation:!0,color:c,confirmationContent:s,confirmationMode:d,confirmationTitle:f,disabled:a,icon:r,onConfirmationOk:b,children:t}:{color:c,disabled:a,icon:r,onClick:b,children:t},i)}))),[s,p]),g=r((()=>({"--vef-table-footer-gap":`var(--vef-table-cell-padding-block${"small"===t?"-sm":"medium"===t?"-md":""})`})),[t]);return o("div",{css:f,style:g,children:[o("div",{children:[b,v]}),e(c,{...a})]})}));s.displayName="VefTableFooter";export{s as default};
19
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,12 @@
1
+ import { type MaybeUndefined, type ObjectType } from "@vef-framework/shared";
2
+ import type { TableComputedType } from "./types";
3
+ /**
4
+ * Decide the value.
5
+ *
6
+ * @param rawValue - The raw value.
7
+ * @param value - The value.
8
+ * @param record - The record.
9
+ * @param rowIndex - The row index.
10
+ * @returns The value.
11
+ */
12
+ export declare function computeValue<T extends ObjectType, V, R>(rawValue: MaybeUndefined<TableComputedType<T, V, R>>, value: V, record: T, rowIndex: number, defaultValue: R): R;
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{isFunction as r,isExpression as e,compileDynamicFn as n}from"@vef-framework/shared";function o(o,t,f,u,i){if(r(o))return o(t,f,u);if(e(o)){return n(o,"value","record","rowIndex",`return ${o.expression}`)(t,f,u)}return o??i}export{o as computeValue};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,13 @@
1
+ import type { ActionButton, ObjectType } from "@vef-framework/shared";
2
+ import type { BatchActionButtonContext, InternalTableContext } from "../types";
3
+ /**
4
+ * The hook to compute the batch buttons.
5
+ *
6
+ * @param batchActionButtons - The batch action buttons.
7
+ * @param tableContext - The table context.
8
+ * @returns The computed batch buttons.
9
+ */
10
+ export declare function useComputedBatchActionButtons<T extends ObjectType, C extends ObjectType>(batchActionButtons: Array<ActionButton<BatchActionButtonContext<T, C>>>, tableContext: InternalTableContext<T, C>): {
11
+ computedBatchActionButtons: import("@vef-framework/hooks").ComputedActionButton<BatchActionButtonContext<T, C>>[];
12
+ batchActionButtonContext: BatchActionButtonContext<T, C>;
13
+ };
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{useComputedActionButtons as e}from"@vef-framework/hooks";import{useMemo as t}from"react";function o(o,c){const{externalContext:r,isFetching:n,refetch:s,selectedKeys:i,selectedRecords:d}=c,f=t((()=>({isFetching:n,refetch:s,selectedKeys:i,selectedRecords:d,...r??{}})),[r,n,s,i,d]);return{computedBatchActionButtons:e(o,f),batchActionButtonContext:f}}export{o as useComputedBatchActionButtons};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,10 @@
1
+ import type { ObjectType } from "@vef-framework/shared";
2
+ import type { TableColumn, TableColumnConfig } from "../types";
3
+ /**
4
+ * Use the computed columns.
5
+ *
6
+ * @param columns The columns of the table
7
+ * @param columnConfigMap The column configs
8
+ * @returns The computed columns
9
+ */
10
+ export declare function useComputedColumns<T extends ObjectType>(columns: Array<TableColumn<T>>, columnConfigMap: Map<string, TableColumnConfig>): TableColumn<T>[];
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{useMemo as e}from"react";function r(r,t){return e((()=>r.map((e=>{const{name:r}=e,o=t.get(r);return{...e,show:o.show,fixed:o.fixed}})).sort(((e,r)=>t.get(e.name).order-t.get(r.name).order))),[r,t])}export{r as useComputedColumns};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,45 @@
1
+ import type { ObjectType } from "@vef-framework/shared";
2
+ import type { TableComputedType } from "../types";
3
+ type ExtractValueType<T> = T extends {
4
+ rawValue: TableComputedType<any, any, infer E>;
5
+ } ? T extends {
6
+ defaultValue: NonNullable<E>;
7
+ } ? NonNullable<E> : E : never;
8
+ type ComputedValueTuple<C extends ReadonlyArray<ComputedValue<any, any, unknown>>> = {
9
+ [K in keyof C]: ExtractValueType<C[K]>;
10
+ };
11
+ type ComputedValueRecord<C extends ReadonlyArray<ComputedValue<any, any, unknown>>> = {
12
+ [K in C[number]["key"]]: ExtractValueType<Extract<C[number], {
13
+ key: K;
14
+ }>>;
15
+ };
16
+ type ComputedValueResult<A extends ReadonlyArray<ComputedValue<any, any, unknown>>, R extends boolean> = R extends true ? ComputedValueRecord<A> : ComputedValueTuple<A>;
17
+ /**
18
+ * The computed value.
19
+ */
20
+ export interface ComputedValue<T extends ObjectType, V, E> {
21
+ /**
22
+ * The key of the computed value.
23
+ */
24
+ key: string;
25
+ /**
26
+ * The raw value of the computed value.
27
+ */
28
+ rawValue?: TableComputedType<T, V, E>;
29
+ /**
30
+ * The default value of the computed value.
31
+ */
32
+ defaultValue?: E;
33
+ }
34
+ /**
35
+ * Use the computed values.
36
+ *
37
+ * @param values The computed values.
38
+ * @param value The value.
39
+ * @param record The record.
40
+ * @param rowIndex The row index.
41
+ * @param returnAsObject Whether to return the computed values as an object.
42
+ * @returns The computed values.
43
+ */
44
+ export declare function useComputedValues<T extends ObjectType, V, A extends ReadonlyArray<ComputedValue<any, any, unknown>>, R extends boolean = false>(values: A, value: V, record: T, rowIndex: number, returnAsObject?: R): ComputedValueResult<A, R>;
45
+ export {};
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{useDeepCompareMemo as e}from"@vef-framework/hooks";import{computeValue as r}from"../helper.js";function o(o,t,u,a,f=!1){const m=e((()=>o.reduce(((e,o)=>{const{key:f,rawValue:m,defaultValue:n}=o,c=r(m,t,u,a,n);return e[f]=c,e}),{})),[u,a,t,o]);return f?o.reduce(((e,{key:r})=>(e[r]=m[r],e)),{}):o.map((({key:e})=>m[e]))}export{o as useComputedValues};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,11 @@
1
+ import type { MaybeUndefined, ObjectType, PaginationParams, Provider, QueryConfig, QueryRefetchResult } from "@vef-framework/shared";
2
+ /**
3
+ * The hook to get the data of VefTable.
4
+ */
5
+ export declare function useData<T extends ObjectType>({ apiParams, ...queryConfig }: QueryConfig<any, any, any>, paginated: boolean, paginationParams: PaginationParams): {
6
+ data: MaybeUndefined<T[]>;
7
+ isFetching: boolean;
8
+ isLoading: boolean;
9
+ total: number | undefined;
10
+ refetch: Provider<Promise<QueryRefetchResult<T>>>;
11
+ };
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{useDataQuery as e}from"@vef-framework/hooks";import{isNumber as t,isArray as a}from"@vef-framework/shared";function r({apiParams:r,...i},o,s){const{data:n,isLoading:f,isFetching:h,isSuccess:l,refetch:p}=e({apiParams:o?{...s,...r}:r,keepPreviousData:!0,staleTime:0,...i});if(l)if(o){if(!Object.prototype.hasOwnProperty.call(n,"total")||!Object.prototype.hasOwnProperty.call(n,"items"))throw new Error("The paginated data of VefTable is invalid. The data must contain the `total` and `items` properties. Please check the data.");if(!t(n.total))throw new Error("The `total` property of the paginated data of VefTable is invalid. It must be a number.");if(!a(n.items))throw new Error("The `items` property of the paginated data of VefTable is invalid. It must be an array.")}else if(!a(n))throw new Error("The data of VefTable is invalid. It must be an array.");return{data:o?n?.items:n,isFetching:h,isLoading:f,total:o?n?.total:void 0,refetch:p}}export{r as useData};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,9 @@
1
+ import type { ObjectType } from "@vef-framework/shared";
2
+ import type { TableColumn, TableColumnConfig } from "../types";
3
+ /**
4
+ * Use the default column configs.
5
+ *
6
+ * @param columns The columns of the table
7
+ * @returns The default column configs
8
+ */
9
+ export declare function useDefaultColumnConfigs<T extends ObjectType>(columns: Array<TableColumn<T>>): Map<string, TableColumnConfig>;
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{useMemo as e}from"react";function t(t){return e((()=>{const e=new Map;let o=1;for(const r of t){const{name:t,title:n,fixed:f,configurable:i}=r;e.set(t,{title:n??t,show:!0,fixed:f,order:o++,configurable:i??!0})}return e}),[t])}export{t as useDefaultColumnConfigs};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,32 @@
1
+ import { type Expression, type ObjectType, type StringKey, type TriMapper } from "@vef-framework/shared";
2
+ /**
3
+ * The configuration object for the `useDisplayValue` hook.
4
+ */
5
+ export interface DisplayValueConfig<T extends ObjectType, K extends StringKey<T>> {
6
+ /**
7
+ * The default value to use if the value is undefined.
8
+ */
9
+ defaultValue?: T[K];
10
+ /**
11
+ * The formatter function to use to format the value.
12
+ */
13
+ formatter?: TriMapper<T[K], T, number, string> | Expression;
14
+ /**
15
+ * The prefix to use to format the value.
16
+ */
17
+ prefix?: string;
18
+ /**
19
+ * The suffix to use to format the value.
20
+ */
21
+ suffix?: string;
22
+ }
23
+ /**
24
+ * Get the display value of a table cell.
25
+ *
26
+ * @param value - The value to display.
27
+ * @param record - The record that contains the value.
28
+ * @param rowIndex - The index of the row.
29
+ * @param config - The configuration object for the display value.
30
+ * @returns The display value of the table cell.
31
+ */
32
+ export declare function useDisplayValue<T extends ObjectType, K extends StringKey<T>>(value: T[K], record: T, rowIndex: number, config: DisplayValueConfig<T, K>): string;
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{isNullish as r,isFunction as e,isExpression as t,compileDynamicFn as o}from"@vef-framework/shared";import{useMemo as f}from"react";function n(n,u,i,a){const{defaultValue:m,formatter:d,prefix:p,suffix:s}=a,x=r(n)?m:n;return f((()=>{if(e(d))return d(n,u,i);if(t(d)){return o(d,"value","record","rowIndex",`return ${d.expression}`)(n,u,i)}return r(x)?void 0:`${p??""}${x}${s??""}`}),[d,x,p,s,n,u,i])}export{n as useDisplayValue};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,6 @@
1
+ import type { MaybeUndefined, ObjectType } from "@vef-framework/shared";
2
+ import type { VefTableProps } from "../props";
3
+ export declare function useHelperColumns<T extends ObjectType, C extends ObjectType>({ showRowNumber, operationButtons, maxVisibleOperationButtons, size, }: Pick<VefTableProps<T, any, any, C>, "showRowNumber" | "operationButtons" | "maxVisibleOperationButtons" | "size">): {
4
+ rowNumberColumn: MaybeUndefined<import("antd").TableColumnGroupType<T> | import("antd").TableColumnType<T>>;
5
+ operationColumn: MaybeUndefined<import("antd").TableColumnGroupType<T> | import("antd").TableColumnType<T>>;
6
+ };
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{jsx as o}from"@emotion/react/jsx-runtime";import{useAuthorizedItems as t}from"@vef-framework/hooks";import{useMemo as e}from"react";import{isEqual as r}from"@vef-framework/shared";import n from"../components/columns-settings.js";import i from"../components/operation-buttons.js";import m from"../components/settings-icon.js";import{useOperationColumnWidth as s}from"./use-operation-column-width.js";function p({showRowNumber:p,operationButtons:u,maxVisibleOperationButtons:f,size:l}){const a=e((()=>{if(p)return{key:"_rowNumber",title:"#",align:"center",fixed:"left",width:48,shouldCellUpdate:()=>!1,render:(o,t,e)=>e+1}}),[p]),d=t(u??[]),c=s(d,f??3,l);return{rowNumberColumn:a,operationColumn:e((()=>{if(d&&d.length>0)return{key:"_operationButtons",title:"操作",align:"center",fixed:"right",filterIcon:()=>o(m,{}),filterDropdown:()=>o(n,{}),width:c,shouldCellUpdate:(o,t)=>!r(o,t),render:(t,e,r)=>o(i,{maxVisibleOperationButtons:f??3,operationButtons:d,record:e,rowIndex:r})}}),[d,f,c])}}export{p as useHelperColumns};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,10 @@
1
+ import type { IdValue, ObjectType } from "@vef-framework/shared";
2
+ import type { VefTableProps } from "../props";
3
+ /**
4
+ * The hook to merge the controlled and uncontrolled value.
5
+ */
6
+ export declare function useMergedValue<T extends ObjectType>({ value, defaultValue, multipleSelection, onChange, }: Pick<VefTableProps<T>, "value" | "defaultValue" | "multipleSelection" | "onChange">): {
7
+ mergedValue: string[];
8
+ mergedOnChange: (value: IdValue[], records: T[]) => void;
9
+ selectedRecords: import("react").MutableRefObject<T[]>;
10
+ };
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{isArray as e}from"@vef-framework/shared";import{useState as r,useMemo as o,useRef as t,useCallback as n}from"react";function a({value:a,defaultValue:l,multipleSelection:m,onChange:u}){const[c,d]=r((()=>e(l)?l:l?[l]:[])),f=o((()=>e(a)?a:a?[a]:void 0),[a]),i=o((()=>f??c),[f,c]),g=t([]);return{mergedValue:i,mergedOnChange:n(((e,r)=>{f||d(e),g.current=r,u?.(m?e:e[0],m?r:r[0])}),[m,f,u]),selectedRecords:g}}export{a as useMergedValue};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,11 @@
1
+ import type { ActionButton } from "@vef-framework/shared";
2
+ import type { VefTableProps } from "../props";
3
+ /**
4
+ * Calculate the width of the operation column.
5
+ *
6
+ * @param operationButtons The operation buttons to calculate the width for.
7
+ * @param maxVisibleOperationButtons The maximum number of operation buttons to display.
8
+ * @param size The size of the table.
9
+ * @returns The width of the operation column.
10
+ */
11
+ export declare function useOperationColumnWidth(operationButtons: Array<ActionButton<any>>, maxVisibleOperationButtons: number, size?: VefTableProps["size"]): number;
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{useThemeTokens as r}from"@vef-framework/hooks";import{max as t}from"@vef-framework/shared";import{useMemo as e}from"react";function n(n,f,m="medium"){const{Button:a}=r(),c="large"===m?16:8,u=a?.contentFontSizeSM??16;return e((()=>{if(0===n.length)return 0;if(n.length>f){const r=new Set;for(let e=0;e<f;e++){const e=t(n,(t=>r.has(t)?0:t.label.length));e&&r.add(e)}return o(Array.from(r),u,c,!0)}return o(n,u,c,!1)}),[c,u,f,n])}function o(r,t,e,n){const o=t+4;return r.map((r=>{const t=r.label.length*o+8;return r.icon?t+o+8:t})).reduce(((r,t)=>r+t),0)+(n?o+8:0)+2*e}export{n as useOperationColumnWidth};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,17 @@
1
+ import type { PaginationParams } from "@vef-framework/shared";
2
+ import type { VefTableProps } from "../props";
3
+ /**
4
+ * The hook to get the pagination props of VefPagination.
5
+ *
6
+ * @param paginated - Whether to allow pagination.
7
+ * @returns The pagination props.
8
+ */
9
+ export declare function usePaginationProps(paginated: boolean, size: NonNullable<VefTableProps["size"]>): {
10
+ paginationProps: {
11
+ pageNumber: number | undefined;
12
+ pageSize: number | undefined;
13
+ size: "small" | "medium";
14
+ onChange: import("@vef-framework/shared").BiConsumer<number, number> | undefined;
15
+ } | undefined;
16
+ paginationParams: PaginationParams;
17
+ };
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{useState as e,useMemo as a}from"react";import{defaultPageSizeOptions as i}from"../../vef-pagination/props.js";function r(r,p){const[n,o]=e({page:1,size:i[2]}),s=a((()=>{if(r)return(e,a)=>{o({page:e,size:a})}}),[r,o]);return{paginationProps:a((()=>{if(r)return{pageNumber:n.page,pageSize:n.size,size:"small"===p?"small":"medium",onChange:s}}),[s,r,n.page,n.size,p]),paginationParams:n}}export{r as usePaginationProps};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,11 @@
1
+ import type { Consumer, ObjectType } from "@vef-framework/shared";
2
+ import type { TableProps } from "antd";
3
+ import type { VefTableProps } from "../props";
4
+ type OnRow<T> = TableProps<T>["onRow"];
5
+ /**
6
+ * The hook is used to handle the row props.
7
+ */
8
+ export declare function useRowProps<T extends ObjectType>({ enableRowClick, enableRowClickForSelection, onRowClick, disabledSelection, handleRowClickSelection, }: Pick<VefTableProps<T>, "enableRowClick" | "enableRowClickForSelection" | "onRowClick" | "disabledSelection"> & {
9
+ handleRowClickSelection?: Consumer<T>;
10
+ }): OnRow<T>;
11
+ export {};
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{useMemo as e}from"react";function o({enableRowClick:o=!1,enableRowClickForSelection:n=!1,onRowClick:l,disabledSelection:i,handleRowClickSelection:r}){return e((()=>{if(o)return(e,o)=>{const t=i?.(e)??!1;return{style:{cursor:t?"not-allowed":"pointer"},onClick:t?void 0:()=>{n?r?.(e):l?.(e,o??-1)}}}}),[i,o,n,r,l])}export{o as useRowProps};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,11 @@
1
+ import type { ObjectType } from "@vef-framework/shared";
2
+ import type { VefTableProps } from "../props";
3
+ /**
4
+ * The hook to get the row selection config.
5
+ */
6
+ export declare function useRowSelectionConfig<T extends ObjectType>({ rowKey, value, defaultValue, selectable, enableRowClick, enableRowClickForSelection, multipleSelection, showSelectAllCheckbox, disabledSelection, onSelect, onDeselect, onChange, }: Pick<VefTableProps<T>, "value" | "defaultValue" | "selectable" | "multipleSelection" | "showSelectAllCheckbox" | "disabledSelection" | "enableRowClick" | "enableRowClickForSelection" | "onSelect" | "onDeselect" | "onChange"> & Required<Pick<VefTableProps<T>, "rowKey">>): {
7
+ rowSelectionConfig: import("antd/es/table/interface").TableRowSelection<T> | undefined;
8
+ handleRowClickSelection: ((record: T) => void) | undefined;
9
+ mergedValue: string[];
10
+ selectedRecords: import("react").MutableRefObject<T[]>;
11
+ };
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{isFunction as e}from"@vef-framework/shared";import{useMemo as l}from"react";import{useMergedValue as o}from"./use-merged-value.js";function t({rowKey:t,value:r,defaultValue:n,selectable:c,enableRowClick:i,enableRowClickForSelection:s,multipleSelection:d=!0,showSelectAllCheckbox:a=!0,disabledSelection:u,onSelect:f,onDeselect:h,onChange:m}){const{mergedValue:p,mergedOnChange:S,selectedRecords:g}=o({value:r,defaultValue:n,multipleSelection:d,onChange:m}),C=l((()=>{if(i&&s)return l=>{const o=e(t)?t(l):l[t];if(p.includes(o)){if(!d)return;const r=p.filter((e=>e!==o)),n=g.current.filter((l=>(e(t)?t(l):l[t])!==o));S(r,n),h?.(o,l)}else{const e=[o];d&&e.push(...p);const t=[l];d&&t.push(...g.current),S(e,t),f?.(o,l)}}}),[i,s,S,p,d,h,f,t,g]);return{rowSelectionConfig:l((()=>{if(!c)return;return{fixed:!0,hideSelectAll:!a,preserveSelectedRowKeys:!1,selectedRowKeys:p,type:d?"checkbox":"radio",getCheckboxProps:e(u)?e=>({disabled:u(e)}):void 0,onChange:(e,l)=>{S(e,l)},onSelect:e(f)||e(h)?(l,o)=>{const r=e(t)?t(l):l[t];o?f?.(r,l):h?.(r,l)}:void 0}}),[c,a,p,d,u,f,h,S,t]),handleRowClickSelection:C,mergedValue:p,selectedRecords:g}}export{t as useRowSelectionConfig};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,12 @@
1
+ import type { ObjectType } from "@vef-framework/shared";
2
+ import type { TableColumnsType, TableColumnType } from "antd";
3
+ import type { TableColumn } from "../types";
4
+ /**
5
+ * Hook to convert table columns to antd table columns
6
+ *
7
+ * @param columns - The columns to convert
8
+ * @param rowNumberColumn - The row number column
9
+ * @param operationColumn - The operation column
10
+ * @returns The converted columns
11
+ */
12
+ export declare function useTableColumns<T extends ObjectType>(columns: Array<TableColumn<T>>, rowNumberColumn?: TableColumnType<T>, operationColumn?: TableColumnType<T>): TableColumnsType<T>;
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{jsx as e}from"@emotion/react/jsx-runtime";import{isNumber as r,isEqual as t}from"@vef-framework/shared";import{useMemo as o}from"react";import{columnComponents as n}from"../components/columns/index.js";function m(m,i,d){return o((()=>{const o=[],a=m.map((o=>{const{title:m,show:i,sort:d,fixed:a,dependentColumnNames:p,...s}=o,u=r(d)?{multiple:d}:!!d||void 0,l=n[o.type];return{key:s.name,dataIndex:s.name,title:m||s.name,fixed:a,hidden:!(i??1),sorter:u,align:s.align,width:s.width,shouldCellUpdate:(e,r)=>!t(p.map((r=>e[r])),p.map((e=>r[e]))),render:(r,t,o)=>e(l,{columnProps:s,record:t,rowIndex:o,value:r})}}));return i&&o.push(i),o.push(...a),d&&o.push(d),o}),[m,i,d])}export{m as useTableColumns};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,9 @@
1
+ import type { Mapper, ObjectType } from "@vef-framework/shared";
2
+ import type { InternalTableContext } from "../types";
3
+ declare const TableContextProvider: import("react").ComponentType<{
4
+ value: InternalTableContext<any, any>;
5
+ children: import("react").ReactNode;
6
+ }>;
7
+ declare const useTableContextSelector: (<T extends ObjectType, C extends ObjectType, R>(selector: Mapper<InternalTableContext<T, C>, R>) => R);
8
+ declare const useTableContext: <T extends ObjectType, C extends ObjectType>() => InternalTableContext<T, C>;
9
+ export { TableContextProvider, useTableContext, useTableContextSelector, };
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{createSelectableContext as e,noop as o}from"@vef-framework/shared";const{useContextSelector:n,useContext:t,ContextProvider:r}=e({isFetching:!1,refetch:()=>Promise.resolve({}),selectedKeys:[],selectedRecords:[],defaultColumnConfigMap:new Map,columnConfigMap:new Map,setColumnConfigMap:o,columnConfigMapHasChanged:!1}),s=n,a=t;export{r as TableContextProvider,a as useTableContext,s as useTableContextSelector};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,10 @@
1
+ import type { ObjectType, Provider, QueryRefetchResult } from "@vef-framework/shared";
2
+ import { type ForwardedRef } from "react";
3
+ import type { VefTableInstance } from "../props";
4
+ /**
5
+ * The hook to get the instance of VefTable.
6
+ *
7
+ * @param ref - The forwarded ref of VefTable.
8
+ * @param data - The data of VefTable.
9
+ */
10
+ export declare function useTableInstance<T extends ObjectType>(ref: ForwardedRef<VefTableInstance<T>>, data: T[], refetch: Provider<Promise<QueryRefetchResult<T>>>): import("react").RefObject<import("antd/es/table").TableRef>;
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{useRef as t,useImperativeHandle as r}from"react";function a(a,e,n){const c=t(null);return r(a,(()=>({getData:()=>e,refetch:async()=>{await n()}}))),c}export{a as useTableInstance};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,10 @@
1
+ import type { Mapper, MaybeUndefined, ObjectType } from "@vef-framework/shared";
2
+ import { type ReactNode } from "react";
3
+ import type { TableColumn } from "../types";
4
+ /**
5
+ * Hook to build summary from columns.
6
+ *
7
+ * @param columns - The columns to build summary from
8
+ * @returns The summary
9
+ */
10
+ export declare function useTableSummary<T extends ObjectType>(columns: Array<TableColumn<T>>): MaybeUndefined<Mapper<readonly T[], ReactNode>>;
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{jsx as m}from"@emotion/react/jsx-runtime";import{Table as r}from"antd";import{isFunction as n}from"@vef-framework/shared";import{useMemo as o}from"react";const{Summary:a}=r,{Row:e,Cell:t}=a;function i(r){const i=o((()=>r.filter((m=>n(m.summary))).map((m=>{const{name:r,summary:n,summaryColSpan:o}=m;return{name:r,summary:n,summaryColSpan:o??1}}))),[r]);return o((()=>{if(0!==i.length)return r=>m(a,{fixed:"bottom",children:m(e,{children:i.map((({name:n,summary:o,summaryColSpan:a},e)=>m(t,{colSpan:a,index:e,children:o(r)},n)))})})}),[i])}export{i as useTableSummary};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,9 @@
1
+ import type { ObjectType } from "@vef-framework/shared";
2
+ import type { TableColumnsType } from "antd";
3
+ /**
4
+ * The hook to get the width of the table.
5
+ *
6
+ * @param columns - The columns of the table.
7
+ * @returns The width of the table.
8
+ */
9
+ export declare function useTableWidth<T extends ObjectType>(columns: TableColumnsType<T>, selectable: boolean): number;
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{useMemo as r}from"react";function t(t,e){return r((()=>{const r=t.filter((r=>!0!==r.hidden)).map((r=>r.width??r.minWidth??160)).reduce(((r,t)=>r+t),0);return e?r+40:r}),[t,e])}export{t as useTableWidth};
3
+ /*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
@@ -0,0 +1,7 @@
1
+ import { type EmptyObject, type ObjectType, type ObjectValue } from "@vef-framework/shared";
2
+ import { type FC, type ReactNode, type RefAttributes } from "react";
3
+ import type { VefTableInstance, VefTableProps } from "./props";
4
+ declare const VefTable: (<T extends ObjectType = ObjectValue, P extends ObjectType = EmptyObject, R = T, C extends ObjectType = EmptyObject>(props: VefTableProps<T, P, R, C> & RefAttributes<VefTableInstance<T>>) => ReactNode) & Pick<FC, "displayName">;
5
+ export type { BatchActionButtonContext, OperationButtonContext, TableColumn, TableColumnFixed, TableContext, TableRowContext, TableSchema } from "./types";
6
+ export type { VefTableInstance, VefTableProps };
7
+ export default VefTable;