@povio/ui 3.4.0-rc.40 → 3.4.0-rc.41
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/{Autocomplete-CWiSRejc.d.ts → Autocomplete-CLcRRdiL.d.ts} +2 -2
- package/dist/{Checkbox-DUz32jLa.js → Checkbox-B-0yFzun.js} +1 -1
- package/dist/{Checkbox-BIZoNFiX.d.ts → Checkbox-DC_1l0o7.d.ts} +2 -2
- package/dist/{CheckboxGroup-U4poUqlk.d.ts → CheckboxGroup-DnWeRs5l.d.ts} +2 -2
- package/dist/{DatePicker-DWnzyBQD.js → DatePicker-DGwt7GCK.js} +1 -1
- package/dist/{DatePicker-IZwn9hAk.d.ts → DatePicker-aWuhaUgu.d.ts} +2 -2
- package/dist/{DateRangePicker-DLuRwuw1.d.ts → DateRangePicker-DpKWDDlC.d.ts} +2 -2
- package/dist/{DateRangePicker-BEluwe3q.js → DateRangePicker-DtYmxrBu.js} +3 -3
- package/dist/{DateTimePicker-C6DZnWcp.js → DateTimePicker-B3j96T4e.js} +1 -1
- package/dist/{DateTimePicker-Co6UXSVA.d.ts → DateTimePicker-BoTa_gTC.d.ts} +2 -2
- package/dist/{FileUpload-B1L78k7y.d.ts → FileUpload-Czof_aOb.d.ts} +2 -2
- package/dist/{FileUpload-DYGyICVb.js → FileUpload-DR9qkDTO.js} +1 -1
- package/dist/{FileUploadContainer-CLPREIin.d.ts → FileUploadContainer--YlhZO19.d.ts} +1 -1
- package/dist/{Form-fI9WMU9d.d.ts → Form-BjwyXqkN.d.ts} +2 -2
- package/dist/{InputItem-122JkDYJ.js → InputItem-DfNvJtim.js} +11 -11
- package/dist/{InputUpload-RPnj3b1Y.d.ts → InputUpload-D-C-886F.d.ts} +2 -2
- package/dist/{InputUpload-BBb6TzVi.js → InputUpload-DiSrhJaH.js} +1 -1
- package/dist/{Inputs-BT0CNY2g.js → Inputs-CO_mXGA2.js} +1 -1
- package/dist/{Inputs-a9CXrVRS.d.ts → Inputs-CwkP8B9O.d.ts} +2 -2
- package/dist/{NumberInput-gqs4vYJf.d.ts → NumberInput-BIRmzsPb.d.ts} +2 -2
- package/dist/{NumberRangeInput-CMHI9yks.d.ts → NumberRangeInput-1vdHmE8h.d.ts} +2 -2
- package/dist/{NumberRangeInput-C--wO5KF.js → NumberRangeInput-DVBv04ap.js} +1 -1
- package/dist/{PasswordInput-CcoU8g5c.d.ts → PasswordInput-DNUEWDEM.d.ts} +3 -3
- package/dist/{QuerySelect-D_vXxG1S.d.ts → QuerySelect-vWifN5XC.d.ts} +3 -3
- package/dist/{RadioGroup-oU2t4qb_.js → RadioGroup-D5BR8ToV.js} +1 -1
- package/dist/{RadioGroup-Cs718lkQ.d.ts → RadioGroup-Dd7xBSCW.d.ts} +2 -2
- package/dist/{Segment-C_Vbrl9f.d.ts → Segment-BZdZb436.d.ts} +2 -2
- package/dist/{Segment-BAVcQyuY.js → Segment-DBEeDt5Z.js} +1 -1
- package/dist/{Select-DIso4xMG.d.ts → Select-Bm2C6tHz.d.ts} +2 -2
- package/dist/{Select-DxHs-Mtq.js → Select-CEAQyS48.js} +1 -1
- package/dist/{SelectBase-72enBk-1.d.ts → SelectBase-DD8_4B-r.d.ts} +2 -2
- package/dist/{Slider-Baw84mjN.d.ts → Slider-C6UeThGK.d.ts} +2 -2
- package/dist/{Slider-BaPUnnLF.js → Slider-DeLVCO-2.js} +1 -1
- package/dist/{TextArea-vdp0uSFx.d.ts → TextArea-B8Yvkkxr.d.ts} +2 -2
- package/dist/{TextArea-DGf6by6e.js → TextArea-Dj2wKadV.js} +1 -1
- package/dist/{TextEditor-D18y8_ro.js → TextEditor-CKUiV4cU.js} +2 -2
- package/dist/{TextEditor-B7vdoTeN.d.ts → TextEditor-DILzgUAj.d.ts} +2 -2
- package/dist/{TextInput-Dxq5XKdp.d.ts → TextInput-Df0Pkuk-.d.ts} +2 -2
- package/dist/{TimePicker-D1ptdYlJ.js → TimePicker-BPLc1Uv5.js} +1 -1
- package/dist/{TimePicker-B_atBC0F.d.ts → TimePicker-Bdz_yJ0I.d.ts} +2 -2
- package/dist/{Toggle-CaBvb0l0.d.ts → Toggle-Ca_t66zh.d.ts} +2 -2
- package/dist/{Toggle-JHUOY2Mh.js → Toggle-Dr7TQZ93.js} +1 -1
- package/dist/{autocomplete-CQqxdk49.d.ts → autocomplete-CIDaulwN.d.ts} +2 -2
- package/dist/{checkbox-Dx7xlf6g.d.ts → checkbox-4smu5B-h.d.ts} +1 -1
- package/dist/{checkbox-group-C4afLmyg.d.ts → checkbox-group-C55R3YH5.d.ts} +1 -1
- package/dist/components/autocomplete.d.ts +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/checkbox-group.d.ts +1 -1
- package/dist/components/checkbox-group.js +2 -2
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/date-picker.d.ts +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.d.ts +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.d.ts +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/file-upload-container.d.ts +2 -2
- package/dist/components/file-upload-container.js +1 -1
- package/dist/components/file-upload.d.ts +2 -2
- package/dist/components/file-upload.js +1 -1
- package/dist/components/input-upload.d.ts +1 -1
- package/dist/components/input-upload.js +1 -1
- package/dist/components/number-input.d.ts +1 -1
- package/dist/components/number-input.js +1 -1
- package/dist/components/number-range-input.d.ts +1 -1
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/password-input.d.ts +1 -1
- package/dist/components/query-autocomplete.d.ts +3 -3
- package/dist/components/query-autocomplete.js +1 -1
- package/dist/components/query-select.d.ts +1 -1
- package/dist/components/query-select.js +2 -2
- package/dist/components/radio-group.d.ts +1 -1
- package/dist/components/radio-group.js +1 -1
- package/dist/components/segment.d.ts +2 -2
- package/dist/components/segment.js +1 -1
- package/dist/components/select.d.ts +2 -2
- package/dist/components/select.js +1 -1
- package/dist/components/slider.d.ts +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/text-area.d.ts +1 -1
- package/dist/components/text-area.js +1 -1
- package/dist/components/text-input.d.ts +1 -1
- package/dist/components/text-input.js +1 -1
- package/dist/components/time-picker.d.ts +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toggle.d.ts +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/config/ui-config.d.ts +1 -1
- package/dist/{date-picker-BT9DHqNa.d.ts → date-picker-g50NliUB.d.ts} +1 -1
- package/dist/{date-range-picker-VxlXnCVb.d.ts → date-range-picker-4EXSwE8B.d.ts} +1 -1
- package/dist/{date-time-picker-HxtcGQjQ.d.ts → date-time-picker-Bjag5nQ1.d.ts} +1 -1
- package/dist/{dynamicInputs-Be0THQ7Z.d.ts → dynamicInputs-p4ATehFR.d.ts} +47 -47
- package/dist/{file-upload-CNJFJ3Jx.d.ts → file-upload-Ba6NwH0N.d.ts} +2 -2
- package/dist/{fileUpload.types-BMs6Zkhr.d.ts → fileUpload.types-ZUblxJUi.d.ts} +2 -2
- package/dist/{form.binding-QO3Py45C.d.ts → form.binding-Cu03pQ8Y.d.ts} +1 -1
- package/dist/form.binding-DLKteDiq.js +157 -0
- package/dist/{form.types-CefwT7Po.d.ts → form.types-qEwMTXTZ.d.ts} +1 -1
- package/dist/index.d.ts +44 -44
- package/dist/index.js +7 -7
- package/dist/{input-upload-D3IM2ZuK.d.ts → input-upload-BxRgcRt4.d.ts} +1 -1
- package/dist/{number-input-nwfbc3kN.d.ts → number-input-BoUfnoR2.d.ts} +1 -1
- package/dist/{number-range-input-BxoPQzi8.d.ts → number-range-input-43A63EzS.d.ts} +1 -1
- package/dist/{password-input-BEneLWqN.d.ts → password-input-BPAjcIly.d.ts} +1 -1
- package/dist/{query-autocomplete-rqGMbEP9.d.ts → query-autocomplete-Dh1Yeu4p.d.ts} +2 -2
- package/dist/{query-select-DbQpRcE3.d.ts → query-select-7lNZcE_x.d.ts} +2 -2
- package/dist/{queryAutocomplete.types-Cnn4GjUo.d.ts → queryAutocomplete.types-D7SmWVq-.d.ts} +3 -3
- package/dist/{radio-group-Cc6b39Jt.d.ts → radio-group-DmilCTsI.d.ts} +1 -1
- package/dist/rhf/autocomplete.d.ts +2 -2
- package/dist/rhf/checkbox-group.d.ts +2 -2
- package/dist/rhf/checkbox.d.ts +2 -2
- package/dist/rhf/checkbox.js +1 -1
- package/dist/rhf/date-picker.d.ts +2 -2
- package/dist/rhf/date-picker.js +1 -1
- package/dist/rhf/date-range-picker.d.ts +2 -2
- package/dist/rhf/date-range-picker.js +1 -1
- package/dist/rhf/date-time-picker.d.ts +2 -2
- package/dist/rhf/date-time-picker.js +1 -1
- package/dist/rhf/file-upload.d.ts +2 -2
- package/dist/rhf/file-upload.js +1 -1
- package/dist/rhf/input-upload.d.ts +2 -2
- package/dist/rhf/input-upload.js +1 -1
- package/dist/rhf/inputs.d.ts +1 -1
- package/dist/rhf/number-input.d.ts +2 -2
- package/dist/rhf/number-range-input.d.ts +2 -2
- package/dist/rhf/number-range-input.js +1 -1
- package/dist/rhf/password-input.d.ts +2 -2
- package/dist/rhf/query-autocomplete.d.ts +1 -1
- package/dist/rhf/query-select.d.ts +1 -1
- package/dist/rhf/radio-group.d.ts +2 -2
- package/dist/rhf/radio-group.js +1 -1
- package/dist/rhf/segment.d.ts +2 -2
- package/dist/rhf/segment.js +1 -1
- package/dist/rhf/select.d.ts +2 -2
- package/dist/rhf/select.js +1 -1
- package/dist/rhf/slider.d.ts +2 -2
- package/dist/rhf/slider.js +1 -1
- package/dist/rhf/text-area.d.ts +2 -2
- package/dist/rhf/text-area.js +1 -1
- package/dist/rhf/text-editor.d.ts +2 -2
- package/dist/rhf/text-editor.js +1 -1
- package/dist/rhf/text-input.d.ts +2 -2
- package/dist/rhf/time-picker.d.ts +2 -2
- package/dist/rhf/time-picker.js +1 -1
- package/dist/rhf/toggle.d.ts +2 -2
- package/dist/rhf/toggle.js +1 -1
- package/dist/rhf.d.ts +44 -44
- package/dist/rhf.js +7 -7
- package/dist/{segment-Csrt70e1.d.ts → segment-BOELlo1K.d.ts} +1 -1
- package/dist/{segment.types-BAFG_n38.d.ts → segment.types-BYTmg69p.d.ts} +2 -2
- package/dist/{select-v-_bJmJ_.d.ts → select-CD3fNAgK.d.ts} +2 -2
- package/dist/{slider-B2wS9JNA.d.ts → slider-tx1tub5d.d.ts} +1 -1
- package/dist/tanstack/autocomplete.d.ts +1 -1
- package/dist/tanstack/checkbox-group.d.ts +1 -1
- package/dist/tanstack/checkbox.d.ts +1 -1
- package/dist/tanstack/checkbox.js +1 -1
- package/dist/tanstack/date-picker.d.ts +1 -1
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.d.ts +1 -1
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.d.ts +1 -1
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-upload.d.ts +2 -2
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.d.ts +2 -2
- package/dist/tanstack/form.js +2 -1
- package/dist/tanstack/input-upload.d.ts +1 -1
- package/dist/tanstack/input-upload.js +1 -1
- package/dist/tanstack/inputs.d.ts +2 -2
- package/dist/tanstack/inputs.js +1 -1
- package/dist/tanstack/number-input.d.ts +1 -1
- package/dist/tanstack/number-range-input.d.ts +1 -1
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/password-input.d.ts +1 -1
- package/dist/tanstack/query-select.d.ts +1 -1
- package/dist/tanstack/radio-group.d.ts +1 -1
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/segment.d.ts +2 -2
- package/dist/tanstack/segment.js +1 -1
- package/dist/tanstack/select.d.ts +1 -1
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.d.ts +1 -1
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/table.d.ts +1 -1
- package/dist/tanstack/table.js +1 -1
- package/dist/tanstack/text-area.d.ts +1 -1
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/text-editor.d.ts +1 -1
- package/dist/tanstack/text-editor.js +1 -1
- package/dist/tanstack/text-input.d.ts +1 -1
- package/dist/tanstack/time-picker.d.ts +1 -1
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle.d.ts +1 -1
- package/dist/tanstack/toggle.js +1 -1
- package/dist/tanstack.d.ts +29 -29
- package/dist/tanstack.js +18 -17
- package/dist/{text-area-CYY-d5HB.d.ts → text-area-kb2PxyJb.d.ts} +1 -1
- package/dist/{text-editor-Bz57chW2.d.ts → text-editor-CDECpKqj.d.ts} +1 -1
- package/dist/text-editor.d.ts +1 -1
- package/dist/text-editor.js +1 -1
- package/dist/{text-input-CkMv3VpB.d.ts → text-input-VqRJ0y7Y.d.ts} +1 -1
- package/dist/{time-picker-CjqmM5sQ.d.ts → time-picker-BYfudvVK.d.ts} +1 -1
- package/dist/{toggle-BYNFK_xQ.d.ts → toggle-DK5CDOtt.d.ts} +1 -1
- package/dist/{useFormAutosave-DTv1J6w2.js → useFormAutosave-Ckq-Qb34.js} +4 -102
- package/dist/{useTableColumnConfig-DzdaxZ50.js → useTableColumnConfig-C6mWcIwp.js} +1 -1
- package/dist/{useTableNav-DZjPiQUb.d.ts → useTableNav-aDO5L4da.d.ts} +1 -1
- package/package.json +5 -1
- package/dist/form.binding-DyZ4fH8l.js +0 -34
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as DateTimePicker, r as DateTimePickerProps, t as ControlledDateTimePickerProps } from "../DateTimePicker-
|
|
1
|
+
import { n as DateTimePicker, r as DateTimePickerProps, t as ControlledDateTimePickerProps } from "../DateTimePicker-BoTa_gTC.js";
|
|
2
2
|
export { type ControlledDateTimePickerProps, DateTimePicker, type DateTimePickerProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as DateTimePicker } from "../DateTimePicker-
|
|
1
|
+
import { t as DateTimePicker } from "../DateTimePicker-B3j96T4e.js";
|
|
2
2
|
export { DateTimePicker };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as FileUploadContainerProps } from "../fileUpload.types-
|
|
2
|
-
import { t as FileUploadContainer } from "../FileUploadContainer
|
|
1
|
+
import { i as FileUploadContainerProps } from "../fileUpload.types-ZUblxJUi.js";
|
|
2
|
+
import { t as FileUploadContainer } from "../FileUploadContainer--YlhZO19.js";
|
|
3
3
|
export { FileUploadContainer, type FileUploadContainerProps };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as FileUploadError, c as FileUploadResponse, l as FileUploadState, n as FileUploadBaseProps, o as FileUploadProps, r as FileUploadButtonProps, s as FileUploadRequest, t as DefaultFile } from "../fileUpload.types-
|
|
2
|
-
import { t as FileUpload } from "../FileUpload-
|
|
1
|
+
import { a as FileUploadError, c as FileUploadResponse, l as FileUploadState, n as FileUploadBaseProps, o as FileUploadProps, r as FileUploadButtonProps, s as FileUploadRequest, t as DefaultFile } from "../fileUpload.types-ZUblxJUi.js";
|
|
2
|
+
import { t as FileUpload } from "../FileUpload-Czof_aOb.js";
|
|
3
3
|
export { type DefaultFile, FileUpload, type FileUploadBaseProps, type FileUploadButtonProps, type FileUploadError, type FileUploadProps, type FileUploadRequest, type FileUploadResponse, type FileUploadState };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as FileUpload } from "../FileUpload-
|
|
1
|
+
import { t as FileUpload } from "../FileUpload-DR9qkDTO.js";
|
|
2
2
|
export { FileUpload };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as InputUploadBaseProps, r as InputUploadProps, t as InputUpload } from "../InputUpload-
|
|
1
|
+
import { n as InputUploadBaseProps, r as InputUploadProps, t as InputUpload } from "../InputUpload-D-C-886F.js";
|
|
2
2
|
export { InputUpload, type InputUploadBaseProps, type InputUploadProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as InputUpload } from "../InputUpload-
|
|
1
|
+
import { t as InputUpload } from "../InputUpload-DiSrhJaH.js";
|
|
2
2
|
export { InputUpload };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as NumberInputProps, n as NumberInput, r as NumberInputComponent, t as ControlledNumberInputProps } from "../NumberInput-
|
|
1
|
+
import { i as NumberInputProps, n as NumberInput, r as NumberInputComponent, t as ControlledNumberInputProps } from "../NumberInput-BIRmzsPb.js";
|
|
2
2
|
export { ControlledNumberInputProps, NumberInput, NumberInputComponent, NumberInputProps };
|
|
@@ -5,7 +5,7 @@ import { t as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../context-74MZZ
|
|
|
5
5
|
import { n as $81397a9303501bda$export$23f548e970bdf099, r as $de67e98908f0c6ee$export$7f629e9dc1ecf37c, t as getStaticNumberDisplayValue } from "../numberStatic.utils-DcnGigJ6.js";
|
|
6
6
|
import { n as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../Input-BefLtZJe.js";
|
|
7
7
|
import { t as UIOverrides } from "../uiOverrides.context-Bfm2n-n8.js";
|
|
8
|
-
import { t as FieldController } from "../form.binding-
|
|
8
|
+
import { t as FieldController } from "../form.binding-DLKteDiq.js";
|
|
9
9
|
import { t as FormField } from "../FormField-Cl-t5Wi1.js";
|
|
10
10
|
import { t as TooltipWrapper } from "../TooltipWrapper-CoRIizbz.js";
|
|
11
11
|
import { t as inputBaseDefinition } from "../input.cva-KYGD4Bdz.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as NumberRangeValue, n as NumberRangeInput, r as NumberRangeInputProps, t as ControlledNumberRangeInputProps } from "../NumberRangeInput-
|
|
1
|
+
import { i as NumberRangeValue, n as NumberRangeInput, r as NumberRangeInputProps, t as ControlledNumberRangeInputProps } from "../NumberRangeInput-1vdHmE8h.js";
|
|
2
2
|
export { ControlledNumberRangeInputProps, NumberRangeInput, NumberRangeInputProps, type NumberRangeValue };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as NumberRangeInput } from "../NumberRangeInput-
|
|
1
|
+
import { t as NumberRangeInput } from "../NumberRangeInput-DVBv04ap.js";
|
|
2
2
|
export { NumberRangeInput };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as PasswordInput, r as PasswordInputProps, t as ControlledPasswordInputProps } from "../PasswordInput-
|
|
1
|
+
import { n as PasswordInput, r as PasswordInputProps, t as ControlledPasswordInputProps } from "../PasswordInput-DNUEWDEM.js";
|
|
2
2
|
export { ControlledPasswordInputProps, PasswordInput, PasswordInputProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as FieldValues } from "../form.binding-
|
|
2
|
-
import { s as SelectItem } from "../SelectBase-
|
|
3
|
-
import { n as QueryFn, t as QueryAutocompleteProps } from "../queryAutocomplete.types-
|
|
1
|
+
import { n as FieldValues } from "../form.binding-Cu03pQ8Y.js";
|
|
2
|
+
import { s as SelectItem } from "../SelectBase-DD8_4B-r.js";
|
|
3
|
+
import { n as QueryFn, t as QueryAutocompleteProps } from "../queryAutocomplete.types-D7SmWVq-.js";
|
|
4
4
|
//#region src/components/inputs/Selection/Autocomplete/QueryAutocomplete.d.ts
|
|
5
5
|
declare const QueryAutocompleteComponent: <TFieldValues extends FieldValues, TSelectItem extends SelectItem<any>, TQueryFn extends QueryFn>(props: QueryAutocompleteProps<TFieldValues, TSelectItem, TQueryFn>) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
declare const QueryAutocomplete: typeof QueryAutocompleteComponent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as UIConfig } from "../uiConfig.context-BG4jfp9p.js";
|
|
2
2
|
import { f as $5dc95899b306f630$export$c9058316764c140e } from "../utils-D-KKbY-n.js";
|
|
3
|
-
import { t as FieldController } from "../form.binding-
|
|
3
|
+
import { t as FieldController } from "../form.binding-DLKteDiq.js";
|
|
4
4
|
import { Autocomplete } from "./autocomplete.js";
|
|
5
5
|
import { n as getQueryItems, r as getSelectionIdsToResolve, t as useQueryAutocomplete } from "../useQueryAutocomplete-CraXvRm_.js";
|
|
6
6
|
import { memo, useCallback, useMemo, useState } from "react";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as QuerySelectProps, t as QuerySelect } from "../QuerySelect-
|
|
1
|
+
import { n as QuerySelectProps, t as QuerySelect } from "../QuerySelect-vWifN5XC.js";
|
|
2
2
|
export { QuerySelect, QuerySelectProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as UIConfig } from "../uiConfig.context-BG4jfp9p.js";
|
|
2
2
|
import { f as $5dc95899b306f630$export$c9058316764c140e } from "../utils-D-KKbY-n.js";
|
|
3
|
-
import { t as FieldController } from "../form.binding-
|
|
4
|
-
import { t as Select } from "../Select-
|
|
3
|
+
import { t as FieldController } from "../form.binding-DLKteDiq.js";
|
|
4
|
+
import { t as Select } from "../Select-CEAQyS48.js";
|
|
5
5
|
import { n as getQueryItems, r as getSelectionIdsToResolve, t as useQueryAutocomplete } from "../useQueryAutocomplete-CraXvRm_.js";
|
|
6
6
|
import { memo, useCallback, useMemo, useState } from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as RadioGroup, r as RadioGroupProps, t as ControlledRadioGroupProps } from "../RadioGroup-
|
|
1
|
+
import { n as RadioGroup, r as RadioGroupProps, t as ControlledRadioGroupProps } from "../RadioGroup-Dd7xBSCW.js";
|
|
2
2
|
export { ControlledRadioGroupProps, RadioGroup, RadioGroupProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as RadioGroup } from "../RadioGroup-
|
|
1
|
+
import { t as RadioGroup } from "../RadioGroup-D5BR8ToV.js";
|
|
2
2
|
export { RadioGroup };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { o as SegmentProps, t as ControlledSegmentProps } from "../segment.types-
|
|
2
|
-
import { t as Segment } from "../Segment-
|
|
1
|
+
import { o as SegmentProps, t as ControlledSegmentProps } from "../segment.types-BYTmg69p.js";
|
|
2
|
+
import { t as Segment } from "../Segment-BZdZb436.js";
|
|
3
3
|
export { type ControlledSegmentProps, Segment, type SegmentProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Segment } from "../Segment-
|
|
1
|
+
import { t as Segment } from "../Segment-DBEeDt5Z.js";
|
|
2
2
|
export { Segment };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as SelectAsyncProps, o as SelectBaseProps, s as SelectItem, t as DefaultInitialSelectItem } from "../SelectBase-
|
|
2
|
-
import { n as Select, r as SelectProps, t as ControlledSelectProps } from "../Select-
|
|
1
|
+
import { a as SelectAsyncProps, o as SelectBaseProps, s as SelectItem, t as DefaultInitialSelectItem } from "../SelectBase-DD8_4B-r.js";
|
|
2
|
+
import { n as Select, r as SelectProps, t as ControlledSelectProps } from "../Select-Bm2C6tHz.js";
|
|
3
3
|
export { type ControlledSelectProps, type DefaultInitialSelectItem, Select, type SelectAsyncProps, type SelectBaseProps, type SelectItem, type SelectProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Select } from "../Select-
|
|
1
|
+
import { t as Select } from "../Select-CEAQyS48.js";
|
|
2
2
|
export { Select };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Slider, r as SliderProps, t as ControlledSliderProps } from "../Slider-
|
|
1
|
+
import { n as Slider, r as SliderProps, t as ControlledSliderProps } from "../Slider-C6UeThGK.js";
|
|
2
2
|
export { ControlledSliderProps, Slider, SliderProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Slider } from "../Slider-
|
|
1
|
+
import { t as Slider } from "../Slider-DeLVCO-2.js";
|
|
2
2
|
export { Slider };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TextArea, r as TextAreaProps, t as ControlledTextAreaProps } from "../TextArea-
|
|
1
|
+
import { n as TextArea, r as TextAreaProps, t as ControlledTextAreaProps } from "../TextArea-B8Yvkkxr.js";
|
|
2
2
|
export { ControlledTextAreaProps, TextArea, TextAreaProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TextArea } from "../TextArea-
|
|
1
|
+
import { t as TextArea } from "../TextArea-Dj2wKadV.js";
|
|
2
2
|
export { TextArea };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as TextInputProps, n as TextInput, r as TextInputComponent, t as ControlledTextInputProps } from "../TextInput-
|
|
1
|
+
import { i as TextInputProps, n as TextInput, r as TextInputComponent, t as ControlledTextInputProps } from "../TextInput-Df0Pkuk-.js";
|
|
2
2
|
export { ControlledTextInputProps, TextInput, TextInputComponent, TextInputProps };
|
|
@@ -3,7 +3,7 @@ import { t as clsx } from "../clsx-CnD0nOiA.js";
|
|
|
3
3
|
import { f as $5dc95899b306f630$export$c9058316764c140e } from "../utils-D-KKbY-n.js";
|
|
4
4
|
import { n as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../Input-BefLtZJe.js";
|
|
5
5
|
import { t as UIOverrides } from "../uiOverrides.context-Bfm2n-n8.js";
|
|
6
|
-
import { t as FieldController } from "../form.binding-
|
|
6
|
+
import { t as FieldController } from "../form.binding-DLKteDiq.js";
|
|
7
7
|
import { t as FormField } from "../FormField-Cl-t5Wi1.js";
|
|
8
8
|
import { t as TooltipWrapper } from "../TooltipWrapper-CoRIizbz.js";
|
|
9
9
|
import { t as inputBaseDefinition } from "../input.cva-KYGD4Bdz.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TimePicker, r as TimePickerProps, t as ControlledTimePickerProps } from "../TimePicker-
|
|
1
|
+
import { n as TimePicker, r as TimePickerProps, t as ControlledTimePickerProps } from "../TimePicker-Bdz_yJ0I.js";
|
|
2
2
|
export { type ControlledTimePickerProps, TimePicker, type TimePickerProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TimePicker } from "../TimePicker-
|
|
1
|
+
import { t as TimePicker } from "../TimePicker-BPLc1Uv5.js";
|
|
2
2
|
export { TimePicker };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as Toggle, r as ToggleProps, t as ControlledToggleProps } from "../Toggle-
|
|
1
|
+
import { n as Toggle, r as ToggleProps, t as ControlledToggleProps } from "../Toggle-Ca_t66zh.js";
|
|
2
2
|
export { ControlledToggleProps, Toggle, ToggleProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Toggle } from "../Toggle-
|
|
1
|
+
import { t as Toggle } from "../Toggle-Dr7TQZ93.js";
|
|
2
2
|
export { Toggle };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as DateRangeResolvedValue, i as DateRangeRelativeOption } from "../DateRangePicker-
|
|
1
|
+
import { a as DateRangeResolvedValue, i as DateRangeRelativeOption } from "../DateRangePicker-DpKWDDlC.js";
|
|
2
2
|
import { t as UIConfig } from "../uiConfig.context-Bjb9TQ6Y.js";
|
|
3
3
|
export { type DateRangeRelativeOption, type DateRangeResolvedValue, UIConfig };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as DatePickerProps } from "./DatePicker-
|
|
1
|
+
import { r as DatePickerProps } from "./DatePicker-aWuhaUgu.js";
|
|
2
2
|
import { t as ControlProps } from "./form.types-ZNGbcqJS.js";
|
|
3
3
|
import { t as FireBlurOnChangeProps } from "./fieldAdapter-C4sDFC8f.js";
|
|
4
4
|
import { FieldValues } from "react-hook-form";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as DateRangePickerProps } from "./DateRangePicker-
|
|
1
|
+
import { r as DateRangePickerProps } from "./DateRangePicker-DpKWDDlC.js";
|
|
2
2
|
import { t as ControlProps } from "./form.types-ZNGbcqJS.js";
|
|
3
3
|
import { t as FireBlurOnChangeProps } from "./fieldAdapter-C4sDFC8f.js";
|
|
4
4
|
import { FieldValues } from "react-hook-form";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as DateTimePickerProps } from "./DateTimePicker-
|
|
1
|
+
import { r as DateTimePickerProps } from "./DateTimePicker-BoTa_gTC.js";
|
|
2
2
|
import { t as ControlProps } from "./form.types-ZNGbcqJS.js";
|
|
3
3
|
import { t as FireBlurOnChangeProps } from "./fieldAdapter-C4sDFC8f.js";
|
|
4
4
|
import { FieldValues } from "react-hook-form";
|
|
@@ -14,30 +14,30 @@ import "./SplitButton-CR4psHKW.js";
|
|
|
14
14
|
import "./Button-D0M9lMOR.js";
|
|
15
15
|
import "./TextButton-cigitfeH.js";
|
|
16
16
|
import "./ToggleButton-3lINwoaV.js";
|
|
17
|
-
import { c as UIForm, n as FieldValues$1, r as FormInstance } from "./form.binding-
|
|
17
|
+
import { c as UIForm, n as FieldValues$1, r as FormInstance } from "./form.binding-Cu03pQ8Y.js";
|
|
18
18
|
import "./checkbox.cva-Caaf2Ysq.js";
|
|
19
|
-
import { a as ControlledCheckboxProps } from "./Checkbox-
|
|
19
|
+
import { a as ControlledCheckboxProps } from "./Checkbox-DC_1l0o7.js";
|
|
20
20
|
import "./FormField-Iy2O8A4g.js";
|
|
21
21
|
import "./input.cva-CfgCOIQW.js";
|
|
22
|
-
import { r as ControlledCheckboxGroupProps } from "./CheckboxGroup-
|
|
23
|
-
import "./FileUpload-
|
|
24
|
-
import "./FileUploadContainer
|
|
25
|
-
import "./InputUpload-
|
|
26
|
-
import { r as NumberInputComponent } from "./NumberInput-
|
|
27
|
-
import { t as ControlledNumberRangeInputProps } from "./NumberRangeInput-
|
|
28
|
-
import { r as TextInputComponent } from "./TextInput-
|
|
29
|
-
import { t as ControlledPasswordInputProps } from "./PasswordInput-
|
|
30
|
-
import { t as ControlledTextAreaProps } from "./TextArea-
|
|
22
|
+
import { r as ControlledCheckboxGroupProps } from "./CheckboxGroup-DnWeRs5l.js";
|
|
23
|
+
import "./FileUpload-Czof_aOb.js";
|
|
24
|
+
import "./FileUploadContainer--YlhZO19.js";
|
|
25
|
+
import "./InputUpload-D-C-886F.js";
|
|
26
|
+
import { r as NumberInputComponent } from "./NumberInput-BIRmzsPb.js";
|
|
27
|
+
import { t as ControlledNumberRangeInputProps } from "./NumberRangeInput-1vdHmE8h.js";
|
|
28
|
+
import { r as TextInputComponent } from "./TextInput-Df0Pkuk-.js";
|
|
29
|
+
import { t as ControlledPasswordInputProps } from "./PasswordInput-DNUEWDEM.js";
|
|
30
|
+
import { t as ControlledTextAreaProps } from "./TextArea-B8Yvkkxr.js";
|
|
31
31
|
import "./radio.cva-9lpsise2.js";
|
|
32
|
-
import { s as SelectItem, t as DefaultInitialSelectItem } from "./SelectBase-
|
|
32
|
+
import { s as SelectItem, t as DefaultInitialSelectItem } from "./SelectBase-DD8_4B-r.js";
|
|
33
33
|
import { n as HasRequiredProperty } from "./common-UBFya8WY.js";
|
|
34
|
-
import { n as AutocompleteProps, r as ControlledAutocompleteProps } from "./Autocomplete-
|
|
35
|
-
import { n as QueryFn, t as QueryAutocompleteProps } from "./queryAutocomplete.types-
|
|
36
|
-
import { r as SelectProps, t as ControlledSelectProps } from "./Select-
|
|
37
|
-
import { n as QuerySelectProps, r as QueryFn$1 } from "./QuerySelect-
|
|
38
|
-
import { t as ControlledSliderProps } from "./Slider-
|
|
34
|
+
import { n as AutocompleteProps, r as ControlledAutocompleteProps } from "./Autocomplete-CLcRRdiL.js";
|
|
35
|
+
import { n as QueryFn, t as QueryAutocompleteProps } from "./queryAutocomplete.types-D7SmWVq-.js";
|
|
36
|
+
import { r as SelectProps, t as ControlledSelectProps } from "./Select-Bm2C6tHz.js";
|
|
37
|
+
import { n as QuerySelectProps, r as QueryFn$1 } from "./QuerySelect-vWifN5XC.js";
|
|
38
|
+
import { t as ControlledSliderProps } from "./Slider-C6UeThGK.js";
|
|
39
39
|
import "./toggle.cva-2CGLc8aa.js";
|
|
40
|
-
import { t as ControlledToggleProps } from "./Toggle-
|
|
40
|
+
import { t as ControlledToggleProps } from "./Toggle-Ca_t66zh.js";
|
|
41
41
|
import "./Modal-BfN_MfR-.js";
|
|
42
42
|
import "./Typography-BiHrVFpz.js";
|
|
43
43
|
import "./ActionModal-CKS0t-n3.js";
|
|
@@ -57,47 +57,47 @@ import "./Pill-vCBJdOTY.js";
|
|
|
57
57
|
import "./Tag-DUvBTljf.js";
|
|
58
58
|
import "./Accordion-DonRhvvW.js";
|
|
59
59
|
import "./confirmation.context-D_kJeU8m.js";
|
|
60
|
-
import { t as ControlledDatePickerProps } from "./DatePicker-
|
|
61
|
-
import { t as ControlledDateRangePickerProps } from "./DateRangePicker-
|
|
62
|
-
import { t as ControlledDateTimePickerProps } from "./DateTimePicker-
|
|
60
|
+
import { t as ControlledDatePickerProps } from "./DatePicker-aWuhaUgu.js";
|
|
61
|
+
import { t as ControlledDateRangePickerProps } from "./DateRangePicker-DpKWDDlC.js";
|
|
62
|
+
import { t as ControlledDateTimePickerProps } from "./DateTimePicker-BoTa_gTC.js";
|
|
63
63
|
import "./date-time.utils-Cu9TVj46.js";
|
|
64
64
|
import "./lucide-react-BJRvqSeV.js";
|
|
65
65
|
import "./link.context-C1RcdC0i.js";
|
|
66
66
|
import "./MenuItem-DLKC94Qs.js";
|
|
67
67
|
import "./ProgressBar-DG-ClG9v.js";
|
|
68
|
-
import { t as Autocomplete } from "./autocomplete-
|
|
69
|
-
import { t as Checkbox } from "./checkbox-
|
|
70
|
-
import { t as CheckboxGroup } from "./checkbox-group-
|
|
71
|
-
import { n as DatePicker } from "./date-picker-
|
|
72
|
-
import { n as DateRangePicker } from "./date-range-picker-
|
|
73
|
-
import { n as DateTimePicker } from "./date-time-picker-
|
|
74
|
-
import "./file-upload-
|
|
75
|
-
import "./input-upload-
|
|
76
|
-
import { n as NumberInput } from "./number-input-
|
|
77
|
-
import { n as NumberRangeInput } from "./number-range-input-
|
|
78
|
-
import { n as PasswordInput } from "./password-input-
|
|
79
|
-
import { t as QueryAutocomplete } from "./query-autocomplete-
|
|
80
|
-
import { t as QuerySelect } from "./query-select-
|
|
81
|
-
import "./radio-group-
|
|
82
|
-
import "./segment.types-
|
|
83
|
-
import { n as Segment } from "./segment-
|
|
84
|
-
import { n as Select } from "./select-
|
|
85
|
-
import { n as Slider } from "./slider-
|
|
86
|
-
import { n as TextArea } from "./text-area-
|
|
87
|
-
import "./text-editor-
|
|
88
|
-
import { n as TextInput } from "./text-input-
|
|
89
|
-
import { t as ControlledTimePickerProps } from "./TimePicker-
|
|
90
|
-
import { n as TimePicker } from "./time-picker-
|
|
91
|
-
import { n as Toggle } from "./toggle-
|
|
68
|
+
import { t as Autocomplete } from "./autocomplete-CIDaulwN.js";
|
|
69
|
+
import { t as Checkbox } from "./checkbox-4smu5B-h.js";
|
|
70
|
+
import { t as CheckboxGroup } from "./checkbox-group-C55R3YH5.js";
|
|
71
|
+
import { n as DatePicker } from "./date-picker-g50NliUB.js";
|
|
72
|
+
import { n as DateRangePicker } from "./date-range-picker-4EXSwE8B.js";
|
|
73
|
+
import { n as DateTimePicker } from "./date-time-picker-Bjag5nQ1.js";
|
|
74
|
+
import "./file-upload-Ba6NwH0N.js";
|
|
75
|
+
import "./input-upload-BxRgcRt4.js";
|
|
76
|
+
import { n as NumberInput } from "./number-input-BoUfnoR2.js";
|
|
77
|
+
import { n as NumberRangeInput } from "./number-range-input-43A63EzS.js";
|
|
78
|
+
import { n as PasswordInput } from "./password-input-BPAjcIly.js";
|
|
79
|
+
import { t as QueryAutocomplete } from "./query-autocomplete-Dh1Yeu4p.js";
|
|
80
|
+
import { t as QuerySelect } from "./query-select-7lNZcE_x.js";
|
|
81
|
+
import "./radio-group-DmilCTsI.js";
|
|
82
|
+
import "./segment.types-BYTmg69p.js";
|
|
83
|
+
import { n as Segment } from "./segment-BOELlo1K.js";
|
|
84
|
+
import { n as Select } from "./select-CD3fNAgK.js";
|
|
85
|
+
import { n as Slider } from "./slider-tx1tub5d.js";
|
|
86
|
+
import { n as TextArea } from "./text-area-kb2PxyJb.js";
|
|
87
|
+
import "./text-editor-CDECpKqj.js";
|
|
88
|
+
import { n as TextInput } from "./text-input-VqRJ0y7Y.js";
|
|
89
|
+
import { t as ControlledTimePickerProps } from "./TimePicker-Bdz_yJ0I.js";
|
|
90
|
+
import { n as TimePicker } from "./time-picker-BYfudvVK.js";
|
|
91
|
+
import { n as Toggle } from "./toggle-DK5CDOtt.js";
|
|
92
92
|
import "./Stepper-JUO4MbZx.js";
|
|
93
|
-
import "./useTableNav-
|
|
93
|
+
import "./useTableNav-aDO5L4da.js";
|
|
94
94
|
import "./router.context-BOYRh2p9.js";
|
|
95
95
|
import "./theme.context-B10jqjvZ.js";
|
|
96
96
|
import "./uiConfig.context-Bjb9TQ6Y.js";
|
|
97
97
|
import "./useFilters-BxRScJdn.js";
|
|
98
98
|
import "./useLocalStorage-DGsBUCT6.js";
|
|
99
99
|
import "./useTranslationMemo-Dy3p6m1g.js";
|
|
100
|
-
import { t as Segment$1 } from "./Segment-
|
|
100
|
+
import { t as Segment$1 } from "./Segment-BZdZb436.js";
|
|
101
101
|
import { ComponentProps, DependencyList, EffectCallback, JSXElementConstructor, KeyboardEvent, ReactElement, ReactNode, RefObject, SetStateAction, SyntheticEvent } from "react";
|
|
102
102
|
import { BrowserNativeObject, ExtractObjects, FieldValues, NestedValue, SubmitErrorHandler, SubmitHandler, UseFormProps, UseFormReturn } from "react-hook-form";
|
|
103
103
|
import { z } from "zod";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as FileUploadBaseProps } from "./fileUpload.types-
|
|
2
|
-
import "./FileUpload-
|
|
1
|
+
import { n as FileUploadBaseProps } from "./fileUpload.types-ZUblxJUi.js";
|
|
2
|
+
import "./FileUpload-Czof_aOb.js";
|
|
3
3
|
import { t as ControlProps } from "./form.types-ZNGbcqJS.js";
|
|
4
4
|
import { FieldValues } from "react-hook-form";
|
|
5
5
|
//#region src/entries/rhf/file-upload.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as DropZoneProps, o as FileTriggerProps } from "./types-ZbFfCz06.js";
|
|
2
2
|
import { r as ButtonProps } from "./Button-D0M9lMOR.js";
|
|
3
|
-
import { n as FieldValues } from "./form.binding-
|
|
4
|
-
import { t as ControlProps } from "./form.types-
|
|
3
|
+
import { n as FieldValues } from "./form.binding-Cu03pQ8Y.js";
|
|
4
|
+
import { t as ControlProps } from "./form.types-qEwMTXTZ.js";
|
|
5
5
|
import { n as FormFieldProps } from "./FormField-Iy2O8A4g.js";
|
|
6
6
|
import { ReactNode, Ref } from "react";
|
|
7
7
|
//#region src/types/error-handling.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
1
|
import { DeepKeys, DeepValue, ReactFormExtendedApi } from "@tanstack/react-form";
|
|
2
|
+
import { z } from "zod";
|
|
3
3
|
//#region src/hooks/useForm.d.ts
|
|
4
4
|
type FormMode = "all" | "onBlur" | "onChange" | "onSubmit" | "onTouched";
|
|
5
5
|
type FieldValidators = {
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { useEffect, useLayoutEffect, useMemo, useRef } from "react";
|
|
2
|
+
import { c } from "react/compiler-runtime";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { useForm, useStore } from "@tanstack/react-form";
|
|
5
|
+
import { Store } from "@tanstack/store";
|
|
6
|
+
//#region src/hooks/useForm.ts
|
|
7
|
+
const disabledStores = /* @__PURE__ */ new WeakMap();
|
|
8
|
+
function useForm$1({ defaultValues, disabled = false, mode = "onSubmit", onSubmitAsync, zodSchema } = {}) {
|
|
9
|
+
const submitHandlerRef = useRef(() => void 0);
|
|
10
|
+
const submitErrorHandlerRef = useRef(void 0);
|
|
11
|
+
const blurListenersRef = useRef(/* @__PURE__ */ new Set());
|
|
12
|
+
const fieldValidators = useMemo(() => {
|
|
13
|
+
return /* @__PURE__ */ new Map();
|
|
14
|
+
}, [mode, zodSchema]);
|
|
15
|
+
const formValidator = useMemo(() => {
|
|
16
|
+
if (!zodSchema) return;
|
|
17
|
+
return ({ value }) => {
|
|
18
|
+
const result = zodSchema.safeParse(value);
|
|
19
|
+
if (result.success) return;
|
|
20
|
+
return { fields: Object.fromEntries(result.error.issues.map((issue) => [pathToString(issue.path), issue.message])) };
|
|
21
|
+
};
|
|
22
|
+
}, [zodSchema]);
|
|
23
|
+
const form = useForm({
|
|
24
|
+
defaultValues: (typeof defaultValues === "function" ? {} : defaultValues) ?? {},
|
|
25
|
+
validators: formValidator || onSubmitAsync ? {
|
|
26
|
+
onSubmit: formValidator,
|
|
27
|
+
onSubmitAsync
|
|
28
|
+
} : void 0,
|
|
29
|
+
onSubmit: async ({ value: value_0 }) => {
|
|
30
|
+
const transformed = zodSchema ? zodSchema.parse(value_0) : value_0;
|
|
31
|
+
await submitHandlerRef.current(transformed);
|
|
32
|
+
},
|
|
33
|
+
onSubmitInvalid: ({ value: value_1, formApi }) => {
|
|
34
|
+
submitErrorHandlerRef.current?.(formApi.state.errors, value_1);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const originalHandleSubmit = useMemo(() => form.handleSubmit.bind(form), [form]);
|
|
38
|
+
const disabledStoreRef = useRef(void 0);
|
|
39
|
+
disabledStoreRef.current ??= new Store(disabled);
|
|
40
|
+
const disabledStore = disabledStoreRef.current;
|
|
41
|
+
const uiForm = form;
|
|
42
|
+
Object.defineProperty(uiForm, "disabled", {
|
|
43
|
+
configurable: true,
|
|
44
|
+
value: disabled,
|
|
45
|
+
writable: true
|
|
46
|
+
});
|
|
47
|
+
disabledStores.set(uiForm, disabledStore);
|
|
48
|
+
uiForm.getFieldValidators = (name) => {
|
|
49
|
+
const cached = fieldValidators.get(name);
|
|
50
|
+
if (cached || fieldValidators.has(name)) return cached;
|
|
51
|
+
const schema = zodSchema ? getSchemaAtPath(zodSchema, name) : void 0;
|
|
52
|
+
if (!schema || mode === "onSubmit") {
|
|
53
|
+
fieldValidators.set(name, void 0);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const validate = ({ value: value_2 }) => {
|
|
57
|
+
const result_0 = schema.safeParse(value_2);
|
|
58
|
+
return result_0.success ? void 0 : result_0.error.issues[0]?.message;
|
|
59
|
+
};
|
|
60
|
+
const validators = mode === "onChange" || mode === "all" ? { onChange: validate } : { onBlur: validate };
|
|
61
|
+
fieldValidators.set(name, validators);
|
|
62
|
+
return validators;
|
|
63
|
+
};
|
|
64
|
+
uiForm.notifyBlur = (name_0) => {
|
|
65
|
+
for (const listener of blurListenersRef.current) listener(name_0);
|
|
66
|
+
};
|
|
67
|
+
uiForm.parseValues = (values) => zodSchema ? zodSchema.parse(values) : values;
|
|
68
|
+
uiForm.subscribeBlur = (listener_0) => {
|
|
69
|
+
blurListenersRef.current.add(listener_0);
|
|
70
|
+
return () => blurListenersRef.current.delete(listener_0);
|
|
71
|
+
};
|
|
72
|
+
uiForm.handleSubmit = (onValid, onInvalid) => async (event) => {
|
|
73
|
+
event?.preventDefault?.();
|
|
74
|
+
event?.stopPropagation?.();
|
|
75
|
+
submitHandlerRef.current = onValid;
|
|
76
|
+
submitErrorHandlerRef.current = onInvalid;
|
|
77
|
+
await originalHandleSubmit();
|
|
78
|
+
};
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
if (typeof defaultValues === "function") defaultValues().then((values_0) => form.reset(values_0));
|
|
81
|
+
}, [defaultValues, form]);
|
|
82
|
+
useLayoutEffect(() => {
|
|
83
|
+
if (disabledStore.state !== disabled) disabledStore.setState(() => disabled);
|
|
84
|
+
}, [disabled, disabledStore]);
|
|
85
|
+
return uiForm;
|
|
86
|
+
}
|
|
87
|
+
const useFormDisabled = (form) => {
|
|
88
|
+
const $ = c(2);
|
|
89
|
+
let t0;
|
|
90
|
+
if ($[0] !== form) {
|
|
91
|
+
t0 = disabledStores.get(form);
|
|
92
|
+
$[0] = form;
|
|
93
|
+
$[1] = t0;
|
|
94
|
+
} else t0 = $[1];
|
|
95
|
+
const store = t0;
|
|
96
|
+
if (!store) throw new Error("useFormDisabled must be used with a form created by useForm");
|
|
97
|
+
return useStore(store);
|
|
98
|
+
};
|
|
99
|
+
const useFormValue = (form, selector) => {
|
|
100
|
+
const $ = c(2);
|
|
101
|
+
let t0;
|
|
102
|
+
if ($[0] !== selector) {
|
|
103
|
+
t0 = (state) => selector(state.values);
|
|
104
|
+
$[0] = selector;
|
|
105
|
+
$[1] = t0;
|
|
106
|
+
} else t0 = $[1];
|
|
107
|
+
return useStore(form.store, t0);
|
|
108
|
+
};
|
|
109
|
+
const useFormState = (form, selector) => {
|
|
110
|
+
return useStore(form.store, selector);
|
|
111
|
+
};
|
|
112
|
+
const getSchemaAtPath = (rootSchema, path) => {
|
|
113
|
+
let schema = rootSchema;
|
|
114
|
+
for (const segment of parsePath(path)) {
|
|
115
|
+
while (schema?.unwrap && !schema.shape && !schema.element && !schema.items) schema = schema.unwrap();
|
|
116
|
+
schema = typeof segment === "number" ? schema?.element ?? schema?.items?.[segment] : schema?.shape?.[segment];
|
|
117
|
+
if (!schema) return;
|
|
118
|
+
}
|
|
119
|
+
return schema;
|
|
120
|
+
};
|
|
121
|
+
const parsePath = (path) => path.replaceAll("[", ".").replaceAll("]", "").split(".").filter(Boolean).map((segment) => /^\d+$/.test(segment) ? Number(segment) : segment);
|
|
122
|
+
const pathToString = (path) => path.reduce((result, segment) => typeof segment === "number" ? `${result}[${segment}]` : result ? `${result}.${String(segment)}` : String(segment), "");
|
|
123
|
+
//#endregion
|
|
124
|
+
//#region src/components/inputs/shared/form.types.ts
|
|
125
|
+
const getFieldError = (errors) => errors.flatMap((error) => {
|
|
126
|
+
if (typeof error === "string") return [error];
|
|
127
|
+
if (error && typeof error === "object" && "message" in error) return [String(error.message)];
|
|
128
|
+
return [];
|
|
129
|
+
}).at(0);
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region src/components/inputs/shared/form.binding.tsx
|
|
132
|
+
function FieldController({ control: form, name, render }) {
|
|
133
|
+
const isFormDisabled = useFormDisabled(form);
|
|
134
|
+
return /* @__PURE__ */ jsx(form.Field, {
|
|
135
|
+
name,
|
|
136
|
+
validators: form.getFieldValidators(name),
|
|
137
|
+
children: (field) => render({
|
|
138
|
+
field: {
|
|
139
|
+
disabled: isFormDisabled,
|
|
140
|
+
name: field.name,
|
|
141
|
+
onBlur: () => {
|
|
142
|
+
field.handleBlur();
|
|
143
|
+
form.notifyBlur(name);
|
|
144
|
+
},
|
|
145
|
+
onChange: field.handleChange,
|
|
146
|
+
ref: () => void 0,
|
|
147
|
+
value: field.state.value
|
|
148
|
+
},
|
|
149
|
+
fieldState: {
|
|
150
|
+
error: getFieldError(field.state.meta.errors) ? { message: getFieldError(field.state.meta.errors) } : void 0,
|
|
151
|
+
isDirty: field.state.meta.isDirty
|
|
152
|
+
}
|
|
153
|
+
})
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
//#endregion
|
|
157
|
+
export { useFormValue as i, useForm$1 as n, useFormState as r, FieldController as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DeepValue, c as UIForm, i as DeepKeys } from "./form.binding-
|
|
1
|
+
import { a as DeepValue, c as UIForm, i as DeepKeys } from "./form.binding-Cu03pQ8Y.js";
|
|
2
2
|
//#region src/components/inputs/shared/form.types.d.ts
|
|
3
3
|
type ControlKeys<TProps, TValueProp extends keyof TProps = "value" extends keyof TProps ? "value" : never> = TValueProp | "onChange" | "onBlur";
|
|
4
4
|
interface FormControl<TFieldValues extends Record<string, unknown>, TType> {
|