@gusto/embedded-react-sdk 0.42.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +127 -0
- package/README.md +23 -5
- package/dist/assets/icons/edit-02.svg.js +10 -0
- package/dist/assets/icons/edit-02.svg.js.map +1 -0
- package/dist/assets/icons/search-lg.svg.js +10 -0
- package/dist/assets/icons/search-lg.svg.js.map +1 -0
- package/dist/components/Base/Base.js +3 -2
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.d.ts +3 -1
- package/dist/components/Common/DataView/DataCards/DataCards.js +55 -45
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +16 -10
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.js +86 -64
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +1 -1
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -1
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.js +52 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.js.map +1 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.module.scss.js +18 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.module.scss.js.map +1 -0
- package/dist/components/Common/Fields/hooks/FieldElementRegistryProvider.d.ts +13 -0
- package/dist/components/Common/Fields/hooks/FieldElementRegistryProvider.js +12 -0
- package/dist/components/Common/Fields/hooks/FieldElementRegistryProvider.js.map +1 -0
- package/dist/components/Common/Fields/hooks/fieldElementRegistry.d.ts +21 -0
- package/dist/components/Common/Fields/hooks/fieldElementRegistry.js +29 -0
- package/dist/components/Common/Fields/hooks/fieldElementRegistry.js.map +1 -0
- package/dist/components/Common/Fields/hooks/useField.js +43 -37
- package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
- package/dist/components/Common/Flex/Flex.d.ts +2 -1
- package/dist/components/Common/Flex/Flex.js +14 -12
- package/dist/components/Common/Flex/Flex.js.map +1 -1
- package/dist/components/Common/Flex/Flex.module.scss.js +4 -4
- package/dist/components/Common/TaxInputs/TaxInputs.js +1 -1
- package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
- package/dist/components/Common/UI/Box/Box.module.scss.js +4 -4
- package/dist/components/Common/UI/Button/Button.module.scss.js +2 -2
- package/dist/components/Common/UI/ComboBox/ComboBox.d.ts +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.js +26 -25
- package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +5 -0
- package/dist/components/Common/UI/DatePicker/DatePicker.js +4 -4
- package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/Common/UI/Dialog/Dialog.js +35 -36
- package/dist/components/Common/UI/Dialog/Dialog.js.map +1 -1
- package/dist/components/Common/UI/Menu/Menu.js +18 -17
- package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
- package/dist/components/Common/UI/Menu/MenuTypes.d.ts +5 -0
- package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -1
- package/dist/components/Common/UI/Select/Select.js +9 -9
- package/dist/components/Common/UI/Select/Select.js.map +1 -1
- package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +2 -2
- package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +3 -2
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +8 -6
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +10 -8
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +7 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +8 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +7 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +3 -2
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +9 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +11 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +7 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +12 -10
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +13 -11
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +6 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +7 -5
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +9 -8
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +7 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +4 -3
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js +26 -25
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +9 -7
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +8 -7
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +4 -2
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +12 -8
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +7 -5
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +10 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +12 -10
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +8 -6
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.d.ts +6 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +29 -27
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +59 -54
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/index.d.ts +2 -0
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +7 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +43 -40
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.module.scss.js +8 -0
- package/dist/components/Company/Locations/LocationsList/List.module.scss.js.map +1 -0
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +3 -2
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +7 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +14 -12
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +7 -5
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +3 -2
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +7 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleList.js +4 -3
- package/dist/components/Company/PaySchedule/PayScheduleList.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js +53 -52
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +7 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +12 -11
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +67 -63
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +7 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.d.ts +2 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js +6 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js.map +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +8 -6
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +58 -26
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +7 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/exports/companyOnboarding.d.ts +3 -0
- package/dist/components/Company/exports/companyOnboarding.js +21 -15
- package/dist/components/Company/exports/companyOnboarding.js.map +1 -1
- package/dist/components/Company/index.d.ts +1 -0
- package/dist/components/Company/index.js +14 -12
- package/dist/components/Company/index.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +10 -9
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +4 -4
- package/dist/components/Contractor/Address/Head.js +12 -9
- package/dist/components/Contractor/Address/Head.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +9 -5
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +20 -19
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +42 -41
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +13 -10
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +17 -17
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -2
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +4 -2
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +7 -5
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +4 -3
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +4 -2
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +15 -13
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +4 -2
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +9 -7
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +48 -49
- package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +35 -33
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +4 -3
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/Submit/SubmitDone.js +14 -12
- package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
- package/dist/components/Employee/Compensation/Compensation.d.ts +7 -4
- package/dist/components/Employee/Compensation/Compensation.js +72 -179
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/CompensationFlowComponents.d.ts +27 -0
- package/dist/components/Employee/Compensation/CompensationFlowComponents.js +61 -0
- package/dist/components/Employee/Compensation/CompensationFlowComponents.js.map +1 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.d.ts +14 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js +128 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js.map +1 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.d.ts +17 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js +224 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js.map +1 -0
- package/dist/components/Employee/Compensation/EditCompensation/index.d.ts +5 -0
- package/dist/components/Employee/Compensation/JobsList/JobsList.d.ts +5 -0
- package/dist/components/Employee/Compensation/JobsList/JobsList.js +47 -0
- package/dist/components/Employee/Compensation/JobsList/JobsList.js.map +1 -0
- package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.d.ts +11 -0
- package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js +98 -0
- package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js.map +1 -0
- package/dist/components/Employee/Compensation/JobsList/index.d.ts +5 -0
- package/dist/components/Employee/Compensation/{useCompensation.d.ts → compensationSchema.d.ts} +0 -22
- package/dist/components/Employee/Compensation/{useCompensation.js → compensationSchema.js} +9 -12
- package/dist/components/Employee/Compensation/compensationSchema.js.map +1 -0
- package/dist/components/Employee/Compensation/compensationStateMachine.d.ts +6 -0
- package/dist/components/Employee/Compensation/compensationStateMachine.js +73 -0
- package/dist/components/Employee/Compensation/compensationStateMachine.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +62 -36
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +81 -57
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +5 -12
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +22 -35
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/index.d.ts +5 -3
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +55 -13
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +216 -226
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.d.ts +15 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js +27 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.d.ts +19 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +29 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +7 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +43 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +37 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.d.ts +13 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js +26 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +56 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +180 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -0
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +15 -13
- package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +3 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.js +33 -15
- package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
- package/dist/components/Employee/Dashboard/DocumentsView.js +13 -11
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.js +11 -9
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
- package/dist/components/Employee/Dashboard/TaxesView.js +21 -19
- package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +3 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +54 -33
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +15 -11
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +37 -33
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +26 -26
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +7 -3
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +8 -7
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +6 -5
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +4 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +7 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +9 -7
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +36 -34
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +8 -7
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.d.ts +1 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js +100 -99
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +4 -2
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js +9 -7
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js +42 -40
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/index.d.ts +3 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.d.ts +8 -0
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js +71 -0
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/management/index.d.ts +2 -0
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.d.ts +8 -0
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +55 -0
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/onboarding/index.d.ts +2 -0
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.d.ts +15 -0
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +104 -0
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/shared/index.d.ts +3 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.d.ts +41 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js +40 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.d.ts +18 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +31 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/index.d.ts +5 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.d.ts +37 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js +140 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js.map +1 -0
- package/dist/components/Employee/Landing/Landing.js +15 -14
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +2 -2
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +9 -7
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -4
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +7 -6
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -6
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +4 -3
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +9 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/management/Profile.d.ts +6 -0
- package/dist/components/Employee/Profile/management/Profile.js +122 -0
- package/dist/components/Employee/Profile/management/Profile.js.map +1 -0
- package/dist/components/Employee/Profile/management/Profile.module.scss.js +8 -0
- package/dist/components/Employee/Profile/management/Profile.module.scss.js.map +1 -0
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js +352 -0
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -0
- package/dist/components/Employee/Profile/{EmployeeProfile.js → onboarding/EmployeeProfile.js} +60 -66
- package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js.map +1 -0
- package/dist/components/Employee/Profile/{Profile.d.ts → onboarding/Profile.d.ts} +2 -2
- package/dist/components/Employee/Profile/{Profile.js → onboarding/Profile.js} +4 -4
- package/dist/components/Employee/Profile/onboarding/Profile.js.map +1 -0
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +9 -4
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js +61 -58
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.d.ts +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +50 -49
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +47 -46
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +14 -14
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/StateTaxes/index.d.ts +2 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxes.d.ts +6 -0
- package/dist/components/Employee/StateTaxes/management/StateTaxes.js +59 -0
- package/dist/components/Employee/StateTaxes/management/StateTaxes.js.map +1 -0
- package/dist/components/Employee/StateTaxes/management/index.d.ts +2 -0
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.d.ts +8 -0
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +49 -0
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -0
- package/dist/components/Employee/StateTaxes/onboarding/index.d.ts +2 -0
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.d.ts +14 -0
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +32 -0
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -0
- package/dist/components/Employee/StateTaxes/shared/index.d.ts +3 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/__fixtures__/stateTaxesFixtures.d.ts +8 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/__fixtures__/toWireFormat.d.ts +36 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.d.ts +56 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.js +116 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.js.map +1 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.d.ts +12 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +76 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js.map +1 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.d.ts +14 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.js +23 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.js.map +1 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMeta.d.ts +6 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldProps.d.ts +39 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.d.ts +46 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js +93 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js.map +1 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/index.d.ts +6 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.d.ts +36 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js +159 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js.map +1 -0
- package/dist/components/Employee/Taxes/Actions.js +10 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +6 -4
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +7 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +4 -2
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +13 -12
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +4 -2
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
- package/dist/components/Employee/exports/employeeManagement.d.ts +3 -0
- package/dist/components/Employee/exports/employeeManagement.js +16 -10
- package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
- package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
- package/dist/components/Employee/exports/employeeOnboarding.js +19 -19
- package/dist/components/Employee/index.d.ts +2 -1
- package/dist/components/Employee/index.js +37 -37
- package/dist/components/Flow/FlowHeader.js +11 -10
- package/dist/components/Flow/FlowHeader.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +56 -54
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +12 -11
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +4 -3
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +10 -8
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +23 -20
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +20 -18
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +12 -10
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +8 -6
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +4 -2
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +13 -11
- 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/PayrollEditEmployee/TimeOffField.js +18 -16
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +4 -2
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +14 -12
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +30 -29
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +4 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +7 -6
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +7 -6
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +4 -2
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +4 -2
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +16 -12
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +11 -0
- package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +3 -0
- package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +19 -0
- package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.d.ts +6 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +149 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +2 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +80 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +21 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/index.d.ts +5 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/HolidaySelectionForm/HolidaySelectionForm.d.ts +1 -0
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +115 -0
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/HolidaySelectionForm/HolidaySelectionFormPresentation.js +13 -10
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +2 -0
- package/dist/components/TimeOff/PolicyList/PolicyList.js +103 -0
- package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -0
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +135 -0
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyListTypes.d.ts +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js +70 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettings.module.scss.js +16 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettings.module.scss.js.map +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +164 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettingsTypes.d.ts +1 -1
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +31 -0
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyTypeSelector/PolicyTypeSelectorPresentation.d.ts +1 -1
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +68 -0
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyTypeSelector/PolicyTypeSelectorTypes.d.ts +1 -0
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/TimeOffFlowComponents.d.ts +3 -3
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +117 -0
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -0
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.d.ts +9 -0
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.js +25 -0
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/timeOffStateMachine.d.ts +4 -2
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +487 -0
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.d.ts +1 -0
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +158 -0
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +230 -0
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.d.ts +6 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +143 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +2 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +103 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +41 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.d.ts +9 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +216 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.d.ts +12 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +64 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +9 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +56 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.d.ts +5 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +251 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js +10 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js.map +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +2 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +143 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +52 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/index.d.ts +7 -0
- package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js +9 -0
- package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +1 -0
- package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.d.ts +6 -0
- package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.js +9 -0
- package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.js.map +1 -0
- package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js +9 -0
- package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/index.d.ts +7 -8
- package/dist/components/TimeOff/index.js +27 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/index.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +2 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +95 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js +10 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/EmployeeTable/EmployeeTableTypes.d.ts +2 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +3 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +86 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +27 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/index.d.ts +3 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/holidayHelpers.d.ts +1 -1
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/holidayHelpers.js +8 -8
- package/dist/components/TimeOff/shared/holidayHelpers.js.map +1 -0
- package/dist/components/TimeOff/shared/holidayHelpers.test.d.ts +1 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +1 -0
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +35 -32
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ThemeProvider/ThemeProvider.d.ts +8 -0
- package/dist/contexts/ThemeProvider/ThemeProvider.js +26 -21
- package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/contexts/ThemeProvider/useTheme.d.ts +1 -1
- package/dist/contexts/ThemeProvider/useTheme.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +2 -0
- package/dist/helpers/dateFormatting.js +4 -0
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/i18n/I18n.js +12 -10
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.Locations.json.js +43 -39
- package/dist/i18n/en/Company.Locations.json.js.map +1 -1
- package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +10 -12
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +18 -16
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js +14 -0
- package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +30 -0
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +14 -14
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +46 -42
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js.map +1 -1
- package/dist/i18n/en/Employee.FederalTaxes.json.js +16 -10
- package/dist/i18n/en/Employee.FederalTaxes.json.js.map +1 -1
- package/dist/i18n/en/Employee.Profile.json.js +24 -20
- package/dist/i18n/en/Employee.Profile.json.js.map +1 -1
- package/dist/i18n/en/Employee.StateTaxes.json.js +14 -6
- package/dist/i18n/en/Employee.StateTaxes.json.js.map +1 -1
- package/dist/i18n/en/Payroll.GrossUpModal.json.js +12 -10
- package/dist/i18n/en/Payroll.GrossUpModal.json.js.map +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +118 -93
- package/dist/index.js.map +1 -1
- package/dist/partner-hook-utils/form/SDKFormProvider.js +18 -14
- package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -1
- package/dist/partner-hook-utils/form/buildFormSchema.js +41 -41
- package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -1
- package/dist/partner-hook-utils/form/composeSubmitHandler.d.ts +10 -6
- package/dist/partner-hook-utils/form/composeSubmitHandler.js +49 -26
- package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +30 -24
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +33 -29
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +34 -28
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +30 -24
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SelectHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/SelectHookField.js +38 -32
- package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SwitchHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js +28 -22
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/TextInputHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js +30 -24
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/withFieldElementRegistry.d.ts +10 -0
- package/dist/partner-hook-utils/form/fields/withFieldElementRegistry.js +9 -0
- package/dist/partner-hook-utils/form/fields/withFieldElementRegistry.js.map +1 -0
- package/dist/partner-hook-utils/form/index.d.ts +3 -0
- package/dist/partner-hook-utils/form/resolveFieldError.js +10 -7
- package/dist/partner-hook-utils/form/resolveFieldError.js.map +1 -1
- package/dist/partner-hook-utils/form/useFieldErrorMessage.js +10 -7
- package/dist/partner-hook-utils/form/useFieldErrorMessage.js.map +1 -1
- package/dist/partner-hook-utils/form/useHookFieldResolution.d.ts +10 -3
- package/dist/partner-hook-utils/form/useHookFieldResolution.js +6 -6
- package/dist/partner-hook-utils/form/useHookFieldResolution.js.map +1 -1
- package/dist/partner-hook-utils/form/useHookFormInternals.d.ts +22 -0
- package/dist/partner-hook-utils/form/useHookFormInternals.js +12 -0
- package/dist/partner-hook-utils/form/useHookFormInternals.js.map +1 -0
- package/dist/partner-hook-utils/form/withOptions.d.ts +1 -1
- package/dist/partner-hook-utils/form/withOptions.js.map +1 -1
- package/dist/partner-hook-utils/types.d.ts +16 -1
- package/dist/shared/constants.d.ts +24 -0
- package/dist/shared/constants.js +42 -30
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +82 -14
- package/docs/reference/endpoint-inventory.json +453 -123
- package/package.json +22 -20
- package/dist/components/Contractor/Profile/ContractorProfileForm.module.scss.js +0 -8
- package/dist/components/Contractor/Profile/ContractorProfileForm.module.scss.js.map +0 -1
- package/dist/components/Employee/Compensation/Actions.d.ts +0 -1
- package/dist/components/Employee/Compensation/Actions.js +0 -38
- package/dist/components/Employee/Compensation/Actions.js.map +0 -1
- package/dist/components/Employee/Compensation/Edit.d.ts +0 -5
- package/dist/components/Employee/Compensation/Edit.js +0 -178
- package/dist/components/Employee/Compensation/Edit.js.map +0 -1
- package/dist/components/Employee/Compensation/Head.d.ts +0 -1
- package/dist/components/Employee/Compensation/Head.js +0 -22
- package/dist/components/Employee/Compensation/Head.js.map +0 -1
- package/dist/components/Employee/Compensation/List.d.ts +0 -1
- package/dist/components/Employee/Compensation/List.js +0 -71
- package/dist/components/Employee/Compensation/List.js.map +0 -1
- package/dist/components/Employee/Compensation/useCompensation.js.map +0 -1
- package/dist/components/Employee/FederalTaxes/Actions.d.ts +0 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +0 -13
- package/dist/components/Employee/FederalTaxes/Actions.js.map +0 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.d.ts +0 -12
- package/dist/components/Employee/FederalTaxes/FederalForm.js +0 -109
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +0 -1
- package/dist/components/Employee/FederalTaxes/FederalTaxes.d.ts +0 -6
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js +0 -84
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +0 -1
- package/dist/components/Employee/FederalTaxes/Head.d.ts +0 -1
- package/dist/components/Employee/FederalTaxes/Head.js +0 -24
- package/dist/components/Employee/FederalTaxes/Head.js.map +0 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.d.ts +0 -5
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +0 -20
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +0 -1
- package/dist/components/Employee/Profile/AdminProfile.js +0 -358
- package/dist/components/Employee/Profile/AdminProfile.js.map +0 -1
- package/dist/components/Employee/Profile/EmployeeProfile.js.map +0 -1
- package/dist/components/Employee/Profile/Profile.js.map +0 -1
- package/dist/components/Employee/Profile/index.d.ts +0 -2
- package/dist/components/Employee/StateTaxes/Actions.d.ts +0 -1
- package/dist/components/Employee/StateTaxes/Actions.js +0 -13
- package/dist/components/Employee/StateTaxes/Actions.js.map +0 -1
- package/dist/components/Employee/StateTaxes/StateForm.d.ts +0 -6
- package/dist/components/Employee/StateTaxes/StateForm.js +0 -34
- package/dist/components/Employee/StateTaxes/StateForm.js.map +0 -1
- package/dist/components/Employee/StateTaxes/StateTaxes.d.ts +0 -7
- package/dist/components/Employee/StateTaxes/StateTaxes.js +0 -98
- package/dist/components/Employee/StateTaxes/StateTaxes.js.map +0 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.d.ts +0 -8
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +0 -20
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +0 -46
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +0 -46
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +0 -49
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +0 -107
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +0 -124
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js +0 -46
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.module.scss.js +0 -18
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js +0 -166
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +0 -29
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +0 -66
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +0 -103
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js +0 -290
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +0 -71
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +0 -206
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js +0 -35
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js +0 -35
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.d.ts +0 -5
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js +0 -35
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.d.ts +0 -5
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js +0 -35
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/index.js +0 -29
- package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +0 -2
- package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.js.map +0 -1
- /package/dist/components/Employee/{Compensation/shared/useCompensationForm/compensationSchemaParity.test.d.ts → FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.test.d.ts} +0 -0
- /package/dist/components/Employee/Profile/{AdminProfile.d.ts → onboarding/AdminProfile.d.ts} +0 -0
- /package/dist/components/Employee/Profile/{AdminProfile.module.scss.js → onboarding/AdminProfile.module.scss.js} +0 -0
- /package/dist/components/Employee/Profile/{AdminProfile.module.scss.js.map → onboarding/AdminProfile.module.scss.js.map} +0 -0
- /package/dist/components/Employee/Profile/{EmployeeProfile.d.ts → onboarding/EmployeeProfile.d.ts} +0 -0
- /package/dist/components/Employee/Profile/{EmployeeProfile.module.scss.js → onboarding/EmployeeProfile.module.scss.js} +0 -0
- /package/dist/components/Employee/Profile/{EmployeeProfile.module.scss.js.map → onboarding/EmployeeProfile.module.scss.js.map} +0 -0
- /package/dist/components/{UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.test.d.ts → Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.test.d.ts} +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/HolidaySelectionForm/HolidaySelectionFormPresentation.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyList.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyListPresentation.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyListPresentation.module.scss.js +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyListPresentation.module.scss.js.map +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettings.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettingsPresentation.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyTypeSelector/PolicyTypeSelector.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/TimeOffFlow.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/TimeOffFlow.js +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/index.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff/shared/holidayHelpers.test.d.ts → TimeOff/TimeOffFlow/timeOffStateMachine.test.d.ts} +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js.map +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/index.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/EmployeeTable/index.d.ts +0 -0
package/dist/index.js
CHANGED
|
@@ -1,111 +1,136 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as r from "./components/Company/index.js";
|
|
2
|
+
import * as o from "./components/Contractor/index.js";
|
|
3
3
|
import * as e from "./components/Employee/index.js";
|
|
4
4
|
import * as m from "./components/InformationRequests/index.js";
|
|
5
5
|
import * as t from "./components/Payroll/index.js";
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
6
|
+
import * as a from "./components/TimeOff/index.js";
|
|
7
|
+
import * as p from "./components/Employee/exports/employeeOnboarding.js";
|
|
8
8
|
import * as s from "./components/Employee/exports/employeeManagement.js";
|
|
9
9
|
import * as i from "./components/Company/exports/companyOnboarding.js";
|
|
10
|
-
import * as
|
|
10
|
+
import * as x from "./components/Contractor/exports/contractorOnboarding.js";
|
|
11
11
|
import { ApiProvider as f } from "./contexts/ApiProvider/ApiProvider.js";
|
|
12
12
|
import { componentEvents as c } from "./shared/constants.js";
|
|
13
|
-
import { SDKInternalError as u, normalizeToSDKError as
|
|
14
|
-
import { composeErrorHandler as
|
|
15
|
-
import { collectErrors as
|
|
16
|
-
import { useCompensationForm as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
13
|
+
import { SDKInternalError as u, normalizeToSDKError as E } from "./types/sdkError.js";
|
|
14
|
+
import { composeErrorHandler as C } from "./partner-hook-utils/composeErrorHandler.js";
|
|
15
|
+
import { collectErrors as b } from "./partner-hook-utils/collectErrors.js";
|
|
16
|
+
import { useCompensationForm as h } from "./components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js";
|
|
17
|
+
import { useCurrentCompensationForm as P } from "./components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js";
|
|
18
|
+
import { CompensationErrorCodes as H, createCompensationSchema as v } from "./components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js";
|
|
19
|
+
import { useJobForm as D } from "./components/Employee/Compensation/shared/useJobForm/useJobForm.js";
|
|
20
|
+
import { useCurrentJobForm as I } from "./components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js";
|
|
21
|
+
import { JobErrorCodes as M, createJobSchema as _ } from "./components/Employee/Compensation/shared/useJobForm/jobSchema.js";
|
|
22
|
+
import { useEmployeeDetailsForm as $ } from "./components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js";
|
|
23
|
+
import { EmployeeDetailsErrorCodes as N, createEmployeeDetailsSchema as W } from "./components/Employee/Profile/shared/useEmployeeDetailsForm/employeeDetailsSchema.js";
|
|
24
|
+
import { useWorkAddressForm as L } from "./components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js";
|
|
25
|
+
import { useCurrentWorkAddressForm as w } from "./components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js";
|
|
26
|
+
import { WorkAddressErrorCodes as X, createWorkAddressSchema as q } from "./components/Employee/Profile/shared/useWorkAddressForm/workAddressSchema.js";
|
|
27
|
+
import { useHomeAddressForm as B } from "./components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js";
|
|
28
|
+
import { useCurrentHomeAddressForm as Y } from "./components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js";
|
|
29
|
+
import { HomeAddressErrorCodes as Z, createHomeAddressSchema as rr } from "./components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js";
|
|
30
|
+
import { useFederalTaxesForm as er } from "./components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js";
|
|
31
|
+
import { FILING_STATUS_VALUES as tr, FederalTaxesErrorCodes as ar, createFederalTaxesSchema as pr } from "./components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js";
|
|
32
|
+
import { useSignEmployeeForm as ir } from "./components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js";
|
|
33
|
+
import { MAX_PREPARERS as dr, PREPARER_FIELDS_BY_INDEX as nr, SignEmployeeFormErrorCodes as fr, createSignEmployeeFormSchema as lr, preparerFieldName as cr } from "./components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js";
|
|
34
|
+
import { usePayScheduleForm as ur } from "./components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js";
|
|
35
|
+
import { PayScheduleErrorCodes as Sr, createPayScheduleSchema as Cr } from "./components/Company/PaySchedule/shared/usePayScheduleForm/payScheduleSchema.js";
|
|
36
|
+
import { useSignCompanyForm as br } from "./components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js";
|
|
37
|
+
import { SignCompanyFormErrorCodes as hr, createSignCompanyFormSchema as Ar } from "./components/Company/DocumentSigner/shared/useSignCompanyForm/signCompanyFormSchema.js";
|
|
38
|
+
import { CheckboxHookField as kr } from "./partner-hook-utils/form/fields/CheckboxHookField.js";
|
|
39
|
+
import { DatePickerHookField as vr } from "./partner-hook-utils/form/fields/DatePickerHookField.js";
|
|
40
|
+
import { EmployeeStateTaxesErrorCodes as Dr, createEmployeeStateTaxesSchema as Or } from "./components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.js";
|
|
41
|
+
import { FormFieldsMetadataProvider as Rr } from "./partner-hook-utils/form/FormFieldsMetadataProvider.js";
|
|
42
|
+
import { GustoApiProvider as _r, GustoProvider as Gr } from "./contexts/GustoProvider/GustoProvider.js";
|
|
43
|
+
import { GustoProviderCustomUIAdapter as Jr } from "./contexts/GustoProvider/GustoProviderCustomUIAdapter.js";
|
|
44
|
+
import { NumberInputHookField as Wr } from "./partner-hook-utils/form/fields/NumberInputHookField.js";
|
|
45
|
+
import { ObservabilityProvider as Lr } from "./contexts/ObservabilityProvider/ObservabilityProvider.js";
|
|
46
|
+
import { RadioGroupHookField as wr } from "./partner-hook-utils/form/fields/RadioGroupHookField.js";
|
|
47
|
+
import { SDKFormProvider as Xr } from "./partner-hook-utils/form/SDKFormProvider.js";
|
|
48
|
+
import { SelectHookField as zr } from "./partner-hook-utils/form/fields/SelectHookField.js";
|
|
49
|
+
import { SwitchHookField as Qr } from "./partner-hook-utils/form/fields/SwitchHookField.js";
|
|
50
|
+
import { TextInputHookField as jr } from "./partner-hook-utils/form/fields/TextInputHookField.js";
|
|
51
|
+
import { composeSubmitHandler as ro } from "./partner-hook-utils/form/composeSubmitHandler.js";
|
|
52
|
+
import { createStateFields as eo, useStateFields as mo } from "./components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js";
|
|
53
|
+
import { getQuestionVariant as ao } from "./components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.js";
|
|
54
|
+
import { useDeriveFieldsMetadata as so } from "./partner-hook-utils/form/useDeriveFieldsMetadata.js";
|
|
55
|
+
import { useEmployeeStateTaxesForm as xo } from "./components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js";
|
|
56
|
+
import { useFieldErrorMessage as fo } from "./partner-hook-utils/form/useFieldErrorMessage.js";
|
|
57
|
+
import { useObservability as co } from "./contexts/ObservabilityProvider/useObservability.js";
|
|
58
|
+
import { withOptions as uo } from "./partner-hook-utils/form/withOptions.js";
|
|
49
59
|
export {
|
|
50
60
|
f as ApiProvider,
|
|
51
|
-
|
|
52
|
-
|
|
61
|
+
kr as CheckboxHookField,
|
|
62
|
+
r as Company,
|
|
53
63
|
i as CompanyOnboarding,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
64
|
+
H as CompensationErrorCodes,
|
|
65
|
+
o as Contractor,
|
|
66
|
+
x as ContractorOnboarding,
|
|
67
|
+
vr as DatePickerHookField,
|
|
58
68
|
e as Employee,
|
|
59
|
-
|
|
69
|
+
N as EmployeeDetailsErrorCodes,
|
|
60
70
|
s as EmployeeManagement,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
p as EmployeeOnboarding,
|
|
72
|
+
Dr as EmployeeStateTaxesErrorCodes,
|
|
73
|
+
tr as FILING_STATUS_VALUES,
|
|
74
|
+
ar as FederalTaxesErrorCodes,
|
|
75
|
+
Rr as FormFieldsMetadataProvider,
|
|
76
|
+
_r as GustoApiProvider,
|
|
77
|
+
Gr as GustoProvider,
|
|
78
|
+
Jr as GustoProviderCustomUIAdapter,
|
|
79
|
+
Z as HomeAddressErrorCodes,
|
|
67
80
|
m as InformationRequests,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
81
|
+
M as JobErrorCodes,
|
|
82
|
+
dr as MAX_PREPARERS,
|
|
83
|
+
Wr as NumberInputHookField,
|
|
84
|
+
Lr as ObservabilityProvider,
|
|
85
|
+
nr as PREPARER_FIELDS_BY_INDEX,
|
|
86
|
+
Sr as PayScheduleErrorCodes,
|
|
73
87
|
t as Payroll,
|
|
74
|
-
|
|
75
|
-
|
|
88
|
+
wr as RadioGroupHookField,
|
|
89
|
+
Xr as SDKFormProvider,
|
|
76
90
|
u as SDKInternalError,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
91
|
+
zr as SelectHookField,
|
|
92
|
+
hr as SignCompanyFormErrorCodes,
|
|
93
|
+
fr as SignEmployeeFormErrorCodes,
|
|
94
|
+
Qr as SwitchHookField,
|
|
95
|
+
jr as TextInputHookField,
|
|
96
|
+
a as TimeOff,
|
|
97
|
+
X as WorkAddressErrorCodes,
|
|
98
|
+
b as collectErrors,
|
|
85
99
|
c as componentEvents,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
100
|
+
C as composeErrorHandler,
|
|
101
|
+
ro as composeSubmitHandler,
|
|
102
|
+
v as createCompensationSchema,
|
|
103
|
+
W as createEmployeeDetailsSchema,
|
|
104
|
+
Or as createEmployeeStateTaxesSchema,
|
|
105
|
+
pr as createFederalTaxesSchema,
|
|
106
|
+
rr as createHomeAddressSchema,
|
|
107
|
+
_ as createJobSchema,
|
|
108
|
+
Cr as createPayScheduleSchema,
|
|
109
|
+
Ar as createSignCompanyFormSchema,
|
|
110
|
+
lr as createSignEmployeeFormSchema,
|
|
111
|
+
eo as createStateFields,
|
|
112
|
+
q as createWorkAddressSchema,
|
|
113
|
+
ao as getQuestionVariant,
|
|
114
|
+
E as normalizeToSDKError,
|
|
115
|
+
cr as preparerFieldName,
|
|
116
|
+
h as useCompensationForm,
|
|
117
|
+
P as useCurrentCompensationForm,
|
|
118
|
+
Y as useCurrentHomeAddressForm,
|
|
119
|
+
I as useCurrentJobForm,
|
|
120
|
+
w as useCurrentWorkAddressForm,
|
|
121
|
+
so as useDeriveFieldsMetadata,
|
|
122
|
+
$ as useEmployeeDetailsForm,
|
|
123
|
+
xo as useEmployeeStateTaxesForm,
|
|
124
|
+
er as useFederalTaxesForm,
|
|
125
|
+
fo as useFieldErrorMessage,
|
|
126
|
+
B as useHomeAddressForm,
|
|
127
|
+
D as useJobForm,
|
|
128
|
+
co as useObservability,
|
|
129
|
+
ur as usePayScheduleForm,
|
|
130
|
+
br as useSignCompanyForm,
|
|
131
|
+
ir as useSignEmployeeForm,
|
|
132
|
+
mo as useStateFields,
|
|
133
|
+
L as useWorkAddressForm,
|
|
134
|
+
uo as withOptions
|
|
110
135
|
};
|
|
111
136
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,24 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useEffect as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as a } from "react";
|
|
3
3
|
import { FormProvider as d } from "react-hook-form";
|
|
4
|
-
import { FormFieldsMetadataProvider as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { FormFieldsMetadataProvider as l } from "./FormFieldsMetadataProvider.js";
|
|
5
|
+
import { FieldElementRegistryProvider as f } from "../../components/Common/Fields/hooks/FieldElementRegistryProvider.js";
|
|
6
|
+
import { normalizeErrorKeyForForm as c } from "../../helpers/formattedStrings.js";
|
|
7
|
+
function F(o, t) {
|
|
8
|
+
const { fieldsMetadata: e } = t, { setError: r } = t.hookFormInternals.formMethods;
|
|
9
|
+
a(() => {
|
|
8
10
|
if (!o.length) return;
|
|
9
|
-
const
|
|
10
|
-
for (const
|
|
11
|
-
|
|
11
|
+
const i = new Set(Object.keys(e));
|
|
12
|
+
for (const s of o) {
|
|
13
|
+
const m = c(s.field);
|
|
14
|
+
i.has(m) && r(m, {
|
|
12
15
|
type: "custom",
|
|
13
|
-
message:
|
|
16
|
+
message: s.message
|
|
14
17
|
});
|
|
18
|
+
}
|
|
15
19
|
}, [o, r, e]);
|
|
16
20
|
}
|
|
17
|
-
function
|
|
18
|
-
const { errorHandling: e, form: r } = o,
|
|
19
|
-
return
|
|
21
|
+
function M({ formHookResult: o, children: t }) {
|
|
22
|
+
const { errorHandling: e, form: r } = o, i = e.errors.flatMap((s) => s.fieldErrors);
|
|
23
|
+
return F(i, r), /* @__PURE__ */ n(l, { metadata: r.fieldsMetadata, errors: e.errors, children: /* @__PURE__ */ n(f, { registry: r.hookFormInternals._fieldElementRegistry, children: /* @__PURE__ */ n(d, { ...r.hookFormInternals.formMethods, children: t }) }) });
|
|
20
24
|
}
|
|
21
25
|
export {
|
|
22
|
-
|
|
26
|
+
M as SDKFormProvider
|
|
23
27
|
};
|
|
24
28
|
//# sourceMappingURL=SDKFormProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDKFormProvider.js","sources":["../../../src/partner-hook-utils/form/SDKFormProvider.tsx"],"sourcesContent":["import { type ReactNode, useEffect } from 'react'\nimport type { FieldPath, FieldValues } from 'react-hook-form'\nimport { FormProvider } from 'react-hook-form'\nimport type { FieldMetadata, FieldMetadataWithOptions, HookFormInternals } from '../types'\nimport { FormFieldsMetadataProvider } from './FormFieldsMetadataProvider'\nimport type { SDKError, SDKFieldError } from '@/types/sdkError'\n\nfunction useSyncFieldErrors<\n TFormData extends FieldValues,\n TFieldsMetadata extends {\n [K in keyof TFieldsMetadata]: FieldMetadata | FieldMetadataWithOptions\n },\n>(\n fieldErrors: SDKFieldError[],\n form: {\n fieldsMetadata: TFieldsMetadata\n hookFormInternals: HookFormInternals<TFormData>\n },\n) {\n const { fieldsMetadata } = form\n const { setError } = form.hookFormInternals.formMethods\n\n useEffect(() => {\n if (!fieldErrors.length) return\n const knownFields = new Set(Object.keys(fieldsMetadata))\n for (const fieldError of fieldErrors) {\n if (knownFields.has(
|
|
1
|
+
{"version":3,"file":"SDKFormProvider.js","sources":["../../../src/partner-hook-utils/form/SDKFormProvider.tsx"],"sourcesContent":["import { type ReactNode, useEffect } from 'react'\nimport type { FieldPath, FieldValues } from 'react-hook-form'\nimport { FormProvider } from 'react-hook-form'\nimport type { FieldMetadata, FieldMetadataWithOptions, HookFormInternals } from '../types'\nimport { FormFieldsMetadataProvider } from './FormFieldsMetadataProvider'\nimport { FieldElementRegistryProvider } from '@/components/Common/Fields/hooks/FieldElementRegistryProvider'\nimport { normalizeErrorKeyForForm } from '@/helpers/formattedStrings'\nimport type { SDKError, SDKFieldError } from '@/types/sdkError'\n\nfunction useSyncFieldErrors<\n TFormData extends FieldValues,\n TFieldsMetadata extends {\n [K in keyof TFieldsMetadata]: FieldMetadata | FieldMetadataWithOptions\n },\n>(\n fieldErrors: SDKFieldError[],\n form: {\n fieldsMetadata: TFieldsMetadata\n hookFormInternals: HookFormInternals<TFormData>\n },\n) {\n const { fieldsMetadata } = form\n const { setError } = form.hookFormInternals.formMethods\n\n useEffect(() => {\n if (!fieldErrors.length) return\n const knownFields = new Set(Object.keys(fieldsMetadata))\n for (const fieldError of fieldErrors) {\n const normalizedField = normalizeErrorKeyForForm(fieldError.field)\n if (knownFields.has(normalizedField)) {\n setError(normalizedField as FieldPath<TFormData>, {\n type: 'custom',\n message: fieldError.message,\n })\n }\n }\n }, [fieldErrors, setError, fieldsMetadata])\n}\n\ninterface SDKFormProviderProps<\n TFormData extends FieldValues = FieldValues,\n TFieldsMetadata extends {\n [K in keyof TFieldsMetadata]: FieldMetadata | FieldMetadataWithOptions\n } = Record<string, FieldMetadata | FieldMetadataWithOptions>,\n> {\n formHookResult: {\n errorHandling: { errors: SDKError[] }\n form: {\n fieldsMetadata: TFieldsMetadata\n hookFormInternals: HookFormInternals<TFormData>\n }\n }\n children: ReactNode\n}\n\nexport function SDKFormProvider<\n TFormData extends FieldValues = FieldValues,\n TFieldsMetadata extends {\n [K in keyof TFieldsMetadata]: FieldMetadata | FieldMetadataWithOptions\n } = Record<string, FieldMetadata | FieldMetadataWithOptions>,\n>({ formHookResult, children }: SDKFormProviderProps<TFormData, TFieldsMetadata>) {\n const { errorHandling, form } = formHookResult\n const allFieldErrors = errorHandling.errors.flatMap(e => e.fieldErrors)\n useSyncFieldErrors(allFieldErrors, form)\n\n return (\n <FormFieldsMetadataProvider metadata={form.fieldsMetadata} errors={errorHandling.errors}>\n <FieldElementRegistryProvider registry={form.hookFormInternals._fieldElementRegistry}>\n <FormProvider {...form.hookFormInternals.formMethods}>{children}</FormProvider>\n </FieldElementRegistryProvider>\n </FormFieldsMetadataProvider>\n )\n}\n"],"names":["useSyncFieldErrors","fieldErrors","form","fieldsMetadata","setError","useEffect","knownFields","fieldError","normalizedField","normalizeErrorKeyForForm","SDKFormProvider","formHookResult","children","errorHandling","allFieldErrors","e","jsx","FormFieldsMetadataProvider","FieldElementRegistryProvider","FormProvider"],"mappings":";;;;;;AASA,SAASA,EAMPC,GACAC,GAIA;AACA,QAAM,EAAE,gBAAAC,MAAmBD,GACrB,EAAE,UAAAE,EAAA,IAAaF,EAAK,kBAAkB;AAE5C,EAAAG,EAAU,MAAM;AACd,QAAI,CAACJ,EAAY,OAAQ;AACzB,UAAMK,IAAc,IAAI,IAAI,OAAO,KAAKH,CAAc,CAAC;AACvD,eAAWI,KAAcN,GAAa;AACpC,YAAMO,IAAkBC,EAAyBF,EAAW,KAAK;AACjE,MAAID,EAAY,IAAIE,CAAe,KACjCJ,EAASI,GAAyC;AAAA,QAChD,MAAM;AAAA,QACN,SAASD,EAAW;AAAA,MAAA,CACrB;AAAA,IAEL;AAAA,EACF,GAAG,CAACN,GAAaG,GAAUD,CAAc,CAAC;AAC5C;AAkBO,SAASO,EAKd,EAAE,gBAAAC,GAAgB,UAAAC,KAA8D;AAChF,QAAM,EAAE,eAAAC,GAAe,MAAAX,EAAA,IAASS,GAC1BG,IAAiBD,EAAc,OAAO,QAAQ,CAAAE,MAAKA,EAAE,WAAW;AACtE,SAAAf,EAAmBc,GAAgBZ,CAAI,GAGrC,gBAAAc,EAACC,KAA2B,UAAUf,EAAK,gBAAgB,QAAQW,EAAc,QAC/E,UAAA,gBAAAG,EAACE,GAAA,EAA6B,UAAUhB,EAAK,kBAAkB,uBAC7D,4BAACiB,GAAA,EAAc,GAAGjB,EAAK,kBAAkB,aAAc,UAAAU,EAAA,CAAS,EAAA,CAClE,EAAA,CACF;AAEJ;"}
|
|
@@ -1,94 +1,94 @@
|
|
|
1
1
|
import { z as h } from "zod";
|
|
2
|
-
function
|
|
2
|
+
function D(e, r) {
|
|
3
3
|
const {
|
|
4
4
|
mode: i,
|
|
5
5
|
requiredFieldsConfig: u = {},
|
|
6
6
|
requiredErrorCode: c = "REQUIRED",
|
|
7
|
-
excludeFields:
|
|
8
|
-
} = r, f = new Set(
|
|
9
|
-
|
|
10
|
-
),
|
|
11
|
-
for (const [n, s] of Object.entries(
|
|
7
|
+
excludeFields: p = []
|
|
8
|
+
} = r, f = new Set(p.map(String)), a = new Set((r.fieldsWithRedactedValues ?? []).map(String)), m = new Set(
|
|
9
|
+
x(r.optionalFieldsToRequire, i)
|
|
10
|
+
), R = {}, d = [], y = [], g = u;
|
|
11
|
+
for (const [n, s] of Object.entries(e)) {
|
|
12
12
|
if (f.has(n)) continue;
|
|
13
13
|
y.push(n);
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
const o =
|
|
17
|
-
typeof
|
|
14
|
+
const t = g[n] ?? "always";
|
|
15
|
+
if (R[n] = b(s), !a.has(n)) {
|
|
16
|
+
const o = m.has(n);
|
|
17
|
+
typeof t == "function" ? d.push({
|
|
18
18
|
name: n,
|
|
19
|
-
predicate: o ? () => !0 :
|
|
20
|
-
}) : (
|
|
19
|
+
predicate: o ? () => !0 : t
|
|
20
|
+
}) : (t === "always" || t === i || o) && d.push({ name: n, predicate: () => !0 });
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
let
|
|
25
|
-
|
|
23
|
+
const w = d.length > 0 || r.superRefine;
|
|
24
|
+
let l = h.object(R);
|
|
25
|
+
w && (l = l.superRefine(
|
|
26
26
|
(n, s) => {
|
|
27
|
-
for (const { name:
|
|
28
|
-
o(n, i) &&
|
|
27
|
+
for (const { name: t, predicate: o } of d)
|
|
28
|
+
o(n, i) && q(n[t]) && s.addIssue({
|
|
29
29
|
code: h.ZodIssueCode.custom,
|
|
30
|
-
path: [
|
|
30
|
+
path: [t],
|
|
31
31
|
message: c
|
|
32
32
|
});
|
|
33
33
|
r.superRefine?.(n, s);
|
|
34
34
|
}
|
|
35
35
|
));
|
|
36
|
-
const
|
|
37
|
-
function
|
|
36
|
+
const S = P(d, i);
|
|
37
|
+
function F(n) {
|
|
38
38
|
const s = {};
|
|
39
|
-
for (const
|
|
40
|
-
const o = g[
|
|
41
|
-
|
|
42
|
-
name:
|
|
39
|
+
for (const t of y) {
|
|
40
|
+
const o = g[t] ?? "always";
|
|
41
|
+
m.has(t) ? s[t] = { name: t, isRequired: !0 } : typeof o == "function" ? s[t] = { name: t, isRequired: n ? o(n, i) : !1 } : s[t] = {
|
|
42
|
+
name: t,
|
|
43
43
|
isRequired: o === "always" || o === i
|
|
44
|
-
}, a.has(
|
|
44
|
+
}, a.has(t) && (s[t].hasRedactedValue = !0);
|
|
45
45
|
}
|
|
46
46
|
return s;
|
|
47
47
|
}
|
|
48
48
|
return [
|
|
49
|
-
|
|
50
|
-
{ getFieldsMetadata:
|
|
49
|
+
l,
|
|
50
|
+
{ getFieldsMetadata: F, predicateDeps: S }
|
|
51
51
|
];
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
return
|
|
53
|
+
function x(e, r) {
|
|
54
|
+
return e ? (r === "create" ? e.create : e.update) ?? [] : [];
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
return h.preprocess((r) => r
|
|
56
|
+
function b(e) {
|
|
57
|
+
return h.preprocess((r) => q(r) ? void 0 : r, e.optional());
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
return
|
|
59
|
+
function q(e) {
|
|
60
|
+
return !!(e == null || typeof e == "string" && e.trim() === "" || typeof e == "number" && Number.isNaN(e));
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function P(e, r) {
|
|
63
63
|
const i = /* @__PURE__ */ new Set();
|
|
64
|
-
for (const { predicate: u } of
|
|
65
|
-
if (
|
|
66
|
-
const c = [],
|
|
64
|
+
for (const { predicate: u } of e) {
|
|
65
|
+
if (C(u)) continue;
|
|
66
|
+
const c = [], p = new Proxy({}, {
|
|
67
67
|
get(f, a) {
|
|
68
68
|
typeof a == "string" && c.push(a);
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
try {
|
|
72
|
-
u(
|
|
72
|
+
u(p, r);
|
|
73
73
|
} catch {
|
|
74
74
|
}
|
|
75
75
|
for (const f of c) i.add(f);
|
|
76
76
|
}
|
|
77
77
|
return [...i];
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function C(e) {
|
|
80
80
|
const r = [], i = new Proxy({}, {
|
|
81
81
|
get(u, c) {
|
|
82
82
|
typeof c == "string" && r.push(c);
|
|
83
83
|
}
|
|
84
84
|
});
|
|
85
85
|
try {
|
|
86
|
-
|
|
86
|
+
e(i, "create");
|
|
87
87
|
} catch {
|
|
88
88
|
}
|
|
89
89
|
return r.length === 0;
|
|
90
90
|
}
|
|
91
91
|
export {
|
|
92
|
-
|
|
92
|
+
D as buildFormSchema
|
|
93
93
|
};
|
|
94
94
|
//# sourceMappingURL=buildFormSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildFormSchema.js","sources":["../../../src/partner-hook-utils/form/buildFormSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FieldMetadata } from '../types'\n\n// ── Types ────────────────────────────────────────────────────────────\n\nexport type FormMode = 'create' | 'update'\n\nexport type RequiredFieldRule<TData = Record<string, unknown>> =\n | 'create'\n | 'update'\n | 'always'\n | 'never'\n | ((data: TData, mode: FormMode) => boolean)\n\nexport type RequiredFieldConfig<TSchema extends Record<string, z.ZodType>> = Partial<{\n [K in keyof TSchema & string]: RequiredFieldRule<{\n [F in keyof TSchema]: z.infer<TSchema[F]>\n }>\n}>\n\ntype OptionalOnCreate<TConfig> = {\n [K in keyof TConfig & string]: TConfig[K] extends 'update' | 'never' ? K : never\n}[keyof TConfig & string]\n\ntype OptionalOnUpdate<TConfig> = {\n [K in keyof TConfig & string]: TConfig[K] extends 'create' | 'never' ? K : never\n}[keyof TConfig & string]\n\nexport type OptionalFieldsToRequire<TConfig> = {\n create?: Array<OptionalOnCreate<TConfig>>\n update?: Array<OptionalOnUpdate<TConfig>>\n}\n\n// ── buildFormSchema ──────────────────────────────────────────────────\n\ninterface BuildFormSchemaOptions<\n T extends Record<string, z.ZodType>,\n TConfig extends RequiredFieldConfig<T>,\n> {\n requiredFieldsConfig?: TConfig\n requiredErrorCode?: string\n mode: FormMode\n optionalFieldsToRequire?: OptionalFieldsToRequire<TConfig>\n excludeFields?: Array<keyof T & string>\n /** Fields with existing server-side values that are redacted in the API response\n * (e.g. SSN, EIN). These fields remain in the schema for format validation and\n * appear in metadata (with `hasRedactedValue: true`) but are exempt from required\n * validation — an empty submission is valid because a value already exists. */\n fieldsWithRedactedValues?: Array<keyof T & string>\n superRefine?: (data: { [K in keyof T]: z.infer<T[K]> }, ctx: z.RefinementCtx) => void\n}\n\nexport interface FieldsMetadataConfig<T extends Record<string, z.ZodType>> {\n getFieldsMetadata: (data?: Record<string, unknown>) => Record<keyof T, FieldMetadata>\n /** Form field names that predicate-based requiredness rules read at runtime. */\n predicateDeps: string[]\n}\n\ntype FormDataFromValidators<T extends Record<string, z.ZodType>> = {\n [K in keyof T]: z.infer<T[K]>\n}\n\nexport type BuildFormSchemaResult<T extends Record<string, z.ZodType>> = [\n schema: z.ZodType<FormDataFromValidators<T>, FormDataFromValidators<T>>,\n metadataConfig: FieldsMetadataConfig<T>,\n]\n\nexport function buildFormSchema<\n T extends Record<string, z.ZodType>,\n TConfig extends RequiredFieldConfig<T>,\n>(fieldValidators: T, options: BuildFormSchemaOptions<T, TConfig>): BuildFormSchemaResult<T> {\n const {\n mode,\n requiredFieldsConfig = {} as Record<string, RequiredFieldRule>,\n requiredErrorCode = 'REQUIRED',\n excludeFields = [],\n } = options\n const excluded = new Set(excludeFields.map(String))\n const redacted = new Set((options.fieldsWithRedactedValues ?? []).map(String))\n const partnerRequired = new Set(\n resolveOptionalFieldsToRequire(options.optionalFieldsToRequire, mode),\n )\n\n const shape: Record<string, z.ZodType> = {}\n const dynamicRequired: Array<{\n name: string\n predicate: (data: Record<string, unknown>, mode: FormMode) => boolean\n }> = []\n const includedFieldNames: string[] = []\n const config = requiredFieldsConfig as Record<string, RequiredFieldRule>\n\n for (const [name, validator] of Object.entries(fieldValidators)) {\n if (excluded.has(name)) continue\n includedFieldNames.push(name)\n\n const effectiveRule = config[name] ?? 'always'\n\n shape[name] = makeOptional(validator)\n\n if (!redacted.has(name)) {\n const isPartnerRequired = partnerRequired.has(name)\n\n if (typeof effectiveRule === 'function') {\n dynamicRequired.push({\n name,\n predicate: isPartnerRequired ? () => true : effectiveRule,\n })\n } else {\n const isRequired = effectiveRule === 'always' || effectiveRule === mode || isPartnerRequired\n if (isRequired) {\n dynamicRequired.push({ name, predicate: () => true })\n }\n }\n }\n }\n\n const hasSuperRefine = dynamicRequired.length > 0 || options.superRefine\n let schema: z.ZodType = z.object(shape)\n\n if (hasSuperRefine) {\n schema = (schema as z.ZodObject).superRefine(\n (data: Record<string, unknown>, ctx: z.RefinementCtx) => {\n for (const { name, predicate } of dynamicRequired) {\n if (predicate(data, mode) && isEmpty(data[name])) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: [name],\n message: requiredErrorCode,\n })\n }\n }\n\n options.superRefine?.(data as { [K in keyof T]: z.infer<T[K]> }, ctx)\n },\n )\n }\n\n const predicateDeps = detectPredicateDeps(dynamicRequired, mode)\n\n function getFieldsMetadata(data?: Record<string, unknown>) {\n const metadata: Record<string, FieldMetadata> = {}\n\n for (const name of includedFieldNames) {\n const effectiveRule = config[name] ?? 'always'\n\n if (partnerRequired.has(name)) {\n metadata[name] = { name, isRequired: true }\n } else if (typeof effectiveRule === 'function') {\n metadata[name] = { name, isRequired: data ? effectiveRule(data, mode) : false }\n } else {\n metadata[name] = {\n name,\n isRequired: effectiveRule === 'always' || effectiveRule === mode,\n }\n }\n\n if (redacted.has(name)) {\n metadata[name].hasRedactedValue = true\n }\n }\n\n return metadata as Record<keyof T, FieldMetadata>\n }\n\n // makeOptional wraps fields with z.preprocess, which causes z.input to infer\n // `unknown`. Cast the schema to carry the original field types so zodResolver\n // infers correct form data types — consumers don't need per-hook casts.\n return [\n schema as z.ZodType<FormDataFromValidators<T>, FormDataFromValidators<T>>,\n { getFieldsMetadata, predicateDeps },\n ]\n}\n\n// ── Internal helpers ─────────────────────────────────────────────────\n\nfunction resolveOptionalFieldsToRequire<TConfig>(\n value: OptionalFieldsToRequire<TConfig> | undefined,\n mode: FormMode,\n): string[] {\n if (!value) return []\n return ((mode === 'create' ? value.create : value.update) ?? []) as string[]\n}\n\nfunction makeOptional(validator: z.ZodType): z.ZodType {\n return z.preprocess(v => (v === '' || v === null ? undefined : v), validator.optional())\n}\n\nfunction isEmpty(value: unknown): boolean {\n if (value === undefined || value === null) return true\n if (typeof value === 'string' && value.trim() === '') return true\n return false\n}\n\n/**\n * Determines which form field names are read by predicate-based requiredness\n * rules. This enables `useDeriveFieldsMetadata` to watch only the specific\n * fields that predicates depend on, rather than subscribing to every form\n * value change (which defeats react-hook-form's per-field render optimization).\n *\n * Works by running each predicate against a recording Proxy. The Proxy\n * intercepts property access and logs the keys, giving us the dependency list\n * without requiring manual declaration.\n *\n * Limitation: JavaScript short-circuit evaluation (`a && b`) can prevent the\n * Proxy from seeing later operands when earlier ones are falsy. In practice\n * this is acceptable — our predicate rules read a single form value each\n * (e.g. `data => data.adjustForMinimumWage`). Multi-field predicates with\n * equality guards should be expressed as `superRefine` rules instead.\n */\nfunction detectPredicateDeps(\n dynamicRequired: Array<{\n name: string\n predicate: (data: Record<string, unknown>, mode: FormMode) => boolean\n }>,\n mode: FormMode,\n): string[] {\n const deps = new Set<string>()\n\n for (const { predicate } of dynamicRequired) {\n if (isConstantPredicate(predicate)) continue\n\n const accessed: string[] = []\n const proxy = new Proxy({} as Record<string, unknown>, {\n get(_target, prop) {\n if (typeof prop === 'string') accessed.push(prop)\n return undefined\n },\n })\n\n try {\n predicate(proxy, mode)\n } catch {\n /* Predicate may throw on undefined values — that's fine, we already captured the property accesses */\n }\n\n for (const key of accessed) deps.add(key)\n }\n\n return [...deps]\n}\n\n/**\n * Static predicates (e.g. `() => true` from 'always' / mode rules / partner\n * overrides) don't access form data, so we skip them during dependency\n * detection. We identify them by running against an empty proxy and checking\n * whether any properties were accessed.\n */\nfunction isConstantPredicate(\n predicate: (data: Record<string, unknown>, mode: FormMode) => boolean,\n): boolean {\n const accessed: string[] = []\n const proxy = new Proxy({} as Record<string, unknown>, {\n get(_target, prop) {\n if (typeof prop === 'string') accessed.push(prop)\n return undefined\n },\n })\n try {\n predicate(proxy, 'create')\n } catch {\n /* ignore */\n }\n return accessed.length === 0\n}\n"],"names":["buildFormSchema","fieldValidators","options","mode","requiredFieldsConfig","requiredErrorCode","excludeFields","excluded","redacted","partnerRequired","resolveOptionalFieldsToRequire","shape","dynamicRequired","includedFieldNames","config","name","validator","effectiveRule","makeOptional","isPartnerRequired","hasSuperRefine","schema","z","data","ctx","predicate","isEmpty","predicateDeps","detectPredicateDeps","getFieldsMetadata","metadata","value","v","deps","isConstantPredicate","accessed","proxy","_target","prop","key"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"buildFormSchema.js","sources":["../../../src/partner-hook-utils/form/buildFormSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FieldMetadata } from '../types'\n\n// ── Types ────────────────────────────────────────────────────────────\n\nexport type FormMode = 'create' | 'update'\n\nexport type RequiredFieldRule<TData = Record<string, unknown>> =\n | 'create'\n | 'update'\n | 'always'\n | 'never'\n | ((data: TData, mode: FormMode) => boolean)\n\nexport type RequiredFieldConfig<TSchema extends Record<string, z.ZodType>> = Partial<{\n [K in keyof TSchema & string]: RequiredFieldRule<{\n [F in keyof TSchema]: z.infer<TSchema[F]>\n }>\n}>\n\ntype OptionalOnCreate<TConfig> = {\n [K in keyof TConfig & string]: TConfig[K] extends 'update' | 'never' ? K : never\n}[keyof TConfig & string]\n\ntype OptionalOnUpdate<TConfig> = {\n [K in keyof TConfig & string]: TConfig[K] extends 'create' | 'never' ? K : never\n}[keyof TConfig & string]\n\nexport type OptionalFieldsToRequire<TConfig> = {\n create?: Array<OptionalOnCreate<TConfig>>\n update?: Array<OptionalOnUpdate<TConfig>>\n}\n\n// ── buildFormSchema ──────────────────────────────────────────────────\n\ninterface BuildFormSchemaOptions<\n T extends Record<string, z.ZodType>,\n TConfig extends RequiredFieldConfig<T>,\n> {\n requiredFieldsConfig?: TConfig\n requiredErrorCode?: string\n mode: FormMode\n optionalFieldsToRequire?: OptionalFieldsToRequire<TConfig>\n excludeFields?: Array<keyof T & string>\n /** Fields with existing server-side values that are redacted in the API response\n * (e.g. SSN, EIN). These fields remain in the schema for format validation and\n * appear in metadata (with `hasRedactedValue: true`) but are exempt from required\n * validation — an empty submission is valid because a value already exists. */\n fieldsWithRedactedValues?: Array<keyof T & string>\n superRefine?: (data: { [K in keyof T]: z.infer<T[K]> }, ctx: z.RefinementCtx) => void\n}\n\nexport interface FieldsMetadataConfig<T extends Record<string, z.ZodType>> {\n getFieldsMetadata: (data?: Record<string, unknown>) => Record<keyof T, FieldMetadata>\n /** Form field names that predicate-based requiredness rules read at runtime. */\n predicateDeps: string[]\n}\n\ntype FormDataFromValidators<T extends Record<string, z.ZodType>> = {\n [K in keyof T]: z.infer<T[K]>\n}\n\nexport type BuildFormSchemaResult<T extends Record<string, z.ZodType>> = [\n schema: z.ZodType<FormDataFromValidators<T>, FormDataFromValidators<T>>,\n metadataConfig: FieldsMetadataConfig<T>,\n]\n\nexport function buildFormSchema<\n T extends Record<string, z.ZodType>,\n TConfig extends RequiredFieldConfig<T>,\n>(fieldValidators: T, options: BuildFormSchemaOptions<T, TConfig>): BuildFormSchemaResult<T> {\n const {\n mode,\n requiredFieldsConfig = {} as Record<string, RequiredFieldRule>,\n requiredErrorCode = 'REQUIRED',\n excludeFields = [],\n } = options\n const excluded = new Set(excludeFields.map(String))\n const redacted = new Set((options.fieldsWithRedactedValues ?? []).map(String))\n const partnerRequired = new Set(\n resolveOptionalFieldsToRequire(options.optionalFieldsToRequire, mode),\n )\n\n const shape: Record<string, z.ZodType> = {}\n const dynamicRequired: Array<{\n name: string\n predicate: (data: Record<string, unknown>, mode: FormMode) => boolean\n }> = []\n const includedFieldNames: string[] = []\n const config = requiredFieldsConfig as Record<string, RequiredFieldRule>\n\n for (const [name, validator] of Object.entries(fieldValidators)) {\n if (excluded.has(name)) continue\n includedFieldNames.push(name)\n\n const effectiveRule = config[name] ?? 'always'\n\n shape[name] = makeOptional(validator)\n\n if (!redacted.has(name)) {\n const isPartnerRequired = partnerRequired.has(name)\n\n if (typeof effectiveRule === 'function') {\n dynamicRequired.push({\n name,\n predicate: isPartnerRequired ? () => true : effectiveRule,\n })\n } else {\n const isRequired = effectiveRule === 'always' || effectiveRule === mode || isPartnerRequired\n if (isRequired) {\n dynamicRequired.push({ name, predicate: () => true })\n }\n }\n }\n }\n\n const hasSuperRefine = dynamicRequired.length > 0 || options.superRefine\n let schema: z.ZodType = z.object(shape)\n\n if (hasSuperRefine) {\n schema = (schema as z.ZodObject).superRefine(\n (data: Record<string, unknown>, ctx: z.RefinementCtx) => {\n for (const { name, predicate } of dynamicRequired) {\n if (predicate(data, mode) && isEmpty(data[name])) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: [name],\n message: requiredErrorCode,\n })\n }\n }\n\n options.superRefine?.(data as { [K in keyof T]: z.infer<T[K]> }, ctx)\n },\n )\n }\n\n const predicateDeps = detectPredicateDeps(dynamicRequired, mode)\n\n function getFieldsMetadata(data?: Record<string, unknown>) {\n const metadata: Record<string, FieldMetadata> = {}\n\n for (const name of includedFieldNames) {\n const effectiveRule = config[name] ?? 'always'\n\n if (partnerRequired.has(name)) {\n metadata[name] = { name, isRequired: true }\n } else if (typeof effectiveRule === 'function') {\n metadata[name] = { name, isRequired: data ? effectiveRule(data, mode) : false }\n } else {\n metadata[name] = {\n name,\n isRequired: effectiveRule === 'always' || effectiveRule === mode,\n }\n }\n\n if (redacted.has(name)) {\n metadata[name].hasRedactedValue = true\n }\n }\n\n return metadata as Record<keyof T, FieldMetadata>\n }\n\n // makeOptional wraps fields with z.preprocess, which causes z.input to infer\n // `unknown`. Cast the schema to carry the original field types so zodResolver\n // infers correct form data types — consumers don't need per-hook casts.\n return [\n schema as z.ZodType<FormDataFromValidators<T>, FormDataFromValidators<T>>,\n { getFieldsMetadata, predicateDeps },\n ]\n}\n\n// ── Internal helpers ─────────────────────────────────────────────────\n\nfunction resolveOptionalFieldsToRequire<TConfig>(\n value: OptionalFieldsToRequire<TConfig> | undefined,\n mode: FormMode,\n): string[] {\n if (!value) return []\n return ((mode === 'create' ? value.create : value.update) ?? []) as string[]\n}\n\nfunction makeOptional(validator: z.ZodType): z.ZodType {\n return z.preprocess(v => (isEmpty(v) ? undefined : v), validator.optional())\n}\n\nfunction isEmpty(value: unknown): boolean {\n if (value === undefined || value === null) return true\n if (typeof value === 'string' && value.trim() === '') return true\n if (typeof value === 'number' && Number.isNaN(value)) return true\n return false\n}\n\n/**\n * Determines which form field names are read by predicate-based requiredness\n * rules. This enables `useDeriveFieldsMetadata` to watch only the specific\n * fields that predicates depend on, rather than subscribing to every form\n * value change (which defeats react-hook-form's per-field render optimization).\n *\n * Works by running each predicate against a recording Proxy. The Proxy\n * intercepts property access and logs the keys, giving us the dependency list\n * without requiring manual declaration.\n *\n * Limitation: JavaScript short-circuit evaluation (`a && b`) can prevent the\n * Proxy from seeing later operands when earlier ones are falsy. In practice\n * this is acceptable — our predicate rules read a single form value each\n * (e.g. `data => data.adjustForMinimumWage`). Multi-field predicates with\n * equality guards should be expressed as `superRefine` rules instead.\n */\nfunction detectPredicateDeps(\n dynamicRequired: Array<{\n name: string\n predicate: (data: Record<string, unknown>, mode: FormMode) => boolean\n }>,\n mode: FormMode,\n): string[] {\n const deps = new Set<string>()\n\n for (const { predicate } of dynamicRequired) {\n if (isConstantPredicate(predicate)) continue\n\n const accessed: string[] = []\n const proxy = new Proxy({} as Record<string, unknown>, {\n get(_target, prop) {\n if (typeof prop === 'string') accessed.push(prop)\n return undefined\n },\n })\n\n try {\n predicate(proxy, mode)\n } catch {\n /* Predicate may throw on undefined values — that's fine, we already captured the property accesses */\n }\n\n for (const key of accessed) deps.add(key)\n }\n\n return [...deps]\n}\n\n/**\n * Static predicates (e.g. `() => true` from 'always' / mode rules / partner\n * overrides) don't access form data, so we skip them during dependency\n * detection. We identify them by running against an empty proxy and checking\n * whether any properties were accessed.\n */\nfunction isConstantPredicate(\n predicate: (data: Record<string, unknown>, mode: FormMode) => boolean,\n): boolean {\n const accessed: string[] = []\n const proxy = new Proxy({} as Record<string, unknown>, {\n get(_target, prop) {\n if (typeof prop === 'string') accessed.push(prop)\n return undefined\n },\n })\n try {\n predicate(proxy, 'create')\n } catch {\n /* ignore */\n }\n return accessed.length === 0\n}\n"],"names":["buildFormSchema","fieldValidators","options","mode","requiredFieldsConfig","requiredErrorCode","excludeFields","excluded","redacted","partnerRequired","resolveOptionalFieldsToRequire","shape","dynamicRequired","includedFieldNames","config","name","validator","effectiveRule","makeOptional","isPartnerRequired","hasSuperRefine","schema","z","data","ctx","predicate","isEmpty","predicateDeps","detectPredicateDeps","getFieldsMetadata","metadata","value","v","deps","isConstantPredicate","accessed","proxy","_target","prop","key"],"mappings":"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"}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import { SyntheticEvent } from 'react';
|
|
2
2
|
import { FieldValues, UseFormReturn } from 'react-hook-form';
|
|
3
|
-
import { HookErrorHandling } from '../types';
|
|
3
|
+
import { HookErrorHandling, HookFormInternals } from '../types';
|
|
4
4
|
/**
|
|
5
5
|
* Minimal shape required for a form hook result to participate in `composeSubmitHandler`.
|
|
6
6
|
* Any hook returning `BaseFormHookReady` satisfies this interface.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* `formMethods` is declared with method-call syntax (rather than reused from
|
|
9
|
+
* `HookFormInternals`) so TypeScript applies bivariant parameter checking,
|
|
9
10
|
* allowing hooks with specific form data generics to be passed without casts.
|
|
11
|
+
* `_fieldElementRegistry` is reused directly since its type doesn't depend on
|
|
12
|
+
* the form's generic.
|
|
10
13
|
*/
|
|
11
14
|
interface ComposableFormHookResult {
|
|
12
15
|
form: {
|
|
13
|
-
hookFormInternals: {
|
|
16
|
+
hookFormInternals: Pick<HookFormInternals, '_fieldElementRegistry'> & {
|
|
14
17
|
formMethods: {
|
|
15
|
-
handleSubmit(onValid: () => void, onInvalid?: () => void): () => Promise<void>;
|
|
18
|
+
handleSubmit(onValid: () => void, onInvalid?: (errors: Record<string, unknown>) => void): () => Promise<void>;
|
|
16
19
|
setFocus(name: string): void;
|
|
17
20
|
formState: {
|
|
18
21
|
errors: Record<string, unknown>;
|
|
@@ -39,8 +42,9 @@ export interface ComposeSubmitHandlerResult {
|
|
|
39
42
|
* Coordinates validation and submission across multiple form hooks on the same page, and
|
|
40
43
|
* returns aggregated `errorHandling` for those forms so you can drive a single error surface.
|
|
41
44
|
*
|
|
42
|
-
* Validates all forms simultaneously via `handleSubmit()`, then focuses the first
|
|
43
|
-
* field across all forms (
|
|
45
|
+
* Validates all forms simultaneously via `handleSubmit()`, then focuses the visually first
|
|
46
|
+
* invalid field across all forms (sorted by `getBoundingClientRect()`). Only calls
|
|
47
|
+
* `onAllValid` when every form passes.
|
|
44
48
|
*
|
|
45
49
|
* Uses `handleSubmit` rather than `trigger` so that react-hook-form sets
|
|
46
50
|
* `formState.isSubmitted = true`, which enables `reValidateMode` (default: `onChange`).
|