@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,33 @@
1
+ import type { Consumer, MaybeNull, ObjectType, StringKey } from "@vef-framework/shared";
2
+ import type { ReactNode } from "react";
3
+ import type { Except } from "@vef-framework/shared";
4
+ import type { FormItem, FormItemBase, FormScene } from "../../types";
5
+ /**
6
+ * The form field props.
7
+ */
8
+ export interface VefFormFieldProps<Values extends ObjectType, Key extends StringKey<Values>, Scene extends FormScene> {
9
+ /**
10
+ * The name of the form item.
11
+ */
12
+ name: Key;
13
+ /**
14
+ * The label of the form item.
15
+ */
16
+ label?: ReactNode;
17
+ /**
18
+ * Whether to disable the form item.
19
+ */
20
+ disabled: boolean;
21
+ /**
22
+ * The value of the form item.
23
+ */
24
+ value?: MaybeNull<Values[Key]>;
25
+ /**
26
+ * The on change event handler of the form item.
27
+ */
28
+ onChange?: Consumer<MaybeNull<Values[Key]>>;
29
+ /**
30
+ * The component props of the form item.
31
+ */
32
+ componentProps: Except<FormItem<Values, Key, Scene>, keyof FormItemBase<Values, Key, Scene>>;
33
+ }
@@ -0,0 +1,20 @@
1
+ import { type Handler, type ObjectType } from "@vef-framework/shared";
2
+ import { type FC } from "react";
3
+ import type { VefFormProps } from "../props";
4
+ import type { FormScene, FormSchema } from "../types";
5
+ /**
6
+ * The props of the form actions component.
7
+ *
8
+ * @param T - The type of the form values.
9
+ * @param R - The type of the submitted result of the form.
10
+ * @param S - The type of the form schema.
11
+ */
12
+ export interface FormActionsProps<Values extends ObjectType, Result, Scene extends FormScene, Schema extends FormSchema<Values, Scene>> extends Pick<VefFormProps<Values, Result, Scene, Schema>, "submissionButton" | "resetButton"> {
13
+ /**
14
+ * Resets the form fields to their initial values.
15
+ */
16
+ handleReset: Handler;
17
+ }
18
+ declare function VefFormActionsBase<Values extends ObjectType, Result, Scene extends FormScene, Schema extends FormSchema<Values, Scene>>({ submissionButton, resetButton, handleReset, }: FormActionsProps<Values, Result, Scene, Schema>): import("@emotion/react/jsx-runtime").JSX.Element | null;
19
+ declare const VefFormActions: typeof VefFormActionsBase & Pick<FC, "displayName">;
20
+ export default VefFormActions;
@@ -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 t,jsxs as o}from"@emotion/react/jsx-runtime";import{CheckOutlined as e}from"@ant-design/icons";import{css as r}from"@emotion/react";import{themeVariables as i,omit as n}from"@vef-framework/shared";import{Form as m}from"antd";import{memo as s}from"react";import d from"../../vef-button/index.js";import a from"../../vef-flex/index.js";import{useFormStore as f}from"../store.js";const{Item:c}=m,l={text:"提交",icon:t(e,{})},p={text:"重置"},u=r`
3
+ padding: ${i.padding} 0;
4
+ `;const x=s((function({submissionButton:e=l,resetButton:r=p,handleReset:i}){const[m,s]=f((t=>[t.isLoading,t.showActionButtons]));return s&&(e||r)?t(c,{children:o(a,{css:u,gap:"medium",justify:"flex-end",children:[r&&t(d,{color:"default",variant:"filled",onClick:i,...n(r,["text"]),children:r.text}),e&&t(d,{color:"primary",loading:m,type:"submit",...n(e,["text"]),children:e.text})]})}):null}));x.displayName="VefFormActions";export{x 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,18 @@
1
+ import { type ObjectType } from "@vef-framework/shared";
2
+ import type { FormScene, FormSchema, FormTabsUse } from "../types";
3
+ /**
4
+ * The props of the form content component.
5
+ */
6
+ export interface VefFormContentProps<Values extends ObjectType, Scene extends FormScene, Schema extends FormSchema<Values, Scene>> {
7
+ /**
8
+ * The schema of the form.
9
+ */
10
+ schema: Schema;
11
+ /**
12
+ * The use of the form tabs.
13
+ */
14
+ showTabs: false | FormTabsUse;
15
+ }
16
+ declare function VefFormContentBase<Values extends ObjectType, Scene extends FormScene, Schema extends FormSchema<Values, Scene>>({ schema, showTabs, }: VefFormContentProps<Values, Scene, Schema>): import("@emotion/react/jsx-runtime").JSX.Element;
17
+ declare const VefFormContent: typeof VefFormContentBase;
18
+ export default VefFormContent;
@@ -0,0 +1,6 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{jsx as e,jsxs as t}from"@emotion/react/jsx-runtime";import{css as r}from"@emotion/react";import{debounce as o,styles as i,isEqual as s,omit as l}from"@vef-framework/shared";import{useMemo as a,useRef as n,useState as m,useCallback as c,useEffect as d,memo as f}from"react";import u from"../../vef-empty-placeholder/index.js";import h from"../../vef-flex/index.js";import p from"../../vef-scroll-area/index.js";import{VefTabs as y}from"../../vef-tabs/index.js";import{useComputedValues as k}from"../hooks/use-computed-values.js";import{useFormStore as w}from"../store.js";import b from"./form-group.js";const g=r`
3
+ flex: 1;
4
+ min-height: 0;
5
+ `;const $=f((function({schema:r,showTabs:s}){const l=k([...r.map((({key:e,title:t})=>({key:`title-${e}`,rawValue:t}))),...r.map((({key:e,show:t})=>({key:`show-${e}`,rawValue:t,defaultValue:!0}))),...r.map((({key:e,disabled:t})=>({key:`disabled-${e}`,rawValue:t,defaultValue:!1})))],!0),f=a((()=>r.filter((({key:e})=>l[`show-${e}`]))),[l,r]),$=n({}),[v,j]=m(f[0]?.key??0),x=c((e=>{$.current[e]?.scrollIntoView({behavior:"smooth",block:"start",inline:"start"}),j(e)}),[]),V=a((()=>{if("navigation"!==s)return;return o({delay:60},(e=>{const{top:t}=e.target.getBoundingClientRect();for(const[e,r]of Object.entries($.current))if(r){const{top:o}=r.getBoundingClientRect();o-t<=60&&j(e)}}))}),[s]),[B]=w((e=>[e.setShowActionButtons]));if(d((()=>{B(f.length>0)}),[B,f.length]),0===f.length)return e(u,{description:"空表单"});if("switch"===s){const t=r.map((({key:t,rows:r})=>({key:`${t}`,label:l[`title-${t}`],destroyInactiveTabPane:!1,children:e(b,{disabled:l[`disabled-${t}`],rows:r})})));return e(y,{items:t})}return"navigation"===s?t(h,{vertical:!0,css:i.fullHeight,children:[e(y,{activeKey:`${v}`,items:r.map((({key:e})=>({key:`${e}`,label:l[`title-${e}`]}))),onChange:x}),e(p,{css:g,onScroll:V,children:r.map((({key:t,rows:r})=>e(b,{ref:e=>{$.current[t]=e},disabled:l[`disabled-${t}`],rows:r,title:l[`title-${t}`]},t)))})]}):e(p,{css:i.fullHeight,onScroll:V,children:r.map((({key:t,rows:r})=>e(b,{disabled:l[`disabled-${t}`],rows:r,title:l[`title-${t}`]},t)))})}),((e,t)=>s(l(e,["schema"]),l(t,["schema"]))));export{$ as default};
6
+ /*! 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,5 @@
1
+ import { type ObjectType, type StringKey } from "@vef-framework/shared";
2
+ import type { FormScene } from "../types";
3
+ import { type VefFormFieldProps } from "./fields";
4
+ declare function VefFormField<Values extends ObjectType, Key extends StringKey<Values>, Scene extends FormScene>(props: VefFormFieldProps<Values, Key, Scene>): import("@emotion/react/jsx-runtime").JSX.Element;
5
+ export default VefFormField;
@@ -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{VefError as r}from"@vef-framework/shared";import{useMemo as o}from"react";import{fieldMap as t}from"./fields/index.js";function n(n){const{name:f,componentProps:{type:i}}=n,m=o((()=>{if("Hidden"===i)return()=>null;const e=t[i];if(!e)throw new r(-9,`Unknown form field type: "${i}", please check the type of "${f}" field.`);return e}),[f,i]);return e(m,{...n})}export{n 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,22 @@
1
+ import { type ObjectType, type ObjectValue } from "@vef-framework/shared";
2
+ import { type FC, type ReactNode, type RefAttributes } from "react";
3
+ import type { FormGroup, FormScene } from "../types";
4
+ /**
5
+ * The props of the form group.
6
+ */
7
+ export interface VefFormGroupProps<Values extends ObjectType, Scene extends FormScene> {
8
+ /**
9
+ * The title of the form group.
10
+ */
11
+ title?: ReactNode;
12
+ /**
13
+ * Whether to disable the form group.
14
+ */
15
+ disabled: boolean;
16
+ /**
17
+ * The rows of the form group.
18
+ */
19
+ rows: FormGroup<Values, Scene>["rows"];
20
+ }
21
+ declare const VefFormGroup: (<Values extends ObjectType = ObjectValue, Scene extends FormScene = FormScene>(props: VefFormGroupProps<Values, Scene> & RefAttributes<HTMLDivElement | null>) => ReactNode) & Pick<FC, "displayName">;
22
+ export default VefFormGroup;
@@ -0,0 +1,13 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{jsxs as e,jsx as o}from"@emotion/react/jsx-runtime";import{css as r}from"@emotion/react";import{themeVariables as t,isEqual as a,omit as m}from"@vef-framework/shared";import{useMemo as i,memo as s,forwardRef as d}from"react";import l from"../../vef-empty-placeholder/index.js";import n from"../../vef-title/index.js";import{useComputedValues as f}from"../hooks/use-computed-values.js";import p from"./form-row.js";const c=r`
3
+ margin-bottom: ${t.margin};
4
+
5
+ &:last-child {
6
+ margin-bottom: 0;
7
+ }
8
+
9
+ .vef-form-group-content {
10
+ padding: 0 2px;
11
+ }
12
+ `;const u=s(d((function({title:r,disabled:t,rows:a},m){const s=f([...a.map((({key:e,show:o})=>({key:`show-${e}`,rawValue:o,defaultValue:!0}))),...a.map((({key:e,disabled:o})=>({key:`disabled-${e}`,rawValue:o,defaultValue:t})))],!0),d=i((()=>a.filter((({key:e})=>s[`show-${e}`]))),[s,a]);return e("div",{ref:m,css:c,children:[r&&o(n,{showBottomLine:!0,showLeftBar:!0,level:4,children:r}),o("div",{className:"vef-form-group-content",children:0===d.length?o(l,{description:"空表单组"}):d.map((({key:e,autoExpand:r,columns:t})=>o(p,{autoExpand:r,columns:t,disabled:s[`disabled-${e}`],rowKey:e},e)))})]})})),((e,o)=>a(m(e,["rows"]),m(o,["rows"]))));u.displayName="VefFormGroup";export{u as default};
13
+ /*! 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,14 @@
1
+ import type { ObjectType, StringKey } from "@vef-framework/shared";
2
+ import type { FormItem, FormScene } from "../types";
3
+ /**
4
+ * The props of the form hidden item.
5
+ */
6
+ export interface VefFormHiddenItemProps<Values extends ObjectType, Key extends StringKey<Values>, Scene extends FormScene> {
7
+ /**
8
+ * The item of the form.
9
+ */
10
+ item: FormItem<Values, Key, Scene>;
11
+ }
12
+ declare function VefFormHiddenItemBase<Values extends ObjectType, Key extends StringKey<Values>, Scene extends FormScene>({ item, }: VefFormHiddenItemProps<Values, Key, Scene>): import("@emotion/react/jsx-runtime").JSX.Element | null;
13
+ declare const VefFormHiddenItem: typeof VefFormHiddenItemBase;
14
+ export default VefFormHiddenItem;
@@ -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{Form as t}from"antd";import{memo as o}from"react";import{useComputedValues as n}from"../hooks/use-computed-values.js";const{Item:r}=t;const m=o((function({item:t}){const{name:o,show:m}=t,[a]=n([{key:"show",rawValue:m,defaultValue:!0}]);return a?e(r,{hidden:!0,name:o,children:e("input",{type:"hidden"})}):null}),(()=>!1));export{m 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,18 @@
1
+ import type { ObjectType, StringKey } from "@vef-framework/shared";
2
+ import type { FormItem, FormScene } from "../types";
3
+ /**
4
+ * The props of the form item.
5
+ */
6
+ export interface VefFormItemProps<Values extends ObjectType, Key extends StringKey<Values>, Scene extends FormScene> {
7
+ /**
8
+ * The item of the form.
9
+ */
10
+ item: FormItem<Values, Key, Scene>;
11
+ /**
12
+ * Whether to disable the form item.
13
+ */
14
+ disabled: boolean;
15
+ }
16
+ declare function VefFormItemBase<Values extends ObjectType, Key extends StringKey<Values>, Scene extends FormScene>({ item, disabled, }: VefFormItemProps<Values, Key, Scene>): import("@emotion/react/jsx-runtime").JSX.Element | null;
17
+ declare const VefFormItem: typeof VefFormItemBase;
18
+ export default VefFormItem;
@@ -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{useContextDisabled as r}from"@vef-framework/hooks";import{Form as a}from"antd";import{isArray as o}from"@vef-framework/shared";import{memo as l}from"react";import{useComputedValues as t}from"../hooks/use-computed-values.js";import m from"./form-field.js";const{Item:s}=a;const i=l((function({item:a,disabled:l}){const{name:i,show:u,disabled:d,label:f,tip:n,rules:p,virtual:b,...c}=a,k=r(),[w,V,h,v,y]=t([{key:"show",rawValue:u,defaultValue:!0},{key:"disabled",rawValue:d,defaultValue:l},{key:"label",rawValue:f},{key:"tip",rawValue:n},{key:"rules",rawValue:p}]);if(!w)return null;const j=o(y)?y.flatMap((e=>e(a))):void 0;return e(s,{label:h,name:i,preserve:!1,rules:j,tooltip:v,children:e(m,{componentProps:c,disabled:k||V,label:h,name:i})})}),((e,r)=>e.disabled===r.disabled));export{i 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,26 @@
1
+ import type { KeyValue, ObjectType } from "@vef-framework/shared";
2
+ import type { FormRow, FormScene } from "../types";
3
+ /**
4
+ * The props of the form row.
5
+ */
6
+ export interface VefFormRowProps<Values extends ObjectType, Scene extends FormScene> {
7
+ /**
8
+ * The key of the row.
9
+ */
10
+ rowKey: KeyValue;
11
+ /**
12
+ * Whether to disable the row.
13
+ */
14
+ disabled: boolean;
15
+ /**
16
+ * Whether to auto expand the row.
17
+ */
18
+ autoExpand?: boolean;
19
+ /**
20
+ * The columns of the row.
21
+ */
22
+ columns: FormRow<Values, Scene>["columns"];
23
+ }
24
+ declare function VefFormRowBase<Values extends ObjectType, Scene extends FormScene>({ rowKey, columns, disabled, autoExpand: rowAutoExpand, }: VefFormRowProps<Values, Scene>): import("@emotion/react/jsx-runtime").JSX.Element;
25
+ declare const VefFormRow: typeof VefFormRowBase;
26
+ export default VefFormRow;
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{jsxs as e,Fragment as o,jsx as t}from"@emotion/react/jsx-runtime";import{isEqual as s,omit as r}from"@vef-framework/shared";import{useMemo as m,memo as i}from"react";import n from"../../vef-grid/index.js";import a from"../../vef-grid-item/index.js";import{useColumnsLayout as l}from"../hooks/use-columns-layout.js";import{useComputedValues as d}from"../hooks/use-computed-values.js";import{useFormContext as u}from"../hooks/use-form-context.js";import f from"./form-hidden-item.js";import p from"./form-item.js";const c=i((function({rowKey:s,columns:r,disabled:i,autoExpand:c}){const{layoutMode:h,autoExpand:k,labelPosition:y,labelWidth:x}=u(),b="top"===y?240:240+(x??80),[g,j]=m((()=>{const e=[],o=[];for(const t of r){const{items:s,...r}=t,m=[];for(const o of s){const{type:t}=o;"Hidden"===t?e.push(o):m.push(o)}m.length>0&&o.push({...r,items:m})}return[e,o]}),[r]),w=d([...j.map((({key:e,show:o})=>({key:`show-${e}`,rawValue:o,defaultValue:!0}))),...j.map((({key:e,disabled:o})=>({key:`disabled-${e}`,rawValue:o,defaultValue:i})))],!0),v=m((()=>r.filter((({key:e})=>w[`show-${e}`]))),[w,r]),V=l(s,v,h,c??k);return e(o,{children:[g.map((e=>{const{name:o}=e;return t(f,{item:e},o)})),v.length>0&&t(n,{baseWidth:b,gap:[0,"large"],children:v.map((e=>{const o={};if("responsive"===h){const t=V;o.xs=t.xs[e.key],o.sm=t.sm[e.key],o.md=t.md[e.key],o.lg=t.lg[e.key],o.xl=t.xl[e.key],o.xxl=t.xxl[e.key]}else{const t=V;o.span=t[e.key]}return t(a,{...o,children:e.items.map((o=>t(p,{disabled:i||w[`disabled-${e.key}`],item:o},o.name)))},e.key)}))})]})}),((e,o)=>s(r(e,["columns"]),r(o,["columns"]))));export{c 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,15 @@
1
+ import { type Consumer, type ObjectType } from "@vef-framework/shared";
2
+ import type { FormValues } from "./types";
3
+ /**
4
+ * The form event bus.
5
+ */
6
+ export declare class FormEventBus<Values extends ObjectType = any> {
7
+ #private;
8
+ clear(): void;
9
+ onChange(handler: Consumer<FormValues<Values>>): void;
10
+ offChange(handler: Consumer<FormValues<Values>>): void;
11
+ emitChange(value: FormValues<Values>): void;
12
+ onSubmitResult(handler: Consumer<boolean>): void;
13
+ offSubmitResult(handler: Consumer<boolean>): void;
14
+ emitSubmitResult(result: boolean): void;
15
+ }
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{createEventEmitter as e}from"@vef-framework/shared";var t,a=e=>{throw TypeError(e)},o=(e,t,o)=>(((e,t,o)=>{t.has(e)||a("Cannot "+o)})(e,t,"read from private field"),o?o.call(e):t.get(e));const s=Symbol("change"),r=Symbol("submitResult");class i{constructor(){var o,s,r;o=this,s=t,r=e(),s.has(o)?a("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(o):s.set(o,r)}clear(){o(this,t).all.clear()}onChange(e){o(this,t).on(s,e)}offChange(e){o(this,t).off(s,e)}emitChange(e){o(this,t).emit(s,e)}onSubmitResult(e){o(this,t).on(r,e)}offSubmitResult(e){o(this,t).off(r,e)}emitSubmitResult(e){o(this,t).emit(r,e)}}t=new WeakMap;export{i as FormEventBus};
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, type ObjectType } from "@vef-framework/shared";
2
+ import type { FormComputedType, FormScene } from "./types";
3
+ /**
4
+ * Decide the value with default value.
5
+ *
6
+ * @param value - The value to decide.
7
+ * @param values - The form values.
8
+ * @param scene - The form scene.
9
+ * @param defaultValue - The default value to use if value is undefined.
10
+ */
11
+ export declare function computeValue<Values extends ObjectType, Scene extends FormScene, ComputedValue>(value: MaybeUndefined<FormComputedType<Values, Scene, ComputedValue>>, values: Values, scene: Scene, defaultValue: ComputedValue): ComputedValue;
@@ -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 t(t,f,o,u){if(r(t))return t(f,o);if(e(t)){return n(t,"values","scene",`return ${t.expression}`)(f,o)}return t??u}export{t 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,14 @@
1
+ import type { FormProps } from "antd";
2
+ import { type Handler, type Mapper, type ObjectType } from "@vef-framework/shared";
3
+ import type { VefFormProps } from "../props";
4
+ import type { FormScene, FormSchema, FormVirtualKeys } from "../types";
5
+ type SubmitFailedHandler<Values extends ObjectType> = NonNullable<FormProps<Values>["onFinishFailed"]>;
6
+ /**
7
+ * The use action handlers hook.
8
+ */
9
+ export declare function useActionHandlers<Values extends ObjectType, Result, Scene extends FormScene, Schema extends FormSchema<Values, Scene>, VirtualKeys extends FormVirtualKeys<Schema>>({ submitApi, submitTip, onBeforeSubmit, onSubmit, onSubmitSuccess, onSubmitFailure, onReset, }: Pick<VefFormProps<Values, Result, Scene, Schema, VirtualKeys>, "submitApi" | "submitTip" | "onBeforeSubmit" | "onSubmit" | "onSubmitSuccess" | "onSubmitFailure" | "onReset">): {
10
+ handleReset: Handler;
11
+ handleSubmit: Mapper<Values, Promise<void>>;
12
+ handleSubmitFailed: SubmitFailedHandler<Values>;
13
+ };
14
+ export {};
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{useApiContext as e}from"@vef-framework/core";import{isFunction as t,VefError as i,showLoadingMessage as o,omit as n,showSuccessMessage as r}from"@vef-framework/shared";import{useCallback as s,useMemo as a}from"react";import{useFormStore as m}from"../store.js";function u({submitApi:u,submitTip:l="提交中...",onBeforeSubmit:c,onSubmit:p,onSubmitSuccess:b,onSubmitFailure:f,onReset:d}){const[S,w,h,v,F,R,g,y]=m((e=>[e.form,e.scene,e.eventBus,e.setIsLoading,e.virtualFieldNames,e.getValues,e.initialValues,e.invokeValueChangeHandlers])),{useApiMutation:A,stubMutationApi:V}=e(),{mutate:k}=A(u??V);if(!t(p)&&!u)throw new i(-1,"'onSubmit' or 'submitApi' prop is required for VefForm component");return{handleReset:s((()=>{const e=R();S.resetFields(),y(),h.emitChange(g),d?.(e,w)}),[S,R,d,w,y,g,h]),handleSubmit:a((()=>t(p)?(u&&console.warn("'submitApi' prop is ignored when 'onSubmit' prop is provided in VefForm component"),async e=>{v(!0);let i=e,r=null;try{const s=t(l)?l(e,w):l;r=o(s),t(c)&&(i=await c(i,w));const a=n(i,F);await p(a,w),h.emitSubmitResult(!0)}catch(e){throw h.emitSubmitResult(!1),e}finally{v(!1),r?.()}}):async e=>{v(!0);let i=e,s=null;try{const a=t(l)?l(e,w):l;s=o(a),t(c)&&(i=await c(e,w));const m=n(i,F),u=await k(m);(b??(({message:e})=>{r(e)}))(u,i,w),h.emitSubmitResult(!0)}catch(e){h.emitSubmitResult(!1),f?.(e,i,w)}finally{v(!1),s?.()}}),[p,u,v,l,w,c,F,h,k,b,f]),handleSubmitFailed:s((({values:e,errorFields:t})=>{h.emitSubmitResult(!1),f?.(new i(-1,t.flatMap((e=>e.errors)).join(", ")),e,w)}),[h,f,w])}}export{u as useActionHandlers};
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 KeyValue, type ObjectType } from "@vef-framework/shared";
2
+ import type { FormColumn, FormLayoutMode, FormScene } from "../types";
3
+ /**
4
+ * Get the layout of the columns.
5
+ *
6
+ * @param rowKey - The key of the row.
7
+ * @param columns - The columns of the row.
8
+ * @param layoutMode - The layout mode of the form.
9
+ * @param autoExpand - Whether to auto expand the columns.
10
+ * @returns The layout of the columns.
11
+ */
12
+ export declare function useColumnsLayout<Values extends ObjectType, Scene extends FormScene>(rowKey: KeyValue, columns: Array<FormColumn<Values, Scene>>, layoutMode: FormLayoutMode, autoExpand: boolean): Record<string, number> | Record<string, Record<string, number>>;
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{unique as e,VefError as n}from"@vef-framework/shared";import{useMemo as s}from"react";const o=24,t=[{breakpoint:"xs",base:o,spans:1},{breakpoint:"sm",base:12,spans:2},{breakpoint:"md",base:8,spans:3},{breakpoint:"lg",base:6,spans:4},{breakpoint:"xl",base:6,spans:4},{breakpoint:"xxl",base:4,spans:6}],a=e(t.map((e=>e.spans)));function r(e,r,p,l){return s((()=>0===r.length?{}:"responsive"===p?function(e,s,o){const r=s.reduce(((e,n)=>e+(n.span??1)),0);if(!a.includes(r))throw new n(-3,`The total spans of the columns of the row [${e}] must be one of the following: ${a.join(", ")}.`);const p=24/r,l={};for(const{breakpoint:e,base:n,spans:a}of t)if(p>=n)l[e]=s.reduce(((e,n)=>(e[n.key]=(n.span??1)*p,e)),{});else{const t={};let r=a,p=null;for(const e of s){const s=e.span??1;r>=s?(t[e.key]=s*n,r-=s,p=e.key):(p&&(o&&(t[p]+=r*n),r=a,p=null),s>a?t[e.key]=24:(t[e.key]=s*n,r-=s,p=e.key)),0===r&&(r=a,p=null)}r>0&&(o&&(t[p]+=r*n),p=null),l[e]=t}return l}(e,r,l):function(e,s){const t=s.reduce(((e,n)=>e+(n.span??1)),0);if(t>o||o%t!=0)throw new n(-3,`The total spans of the columns of the row [${e}] must be less than or equal to 24 and a divisor of 24.`);const a=o/t;return s.reduce(((e,n)=>(e[n.key]=(n.span??1)*a,e)),{})}(e,r)),[])}export{r as useColumnsLayout};
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,42 @@
1
+ import { type ObjectType } from "@vef-framework/shared";
2
+ import type { FormComputedType, FormScene } from "../types";
3
+ type ExtractValueType<T> = T extends {
4
+ rawValue: FormComputedType<any, any, infer ComputedValue>;
5
+ } ? T extends {
6
+ defaultValue: NonNullable<ComputedValue>;
7
+ } ? NonNullable<ComputedValue> : ComputedValue : never;
8
+ type ComputedValueTuple<T extends ReadonlyArray<ComputedValue<any, any, unknown>>> = {
9
+ [K in keyof T]: ExtractValueType<T[K]>;
10
+ };
11
+ type ComputedValueRecord<T extends ReadonlyArray<ComputedValue<any, any, unknown>>> = {
12
+ [K in T[number]["key"]]: ExtractValueType<Extract<T[number], {
13
+ key: K;
14
+ }>>;
15
+ };
16
+ type ComputedValueResult<T extends ReadonlyArray<ComputedValue<any, any, unknown>>, R extends boolean> = R extends true ? ComputedValueRecord<T> : ComputedValueTuple<T>;
17
+ /**
18
+ * The computed value.
19
+ */
20
+ export interface ComputedValue<Values extends ObjectType, Scene extends FormScene, ComputedValue> {
21
+ /**
22
+ * The key of the computed value.
23
+ */
24
+ key: string;
25
+ /**
26
+ * The raw value of the computed value.
27
+ */
28
+ rawValue?: FormComputedType<Values, Scene, ComputedValue>;
29
+ /**
30
+ * The default value of the computed value.
31
+ */
32
+ defaultValue?: ComputedValue;
33
+ }
34
+ /**
35
+ * Use the computed values.
36
+ *
37
+ * @param values The computed values.
38
+ * @param returnAsObject Whether to return the computed values as an object.
39
+ * @returns The computed values.
40
+ */
41
+ export declare function useComputedValues<Values extends ObjectType, Scene extends FormScene, T extends ReadonlyArray<ComputedValue<any, Scene, unknown>>, R extends boolean = false>(values: T, returnAsObject?: R): ComputedValueResult<T, R>;
42
+ export {};
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{useUpdate as e,useDeepCompareMemo as r,useDeepCompareLayoutEffect as o}from"@vef-framework/hooks";import{isFunctionOrExpression as t,isEqual as a}from"@vef-framework/shared";import{computeValue as f}from"../helper.js";import{useFormStore as n}from"../store.js";function u(u,s=!1){const[l,m,c]=n((e=>[e.scene,e.eventBus,e.getValues])),i=e(),k=c(),p=r((()=>u.reduce(((e,r)=>{const{key:o,rawValue:t,defaultValue:a}=r,n=f(t,k,l,a);return e[o]=n,e}),{})),[k,l,u]);return o((()=>{const e=u.filter((({rawValue:e})=>t(e)));if(e.length>0){const r=r=>{for(const o of e){const{key:e,rawValue:t,defaultValue:n}=o,u=p[e],s=f(t,r,l,n);if(!a(s,u)){i();break}}};return m.onChange(r),()=>{m.offChange(r)}}}),[p,m,i,l,u]),s?u.reduce(((e,{key:r})=>(e[r]=p[r],e)),{}):u.map((({key:e})=>p[e]))}export{u 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,6 @@
1
+ import type { InternalFormContext } from "../types";
2
+ declare const useFormContextSelector: <R>(selector: import("@vef-framework/shared").Mapper<InternalFormContext, R>) => R, useFormContext: import("@vef-framework/shared").Provider<InternalFormContext>, FormContextProvider: import("react").ComponentType<{
3
+ value: InternalFormContext;
4
+ children: import("react").ReactNode;
5
+ }>;
6
+ export { FormContextProvider, useFormContext, useFormContextSelector, };
@@ -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 o}from"@vef-framework/shared";const{useContextSelector:e,useContext:t,ContextProvider:r}=o({autoExpand:!0,labelPosition:"top",layoutMode:"responsive"});export{r as FormContextProvider,t as useFormContext,e as useFormContextSelector};
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,14 @@
1
+ import type { BiConsumer, MaybeNull, ObjectType, StringKey } from "@vef-framework/shared";
2
+ import type { FormContext, FormScene, FormSchema } from "../types";
3
+ /**
4
+ * Initialize the form values.
5
+ *
6
+ * @param schema The form schema
7
+ * @param initialValues The form initial values
8
+ * @returns The handled initial values and value changes
9
+ */
10
+ export declare function useFormInitialization<Values extends ObjectType, Scene extends FormScene, Schema extends FormSchema<Values, Scene>>(schema: Schema, initialValues?: Partial<Values>): {
11
+ mergedInitialValues: Partial<Values>;
12
+ valueChangeHandlers: Record<StringKey<Values>, BiConsumer<MaybeNull<Values[StringKey<Values>]>, FormContext<Values, Scene>>>;
13
+ virtualFieldNames: StringKey<Values>[];
14
+ };
@@ -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 o,isFunction as e}from"@vef-framework/shared";import{useMemo as n}from"react";function r(r,t){return n((()=>{const n={...t},s={},a=[];for(const t of r){const{rows:r}=t;for(const t of r){const{columns:r}=t;for(const t of r){const{items:r}=t;for(const t of r){const{name:r,defaultValue:f,virtual:c}=t;!o(f)&&o(n[r])&&(n[r]=f),"Hidden"!==t.type&&e(t.onChange)&&(s[r]=t.onChange),!0===c&&a.push(r)}}}}return{mergedInitialValues:n,valueChangeHandlers:s,virtualFieldNames:a}}),[])}export{r as useFormInitialization};
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 { Handler, ObjectType } from "@vef-framework/shared";
2
+ import { type ForwardedRef } from "react";
3
+ import type { VefFormInstance } from "../props";
4
+ /**
5
+ * Use the form instance.
6
+ *
7
+ * @param ref - The forwarded ref.
8
+ * @param reset - The reset handler.
9
+ */
10
+ export declare function useFormInstance<Values extends ObjectType>(ref: ForwardedRef<VefFormInstance<Values>>, reset: Handler): void;
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{useImperativeHandle as t}from"react";import{useFormStore as e}from"../store.js";function s(s,o){const[u,m,r,i]=e((t=>[t.form,t.eventBus,t.getValues,t.setValues]));t(s,(()=>({submit:()=>new Promise(((t,e)=>{const s=o=>{m.offSubmitResult(s),o?t():e(o)};m.onSubmitResult(s),u.submit()})),reset:o,getValues:r,setValues:i})))}export{s as useFormInstance};
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 { BiConsumer, ObjectType } from "@vef-framework/shared";
2
+ import type { FormScene, FormValues } from "../types";
3
+ /**
4
+ * Use the form values change
5
+ *
6
+ * @param onChange The change handler
7
+ * @returns The change handler
8
+ */
9
+ export declare function useFormValuesChange<Values extends ObjectType, Scene extends FormScene>(onChange?: BiConsumer<FormValues<Values>, Scene>): {
10
+ handleValuesChange: (_: any, values: FormValues<Values>) => void;
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 n,useEffect as r,useLayoutEffect as o}from"react";import{useFormStore as t}from"../store.js";function a(a){const[f,s,m]=t((e=>[e.scene,e.eventBus,e.invokeValueChangeHandlers])),h=n((()=>(e,n)=>{s.emitChange(n)}),[s]);return r((()=>{if(e(a)){const e=e=>{a(e,f)};return s.onChange(e),()=>{s.offChange(e)}}}),[s,a,f]),o((()=>{m()}),[]),{handleValuesChange:h}}export{a as useFormValuesChange};
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 { FormLabelPosition } from "../types";
2
+ /**
3
+ * Use the label width of the form.
4
+ *
5
+ * @param labelPosition - The label position.
6
+ * @param labelWidth - The label width.
7
+ * @returns The label width to use.
8
+ */
9
+ export declare function useLabelWidth(labelPosition: FormLabelPosition, labelWidth?: number): number | undefined;
@@ -0,0 +1,3 @@
1
+ /*! VefFramework version: 1.0.5, build time: 2024-12-10T10:24:47.065Z, made by Venus. */
2
+ import{showWarningMessage as e}from"@vef-framework/shared";import{useMemo as r}from"react";function t(t,o){return r((()=>{if("top"!==t&&o)return(o<60||o>120)&&e("The labelWidth of VefForm component must be between 60 and 120, otherwise it will be 60 or 120."),Math.min(Math.max(o,60),120)}),[t,o])}export{t as useLabelWidth};
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,8 @@
1
+ import type { AnyValue, ObjectType, ObjectValue } from "@vef-framework/shared";
2
+ import { type FC, type ReactNode, type RefAttributes } from "react";
3
+ import type { VefFormInstance, VefFormProps } from "./props";
4
+ import type { FormScene, FormSchema, FormVirtualKeys } from "./types";
5
+ declare const VefForm: (<Values extends ObjectType = ObjectValue, Result = AnyValue, Scene extends FormScene = FormScene, Schema extends FormSchema<Values, Scene> = FormSchema<Values, Scene>, VirtualKeys extends FormVirtualKeys<Schema> = FormVirtualKeys<Schema>>(props: VefFormProps<Values, Result, Scene, Schema, VirtualKeys> & RefAttributes<VefFormInstance<Values>>) => ReactNode) & Pick<FC, "displayName">;
6
+ export type { FormActionButtonConfig, FormColumn, FormContext, FormGroup, FormItem, FormLabelAlign, FormLabelPosition, FormLayoutMode, FormRow, FormScene, FormSchema, FormTabsUse, FormValidationRule } from "./types";
7
+ export type { VefFormInstance, VefFormProps };
8
+ export default VefForm;
@@ -0,0 +1,5 @@
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{useContextDisabled as t,useSingleton as s,useUnmount as a}from"@vef-framework/hooks";import{isNumber as n,isEqual as r,omit as l}from"@vef-framework/shared";import{Form as m}from"antd";import{useMemo as u,forwardRef as h,memo as c}from"react";import"../internal/index.js";import f from"./components/form-actions.js";import d from"./components/form-content.js";import{FormEventBus as p}from"./event.js";import{useActionHandlers as b}from"./hooks/use-action-handlers.js";import{useFormContextSelector as v,FormContextProvider as g}from"./hooks/use-form-context.js";import{useFormInitialization as j}from"./hooks/use-form-initialization.js";import{useFormInstance as F}from"./hooks/use-form-instance.js";import{useFormValuesChange as S}from"./hooks/use-form-values-change.js";import{useLabelWidth as V}from"./hooks/use-label-width.js";import{useFormStore as k,FormStoreProvider as x}from"./store.js";import{convertBasicSizeToUiSize as B}from"../internal/utils.js";const{useForm:w}=m,C={scrollMode:"if-needed",behavior:"smooth"};const y=h((function({schema:s,labelAlign:a="right",variant:r,showTabs:l=!1,height:h="auto",size:c,disabled:p=!1,onChange:g,submissionButton:j,resetButton:V,submitApi:x,submitTip:w,onBeforeSubmit:y,onSubmit:T,onSubmitSuccess:z,onSubmitFailure:A,onReset:N},R){const[W,E]=v((o=>[o.labelPosition,o.labelWidth])),[M,P,$]=k((o=>[o.form,o.initialValues,o.isLoading])),{handleValuesChange:H}=S(g),{handleReset:I,handleSubmit:L,handleSubmitFailed:q}=b({submitApi:x,submitTip:w,onBeforeSubmit:y,onSubmit:T,onSubmitSuccess:z,onSubmitFailure:A,onReset:N});F(R,I);const D=u((()=>{if(E)return{flex:`0 0 ${E}px`}}),[E]),G=u((()=>{let o=h;return"auto"===h?o="100%":n(h)&&(o=`${h}px`),i`
3
+ height: ${o};
4
+ `}),[h]),J=t();return o(m,{labelWrap:!0,colon:!1,css:G,disabled:J||p||$,form:M,initialValues:P,labelAlign:a,labelCol:D,layout:"top"===W?"vertical":"horizontal",scrollToFirstError:C,size:B(c),variant:r,onFinish:L,onFinishFailed:q,onValuesChange:H,children:[e(d,{schema:s,showTabs:!0===l?"switch":l}),e(f,{handleReset:I,resetButton:V,submissionButton:j})]})}));y.displayName="VefFormBase";const T=c(h((function({initialValues:o,scene:i,layoutMode:t="responsive",autoExpand:n=!1,labelPosition:r="top",labelWidth:l,...m},h){const{schema:c}=m,[f]=w(),d=s((()=>new p));a((()=>{d.clear()}));const b=V(r,l),v=u((()=>({labelPosition:r,labelWidth:b,autoExpand:n,layoutMode:t})),[t,n,r,b]),{mergedInitialValues:F,valueChangeHandlers:S,virtualFieldNames:k}=j(c,o);return e(x,{eventBus:d,form:f,initialValues:F,scene:i,valueChangeHandlers:S,virtualFieldNames:k,children:e(g,{value:v,children:e(y,{ref:h,...m})})})})),((o,e)=>r(l(o,["initialValues","schema"]),l(e,["initialValues","schema"]))));T.displayName="VefForm";export{T 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 */