@fuf-stack/uniform 1.18.2 → 1.19.0
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.
- package/dist/Checkboxes/index.cjs +7 -5
- package/dist/Checkboxes/index.d.cts +1 -1
- package/dist/Checkboxes/index.d.ts +1 -1
- package/dist/Checkboxes/index.js +2 -3
- package/dist/{Checkboxes-Dk7yyRVR.cjs → Checkboxes-Ca9fTce_.cjs} +18 -21
- package/dist/Checkboxes-Ca9fTce_.cjs.map +1 -0
- package/dist/{Checkboxes-BGrK_mwQ.js → Checkboxes-D1hppxDE.js} +7 -10
- package/dist/Checkboxes-D1hppxDE.js.map +1 -0
- package/dist/FieldArray/index.cjs +7 -5
- package/dist/FieldArray/index.d.cts +1 -1
- package/dist/FieldArray/index.d.ts +1 -1
- package/dist/FieldArray/index.js +2 -3
- package/dist/{FieldArray-BnZW6fwm.cjs → FieldArray-CnxCQt0o.cjs} +34 -53
- package/dist/FieldArray-CnxCQt0o.cjs.map +1 -0
- package/dist/{FieldArray-C53ox8yB.js → FieldArray-n39Aj9AV.js} +19 -38
- package/dist/FieldArray-n39Aj9AV.js.map +1 -0
- package/dist/FieldCard/index.cjs +4 -4
- package/dist/FieldCard/index.d.cts +1 -1
- package/dist/FieldCard/index.d.ts +1 -1
- package/dist/FieldCard/index.js +2 -3
- package/dist/{FieldCard-BxK_IJOR.cjs → FieldCard-DbuGSb_j.cjs} +20 -24
- package/dist/FieldCard-DbuGSb_j.cjs.map +1 -0
- package/dist/{FieldCard-16yCF83m.js → FieldCard-SjYNs4sL.js} +8 -12
- package/dist/FieldCard-SjYNs4sL.js.map +1 -0
- package/dist/{FieldCopyTestIdButton-4uupFq1U.cjs → FieldCopyTestIdButton-BvVBidko.cjs} +14 -17
- package/dist/FieldCopyTestIdButton-BvVBidko.cjs.map +1 -0
- package/dist/{FieldCopyTestIdButton-BoEdlzLs.js → FieldCopyTestIdButton-Dpmo0uBV.js} +4 -7
- package/dist/FieldCopyTestIdButton-Dpmo0uBV.js.map +1 -0
- package/dist/{FieldValidationError-Br6iopZj.cjs → FieldValidationError-EecXNx5F.cjs} +14 -17
- package/dist/FieldValidationError-EecXNx5F.cjs.map +1 -0
- package/dist/{FieldValidationError-XQaViV52.js → FieldValidationError-ktTyyyip.js} +4 -7
- package/dist/FieldValidationError-ktTyyyip.js.map +1 -0
- package/dist/Form/index.cjs +7 -5
- package/dist/Form/index.d.cts +1 -1
- package/dist/Form/index.d.ts +1 -2
- package/dist/Form/index.js +2 -3
- package/dist/{Form--SsSvsxl.cjs → Form-Diivw8pg.cjs} +17 -22
- package/dist/Form-Diivw8pg.cjs.map +1 -0
- package/dist/{Form-ccsEssie.js → Form-Wzy7pBVt.js} +8 -13
- package/dist/Form-Wzy7pBVt.js.map +1 -0
- package/dist/{FormContext-BSLO2-sO.cjs → FormContext-3GzWxXSS.cjs} +28 -36
- package/dist/{FormContext-BSLO2-sO.cjs.map → FormContext-3GzWxXSS.cjs.map} +1 -1
- package/dist/{FormContext-CCe8drkp.d.ts → FormContext-B4KQxdl7.d.ts} +1 -1
- package/dist/{FormContext-CCe8drkp.d.ts.map → FormContext-B4KQxdl7.d.ts.map} +1 -1
- package/dist/{FormContext-RSA21aDt.d.cts → FormContext-BuG3xZFe.d.cts} +1 -1
- package/dist/{FormContext-RSA21aDt.d.cts.map → FormContext-BuG3xZFe.d.cts.map} +1 -1
- package/dist/{FormContext-kE3YKhp_.js → FormContext-CLfMWHQM.js} +4 -7
- package/dist/{FormContext-kE3YKhp_.js.map → FormContext-CLfMWHQM.js.map} +1 -1
- package/dist/Grid/index.cjs +7 -5
- package/dist/Grid/index.d.cts +1 -1
- package/dist/Grid/index.d.ts +1 -1
- package/dist/Grid/index.js +2 -3
- package/dist/{Grid-CeaybCIF.js → Grid-Bzyi97Cx.js} +5 -8
- package/dist/Grid-Bzyi97Cx.js.map +1 -0
- package/dist/Grid-V1pCY2LC.cjs +32 -0
- package/dist/Grid-V1pCY2LC.cjs.map +1 -0
- package/dist/Input/index.cjs +7 -5
- package/dist/Input/index.d.cts +1 -1
- package/dist/Input/index.d.ts +1 -1
- package/dist/Input/index.js +2 -3
- package/dist/{Input-BCs_eyJ9.js → Input-BDWP4hOr.js} +6 -9
- package/dist/{Input-BCs_eyJ9.js.map → Input-BDWP4hOr.js.map} +1 -1
- package/dist/{Input-B3p_4ntD.cjs → Input-C6kRsqx1.cjs} +18 -21
- package/dist/Input-C6kRsqx1.cjs.map +1 -0
- package/dist/RadioBoxes/index.cjs +7 -5
- package/dist/RadioBoxes/index.d.cts +1 -1
- package/dist/RadioBoxes/index.d.ts +1 -1
- package/dist/RadioBoxes/index.js +2 -3
- package/dist/{RadioBoxes-C3Cwrn2I.js → RadioBoxes-DNQCynvF.js} +6 -10
- package/dist/RadioBoxes-DNQCynvF.js.map +1 -0
- package/dist/{RadioBoxes-xRvNe5U8.cjs → RadioBoxes-DVxDhpbp.cjs} +23 -27
- package/dist/RadioBoxes-DVxDhpbp.cjs.map +1 -0
- package/dist/RadioTabs/index.cjs +7 -5
- package/dist/RadioTabs/index.d.cts +1 -1
- package/dist/RadioTabs/index.d.ts +1 -1
- package/dist/RadioTabs/index.js +2 -3
- package/dist/{RadioTabs-BaHvYcd-.cjs → RadioTabs-CFraIx6w.cjs} +18 -21
- package/dist/RadioTabs-CFraIx6w.cjs.map +1 -0
- package/dist/{RadioTabs-DfOGIsEf.js → RadioTabs-CsVqYCE9.js} +6 -9
- package/dist/RadioTabs-CsVqYCE9.js.map +1 -0
- package/dist/Radios/index.cjs +7 -5
- package/dist/Radios/index.d.cts +1 -1
- package/dist/Radios/index.d.ts +1 -1
- package/dist/Radios/index.js +2 -3
- package/dist/{Radios-xM-09vB5.js → Radios-C-Zf3Yij.js} +6 -9
- package/dist/Radios-C-Zf3Yij.js.map +1 -0
- package/dist/{Radios-BfA3uL35.cjs → Radios-OhSB1oFo.cjs} +18 -21
- package/dist/Radios-OhSB1oFo.cjs.map +1 -0
- package/dist/Select/index.cjs +7 -5
- package/dist/Select/index.d.cts +1 -1
- package/dist/Select/index.d.ts +1 -1
- package/dist/Select/index.js +2 -3
- package/dist/{Select-DlEUzYl6.js → Select-DMpCAYLB.js} +7 -10
- package/dist/Select-DMpCAYLB.js.map +1 -0
- package/dist/{Select-DH_YaruM.cjs → Select-fEJPVWJa.cjs} +21 -24
- package/dist/Select-fEJPVWJa.cjs.map +1 -0
- package/dist/Slider/index.cjs +7 -5
- package/dist/Slider/index.d.cts +1 -1
- package/dist/Slider/index.d.ts +1 -1
- package/dist/Slider/index.js +2 -3
- package/dist/{Slider-C-dMrJZ6.cjs → Slider-ChBNfwS2.cjs} +16 -19
- package/dist/Slider-ChBNfwS2.cjs.map +1 -0
- package/dist/{Slider-CTFuVrp2.js → Slider-DxRcLu-j.js} +5 -8
- package/dist/{Slider-CTFuVrp2.js.map → Slider-DxRcLu-j.js.map} +1 -1
- package/dist/SubmitButton/index.cjs +7 -5
- package/dist/SubmitButton/index.d.cts +1 -1
- package/dist/SubmitButton/index.d.ts +1 -1
- package/dist/SubmitButton/index.js +2 -3
- package/dist/{SubmitButton-Bh1RN0F1.js → SubmitButton-Bu3NNFyt.js} +5 -8
- package/dist/SubmitButton-Bu3NNFyt.js.map +1 -0
- package/dist/{SubmitButton-CJ6s1mZr.cjs → SubmitButton-CfuPpJKk.cjs} +15 -18
- package/dist/SubmitButton-CfuPpJKk.cjs.map +1 -0
- package/dist/Switch/index.cjs +7 -5
- package/dist/Switch/index.d.cts +1 -1
- package/dist/Switch/index.d.ts +1 -1
- package/dist/Switch/index.js +2 -3
- package/dist/{Switch-CXrz-M3V.js → Switch-CMpXZdLc.js} +5 -8
- package/dist/{Switch-CXrz-M3V.js.map → Switch-CMpXZdLc.js.map} +1 -1
- package/dist/{Switch-CeUMwheZ.cjs → Switch-MDrnacFJ.cjs} +16 -19
- package/dist/Switch-MDrnacFJ.cjs.map +1 -0
- package/dist/SwitchBox/index.cjs +7 -5
- package/dist/SwitchBox/index.d.cts +1 -1
- package/dist/SwitchBox/index.d.ts +1 -1
- package/dist/SwitchBox/index.js +2 -3
- package/dist/{SwitchBox-C-aLl2nX.js → SwitchBox-Cg7NPfp_.js} +5 -8
- package/dist/SwitchBox-Cg7NPfp_.js.map +1 -0
- package/dist/{SwitchBox-mGUPvJE0.cjs → SwitchBox-kp93uE8e.cjs} +21 -24
- package/dist/SwitchBox-kp93uE8e.cjs.map +1 -0
- package/dist/TextArea/index.cjs +7 -5
- package/dist/TextArea/index.d.cts +1 -1
- package/dist/TextArea/index.d.ts +1 -1
- package/dist/TextArea/index.js +2 -3
- package/dist/{TextArea-BYEuk4Ng.cjs → TextArea-B8XYKqFg.cjs} +18 -21
- package/dist/TextArea-B8XYKqFg.cjs.map +1 -0
- package/dist/{TextArea-BLkVYmHZ.js → TextArea-Bxi2pXvY.js} +6 -9
- package/dist/TextArea-Bxi2pXvY.js.map +1 -0
- package/dist/helpers/index.cjs +397 -10
- package/dist/helpers/index.cjs.map +1 -0
- package/dist/helpers/index.js +387 -2
- package/dist/helpers/index.js.map +1 -0
- package/dist/hooks/useClientValidation/index.cjs +3 -3
- package/dist/hooks/useClientValidation/index.d.cts +1 -1
- package/dist/hooks/useClientValidation/index.d.ts +1 -1
- package/dist/hooks/useClientValidation/index.js +2 -3
- package/dist/hooks/useController/index.cjs +3 -3
- package/dist/hooks/useController/index.d.cts +1 -1
- package/dist/hooks/useController/index.d.ts +1 -2
- package/dist/hooks/useController/index.js +2 -3
- package/dist/hooks/useFormContext/index.cjs +8 -3
- package/dist/hooks/useFormContext/index.cjs.map +1 -0
- package/dist/hooks/useFormContext/index.d.cts +1 -1
- package/dist/hooks/useFormContext/index.d.ts +1 -3
- package/dist/hooks/useFormContext/index.js +6 -2
- package/dist/hooks/useFormContext/index.js.map +1 -0
- package/dist/hooks/useInput/index.cjs +8 -8
- package/dist/hooks/useInput/index.d.cts +1 -1
- package/dist/hooks/useInput/index.d.ts +1 -1
- package/dist/hooks/useInput/index.js +2 -3
- package/dist/hooks/useInputValueDebounce/index.cjs +92 -2
- package/dist/hooks/useInputValueDebounce/index.cjs.map +1 -0
- package/dist/hooks/useInputValueDebounce/index.d.cts +1 -1
- package/dist/hooks/useInputValueDebounce/index.d.ts +1 -1
- package/dist/hooks/useInputValueDebounce/index.js +90 -2
- package/dist/hooks/useInputValueDebounce/index.js.map +1 -0
- package/dist/hooks/useInputValueTransform/index.cjs +3 -3
- package/dist/hooks/useInputValueTransform/index.d.cts +1 -1
- package/dist/hooks/useInputValueTransform/index.d.ts +1 -1
- package/dist/hooks/useInputValueTransform/index.js +2 -3
- package/dist/hooks/useUniformField/index.cjs +135 -2
- package/dist/hooks/useUniformField/index.cjs.map +1 -0
- package/dist/hooks/useUniformField/index.d.cts +1 -1
- package/dist/hooks/useUniformField/index.d.ts +1 -5
- package/dist/hooks/useUniformField/index.js +132 -2
- package/dist/hooks/useUniformField/index.js.map +1 -0
- package/dist/hooks/useUniformFieldArray/index.cjs +83 -2
- package/dist/hooks/useUniformFieldArray/index.cjs.map +1 -0
- package/dist/hooks/useUniformFieldArray/index.d.cts +1 -1
- package/dist/hooks/useUniformFieldArray/index.d.ts +1 -6
- package/dist/hooks/useUniformFieldArray/index.js +81 -2
- package/dist/hooks/useUniformFieldArray/index.js.map +1 -0
- package/dist/hooks/useWatchUserChange/index.cjs +3 -3
- package/dist/hooks/useWatchUserChange/index.d.cts +1 -1
- package/dist/hooks/useWatchUserChange/index.d.ts +1 -1
- package/dist/hooks/useWatchUserChange/index.js +2 -3
- package/dist/{index-C6iTO4TR.d.cts → index-1Gzrph8R.d.cts} +35 -36
- package/dist/index-1Gzrph8R.d.cts.map +1 -0
- package/dist/index-B0Fw1BAy.d.cts +278 -0
- package/dist/index-B0Fw1BAy.d.cts.map +1 -0
- package/dist/{index-BRvTllFR.d.cts → index-B2tIMFYh.d.cts} +22 -22
- package/dist/index-B2tIMFYh.d.cts.map +1 -0
- package/dist/{index-CC2Rnywy.d.cts → index-B6WwxkLx2.d.ts} +3 -3
- package/dist/index-B6WwxkLx2.d.ts.map +1 -0
- package/dist/{index-CYbsLxVV.d.ts → index-BExpqT81.d.ts} +22 -22
- package/dist/index-BExpqT81.d.ts.map +1 -0
- package/dist/{index-Dkfbf-VN.d.ts → index-BLctuwc0.d.ts} +36 -36
- package/dist/index-BLctuwc0.d.ts.map +1 -0
- package/dist/{index-DelQykFp.d.ts → index-BV1VKQdy.d.cts} +3 -3
- package/dist/{index-CUIi5IqH.d.cts.map → index-BV1VKQdy.d.cts.map} +1 -1
- package/dist/{index-D_iyWuBa.d.cts → index-BdYKQ59a.d.cts} +7 -7
- package/dist/index-BdYKQ59a.d.cts.map +1 -0
- package/dist/{index-_6c2OwSa.d.cts → index-BqWtWLeP.d.cts} +36 -36
- package/dist/index-BqWtWLeP.d.cts.map +1 -0
- package/dist/{index-DhayQWKz.d.ts → index-BwAI1VFS.d.ts} +6 -6
- package/dist/index-BwAI1VFS.d.ts.map +1 -0
- package/dist/{index-QFAAtvOV.d.cts → index-C-DiLZRu.d.cts} +6 -6
- package/dist/index-C-DiLZRu.d.cts.map +1 -0
- package/dist/{index-BvRjEXt-.d.ts → index-C6dMrOEm.d.cts} +48 -48
- package/dist/index-C6dMrOEm.d.cts.map +1 -0
- package/dist/{index-Bg3AbFZf.d.ts → index-CE0aQlFw.d.ts} +7 -7
- package/dist/index-CE0aQlFw.d.ts.map +1 -0
- package/dist/{index-D0OJCk7N.d.ts → index-CKJumX37.d.cts} +34 -34
- package/dist/index-CKJumX37.d.cts.map +1 -0
- package/dist/{index-BdrSpcmR.d.ts → index-CY2Mpaz3.d.cts} +4 -4
- package/dist/index-CY2Mpaz3.d.cts.map +1 -0
- package/dist/{index-DiFA3eG2.d.ts → index-CZJ_lWQ0.d.ts} +21 -21
- package/dist/index-CZJ_lWQ0.d.ts.map +1 -0
- package/dist/{index-CUIi5IqH.d.cts → index-Cv4ERj3i.d.ts} +3 -3
- package/dist/{index-DelQykFp.d.ts.map → index-Cv4ERj3i.d.ts.map} +1 -1
- package/dist/{index-B3ly1uwg.d.ts → index-D6XwSwTP.d.cts} +6 -6
- package/dist/{index-CxeYvJ7m.d.cts.map → index-D6XwSwTP.d.cts.map} +1 -1
- package/dist/{index-DqY28C4j.d.cts → index-DD_RPe91.d.ts} +4 -4
- package/dist/index-DD_RPe91.d.ts.map +1 -0
- package/dist/{index-DIMnCRyt.d.ts → index-DFWSHdua.d.ts} +3 -3
- package/dist/{index-DIMnCRyt.d.ts.map → index-DFWSHdua.d.ts.map} +1 -1
- package/dist/index-DGHBlmnV.d.ts +278 -0
- package/dist/index-DGHBlmnV.d.ts.map +1 -0
- package/dist/{index-CHACvIcy.d.ts → index-DJe_1ZdK.d.ts} +35 -37
- package/dist/index-DJe_1ZdK.d.ts.map +1 -0
- package/dist/{index-D3L2S2b3.d.cts → index-DZzfeV4O.d.cts} +21 -21
- package/dist/index-DZzfeV4O.d.cts.map +1 -0
- package/dist/{index--NM5Ctp6.d.ts → index-Dj3NDj0T.d.ts} +4 -4
- package/dist/{index--NM5Ctp6.d.ts.map → index-Dj3NDj0T.d.ts.map} +1 -1
- package/dist/{index-NykXDzr-.d.cts → index-DkiQkdCW.d.cts} +3 -3
- package/dist/{index-NykXDzr-.d.cts.map → index-DkiQkdCW.d.cts.map} +1 -1
- package/dist/{index-CuNl43Zr.d.ts → index-DkxqHE_P2.d.ts} +3 -3
- package/dist/{index-DuJr42nE.d.cts.map → index-DkxqHE_P2.d.ts.map} +1 -1
- package/dist/{index-DuJr42nE.d.cts → index-Dld6NP_K.d.cts} +3 -3
- package/dist/index-Dld6NP_K.d.cts.map +1 -0
- package/dist/{index-BtX5upPu.d.cts → index-DpNf55K6.d.ts} +34 -34
- package/dist/index-DpNf55K6.d.ts.map +1 -0
- package/dist/index-DsC0y6kU.d.cts +70 -0
- package/dist/index-DsC0y6kU.d.cts.map +1 -0
- package/dist/index-DwqOejxR.d.ts +70 -0
- package/dist/index-DwqOejxR.d.ts.map +1 -0
- package/dist/{index-BE6hzbN3.d.cts → index-NjKV8LJD.d.cts} +4 -4
- package/dist/{index-BE6hzbN3.d.cts.map → index-NjKV8LJD.d.cts.map} +1 -1
- package/dist/{index-HfbCo9ep.d.cts → index-Yj6VEhqF.d.ts} +48 -48
- package/dist/index-Yj6VEhqF.d.ts.map +1 -0
- package/dist/{index-CxeYvJ7m.d.cts → index-fgARdsoB.d.ts} +6 -6
- package/dist/{index-B3ly1uwg.d.ts.map → index-fgARdsoB.d.ts.map} +1 -1
- package/dist/{index-DmlsX2k6.d.ts → index-jCfJAgDc.d.cts} +3 -3
- package/dist/index-jCfJAgDc.d.cts.map +1 -0
- package/dist/{index-D6strMx0.d.ts → index-pwXVq8hR.d.cts} +6 -6
- package/dist/index-pwXVq8hR.d.cts.map +1 -0
- package/dist/{index-C_EyZKET.d.cts → index-wV1E_PkS.d.ts} +6 -6
- package/dist/index-wV1E_PkS.d.ts.map +1 -0
- package/dist/index.cjs +63 -63
- package/dist/index.d.cts +26 -26
- package/dist/index.d.ts +26 -29
- package/dist/index.js +29 -30
- package/dist/partials/FieldCopyTestIdButton/index.cjs +7 -5
- package/dist/partials/FieldCopyTestIdButton/index.d.cts +1 -1
- package/dist/partials/FieldCopyTestIdButton/index.d.ts +1 -1
- package/dist/partials/FieldCopyTestIdButton/index.js +2 -3
- package/dist/partials/FieldValidationError/index.cjs +7 -5
- package/dist/partials/FieldValidationError/index.d.cts +1 -1
- package/dist/partials/FieldValidationError/index.d.ts +1 -1
- package/dist/partials/FieldValidationError/index.js +2 -3
- package/dist/{useClientValidation-Dw-dmynu.d.cts → useClientValidation-Bu3mNZpf.d.cts} +3 -3
- package/dist/{useClientValidation-Dw-dmynu.d.cts.map → useClientValidation-Bu3mNZpf.d.cts.map} +1 -1
- package/dist/{useClientValidation-DksyV18M.js → useClientValidation-Dn_kJkE5.js} +5 -6
- package/dist/{useClientValidation-DksyV18M.js.map → useClientValidation-Dn_kJkE5.js.map} +1 -1
- package/dist/{useClientValidation-Dnj_wuwf.cjs → useClientValidation-HqsAYK9K.cjs} +16 -17
- package/dist/useClientValidation-HqsAYK9K.cjs.map +1 -0
- package/dist/{useClientValidation-DxFgfsEI.d.ts → useClientValidation-_8PTmv8i.d.ts} +3 -3
- package/dist/{useClientValidation-DxFgfsEI.d.ts.map → useClientValidation-_8PTmv8i.d.ts.map} +1 -1
- package/dist/{useController-NjuthTyL.js → useController-B-6PzFna.js} +4 -5
- package/dist/{useController-NjuthTyL.js.map → useController-B-6PzFna.js.map} +1 -1
- package/dist/{useController-CvPWE2Sy.d.cts → useController-CNiqy_2D.d.cts} +1 -1
- package/dist/{useController-CvPWE2Sy.d.cts.map → useController-CNiqy_2D.d.cts.map} +1 -1
- package/dist/{useController-DfiNbuEz.d.ts → useController-Cc0UNQMm.d.ts} +1 -1
- package/dist/{useController-DfiNbuEz.d.ts.map → useController-Cc0UNQMm.d.ts.map} +1 -1
- package/dist/{useController-B_SSp5Z5.cjs → useController-D3a0qufz.cjs} +11 -12
- package/dist/{useController-B_SSp5Z5.cjs.map → useController-D3a0qufz.cjs.map} +1 -1
- package/dist/{useFormContext-vdeeDsAs.cjs → useFormContext-BQeGmV8j.cjs} +20 -21
- package/dist/{useFormContext-vdeeDsAs.cjs.map → useFormContext-BQeGmV8j.cjs.map} +1 -1
- package/dist/{useFormContext-Di67HIf7.js → useFormContext-Bzpyonu6.js} +5 -6
- package/dist/{useFormContext-Di67HIf7.js.map → useFormContext-Bzpyonu6.js.map} +1 -1
- package/dist/{useFormContext-Dh97YG47.d.cts → useFormContext-C06aufHt.d.cts} +24 -24
- package/dist/useFormContext-C06aufHt.d.cts.map +1 -0
- package/dist/{useFormContext-C6OOtqZ5.d.ts → useFormContext-CHA8GnKp.d.ts} +24 -24
- package/dist/useFormContext-CHA8GnKp.d.ts.map +1 -0
- package/dist/{useInput-BWzvIUpW.js → useInput-CVm3tP78.js} +1 -2
- package/dist/{useInputValueDebounce-ZLyAmuXV.d.cts → useInputValueDebounce-puGRVJ6t.d.cts} +1 -1
- package/dist/{useInputValueDebounce-ZLyAmuXV.d.cts.map → useInputValueDebounce-puGRVJ6t.d.cts.map} +1 -1
- package/dist/{useInputValueDebounce-Dhlv1NUY.d.ts → useInputValueDebounce-sFOlecIQ.d.ts} +1 -1
- package/dist/{useInputValueDebounce-Dhlv1NUY.d.ts.map → useInputValueDebounce-sFOlecIQ.d.ts.map} +1 -1
- package/dist/{useInputValueTransform-CNCBU7a9.d.cts → useInputValueTransform-BwAfw8Xb.d.cts} +1 -1
- package/dist/{useInputValueTransform-CNCBU7a9.d.cts.map → useInputValueTransform-BwAfw8Xb.d.cts.map} +1 -1
- package/dist/{useInputValueTransform-C-fmz3ke.js → useInputValueTransform-CXdmtc0Q.js} +2 -3
- package/dist/{useInputValueTransform-C-fmz3ke.js.map → useInputValueTransform-CXdmtc0Q.js.map} +1 -1
- package/dist/{useInputValueTransform-tsMNM7g_.d.ts → useInputValueTransform-CdoaxNyD.d.ts} +1 -1
- package/dist/{useInputValueTransform-tsMNM7g_.d.ts.map → useInputValueTransform-CdoaxNyD.d.ts.map} +1 -1
- package/dist/{useInputValueTransform-BBRvvhDe.cjs → useInputValueTransform-Cl6Xeso7.cjs} +8 -9
- package/dist/{useInputValueTransform-BBRvvhDe.cjs.map → useInputValueTransform-Cl6Xeso7.cjs.map} +1 -1
- package/dist/{useUniformField-CqqIJtqo.d.ts → useUniformField-BTBS1Kv-.d.ts} +5 -5
- package/dist/{useUniformField-CqqIJtqo.d.ts.map → useUniformField-BTBS1Kv-.d.ts.map} +1 -1
- package/dist/{useUniformField-DIb__gKK.d.cts → useUniformField-j22kM31n.d.cts} +5 -5
- package/dist/{useUniformField-DIb__gKK.d.cts.map → useUniformField-j22kM31n.d.cts.map} +1 -1
- package/dist/{useUniformFieldArray-BChcZvc5.d.cts → useUniformFieldArray-CDEagafl.d.cts} +18 -18
- package/dist/useUniformFieldArray-CDEagafl.d.cts.map +1 -0
- package/dist/{useUniformFieldArray-4MOU0xac.d.ts → useUniformFieldArray-CMHoo4o3.d.ts} +18 -18
- package/dist/useUniformFieldArray-CMHoo4o3.d.ts.map +1 -0
- package/dist/{useWatchUserChange-CYd_8zeN.d.ts → useWatchUserChange-CH4x16_r.d.ts} +1 -1
- package/dist/{useWatchUserChange-CYd_8zeN.d.ts.map → useWatchUserChange-CH4x16_r.d.ts.map} +1 -1
- package/dist/{useWatchUserChange-Dj9Imxfi.js → useWatchUserChange-CLgLc5W4.js} +3 -4
- package/dist/{useWatchUserChange-Dj9Imxfi.js.map → useWatchUserChange-CLgLc5W4.js.map} +1 -1
- package/dist/{useWatchUserChange-DedTNvGV.d.cts → useWatchUserChange-CZu_ZZ38.d.cts} +1 -1
- package/dist/{useWatchUserChange-DedTNvGV.d.cts.map → useWatchUserChange-CZu_ZZ38.d.cts.map} +1 -1
- package/dist/{useWatchUserChange-C1Kluht2.cjs → useWatchUserChange-DkZ0Vqv3.cjs} +9 -10
- package/dist/{useWatchUserChange-C1Kluht2.cjs.map → useWatchUserChange-DkZ0Vqv3.cjs.map} +1 -1
- package/package.json +71 -67
- package/dist/Checkboxes-BGrK_mwQ.js.map +0 -1
- package/dist/Checkboxes-Dk7yyRVR.cjs.map +0 -1
- package/dist/FieldArray-BnZW6fwm.cjs.map +0 -1
- package/dist/FieldArray-C53ox8yB.js.map +0 -1
- package/dist/FieldCard-16yCF83m.js.map +0 -1
- package/dist/FieldCard-BxK_IJOR.cjs.map +0 -1
- package/dist/FieldCopyTestIdButton-4uupFq1U.cjs.map +0 -1
- package/dist/FieldCopyTestIdButton-BoEdlzLs.js.map +0 -1
- package/dist/FieldValidationError-Br6iopZj.cjs.map +0 -1
- package/dist/FieldValidationError-XQaViV52.js.map +0 -1
- package/dist/Form--SsSvsxl.cjs.map +0 -1
- package/dist/Form-ccsEssie.js.map +0 -1
- package/dist/Grid-CE1fZKmV.cjs +0 -35
- package/dist/Grid-CE1fZKmV.cjs.map +0 -1
- package/dist/Grid-CeaybCIF.js.map +0 -1
- package/dist/Input-B3p_4ntD.cjs.map +0 -1
- package/dist/RadioBoxes-C3Cwrn2I.js.map +0 -1
- package/dist/RadioBoxes-xRvNe5U8.cjs.map +0 -1
- package/dist/RadioTabs-BaHvYcd-.cjs.map +0 -1
- package/dist/RadioTabs-DfOGIsEf.js.map +0 -1
- package/dist/Radios-BfA3uL35.cjs.map +0 -1
- package/dist/Radios-xM-09vB5.js.map +0 -1
- package/dist/Select-DH_YaruM.cjs.map +0 -1
- package/dist/Select-DlEUzYl6.js.map +0 -1
- package/dist/Slider-C-dMrJZ6.cjs.map +0 -1
- package/dist/SubmitButton-Bh1RN0F1.js.map +0 -1
- package/dist/SubmitButton-CJ6s1mZr.cjs.map +0 -1
- package/dist/Switch-CeUMwheZ.cjs.map +0 -1
- package/dist/SwitchBox-C-aLl2nX.js.map +0 -1
- package/dist/SwitchBox-mGUPvJE0.cjs.map +0 -1
- package/dist/TextArea-BLkVYmHZ.js.map +0 -1
- package/dist/TextArea-BYEuk4Ng.cjs.map +0 -1
- package/dist/helpers-33jajRcN.js +0 -390
- package/dist/helpers-33jajRcN.js.map +0 -1
- package/dist/helpers-Bd_QpqXg.cjs +0 -444
- package/dist/helpers-Bd_QpqXg.cjs.map +0 -1
- package/dist/index-BRvTllFR.d.cts.map +0 -1
- package/dist/index-BdrSpcmR.d.ts.map +0 -1
- package/dist/index-Bg3AbFZf.d.ts.map +0 -1
- package/dist/index-BtX5upPu.d.cts.map +0 -1
- package/dist/index-BvRjEXt-.d.ts.map +0 -1
- package/dist/index-C6iTO4TR.d.cts.map +0 -1
- package/dist/index-CC2Rnywy.d.cts.map +0 -1
- package/dist/index-CHACvIcy.d.ts.map +0 -1
- package/dist/index-CM7UugT3.d.cts +0 -278
- package/dist/index-CM7UugT3.d.cts.map +0 -1
- package/dist/index-CYbsLxVV.d.ts.map +0 -1
- package/dist/index-C_EyZKET.d.cts.map +0 -1
- package/dist/index-Ca2ovPTq.d.ts +0 -278
- package/dist/index-Ca2ovPTq.d.ts.map +0 -1
- package/dist/index-CuNl43Zr.d.ts.map +0 -1
- package/dist/index-D0OJCk7N.d.ts.map +0 -1
- package/dist/index-D3L2S2b3.d.cts.map +0 -1
- package/dist/index-D6strMx0.d.ts.map +0 -1
- package/dist/index-D_iyWuBa.d.cts.map +0 -1
- package/dist/index-DhayQWKz.d.ts.map +0 -1
- package/dist/index-DiFA3eG2.d.ts.map +0 -1
- package/dist/index-Dkfbf-VN.d.ts.map +0 -1
- package/dist/index-DmlsX2k6.d.ts.map +0 -1
- package/dist/index-DqY28C4j.d.cts.map +0 -1
- package/dist/index-HfbCo9ep.d.cts.map +0 -1
- package/dist/index-QFAAtvOV.d.cts.map +0 -1
- package/dist/index-_6c2OwSa.d.cts.map +0 -1
- package/dist/useClientValidation-Dnj_wuwf.cjs.map +0 -1
- package/dist/useFormContext-C6OOtqZ5.d.ts.map +0 -1
- package/dist/useFormContext-CLymm_7t.js +0 -6
- package/dist/useFormContext-CLymm_7t.js.map +0 -1
- package/dist/useFormContext-CkeSOfWD.cjs +0 -6
- package/dist/useFormContext-CkeSOfWD.cjs.map +0 -1
- package/dist/useFormContext-Dh97YG47.d.cts.map +0 -1
- package/dist/useInputValueDebounce-CRaM7HEM.cjs +0 -99
- package/dist/useInputValueDebounce-CRaM7HEM.cjs.map +0 -1
- package/dist/useInputValueDebounce-DJO5uzLb.js +0 -93
- package/dist/useInputValueDebounce-DJO5uzLb.js.map +0 -1
- package/dist/useUniformField-6c4OCAfb.cjs +0 -142
- package/dist/useUniformField-6c4OCAfb.cjs.map +0 -1
- package/dist/useUniformField-C-Xyu-8v.js +0 -135
- package/dist/useUniformField-C-Xyu-8v.js.map +0 -1
- package/dist/useUniformFieldArray-4MOU0xac.d.ts.map +0 -1
- package/dist/useUniformFieldArray-BChcZvc5.d.cts.map +0 -1
- package/dist/useUniformFieldArray-BKvA0FQW.js +0 -84
- package/dist/useUniformFieldArray-BKvA0FQW.js.map +0 -1
- package/dist/useUniformFieldArray-CRCbV1J2.cjs +0 -90
- package/dist/useUniformFieldArray-CRCbV1J2.cjs.map +0 -1
- /package/dist/{index-BMCcWGYS.d.ts → index--okzibnx.d.ts} +0 -0
- /package/dist/{index-C8k_zgEm.d.cts → index-B2TCFhpj.d.ts} +0 -0
- /package/dist/{index-D86jXpHS.d.cts → index-BtBZHVmz.d.cts} +0 -0
- /package/dist/{index-DDRpa5CJ.d.cts → index-CI4LJief.d.ts} +0 -0
- /package/dist/{index-GGHuYh77.d.ts → index-DeEmP3Jc.d.cts} +0 -0
- /package/dist/{index-hIBrhvnj.d.ts → index-sQecLSpR.d.cts} +0 -0
- /package/dist/{useInput-BVZvtfNg.d.ts → useInput-93TCCrkB.d.cts} +0 -0
- /package/dist/{useInput-CKmKH9Ij.d.cts → useInput-C_fY--wx.d.ts} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
require("./FormContext-3GzWxXSS.cjs");
|
|
3
|
+
const require_helpers_index = require("./helpers/index.cjs");
|
|
4
|
+
const require_FieldCopyTestIdButton = require("./FieldCopyTestIdButton-BvVBidko.cjs");
|
|
5
|
+
const require_FieldValidationError = require("./FieldValidationError-EecXNx5F.cjs");
|
|
6
|
+
const require_useController = require("./useController-D3a0qufz.cjs");
|
|
7
|
+
const require_useFormContext = require("./useFormContext-BQeGmV8j.cjs");
|
|
8
|
+
const require_useInputValueTransform = require("./useInputValueTransform-Cl6Xeso7.cjs");
|
|
9
|
+
const require_hooks_useUniformField_index = require("./hooks/useUniformField/index.cjs");
|
|
10
|
+
const require_Checkboxes = require("./Checkboxes-Ca9fTce_.cjs");
|
|
11
|
+
const require_hooks_useUniformFieldArray_index = require("./hooks/useUniformFieldArray/index.cjs");
|
|
12
|
+
const require_FieldArray = require("./FieldArray-CnxCQt0o.cjs");
|
|
13
|
+
const require_Grid = require("./Grid-V1pCY2LC.cjs");
|
|
14
|
+
const require_FieldCard = require("./FieldCard-DbuGSb_j.cjs");
|
|
15
|
+
const require_Form = require("./Form-Diivw8pg.cjs");
|
|
16
|
+
const require_hooks_useInputValueDebounce_index = require("./hooks/useInputValueDebounce/index.cjs");
|
|
17
|
+
const require_Input = require("./Input-C6kRsqx1.cjs");
|
|
18
|
+
const require_RadioBoxes = require("./RadioBoxes-DVxDhpbp.cjs");
|
|
19
|
+
const require_RadioTabs = require("./RadioTabs-CFraIx6w.cjs");
|
|
20
|
+
const require_Radios = require("./Radios-OhSB1oFo.cjs");
|
|
21
|
+
const require_Select = require("./Select-fEJPVWJa.cjs");
|
|
22
|
+
const require_Slider = require("./Slider-ChBNfwS2.cjs");
|
|
23
|
+
const require_SubmitButton = require("./SubmitButton-CfuPpJKk.cjs");
|
|
24
|
+
const require_Switch = require("./Switch-MDrnacFJ.cjs");
|
|
25
|
+
const require_SwitchBox = require("./SwitchBox-kp93uE8e.cjs");
|
|
26
|
+
const require_TextArea = require("./TextArea-B8XYKqFg.cjs");
|
|
27
|
+
const require_useClientValidation = require("./useClientValidation-HqsAYK9K.cjs");
|
|
28
|
+
const require_useWatchUserChange = require("./useWatchUserChange-DkZ0Vqv3.cjs");
|
|
28
29
|
let _heroui_input = require("@heroui/input");
|
|
29
|
-
|
|
30
30
|
//#region src/index.ts
|
|
31
31
|
/* v8 ignore stop */
|
|
32
|
-
|
|
33
32
|
//#endregion
|
|
34
|
-
exports.Checkboxes = require_Checkboxes.
|
|
35
|
-
exports.FieldArray = require_FieldArray.
|
|
36
|
-
exports.FieldCard = require_FieldCard.
|
|
37
|
-
exports.FieldCopyTestIdButton = require_FieldCopyTestIdButton.
|
|
38
|
-
exports.FieldValidationError = require_FieldValidationError.
|
|
39
|
-
exports.Form = require_Form.
|
|
40
|
-
exports.Grid = require_Grid.
|
|
41
|
-
exports.Input = require_Input.
|
|
42
|
-
exports.RadioBoxes = require_RadioBoxes.
|
|
43
|
-
exports.RadioTabs = require_RadioTabs.
|
|
44
|
-
exports.Radios = require_Radios.
|
|
45
|
-
exports.Select = require_Select.
|
|
46
|
-
exports.Slider = require_Slider.
|
|
47
|
-
exports.SubmitButton = require_SubmitButton.
|
|
48
|
-
exports.Switch = require_Switch.
|
|
49
|
-
exports.SwitchBox = require_SwitchBox.
|
|
50
|
-
exports.TextArea = require_TextArea.
|
|
33
|
+
exports.Checkboxes = require_Checkboxes.Checkboxes;
|
|
34
|
+
exports.FieldArray = require_FieldArray.FieldArray;
|
|
35
|
+
exports.FieldCard = require_FieldCard.FieldCard;
|
|
36
|
+
exports.FieldCopyTestIdButton = require_FieldCopyTestIdButton.FieldCopyTestIdButton;
|
|
37
|
+
exports.FieldValidationError = require_FieldValidationError.FieldValidationError;
|
|
38
|
+
exports.Form = require_Form.Form;
|
|
39
|
+
exports.Grid = require_Grid.Grid;
|
|
40
|
+
exports.Input = require_Input.Input;
|
|
41
|
+
exports.RadioBoxes = require_RadioBoxes.RadioBoxes;
|
|
42
|
+
exports.RadioTabs = require_RadioTabs.RadioTabs;
|
|
43
|
+
exports.Radios = require_Radios.Radios;
|
|
44
|
+
exports.Select = require_Select.Select;
|
|
45
|
+
exports.Slider = require_Slider.Slider;
|
|
46
|
+
exports.SubmitButton = require_SubmitButton.SubmitButton;
|
|
47
|
+
exports.Switch = require_Switch.Switch;
|
|
48
|
+
exports.SwitchBox = require_SwitchBox.SwitchBox;
|
|
49
|
+
exports.TextArea = require_TextArea.TextArea;
|
|
51
50
|
exports.checkFieldIsRequired = require_useFormContext.checkFieldIsRequired;
|
|
52
51
|
exports.clientValidationSchemaByName = require_useClientValidation.clientValidationSchemaByName;
|
|
53
|
-
exports.createOptionValueConverter =
|
|
52
|
+
exports.createOptionValueConverter = require_helpers_index.createOptionValueConverter;
|
|
54
53
|
exports.fieldCardVariants = require_FieldCard.fieldCardVariants;
|
|
55
|
-
exports.flatArrayKey =
|
|
56
|
-
exports.fromNullishString =
|
|
57
|
-
exports.isValueEmpty =
|
|
58
|
-
exports.nameToTestId =
|
|
54
|
+
exports.flatArrayKey = require_helpers_index.flatArrayKey;
|
|
55
|
+
exports.fromNullishString = require_helpers_index.fromNullishString;
|
|
56
|
+
exports.isValueEmpty = require_helpers_index.isValueEmpty;
|
|
57
|
+
exports.nameToTestId = require_helpers_index.nameToTestId;
|
|
59
58
|
exports.radioBoxVariants = require_RadioBoxes.radioBoxVariants;
|
|
60
59
|
exports.switchBoxVariants = require_SwitchBox.switchBoxVariants;
|
|
61
|
-
exports.toFormFormat =
|
|
62
|
-
exports.toNullishString =
|
|
63
|
-
exports.toSubmitFormat =
|
|
64
|
-
exports.toValidationFormat =
|
|
60
|
+
exports.toFormFormat = require_helpers_index.toFormFormat;
|
|
61
|
+
exports.toNullishString = require_helpers_index.toNullishString;
|
|
62
|
+
exports.toSubmitFormat = require_helpers_index.toSubmitFormat;
|
|
63
|
+
exports.toValidationFormat = require_helpers_index.toValidationFormat;
|
|
65
64
|
exports.useClientValidation = require_useClientValidation.useClientValidation;
|
|
66
65
|
exports.useController = require_useController.useController;
|
|
67
66
|
exports.useFormContext = require_useFormContext.useFormContext;
|
|
68
|
-
Object.defineProperty(exports,
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
Object.defineProperty(exports, "useInput", {
|
|
68
|
+
enumerable: true,
|
|
69
|
+
get: function() {
|
|
70
|
+
return _heroui_input.useInput;
|
|
71
|
+
}
|
|
73
72
|
});
|
|
74
|
-
exports.useInputValueDebounce =
|
|
73
|
+
exports.useInputValueDebounce = require_hooks_useInputValueDebounce_index.useInputValueDebounce;
|
|
75
74
|
exports.useInputValueTransform = require_useInputValueTransform.useInputValueTransform;
|
|
76
|
-
exports.useUniformField =
|
|
77
|
-
exports.useUniformFieldArray =
|
|
75
|
+
exports.useUniformField = require_hooks_useUniformField_index.useUniformField;
|
|
76
|
+
exports.useUniformFieldArray = require_hooks_useUniformFieldArray_index.useUniformFieldArray;
|
|
78
77
|
exports.useWatchUserChange = require_useWatchUserChange.useWatchUserChange;
|
|
78
|
+
|
|
79
79
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { i as useInputValueTransform, n as UseInputValueTransformOptions, r as UseInputValueTransformReturn, t as InputValueTransform } from "./useInputValueTransform-
|
|
2
|
-
import { n as Checkboxes, r as CheckboxesProps, t as CheckboxOption } from "./index-
|
|
3
|
-
import { i as FieldArrayProps, n as FieldArrayChildrenRenderFn, r as FieldArrayFeatures, t as FieldArray } from "./index-
|
|
4
|
-
import { n as FieldCardProps, r as fieldCardVariants, t as FieldCard } from "./index-
|
|
5
|
-
import { n as FormProps, t as Form } from "./index-
|
|
6
|
-
import { n as GridProps, t as Grid } from "./index-
|
|
7
|
-
import { n as InputProps, t as Input } from "./index-
|
|
8
|
-
import { n as RadioBoxes, r as RadioBoxesProps, t as radioBoxVariants } from "./index-
|
|
9
|
-
import { n as RadioTabsProps, t as RadioTabs } from "./index-
|
|
10
|
-
import { n as RadiosProps, t as Radios } from "./index-
|
|
11
|
-
import { n as SelectProps, t as Select } from "./index-
|
|
12
|
-
import { n as SliderProps, t as Slider } from "./index-
|
|
13
|
-
import { n as SubmitButtonProps, t as SubmitButton } from "./index-
|
|
14
|
-
import { n as SwitchProps, t as Switch } from "./index-
|
|
15
|
-
import { n as SwitchBoxProps, r as switchBoxVariants, t as SwitchBox } from "./index-
|
|
16
|
-
import { n as TextAreaProps, t as TextArea } from "./index-
|
|
1
|
+
import { i as useInputValueTransform, n as UseInputValueTransformOptions, r as UseInputValueTransformReturn, t as InputValueTransform } from "./useInputValueTransform-BwAfw8Xb.cjs";
|
|
2
|
+
import { n as Checkboxes, r as CheckboxesProps, t as CheckboxOption } from "./index-BdYKQ59a.cjs";
|
|
3
|
+
import { i as FieldArrayProps, n as FieldArrayChildrenRenderFn, r as FieldArrayFeatures, t as FieldArray } from "./index-D6XwSwTP.cjs";
|
|
4
|
+
import { n as FieldCardProps, r as fieldCardVariants, t as FieldCard } from "./index-C-DiLZRu.cjs";
|
|
5
|
+
import { n as FormProps, t as Form } from "./index-NjKV8LJD.cjs";
|
|
6
|
+
import { n as GridProps, t as Grid } from "./index-BV1VKQdy.cjs";
|
|
7
|
+
import { n as InputProps, t as Input } from "./index-B2tIMFYh.cjs";
|
|
8
|
+
import { n as RadioBoxes, r as RadioBoxesProps, t as radioBoxVariants } from "./index-1Gzrph8R.cjs";
|
|
9
|
+
import { n as RadioTabsProps, t as RadioTabs } from "./index-CY2Mpaz3.cjs";
|
|
10
|
+
import { n as RadiosProps, t as Radios } from "./index-CKJumX37.cjs";
|
|
11
|
+
import { n as SelectProps, t as Select } from "./index-B0Fw1BAy.cjs";
|
|
12
|
+
import { n as SliderProps, t as Slider } from "./index-C6dMrOEm.cjs";
|
|
13
|
+
import { n as SubmitButtonProps, t as SubmitButton } from "./index-DkiQkdCW.cjs";
|
|
14
|
+
import { n as SwitchProps, t as Switch } from "./index-BqWtWLeP.cjs";
|
|
15
|
+
import { n as SwitchBoxProps, r as switchBoxVariants, t as SwitchBox } from "./index-pwXVq8hR.cjs";
|
|
16
|
+
import { n as TextAreaProps, t as TextArea } from "./index-DZzfeV4O.cjs";
|
|
17
17
|
import { createOptionValueConverter, flatArrayKey, fromNullishString, isValueEmpty, nameToTestId, toFormFormat, toNullishString, toSubmitFormat, toValidationFormat } from "./helpers/index.cjs";
|
|
18
|
-
import { n as useClientValidation, t as clientValidationSchemaByName } from "./useClientValidation-
|
|
19
|
-
import { n as UseControllerReturn, r as useController, t as UseControllerProps } from "./useController-
|
|
20
|
-
import { n as useFormContext, t as checkFieldIsRequired } from "./useFormContext-
|
|
21
|
-
import { t as useInput } from "./useInput-
|
|
22
|
-
import { n as UseInputValueDebounceReturn, r as useInputValueDebounce, t as UseInputValueDebounceOptions } from "./useInputValueDebounce-
|
|
23
|
-
import { n as UseUniformFieldReturn, r as useUniformField, t as UseUniformFieldParams } from "./useUniformField-
|
|
24
|
-
import { n as useUniformFieldArray, t as UseUniformFieldArrayProps } from "./useUniformFieldArray-
|
|
25
|
-
import { n as useWatchUserChange, t as UseWatchUserChangeOptions } from "./useWatchUserChange-
|
|
26
|
-
import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "./index-
|
|
27
|
-
import { n as FieldValidationErrorProps, t as FieldValidationError } from "./index-
|
|
18
|
+
import { n as useClientValidation, t as clientValidationSchemaByName } from "./useClientValidation-Bu3mNZpf.cjs";
|
|
19
|
+
import { n as UseControllerReturn, r as useController, t as UseControllerProps } from "./useController-CNiqy_2D.cjs";
|
|
20
|
+
import { n as useFormContext, t as checkFieldIsRequired } from "./useFormContext-C06aufHt.cjs";
|
|
21
|
+
import { t as useInput } from "./useInput-93TCCrkB.cjs";
|
|
22
|
+
import { n as UseInputValueDebounceReturn, r as useInputValueDebounce, t as UseInputValueDebounceOptions } from "./useInputValueDebounce-puGRVJ6t.cjs";
|
|
23
|
+
import { n as UseUniformFieldReturn, r as useUniformField, t as UseUniformFieldParams } from "./useUniformField-j22kM31n.cjs";
|
|
24
|
+
import { n as useUniformFieldArray, t as UseUniformFieldArrayProps } from "./useUniformFieldArray-CDEagafl.cjs";
|
|
25
|
+
import { n as useWatchUserChange, t as UseWatchUserChangeOptions } from "./useWatchUserChange-CZu_ZZ38.cjs";
|
|
26
|
+
import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "./index-jCfJAgDc.cjs";
|
|
27
|
+
import { n as FieldValidationErrorProps, t as FieldValidationError } from "./index-Dld6NP_K.cjs";
|
|
28
28
|
export { CheckboxOption, Checkboxes, CheckboxesProps, FieldArray, FieldArrayChildrenRenderFn, FieldArrayFeatures, FieldArrayProps, FieldCard, FieldCardProps, FieldCopyTestIdButton, FieldCopyTestIdButtonProps, FieldValidationError, FieldValidationErrorProps, Form, FormProps, Grid, GridProps, Input, InputProps, InputValueTransform, RadioBoxes, RadioBoxesProps, RadioTabs, RadioTabsProps, Radios, RadiosProps, Select, SelectProps, Slider, SliderProps, SubmitButton, SubmitButtonProps, Switch, SwitchBox, SwitchBoxProps, SwitchProps, TextArea, TextAreaProps, UseControllerProps, UseControllerReturn, UseInputValueDebounceOptions, UseInputValueDebounceReturn, UseInputValueTransformOptions, UseInputValueTransformReturn, UseUniformFieldArrayProps, UseUniformFieldParams, UseUniformFieldReturn, UseWatchUserChangeOptions, checkFieldIsRequired, clientValidationSchemaByName, createOptionValueConverter, fieldCardVariants, flatArrayKey, fromNullishString, isValueEmpty, nameToTestId, radioBoxVariants, switchBoxVariants, toFormFormat, toNullishString, toSubmitFormat, toValidationFormat, useClientValidation, useController, useFormContext, useInput, useInputValueDebounce, useInputValueTransform, useUniformField, useUniformFieldArray, useWatchUserChange };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,31 +1,28 @@
|
|
|
1
|
-
import { i as useInputValueTransform, n as UseInputValueTransformOptions, r as UseInputValueTransformReturn, t as InputValueTransform } from "./useInputValueTransform-
|
|
2
|
-
import { n as Checkboxes, r as CheckboxesProps, t as CheckboxOption } from "./index-
|
|
3
|
-
import { i as FieldArrayProps, n as FieldArrayChildrenRenderFn, r as FieldArrayFeatures, t as FieldArray } from "./index-
|
|
4
|
-
import { n as FieldCardProps, r as fieldCardVariants, t as FieldCard } from "./index-
|
|
5
|
-
import "./
|
|
6
|
-
import { n as
|
|
7
|
-
import { n as
|
|
8
|
-
import { n as
|
|
9
|
-
import { n as
|
|
10
|
-
import { n as
|
|
11
|
-
import { n as
|
|
12
|
-
import { n as
|
|
13
|
-
import { n as
|
|
14
|
-
import { n as
|
|
15
|
-
import { n as
|
|
16
|
-
import { n as
|
|
17
|
-
import { n as TextAreaProps, t as TextArea } from "./index-DiFA3eG2.js";
|
|
1
|
+
import { i as useInputValueTransform, n as UseInputValueTransformOptions, r as UseInputValueTransformReturn, t as InputValueTransform } from "./useInputValueTransform-CdoaxNyD.js";
|
|
2
|
+
import { n as Checkboxes, r as CheckboxesProps, t as CheckboxOption } from "./index-CE0aQlFw.js";
|
|
3
|
+
import { i as FieldArrayProps, n as FieldArrayChildrenRenderFn, r as FieldArrayFeatures, t as FieldArray } from "./index-fgARdsoB.js";
|
|
4
|
+
import { n as FieldCardProps, r as fieldCardVariants, t as FieldCard } from "./index-BwAI1VFS.js";
|
|
5
|
+
import { n as FormProps, t as Form } from "./index-Dj3NDj0T.js";
|
|
6
|
+
import { n as GridProps, t as Grid } from "./index-Cv4ERj3i.js";
|
|
7
|
+
import { n as InputProps, t as Input } from "./index-BExpqT81.js";
|
|
8
|
+
import { n as RadioBoxes, r as RadioBoxesProps, t as radioBoxVariants } from "./index-DJe_1ZdK.js";
|
|
9
|
+
import { n as RadioTabsProps, t as RadioTabs } from "./index-DD_RPe91.js";
|
|
10
|
+
import { n as RadiosProps, t as Radios } from "./index-DpNf55K6.js";
|
|
11
|
+
import { n as SelectProps, t as Select } from "./index-DGHBlmnV.js";
|
|
12
|
+
import { n as SliderProps, t as Slider } from "./index-Yj6VEhqF.js";
|
|
13
|
+
import { n as SubmitButtonProps, t as SubmitButton } from "./index-DFWSHdua.js";
|
|
14
|
+
import { n as SwitchProps, t as Switch } from "./index-BLctuwc0.js";
|
|
15
|
+
import { n as SwitchBoxProps, r as switchBoxVariants, t as SwitchBox } from "./index-wV1E_PkS.js";
|
|
16
|
+
import { n as TextAreaProps, t as TextArea } from "./index-CZJ_lWQ0.js";
|
|
18
17
|
import { createOptionValueConverter, flatArrayKey, fromNullishString, isValueEmpty, nameToTestId, toFormFormat, toNullishString, toSubmitFormat, toValidationFormat } from "./helpers/index.js";
|
|
19
|
-
import { n as useClientValidation, t as clientValidationSchemaByName } from "./useClientValidation-
|
|
20
|
-
import { n as UseControllerReturn, r as useController, t as UseControllerProps } from "./useController-
|
|
21
|
-
import "./
|
|
22
|
-
import {
|
|
23
|
-
import "./
|
|
24
|
-
import { t as
|
|
25
|
-
import { n as
|
|
26
|
-
import { n as
|
|
27
|
-
import { n as
|
|
28
|
-
import { n as
|
|
29
|
-
import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "./index-DmlsX2k6.js";
|
|
30
|
-
import { n as FieldValidationErrorProps, t as FieldValidationError } from "./index-CuNl43Zr.js";
|
|
18
|
+
import { n as useClientValidation, t as clientValidationSchemaByName } from "./useClientValidation-_8PTmv8i.js";
|
|
19
|
+
import { n as UseControllerReturn, r as useController, t as UseControllerProps } from "./useController-Cc0UNQMm.js";
|
|
20
|
+
import { n as useFormContext, t as checkFieldIsRequired } from "./useFormContext-CHA8GnKp.js";
|
|
21
|
+
import { t as useInput } from "./useInput-C_fY--wx.js";
|
|
22
|
+
import { n as UseInputValueDebounceReturn, r as useInputValueDebounce, t as UseInputValueDebounceOptions } from "./useInputValueDebounce-sFOlecIQ.js";
|
|
23
|
+
import { n as UseUniformFieldReturn, r as useUniformField, t as UseUniformFieldParams } from "./useUniformField-BTBS1Kv-.js";
|
|
24
|
+
import { n as useUniformFieldArray, t as UseUniformFieldArrayProps } from "./useUniformFieldArray-CMHoo4o3.js";
|
|
25
|
+
import { n as useWatchUserChange, t as UseWatchUserChangeOptions } from "./useWatchUserChange-CH4x16_r.js";
|
|
26
|
+
import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "./index-B6WwxkLx2.js";
|
|
27
|
+
import { n as FieldValidationErrorProps, t as FieldValidationError } from "./index-DkxqHE_P2.js";
|
|
31
28
|
export { CheckboxOption, Checkboxes, CheckboxesProps, FieldArray, FieldArrayChildrenRenderFn, FieldArrayFeatures, FieldArrayProps, FieldCard, FieldCardProps, FieldCopyTestIdButton, FieldCopyTestIdButtonProps, FieldValidationError, FieldValidationErrorProps, Form, FormProps, Grid, GridProps, Input, InputProps, InputValueTransform, RadioBoxes, RadioBoxesProps, RadioTabs, RadioTabsProps, Radios, RadiosProps, Select, SelectProps, Slider, SliderProps, SubmitButton, SubmitButtonProps, Switch, SwitchBox, SwitchBoxProps, SwitchProps, TextArea, TextAreaProps, UseControllerProps, UseControllerReturn, UseInputValueDebounceOptions, UseInputValueDebounceReturn, UseInputValueTransformOptions, UseInputValueTransformReturn, UseUniformFieldArrayProps, UseUniformFieldParams, UseUniformFieldReturn, UseWatchUserChangeOptions, checkFieldIsRequired, clientValidationSchemaByName, createOptionValueConverter, fieldCardVariants, flatArrayKey, fromNullishString, isValueEmpty, nameToTestId, radioBoxVariants, switchBoxVariants, toFormFormat, toNullishString, toSubmitFormat, toValidationFormat, useClientValidation, useController, useFormContext, useInput, useInputValueDebounce, useInputValueTransform, useUniformField, useUniformFieldArray, useWatchUserChange };
|
package/dist/index.js
CHANGED
|
@@ -1,34 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as
|
|
3
|
-
import { n as
|
|
4
|
-
import { t as useController } from "./useController-
|
|
5
|
-
import { n as useFormContext, t as checkFieldIsRequired } from "./useFormContext-
|
|
6
|
-
import { t as useInput } from "./useInput-
|
|
7
|
-
import { t as useInputValueTransform } from "./useInputValueTransform-
|
|
8
|
-
import {
|
|
9
|
-
import { n as
|
|
10
|
-
import {
|
|
11
|
-
import { n as
|
|
12
|
-
import { n as
|
|
13
|
-
import { n as fieldCardVariants, t as
|
|
14
|
-
import { n as
|
|
15
|
-
import {
|
|
16
|
-
import { n as
|
|
17
|
-
import { n as
|
|
18
|
-
import { n as
|
|
19
|
-
import { n as
|
|
20
|
-
import { n as
|
|
21
|
-
import { n as
|
|
22
|
-
import { n as
|
|
23
|
-
import { n as
|
|
24
|
-
import { n as
|
|
25
|
-
import { n as
|
|
26
|
-
import { n as useClientValidation, t as clientValidationSchemaByName } from "./useClientValidation-
|
|
27
|
-
import { t as useWatchUserChange } from "./useWatchUserChange-
|
|
28
|
-
|
|
1
|
+
import { createOptionValueConverter, flatArrayKey, fromNullishString, isValueEmpty, nameToTestId, toFormFormat, toNullishString, toSubmitFormat, toValidationFormat } from "./helpers/index.js";
|
|
2
|
+
import { n as FieldCopyTestIdButton } from "./FieldCopyTestIdButton-Dpmo0uBV.js";
|
|
3
|
+
import { n as FieldValidationError } from "./FieldValidationError-ktTyyyip.js";
|
|
4
|
+
import { t as useController } from "./useController-B-6PzFna.js";
|
|
5
|
+
import { n as useFormContext, t as checkFieldIsRequired } from "./useFormContext-Bzpyonu6.js";
|
|
6
|
+
import { t as useInput } from "./useInput-CVm3tP78.js";
|
|
7
|
+
import { t as useInputValueTransform } from "./useInputValueTransform-CXdmtc0Q.js";
|
|
8
|
+
import { useUniformField } from "./hooks/useUniformField/index.js";
|
|
9
|
+
import { n as Checkboxes } from "./Checkboxes-D1hppxDE.js";
|
|
10
|
+
import { useUniformFieldArray } from "./hooks/useUniformFieldArray/index.js";
|
|
11
|
+
import { n as FieldArray } from "./FieldArray-n39Aj9AV.js";
|
|
12
|
+
import { n as Grid } from "./Grid-Bzyi97Cx.js";
|
|
13
|
+
import { n as fieldCardVariants, t as FieldCard } from "./FieldCard-SjYNs4sL.js";
|
|
14
|
+
import { n as Form } from "./Form-Wzy7pBVt.js";
|
|
15
|
+
import { useInputValueDebounce } from "./hooks/useInputValueDebounce/index.js";
|
|
16
|
+
import { n as Input } from "./Input-BDWP4hOr.js";
|
|
17
|
+
import { n as RadioBoxes, r as radioBoxVariants } from "./RadioBoxes-DNQCynvF.js";
|
|
18
|
+
import { n as RadioTabs } from "./RadioTabs-CsVqYCE9.js";
|
|
19
|
+
import { n as Radios } from "./Radios-C-Zf3Yij.js";
|
|
20
|
+
import { n as Select } from "./Select-DMpCAYLB.js";
|
|
21
|
+
import { n as Slider } from "./Slider-DxRcLu-j.js";
|
|
22
|
+
import { n as SubmitButton } from "./SubmitButton-Bu3NNFyt.js";
|
|
23
|
+
import { n as Switch } from "./Switch-CMpXZdLc.js";
|
|
24
|
+
import { n as SwitchBox, r as switchBoxVariants } from "./SwitchBox-Cg7NPfp_.js";
|
|
25
|
+
import { n as TextArea } from "./TextArea-Bxi2pXvY.js";
|
|
26
|
+
import { n as useClientValidation, t as clientValidationSchemaByName } from "./useClientValidation-Dn_kJkE5.js";
|
|
27
|
+
import { t as useWatchUserChange } from "./useWatchUserChange-CLgLc5W4.js";
|
|
29
28
|
//#region src/index.ts
|
|
30
29
|
/* v8 ignore stop */
|
|
31
|
-
|
|
32
30
|
//#endregion
|
|
33
|
-
export {
|
|
31
|
+
export { Checkboxes, FieldArray, FieldCard, FieldCopyTestIdButton, FieldValidationError, Form, Grid, Input, RadioBoxes, RadioTabs, Radios, Select, Slider, SubmitButton, Switch, SwitchBox, TextArea, checkFieldIsRequired, clientValidationSchemaByName, createOptionValueConverter, fieldCardVariants, flatArrayKey, fromNullishString, isValueEmpty, nameToTestId, radioBoxVariants, switchBoxVariants, toFormFormat, toNullishString, toSubmitFormat, toValidationFormat, useClientValidation, useController, useFormContext, useInput, useInputValueDebounce, useInputValueTransform, useUniformField, useUniformFieldArray, useWatchUserChange };
|
|
32
|
+
|
|
34
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_FieldCopyTestIdButton = require("../../FieldCopyTestIdButton-BvVBidko.cjs");
|
|
6
|
+
exports.FieldCopyTestIdButton = require_FieldCopyTestIdButton.FieldCopyTestIdButton;
|
|
7
|
+
exports.default = require_FieldCopyTestIdButton.FieldCopyTestIdButton_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "../../index-
|
|
1
|
+
import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "../../index-jCfJAgDc.cjs";
|
|
2
2
|
export { FieldCopyTestIdButton, FieldCopyTestIdButton as default, FieldCopyTestIdButtonProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "../../index-
|
|
1
|
+
import { n as FieldCopyTestIdButtonProps, t as FieldCopyTestIdButton } from "../../index-B6WwxkLx2.js";
|
|
2
2
|
export { FieldCopyTestIdButton, FieldCopyTestIdButton as default, FieldCopyTestIdButtonProps };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
|
|
3
|
-
export { FieldCopyTestIdButton_default as FieldCopyTestIdButton, FieldCopyTestIdButton_default$1 as default };
|
|
1
|
+
import { n as FieldCopyTestIdButton, t as FieldCopyTestIdButton_default } from "../../FieldCopyTestIdButton-Dpmo0uBV.js";
|
|
2
|
+
export { FieldCopyTestIdButton, FieldCopyTestIdButton_default as default };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
Object.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
const require_FieldValidationError = require("../../FieldValidationError-EecXNx5F.cjs");
|
|
6
|
+
exports.FieldValidationError = require_FieldValidationError.FieldValidationError;
|
|
7
|
+
exports.default = require_FieldValidationError.FieldValidationError_default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as FieldValidationErrorProps, t as FieldValidationError } from "../../index-
|
|
1
|
+
import { n as FieldValidationErrorProps, t as FieldValidationError } from "../../index-Dld6NP_K.cjs";
|
|
2
2
|
export { FieldValidationError, FieldValidationError as default, FieldValidationErrorProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as FieldValidationErrorProps, t as FieldValidationError } from "../../index-
|
|
1
|
+
import { n as FieldValidationErrorProps, t as FieldValidationError } from "../../index-DkxqHE_P2.js";
|
|
2
2
|
export { FieldValidationError, FieldValidationError as default, FieldValidationErrorProps };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
|
|
3
|
-
export { FieldValidationError_default as FieldValidationError, FieldValidationError_default$1 as default };
|
|
1
|
+
import { n as FieldValidationError, t as FieldValidationError_default } from "../../FieldValidationError-ktTyyyip.js";
|
|
2
|
+
export { FieldValidationError, FieldValidationError_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VetoTypeAny } from "@fuf-stack/veto";
|
|
2
|
-
import * as _fuf_stack_veto_dist_types_d_CNPgNK_V0 from "@fuf-stack/veto/dist/types.d-CNPgNK-V";
|
|
2
|
+
import * as _$_fuf_stack_veto_dist_types_d_CNPgNK_V0 from "@fuf-stack/veto/dist/types.d-CNPgNK-V";
|
|
3
3
|
|
|
4
4
|
//#region src/hooks/useClientValidation/useClientValidation.d.ts
|
|
5
5
|
/**
|
|
@@ -143,7 +143,7 @@ declare const useClientValidation: <TData = unknown>(data: TData | null | undefi
|
|
|
143
143
|
* // => objectLoose({ tags: array(vt.string().refine(...).nullish()).optional() })
|
|
144
144
|
* ```
|
|
145
145
|
*/
|
|
146
|
-
declare const clientValidationSchemaByName: <T extends VetoTypeAny>(name: string, fieldSchema: T) => _fuf_stack_veto_dist_types_d_CNPgNK_V0.Z;
|
|
146
|
+
declare const clientValidationSchemaByName: <T extends VetoTypeAny>(name: string, fieldSchema: T) => _$_fuf_stack_veto_dist_types_d_CNPgNK_V0.Z;
|
|
147
147
|
//#endregion
|
|
148
148
|
export { useClientValidation as n, clientValidationSchemaByName as t };
|
|
149
|
-
//# sourceMappingURL=useClientValidation-
|
|
149
|
+
//# sourceMappingURL=useClientValidation-Bu3mNZpf.d.cts.map
|
package/dist/{useClientValidation-Dw-dmynu.d.cts.map → useClientValidation-Bu3mNZpf.d.cts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useClientValidation-
|
|
1
|
+
{"version":3,"file":"useClientValidation-Bu3mNZpf.d.cts","names":[],"sources":["../src/hooks/useClientValidation/useClientValidation.ts"],"mappings":";;;;;;;AAkEA;;;;;;;;;;;;;;;;;;;AAkIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAlIa,mBAAA,oBACX,IAAA,EAAM,KAAA,qBACN,aAAA,GAAgB,IAAA,EAAM,KAAA,KAAU,WAAA,EAChC,OAAA;EAAY,GAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+HD,4BAAA,aAA0C,WAAA,EACrD,IAAA,UACA,WAAA,EAAa,CAAA,KAAC,wCAAA,CAAA,CAAA"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { n as useFormContext } from "./useFormContext-
|
|
1
|
+
import "./helpers/index.js";
|
|
2
|
+
import { n as useFormContext } from "./useFormContext-Bzpyonu6.js";
|
|
3
3
|
import { useEffect, useId } from "react";
|
|
4
4
|
import { array, objectLoose } from "@fuf-stack/veto";
|
|
5
|
-
|
|
6
5
|
//#region src/hooks/useClientValidation/useClientValidation.ts
|
|
7
6
|
/**
|
|
8
7
|
* Hook for adding dynamic client-side validation to forms.
|
|
@@ -164,7 +163,7 @@ const clientValidationSchemaByName = (name, fieldSchema) => {
|
|
|
164
163
|
for (let i = segments.length - 1; i >= 0; i -= 1) {
|
|
165
164
|
const segment = segments[i];
|
|
166
165
|
const isNumeric = /^\d+$/.test(segment);
|
|
167
|
-
if (segment ===
|
|
166
|
+
if (segment === "__FLAT__") continue;
|
|
168
167
|
if (isNumeric) schema = array(schema).optional();
|
|
169
168
|
else {
|
|
170
169
|
const obj = objectLoose({ [segment]: schema });
|
|
@@ -173,7 +172,7 @@ const clientValidationSchemaByName = (name, fieldSchema) => {
|
|
|
173
172
|
}
|
|
174
173
|
return schema;
|
|
175
174
|
};
|
|
176
|
-
|
|
177
175
|
//#endregion
|
|
178
176
|
export { useClientValidation as n, clientValidationSchemaByName as t };
|
|
179
|
-
|
|
177
|
+
|
|
178
|
+
//# sourceMappingURL=useClientValidation-Dn_kJkE5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useClientValidation-DksyV18M.js","names":[],"sources":["../src/hooks/useClientValidation/useClientValidation.ts"],"sourcesContent":["import type { VetoTypeAny } from '@fuf-stack/veto';\n\nimport { useEffect, useId } from 'react';\n\nimport { array, objectLoose } from '@fuf-stack/veto';\n\nimport { flatArrayKey } from '../../helpers';\nimport { useFormContext } from '../useFormContext/useFormContext';\n\n/**\n * Hook for adding dynamic client-side validation to forms.\n *\n * Client validation is used for context-dependent validation rules that require external data\n * (e.g., checking if a username already exists). It complements base validation (passed to Form),\n * which handles static rules like \"required\", min/max length, format, etc.\n *\n * **Typical pattern:**\n * - Base validation: Static, always-on rules (required, format, length constraints)\n * - Client validation: Dynamic rules based on external data (uniqueness, business logic)\n * - Client schemas should use `.nullish()` to allow empty values (base validation handles \"required\")\n *\n * Automatically manages validation schema lifecycle: sets schema when data is provided,\n * clears schema when data is null/undefined, and cleans up on unmount. When the client\n * validation schema changes, automatically re-validates all touched fields.\n *\n * @param data - Data to create validation schema from (or null/undefined to clear validation)\n * @param schemaFactory - Function that creates a validation schema from the data. Schemas should typically use `.nullish()`.\n * @param options - Optional configuration object\n * @param options.key - Optional custom key for registration. Useful when multiple instances should share validation (e.g., in field arrays)\n *\n * @example\n * ```tsx\n * // Base validation handles \"required\" and format\n * const baseSchema = veto({ username: vt.string({ min: 3 }) });\n *\n * // Client validation adds dynamic uniqueness check\n * const { data: teamData } = useTeamQuery(teamId);\n * useClientValidation(teamData, (data) =>\n * vt.objectLoose({\n * username: vt.string()\n * .refine(\n * (value) => !data.existingUsers.includes(value),\n * { message: 'Username already exists' }\n * )\n * .nullish() // Allow empty - base validation handles \"required\"\n * })\n * );\n * ```\n *\n * @example\n * ```tsx\n * // Using custom key in a field array to avoid multiple registrations\n * fields.map((field, index) => (\n * useClientValidation(\n * userData,\n * (data) => clientValidationSchemaByName(\n * `items.${index}.name`,\n * vt.string()\n * .refine((val) => !data.forbidden.includes(val), { message: 'Name not allowed' })\n * .nullish()\n * ),\n * { key: 'items-validation' } // All instances share the same key\n * )\n * ));\n * ```\n */\nexport const useClientValidation = <TData = unknown>(\n data: TData | null | undefined,\n schemaFactory: (data: TData) => VetoTypeAny,\n options?: { key?: string },\n): void => {\n const {\n formState: { touchedFields },\n validation: { setClientValidationSchema },\n trigger,\n } = useFormContext();\n\n // Use provided key or auto-generate unique key\n const autoGeneratedKey = useId();\n const key = options?.key ?? autoGeneratedKey;\n\n // Use data hash instead of object reference to avoid unnecessary re-runs\n // when data object reference changes but data remains the same\n const dataHash = JSON.stringify(data);\n\n // Single effect to manage validation schema lifecycle\n useEffect(() => {\n // Set validation schema when data is available\n if (data != null) {\n const validationSchema = schemaFactory(data);\n setClientValidationSchema(key, validationSchema);\n } else {\n // Clear validation schema when no data\n setClientValidationSchema(key, null);\n }\n\n // Re-validate all touched fields when client validation schema changes\n const touchedFieldNames = Object.keys(touchedFields);\n if (touchedFieldNames.length > 0) {\n // Use setTimeout to ensure the client validation schema update has propagated\n // before triggering re-validation (fixes race condition)\n setTimeout(async () => {\n return trigger(touchedFieldNames);\n }, 1);\n }\n\n // Cleanup on unmount or when dependencies change\n return () => {\n setClientValidationSchema(key, null);\n };\n // Only re-run when data (dataHash) or key changes\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dataHash, key]);\n};\n\n/**\n * Helper function to create a veto looseObject schema for a single field with nested path support.\n *\n * Parses field paths (dot-notation) and creates properly nested loose object schemas with array support.\n * All intermediate objects and arrays are marked as optional to allow partial data structures.\n * Numeric segments in the path are treated as array indices, and the parent field is wrapped in an array schema.\n * Supports flat arrays (arrays of primitives) via the special `__FLAT__` key.\n *\n * **Important:** The fieldSchema should typically use `.nullish()` to allow empty values. This is because:\n * - Base validation (passed to Form) handles \"required\" constraints\n * - Client validation adds dynamic, context-dependent rules (e.g., \"username already exists\")\n * - Form data processing converts empty strings in flat arrays to `null` (not `undefined`)\n * - `.nullish()` accepts both `null` and `undefined`, while `.optional()` only accepts `undefined`\n *\n * This pattern ensures client validation only validates non-empty values, while base validation\n * enforces required fields and basic constraints (min length, format, etc.).\n *\n * @param name - The dot-separated path to the field (e.g., 'username', 'user.profile.email', 'items.0.name', 'tags.0.__FLAT__')\n * @param fieldSchema - The veto validation schema for the field. Should typically use `.nullish()` to allow empty values.\n * @returns A nested loose object schema matching the field path structure with proper type inference\n *\n * @example\n * ```tsx\n * // Typical usage: base validation handles \"required\", client validation adds dynamic rules\n * // Base validation (in Form component)\n * const baseSchema = veto({ username: vt.string({ min: 3 }) }); // Required + min length\n *\n * // Client validation (dynamic check for existing usernames)\n * const { data: userData } = useUserQuery(userId);\n * useClientValidation(userData, (data) =>\n * clientValidationSchemaByName(\n * 'username',\n * vt.string()\n * .refine(\n * (value) => !data.existingUsernames.includes(value),\n * { message: 'Username already taken' }\n * )\n * .nullish() // Allow empty - base validation handles \"required\"\n * )\n * );\n * ```\n *\n * @example\n * ```tsx\n * // Nested field path with dynamic validation\n * clientValidationSchemaByName(\n * 'user.profile.email',\n * vt.string()\n * .refine(\n * (value) => !reservedEmails.includes(value),\n * { message: 'This email is reserved' }\n * )\n * .nullish()\n * )\n * // => objectLoose({ user: objectLoose({ profile: objectLoose({ email: ... }).optional() }).optional() })\n * ```\n *\n * @example\n * ```tsx\n * // Array of objects with dynamic validation\n * clientValidationSchemaByName(\n * 'items.0.tag',\n * vt.string()\n * .refine((value) => !forbiddenTags.includes(value), { message: 'Tag not allowed' })\n * .nullish()\n * )\n * // => objectLoose({ items: array(objectLoose({ tag: ... })).optional() })\n * ```\n *\n * @example\n * ```tsx\n * // Flat array (array of primitives) with dynamic validation\n * clientValidationSchemaByName(\n * 'tags.0.__FLAT__',\n * vt.string()\n * .refine((value) => !forbiddenWords.includes(value), { message: 'Word not allowed' })\n * .nullish()\n * )\n * // => objectLoose({ tags: array(vt.string().refine(...).nullish()).optional() })\n * ```\n */\nexport const clientValidationSchemaByName = <T extends VetoTypeAny>(\n name: string,\n fieldSchema: T,\n) => {\n const segments = name.split('.');\n\n // Build schema from innermost to outermost\n let schema: VetoTypeAny = fieldSchema;\n\n // Process segments in reverse order to build nested structure\n for (let i = segments.length - 1; i >= 0; i -= 1) {\n const segment = segments[i];\n\n const isNumeric = /^\\d+$/.test(segment);\n const isFlatArrayKey = segment === flatArrayKey;\n\n if (isFlatArrayKey) {\n // Skip the __FLAT__ key - it's just a marker for flat arrays\n // The schema is already correct (primitive type), just continue\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (isNumeric) {\n // Current segment is an array index - wrap current schema in optional array\n schema = array(schema).optional();\n } else {\n // Current segment is a field name - wrap in objectLoose\n // Make it optional if it's an intermediate object (not the root)\n const obj = objectLoose({\n [segment]: schema,\n });\n schema = i > 0 ? obj.optional() : obj;\n }\n }\n\n return schema;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,MAAa,uBACX,MACA,eACA,YACS;CACT,MAAM,EACJ,WAAW,EAAE,iBACb,YAAY,EAAE,6BACd,YACE,gBAAgB;CAGpB,MAAM,mBAAmB,OAAO;CAChC,MAAM,MAAM,SAAS,OAAO;AAO5B,iBAAgB;AAEd,MAAI,QAAQ,KAEV,2BAA0B,KADD,cAAc,KAAK,CACI;MAGhD,2BAA0B,KAAK,KAAK;EAItC,MAAM,oBAAoB,OAAO,KAAK,cAAc;AACpD,MAAI,kBAAkB,SAAS,EAG7B,YAAW,YAAY;AACrB,UAAO,QAAQ,kBAAkB;KAChC,EAAE;AAIP,eAAa;AACX,6BAA0B,KAAK,KAAK;;IAIrC,CA7Bc,KAAK,UAAU,KAAK,EA6BvB,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFrB,MAAa,gCACX,MACA,gBACG;CACH,MAAM,WAAW,KAAK,MAAM,IAAI;CAGhC,IAAI,SAAsB;AAG1B,MAAK,IAAI,IAAI,SAAS,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG;EAChD,MAAM,UAAU,SAAS;EAEzB,MAAM,YAAY,QAAQ,KAAK,QAAQ;AAGvC,MAFuB,YAAY,aAMjC;AAGF,MAAI,UAEF,UAAS,MAAM,OAAO,CAAC,UAAU;OAC5B;GAGL,MAAM,MAAM,YAAY,GACrB,UAAU,QACZ,CAAC;AACF,YAAS,IAAI,IAAI,IAAI,UAAU,GAAG;;;AAItC,QAAO"}
|
|
1
|
+
{"version":3,"file":"useClientValidation-Dn_kJkE5.js","names":[],"sources":["../src/hooks/useClientValidation/useClientValidation.ts"],"sourcesContent":["import type { VetoTypeAny } from '@fuf-stack/veto';\n\nimport { useEffect, useId } from 'react';\n\nimport { array, objectLoose } from '@fuf-stack/veto';\n\nimport { flatArrayKey } from '../../helpers';\nimport { useFormContext } from '../useFormContext/useFormContext';\n\n/**\n * Hook for adding dynamic client-side validation to forms.\n *\n * Client validation is used for context-dependent validation rules that require external data\n * (e.g., checking if a username already exists). It complements base validation (passed to Form),\n * which handles static rules like \"required\", min/max length, format, etc.\n *\n * **Typical pattern:**\n * - Base validation: Static, always-on rules (required, format, length constraints)\n * - Client validation: Dynamic rules based on external data (uniqueness, business logic)\n * - Client schemas should use `.nullish()` to allow empty values (base validation handles \"required\")\n *\n * Automatically manages validation schema lifecycle: sets schema when data is provided,\n * clears schema when data is null/undefined, and cleans up on unmount. When the client\n * validation schema changes, automatically re-validates all touched fields.\n *\n * @param data - Data to create validation schema from (or null/undefined to clear validation)\n * @param schemaFactory - Function that creates a validation schema from the data. Schemas should typically use `.nullish()`.\n * @param options - Optional configuration object\n * @param options.key - Optional custom key for registration. Useful when multiple instances should share validation (e.g., in field arrays)\n *\n * @example\n * ```tsx\n * // Base validation handles \"required\" and format\n * const baseSchema = veto({ username: vt.string({ min: 3 }) });\n *\n * // Client validation adds dynamic uniqueness check\n * const { data: teamData } = useTeamQuery(teamId);\n * useClientValidation(teamData, (data) =>\n * vt.objectLoose({\n * username: vt.string()\n * .refine(\n * (value) => !data.existingUsers.includes(value),\n * { message: 'Username already exists' }\n * )\n * .nullish() // Allow empty - base validation handles \"required\"\n * })\n * );\n * ```\n *\n * @example\n * ```tsx\n * // Using custom key in a field array to avoid multiple registrations\n * fields.map((field, index) => (\n * useClientValidation(\n * userData,\n * (data) => clientValidationSchemaByName(\n * `items.${index}.name`,\n * vt.string()\n * .refine((val) => !data.forbidden.includes(val), { message: 'Name not allowed' })\n * .nullish()\n * ),\n * { key: 'items-validation' } // All instances share the same key\n * )\n * ));\n * ```\n */\nexport const useClientValidation = <TData = unknown>(\n data: TData | null | undefined,\n schemaFactory: (data: TData) => VetoTypeAny,\n options?: { key?: string },\n): void => {\n const {\n formState: { touchedFields },\n validation: { setClientValidationSchema },\n trigger,\n } = useFormContext();\n\n // Use provided key or auto-generate unique key\n const autoGeneratedKey = useId();\n const key = options?.key ?? autoGeneratedKey;\n\n // Use data hash instead of object reference to avoid unnecessary re-runs\n // when data object reference changes but data remains the same\n const dataHash = JSON.stringify(data);\n\n // Single effect to manage validation schema lifecycle\n useEffect(() => {\n // Set validation schema when data is available\n if (data != null) {\n const validationSchema = schemaFactory(data);\n setClientValidationSchema(key, validationSchema);\n } else {\n // Clear validation schema when no data\n setClientValidationSchema(key, null);\n }\n\n // Re-validate all touched fields when client validation schema changes\n const touchedFieldNames = Object.keys(touchedFields);\n if (touchedFieldNames.length > 0) {\n // Use setTimeout to ensure the client validation schema update has propagated\n // before triggering re-validation (fixes race condition)\n setTimeout(async () => {\n return trigger(touchedFieldNames);\n }, 1);\n }\n\n // Cleanup on unmount or when dependencies change\n return () => {\n setClientValidationSchema(key, null);\n };\n // Only re-run when data (dataHash) or key changes\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dataHash, key]);\n};\n\n/**\n * Helper function to create a veto looseObject schema for a single field with nested path support.\n *\n * Parses field paths (dot-notation) and creates properly nested loose object schemas with array support.\n * All intermediate objects and arrays are marked as optional to allow partial data structures.\n * Numeric segments in the path are treated as array indices, and the parent field is wrapped in an array schema.\n * Supports flat arrays (arrays of primitives) via the special `__FLAT__` key.\n *\n * **Important:** The fieldSchema should typically use `.nullish()` to allow empty values. This is because:\n * - Base validation (passed to Form) handles \"required\" constraints\n * - Client validation adds dynamic, context-dependent rules (e.g., \"username already exists\")\n * - Form data processing converts empty strings in flat arrays to `null` (not `undefined`)\n * - `.nullish()` accepts both `null` and `undefined`, while `.optional()` only accepts `undefined`\n *\n * This pattern ensures client validation only validates non-empty values, while base validation\n * enforces required fields and basic constraints (min length, format, etc.).\n *\n * @param name - The dot-separated path to the field (e.g., 'username', 'user.profile.email', 'items.0.name', 'tags.0.__FLAT__')\n * @param fieldSchema - The veto validation schema for the field. Should typically use `.nullish()` to allow empty values.\n * @returns A nested loose object schema matching the field path structure with proper type inference\n *\n * @example\n * ```tsx\n * // Typical usage: base validation handles \"required\", client validation adds dynamic rules\n * // Base validation (in Form component)\n * const baseSchema = veto({ username: vt.string({ min: 3 }) }); // Required + min length\n *\n * // Client validation (dynamic check for existing usernames)\n * const { data: userData } = useUserQuery(userId);\n * useClientValidation(userData, (data) =>\n * clientValidationSchemaByName(\n * 'username',\n * vt.string()\n * .refine(\n * (value) => !data.existingUsernames.includes(value),\n * { message: 'Username already taken' }\n * )\n * .nullish() // Allow empty - base validation handles \"required\"\n * )\n * );\n * ```\n *\n * @example\n * ```tsx\n * // Nested field path with dynamic validation\n * clientValidationSchemaByName(\n * 'user.profile.email',\n * vt.string()\n * .refine(\n * (value) => !reservedEmails.includes(value),\n * { message: 'This email is reserved' }\n * )\n * .nullish()\n * )\n * // => objectLoose({ user: objectLoose({ profile: objectLoose({ email: ... }).optional() }).optional() })\n * ```\n *\n * @example\n * ```tsx\n * // Array of objects with dynamic validation\n * clientValidationSchemaByName(\n * 'items.0.tag',\n * vt.string()\n * .refine((value) => !forbiddenTags.includes(value), { message: 'Tag not allowed' })\n * .nullish()\n * )\n * // => objectLoose({ items: array(objectLoose({ tag: ... })).optional() })\n * ```\n *\n * @example\n * ```tsx\n * // Flat array (array of primitives) with dynamic validation\n * clientValidationSchemaByName(\n * 'tags.0.__FLAT__',\n * vt.string()\n * .refine((value) => !forbiddenWords.includes(value), { message: 'Word not allowed' })\n * .nullish()\n * )\n * // => objectLoose({ tags: array(vt.string().refine(...).nullish()).optional() })\n * ```\n */\nexport const clientValidationSchemaByName = <T extends VetoTypeAny>(\n name: string,\n fieldSchema: T,\n) => {\n const segments = name.split('.');\n\n // Build schema from innermost to outermost\n let schema: VetoTypeAny = fieldSchema;\n\n // Process segments in reverse order to build nested structure\n for (let i = segments.length - 1; i >= 0; i -= 1) {\n const segment = segments[i];\n\n const isNumeric = /^\\d+$/.test(segment);\n const isFlatArrayKey = segment === flatArrayKey;\n\n if (isFlatArrayKey) {\n // Skip the __FLAT__ key - it's just a marker for flat arrays\n // The schema is already correct (primitive type), just continue\n // eslint-disable-next-line no-continue\n continue;\n }\n\n if (isNumeric) {\n // Current segment is an array index - wrap current schema in optional array\n schema = array(schema).optional();\n } else {\n // Current segment is a field name - wrap in objectLoose\n // Make it optional if it's an intermediate object (not the root)\n const obj = objectLoose({\n [segment]: schema,\n });\n schema = i > 0 ? obj.optional() : obj;\n }\n }\n\n return schema;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,MAAa,uBACX,MACA,eACA,YACS;CACT,MAAM,EACJ,WAAW,EAAE,iBACb,YAAY,EAAE,6BACd,YACE,gBAAgB;CAGpB,MAAM,mBAAmB,OAAO;CAChC,MAAM,MAAM,SAAS,OAAO;AAO5B,iBAAgB;AAEd,MAAI,QAAQ,KAEV,2BAA0B,KADD,cAAc,KAAK,CACI;MAGhD,2BAA0B,KAAK,KAAK;EAItC,MAAM,oBAAoB,OAAO,KAAK,cAAc;AACpD,MAAI,kBAAkB,SAAS,EAG7B,YAAW,YAAY;AACrB,UAAO,QAAQ,kBAAkB;KAChC,EAAE;AAIP,eAAa;AACX,6BAA0B,KAAK,KAAK;;IAIrC,CA7Bc,KAAK,UAAU,KAAK,EA6BvB,IAAI,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFrB,MAAa,gCACX,MACA,gBACG;CACH,MAAM,WAAW,KAAK,MAAM,IAAI;CAGhC,IAAI,SAAsB;AAG1B,MAAK,IAAI,IAAI,SAAS,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG;EAChD,MAAM,UAAU,SAAS;EAEzB,MAAM,YAAY,QAAQ,KAAK,QAAQ;AAGvC,MAFuB,YAAA,WAMrB;AAGF,MAAI,UAEF,UAAS,MAAM,OAAO,CAAC,UAAU;OAC5B;GAGL,MAAM,MAAM,YAAY,GACrB,UAAU,QACZ,CAAC;AACF,YAAS,IAAI,IAAI,IAAI,UAAU,GAAG;;;AAItC,QAAO"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const require_useFormContext = require(
|
|
1
|
+
require("./FormContext-3GzWxXSS.cjs");
|
|
2
|
+
require("./helpers/index.cjs");
|
|
3
|
+
const require_useFormContext = require("./useFormContext-BQeGmV8j.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
let _fuf_stack_veto = require("@fuf-stack/veto");
|
|
6
|
-
|
|
7
6
|
//#region src/hooks/useClientValidation/useClientValidation.ts
|
|
8
7
|
/**
|
|
9
8
|
* Hook for adding dynamic client-side validation to forms.
|
|
@@ -165,7 +164,7 @@ const clientValidationSchemaByName = (name, fieldSchema) => {
|
|
|
165
164
|
for (let i = segments.length - 1; i >= 0; i -= 1) {
|
|
166
165
|
const segment = segments[i];
|
|
167
166
|
const isNumeric = /^\d+$/.test(segment);
|
|
168
|
-
if (segment ===
|
|
167
|
+
if (segment === "__FLAT__") continue;
|
|
169
168
|
if (isNumeric) schema = (0, _fuf_stack_veto.array)(schema).optional();
|
|
170
169
|
else {
|
|
171
170
|
const obj = (0, _fuf_stack_veto.objectLoose)({ [segment]: schema });
|
|
@@ -174,18 +173,18 @@ const clientValidationSchemaByName = (name, fieldSchema) => {
|
|
|
174
173
|
}
|
|
175
174
|
return schema;
|
|
176
175
|
};
|
|
177
|
-
|
|
178
176
|
//#endregion
|
|
179
|
-
Object.defineProperty(exports,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
177
|
+
Object.defineProperty(exports, "clientValidationSchemaByName", {
|
|
178
|
+
enumerable: true,
|
|
179
|
+
get: function() {
|
|
180
|
+
return clientValidationSchemaByName;
|
|
181
|
+
}
|
|
184
182
|
});
|
|
185
|
-
Object.defineProperty(exports,
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
183
|
+
Object.defineProperty(exports, "useClientValidation", {
|
|
184
|
+
enumerable: true,
|
|
185
|
+
get: function() {
|
|
186
|
+
return useClientValidation;
|
|
187
|
+
}
|
|
190
188
|
});
|
|
191
|
-
|
|
189
|
+
|
|
190
|
+
//# sourceMappingURL=useClientValidation-HqsAYK9K.cjs.map
|