@fuf-stack/uniform 1.19.5 → 1.20.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.d.cts +2 -2
- package/dist/Checkboxes/index.d.ts +2 -2
- package/dist/Checkboxes-D1hppxDE.js.map +1 -1
- package/dist/Checkboxes-DegQ22uN.cjs.map +1 -1
- package/dist/FieldArray/index.d.cts +2 -2
- package/dist/FieldArray/index.d.ts +2 -2
- package/dist/FieldArray-BVlqxHnR.cjs.map +1 -1
- package/dist/FieldArray-CcQ-Re3s.js.map +1 -1
- package/dist/FieldCard/index.d.cts +2 -2
- package/dist/FieldCard/index.d.ts +2 -2
- package/dist/FieldCard-Bkp8PHJw.cjs.map +1 -1
- package/dist/FieldCard-DynQT-O7.js.map +1 -1
- package/dist/FieldCopyTestIdButton-Dpmo0uBV.js.map +1 -1
- package/dist/FieldCopyTestIdButton-DrUzXwTo.cjs.map +1 -1
- package/dist/FieldValidationError-8H8LxDjk.cjs.map +1 -1
- package/dist/FieldValidationError-ktTyyyip.js.map +1 -1
- package/dist/Form/index.d.cts +2 -2
- package/dist/Form/index.d.ts +2 -2
- package/dist/Form-Dqa1b7Y7.cjs.map +1 -1
- package/dist/Form-Wzy7pBVt.js.map +1 -1
- package/dist/{FormContext-BuG3xZFe.d.cts → FormContext-1zBxAjr_.d.cts} +1 -1
- package/dist/FormContext-1zBxAjr_.d.cts.map +1 -0
- package/dist/FormContext-BrY1FQYR.cjs.map +1 -1
- package/dist/FormContext-CLfMWHQM.js.map +1 -1
- package/dist/{FormContext-B4KQxdl7.d.ts → FormContext-DjXw7wN6.d.ts} +1 -1
- package/dist/FormContext-DjXw7wN6.d.ts.map +1 -0
- package/dist/Grid/index.d.cts +2 -2
- package/dist/Grid/index.d.ts +2 -2
- package/dist/Grid-Bzyi97Cx.js.map +1 -1
- package/dist/Grid-DdYQQ_UM.cjs.map +1 -1
- package/dist/Input/index.d.cts +2 -2
- package/dist/Input/index.d.ts +2 -2
- package/dist/Input-BrwUwIYg.cjs.map +1 -1
- package/dist/Input-fZn0x5c3.js.map +1 -1
- package/dist/RadioBoxes/index.d.cts +2 -2
- package/dist/RadioBoxes/index.d.ts +2 -2
- package/dist/RadioBoxes-BR3X986V.js.map +1 -1
- package/dist/RadioBoxes-Cim3InDW.cjs.map +1 -1
- package/dist/RadioTabs/index.d.cts +2 -2
- package/dist/RadioTabs/index.d.ts +2 -2
- package/dist/RadioTabs-CsVqYCE9.js.map +1 -1
- package/dist/RadioTabs-t-x2XnuI.cjs.map +1 -1
- package/dist/Radios/index.d.cts +2 -2
- package/dist/Radios/index.d.ts +2 -2
- package/dist/Radios-CYwW3bZa.js.map +1 -1
- package/dist/Radios-CjEFdyD6.cjs.map +1 -1
- package/dist/Select/index.d.cts +2 -2
- package/dist/Select/index.d.ts +2 -2
- package/dist/Select-BEed8xan.cjs.map +1 -1
- package/dist/Select-BILyyM7Z.js.map +1 -1
- package/dist/Slider/index.d.cts +2 -2
- package/dist/Slider/index.d.ts +2 -2
- package/dist/Slider-CFYP86ku.cjs.map +1 -1
- package/dist/Slider-DxRcLu-j.js.map +1 -1
- package/dist/SubmitButton/index.d.cts +2 -2
- package/dist/SubmitButton/index.d.ts +2 -2
- package/dist/SubmitButton-Bu3NNFyt.js.map +1 -1
- package/dist/SubmitButton-D7xacDyS.cjs.map +1 -1
- package/dist/Switch/index.d.cts +2 -2
- package/dist/Switch/index.d.ts +2 -2
- package/dist/Switch-CMpXZdLc.js.map +1 -1
- package/dist/Switch-Dt9TGQ8d.cjs.map +1 -1
- package/dist/SwitchBox/index.d.cts +2 -2
- package/dist/SwitchBox/index.d.ts +2 -2
- package/dist/SwitchBox-Cg7NPfp_.js.map +1 -1
- package/dist/SwitchBox-DMPp_Ed-.cjs.map +1 -1
- package/dist/TextArea/index.d.cts +2 -2
- package/dist/TextArea/index.d.ts +2 -2
- package/dist/TextArea-BDNtxp9N.cjs.map +1 -1
- package/dist/TextArea-DMMxpDBl.js.map +1 -1
- package/dist/helpers/index.cjs.map +1 -1
- package/dist/helpers/index.d.cts.map +1 -1
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/index.js.map +1 -1
- package/dist/hooks/useClientValidation/index.d.cts +1 -1
- package/dist/hooks/useClientValidation/index.d.ts +1 -1
- package/dist/hooks/useController/index.d.cts +1 -1
- package/dist/hooks/useController/index.d.ts +1 -1
- package/dist/hooks/useFormContext/index.d.cts +1 -1
- package/dist/hooks/useFormContext/index.d.ts +1 -1
- package/dist/hooks/useInput/index.d.cts +1 -1
- package/dist/hooks/useInput/index.d.ts +1 -1
- package/dist/hooks/useInputValueDebounce/index.cjs.map +1 -1
- package/dist/hooks/useInputValueDebounce/index.d.cts +1 -1
- package/dist/hooks/useInputValueDebounce/index.d.ts +1 -1
- package/dist/hooks/useInputValueDebounce/index.js.map +1 -1
- package/dist/hooks/useInputValueTransform/index.d.cts +1 -1
- package/dist/hooks/useInputValueTransform/index.d.ts +1 -1
- package/dist/hooks/useUniformField/index.cjs.map +1 -1
- package/dist/hooks/useUniformField/index.d.cts +1 -1
- package/dist/hooks/useUniformField/index.d.ts +1 -1
- package/dist/hooks/useUniformField/index.js.map +1 -1
- package/dist/hooks/useUniformFieldArray/index.cjs.map +1 -1
- package/dist/hooks/useUniformFieldArray/index.d.cts +1 -1
- package/dist/hooks/useUniformFieldArray/index.d.ts +1 -1
- package/dist/hooks/useUniformFieldArray/index.js.map +1 -1
- package/dist/hooks/useWatchUserChange/index.d.cts +1 -1
- package/dist/hooks/useWatchUserChange/index.d.ts +1 -1
- package/dist/{index-3ZtX9lF3.d.ts → index-3gVUFqgo.d.cts} +4 -6
- package/dist/index-3gVUFqgo.d.cts.map +1 -0
- package/dist/{index-BQtoek59.d.cts → index-5_7F4o-d.d.ts} +20 -22
- package/dist/index-5_7F4o-d.d.ts.map +1 -0
- package/dist/{index-l0W6BMuz.d.cts → index-A88y8cpH.d.cts} +19 -21
- package/dist/index-A88y8cpH.d.cts.map +1 -0
- package/dist/{index-DkZ4lP1l.d.ts → index-A8Jhitar.d.cts} +20 -22
- package/dist/index-A8Jhitar.d.cts.map +1 -0
- package/dist/{index-Dj3NDj0T.d.ts → index-BFpoR6oH.d.ts} +3 -4
- package/dist/index-BFpoR6oH.d.ts.map +1 -0
- package/dist/{index-DFWSHdua.d.ts → index-BIefvGtf.d.ts} +2 -3
- package/dist/index-BIefvGtf.d.ts.map +1 -0
- package/dist/{index-NjKV8LJD.d.cts → index-BeP-RWud.d.cts} +3 -4
- package/dist/index-BeP-RWud.d.cts.map +1 -0
- package/dist/{index-B6WwxkLx2.d.ts → index-BqiVSpJW.d.cts} +2 -4
- package/dist/index-BqiVSpJW.d.cts.map +1 -0
- package/dist/index-C3yAZbR3.d.ts +276 -0
- package/dist/index-C3yAZbR3.d.ts.map +1 -0
- package/dist/{index-zoRnk2AH.d.cts → index-CD9w4hqS.d.cts} +34 -36
- package/dist/index-CD9w4hqS.d.cts.map +1 -0
- package/dist/{index-Cv4ERj3i.d.ts → index-CDcnRyum.d.cts} +2 -3
- package/dist/index-CDcnRyum.d.cts.map +1 -0
- package/dist/{index-DFKoyOlV.d.cts → index-C_3x4Vph.d.cts} +33 -34
- package/dist/index-C_3x4Vph.d.cts.map +1 -0
- package/dist/{index-D9B_5Nxa.d.ts → index-Cj3P2Pmf.d.ts} +19 -21
- package/dist/index-Cj3P2Pmf.d.ts.map +1 -0
- package/dist/{index-B5KHaaJD.d.ts → index-Ck9lrzur.d.cts} +4 -6
- package/dist/index-Ck9lrzur.d.cts.map +1 -0
- package/dist/{index-Dld6NP_K.d.cts → index-CqyMqRhI.d.cts} +2 -3
- package/dist/index-CqyMqRhI.d.cts.map +1 -0
- package/dist/{index-BA6KNK9V.d.cts → index-D-UGVdC1.d.ts} +33 -35
- package/dist/index-D-UGVdC1.d.ts.map +1 -0
- package/dist/{index-DVfzReu6.d.ts → index-D6QbkuWC.d.ts} +33 -34
- package/dist/index-D6QbkuWC.d.ts.map +1 -0
- package/dist/{index-DFQuCtly.d.cts → index-D7qJy705.d.ts} +4 -6
- package/dist/index-D7qJy705.d.ts.map +1 -0
- package/dist/{index-DE_P3FJx.d.ts → index-DRg0anjB.d.cts} +5 -7
- package/dist/index-DRg0anjB.d.cts.map +1 -0
- package/dist/index-DTwIpIWh.d.ts +167 -0
- package/dist/index-DTwIpIWh.d.ts.map +1 -0
- package/dist/{index-Ct5ySLJH.d.cts → index-DdqwwvOD.d.ts} +5 -7
- package/dist/index-DdqwwvOD.d.ts.map +1 -0
- package/dist/{index-417lHgOQ.d.cts → index-DjPJAUOM.d.ts} +4 -6
- package/dist/index-DjPJAUOM.d.ts.map +1 -0
- package/dist/{index-BV1VKQdy.d.cts → index-DqTdG65C.d.ts} +2 -3
- package/dist/index-DqTdG65C.d.ts.map +1 -0
- package/dist/{index-DB_79gfc.d.ts → index-Dz1C3MeK.d.cts} +33 -35
- package/dist/index-Dz1C3MeK.d.cts.map +1 -0
- package/dist/{index-DSEgw9pC.d.ts → index-E28aP0vt.d.cts} +4 -6
- package/dist/index-E28aP0vt.d.cts.map +1 -0
- package/dist/{index-DkiQkdCW.d.cts → index-GP_4Xvec.d.cts} +2 -3
- package/dist/index-GP_4Xvec.d.cts.map +1 -0
- package/dist/{index-DkxqHE_P2.d.ts → index-K42ASvjk2.d.ts} +2 -3
- package/dist/index-K42ASvjk2.d.ts.map +1 -0
- package/dist/index-KbsTT3uf.d.cts +276 -0
- package/dist/index-KbsTT3uf.d.cts.map +1 -0
- package/dist/{index-Bw2N3BfM.d.ts → index-RCXYx5Yp.d.ts} +34 -36
- package/dist/index-RCXYx5Yp.d.ts.map +1 -0
- package/dist/{index-TupkQhBV.d.cts → index-S4bOYm9e.d.ts} +4 -6
- package/dist/index-S4bOYm9e.d.ts.map +1 -0
- package/dist/{index-jCfJAgDc.d.cts → index-ZRXr-4Rb2.d.ts} +2 -4
- package/dist/index-ZRXr-4Rb2.d.ts.map +1 -0
- package/dist/index-eEJp36Ma.d.cts +167 -0
- package/dist/index-eEJp36Ma.d.cts.map +1 -0
- package/dist/{index-CXU4Ol-X.d.ts → index-jIVsGNsl.d.ts} +3 -4
- package/dist/index-jIVsGNsl.d.ts.map +1 -0
- package/dist/{index-KRJ69jvW.d.cts → index-o0UcZG4n.d.cts} +3 -4
- package/dist/index-o0UcZG4n.d.cts.map +1 -0
- package/dist/index.d.cts +27 -27
- package/dist/index.d.ts +27 -27
- package/dist/partials/FieldCopyTestIdButton/index.d.cts +2 -2
- package/dist/partials/FieldCopyTestIdButton/index.d.ts +2 -2
- package/dist/partials/FieldValidationError/index.d.cts +2 -2
- package/dist/partials/FieldValidationError/index.d.ts +2 -2
- package/dist/{useClientValidation-DtnfCE5T.d.cts → useClientValidation-BMzOi3DZ.d.cts} +1 -1
- package/dist/useClientValidation-BMzOi3DZ.d.cts.map +1 -0
- package/dist/{useClientValidation-BWElhQ91.d.ts → useClientValidation-BTbGUViN.d.ts} +1 -1
- package/dist/useClientValidation-BTbGUViN.d.ts.map +1 -0
- package/dist/useClientValidation-Dn_kJkE5.js.map +1 -1
- package/dist/useClientValidation-NKOuXuHV.cjs.map +1 -1
- package/dist/useController-B-6PzFna.js.map +1 -1
- package/dist/{useController-Cc0UNQMm.d.ts → useController-BK2AeY9L.d.ts} +1 -1
- package/dist/useController-BK2AeY9L.d.ts.map +1 -0
- package/dist/useController-DVRh86Zy.cjs.map +1 -1
- package/dist/{useController-CNiqy_2D.d.cts → useController-kxcnnsXy.d.cts} +1 -1
- package/dist/useController-kxcnnsXy.d.cts.map +1 -0
- package/dist/{useFormContext-CHA8GnKp.d.ts → useFormContext-BYnHt6-m.d.ts} +22 -24
- package/dist/useFormContext-BYnHt6-m.d.ts.map +1 -0
- package/dist/useFormContext-Bum4VP1o.cjs.map +1 -1
- package/dist/useFormContext-Bzpyonu6.js.map +1 -1
- package/dist/{useFormContext-C06aufHt.d.cts → useFormContext-JE8dwbCT.d.cts} +22 -24
- package/dist/useFormContext-JE8dwbCT.d.cts.map +1 -0
- package/dist/{useInputValueDebounce-sFOlecIQ.d.ts → useInputValueDebounce-D03GnJO4.d.ts} +1 -1
- package/dist/useInputValueDebounce-D03GnJO4.d.ts.map +1 -0
- package/dist/{useInputValueDebounce-puGRVJ6t.d.cts → useInputValueDebounce-nHt1AHRm.d.cts} +1 -1
- package/dist/useInputValueDebounce-nHt1AHRm.d.cts.map +1 -0
- package/dist/{useInputValueTransform-CdoaxNyD.d.ts → useInputValueTransform-C51LmUxi.d.ts} +1 -1
- package/dist/useInputValueTransform-C51LmUxi.d.ts.map +1 -0
- package/dist/{useInputValueTransform-BwAfw8Xb.d.cts → useInputValueTransform-CNCBU7a9.d.cts} +1 -1
- package/dist/useInputValueTransform-CNCBU7a9.d.cts.map +1 -0
- package/dist/useInputValueTransform-CXdmtc0Q.js.map +1 -1
- package/dist/useInputValueTransform-DKH-7F9D.cjs.map +1 -1
- package/dist/{useUniformField-BTBS1Kv-.d.ts → useUniformField-B3Dj8K5J.d.ts} +5 -5
- package/dist/{useUniformField-BTBS1Kv-.d.ts.map → useUniformField-B3Dj8K5J.d.ts.map} +1 -1
- package/dist/{useUniformField-j22kM31n.d.cts → useUniformField-BWKBsUEX.d.cts} +5 -5
- package/dist/{useUniformField-j22kM31n.d.cts.map → useUniformField-BWKBsUEX.d.cts.map} +1 -1
- package/dist/{useUniformFieldArray-CMHoo4o3.d.ts → useUniformFieldArray-C0U3eBr7.d.ts} +16 -18
- package/dist/useUniformFieldArray-C0U3eBr7.d.ts.map +1 -0
- package/dist/{useUniformFieldArray-CDEagafl.d.cts → useUniformFieldArray-RvOYml8h.d.cts} +16 -18
- package/dist/useUniformFieldArray-RvOYml8h.d.cts.map +1 -0
- package/dist/{useWatchUserChange-CZu_ZZ38.d.cts → useWatchUserChange-26IF7Ikq.d.cts} +1 -1
- package/dist/{useWatchUserChange-CZu_ZZ38.d.cts.map → useWatchUserChange-26IF7Ikq.d.cts.map} +1 -1
- package/dist/{useWatchUserChange-CH4x16_r.d.ts → useWatchUserChange-BjRKMix1.d.ts} +1 -1
- package/dist/{useWatchUserChange-CH4x16_r.d.ts.map → useWatchUserChange-BjRKMix1.d.ts.map} +1 -1
- package/dist/useWatchUserChange-CBuIa5kU.cjs.map +1 -1
- package/dist/useWatchUserChange-CLgLc5W4.js.map +1 -1
- package/package.json +18 -22
- package/dist/FormContext-B4KQxdl7.d.ts.map +0 -1
- package/dist/FormContext-BuG3xZFe.d.cts.map +0 -1
- package/dist/index-1R5A9Hrq.d.ts +0 -70
- package/dist/index-1R5A9Hrq.d.ts.map +0 -1
- package/dist/index-3ZtX9lF3.d.ts.map +0 -1
- package/dist/index-417lHgOQ.d.cts.map +0 -1
- package/dist/index-B5KHaaJD.d.ts.map +0 -1
- package/dist/index-B6WwxkLx2.d.ts.map +0 -1
- package/dist/index-BA6KNK9V.d.cts.map +0 -1
- package/dist/index-BQtoek59.d.cts.map +0 -1
- package/dist/index-BV1VKQdy.d.cts.map +0 -1
- package/dist/index-Bw2N3BfM.d.ts.map +0 -1
- package/dist/index-CXU4Ol-X.d.ts.map +0 -1
- package/dist/index-CXt5eE4O.d.ts +0 -169
- package/dist/index-CXt5eE4O.d.ts.map +0 -1
- package/dist/index-C_MDRbEE.d.cts +0 -169
- package/dist/index-C_MDRbEE.d.cts.map +0 -1
- package/dist/index-CgqESs42.d.cts +0 -70
- package/dist/index-CgqESs42.d.cts.map +0 -1
- package/dist/index-Ct5ySLJH.d.cts.map +0 -1
- package/dist/index-Cv4ERj3i.d.ts.map +0 -1
- package/dist/index-Cx2IEfuR.d.cts +0 -278
- package/dist/index-Cx2IEfuR.d.cts.map +0 -1
- package/dist/index-D9B_5Nxa.d.ts.map +0 -1
- package/dist/index-DB_79gfc.d.ts.map +0 -1
- package/dist/index-DE_P3FJx.d.ts.map +0 -1
- package/dist/index-DFKoyOlV.d.cts.map +0 -1
- package/dist/index-DFQuCtly.d.cts.map +0 -1
- package/dist/index-DFWSHdua.d.ts.map +0 -1
- package/dist/index-DSEgw9pC.d.ts.map +0 -1
- package/dist/index-DVfzReu6.d.ts.map +0 -1
- package/dist/index-Dj3NDj0T.d.ts.map +0 -1
- package/dist/index-DkZ4lP1l.d.ts.map +0 -1
- package/dist/index-DkiQkdCW.d.cts.map +0 -1
- package/dist/index-DkxqHE_P2.d.ts.map +0 -1
- package/dist/index-Dld6NP_K.d.cts.map +0 -1
- package/dist/index-KRJ69jvW.d.cts.map +0 -1
- package/dist/index-NjKV8LJD.d.cts.map +0 -1
- package/dist/index-TupkQhBV.d.cts.map +0 -1
- package/dist/index-jCfJAgDc.d.cts.map +0 -1
- package/dist/index-l0W6BMuz.d.cts.map +0 -1
- package/dist/index-xJz9euVJ.d.ts +0 -278
- package/dist/index-xJz9euVJ.d.ts.map +0 -1
- package/dist/index-zoRnk2AH.d.cts.map +0 -1
- package/dist/useClientValidation-BWElhQ91.d.ts.map +0 -1
- package/dist/useClientValidation-DtnfCE5T.d.cts.map +0 -1
- package/dist/useController-CNiqy_2D.d.cts.map +0 -1
- package/dist/useController-Cc0UNQMm.d.ts.map +0 -1
- package/dist/useFormContext-C06aufHt.d.cts.map +0 -1
- package/dist/useFormContext-CHA8GnKp.d.ts.map +0 -1
- package/dist/useInputValueDebounce-puGRVJ6t.d.cts.map +0 -1
- package/dist/useInputValueDebounce-sFOlecIQ.d.ts.map +0 -1
- package/dist/useInputValueTransform-BwAfw8Xb.d.cts.map +0 -1
- package/dist/useInputValueTransform-CdoaxNyD.d.ts.map +0 -1
- package/dist/useUniformFieldArray-CDEagafl.d.cts.map +0 -1
- package/dist/useUniformFieldArray-CMHoo4o3.d.ts.map +0 -1
- /package/dist/{index--okzibnx.d.ts → index-C2gUMYkE.d.cts} +0 -0
- /package/dist/{index-B2TCFhpj.d.ts → index-CJgP-E0M.d.cts} +0 -0
- /package/dist/{index-BtBZHVmz.d.cts → index-DTU6Hb0g.d.ts} +0 -0
- /package/dist/{index-CI4LJief.d.ts → index-Dw5cCt-A.d.ts} +0 -0
- /package/dist/{index-DeEmP3Jc.d.cts → index-E7Wvm5uX.d.ts} +0 -0
- /package/dist/{index-sQecLSpR.d.cts → index-VmEFGBxN.d.cts} +0 -0
- /package/dist/{useInput-93TCCrkB.d.cts → useInput-8kDcm77k.d.cts} +0 -0
- /package/dist/{useInput-C_fY--wx.d.ts → useInput-Che-4SjF.d.ts} +0 -0
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { n as UserChangeListener, t as DebugModeSettings } from "./FormContext-
|
|
2
|
-
import * as _$react from "react";
|
|
3
|
-
import * as _$react_hook_form0 from "react-hook-form";
|
|
1
|
+
import { n as UserChangeListener, t as DebugModeSettings } from "./FormContext-DjXw7wN6.js";
|
|
4
2
|
import { FieldError, FieldValues, Path } from "react-hook-form";
|
|
5
|
-
import * as _$_fuf_stack_veto0 from "@fuf-stack/veto";
|
|
6
3
|
import { VetoFormattedError, VetoInstance } from "@fuf-stack/veto";
|
|
7
4
|
|
|
8
5
|
//#region src/hooks/useFormContext/useFormContext.d.ts
|
|
@@ -19,7 +16,7 @@ declare const checkFieldIsRequired: (validation: VetoInstance, path: string[]) =
|
|
|
19
16
|
* - Filters out empty/null values
|
|
20
17
|
*/
|
|
21
18
|
declare const useFormContext$1: <TFieldValues extends FieldValues = FieldValues, TContext = any, TTransformedValues = TFieldValues>() => {
|
|
22
|
-
formState:
|
|
19
|
+
formState: import("react-hook-form").FormState<TFieldValues>;
|
|
23
20
|
getFieldState: (name: Path<TFieldValues>, testId?: string) => {
|
|
24
21
|
error: FieldError[] | undefined;
|
|
25
22
|
invalid: boolean;
|
|
@@ -29,14 +26,14 @@ declare const useFormContext$1: <TFieldValues extends FieldValues = FieldValues,
|
|
|
29
26
|
isTouched: boolean;
|
|
30
27
|
isValidating: boolean;
|
|
31
28
|
};
|
|
32
|
-
getValues:
|
|
33
|
-
subscribe:
|
|
34
|
-
watch:
|
|
35
|
-
debugMode: "
|
|
29
|
+
getValues: import("react-hook-form").UseFormGetValues<TFieldValues>;
|
|
30
|
+
subscribe: import("react-hook-form").UseFormSubscribe<TFieldValues>;
|
|
31
|
+
watch: import("react-hook-form").UseFormWatch<TFieldValues>;
|
|
32
|
+
debugMode: "disabled" | "debug" | "debug-testids" | "off";
|
|
36
33
|
debugModeSettings?: DebugModeSettings;
|
|
37
34
|
preventSubmit: (prevent: boolean) => void;
|
|
38
|
-
setDebugMode: (debugMode: "
|
|
39
|
-
triggerSubmit: (e?:
|
|
35
|
+
setDebugMode: (debugMode: "disabled" | "debug" | "debug-testids" | "off") => void;
|
|
36
|
+
triggerSubmit: (e?: import("react").BaseSyntheticEvent) => Promise<void> | void;
|
|
40
37
|
userChange: {
|
|
41
38
|
subscribe: (listener: UserChangeListener) => () => void;
|
|
42
39
|
notify: (fieldName: string, value: unknown) => void;
|
|
@@ -45,20 +42,21 @@ declare const useFormContext$1: <TFieldValues extends FieldValues = FieldValues,
|
|
|
45
42
|
baseInstance?: VetoInstance;
|
|
46
43
|
instance?: VetoInstance;
|
|
47
44
|
errors?: VetoFormattedError;
|
|
48
|
-
setClientValidationSchema: (key: string, schema:
|
|
45
|
+
setClientValidationSchema: (key: string, schema: import("@fuf-stack/veto").VetoTypeAny | null) => void;
|
|
49
46
|
};
|
|
50
|
-
setError:
|
|
51
|
-
clearErrors:
|
|
52
|
-
setValue:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
47
|
+
setError: import("react-hook-form").UseFormSetError<TFieldValues>;
|
|
48
|
+
clearErrors: import("react-hook-form").UseFormClearErrors<TFieldValues>;
|
|
49
|
+
setValue: import("react-hook-form").UseFormSetValue<TFieldValues>;
|
|
50
|
+
setValues: import("react-hook-form").UseFormSetValues<TFieldValues>;
|
|
51
|
+
trigger: import("react-hook-form").UseFormTrigger<TFieldValues>;
|
|
52
|
+
resetField: import("react-hook-form").UseFormResetField<TFieldValues>;
|
|
53
|
+
reset: import("react-hook-form").UseFormReset<TFieldValues>;
|
|
54
|
+
handleSubmit: import("react-hook-form").UseFormHandleSubmit<TFieldValues, TTransformedValues>;
|
|
55
|
+
unregister: import("react-hook-form").UseFormUnregister<TFieldValues>;
|
|
56
|
+
control: import("react-hook-form").Control<TFieldValues, TContext, TTransformedValues>;
|
|
57
|
+
register: import("react-hook-form").UseFormRegister<TFieldValues>;
|
|
58
|
+
setFocus: import("react-hook-form").UseFormSetFocus<TFieldValues>;
|
|
61
59
|
};
|
|
62
60
|
//#endregion
|
|
63
61
|
export { useFormContext$1 as n, checkFieldIsRequired as t };
|
|
64
|
-
//# sourceMappingURL=useFormContext-
|
|
62
|
+
//# sourceMappingURL=useFormContext-BYnHt6-m.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormContext-BYnHt6-m.d.ts","names":[],"sources":["../src/hooks/useFormContext/useFormContext.ts"],"mappings":";;;;;;cAYa,oBAAA,GACX,UAAA,EAAY,YAAY,EACxB,IAAA;;AAFF;;;;;;;;AAEgB;cAmEH,gBAAA,wBACU,WAAA,GAAc,WAAA,uCAEd,YAAA;;wBAwBQ,IAAA,CAAK,YAAA,GAAa,MAAA;;;;;;;;;;;;;;;;sCAWf,kBAAA,KAAA,OAAA;;0BAAA,kBAAA;;;;mBAwB/B,YAAA;eAEoB,YAAA;aAAwE,kBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormContext-Bum4VP1o.cjs","names":["flatArrayKey","UniformContext","nameToTestId","toValidationFormat"],"sources":["../src/hooks/useFormContext/useFormContext.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { VetoFormattedError, VetoInstance } from '@fuf-stack/veto';\nimport type { FieldError, FieldValues, Path } from 'react-hook-form';\n\nimport { useContext } from 'react';\nimport { useFormContext as useHookFormContext } from 'react-hook-form';\n\nimport { UniformContext } from '../../Form/subcomponents/FormContext';\nimport { flatArrayKey, nameToTestId, toValidationFormat } from '../../helpers';\n\n/** Schema check whether a field is required or optional */\nexport const checkFieldIsRequired = (\n validation: VetoInstance,\n path: string[],\n): boolean => {\n // Handle flat array paths: strip the flatArrayKey to check the array element schema\n // e.g., ['arrayField', '0', '__FLAT__'] -> check schema at ['arrayField', '0']\n const checkPath =\n path[path.length - 1] === flatArrayKey ? path.slice(0, -1) : path;\n\n const checkRequired = (schema: any) => {\n // arrays ...\n if (schema.type === 'array') {\n // ... if array is optional or nullable it is not required\n if (schema.isOptional || schema.isNullable) {\n return false;\n }\n // ... otherwise arrays are required (display logic wise -> no asterisk in the label)\n return true;\n }\n\n // all other fields are required if they are\n // not optional and not nullable\n return !schema.isOptional && !schema.isNullable;\n };\n\n return validation.checkSchemaPath(checkRequired, checkPath);\n};\n\n/**\n * Resolve validation errors for a given field path.\n *\n * Traverses a nested `VetoFormattedError` structure using a dotted path\n * (for example: \"user.address.0.street\") and returns the matching\n * `FieldError[]` if present. If no error exists at the path, returns\n * `undefined`.\n *\n * @param errors - The formatted validation errors from Uniform's context\n * @param name - The dotted field path to resolve\n * @returns An array of `FieldError` entries for the field, or `undefined`\n */\nconst getValidationErrorsByName = (\n errors: VetoFormattedError,\n name: string,\n) => {\n // Traverse nested error structure; ignore flat array wrapper key\n const keys = name.split('.').filter((k) => {\n return k !== flatArrayKey;\n });\n let current: unknown = errors as unknown;\n keys.forEach((key) => {\n if (current && typeof current === 'object') {\n current = (current as Record<string, unknown>)[key];\n } else {\n current = undefined;\n }\n });\n return current as FieldError[] | undefined;\n};\n\n/**\n * Custom hook that extends react-hook-form's useFormContext to add validation and state management.\n *\n * Key features:\n * - Enhanced `getFieldState` that includes validation schema-based \"required\" status and testId generation\n * - Automatic conversion of form values via `getValues`, `watch`, and `subscribe`:\n * - Unwraps flat array wrappers (`{ __FLAT__: value }` → `value`)\n * - Converts nullish string markers (`__NULL__` → `null`, `__FALSE__` → `false`, `__ZERO__` → `0`)\n * - Filters out empty/null values\n */\nexport const useFormContext = <\n TFieldValues extends FieldValues = FieldValues,\n TContext = any,\n TTransformedValues = TFieldValues,\n>() => {\n const {\n formState,\n // some methods that will be enhanced below\n getFieldState: getFieldStateOrig,\n getValues: getValuesOrig,\n watch: watchOrig,\n subscribe: subscribeOrig,\n // the rest of the methods pass through unchanged\n ...otherMethods\n } = useHookFormContext<TFieldValues, TContext, TTransformedValues>();\n\n const uniformContext = useContext(UniformContext);\n\n /**\n * Updated getFieldState method which returns:\n * - Whether the field is required by checking the validation schema\n * - Existing field state information (errors, etc.)\n * - A testId generated from the field name (with flat array keys removed and slugified)\n *\n * @param name - The field path (string or array)\n * @param testId - Optional explicit testId. If provided, will be slugified. If not provided, generated from name.\n */\n const getFieldState = (name: Path<TFieldValues>, testId?: string) => {\n const fieldPath =\n typeof name === 'string' ? name.replace(/\\[\\d+\\]/g, '').split('.') : name;\n\n // Use base validation instance for checking \"required\" status\n // Client validation often uses .nullish() which would incorrectly mark fields as optional\n const validationInstance =\n uniformContext?.validation.baseInstance ??\n uniformContext?.validation.instance;\n\n // Check if the field is required using the validation schema\n const required = validationInstance\n ? checkFieldIsRequired(validationInstance, fieldPath)\n : false;\n\n const error = getValidationErrorsByName(\n uniformContext?.validation.errors ?? {},\n name,\n ) as unknown as FieldError[] | undefined;\n\n // Get everything but the error from the original field state\n const fieldState = getFieldStateOrig(name, formState);\n\n return {\n ...fieldState,\n error,\n invalid: !!error,\n required,\n testId: nameToTestId(testId ?? name),\n };\n };\n\n /**\n * Wrap form value accessor methods to automatically convert from internal storage format\n * to component-friendly format:\n *\n * - Unwrap flat array wrappers: `{ __FLAT__: value }` → `value`\n * - Convert nullish string markers: `__NULL__` → `null`, `__FALSE__` → `false`, `__ZERO__` → `0`\n * - Filter out empty/null values: fields with converted null/empty values are removed entirely\n *\n * This ensures components receive clean, predictable data without needing to handle\n * the internal nullish string conversion system or flat array wrapping manually.\n */\n const getValues = ((...args: any[]) => {\n const result = (getValuesOrig as any)(...args);\n return toValidationFormat(result);\n }) as typeof getValuesOrig;\n\n const watch = ((...args: any[]) => {\n const result = (watchOrig as any)(...args);\n return toValidationFormat(result);\n }) as typeof watchOrig;\n\n const subscribe = ((...args: any[]) => {\n // For subscribe, we need to wrap the callback to convert the values property\n const [options] = args;\n if (options?.callback) {\n const originalCallback = options.callback;\n const wrappedOptions = {\n ...options,\n callback: (subscribeFormState: any) => {\n // Convert the values property if it exists\n const convertedFormState = {\n ...subscribeFormState,\n ...(subscribeFormState.values && {\n values: toValidationFormat(subscribeFormState.values),\n }),\n };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return originalCallback(convertedFormState);\n },\n };\n return subscribeOrig(wrappedOptions);\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return (subscribeOrig as any)(...args);\n }) as typeof subscribeOrig;\n\n return {\n ...otherMethods,\n ...uniformContext,\n formState,\n getFieldState,\n getValues,\n subscribe,\n watch,\n };\n};\n"],"mappings":";;;;;;AAYA,MAAa,wBACX,YACA,SACY;CAGZ,MAAM,YACJ,KAAK,KAAK,SAAS,OAAA,aAAsB,KAAK,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"useFormContext-Bum4VP1o.cjs","names":["flatArrayKey","UniformContext","nameToTestId","toValidationFormat"],"sources":["../src/hooks/useFormContext/useFormContext.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { VetoFormattedError, VetoInstance } from '@fuf-stack/veto';\nimport type { FieldError, FieldValues, Path } from 'react-hook-form';\n\nimport { useContext } from 'react';\nimport { useFormContext as useHookFormContext } from 'react-hook-form';\n\nimport { UniformContext } from '../../Form/subcomponents/FormContext';\nimport { flatArrayKey, nameToTestId, toValidationFormat } from '../../helpers';\n\n/** Schema check whether a field is required or optional */\nexport const checkFieldIsRequired = (\n validation: VetoInstance,\n path: string[],\n): boolean => {\n // Handle flat array paths: strip the flatArrayKey to check the array element schema\n // e.g., ['arrayField', '0', '__FLAT__'] -> check schema at ['arrayField', '0']\n const checkPath =\n path[path.length - 1] === flatArrayKey ? path.slice(0, -1) : path;\n\n const checkRequired = (schema: any) => {\n // arrays ...\n if (schema.type === 'array') {\n // ... if array is optional or nullable it is not required\n if (schema.isOptional || schema.isNullable) {\n return false;\n }\n // ... otherwise arrays are required (display logic wise -> no asterisk in the label)\n return true;\n }\n\n // all other fields are required if they are\n // not optional and not nullable\n return !schema.isOptional && !schema.isNullable;\n };\n\n return validation.checkSchemaPath(checkRequired, checkPath);\n};\n\n/**\n * Resolve validation errors for a given field path.\n *\n * Traverses a nested `VetoFormattedError` structure using a dotted path\n * (for example: \"user.address.0.street\") and returns the matching\n * `FieldError[]` if present. If no error exists at the path, returns\n * `undefined`.\n *\n * @param errors - The formatted validation errors from Uniform's context\n * @param name - The dotted field path to resolve\n * @returns An array of `FieldError` entries for the field, or `undefined`\n */\nconst getValidationErrorsByName = (\n errors: VetoFormattedError,\n name: string,\n) => {\n // Traverse nested error structure; ignore flat array wrapper key\n const keys = name.split('.').filter((k) => {\n return k !== flatArrayKey;\n });\n let current: unknown = errors as unknown;\n keys.forEach((key) => {\n if (current && typeof current === 'object') {\n current = (current as Record<string, unknown>)[key];\n } else {\n current = undefined;\n }\n });\n return current as FieldError[] | undefined;\n};\n\n/**\n * Custom hook that extends react-hook-form's useFormContext to add validation and state management.\n *\n * Key features:\n * - Enhanced `getFieldState` that includes validation schema-based \"required\" status and testId generation\n * - Automatic conversion of form values via `getValues`, `watch`, and `subscribe`:\n * - Unwraps flat array wrappers (`{ __FLAT__: value }` → `value`)\n * - Converts nullish string markers (`__NULL__` → `null`, `__FALSE__` → `false`, `__ZERO__` → `0`)\n * - Filters out empty/null values\n */\nexport const useFormContext = <\n TFieldValues extends FieldValues = FieldValues,\n TContext = any,\n TTransformedValues = TFieldValues,\n>() => {\n const {\n formState,\n // some methods that will be enhanced below\n getFieldState: getFieldStateOrig,\n getValues: getValuesOrig,\n watch: watchOrig,\n subscribe: subscribeOrig,\n // the rest of the methods pass through unchanged\n ...otherMethods\n } = useHookFormContext<TFieldValues, TContext, TTransformedValues>();\n\n const uniformContext = useContext(UniformContext);\n\n /**\n * Updated getFieldState method which returns:\n * - Whether the field is required by checking the validation schema\n * - Existing field state information (errors, etc.)\n * - A testId generated from the field name (with flat array keys removed and slugified)\n *\n * @param name - The field path (string or array)\n * @param testId - Optional explicit testId. If provided, will be slugified. If not provided, generated from name.\n */\n const getFieldState = (name: Path<TFieldValues>, testId?: string) => {\n const fieldPath =\n typeof name === 'string' ? name.replace(/\\[\\d+\\]/g, '').split('.') : name;\n\n // Use base validation instance for checking \"required\" status\n // Client validation often uses .nullish() which would incorrectly mark fields as optional\n const validationInstance =\n uniformContext?.validation.baseInstance ??\n uniformContext?.validation.instance;\n\n // Check if the field is required using the validation schema\n const required = validationInstance\n ? checkFieldIsRequired(validationInstance, fieldPath)\n : false;\n\n const error = getValidationErrorsByName(\n uniformContext?.validation.errors ?? {},\n name,\n ) as unknown as FieldError[] | undefined;\n\n // Get everything but the error from the original field state\n const fieldState = getFieldStateOrig(name, formState);\n\n return {\n ...fieldState,\n error,\n invalid: !!error,\n required,\n testId: nameToTestId(testId ?? name),\n };\n };\n\n /**\n * Wrap form value accessor methods to automatically convert from internal storage format\n * to component-friendly format:\n *\n * - Unwrap flat array wrappers: `{ __FLAT__: value }` → `value`\n * - Convert nullish string markers: `__NULL__` → `null`, `__FALSE__` → `false`, `__ZERO__` → `0`\n * - Filter out empty/null values: fields with converted null/empty values are removed entirely\n *\n * This ensures components receive clean, predictable data without needing to handle\n * the internal nullish string conversion system or flat array wrapping manually.\n */\n const getValues = ((...args: any[]) => {\n const result = (getValuesOrig as any)(...args);\n return toValidationFormat(result);\n }) as typeof getValuesOrig;\n\n const watch = ((...args: any[]) => {\n const result = (watchOrig as any)(...args);\n return toValidationFormat(result);\n }) as typeof watchOrig;\n\n const subscribe = ((...args: any[]) => {\n // For subscribe, we need to wrap the callback to convert the values property\n const [options] = args;\n if (options?.callback) {\n const originalCallback = options.callback;\n const wrappedOptions = {\n ...options,\n callback: (subscribeFormState: any) => {\n // Convert the values property if it exists\n const convertedFormState = {\n ...subscribeFormState,\n ...(subscribeFormState.values && {\n values: toValidationFormat(subscribeFormState.values),\n }),\n };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return originalCallback(convertedFormState);\n },\n };\n return subscribeOrig(wrappedOptions);\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return (subscribeOrig as any)(...args);\n }) as typeof subscribeOrig;\n\n return {\n ...otherMethods,\n ...uniformContext,\n formState,\n getFieldState,\n getValues,\n subscribe,\n watch,\n };\n};\n"],"mappings":";;;;;;AAYA,MAAa,wBACX,YACA,SACY;CAGZ,MAAM,YACJ,KAAK,KAAK,SAAS,OAAA,aAAsB,KAAK,MAAM,GAAG,EAAE,IAAI;CAE/D,MAAM,iBAAiB,WAAgB;EAErC,IAAI,OAAO,SAAS,SAAS;GAE3B,IAAI,OAAO,cAAc,OAAO,YAC9B,OAAO;GAGT,OAAO;EACT;EAIA,OAAO,CAAC,OAAO,cAAc,CAAC,OAAO;CACvC;CAEA,OAAO,WAAW,gBAAgB,eAAe,SAAS;AAC5D;;;;;;;;;;;;;AAcA,MAAM,6BACJ,QACA,SACG;CAEH,MAAM,OAAO,KAAK,MAAM,GAAG,EAAE,QAAQ,MAAM;EACzC,OAAO,MAAMA,sBAAAA;CACf,CAAC;CACD,IAAI,UAAmB;CACvB,KAAK,SAAS,QAAQ;EACpB,IAAI,WAAW,OAAO,YAAY,UAChC,UAAW,QAAoC;OAE/C,UAAU,KAAA;CAEd,CAAC;CACD,OAAO;AACT;;;;;;;;;;;AAYA,MAAa,uBAIN;CACL,MAAM,EACJ,WAEA,eAAe,mBACf,WAAW,eACX,OAAO,WACP,WAAW,eAEX,GAAG,kBAAA,GAAA,gBAAA,gBAC8D;CAEnE,MAAM,kBAAA,GAAA,MAAA,YAA4BC,oBAAAA,cAAc;;;;;;;;;;CAWhD,MAAM,iBAAiB,MAA0B,WAAoB;EACnE,MAAM,YACJ,OAAO,SAAS,WAAW,KAAK,QAAQ,YAAY,EAAE,EAAE,MAAM,GAAG,IAAI;EAIvE,MAAM,qBACJ,gBAAgB,WAAW,gBAC3B,gBAAgB,WAAW;EAG7B,MAAM,WAAW,qBACb,qBAAqB,oBAAoB,SAAS,IAClD;EAEJ,MAAM,QAAQ,0BACZ,gBAAgB,WAAW,UAAU,CAAC,GACtC,IACF;EAKA,OAAO;GACL,GAHiB,kBAAkB,MAAM,SAG7B;GACZ;GACA,SAAS,CAAC,CAAC;GACX;GACA,QAAQC,sBAAAA,aAAa,UAAU,IAAI;EACrC;CACF;;;;;;;;;;;;CAaA,MAAM,cAAc,GAAG,SAAgB;EAErC,OAAOC,sBAAAA,mBADS,cAAsB,GAAG,IACV,CAAC;CAClC;CAEA,MAAM,UAAU,GAAG,SAAgB;EAEjC,OAAOA,sBAAAA,mBADS,UAAkB,GAAG,IACN,CAAC;CAClC;CAEA,MAAM,cAAc,GAAG,SAAgB;EAErC,MAAM,CAAC,WAAW;EAClB,IAAI,SAAS,UAAU;GACrB,MAAM,mBAAmB,QAAQ;GAejC,OAAO,cAAc;IAbnB,GAAG;IACH,WAAW,uBAA4B;KASrC,OAAO,iBAAiB;MANtB,GAAG;MACH,GAAI,mBAAmB,UAAU,EAC/B,QAAQA,sBAAAA,mBAAmB,mBAAmB,MAAM,EACtD;KAGuC,CAAC;IAC5C;GAEgC,CAAC;EACrC;EAEA,OAAQ,cAAsB,GAAG,IAAI;CACvC;CAEA,OAAO;EACL,GAAG;EACH,GAAG;EACH;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFormContext-Bzpyonu6.js","names":["useFormContext","useHookFormContext"],"sources":["../src/hooks/useFormContext/useFormContext.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { VetoFormattedError, VetoInstance } from '@fuf-stack/veto';\nimport type { FieldError, FieldValues, Path } from 'react-hook-form';\n\nimport { useContext } from 'react';\nimport { useFormContext as useHookFormContext } from 'react-hook-form';\n\nimport { UniformContext } from '../../Form/subcomponents/FormContext';\nimport { flatArrayKey, nameToTestId, toValidationFormat } from '../../helpers';\n\n/** Schema check whether a field is required or optional */\nexport const checkFieldIsRequired = (\n validation: VetoInstance,\n path: string[],\n): boolean => {\n // Handle flat array paths: strip the flatArrayKey to check the array element schema\n // e.g., ['arrayField', '0', '__FLAT__'] -> check schema at ['arrayField', '0']\n const checkPath =\n path[path.length - 1] === flatArrayKey ? path.slice(0, -1) : path;\n\n const checkRequired = (schema: any) => {\n // arrays ...\n if (schema.type === 'array') {\n // ... if array is optional or nullable it is not required\n if (schema.isOptional || schema.isNullable) {\n return false;\n }\n // ... otherwise arrays are required (display logic wise -> no asterisk in the label)\n return true;\n }\n\n // all other fields are required if they are\n // not optional and not nullable\n return !schema.isOptional && !schema.isNullable;\n };\n\n return validation.checkSchemaPath(checkRequired, checkPath);\n};\n\n/**\n * Resolve validation errors for a given field path.\n *\n * Traverses a nested `VetoFormattedError` structure using a dotted path\n * (for example: \"user.address.0.street\") and returns the matching\n * `FieldError[]` if present. If no error exists at the path, returns\n * `undefined`.\n *\n * @param errors - The formatted validation errors from Uniform's context\n * @param name - The dotted field path to resolve\n * @returns An array of `FieldError` entries for the field, or `undefined`\n */\nconst getValidationErrorsByName = (\n errors: VetoFormattedError,\n name: string,\n) => {\n // Traverse nested error structure; ignore flat array wrapper key\n const keys = name.split('.').filter((k) => {\n return k !== flatArrayKey;\n });\n let current: unknown = errors as unknown;\n keys.forEach((key) => {\n if (current && typeof current === 'object') {\n current = (current as Record<string, unknown>)[key];\n } else {\n current = undefined;\n }\n });\n return current as FieldError[] | undefined;\n};\n\n/**\n * Custom hook that extends react-hook-form's useFormContext to add validation and state management.\n *\n * Key features:\n * - Enhanced `getFieldState` that includes validation schema-based \"required\" status and testId generation\n * - Automatic conversion of form values via `getValues`, `watch`, and `subscribe`:\n * - Unwraps flat array wrappers (`{ __FLAT__: value }` → `value`)\n * - Converts nullish string markers (`__NULL__` → `null`, `__FALSE__` → `false`, `__ZERO__` → `0`)\n * - Filters out empty/null values\n */\nexport const useFormContext = <\n TFieldValues extends FieldValues = FieldValues,\n TContext = any,\n TTransformedValues = TFieldValues,\n>() => {\n const {\n formState,\n // some methods that will be enhanced below\n getFieldState: getFieldStateOrig,\n getValues: getValuesOrig,\n watch: watchOrig,\n subscribe: subscribeOrig,\n // the rest of the methods pass through unchanged\n ...otherMethods\n } = useHookFormContext<TFieldValues, TContext, TTransformedValues>();\n\n const uniformContext = useContext(UniformContext);\n\n /**\n * Updated getFieldState method which returns:\n * - Whether the field is required by checking the validation schema\n * - Existing field state information (errors, etc.)\n * - A testId generated from the field name (with flat array keys removed and slugified)\n *\n * @param name - The field path (string or array)\n * @param testId - Optional explicit testId. If provided, will be slugified. If not provided, generated from name.\n */\n const getFieldState = (name: Path<TFieldValues>, testId?: string) => {\n const fieldPath =\n typeof name === 'string' ? name.replace(/\\[\\d+\\]/g, '').split('.') : name;\n\n // Use base validation instance for checking \"required\" status\n // Client validation often uses .nullish() which would incorrectly mark fields as optional\n const validationInstance =\n uniformContext?.validation.baseInstance ??\n uniformContext?.validation.instance;\n\n // Check if the field is required using the validation schema\n const required = validationInstance\n ? checkFieldIsRequired(validationInstance, fieldPath)\n : false;\n\n const error = getValidationErrorsByName(\n uniformContext?.validation.errors ?? {},\n name,\n ) as unknown as FieldError[] | undefined;\n\n // Get everything but the error from the original field state\n const fieldState = getFieldStateOrig(name, formState);\n\n return {\n ...fieldState,\n error,\n invalid: !!error,\n required,\n testId: nameToTestId(testId ?? name),\n };\n };\n\n /**\n * Wrap form value accessor methods to automatically convert from internal storage format\n * to component-friendly format:\n *\n * - Unwrap flat array wrappers: `{ __FLAT__: value }` → `value`\n * - Convert nullish string markers: `__NULL__` → `null`, `__FALSE__` → `false`, `__ZERO__` → `0`\n * - Filter out empty/null values: fields with converted null/empty values are removed entirely\n *\n * This ensures components receive clean, predictable data without needing to handle\n * the internal nullish string conversion system or flat array wrapping manually.\n */\n const getValues = ((...args: any[]) => {\n const result = (getValuesOrig as any)(...args);\n return toValidationFormat(result);\n }) as typeof getValuesOrig;\n\n const watch = ((...args: any[]) => {\n const result = (watchOrig as any)(...args);\n return toValidationFormat(result);\n }) as typeof watchOrig;\n\n const subscribe = ((...args: any[]) => {\n // For subscribe, we need to wrap the callback to convert the values property\n const [options] = args;\n if (options?.callback) {\n const originalCallback = options.callback;\n const wrappedOptions = {\n ...options,\n callback: (subscribeFormState: any) => {\n // Convert the values property if it exists\n const convertedFormState = {\n ...subscribeFormState,\n ...(subscribeFormState.values && {\n values: toValidationFormat(subscribeFormState.values),\n }),\n };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return originalCallback(convertedFormState);\n },\n };\n return subscribeOrig(wrappedOptions);\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return (subscribeOrig as any)(...args);\n }) as typeof subscribeOrig;\n\n return {\n ...otherMethods,\n ...uniformContext,\n formState,\n getFieldState,\n getValues,\n subscribe,\n watch,\n };\n};\n"],"mappings":";;;;;;AAYA,MAAa,wBACX,YACA,SACY;CAGZ,MAAM,YACJ,KAAK,KAAK,SAAS,OAAA,aAAsB,KAAK,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"useFormContext-Bzpyonu6.js","names":["useFormContext","useHookFormContext"],"sources":["../src/hooks/useFormContext/useFormContext.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type { VetoFormattedError, VetoInstance } from '@fuf-stack/veto';\nimport type { FieldError, FieldValues, Path } from 'react-hook-form';\n\nimport { useContext } from 'react';\nimport { useFormContext as useHookFormContext } from 'react-hook-form';\n\nimport { UniformContext } from '../../Form/subcomponents/FormContext';\nimport { flatArrayKey, nameToTestId, toValidationFormat } from '../../helpers';\n\n/** Schema check whether a field is required or optional */\nexport const checkFieldIsRequired = (\n validation: VetoInstance,\n path: string[],\n): boolean => {\n // Handle flat array paths: strip the flatArrayKey to check the array element schema\n // e.g., ['arrayField', '0', '__FLAT__'] -> check schema at ['arrayField', '0']\n const checkPath =\n path[path.length - 1] === flatArrayKey ? path.slice(0, -1) : path;\n\n const checkRequired = (schema: any) => {\n // arrays ...\n if (schema.type === 'array') {\n // ... if array is optional or nullable it is not required\n if (schema.isOptional || schema.isNullable) {\n return false;\n }\n // ... otherwise arrays are required (display logic wise -> no asterisk in the label)\n return true;\n }\n\n // all other fields are required if they are\n // not optional and not nullable\n return !schema.isOptional && !schema.isNullable;\n };\n\n return validation.checkSchemaPath(checkRequired, checkPath);\n};\n\n/**\n * Resolve validation errors for a given field path.\n *\n * Traverses a nested `VetoFormattedError` structure using a dotted path\n * (for example: \"user.address.0.street\") and returns the matching\n * `FieldError[]` if present. If no error exists at the path, returns\n * `undefined`.\n *\n * @param errors - The formatted validation errors from Uniform's context\n * @param name - The dotted field path to resolve\n * @returns An array of `FieldError` entries for the field, or `undefined`\n */\nconst getValidationErrorsByName = (\n errors: VetoFormattedError,\n name: string,\n) => {\n // Traverse nested error structure; ignore flat array wrapper key\n const keys = name.split('.').filter((k) => {\n return k !== flatArrayKey;\n });\n let current: unknown = errors as unknown;\n keys.forEach((key) => {\n if (current && typeof current === 'object') {\n current = (current as Record<string, unknown>)[key];\n } else {\n current = undefined;\n }\n });\n return current as FieldError[] | undefined;\n};\n\n/**\n * Custom hook that extends react-hook-form's useFormContext to add validation and state management.\n *\n * Key features:\n * - Enhanced `getFieldState` that includes validation schema-based \"required\" status and testId generation\n * - Automatic conversion of form values via `getValues`, `watch`, and `subscribe`:\n * - Unwraps flat array wrappers (`{ __FLAT__: value }` → `value`)\n * - Converts nullish string markers (`__NULL__` → `null`, `__FALSE__` → `false`, `__ZERO__` → `0`)\n * - Filters out empty/null values\n */\nexport const useFormContext = <\n TFieldValues extends FieldValues = FieldValues,\n TContext = any,\n TTransformedValues = TFieldValues,\n>() => {\n const {\n formState,\n // some methods that will be enhanced below\n getFieldState: getFieldStateOrig,\n getValues: getValuesOrig,\n watch: watchOrig,\n subscribe: subscribeOrig,\n // the rest of the methods pass through unchanged\n ...otherMethods\n } = useHookFormContext<TFieldValues, TContext, TTransformedValues>();\n\n const uniformContext = useContext(UniformContext);\n\n /**\n * Updated getFieldState method which returns:\n * - Whether the field is required by checking the validation schema\n * - Existing field state information (errors, etc.)\n * - A testId generated from the field name (with flat array keys removed and slugified)\n *\n * @param name - The field path (string or array)\n * @param testId - Optional explicit testId. If provided, will be slugified. If not provided, generated from name.\n */\n const getFieldState = (name: Path<TFieldValues>, testId?: string) => {\n const fieldPath =\n typeof name === 'string' ? name.replace(/\\[\\d+\\]/g, '').split('.') : name;\n\n // Use base validation instance for checking \"required\" status\n // Client validation often uses .nullish() which would incorrectly mark fields as optional\n const validationInstance =\n uniformContext?.validation.baseInstance ??\n uniformContext?.validation.instance;\n\n // Check if the field is required using the validation schema\n const required = validationInstance\n ? checkFieldIsRequired(validationInstance, fieldPath)\n : false;\n\n const error = getValidationErrorsByName(\n uniformContext?.validation.errors ?? {},\n name,\n ) as unknown as FieldError[] | undefined;\n\n // Get everything but the error from the original field state\n const fieldState = getFieldStateOrig(name, formState);\n\n return {\n ...fieldState,\n error,\n invalid: !!error,\n required,\n testId: nameToTestId(testId ?? name),\n };\n };\n\n /**\n * Wrap form value accessor methods to automatically convert from internal storage format\n * to component-friendly format:\n *\n * - Unwrap flat array wrappers: `{ __FLAT__: value }` → `value`\n * - Convert nullish string markers: `__NULL__` → `null`, `__FALSE__` → `false`, `__ZERO__` → `0`\n * - Filter out empty/null values: fields with converted null/empty values are removed entirely\n *\n * This ensures components receive clean, predictable data without needing to handle\n * the internal nullish string conversion system or flat array wrapping manually.\n */\n const getValues = ((...args: any[]) => {\n const result = (getValuesOrig as any)(...args);\n return toValidationFormat(result);\n }) as typeof getValuesOrig;\n\n const watch = ((...args: any[]) => {\n const result = (watchOrig as any)(...args);\n return toValidationFormat(result);\n }) as typeof watchOrig;\n\n const subscribe = ((...args: any[]) => {\n // For subscribe, we need to wrap the callback to convert the values property\n const [options] = args;\n if (options?.callback) {\n const originalCallback = options.callback;\n const wrappedOptions = {\n ...options,\n callback: (subscribeFormState: any) => {\n // Convert the values property if it exists\n const convertedFormState = {\n ...subscribeFormState,\n ...(subscribeFormState.values && {\n values: toValidationFormat(subscribeFormState.values),\n }),\n };\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return originalCallback(convertedFormState);\n },\n };\n return subscribeOrig(wrappedOptions);\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return (subscribeOrig as any)(...args);\n }) as typeof subscribeOrig;\n\n return {\n ...otherMethods,\n ...uniformContext,\n formState,\n getFieldState,\n getValues,\n subscribe,\n watch,\n };\n};\n"],"mappings":";;;;;;AAYA,MAAa,wBACX,YACA,SACY;CAGZ,MAAM,YACJ,KAAK,KAAK,SAAS,OAAA,aAAsB,KAAK,MAAM,GAAG,EAAE,IAAI;CAE/D,MAAM,iBAAiB,WAAgB;EAErC,IAAI,OAAO,SAAS,SAAS;GAE3B,IAAI,OAAO,cAAc,OAAO,YAC9B,OAAO;GAGT,OAAO;EACT;EAIA,OAAO,CAAC,OAAO,cAAc,CAAC,OAAO;CACvC;CAEA,OAAO,WAAW,gBAAgB,eAAe,SAAS;AAC5D;;;;;;;;;;;;;AAcA,MAAM,6BACJ,QACA,SACG;CAEH,MAAM,OAAO,KAAK,MAAM,GAAG,EAAE,QAAQ,MAAM;EACzC,OAAO,MAAM;CACf,CAAC;CACD,IAAI,UAAmB;CACvB,KAAK,SAAS,QAAQ;EACpB,IAAI,WAAW,OAAO,YAAY,UAChC,UAAW,QAAoC;OAE/C,UAAU,KAAA;CAEd,CAAC;CACD,OAAO;AACT;;;;;;;;;;;AAYA,MAAaA,yBAIN;CACL,MAAM,EACJ,WAEA,eAAe,mBACf,WAAW,eACX,OAAO,WACP,WAAW,eAEX,GAAG,iBACDC,eAA+D;CAEnE,MAAM,iBAAiB,WAAW,cAAc;;;;;;;;;;CAWhD,MAAM,iBAAiB,MAA0B,WAAoB;EACnE,MAAM,YACJ,OAAO,SAAS,WAAW,KAAK,QAAQ,YAAY,EAAE,EAAE,MAAM,GAAG,IAAI;EAIvE,MAAM,qBACJ,gBAAgB,WAAW,gBAC3B,gBAAgB,WAAW;EAG7B,MAAM,WAAW,qBACb,qBAAqB,oBAAoB,SAAS,IAClD;EAEJ,MAAM,QAAQ,0BACZ,gBAAgB,WAAW,UAAU,CAAC,GACtC,IACF;EAKA,OAAO;GACL,GAHiB,kBAAkB,MAAM,SAG7B;GACZ;GACA,SAAS,CAAC,CAAC;GACX;GACA,QAAQ,aAAa,UAAU,IAAI;EACrC;CACF;;;;;;;;;;;;CAaA,MAAM,cAAc,GAAG,SAAgB;EAErC,OAAO,mBADS,cAAsB,GAAG,IACV,CAAC;CAClC;CAEA,MAAM,UAAU,GAAG,SAAgB;EAEjC,OAAO,mBADS,UAAkB,GAAG,IACN,CAAC;CAClC;CAEA,MAAM,cAAc,GAAG,SAAgB;EAErC,MAAM,CAAC,WAAW;EAClB,IAAI,SAAS,UAAU;GACrB,MAAM,mBAAmB,QAAQ;GAejC,OAAO,cAAc;IAbnB,GAAG;IACH,WAAW,uBAA4B;KASrC,OAAO,iBAAiB;MANtB,GAAG;MACH,GAAI,mBAAmB,UAAU,EAC/B,QAAQ,mBAAmB,mBAAmB,MAAM,EACtD;KAGuC,CAAC;IAC5C;GAEgC,CAAC;EACrC;EAEA,OAAQ,cAAsB,GAAG,IAAI;CACvC;CAEA,OAAO;EACL,GAAG;EACH,GAAG;EACH;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { n as UserChangeListener, t as DebugModeSettings } from "./FormContext-
|
|
2
|
-
import * as _$react from "react";
|
|
3
|
-
import * as _$_fuf_stack_veto0 from "@fuf-stack/veto";
|
|
1
|
+
import { n as UserChangeListener, t as DebugModeSettings } from "./FormContext-1zBxAjr_.cjs";
|
|
4
2
|
import { VetoFormattedError, VetoInstance } from "@fuf-stack/veto";
|
|
5
|
-
import * as _$react_hook_form0 from "react-hook-form";
|
|
6
3
|
import { FieldError, FieldValues, Path } from "react-hook-form";
|
|
7
4
|
|
|
8
5
|
//#region src/hooks/useFormContext/useFormContext.d.ts
|
|
@@ -19,7 +16,7 @@ declare const checkFieldIsRequired: (validation: VetoInstance, path: string[]) =
|
|
|
19
16
|
* - Filters out empty/null values
|
|
20
17
|
*/
|
|
21
18
|
declare const useFormContext: <TFieldValues extends FieldValues = FieldValues, TContext = any, TTransformedValues = TFieldValues>() => {
|
|
22
|
-
formState:
|
|
19
|
+
formState: import("react-hook-form").FormState<TFieldValues>;
|
|
23
20
|
getFieldState: (name: Path<TFieldValues>, testId?: string) => {
|
|
24
21
|
error: FieldError[] | undefined;
|
|
25
22
|
invalid: boolean;
|
|
@@ -29,14 +26,14 @@ declare const useFormContext: <TFieldValues extends FieldValues = FieldValues, T
|
|
|
29
26
|
isTouched: boolean;
|
|
30
27
|
isValidating: boolean;
|
|
31
28
|
};
|
|
32
|
-
getValues:
|
|
33
|
-
subscribe:
|
|
34
|
-
watch:
|
|
35
|
-
debugMode: "
|
|
29
|
+
getValues: import("react-hook-form").UseFormGetValues<TFieldValues>;
|
|
30
|
+
subscribe: import("react-hook-form").UseFormSubscribe<TFieldValues>;
|
|
31
|
+
watch: import("react-hook-form").UseFormWatch<TFieldValues>;
|
|
32
|
+
debugMode: "disabled" | "debug" | "debug-testids" | "off";
|
|
36
33
|
debugModeSettings?: DebugModeSettings;
|
|
37
34
|
preventSubmit: (prevent: boolean) => void;
|
|
38
|
-
setDebugMode: (debugMode: "
|
|
39
|
-
triggerSubmit: (e?:
|
|
35
|
+
setDebugMode: (debugMode: "disabled" | "debug" | "debug-testids" | "off") => void;
|
|
36
|
+
triggerSubmit: (e?: import("react").BaseSyntheticEvent) => Promise<void> | void;
|
|
40
37
|
userChange: {
|
|
41
38
|
subscribe: (listener: UserChangeListener) => () => void;
|
|
42
39
|
notify: (fieldName: string, value: unknown) => void;
|
|
@@ -45,20 +42,21 @@ declare const useFormContext: <TFieldValues extends FieldValues = FieldValues, T
|
|
|
45
42
|
baseInstance?: VetoInstance;
|
|
46
43
|
instance?: VetoInstance;
|
|
47
44
|
errors?: VetoFormattedError;
|
|
48
|
-
setClientValidationSchema: (key: string, schema:
|
|
45
|
+
setClientValidationSchema: (key: string, schema: import("@fuf-stack/veto").VetoTypeAny | null) => void;
|
|
49
46
|
};
|
|
50
|
-
setError:
|
|
51
|
-
clearErrors:
|
|
52
|
-
setValue:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
47
|
+
setError: import("react-hook-form").UseFormSetError<TFieldValues>;
|
|
48
|
+
clearErrors: import("react-hook-form").UseFormClearErrors<TFieldValues>;
|
|
49
|
+
setValue: import("react-hook-form").UseFormSetValue<TFieldValues>;
|
|
50
|
+
setValues: import("react-hook-form").UseFormSetValues<TFieldValues>;
|
|
51
|
+
trigger: import("react-hook-form").UseFormTrigger<TFieldValues>;
|
|
52
|
+
resetField: import("react-hook-form").UseFormResetField<TFieldValues>;
|
|
53
|
+
reset: import("react-hook-form").UseFormReset<TFieldValues>;
|
|
54
|
+
handleSubmit: import("react-hook-form").UseFormHandleSubmit<TFieldValues, TTransformedValues>;
|
|
55
|
+
unregister: import("react-hook-form").UseFormUnregister<TFieldValues>;
|
|
56
|
+
control: import("react-hook-form").Control<TFieldValues, TContext, TTransformedValues>;
|
|
57
|
+
register: import("react-hook-form").UseFormRegister<TFieldValues>;
|
|
58
|
+
setFocus: import("react-hook-form").UseFormSetFocus<TFieldValues>;
|
|
61
59
|
};
|
|
62
60
|
//#endregion
|
|
63
61
|
export { useFormContext as n, checkFieldIsRequired as t };
|
|
64
|
-
//# sourceMappingURL=useFormContext-
|
|
62
|
+
//# sourceMappingURL=useFormContext-JE8dwbCT.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFormContext-JE8dwbCT.d.cts","names":[],"sources":["../src/hooks/useFormContext/useFormContext.ts"],"mappings":";;;;;;cAYa,oBAAA,GACX,UAAA,EAAY,YAAY,EACxB,IAAA;;AAFF;;;;;;;;AAEgB;cAmEH,cAAA,wBACU,WAAA,GAAc,WAAA,uCAEd,YAAA;;wBAwBQ,IAAA,CAAK,YAAA,GAAa,MAAA;;;;;;;;;;;;;;;;sCAWf,kBAAA,KAAA,OAAA;;0BAAA,kBAAA;;;;mBAwB/B,YAAA;eAEoB,YAAA;aAAwE,kBAAA"}
|
|
@@ -63,4 +63,4 @@ declare const useInputValueDebounce: <TValue = unknown>({
|
|
|
63
63
|
}: UseInputValueDebounceOptions<TValue>) => UseInputValueDebounceReturn<TValue>;
|
|
64
64
|
//#endregion
|
|
65
65
|
export { UseInputValueDebounceReturn as n, useInputValueDebounce as r, UseInputValueDebounceOptions as t };
|
|
66
|
-
//# sourceMappingURL=useInputValueDebounce-
|
|
66
|
+
//# sourceMappingURL=useInputValueDebounce-D03GnJO4.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInputValueDebounce-D03GnJO4.d.ts","names":[],"sources":["../src/hooks/useInputValueDebounce/useInputValueDebounce.ts"],"mappings":";UAIiB,4BAAA;EAAA;EAEf,aAAA;EAF2C;EAI3C,IAAA;EAJ4C;EAM5C,MAAA;EAFA;EAKA,QAAA,MAAc,KAAA;EAAd;EAEA,KAAA,EAAO,MAAM;AAAA;AAAA,UAGE,2BAAA;EAHF;EAMb,QAAA,MAAc,KAAA;EAHC;EAKf,MAAA;EAL0C;EAO1C,KAAA,EAAO,MAAM;AAAA;;;;;;;AAAA;AAsCf;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,qBAAA;EAA2C,aAAA;EAAA,IAAA;EAAA,MAAA;EAAA,QAAA;EAAA;AAAA,GAMrD,4BAAA,CAA6B,MAAA,MAAU,2BAAA,CAA4B,MAAA"}
|
|
@@ -63,4 +63,4 @@ declare const useInputValueDebounce: <TValue = unknown>({
|
|
|
63
63
|
}: UseInputValueDebounceOptions<TValue>) => UseInputValueDebounceReturn<TValue>;
|
|
64
64
|
//#endregion
|
|
65
65
|
export { UseInputValueDebounceReturn as n, useInputValueDebounce as r, UseInputValueDebounceOptions as t };
|
|
66
|
-
//# sourceMappingURL=useInputValueDebounce-
|
|
66
|
+
//# sourceMappingURL=useInputValueDebounce-nHt1AHRm.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInputValueDebounce-nHt1AHRm.d.cts","names":[],"sources":["../src/hooks/useInputValueDebounce/useInputValueDebounce.ts"],"mappings":";UAIiB,4BAAA;EAAA;EAEf,aAAA;EAF2C;EAI3C,IAAA;EAJ4C;EAM5C,MAAA;EAFA;EAKA,QAAA,MAAc,KAAA;EAAd;EAEA,KAAA,EAAO,MAAM;AAAA;AAAA,UAGE,2BAAA;EAHF;EAMb,QAAA,MAAc,KAAA;EAHC;EAKf,MAAA;EAL0C;EAO1C,KAAA,EAAO,MAAM;AAAA;;;;;;;AAAA;AAsCf;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,qBAAA;EAA2C,aAAA;EAAA,IAAA;EAAA,MAAA;EAAA,QAAA;EAAA;AAAA,GAMrD,4BAAA,CAA6B,MAAA,MAAU,2BAAA,CAA4B,MAAA"}
|
|
@@ -105,4 +105,4 @@ declare const useInputValueTransform: <TDisplay = unknown>({
|
|
|
105
105
|
}: UseInputValueTransformOptions<TDisplay>) => UseInputValueTransformReturn<TDisplay>;
|
|
106
106
|
//#endregion
|
|
107
107
|
export { useInputValueTransform as i, UseInputValueTransformOptions as n, UseInputValueTransformReturn as r, InputValueTransform as t };
|
|
108
|
-
//# sourceMappingURL=useInputValueTransform-
|
|
108
|
+
//# sourceMappingURL=useInputValueTransform-C51LmUxi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInputValueTransform-C51LmUxi.d.ts","names":[],"sources":["../src/hooks/useInputValueTransform/useInputValueTransform.ts"],"mappings":";UAEiB,mBAAA;EAAA;EAEf,cAAA,GAAiB,KAAA,cAAmB,QAAA;EAFF;EAIlC,WAAA,GAAc,KAAA,EAAO,QAAQ;AAAA;AAAA,UAGd,6BAAA;EALE;EAOjB,IAAA;EALA;EAOA,SAAA,GAAY,mBAAmB,CAAC,QAAA;AAAA;AAAA,UAGjB,4BAAA;EAVc;EAY7B,cAAA,GAAiB,SAAA,cAAuB,QAAA;EATI;EAW5C,WAAA,GAAc,YAAA,EAAc,QAAQ;AAAA;;;;;;;AAPI;AAG1C;;;;;;;;;;;;AAIsC;AAqFtC;;;;;;;;;;;;;;;;;;;;;AAGkF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAHrE,sBAAA;EAA8C,IAAA;EAAA;AAAA,GAGxD,6BAAA,CAA8B,QAAA,MAAY,4BAAA,CAA6B,QAAA"}
|
package/dist/{useInputValueTransform-BwAfw8Xb.d.cts → useInputValueTransform-CNCBU7a9.d.cts}
RENAMED
|
@@ -105,4 +105,4 @@ declare const useInputValueTransform: <TDisplay = unknown>({
|
|
|
105
105
|
}: UseInputValueTransformOptions<TDisplay>) => UseInputValueTransformReturn<TDisplay>;
|
|
106
106
|
//#endregion
|
|
107
107
|
export { useInputValueTransform as i, UseInputValueTransformOptions as n, UseInputValueTransformReturn as r, InputValueTransform as t };
|
|
108
|
-
//# sourceMappingURL=useInputValueTransform-
|
|
108
|
+
//# sourceMappingURL=useInputValueTransform-CNCBU7a9.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInputValueTransform-CNCBU7a9.d.cts","names":[],"sources":["../src/hooks/useInputValueTransform/useInputValueTransform.ts"],"mappings":";UAEiB,mBAAA;EAAA;EAEf,cAAA,GAAiB,KAAA,cAAmB,QAAA;EAFF;EAIlC,WAAA,GAAc,KAAA,EAAO,QAAQ;AAAA;AAAA,UAGd,6BAAA;EALE;EAOjB,IAAA;EALA;EAOA,SAAA,GAAY,mBAAmB,CAAC,QAAA;AAAA;AAAA,UAGjB,4BAAA;EAVc;EAY7B,cAAA,GAAiB,SAAA,cAAuB,QAAA;EATI;EAW5C,WAAA,GAAc,YAAA,EAAc,QAAQ;AAAA;;;;;;;AAPI;AAG1C;;;;;;;;;;;;AAIsC;AAqFtC;;;;;;;;;;;;;;;;;;;;;AAGkF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAHrE,sBAAA;EAA8C,IAAA;EAAA;AAAA,GAGxD,6BAAA,CAA8B,QAAA,MAAY,4BAAA,CAA6B,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInputValueTransform-CXdmtc0Q.js","names":[],"sources":["../src/hooks/useInputValueTransform/useInputValueTransform.ts"],"sourcesContent":["import { useCallback } from 'react';\n\nexport interface InputValueTransform<TDisplay = unknown> {\n /** Transforms the form value to display value (e.g., 1000 → \"$1,000\" or 'a' → ['a']) */\n toDisplayValue: (value: unknown) => TDisplay;\n /** Transforms the display value to form value (e.g., \"$1,000\" → 1000 or ['a'] → 'a') */\n toFormValue: (value: TDisplay) => unknown;\n}\n\nexport interface UseInputValueTransformOptions<TDisplay = unknown> {\n /** Input type for special number handling */\n type?: 'text' | 'number' | 'password';\n /** Value transformation functions */\n transform?: InputValueTransform<TDisplay>;\n}\n\nexport interface UseInputValueTransformReturn<TDisplay = unknown> {\n /** Converts any form value to display value */\n toDisplayValue: (formValue: unknown) => TDisplay;\n /** Converts any display value to form value */\n toFormValue: (displayValue: TDisplay) => unknown;\n}\n\n/**\n * Custom hook providing utility functions for value transformations between display and form values.\n *\n * This hook provides pure conversion functions without any state management. It's useful for:\n * - Currency formatting ($1,000 display vs 1000 stored)\n * - Number inputs with special handling\n * - Date formatting (MM/DD/YYYY display vs ISO date stored)\n * - Phone number formatting ((555) 123-4567 display vs 5551234567 stored)\n * - Array/Object transformations (single value ↔ array, nested structures)\n *\n * **Key Features:**\n * - Pure conversion functions (no state)\n * - Generic support for any data type (strings, numbers, arrays, objects)\n * - Special number input handling (empty string preservation)\n * - Bidirectional value transformations\n * - Memoized functions for performance\n *\n * @param options Configuration for value transformation\n * @returns Pure conversion utility functions\n *\n * @example\n * ```tsx\n * // Currency formatting\n * const currencyTransform = {\n * toDisplayValue: (val) => val ? `$${Number(val).toLocaleString()}` : '',\n * toFormValue: (val) => parseFloat(val.replace(/[$,]/g, '')) || 0\n * };\n *\n * const { toDisplayValue, toFormValue } = useInputValueTransform({\n * transform: currencyTransform\n * });\n *\n * const displayVal = toDisplayValue(1000); // \"$1,000\"\n * const formVal = toFormValue(\"$1,500\"); // 1500\n * ```\n *\n * @example\n * ```tsx\n * // Number input (no transforms needed)\n * const { toDisplayValue, toFormValue } = useInputValueTransform({\n * type: 'number'\n * });\n *\n * // Handles empty string → empty string (not NaN)\n * // Handles \"123\" → 123 (string to number conversion)\n * ```\n *\n * @example\n * ```tsx\n * // Array to single value (for single checkbox)\n * const singleValueTransform = {\n * toDisplayValue: (val: string[]) => val?.[0] || '',\n * toFormValue: (val: string) => val ? [val] : []\n * };\n *\n * const { toDisplayValue, toFormValue } = useInputValueTransform({\n * transform: singleValueTransform\n * });\n *\n * const displayVal = toDisplayValue(['option1']); // \"option1\"\n * const formVal = toFormValue(\"option2\"); // [\"option2\"]\n * ```\n *\n * @example\n * ```tsx\n * // Integration with debouncing\n * const MyInput = ({ field, transform }) => {\n * const transform = useInputValueTransform({ transform });\n *\n * const { onChange, onBlur, value } = useInputValueDebounce({\n * ...transform,\n * debounceDelay: 300,\n * name: 'fieldName',\n * onBlur: field.onBlur,\n * onChange: field.onChange,\n * value: field.value,\n * });\n *\n * return <input value={value} onChange={onChange} onBlur={onBlur} />;\n * };\n * ```\n */\nexport const useInputValueTransform = <TDisplay = unknown>({\n type,\n transform,\n}: UseInputValueTransformOptions<TDisplay>): UseInputValueTransformReturn<TDisplay> => {\n /**\n * Converts any form value to display value\n */\n const toDisplayValue = useCallback(\n (formValue: unknown): TDisplay => {\n if (transform?.toDisplayValue) {\n return transform.toDisplayValue(formValue);\n }\n\n // For number type, convert valid strings to numbers for display\n if (type === 'number') {\n if (formValue === '') {\n return '' as TDisplay;\n }\n const numValue = Number(formValue);\n return (Number.isNaN(numValue) ? formValue : numValue) as TDisplay;\n }\n\n // Default: pass through (handles primitives, arrays, objects, etc.)\n return (formValue ?? '') as TDisplay;\n },\n [type, transform],\n );\n\n /**\n * Converts any display value to form value\n */\n const toFormValue = useCallback(\n (displayValue: TDisplay): unknown => {\n if (transform?.toFormValue) {\n return transform.toFormValue(displayValue);\n }\n\n // For number type, convert strings to numbers\n if (type === 'number') {\n if (displayValue === '') {\n return '';\n }\n const numValue = Number(displayValue);\n return Number.isNaN(numValue) ? displayValue : numValue;\n }\n\n // Default: pass through (handles primitives, arrays, objects, etc.)\n return displayValue;\n },\n [type, transform],\n );\n\n return {\n toDisplayValue,\n toFormValue,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,MAAa,0BAA8C,EACzD,MACA,gBACqF;
|
|
1
|
+
{"version":3,"file":"useInputValueTransform-CXdmtc0Q.js","names":[],"sources":["../src/hooks/useInputValueTransform/useInputValueTransform.ts"],"sourcesContent":["import { useCallback } from 'react';\n\nexport interface InputValueTransform<TDisplay = unknown> {\n /** Transforms the form value to display value (e.g., 1000 → \"$1,000\" or 'a' → ['a']) */\n toDisplayValue: (value: unknown) => TDisplay;\n /** Transforms the display value to form value (e.g., \"$1,000\" → 1000 or ['a'] → 'a') */\n toFormValue: (value: TDisplay) => unknown;\n}\n\nexport interface UseInputValueTransformOptions<TDisplay = unknown> {\n /** Input type for special number handling */\n type?: 'text' | 'number' | 'password';\n /** Value transformation functions */\n transform?: InputValueTransform<TDisplay>;\n}\n\nexport interface UseInputValueTransformReturn<TDisplay = unknown> {\n /** Converts any form value to display value */\n toDisplayValue: (formValue: unknown) => TDisplay;\n /** Converts any display value to form value */\n toFormValue: (displayValue: TDisplay) => unknown;\n}\n\n/**\n * Custom hook providing utility functions for value transformations between display and form values.\n *\n * This hook provides pure conversion functions without any state management. It's useful for:\n * - Currency formatting ($1,000 display vs 1000 stored)\n * - Number inputs with special handling\n * - Date formatting (MM/DD/YYYY display vs ISO date stored)\n * - Phone number formatting ((555) 123-4567 display vs 5551234567 stored)\n * - Array/Object transformations (single value ↔ array, nested structures)\n *\n * **Key Features:**\n * - Pure conversion functions (no state)\n * - Generic support for any data type (strings, numbers, arrays, objects)\n * - Special number input handling (empty string preservation)\n * - Bidirectional value transformations\n * - Memoized functions for performance\n *\n * @param options Configuration for value transformation\n * @returns Pure conversion utility functions\n *\n * @example\n * ```tsx\n * // Currency formatting\n * const currencyTransform = {\n * toDisplayValue: (val) => val ? `$${Number(val).toLocaleString()}` : '',\n * toFormValue: (val) => parseFloat(val.replace(/[$,]/g, '')) || 0\n * };\n *\n * const { toDisplayValue, toFormValue } = useInputValueTransform({\n * transform: currencyTransform\n * });\n *\n * const displayVal = toDisplayValue(1000); // \"$1,000\"\n * const formVal = toFormValue(\"$1,500\"); // 1500\n * ```\n *\n * @example\n * ```tsx\n * // Number input (no transforms needed)\n * const { toDisplayValue, toFormValue } = useInputValueTransform({\n * type: 'number'\n * });\n *\n * // Handles empty string → empty string (not NaN)\n * // Handles \"123\" → 123 (string to number conversion)\n * ```\n *\n * @example\n * ```tsx\n * // Array to single value (for single checkbox)\n * const singleValueTransform = {\n * toDisplayValue: (val: string[]) => val?.[0] || '',\n * toFormValue: (val: string) => val ? [val] : []\n * };\n *\n * const { toDisplayValue, toFormValue } = useInputValueTransform({\n * transform: singleValueTransform\n * });\n *\n * const displayVal = toDisplayValue(['option1']); // \"option1\"\n * const formVal = toFormValue(\"option2\"); // [\"option2\"]\n * ```\n *\n * @example\n * ```tsx\n * // Integration with debouncing\n * const MyInput = ({ field, transform }) => {\n * const transform = useInputValueTransform({ transform });\n *\n * const { onChange, onBlur, value } = useInputValueDebounce({\n * ...transform,\n * debounceDelay: 300,\n * name: 'fieldName',\n * onBlur: field.onBlur,\n * onChange: field.onChange,\n * value: field.value,\n * });\n *\n * return <input value={value} onChange={onChange} onBlur={onBlur} />;\n * };\n * ```\n */\nexport const useInputValueTransform = <TDisplay = unknown>({\n type,\n transform,\n}: UseInputValueTransformOptions<TDisplay>): UseInputValueTransformReturn<TDisplay> => {\n /**\n * Converts any form value to display value\n */\n const toDisplayValue = useCallback(\n (formValue: unknown): TDisplay => {\n if (transform?.toDisplayValue) {\n return transform.toDisplayValue(formValue);\n }\n\n // For number type, convert valid strings to numbers for display\n if (type === 'number') {\n if (formValue === '') {\n return '' as TDisplay;\n }\n const numValue = Number(formValue);\n return (Number.isNaN(numValue) ? formValue : numValue) as TDisplay;\n }\n\n // Default: pass through (handles primitives, arrays, objects, etc.)\n return (formValue ?? '') as TDisplay;\n },\n [type, transform],\n );\n\n /**\n * Converts any display value to form value\n */\n const toFormValue = useCallback(\n (displayValue: TDisplay): unknown => {\n if (transform?.toFormValue) {\n return transform.toFormValue(displayValue);\n }\n\n // For number type, convert strings to numbers\n if (type === 'number') {\n if (displayValue === '') {\n return '';\n }\n const numValue = Number(displayValue);\n return Number.isNaN(numValue) ? displayValue : numValue;\n }\n\n // Default: pass through (handles primitives, arrays, objects, etc.)\n return displayValue;\n },\n [type, transform],\n );\n\n return {\n toDisplayValue,\n toFormValue,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,MAAa,0BAA8C,EACzD,MACA,gBACqF;CAiDrF,OAAO;EACL,gBA9CqB,aACpB,cAAiC;GAChC,IAAI,WAAW,gBACb,OAAO,UAAU,eAAe,SAAS;GAI3C,IAAI,SAAS,UAAU;IACrB,IAAI,cAAc,IAChB,OAAO;IAET,MAAM,WAAW,OAAO,SAAS;IACjC,OAAQ,OAAO,MAAM,QAAQ,IAAI,YAAY;GAC/C;GAGA,OAAQ,aAAa;EACvB,GACA,CAAC,MAAM,SAAS,CA4BH;EACb,aAvBkB,aACjB,iBAAoC;GACnC,IAAI,WAAW,aACb,OAAO,UAAU,YAAY,YAAY;GAI3C,IAAI,SAAS,UAAU;IACrB,IAAI,iBAAiB,IACnB,OAAO;IAET,MAAM,WAAW,OAAO,YAAY;IACpC,OAAO,OAAO,MAAM,QAAQ,IAAI,eAAe;GACjD;GAGA,OAAO;EACT,GACA,CAAC,MAAM,SAAS,CAKN;CACZ;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInputValueTransform-DKH-7F9D.cjs","names":[],"sources":["../src/hooks/useInputValueTransform/useInputValueTransform.ts"],"sourcesContent":["import { useCallback } from 'react';\n\nexport interface InputValueTransform<TDisplay = unknown> {\n /** Transforms the form value to display value (e.g., 1000 → \"$1,000\" or 'a' → ['a']) */\n toDisplayValue: (value: unknown) => TDisplay;\n /** Transforms the display value to form value (e.g., \"$1,000\" → 1000 or ['a'] → 'a') */\n toFormValue: (value: TDisplay) => unknown;\n}\n\nexport interface UseInputValueTransformOptions<TDisplay = unknown> {\n /** Input type for special number handling */\n type?: 'text' | 'number' | 'password';\n /** Value transformation functions */\n transform?: InputValueTransform<TDisplay>;\n}\n\nexport interface UseInputValueTransformReturn<TDisplay = unknown> {\n /** Converts any form value to display value */\n toDisplayValue: (formValue: unknown) => TDisplay;\n /** Converts any display value to form value */\n toFormValue: (displayValue: TDisplay) => unknown;\n}\n\n/**\n * Custom hook providing utility functions for value transformations between display and form values.\n *\n * This hook provides pure conversion functions without any state management. It's useful for:\n * - Currency formatting ($1,000 display vs 1000 stored)\n * - Number inputs with special handling\n * - Date formatting (MM/DD/YYYY display vs ISO date stored)\n * - Phone number formatting ((555) 123-4567 display vs 5551234567 stored)\n * - Array/Object transformations (single value ↔ array, nested structures)\n *\n * **Key Features:**\n * - Pure conversion functions (no state)\n * - Generic support for any data type (strings, numbers, arrays, objects)\n * - Special number input handling (empty string preservation)\n * - Bidirectional value transformations\n * - Memoized functions for performance\n *\n * @param options Configuration for value transformation\n * @returns Pure conversion utility functions\n *\n * @example\n * ```tsx\n * // Currency formatting\n * const currencyTransform = {\n * toDisplayValue: (val) => val ? `$${Number(val).toLocaleString()}` : '',\n * toFormValue: (val) => parseFloat(val.replace(/[$,]/g, '')) || 0\n * };\n *\n * const { toDisplayValue, toFormValue } = useInputValueTransform({\n * transform: currencyTransform\n * });\n *\n * const displayVal = toDisplayValue(1000); // \"$1,000\"\n * const formVal = toFormValue(\"$1,500\"); // 1500\n * ```\n *\n * @example\n * ```tsx\n * // Number input (no transforms needed)\n * const { toDisplayValue, toFormValue } = useInputValueTransform({\n * type: 'number'\n * });\n *\n * // Handles empty string → empty string (not NaN)\n * // Handles \"123\" → 123 (string to number conversion)\n * ```\n *\n * @example\n * ```tsx\n * // Array to single value (for single checkbox)\n * const singleValueTransform = {\n * toDisplayValue: (val: string[]) => val?.[0] || '',\n * toFormValue: (val: string) => val ? [val] : []\n * };\n *\n * const { toDisplayValue, toFormValue } = useInputValueTransform({\n * transform: singleValueTransform\n * });\n *\n * const displayVal = toDisplayValue(['option1']); // \"option1\"\n * const formVal = toFormValue(\"option2\"); // [\"option2\"]\n * ```\n *\n * @example\n * ```tsx\n * // Integration with debouncing\n * const MyInput = ({ field, transform }) => {\n * const transform = useInputValueTransform({ transform });\n *\n * const { onChange, onBlur, value } = useInputValueDebounce({\n * ...transform,\n * debounceDelay: 300,\n * name: 'fieldName',\n * onBlur: field.onBlur,\n * onChange: field.onChange,\n * value: field.value,\n * });\n *\n * return <input value={value} onChange={onChange} onBlur={onBlur} />;\n * };\n * ```\n */\nexport const useInputValueTransform = <TDisplay = unknown>({\n type,\n transform,\n}: UseInputValueTransformOptions<TDisplay>): UseInputValueTransformReturn<TDisplay> => {\n /**\n * Converts any form value to display value\n */\n const toDisplayValue = useCallback(\n (formValue: unknown): TDisplay => {\n if (transform?.toDisplayValue) {\n return transform.toDisplayValue(formValue);\n }\n\n // For number type, convert valid strings to numbers for display\n if (type === 'number') {\n if (formValue === '') {\n return '' as TDisplay;\n }\n const numValue = Number(formValue);\n return (Number.isNaN(numValue) ? formValue : numValue) as TDisplay;\n }\n\n // Default: pass through (handles primitives, arrays, objects, etc.)\n return (formValue ?? '') as TDisplay;\n },\n [type, transform],\n );\n\n /**\n * Converts any display value to form value\n */\n const toFormValue = useCallback(\n (displayValue: TDisplay): unknown => {\n if (transform?.toFormValue) {\n return transform.toFormValue(displayValue);\n }\n\n // For number type, convert strings to numbers\n if (type === 'number') {\n if (displayValue === '') {\n return '';\n }\n const numValue = Number(displayValue);\n return Number.isNaN(numValue) ? displayValue : numValue;\n }\n\n // Default: pass through (handles primitives, arrays, objects, etc.)\n return displayValue;\n },\n [type, transform],\n );\n\n return {\n toDisplayValue,\n toFormValue,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,MAAa,0BAA8C,EACzD,MACA,gBACqF;
|
|
1
|
+
{"version":3,"file":"useInputValueTransform-DKH-7F9D.cjs","names":[],"sources":["../src/hooks/useInputValueTransform/useInputValueTransform.ts"],"sourcesContent":["import { useCallback } from 'react';\n\nexport interface InputValueTransform<TDisplay = unknown> {\n /** Transforms the form value to display value (e.g., 1000 → \"$1,000\" or 'a' → ['a']) */\n toDisplayValue: (value: unknown) => TDisplay;\n /** Transforms the display value to form value (e.g., \"$1,000\" → 1000 or ['a'] → 'a') */\n toFormValue: (value: TDisplay) => unknown;\n}\n\nexport interface UseInputValueTransformOptions<TDisplay = unknown> {\n /** Input type for special number handling */\n type?: 'text' | 'number' | 'password';\n /** Value transformation functions */\n transform?: InputValueTransform<TDisplay>;\n}\n\nexport interface UseInputValueTransformReturn<TDisplay = unknown> {\n /** Converts any form value to display value */\n toDisplayValue: (formValue: unknown) => TDisplay;\n /** Converts any display value to form value */\n toFormValue: (displayValue: TDisplay) => unknown;\n}\n\n/**\n * Custom hook providing utility functions for value transformations between display and form values.\n *\n * This hook provides pure conversion functions without any state management. It's useful for:\n * - Currency formatting ($1,000 display vs 1000 stored)\n * - Number inputs with special handling\n * - Date formatting (MM/DD/YYYY display vs ISO date stored)\n * - Phone number formatting ((555) 123-4567 display vs 5551234567 stored)\n * - Array/Object transformations (single value ↔ array, nested structures)\n *\n * **Key Features:**\n * - Pure conversion functions (no state)\n * - Generic support for any data type (strings, numbers, arrays, objects)\n * - Special number input handling (empty string preservation)\n * - Bidirectional value transformations\n * - Memoized functions for performance\n *\n * @param options Configuration for value transformation\n * @returns Pure conversion utility functions\n *\n * @example\n * ```tsx\n * // Currency formatting\n * const currencyTransform = {\n * toDisplayValue: (val) => val ? `$${Number(val).toLocaleString()}` : '',\n * toFormValue: (val) => parseFloat(val.replace(/[$,]/g, '')) || 0\n * };\n *\n * const { toDisplayValue, toFormValue } = useInputValueTransform({\n * transform: currencyTransform\n * });\n *\n * const displayVal = toDisplayValue(1000); // \"$1,000\"\n * const formVal = toFormValue(\"$1,500\"); // 1500\n * ```\n *\n * @example\n * ```tsx\n * // Number input (no transforms needed)\n * const { toDisplayValue, toFormValue } = useInputValueTransform({\n * type: 'number'\n * });\n *\n * // Handles empty string → empty string (not NaN)\n * // Handles \"123\" → 123 (string to number conversion)\n * ```\n *\n * @example\n * ```tsx\n * // Array to single value (for single checkbox)\n * const singleValueTransform = {\n * toDisplayValue: (val: string[]) => val?.[0] || '',\n * toFormValue: (val: string) => val ? [val] : []\n * };\n *\n * const { toDisplayValue, toFormValue } = useInputValueTransform({\n * transform: singleValueTransform\n * });\n *\n * const displayVal = toDisplayValue(['option1']); // \"option1\"\n * const formVal = toFormValue(\"option2\"); // [\"option2\"]\n * ```\n *\n * @example\n * ```tsx\n * // Integration with debouncing\n * const MyInput = ({ field, transform }) => {\n * const transform = useInputValueTransform({ transform });\n *\n * const { onChange, onBlur, value } = useInputValueDebounce({\n * ...transform,\n * debounceDelay: 300,\n * name: 'fieldName',\n * onBlur: field.onBlur,\n * onChange: field.onChange,\n * value: field.value,\n * });\n *\n * return <input value={value} onChange={onChange} onBlur={onBlur} />;\n * };\n * ```\n */\nexport const useInputValueTransform = <TDisplay = unknown>({\n type,\n transform,\n}: UseInputValueTransformOptions<TDisplay>): UseInputValueTransformReturn<TDisplay> => {\n /**\n * Converts any form value to display value\n */\n const toDisplayValue = useCallback(\n (formValue: unknown): TDisplay => {\n if (transform?.toDisplayValue) {\n return transform.toDisplayValue(formValue);\n }\n\n // For number type, convert valid strings to numbers for display\n if (type === 'number') {\n if (formValue === '') {\n return '' as TDisplay;\n }\n const numValue = Number(formValue);\n return (Number.isNaN(numValue) ? formValue : numValue) as TDisplay;\n }\n\n // Default: pass through (handles primitives, arrays, objects, etc.)\n return (formValue ?? '') as TDisplay;\n },\n [type, transform],\n );\n\n /**\n * Converts any display value to form value\n */\n const toFormValue = useCallback(\n (displayValue: TDisplay): unknown => {\n if (transform?.toFormValue) {\n return transform.toFormValue(displayValue);\n }\n\n // For number type, convert strings to numbers\n if (type === 'number') {\n if (displayValue === '') {\n return '';\n }\n const numValue = Number(displayValue);\n return Number.isNaN(numValue) ? displayValue : numValue;\n }\n\n // Default: pass through (handles primitives, arrays, objects, etc.)\n return displayValue;\n },\n [type, transform],\n );\n\n return {\n toDisplayValue,\n toFormValue,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyGA,MAAa,0BAA8C,EACzD,MACA,gBACqF;CAiDrF,OAAO;EACL,iBAAA,GAAA,MAAA,cA7CC,cAAiC;GAChC,IAAI,WAAW,gBACb,OAAO,UAAU,eAAe,SAAS;GAI3C,IAAI,SAAS,UAAU;IACrB,IAAI,cAAc,IAChB,OAAO;IAET,MAAM,WAAW,OAAO,SAAS;IACjC,OAAQ,OAAO,MAAM,QAAQ,IAAI,YAAY;GAC/C;GAGA,OAAQ,aAAa;EACvB,GACA,CAAC,MAAM,SAAS,CA4BH;EACb,cAAA,GAAA,MAAA,cAtBC,iBAAoC;GACnC,IAAI,WAAW,aACb,OAAO,UAAU,YAAY,YAAY;GAI3C,IAAI,SAAS,UAAU;IACrB,IAAI,iBAAiB,IACnB,OAAO;IAET,MAAM,WAAW,OAAO,YAAY;IACpC,OAAO,OAAO,MAAM,QAAQ,IAAI,eAAe;GACjD;GAGA,OAAO;EACT,GACA,CAAC,MAAM,SAAS,CAKN;CACZ;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as InputValueTransform } from "./useInputValueTransform-
|
|
2
|
-
import { r as useController$1 } from "./useController-
|
|
3
|
-
import { n as useFormContext$1 } from "./useFormContext-
|
|
4
|
-
import { t as useInput } from "./useInput-
|
|
1
|
+
import { t as InputValueTransform } from "./useInputValueTransform-C51LmUxi.js";
|
|
2
|
+
import { r as useController$1 } from "./useController-BK2AeY9L.js";
|
|
3
|
+
import { n as useFormContext$1 } from "./useFormContext-BYnHt6-m.js";
|
|
4
|
+
import { t as useInput } from "./useInput-Che-4SjF.js";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
6
|
import { FieldError, FieldValues, Path } from "react-hook-form";
|
|
7
7
|
|
|
@@ -95,4 +95,4 @@ interface UseUniformFieldReturn<TFieldValues extends FieldValues = FieldValues>
|
|
|
95
95
|
declare const useUniformField: <TFieldValues extends FieldValues = FieldValues, TDisplay = unknown>(params: UseUniformFieldParams<TFieldValues, TDisplay>) => UseUniformFieldReturn<TFieldValues>;
|
|
96
96
|
//#endregion
|
|
97
97
|
export { UseUniformFieldReturn as n, useUniformField as r, UseUniformFieldParams as t };
|
|
98
|
-
//# sourceMappingURL=useUniformField-
|
|
98
|
+
//# sourceMappingURL=useUniformField-B3Dj8K5J.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUniformField-
|
|
1
|
+
{"version":3,"file":"useUniformField-B3Dj8K5J.d.ts","names":[],"sources":["../src/hooks/useUniformField/useUniformField.tsx"],"mappings":";;;;;;;;UAgBiB,qBAAA,sBACM,WAAA,GAAc,WAAA;;EAInC,IAAA,EAAM,IAAA,CAAK,YAAA;EALyB;EAOpC,SAAA;EANqB;EAQrB,QAAA;EAJW;EAMX,KAAA,GAAQ,SAAA;EAAA;EAER,MAAA;EAEY;EAAZ,SAAA,GAAY,mBAAA,CAAoB,QAAA;EAAD;EAE/B,IAAA;AAAA;AAAA,UAGe,qBAAA,sBACM,WAAA,GAAc,WAAA;EAnBnC;EAsBA,SAAA;EAnBM;EAqBN,OAAA,EAAS,UAAA,QAAkB,gBAAA,CAAe,YAAA;EAnB1C;EAqBA,SAAA,EAAW,UAAA,QAAkB,gBAAA,CAAe,YAAA;EAjB5C;EAmBA,YAAA;EAjBA;EAmBA,QAAA;EAjBY;EAmBZ,KAAA,EAAO,UAAA;EAjBP;EAmBA,YAAA,EAAc,SAAA;EAnBV;EAqBJ,KAAA,EAAO,UAAA,QAAkB,eAAA,CAAc,YAAA;EAlBH;EAoBpC,oBAAA,EAAsB,UAAA,QAAkB,QAAA;EAnBnB;EAqBrB,qBAAA,EAAuB,UAAA,QAAkB,QAAA;EAhBC;EAkB1C,aAAA,EAAe,UAAA,QAAkB,QAAA;EAlBxB;EAoBT,SAAA,EAAW,UAAA,QAAkB,gBAAA,CAAe,YAAA;EAlBf;EAoB7B,OAAA;EAdO;EAgBP,KAAA,EAAO,SAAA;EAZgC;EAcvC,MAAA,EAAQ,UAAA,QAAkB,eAAA,CAAc,YAAA;EAdjC;EAgBP,QAAA,EAAU,UAAA,QAAkB,eAAA,CAAc,YAAA;EAdpB;EAgBtB,GAAA,EAAK,UAAA,QAAkB,eAAA,CAAc,YAAA;EAdd;EAgBvB,QAAA;EAde;EAgBf,UAAA,EAAY,UAAA,QAAkB,gBAAA,CAAe,YAAA;EAdhB;EAgB7B,MAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BW,eAAA,wBACU,WAAA,GAAc,WAAA,sBAGnC,MAAA,EAAQ,qBAAA,CAAsB,YAAA,EAAc,QAAA,MAC3C,qBAAA,CAAsB,YAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as InputValueTransform } from "./useInputValueTransform-
|
|
2
|
-
import { r as useController } from "./useController-
|
|
3
|
-
import { n as useFormContext } from "./useFormContext-
|
|
4
|
-
import { t as useInput } from "./useInput-
|
|
1
|
+
import { t as InputValueTransform } from "./useInputValueTransform-CNCBU7a9.cjs";
|
|
2
|
+
import { r as useController } from "./useController-kxcnnsXy.cjs";
|
|
3
|
+
import { n as useFormContext } from "./useFormContext-JE8dwbCT.cjs";
|
|
4
|
+
import { t as useInput } from "./useInput-8kDcm77k.cjs";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
6
|
import { FieldError, FieldValues, Path } from "react-hook-form";
|
|
7
7
|
|
|
@@ -95,4 +95,4 @@ interface UseUniformFieldReturn<TFieldValues extends FieldValues = FieldValues>
|
|
|
95
95
|
declare const useUniformField: <TFieldValues extends FieldValues = FieldValues, TDisplay = unknown>(params: UseUniformFieldParams<TFieldValues, TDisplay>) => UseUniformFieldReturn<TFieldValues>;
|
|
96
96
|
//#endregion
|
|
97
97
|
export { UseUniformFieldReturn as n, useUniformField as r, UseUniformFieldParams as t };
|
|
98
|
-
//# sourceMappingURL=useUniformField-
|
|
98
|
+
//# sourceMappingURL=useUniformField-BWKBsUEX.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUniformField-
|
|
1
|
+
{"version":3,"file":"useUniformField-BWKBsUEX.d.cts","names":[],"sources":["../src/hooks/useUniformField/useUniformField.tsx"],"mappings":";;;;;;;;UAgBiB,qBAAA,sBACM,WAAA,GAAc,WAAA;;EAInC,IAAA,EAAM,IAAA,CAAK,YAAA;EALyB;EAOpC,SAAA;EANqB;EAQrB,QAAA;EAJW;EAMX,KAAA,GAAQ,SAAA;EAAA;EAER,MAAA;EAEY;EAAZ,SAAA,GAAY,mBAAA,CAAoB,QAAA;EAAD;EAE/B,IAAA;AAAA;AAAA,UAGe,qBAAA,sBACM,WAAA,GAAc,WAAA;EAnBnC;EAsBA,SAAA;EAnBM;EAqBN,OAAA,EAAS,UAAA,QAAkB,cAAA,CAAe,YAAA;EAnB1C;EAqBA,SAAA,EAAW,UAAA,QAAkB,cAAA,CAAe,YAAA;EAjB5C;EAmBA,YAAA;EAjBA;EAmBA,QAAA;EAjBY;EAmBZ,KAAA,EAAO,UAAA;EAjBP;EAmBA,YAAA,EAAc,SAAA;EAnBV;EAqBJ,KAAA,EAAO,UAAA,QAAkB,aAAA,CAAc,YAAA;EAlBH;EAoBpC,oBAAA,EAAsB,UAAA,QAAkB,QAAA;EAnBnB;EAqBrB,qBAAA,EAAuB,UAAA,QAAkB,QAAA;EAhBC;EAkB1C,aAAA,EAAe,UAAA,QAAkB,QAAA;EAlBxB;EAoBT,SAAA,EAAW,UAAA,QAAkB,cAAA,CAAe,YAAA;EAlBf;EAoB7B,OAAA;EAdO;EAgBP,KAAA,EAAO,SAAA;EAZgC;EAcvC,MAAA,EAAQ,UAAA,QAAkB,aAAA,CAAc,YAAA;EAdjC;EAgBP,QAAA,EAAU,UAAA,QAAkB,aAAA,CAAc,YAAA;EAdpB;EAgBtB,GAAA,EAAK,UAAA,QAAkB,aAAA,CAAc,YAAA;EAdd;EAgBvB,QAAA;EAde;EAgBf,UAAA,EAAY,UAAA,QAAkB,cAAA,CAAe,YAAA;EAdhB;EAgB7B,MAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+BW,eAAA,wBACU,WAAA,GAAc,WAAA,sBAGnC,MAAA,EAAQ,qBAAA,CAAsB,YAAA,EAAc,QAAA,MAC3C,qBAAA,CAAsB,YAAA"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { r as useController$1 } from "./useController-
|
|
2
|
-
import { n as useFormContext$1 } from "./useFormContext-
|
|
1
|
+
import { r as useController$1 } from "./useController-BK2AeY9L.js";
|
|
2
|
+
import { n as useFormContext$1 } from "./useFormContext-BYnHt6-m.js";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
|
-
import * as _$react_hook_form0 from "react-hook-form";
|
|
5
4
|
import { ArrayPath, FieldValues } from "react-hook-form";
|
|
6
|
-
import * as _$_heroui_input0 from "@heroui/input";
|
|
7
5
|
|
|
8
6
|
//#region src/hooks/useUniformFieldArray/useUniformFieldArray.d.ts
|
|
9
7
|
interface UseUniformFieldArrayProps<TFieldValues extends FieldValues = FieldValues> {
|
|
@@ -44,36 +42,36 @@ declare const useUniformFieldArray: <TFieldValues extends FieldValues = FieldVal
|
|
|
44
42
|
label
|
|
45
43
|
}: UseUniformFieldArrayProps<TFieldValues>) => {
|
|
46
44
|
ariaLabel: string | undefined;
|
|
47
|
-
control:
|
|
45
|
+
control: import("react-hook-form").Control<TFieldValues, any, TFieldValues>;
|
|
48
46
|
debugMode: ReturnType<typeof useFormContext$1<TFieldValues_1>>["debugMode"];
|
|
49
47
|
defaultValue: unknown;
|
|
50
48
|
disabled: boolean | undefined;
|
|
51
|
-
error:
|
|
49
|
+
error: import("react-hook-form").FieldError[] | undefined;
|
|
52
50
|
errorMessage: ReactNode | null;
|
|
53
|
-
field: Omit<
|
|
51
|
+
field: Omit<import("react-hook-form").ControllerRenderProps<TFieldValues>, "onChange" | "value"> & {
|
|
54
52
|
onChange: (...event: any[]) => void;
|
|
55
53
|
value: string;
|
|
56
54
|
};
|
|
57
|
-
getErrorMessageProps: ReturnType<typeof
|
|
58
|
-
getHelperWrapperProps: ReturnType<typeof
|
|
59
|
-
getLabelProps: ReturnType<typeof
|
|
60
|
-
getValues:
|
|
55
|
+
getErrorMessageProps: ReturnType<typeof import("@heroui/input").useInput>["getErrorMessageProps"];
|
|
56
|
+
getHelperWrapperProps: ReturnType<typeof import("@heroui/input").useInput>["getHelperWrapperProps"];
|
|
57
|
+
getLabelProps: ReturnType<typeof import("@heroui/input").useInput>["getLabelProps"];
|
|
58
|
+
getValues: import("react-hook-form").UseFormGetValues<TFieldValues>;
|
|
61
59
|
invalid: boolean;
|
|
62
60
|
label: ReactNode | null;
|
|
63
61
|
onBlur: ReturnType<typeof useController$1>["field"]["onBlur"];
|
|
64
62
|
onChange: ReturnType<typeof useController$1>["field"]["onChange"];
|
|
65
63
|
ref: ReturnType<typeof useController$1>["field"]["ref"];
|
|
66
64
|
required: boolean;
|
|
67
|
-
resetField:
|
|
65
|
+
resetField: import("react-hook-form").UseFormResetField<TFieldValues>;
|
|
68
66
|
testId: string;
|
|
69
|
-
fields:
|
|
70
|
-
append:
|
|
71
|
-
remove:
|
|
72
|
-
insert:
|
|
73
|
-
move:
|
|
67
|
+
fields: import("react-hook-form").FieldArrayWithId<TFieldValues, ArrayPath<TFieldValues>, "id">[];
|
|
68
|
+
append: import("react-hook-form").UseFieldArrayAppend<TFieldValues, ArrayPath<TFieldValues>>;
|
|
69
|
+
remove: import("react-hook-form").UseFieldArrayRemove;
|
|
70
|
+
insert: import("react-hook-form").UseFieldArrayInsert<TFieldValues, ArrayPath<TFieldValues>>;
|
|
71
|
+
move: import("react-hook-form").UseFieldArrayMove;
|
|
74
72
|
disableAnimation: boolean;
|
|
75
73
|
elementInitialValue: {};
|
|
76
74
|
};
|
|
77
75
|
//#endregion
|
|
78
76
|
export { useUniformFieldArray as n, UseUniformFieldArrayProps as t };
|
|
79
|
-
//# sourceMappingURL=useUniformFieldArray-
|
|
77
|
+
//# sourceMappingURL=useUniformFieldArray-C0U3eBr7.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUniformFieldArray-C0U3eBr7.d.ts","names":[],"sources":["../src/hooks/useUniformFieldArray/useUniformFieldArray.ts"],"mappings":";;;;;;UAYiB,yBAAA,sBACM,WAAA,GAAc,WAAA;;EAGnC,IAAA,EAAM,SAAA,CAAU,YAAA;;EAEhB,IAAA;EANe;EAQf,mBAAA;EARwC;EAUxC,uBAAA;EATmC;EAWnC,QAAA;EARM;EAUN,MAAA;EAEiB;EAAjB,KAAA,GAAQ,SAAA;AAAA;;;;;;;;;;;;;cAeG,oBAAA,wBACU,WAAA,GAAc,WAAA;EACnC,IAAA;EAAA,IAAA;EAAA,mBAAA,EAAA,oBAAA;EAAA,uBAAA;EAAA,QAAA;EAAA,MAAA,EAAA,cAAA;EAAA;AAAA,GAQC,yBAAA,CAA0B,YAAA;;;;;;;;;kBAhC+B,KAAA;;;;;;;;;UAqExB,UAAA;YAEX,UAAA,QAFW,eAAA;OAKzB,UAAA,QAHc,eAAA"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { r as useController } from "./useController-
|
|
2
|
-
import { n as useFormContext } from "./useFormContext-
|
|
1
|
+
import { r as useController } from "./useController-kxcnnsXy.cjs";
|
|
2
|
+
import { n as useFormContext } from "./useFormContext-JE8dwbCT.cjs";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
|
-
import * as _$react_hook_form0 from "react-hook-form";
|
|
5
4
|
import { ArrayPath, FieldValues } from "react-hook-form";
|
|
6
|
-
import * as _$_heroui_input0 from "@heroui/input";
|
|
7
5
|
|
|
8
6
|
//#region src/hooks/useUniformFieldArray/useUniformFieldArray.d.ts
|
|
9
7
|
interface UseUniformFieldArrayProps<TFieldValues extends FieldValues = FieldValues> {
|
|
@@ -44,36 +42,36 @@ declare const useUniformFieldArray: <TFieldValues extends FieldValues = FieldVal
|
|
|
44
42
|
label
|
|
45
43
|
}: UseUniformFieldArrayProps<TFieldValues>) => {
|
|
46
44
|
ariaLabel: string | undefined;
|
|
47
|
-
control:
|
|
45
|
+
control: import("react-hook-form").Control<TFieldValues, any, TFieldValues>;
|
|
48
46
|
debugMode: ReturnType<typeof useFormContext<TFieldValues_1>>["debugMode"];
|
|
49
47
|
defaultValue: unknown;
|
|
50
48
|
disabled: boolean | undefined;
|
|
51
|
-
error:
|
|
49
|
+
error: import("react-hook-form").FieldError[] | undefined;
|
|
52
50
|
errorMessage: ReactNode | null;
|
|
53
|
-
field: Omit<
|
|
51
|
+
field: Omit<import("react-hook-form").ControllerRenderProps<TFieldValues>, "onChange" | "value"> & {
|
|
54
52
|
onChange: (...event: any[]) => void;
|
|
55
53
|
value: string;
|
|
56
54
|
};
|
|
57
|
-
getErrorMessageProps: ReturnType<typeof
|
|
58
|
-
getHelperWrapperProps: ReturnType<typeof
|
|
59
|
-
getLabelProps: ReturnType<typeof
|
|
60
|
-
getValues:
|
|
55
|
+
getErrorMessageProps: ReturnType<typeof import("@heroui/input").useInput>["getErrorMessageProps"];
|
|
56
|
+
getHelperWrapperProps: ReturnType<typeof import("@heroui/input").useInput>["getHelperWrapperProps"];
|
|
57
|
+
getLabelProps: ReturnType<typeof import("@heroui/input").useInput>["getLabelProps"];
|
|
58
|
+
getValues: import("react-hook-form").UseFormGetValues<TFieldValues>;
|
|
61
59
|
invalid: boolean;
|
|
62
60
|
label: ReactNode | null;
|
|
63
61
|
onBlur: ReturnType<typeof useController>["field"]["onBlur"];
|
|
64
62
|
onChange: ReturnType<typeof useController>["field"]["onChange"];
|
|
65
63
|
ref: ReturnType<typeof useController>["field"]["ref"];
|
|
66
64
|
required: boolean;
|
|
67
|
-
resetField:
|
|
65
|
+
resetField: import("react-hook-form").UseFormResetField<TFieldValues>;
|
|
68
66
|
testId: string;
|
|
69
|
-
fields:
|
|
70
|
-
append:
|
|
71
|
-
remove:
|
|
72
|
-
insert:
|
|
73
|
-
move:
|
|
67
|
+
fields: import("react-hook-form").FieldArrayWithId<TFieldValues, ArrayPath<TFieldValues>, "id">[];
|
|
68
|
+
append: import("react-hook-form").UseFieldArrayAppend<TFieldValues, ArrayPath<TFieldValues>>;
|
|
69
|
+
remove: import("react-hook-form").UseFieldArrayRemove;
|
|
70
|
+
insert: import("react-hook-form").UseFieldArrayInsert<TFieldValues, ArrayPath<TFieldValues>>;
|
|
71
|
+
move: import("react-hook-form").UseFieldArrayMove;
|
|
74
72
|
disableAnimation: boolean;
|
|
75
73
|
elementInitialValue: {};
|
|
76
74
|
};
|
|
77
75
|
//#endregion
|
|
78
76
|
export { useUniformFieldArray as n, UseUniformFieldArrayProps as t };
|
|
79
|
-
//# sourceMappingURL=useUniformFieldArray-
|
|
77
|
+
//# sourceMappingURL=useUniformFieldArray-RvOYml8h.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUniformFieldArray-RvOYml8h.d.cts","names":[],"sources":["../src/hooks/useUniformFieldArray/useUniformFieldArray.ts"],"mappings":";;;;;;UAYiB,yBAAA,sBACM,WAAA,GAAc,WAAA;;EAGnC,IAAA,EAAM,SAAA,CAAU,YAAA;;EAEhB,IAAA;EANe;EAQf,mBAAA;EARwC;EAUxC,uBAAA;EATmC;EAWnC,QAAA;EARM;EAUN,MAAA;EAEiB;EAAjB,KAAA,GAAQ,SAAA;AAAA;;;;;;;;;;;;;cAeG,oBAAA,wBACU,WAAA,GAAc,WAAA;EACnC,IAAA;EAAA,IAAA;EAAA,mBAAA,EAAA,oBAAA;EAAA,uBAAA;EAAA,QAAA;EAAA,MAAA,EAAA,cAAA;EAAA;AAAA,GAQC,yBAAA,CAA0B,YAAA;;;;;;;;;kBAhC+B,KAAA;;;;;;;;;UAqExB,UAAA;YAEX,UAAA,QAFW,aAAA;OAKzB,UAAA,QAHc,aAAA"}
|
|
@@ -77,4 +77,4 @@ declare const useWatchUserChange: <TFieldValues extends FieldValues = FieldValue
|
|
|
77
77
|
}: UseWatchUserChangeOptions<TFieldValues>) => void;
|
|
78
78
|
//#endregion
|
|
79
79
|
export { useWatchUserChange as n, UseWatchUserChangeOptions as t };
|
|
80
|
-
//# sourceMappingURL=useWatchUserChange-
|
|
80
|
+
//# sourceMappingURL=useWatchUserChange-26IF7Ikq.d.cts.map
|
package/dist/{useWatchUserChange-CZu_ZZ38.d.cts.map → useWatchUserChange-26IF7Ikq.d.cts.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWatchUserChange-
|
|
1
|
+
{"version":3,"file":"useWatchUserChange-26IF7Ikq.d.cts","names":[],"sources":["../src/hooks/useWatchUserChange/useWatchUserChange.ts"],"mappings":";;;UAYiB,yBAAA,sBAA+C,WAAA;;EAE9D,KAAA,EAAO,IAAA,CAAK,YAAA;EAF4B;;;;EAOxC,QAAA,GACE,KAAA,WACA,OAAA;IACE,QAAA,EAAU,eAAA,CAAgB,YAAA;IAC1B,UAAA,EAAY,iBAAA,CAAkB,YAAA;IAC9B,KAAA,EAAO,YAAA,CAAa,YAAA;EAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;AACrB;AA6DL;;;;;;;;;;;;;;;;;;;;;AAKyC;;;;;;;;;;;;;;cAL5B,kBAAA,wBACU,WAAA,GAAc,WAAA;EACnC,KAAA,EAAA,UAAA;EAAA;AAAA,GAGC,yBAAA,CAA0B,YAAA"}
|