@gusto/embedded-react-sdk 0.37.0-rc.1 → 0.37.0-rc.2
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/CHANGELOG.md +44 -8
- package/README.md +6 -0
- package/dist/UNSTABLE_Hooks.d.ts +1 -1
- package/dist/UNSTABLE_Hooks.js +50 -6
- package/dist/UNSTABLE_Hooks.js.map +1 -1
- package/dist/components/Base/Base.d.ts +2 -1
- package/dist/components/Base/Base.js +76 -76
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/createCompoundContext.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.js +42 -36
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.d.ts +2 -0
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js +22 -19
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.d.ts +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js +32 -30
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.d.ts +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js +36 -34
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.d.ts +5 -3
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js +52 -40
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
- package/dist/components/Common/Fields/FileInputField/FileInputField.js +24 -22
- package/dist/components/Common/Fields/FileInputField/FileInputField.js.map +1 -1
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js +24 -22
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.d.ts +2 -0
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js +31 -28
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +3 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js +30 -27
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.d.ts +3 -1
- package/dist/components/Common/Fields/SelectField/SelectField.js +31 -28
- package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
- package/dist/components/Common/Fields/SwitchField/SwitchField.d.ts +2 -0
- package/dist/components/Common/Fields/SwitchField/SwitchField.js +24 -21
- package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js +24 -22
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js.map +1 -1
- package/dist/components/Common/Fields/TextInputField/TextInputField.d.ts +2 -0
- package/dist/components/Common/Fields/TextInputField/TextInputField.js +26 -23
- package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useField.d.ts +3 -2
- package/dist/components/Common/Fields/hooks/useField.js +37 -33
- package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableList.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +10 -15
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -14
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +14 -19
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/Button/Button.js +33 -29
- package/dist/components/Common/UI/Button/Button.js.map +1 -1
- package/dist/components/Common/UI/Button/Button.module.scss.js +5 -3
- package/dist/components/Common/UI/Button/Button.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Button/ButtonTypes.d.ts +4 -0
- package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +2 -2
- package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +94 -80
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -11
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -10
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -11
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +6 -9
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +15 -17
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +8 -7
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -9
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +13 -15
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +8 -7
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +2 -5
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +10 -9
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -11
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -13
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +8 -7
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -13
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +12 -15
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -8
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -8
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -15
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +8 -7
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +8 -7
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +8 -11
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -19
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +6 -8
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +13 -12
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +8 -11
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +11 -10
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +10 -14
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +8 -11
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +5 -8
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +15 -19
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +8 -7
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +6 -9
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +17 -19
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -10
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +8 -7
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +12 -15
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +9 -12
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +6 -10
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +8 -7
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +3 -6
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -13
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +23 -24
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +11 -14
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +19 -21
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +10 -9
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -8
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +8 -7
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -9
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -8
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +8 -7
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +3 -7
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +9 -12
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +10 -9
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +29 -30
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -3
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +10 -14
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -5
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +12 -14
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +12 -13
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +18 -21
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +3 -4
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +17 -19
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +6 -8
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +2 -4
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -5
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/Contractor/Profile/useContractorProfile.js +11 -8
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +20 -22
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +12 -14
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +27 -28
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +23 -25
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +55 -49
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +14 -13
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +14 -13
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +18 -19
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +6 -8
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -9
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +10 -14
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +8 -7
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +24 -26
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +9 -11
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +8 -7
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +6 -9
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +6 -9
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -7
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +5 -8
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +16 -17
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +8 -7
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +7 -10
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +10 -13
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +8 -7
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +14 -15
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +8 -11
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -8
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +9 -10
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -10
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +9 -10
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +10 -9
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +8 -11
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +14 -17
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.d.ts +3 -3
- package/dist/components/Employee/Profile/HomeAddress.js +45 -45
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +15 -19
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +8 -7
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +8 -11
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +8 -7
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +8 -11
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +10 -13
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +8 -7
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +14 -17
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +37 -33
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.d.ts +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +57 -45
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +8 -11
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
- package/dist/components/Flow/Flow.js +20 -23
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +16 -18
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +18 -20
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +3 -4
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +8 -10
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlow.js +14 -14
- package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.d.ts +2 -2
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +8 -8
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +2 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +61 -57
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +8 -11
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.d.ts +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +88 -75
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.module.scss.js +6 -6
- package/dist/components/Payroll/GrossUpModal/GrossUpModalTypes.d.ts +0 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js +24 -18
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +2 -0
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +30 -31
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +56 -53
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +30 -32
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +18 -26
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +2 -2
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -9
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +12 -14
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +11 -14
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +66 -67
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +20 -21
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +222 -216
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +19 -21
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js +13 -6
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +31 -33
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +44 -40
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +15 -17
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +15 -15
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +58 -59
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +7 -10
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +2 -4
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +11 -13
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -5
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +12 -14
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/helpers.d.ts +4 -0
- package/dist/components/Payroll/helpers.js +21 -16
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +4 -4
- package/dist/components/UNSTABLE_Hooks/collectErrors.d.ts +6 -0
- package/dist/components/UNSTABLE_Hooks/collectErrors.js +9 -0
- package/dist/components/UNSTABLE_Hooks/collectErrors.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js +6 -9
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js +13 -0
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.d.ts +11 -6
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js +24 -0
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.d.ts +26 -0
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js +24 -0
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.d.ts +53 -0
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js +34 -0
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.test.d.ts +1 -0
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js +14 -0
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.d.ts +11 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +34 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.d.ts +11 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js +34 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.d.ts +14 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +40 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.d.ts +12 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +40 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.d.ts +12 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js +40 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.d.ts +11 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +34 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.d.ts +13 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +38 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/index.d.ts +15 -0
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.d.ts +2 -0
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js +8 -0
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.d.ts +18 -0
- package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.js +10 -0
- package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.test.d.ts +1 -0
- package/dist/components/UNSTABLE_Hooks/form/index.d.ts +8 -1
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.d.ts +4 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js +13 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.d.ts +6 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js +14 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/types.d.ts +12 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.d.ts +2 -1
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js +11 -9
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js +2 -3
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.d.ts +23 -0
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js +11 -0
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/withOptions.js +7 -0
- package/dist/components/UNSTABLE_Hooks/form/withOptions.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +149 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.d.ts +97 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js +121 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.d.ts +34 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js +50 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/index.d.ts +5 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +97 -9
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js +255 -3
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +112 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +39 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js +45 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.d.ts +23 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js +46 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/index.d.ts +7 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +77 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js +153 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +69 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.d.ts +10 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js +14 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/index.d.ts +7 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.d.ts +68 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js +129 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.d.ts +25 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js +24 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/index.d.ts +8 -4
- package/dist/components/UNSTABLE_Hooks/types.d.ts +9 -6
- package/dist/components/UNSTABLE_Hooks/useErrorHandling.d.ts +9 -0
- package/dist/components/UNSTABLE_Hooks/useErrorHandling.js +12 -0
- package/dist/components/UNSTABLE_Hooks/useErrorHandling.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/useErrorHandling.test.d.ts +1 -0
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +10 -13
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.d.ts +10 -2
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
- package/dist/contexts/ThemeProvider/useTheme.js.map +1 -1
- package/dist/helpers/requiredIf.d.ts +13 -0
- package/dist/helpers/requiredIf.js +8 -0
- package/dist/helpers/requiredIf.js.map +1 -0
- package/dist/i18n/I18n.js +12 -12
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +26 -0
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +24 -0
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +32 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +52 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffRequests.json.js +21 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffRequests.json.js.map +1 -0
- package/dist/i18n/en/Payroll.GrossUpModal.json.js +16 -14
- package/dist/i18n/en/Payroll.GrossUpModal.json.js.map +1 -1
- package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +29 -25
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
- package/dist/i18n/en/UNSTABLE.CompensationForm.json.js +58 -0
- package/dist/i18n/en/UNSTABLE.CompensationForm.json.js.map +1 -0
- package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js +34 -0
- package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js.map +1 -0
- package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js +24 -0
- package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js.map +1 -0
- package/dist/models/WA_RISK_CODES.d.ts +5 -2866
- package/dist/models/WA_RISK_CODES.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +545 -1
- package/dist/types/sdkError.d.ts +7 -1
- package/dist/types/sdkError.js.map +1 -1
- package/docs/reference/endpoint-inventory.json +92 -0
- package/package.json +12 -12
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"composeSubmitHandler.js","sources":["../../../../src/components/UNSTABLE_Hooks/form/composeSubmitHandler.ts"],"sourcesContent":["import type { SyntheticEvent } from 'react'\n\n/**\n * Minimal shape required for a form hook result to participate in `composeSubmitHandler`.\n * Any hook returning `BaseFormHookReady` satisfies this interface.\n *\n * Uses method syntax so TypeScript applies bivariant checking on parameter types,\n * allowing hooks with specific form data generics to be passed without casts.\n */\ninterface ComposableFormHookResult {\n form: {\n hookFormInternals: {\n formMethods: {\n handleSubmit(onValid: () => void, onInvalid?: () => void): () => Promise<void>\n setFocus(name: string): void\n formState: { errors: Record<string, unknown> }\n }\n }\n }\n}\n\n/**\n * Coordinates validation and submission across multiple form hooks on the same page.\n *\n * Validates all forms simultaneously via `handleSubmit()`, then focuses the first invalid\n * field across all forms (in array order). Only calls `onAllValid` when every form passes.\n *\n * Uses `handleSubmit` rather than `trigger` so that react-hook-form sets\n * `formState.isSubmitted = true`, which enables `reValidateMode` (default: `onChange`).\n * Without this, errors set by manual `trigger()` calls would never clear as the user types.\n *\n * Each hook passed to `forms` should be initialized with `shouldFocusError: false` so that\n * react-hook-form's built-in per-form focus is disabled and `composeSubmitHandler` can manage\n * cross-form focus instead.\n *\n * @example\n * ```ts\n * const detailsForm = useEmployeeDetailsForm({ employeeId, shouldFocusError: false })\n * const addressForm = useHomeAddressForm({ employeeId, shouldFocusError: false })\n *\n * const handleSubmit = composeSubmitHandler(\n * [detailsForm, addressForm],\n * async () => {\n * await detailsForm.actions.onSubmit()\n * await addressForm.actions.onSubmit()\n * },\n * )\n *\n * return <form onSubmit={handleSubmit}>...</form>\n * ```\n */\nexport function composeSubmitHandler(\n forms: ComposableFormHookResult[],\n onAllValid: () => Promise<void>,\n): (e: SyntheticEvent) => Promise<void> {\n return async (e: SyntheticEvent) => {\n e.preventDefault()\n\n const validationResults = await Promise.all(\n forms.map(\n form =>\n new Promise<boolean>(resolve => {\n void form.form.hookFormInternals.formMethods.handleSubmit(\n () => {\n resolve(true)\n },\n () => {\n resolve(false)\n },\n )()\n }),\n ),\n )\n\n const allValid = validationResults.every(Boolean)\n\n if (!allValid) {\n for (const form of forms) {\n const firstErrorField = Object.keys(\n form.form.hookFormInternals.formMethods.formState.errors,\n )[0]\n if (firstErrorField) {\n form.form.hookFormInternals.formMethods.setFocus(firstErrorField)\n return\n }\n }\n return\n }\n\n await onAllValid()\n }\n}\n"],"names":["composeSubmitHandler","forms","onAllValid","e","form","resolve","firstErrorField"],"mappings":"AAmDO,SAASA,EACdC,GACAC,GACsC;AACtC,SAAO,OAAOC,MAAsB;AAqBlC,QApBAA,EAAE,eAAA,GAoBE,EAlBsB,MAAM,QAAQ;AAAA,MACtCF,EAAM;AAAA,QACJ,CAAAG,MACE,IAAI,QAAiB,CAAAC,MAAW;AAC9B,UAAKD,EAAK,KAAK,kBAAkB,YAAY;AAAA,YAC3C,MAAM;AACJ,cAAAC,EAAQ,EAAI;AAAA,YACd;AAAA,YACA,MAAM;AACJ,cAAAA,EAAQ,EAAK;AAAA,YACf;AAAA,UAAA,EACF;AAAA,QACF,CAAC;AAAA,MAAA;AAAA,IACL,GAGiC,MAAM,OAAO,GAEjC;AACb,iBAAWD,KAAQH,GAAO;AACxB,cAAMK,IAAkB,OAAO;AAAA,UAC7BF,EAAK,KAAK,kBAAkB,YAAY,UAAU;AAAA,QAAA,EAClD,CAAC;AACH,YAAIE,GAAiB;AACnB,UAAAF,EAAK,KAAK,kBAAkB,YAAY,SAASE,CAAe;AAChE;AAAA,QACF;AAAA,MACF;AACA;AAAA,IACF;AAEA,UAAMJ,EAAA;AAAA,EACR;AACF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { FieldMetadata } from './types';
|
|
3
|
-
export declare function deriveFieldsMetadata<T extends z.ZodObject
|
|
3
|
+
export declare function deriveFieldsMetadata<T extends z.ZodObject>(schema: T): Record<keyof z.infer<T>, FieldMetadata>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z as i } from "zod";
|
|
2
|
+
function c(t) {
|
|
3
|
+
const r = i.toJSONSchema(t), s = new Set(r.required ?? []), n = t.shape, o = {};
|
|
4
|
+
for (const e of Object.keys(n))
|
|
5
|
+
o[e] = {
|
|
6
|
+
name: e,
|
|
7
|
+
isRequired: s.has(e)
|
|
8
|
+
};
|
|
9
|
+
return o;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
c as deriveFieldsMetadata
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=deriveFieldsMetadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deriveFieldsMetadata.js","sources":["../../../../src/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FieldMetadata } from './types'\n\nexport function deriveFieldsMetadata<T extends z.ZodObject>(\n schema: T,\n): Record<keyof z.infer<T>, FieldMetadata> {\n const jsonSchema = z.toJSONSchema(schema)\n const requiredFields = new Set((jsonSchema as { required?: string[] }).required ?? [])\n const shape = schema.shape as Record<string, z.ZodType>\n const result: Record<string, FieldMetadata> = {}\n\n for (const key of Object.keys(shape)) {\n result[key] = {\n name: key,\n isRequired: requiredFields.has(key),\n }\n }\n\n return result as Record<keyof z.infer<T>, FieldMetadata>\n}\n"],"names":["deriveFieldsMetadata","schema","jsonSchema","z","requiredFields","shape","result","key"],"mappings":";AAGO,SAASA,EACdC,GACyC;AACzC,QAAMC,IAAaC,EAAE,aAAaF,CAAM,GAClCG,IAAiB,IAAI,IAAKF,EAAuC,YAAY,CAAA,CAAE,GAC/EG,IAAQJ,EAAO,OACfK,IAAwC,CAAA;AAE9C,aAAWC,KAAO,OAAO,KAAKF,CAAK;AACjC,IAAAC,EAAOC,CAAG,IAAI;AAAA,MACZ,MAAMA;AAAA,MACN,YAAYH,EAAe,IAAIG,CAAG;AAAA,IAAA;AAItC,SAAOD;AACT;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { BaseFieldProps, ValidationMessages } from '../types';
|
|
3
|
+
import { BaseFormHookReady } from '../../types';
|
|
4
|
+
import { CheckboxProps } from '../../../Common/UI/Checkbox/CheckboxTypes';
|
|
5
|
+
export interface CheckboxHookFieldProps<TErrorCode extends string = never> extends BaseFieldProps {
|
|
6
|
+
name: string;
|
|
7
|
+
formHookResult?: BaseFormHookReady;
|
|
8
|
+
validationMessages?: ValidationMessages<TErrorCode>;
|
|
9
|
+
FieldComponent?: ComponentType<CheckboxProps>;
|
|
10
|
+
}
|
|
11
|
+
export declare function CheckboxHookField<TErrorCode extends string>({ name, formHookResult, label, description, validationMessages, FieldComponent, }: CheckboxHookFieldProps<TErrorCode>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useHookFieldResolution as f } from "../useHookFieldResolution.js";
|
|
3
|
+
import { CheckboxField as m } from "../../../Common/Fields/CheckboxField/CheckboxField.js";
|
|
4
|
+
function p({
|
|
5
|
+
name: o,
|
|
6
|
+
formHookResult: i,
|
|
7
|
+
label: r,
|
|
8
|
+
description: t,
|
|
9
|
+
validationMessages: s,
|
|
10
|
+
FieldComponent: d
|
|
11
|
+
}) {
|
|
12
|
+
const { metadata: l, control: a, errorMessage: c } = f(
|
|
13
|
+
o,
|
|
14
|
+
i,
|
|
15
|
+
s
|
|
16
|
+
), e = l[o];
|
|
17
|
+
return /* @__PURE__ */ u(
|
|
18
|
+
m,
|
|
19
|
+
{
|
|
20
|
+
name: o,
|
|
21
|
+
control: a,
|
|
22
|
+
label: r,
|
|
23
|
+
description: t,
|
|
24
|
+
errorMessage: c,
|
|
25
|
+
isRequired: e?.isRequired,
|
|
26
|
+
isDisabled: e?.isDisabled,
|
|
27
|
+
FieldComponent: d
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
p as CheckboxHookField
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=CheckboxHookField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckboxHookField.js","sources":["../../../../../src/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport type { BaseFieldProps, ValidationMessages } from '../types'\nimport type { BaseFormHookReady } from '../../types'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport { CheckboxField } from '@/components/Common'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\n\nexport interface CheckboxHookFieldProps<TErrorCode extends string = never> extends BaseFieldProps {\n name: string\n formHookResult?: BaseFormHookReady\n validationMessages?: ValidationMessages<TErrorCode>\n FieldComponent?: ComponentType<CheckboxProps>\n}\n\nexport function CheckboxHookField<TErrorCode extends string>({\n name,\n formHookResult,\n label,\n description,\n validationMessages,\n FieldComponent,\n}: CheckboxHookFieldProps<TErrorCode>) {\n const { metadata, control, errorMessage } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = metadata[name]\n\n return (\n <CheckboxField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n FieldComponent={FieldComponent}\n />\n )\n}\n"],"names":["CheckboxHookField","name","formHookResult","label","description","validationMessages","FieldComponent","metadata","control","errorMessage","useHookFieldResolution","fieldMetadata","jsx","CheckboxField"],"mappings":";;;AAcO,SAASA,EAA6C;AAAA,EAC3D,MAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AACF,GAAuC;AACrC,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,cAAAC,EAAA,IAAiBC;AAAA,IAC1CT;AAAA,IACAC;AAAA,IACAG;AAAA,EAAA,GAEIM,IAAgBJ,EAASN,CAAI;AAEnC,SACE,gBAAAW;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAZ;AAAA,MACA,SAAAO;AAAA,MACA,OAAAL;AAAA,MACA,aAAAC;AAAA,MACA,cAAAK;AAAA,MACA,YAAYE,GAAe;AAAA,MAC3B,YAAYA,GAAe;AAAA,MAC3B,gBAAAL;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { BaseFieldProps, ValidationMessages } from '../types';
|
|
3
|
+
import { BaseFormHookReady } from '../../types';
|
|
4
|
+
import { DatePickerProps } from '../../../Common/UI/DatePicker/DatePickerTypes';
|
|
5
|
+
export interface DatePickerHookFieldProps<TErrorCode extends string = never> extends BaseFieldProps {
|
|
6
|
+
name: string;
|
|
7
|
+
formHookResult?: BaseFormHookReady;
|
|
8
|
+
validationMessages?: ValidationMessages<TErrorCode>;
|
|
9
|
+
FieldComponent?: ComponentType<DatePickerProps>;
|
|
10
|
+
}
|
|
11
|
+
export declare function DatePickerHookField<TErrorCode extends string>({ name, formHookResult, label, description, validationMessages, FieldComponent, }: DatePickerHookFieldProps<TErrorCode>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useHookFieldResolution as f } from "../useHookFieldResolution.js";
|
|
3
|
+
import { DatePickerField as m } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
4
|
+
function D({
|
|
5
|
+
name: e,
|
|
6
|
+
formHookResult: o,
|
|
7
|
+
label: r,
|
|
8
|
+
description: t,
|
|
9
|
+
validationMessages: s,
|
|
10
|
+
FieldComponent: d
|
|
11
|
+
}) {
|
|
12
|
+
const { metadata: a, control: l, errorMessage: c } = f(
|
|
13
|
+
e,
|
|
14
|
+
o,
|
|
15
|
+
s
|
|
16
|
+
), i = a[e];
|
|
17
|
+
return /* @__PURE__ */ u(
|
|
18
|
+
m,
|
|
19
|
+
{
|
|
20
|
+
name: e,
|
|
21
|
+
control: l,
|
|
22
|
+
label: r,
|
|
23
|
+
description: t,
|
|
24
|
+
errorMessage: c,
|
|
25
|
+
isRequired: i?.isRequired,
|
|
26
|
+
isDisabled: i?.isDisabled,
|
|
27
|
+
FieldComponent: d
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
D as DatePickerHookField
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=DatePickerHookField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePickerHookField.js","sources":["../../../../../src/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport type { BaseFieldProps, ValidationMessages } from '../types'\nimport type { BaseFormHookReady } from '../../types'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport { DatePickerField } from '@/components/Common/Fields/DatePickerField'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\n\nexport interface DatePickerHookFieldProps<\n TErrorCode extends string = never,\n> extends BaseFieldProps {\n name: string\n formHookResult?: BaseFormHookReady\n validationMessages?: ValidationMessages<TErrorCode>\n FieldComponent?: ComponentType<DatePickerProps>\n}\n\nexport function DatePickerHookField<TErrorCode extends string>({\n name,\n formHookResult,\n label,\n description,\n validationMessages,\n FieldComponent,\n}: DatePickerHookFieldProps<TErrorCode>) {\n const { metadata, control, errorMessage } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = metadata[name]\n\n return (\n <DatePickerField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n FieldComponent={FieldComponent}\n />\n )\n}\n"],"names":["DatePickerHookField","name","formHookResult","label","description","validationMessages","FieldComponent","metadata","control","errorMessage","useHookFieldResolution","fieldMetadata","jsx","DatePickerField"],"mappings":";;;AAgBO,SAASA,EAA+C;AAAA,EAC7D,MAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AACF,GAAyC;AACvC,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,cAAAC,EAAA,IAAiBC;AAAA,IAC1CT;AAAA,IACAC;AAAA,IACAG;AAAA,EAAA,GAEIM,IAAgBJ,EAASN,CAAI;AAEnC,SACE,gBAAAW;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAZ;AAAA,MACA,SAAAO;AAAA,MACA,OAAAL;AAAA,MACA,aAAAC;AAAA,MACA,cAAAK;AAAA,MACA,YAAYE,GAAe;AAAA,MAC3B,YAAYA,GAAe;AAAA,MAC3B,gBAAAL;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { BaseFieldProps, ValidationMessages } from '../types';
|
|
3
|
+
import { BaseFormHookReady } from '../../types';
|
|
4
|
+
import { NumberInputProps } from '../../../Common/UI/NumberInput/NumberInputTypes';
|
|
5
|
+
export interface NumberInputHookFieldProps<TErrorCode extends string = never> extends BaseFieldProps {
|
|
6
|
+
name: string;
|
|
7
|
+
formHookResult?: BaseFormHookReady;
|
|
8
|
+
format?: NumberInputProps['format'];
|
|
9
|
+
min?: NumberInputProps['min'];
|
|
10
|
+
max?: NumberInputProps['max'];
|
|
11
|
+
validationMessages?: ValidationMessages<TErrorCode>;
|
|
12
|
+
FieldComponent?: ComponentType<NumberInputProps>;
|
|
13
|
+
}
|
|
14
|
+
export declare function NumberInputHookField<TErrorCode extends string>({ name, formHookResult, label, description, format, min, max, validationMessages, FieldComponent, }: NumberInputHookFieldProps<TErrorCode>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useHookFieldResolution as b } from "../useHookFieldResolution.js";
|
|
3
|
+
import { NumberInputField as c } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
4
|
+
function q({
|
|
5
|
+
name: e,
|
|
6
|
+
formHookResult: i,
|
|
7
|
+
label: r,
|
|
8
|
+
description: t,
|
|
9
|
+
format: s,
|
|
10
|
+
min: d,
|
|
11
|
+
max: u,
|
|
12
|
+
validationMessages: l,
|
|
13
|
+
FieldComponent: a
|
|
14
|
+
}) {
|
|
15
|
+
const { metadata: m, control: n, errorMessage: p } = b(
|
|
16
|
+
e,
|
|
17
|
+
i,
|
|
18
|
+
l
|
|
19
|
+
), o = m[e];
|
|
20
|
+
return /* @__PURE__ */ f(
|
|
21
|
+
c,
|
|
22
|
+
{
|
|
23
|
+
name: e,
|
|
24
|
+
control: n,
|
|
25
|
+
label: r,
|
|
26
|
+
description: t,
|
|
27
|
+
errorMessage: p,
|
|
28
|
+
isRequired: o?.isRequired,
|
|
29
|
+
isDisabled: o?.isDisabled,
|
|
30
|
+
format: s,
|
|
31
|
+
min: d,
|
|
32
|
+
max: u,
|
|
33
|
+
FieldComponent: a
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
q as NumberInputHookField
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=NumberInputHookField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberInputHookField.js","sources":["../../../../../src/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport type { BaseFieldProps, ValidationMessages } from '../types'\nimport type { BaseFormHookReady } from '../../types'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport { NumberInputField } from '@/components/Common'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\n\nexport interface NumberInputHookFieldProps<\n TErrorCode extends string = never,\n> extends BaseFieldProps {\n name: string\n formHookResult?: BaseFormHookReady\n format?: NumberInputProps['format']\n min?: NumberInputProps['min']\n max?: NumberInputProps['max']\n validationMessages?: ValidationMessages<TErrorCode>\n FieldComponent?: ComponentType<NumberInputProps>\n}\n\nexport function NumberInputHookField<TErrorCode extends string>({\n name,\n formHookResult,\n label,\n description,\n format,\n min,\n max,\n validationMessages,\n FieldComponent,\n}: NumberInputHookFieldProps<TErrorCode>) {\n const { metadata, control, errorMessage } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = metadata[name]\n\n return (\n <NumberInputField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n format={format}\n min={min}\n max={max}\n FieldComponent={FieldComponent}\n />\n )\n}\n"],"names":["NumberInputHookField","name","formHookResult","label","description","format","min","max","validationMessages","FieldComponent","metadata","control","errorMessage","useHookFieldResolution","fieldMetadata","jsx","NumberInputField"],"mappings":";;;AAmBO,SAASA,EAAgD;AAAA,EAC9D,MAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,QAAAC;AAAA,EACA,KAAAC;AAAA,EACA,KAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AACF,GAA0C;AACxC,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,cAAAC,EAAA,IAAiBC;AAAA,IAC1CZ;AAAA,IACAC;AAAA,IACAM;AAAA,EAAA,GAEIM,IAAgBJ,EAAST,CAAI;AAEnC,SACE,gBAAAc;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAf;AAAA,MACA,SAAAU;AAAA,MACA,OAAAR;AAAA,MACA,aAAAC;AAAA,MACA,cAAAQ;AAAA,MACA,YAAYE,GAAe;AAAA,MAC3B,YAAYA,GAAe;AAAA,MAC3B,QAAAT;AAAA,MACA,KAAAC;AAAA,MACA,KAAAC;AAAA,MACA,gBAAAE;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { BaseFieldProps, ValidationMessages } from '../types';
|
|
3
|
+
import { BaseFormHookReady } from '../../types';
|
|
4
|
+
import { RadioGroupProps } from '../../../Common/UI/RadioGroup/RadioGroupTypes';
|
|
5
|
+
export interface RadioGroupHookFieldProps<TErrorCode extends string = never, TEntry = unknown> extends BaseFieldProps {
|
|
6
|
+
name: string;
|
|
7
|
+
formHookResult?: BaseFormHookReady;
|
|
8
|
+
validationMessages?: ValidationMessages<TErrorCode>;
|
|
9
|
+
getOptionLabel?: (entry: TEntry) => string;
|
|
10
|
+
FieldComponent?: ComponentType<RadioGroupProps>;
|
|
11
|
+
}
|
|
12
|
+
export declare function RadioGroupHookField<TErrorCode extends string, TEntry = unknown>({ name, formHookResult, label, description, validationMessages, getOptionLabel, FieldComponent, }: RadioGroupHookFieldProps<TErrorCode, TEntry>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as R } from "react/jsx-runtime";
|
|
2
|
+
import { useHookFieldResolution as F } from "../useHookFieldResolution.js";
|
|
3
|
+
import { getFieldWithOptions as b } from "../getFieldWithOptions.js";
|
|
4
|
+
import { RadioGroupField as k } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
5
|
+
function G({
|
|
6
|
+
name: i,
|
|
7
|
+
formHookResult: r,
|
|
8
|
+
label: s,
|
|
9
|
+
description: d,
|
|
10
|
+
validationMessages: a,
|
|
11
|
+
getOptionLabel: e,
|
|
12
|
+
FieldComponent: l
|
|
13
|
+
}) {
|
|
14
|
+
const { metadata: n, control: p, errorMessage: u } = F(
|
|
15
|
+
i,
|
|
16
|
+
r,
|
|
17
|
+
a
|
|
18
|
+
), o = b(n, i), t = o?.options ?? [], m = e && o?.entries ? o.entries.map((f, c) => ({
|
|
19
|
+
value: t[c]?.value ?? "",
|
|
20
|
+
label: e(f)
|
|
21
|
+
})) : t;
|
|
22
|
+
return /* @__PURE__ */ R(
|
|
23
|
+
k,
|
|
24
|
+
{
|
|
25
|
+
name: i,
|
|
26
|
+
control: p,
|
|
27
|
+
label: s,
|
|
28
|
+
description: d,
|
|
29
|
+
errorMessage: u,
|
|
30
|
+
isRequired: o?.isRequired,
|
|
31
|
+
isDisabled: o?.isDisabled,
|
|
32
|
+
options: m,
|
|
33
|
+
FieldComponent: l
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
G as RadioGroupHookField
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=RadioGroupHookField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroupHookField.js","sources":["../../../../../src/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport type { BaseFieldProps, ValidationMessages } from '../types'\nimport type { BaseFormHookReady } from '../../types'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport { getFieldWithOptions } from '../getFieldWithOptions'\nimport { RadioGroupField } from '@/components/Common'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\n\nexport interface RadioGroupHookFieldProps<\n TErrorCode extends string = never,\n TEntry = unknown,\n> extends BaseFieldProps {\n name: string\n formHookResult?: BaseFormHookReady\n validationMessages?: ValidationMessages<TErrorCode>\n getOptionLabel?: (entry: TEntry) => string\n FieldComponent?: ComponentType<RadioGroupProps>\n}\n\nexport function RadioGroupHookField<TErrorCode extends string, TEntry = unknown>({\n name,\n formHookResult,\n label,\n description,\n validationMessages,\n getOptionLabel,\n FieldComponent,\n}: RadioGroupHookFieldProps<TErrorCode, TEntry>) {\n const { metadata, control, errorMessage } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = getFieldWithOptions<TEntry>(metadata, name)\n\n const defaultOptions = fieldMetadata?.options ?? []\n const options =\n getOptionLabel && fieldMetadata?.entries\n ? fieldMetadata.entries.map((entry, index) => ({\n value: defaultOptions[index]?.value ?? '',\n label: getOptionLabel(entry),\n }))\n : defaultOptions\n\n return (\n <RadioGroupField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n options={options}\n FieldComponent={FieldComponent}\n />\n )\n}\n"],"names":["RadioGroupHookField","name","formHookResult","label","description","validationMessages","getOptionLabel","FieldComponent","metadata","control","errorMessage","useHookFieldResolution","fieldMetadata","getFieldWithOptions","defaultOptions","options","entry","index","jsx","RadioGroupField"],"mappings":";;;;AAmBO,SAASA,EAAiE;AAAA,EAC/E,MAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AACF,GAAiD;AAC/C,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,cAAAC,EAAA,IAAiBC;AAAA,IAC1CV;AAAA,IACAC;AAAA,IACAG;AAAA,EAAA,GAEIO,IAAgBC,EAA4BL,GAAUP,CAAI,GAE1Da,IAAiBF,GAAe,WAAW,CAAA,GAC3CG,IACJT,KAAkBM,GAAe,UAC7BA,EAAc,QAAQ,IAAI,CAACI,GAAOC,OAAW;AAAA,IAC3C,OAAOH,EAAeG,CAAK,GAAG,SAAS;AAAA,IACvC,OAAOX,EAAeU,CAAK;AAAA,EAAA,EAC3B,IACFF;AAEN,SACE,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAlB;AAAA,MACA,SAAAQ;AAAA,MACA,OAAAN;AAAA,MACA,aAAAC;AAAA,MACA,cAAAM;AAAA,MACA,YAAYE,GAAe;AAAA,MAC3B,YAAYA,GAAe;AAAA,MAC3B,SAAAG;AAAA,MACA,gBAAAR;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { BaseFieldProps, ValidationMessages } from '../types';
|
|
3
|
+
import { BaseFormHookReady } from '../../types';
|
|
4
|
+
import { SelectProps } from '../../../Common/UI/Select/SelectTypes';
|
|
5
|
+
export interface SelectHookFieldProps<TErrorCode extends string = never, TEntry = unknown> extends BaseFieldProps {
|
|
6
|
+
name: string;
|
|
7
|
+
formHookResult?: BaseFormHookReady;
|
|
8
|
+
validationMessages?: ValidationMessages<TErrorCode>;
|
|
9
|
+
getOptionLabel?: (entry: TEntry) => string;
|
|
10
|
+
FieldComponent?: ComponentType<SelectProps>;
|
|
11
|
+
}
|
|
12
|
+
export declare function SelectHookField<TErrorCode extends string, TEntry = unknown>({ name, formHookResult, label, description, validationMessages, getOptionLabel, FieldComponent, }: SelectHookFieldProps<TErrorCode, TEntry>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as F } from "react/jsx-runtime";
|
|
2
|
+
import { useHookFieldResolution as R } from "../useHookFieldResolution.js";
|
|
3
|
+
import { getFieldWithOptions as b } from "../getFieldWithOptions.js";
|
|
4
|
+
import { SelectField as k } from "../../../Common/Fields/SelectField/SelectField.js";
|
|
5
|
+
function H({
|
|
6
|
+
name: o,
|
|
7
|
+
formHookResult: s,
|
|
8
|
+
label: r,
|
|
9
|
+
description: l,
|
|
10
|
+
validationMessages: d,
|
|
11
|
+
getOptionLabel: t,
|
|
12
|
+
FieldComponent: n
|
|
13
|
+
}) {
|
|
14
|
+
const { metadata: a, control: p, errorMessage: u } = R(
|
|
15
|
+
o,
|
|
16
|
+
s,
|
|
17
|
+
d
|
|
18
|
+
), e = b(a, o), i = e?.options ?? [], c = t && e?.entries ? e.entries.map((m, f) => ({
|
|
19
|
+
value: i[f]?.value ?? "",
|
|
20
|
+
label: t(m)
|
|
21
|
+
})) : i;
|
|
22
|
+
return /* @__PURE__ */ F(
|
|
23
|
+
k,
|
|
24
|
+
{
|
|
25
|
+
name: o,
|
|
26
|
+
control: p,
|
|
27
|
+
label: r,
|
|
28
|
+
description: l,
|
|
29
|
+
errorMessage: u,
|
|
30
|
+
isRequired: e?.isRequired,
|
|
31
|
+
isDisabled: e?.isDisabled,
|
|
32
|
+
options: c,
|
|
33
|
+
FieldComponent: n
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
export {
|
|
38
|
+
H as SelectHookField
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=SelectHookField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectHookField.js","sources":["../../../../../src/components/UNSTABLE_Hooks/form/fields/SelectHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport type { BaseFieldProps, ValidationMessages } from '../types'\nimport type { BaseFormHookReady } from '../../types'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport { getFieldWithOptions } from '../getFieldWithOptions'\nimport { SelectField } from '@/components/Common'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\n\nexport interface SelectHookFieldProps<\n TErrorCode extends string = never,\n TEntry = unknown,\n> extends BaseFieldProps {\n name: string\n formHookResult?: BaseFormHookReady\n validationMessages?: ValidationMessages<TErrorCode>\n getOptionLabel?: (entry: TEntry) => string\n FieldComponent?: ComponentType<SelectProps>\n}\n\nexport function SelectHookField<TErrorCode extends string, TEntry = unknown>({\n name,\n formHookResult,\n label,\n description,\n validationMessages,\n getOptionLabel,\n FieldComponent,\n}: SelectHookFieldProps<TErrorCode, TEntry>) {\n const { metadata, control, errorMessage } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = getFieldWithOptions<TEntry>(metadata, name)\n\n const defaultOptions = fieldMetadata?.options ?? []\n const options =\n getOptionLabel && fieldMetadata?.entries\n ? fieldMetadata.entries.map((entry, index) => ({\n value: defaultOptions[index]?.value ?? '',\n label: getOptionLabel(entry),\n }))\n : defaultOptions\n\n return (\n <SelectField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n options={options}\n FieldComponent={FieldComponent}\n />\n )\n}\n"],"names":["SelectHookField","name","formHookResult","label","description","validationMessages","getOptionLabel","FieldComponent","metadata","control","errorMessage","useHookFieldResolution","fieldMetadata","getFieldWithOptions","defaultOptions","options","entry","index","jsx","SelectField"],"mappings":";;;;AAmBO,SAASA,EAA6D;AAAA,EAC3E,MAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AACF,GAA6C;AAC3C,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,cAAAC,EAAA,IAAiBC;AAAA,IAC1CV;AAAA,IACAC;AAAA,IACAG;AAAA,EAAA,GAEIO,IAAgBC,EAA4BL,GAAUP,CAAI,GAE1Da,IAAiBF,GAAe,WAAW,CAAA,GAC3CG,IACJT,KAAkBM,GAAe,UAC7BA,EAAc,QAAQ,IAAI,CAACI,GAAOC,OAAW;AAAA,IAC3C,OAAOH,EAAeG,CAAK,GAAG,SAAS;AAAA,IACvC,OAAOX,EAAeU,CAAK;AAAA,EAAA,EAC3B,IACFF;AAEN,SACE,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAlB;AAAA,MACA,SAAAQ;AAAA,MACA,OAAAN;AAAA,MACA,aAAAC;AAAA,MACA,cAAAM;AAAA,MACA,YAAYE,GAAe;AAAA,MAC3B,YAAYA,GAAe;AAAA,MAC3B,SAAAG;AAAA,MACA,gBAAAR;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { BaseFieldProps, ValidationMessages } from '../types';
|
|
3
|
+
import { BaseFormHookReady } from '../../types';
|
|
4
|
+
import { SwitchProps } from '../../../Common/UI/Switch/SwitchTypes';
|
|
5
|
+
export interface SwitchHookFieldProps<TErrorCode extends string = never> extends BaseFieldProps {
|
|
6
|
+
name: string;
|
|
7
|
+
formHookResult?: BaseFormHookReady;
|
|
8
|
+
validationMessages?: ValidationMessages<TErrorCode>;
|
|
9
|
+
FieldComponent?: ComponentType<SwitchProps>;
|
|
10
|
+
}
|
|
11
|
+
export declare function SwitchHookField<TErrorCode extends string>({ name, formHookResult, label, description, validationMessages, FieldComponent, }: SwitchHookFieldProps<TErrorCode>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useHookFieldResolution as f } from "../useHookFieldResolution.js";
|
|
3
|
+
import { SwitchField as m } from "../../../Common/Fields/SwitchField/SwitchField.js";
|
|
4
|
+
function R({
|
|
5
|
+
name: i,
|
|
6
|
+
formHookResult: e,
|
|
7
|
+
label: t,
|
|
8
|
+
description: r,
|
|
9
|
+
validationMessages: s,
|
|
10
|
+
FieldComponent: d
|
|
11
|
+
}) {
|
|
12
|
+
const { metadata: l, control: a, errorMessage: c } = f(
|
|
13
|
+
i,
|
|
14
|
+
e,
|
|
15
|
+
s
|
|
16
|
+
), o = l[i];
|
|
17
|
+
return /* @__PURE__ */ u(
|
|
18
|
+
m,
|
|
19
|
+
{
|
|
20
|
+
name: i,
|
|
21
|
+
control: a,
|
|
22
|
+
label: t,
|
|
23
|
+
description: r,
|
|
24
|
+
errorMessage: c,
|
|
25
|
+
isRequired: o?.isRequired,
|
|
26
|
+
isDisabled: o?.isDisabled,
|
|
27
|
+
FieldComponent: d
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
export {
|
|
32
|
+
R as SwitchHookField
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=SwitchHookField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SwitchHookField.js","sources":["../../../../../src/components/UNSTABLE_Hooks/form/fields/SwitchHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport type { BaseFieldProps, ValidationMessages } from '../types'\nimport type { BaseFormHookReady } from '../../types'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport { SwitchField } from '@/components/Common'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\n\nexport interface SwitchHookFieldProps<TErrorCode extends string = never> extends BaseFieldProps {\n name: string\n formHookResult?: BaseFormHookReady\n validationMessages?: ValidationMessages<TErrorCode>\n FieldComponent?: ComponentType<SwitchProps>\n}\n\nexport function SwitchHookField<TErrorCode extends string>({\n name,\n formHookResult,\n label,\n description,\n validationMessages,\n FieldComponent,\n}: SwitchHookFieldProps<TErrorCode>) {\n const { metadata, control, errorMessage } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = metadata[name]\n\n return (\n <SwitchField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n FieldComponent={FieldComponent}\n />\n )\n}\n"],"names":["SwitchHookField","name","formHookResult","label","description","validationMessages","FieldComponent","metadata","control","errorMessage","useHookFieldResolution","fieldMetadata","jsx","SwitchField"],"mappings":";;;AAcO,SAASA,EAA2C;AAAA,EACzD,MAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AACF,GAAqC;AACnC,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,cAAAC,EAAA,IAAiBC;AAAA,IAC1CT;AAAA,IACAC;AAAA,IACAG;AAAA,EAAA,GAEIM,IAAgBJ,EAASN,CAAI;AAEnC,SACE,gBAAAW;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAZ;AAAA,MACA,SAAAO;AAAA,MACA,OAAAL;AAAA,MACA,aAAAC;AAAA,MACA,cAAAK;AAAA,MACA,YAAYE,GAAe;AAAA,MAC3B,YAAYA,GAAe;AAAA,MAC3B,gBAAAL;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
import { BaseFieldProps, ValidationMessages } from '../types';
|
|
3
|
+
import { BaseFormHookReady } from '../../types';
|
|
4
|
+
import { TextInputProps } from '../../../Common/UI/TextInput/TextInputTypes';
|
|
5
|
+
export interface TextInputHookFieldProps<TErrorCode extends string = never> extends BaseFieldProps {
|
|
6
|
+
name: string;
|
|
7
|
+
formHookResult?: BaseFormHookReady;
|
|
8
|
+
validationMessages?: ValidationMessages<TErrorCode>;
|
|
9
|
+
transform?: (value: string) => string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
FieldComponent?: ComponentType<TextInputProps>;
|
|
12
|
+
}
|
|
13
|
+
export declare function TextInputHookField<TErrorCode extends string>({ name, formHookResult, label, description, validationMessages, transform, placeholder, FieldComponent, }: TextInputHookFieldProps<TErrorCode>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useHookFieldResolution as m } from "../useHookFieldResolution.js";
|
|
3
|
+
import { TextInputField as c } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
4
|
+
function b({
|
|
5
|
+
name: e,
|
|
6
|
+
formHookResult: t,
|
|
7
|
+
label: i,
|
|
8
|
+
description: r,
|
|
9
|
+
validationMessages: s,
|
|
10
|
+
transform: d,
|
|
11
|
+
placeholder: l,
|
|
12
|
+
FieldComponent: u
|
|
13
|
+
}) {
|
|
14
|
+
const { metadata: a, control: n, errorMessage: p } = m(
|
|
15
|
+
e,
|
|
16
|
+
t,
|
|
17
|
+
s
|
|
18
|
+
), o = a[e];
|
|
19
|
+
return /* @__PURE__ */ f(
|
|
20
|
+
c,
|
|
21
|
+
{
|
|
22
|
+
name: e,
|
|
23
|
+
control: n,
|
|
24
|
+
label: i,
|
|
25
|
+
description: r,
|
|
26
|
+
errorMessage: p,
|
|
27
|
+
isRequired: o?.isRequired,
|
|
28
|
+
isDisabled: o?.isDisabled,
|
|
29
|
+
transform: d,
|
|
30
|
+
placeholder: l,
|
|
31
|
+
FieldComponent: u
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
b as TextInputHookField
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=TextInputHookField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextInputHookField.js","sources":["../../../../../src/components/UNSTABLE_Hooks/form/fields/TextInputHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport type { BaseFieldProps, ValidationMessages } from '../types'\nimport type { BaseFormHookReady } from '../../types'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport { TextInputField } from '@/components/Common'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\n\nexport interface TextInputHookFieldProps<TErrorCode extends string = never> extends BaseFieldProps {\n name: string\n formHookResult?: BaseFormHookReady\n validationMessages?: ValidationMessages<TErrorCode>\n transform?: (value: string) => string\n placeholder?: string\n FieldComponent?: ComponentType<TextInputProps>\n}\n\nexport function TextInputHookField<TErrorCode extends string>({\n name,\n formHookResult,\n label,\n description,\n validationMessages,\n transform,\n placeholder,\n FieldComponent,\n}: TextInputHookFieldProps<TErrorCode>) {\n const { metadata, control, errorMessage } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = metadata[name]\n\n return (\n <TextInputField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n transform={transform}\n placeholder={placeholder}\n FieldComponent={FieldComponent}\n />\n )\n}\n"],"names":["TextInputHookField","name","formHookResult","label","description","validationMessages","transform","placeholder","FieldComponent","metadata","control","errorMessage","useHookFieldResolution","fieldMetadata","jsx","TextInputField"],"mappings":";;;AAgBO,SAASA,EAA8C;AAAA,EAC5D,MAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,gBAAAC;AACF,GAAwC;AACtC,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,cAAAC,EAAA,IAAiBC;AAAA,IAC1CX;AAAA,IACAC;AAAA,IACAG;AAAA,EAAA,GAEIQ,IAAgBJ,EAASR,CAAI;AAEnC,SACE,gBAAAa;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAAd;AAAA,MACA,SAAAS;AAAA,MACA,OAAAP;AAAA,MACA,aAAAC;AAAA,MACA,cAAAO;AAAA,MACA,YAAYE,GAAe;AAAA,MAC3B,YAAYA,GAAe;AAAA,MAC3B,WAAAP;AAAA,MACA,aAAAC;AAAA,MACA,gBAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "./types/i18next.d.ts"
|
|
2
|
+
export { TextInputHookField, type TextInputHookFieldProps } from './TextInputHookField';
|
|
3
|
+
export { SelectHookField, type SelectHookFieldProps } from './SelectHookField';
|
|
4
|
+
export { CheckboxHookField, type CheckboxHookFieldProps } from './CheckboxHookField';
|
|
5
|
+
export { NumberInputHookField, type NumberInputHookFieldProps } from './NumberInputHookField';
|
|
6
|
+
export { DatePickerHookField, type DatePickerHookFieldProps } from './DatePickerHookField';
|
|
7
|
+
export { RadioGroupHookField, type RadioGroupHookFieldProps } from './RadioGroupHookField';
|
|
8
|
+
export { SwitchHookField, type SwitchHookFieldProps } from './SwitchHookField';
|
|
9
|
+
export type { TextInputProps } from '../../../Common/UI/TextInput/TextInputTypes';
|
|
10
|
+
export type { SelectProps, SelectOption } from '../../../Common/UI/Select/SelectTypes';
|
|
11
|
+
export type { CheckboxProps } from '../../../Common/UI/Checkbox/CheckboxTypes';
|
|
12
|
+
export type { NumberInputProps } from '../../../Common/UI/NumberInput/NumberInputTypes';
|
|
13
|
+
export type { DatePickerProps } from '../../../Common/UI/DatePicker/DatePickerTypes';
|
|
14
|
+
export type { RadioGroupProps, RadioGroupOption, } from '../../../Common/UI/RadioGroup/RadioGroupTypes';
|
|
15
|
+
export type { SwitchProps } from '../../../Common/UI/Switch/SwitchTypes';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFieldWithOptions.js","sources":["../../../../src/components/UNSTABLE_Hooks/form/getFieldWithOptions.ts"],"sourcesContent":["import type { FieldMetadataWithOptions, FieldsMetadata } from './types'\n\nexport function getFieldWithOptions<TEntry = unknown>(\n metadata: FieldsMetadata,\n name: string,\n): FieldMetadataWithOptions<TEntry> | undefined {\n const field = metadata[name]\n if (field && 'options' in field) return field as FieldMetadataWithOptions<TEntry>\n return undefined\n}\n"],"names":["getFieldWithOptions","metadata","name","field"],"mappings":"AAEO,SAASA,EACdC,GACAC,GAC8C;AAC9C,QAAMC,IAAQF,EAASC,CAAI;AAC3B,MAAIC,KAAS,aAAaA,EAAO,QAAOA;AAE1C;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
2
|
+
import { ZodTypeAny } from 'zod';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a typed getter that returns the current form values parsed through
|
|
5
|
+
* the Zod schema. The result matches what `handleSubmit` would provide to its
|
|
6
|
+
* valid callback — all preprocessing transforms (e.g. string→boolean coercion)
|
|
7
|
+
* are applied.
|
|
8
|
+
*
|
|
9
|
+
* Returns `undefined` when the current form state does not satisfy the schema
|
|
10
|
+
* (e.g. required fields are empty, cross-field rules fail). This is safe to call
|
|
11
|
+
* at any time — it never throws.
|
|
12
|
+
*
|
|
13
|
+
* **Side effects:** None. `getValues()` is a synchronous read from react-hook-form's
|
|
14
|
+
* internal store — it does not trigger re-renders, mutate form state, or update
|
|
15
|
+
* validation errors. `safeParse()` is a pure validation/transform that creates
|
|
16
|
+
* a new object without mutating the input.
|
|
17
|
+
*/
|
|
18
|
+
export declare function createGetFormSubmissionValues<TFormData extends FieldValues, TFormOutputs>(formMethods: UseFormReturn<TFormData, unknown, TFormOutputs>, schema: ZodTypeAny): () => TFormOutputs | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getFormSubmissionValues.js","sources":["../../../../src/components/UNSTABLE_Hooks/form/getFormSubmissionValues.ts"],"sourcesContent":["import type { FieldValues, UseFormReturn } from 'react-hook-form'\nimport type { ZodTypeAny } from 'zod'\n\n/**\n * Creates a typed getter that returns the current form values parsed through\n * the Zod schema. The result matches what `handleSubmit` would provide to its\n * valid callback — all preprocessing transforms (e.g. string→boolean coercion)\n * are applied.\n *\n * Returns `undefined` when the current form state does not satisfy the schema\n * (e.g. required fields are empty, cross-field rules fail). This is safe to call\n * at any time — it never throws.\n *\n * **Side effects:** None. `getValues()` is a synchronous read from react-hook-form's\n * internal store — it does not trigger re-renders, mutate form state, or update\n * validation errors. `safeParse()` is a pure validation/transform that creates\n * a new object without mutating the input.\n */\nexport function createGetFormSubmissionValues<TFormData extends FieldValues, TFormOutputs>(\n formMethods: UseFormReturn<TFormData, unknown, TFormOutputs>,\n schema: ZodTypeAny,\n): () => TFormOutputs | undefined {\n return () => {\n const result = schema.safeParse(formMethods.getValues())\n return result.success ? (result.data as TFormOutputs) : undefined\n }\n}\n"],"names":["createGetFormSubmissionValues","formMethods","schema","result"],"mappings":"AAkBO,SAASA,EACdC,GACAC,GACgC;AAChC,SAAO,MAAM;AACX,UAAMC,IAASD,EAAO,UAAUD,EAAY,WAAW;AACvD,WAAOE,EAAO,UAAWA,EAAO,OAAwB;AAAA,EAC1D;AACF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import "./types/i18next.d.ts"
|
|
2
|
-
export type { FieldMetadata, FieldMetadataWithOptions, FieldsMetadata } from './types';
|
|
2
|
+
export type { FieldMetadata, FieldMetadataWithOptions, FieldsMetadata, ValidationMessages, BaseFieldProps, HookFieldProps, } from './types';
|
|
3
3
|
export { withOptions } from './withOptions';
|
|
4
4
|
export type { FormFieldsMetadataContextValue } from './FormFieldsMetadataContext';
|
|
5
5
|
export { FormFieldsMetadataProvider } from './FormFieldsMetadataProvider';
|
|
6
6
|
export { SDKFormProvider } from './SDKFormProvider';
|
|
7
7
|
export { useFieldsMetadata } from './useFieldsMetadata';
|
|
8
8
|
export { useFieldErrorMessage } from './useFieldErrorMessage';
|
|
9
|
+
export { resolveFieldError } from './resolveFieldError';
|
|
10
|
+
export { useHookFieldResolution } from './useHookFieldResolution';
|
|
9
11
|
export { deriveFieldsMetadata } from './deriveFieldsMetadata';
|
|
12
|
+
export { composeFormSchema } from './composeFormSchema';
|
|
13
|
+
export { resolveRequiredFields, filterRequiredFields, type RequiredFields, } from './resolveRequiredFields';
|
|
14
|
+
export { composeSubmitHandler } from './composeSubmitHandler';
|
|
15
|
+
export { createGetFormSubmissionValues } from './getFormSubmissionValues';
|
|
16
|
+
export { TextInputHookField, type TextInputHookFieldProps, SelectHookField, type SelectHookFieldProps, CheckboxHookField, type CheckboxHookFieldProps, NumberInputHookField, type NumberInputHookFieldProps, DatePickerHookField, type DatePickerHookFieldProps, RadioGroupHookField, type RadioGroupHookFieldProps, type TextInputProps, type SelectProps, type SelectOption, type CheckboxProps, type NumberInputProps, type DatePickerProps, type RadioGroupProps, type RadioGroupOption, SwitchHookField, type SwitchHookFieldProps, type SwitchProps, } from './fields';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FieldErrors } from 'react-hook-form';
|
|
2
|
+
import { ValidationMessages } from './types';
|
|
3
|
+
import { SDKError } from '../../../types/sdkError';
|
|
4
|
+
export declare function resolveFieldError<TErrorCode extends string>(fieldName: string, formErrors: FieldErrors, sdkErrors: SDKError[], validationMessages?: ValidationMessages<TErrorCode>): string | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function i(e, f, n, o) {
|
|
2
|
+
const r = f[e]?.message;
|
|
3
|
+
if (r && o?.[r])
|
|
4
|
+
return o[r];
|
|
5
|
+
for (const t of n) {
|
|
6
|
+
const s = t.fieldErrors.find((d) => d.field === e);
|
|
7
|
+
if (s?.message) return s.message;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
i as resolveFieldError
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=resolveFieldError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveFieldError.js","sources":["../../../../src/components/UNSTABLE_Hooks/form/resolveFieldError.ts"],"sourcesContent":["import type { FieldErrors } from 'react-hook-form'\nimport type { ValidationMessages } from './types'\nimport type { SDKError } from '@/types/sdkError'\n\nexport function resolveFieldError<TErrorCode extends string>(\n fieldName: string,\n formErrors: FieldErrors,\n sdkErrors: SDKError[],\n validationMessages?: ValidationMessages<TErrorCode>,\n): string | undefined {\n const errorCode = formErrors[fieldName]?.message as TErrorCode | undefined\n if (errorCode && validationMessages?.[errorCode]) {\n return validationMessages[errorCode]\n }\n\n for (const sdkError of sdkErrors) {\n const fieldError = sdkError.fieldErrors.find(fe => fe.field === fieldName)\n if (fieldError?.message) return fieldError.message\n }\n\n return undefined\n}\n"],"names":["resolveFieldError","fieldName","formErrors","sdkErrors","validationMessages","errorCode","sdkError","fieldError","fe"],"mappings":"AAIO,SAASA,EACdC,GACAC,GACAC,GACAC,GACoB;AACpB,QAAMC,IAAYH,EAAWD,CAAS,GAAG;AACzC,MAAII,KAAaD,IAAqBC,CAAS;AAC7C,WAAOD,EAAmBC,CAAS;AAGrC,aAAWC,KAAYH,GAAW;AAChC,UAAMI,IAAaD,EAAS,YAAY,KAAK,CAAAE,MAAMA,EAAG,UAAUP,CAAS;AACzE,QAAIM,GAAY,QAAS,QAAOA,EAAW;AAAA,EAC7C;AAGF;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type RequiredFields<T> = T[] | {
|
|
2
|
+
create?: T[];
|
|
3
|
+
update?: T[];
|
|
4
|
+
};
|
|
5
|
+
export declare function resolveRequiredFields<T>(requiredFields: RequiredFields<T> | undefined, mode: 'create' | 'update'): T[];
|
|
6
|
+
export declare function filterRequiredFields<T>(requiredFields: RequiredFields<T> | undefined, exclude: T): RequiredFields<T> | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
function f(t, a) {
|
|
2
|
+
return t ? Array.isArray(t) ? t : (a === "create" ? t.create : t.update) ?? [] : [];
|
|
3
|
+
}
|
|
4
|
+
function n(t, a) {
|
|
5
|
+
return t && (Array.isArray(t) ? t.filter((r) => r !== a) : {
|
|
6
|
+
...t.create && { create: t.create.filter((r) => r !== a) },
|
|
7
|
+
...t.update && { update: t.update.filter((r) => r !== a) }
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
n as filterRequiredFields,
|
|
12
|
+
f as resolveRequiredFields
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=resolveRequiredFields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveRequiredFields.js","sources":["../../../../src/components/UNSTABLE_Hooks/form/resolveRequiredFields.ts"],"sourcesContent":["export type RequiredFields<T> = T[] | { create?: T[]; update?: T[] }\n\nexport function resolveRequiredFields<T>(\n requiredFields: RequiredFields<T> | undefined,\n mode: 'create' | 'update',\n): T[] {\n if (!requiredFields) return []\n if (Array.isArray(requiredFields)) return requiredFields\n return (mode === 'create' ? requiredFields.create : requiredFields.update) ?? []\n}\n\nexport function filterRequiredFields<T>(\n requiredFields: RequiredFields<T> | undefined,\n exclude: T,\n): RequiredFields<T> | undefined {\n if (!requiredFields) return requiredFields\n if (Array.isArray(requiredFields)) return requiredFields.filter(f => f !== exclude)\n return {\n ...(requiredFields.create && { create: requiredFields.create.filter(f => f !== exclude) }),\n ...(requiredFields.update && { update: requiredFields.update.filter(f => f !== exclude) }),\n }\n}\n"],"names":["resolveRequiredFields","requiredFields","mode","filterRequiredFields","exclude","f"],"mappings":"AAEO,SAASA,EACdC,GACAC,GACK;AACL,SAAKD,IACD,MAAM,QAAQA,CAAc,IAAUA,KAClCC,MAAS,WAAWD,EAAe,SAASA,EAAe,WAAW,CAAA,IAFlD,CAAA;AAG9B;AAEO,SAASE,EACdF,GACAG,GAC+B;AAC/B,SAAKH,MACD,MAAM,QAAQA,CAAc,IAAUA,EAAe,OAAO,CAAAI,MAAKA,MAAMD,CAAO,IAC3E;AAAA,IACL,GAAIH,EAAe,UAAU,EAAE,QAAQA,EAAe,OAAO,OAAO,CAAAI,MAAKA,MAAMD,CAAO,EAAA;AAAA,IACtF,GAAIH,EAAe,UAAU,EAAE,QAAQA,EAAe,OAAO,OAAO,CAAAI,MAAKA,MAAMD,CAAO,EAAA;AAAA,EAAE;AAE5F;"}
|