@gusto/embedded-react-sdk 0.38.0 → 0.39.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 +115 -0
- package/dist/UNSTABLE_Hooks.d.ts +1 -1
- package/dist/UNSTABLE_Hooks.js +64 -46
- package/dist/UNSTABLE_Hooks.js.map +1 -1
- package/dist/assets/icons/percent-circle.svg.js +10 -0
- package/dist/assets/icons/percent-circle.svg.js.map +1 -0
- package/dist/assets/icons/plus-circle.svg.js +1 -1
- package/dist/assets/icons/plus-circle.svg.js.map +1 -1
- package/dist/components/Base/Base.js +2 -3
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.d.ts +5 -3
- package/dist/components/Common/DataView/DataCards/DataCards.js +59 -46
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +9 -7
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.d.ts +4 -2
- package/dist/components/Common/DataView/DataTable/DataTable.js +95 -76
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataView.d.ts +4 -3
- package/dist/components/Common/DataView/DataView.js +24 -22
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Common/DataView/useDataView.d.ts +33 -6
- package/dist/components/Common/DataView/useDataView.js +23 -20
- package/dist/components/Common/DataView/useDataView.js.map +1 -1
- package/dist/components/Common/DataView/useSelectionState.d.ts +5 -0
- package/dist/components/Common/DataView/useSelectionState.js +8 -0
- package/dist/components/Common/DataView/useSelectionState.js.map +1 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.d.ts +3 -1
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +65 -71
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -1
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js +10 -6
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.d.ts +2 -1
- package/dist/components/Common/EmptyData/EmptyData.js +15 -13
- package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js +6 -4
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.d.ts +2 -2
- package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.js +2 -2
- package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +4 -6
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +5 -6
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -7
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Box/Box.d.ts +1 -1
- package/dist/components/Common/UI/Box/Box.js +9 -8
- package/dist/components/Common/UI/Box/Box.js.map +1 -1
- package/dist/components/Common/UI/Box/Box.module.scss.js +12 -8
- package/dist/components/Common/UI/Box/Box.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Box/BoxTypes.d.ts +2 -9
- package/dist/components/Common/UI/BoxHeader/BoxHeader.d.ts +2 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeader.js +23 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeader.js.map +1 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeader.module.scss.js +8 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeader.module.scss.js.map +1 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.d.ts +10 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.js +7 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.js.map +1 -0
- package/dist/components/Common/UI/BoxHeader/index.d.ts +2 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/Button/Button.module.scss.js +2 -2
- package/dist/components/Common/UI/Checkbox/Checkbox.js +60 -49
- package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +10 -6
- package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.js +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +6 -6
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js +34 -36
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.module.scss.js +12 -12
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js +19 -12
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js.map +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +6 -4
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js.map +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.d.ts +6 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js +4 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js.map +1 -1
- package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
- package/dist/components/Common/UI/Heading/Heading.module.scss.js +15 -15
- package/dist/components/Common/UI/Input/Input.js.map +1 -1
- package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/Select/Select.js +22 -22
- package/dist/components/Common/UI/Select/Select.js.map +1 -1
- package/dist/components/Common/UI/Select/SelectTypes.d.ts +1 -1
- package/dist/components/Common/UI/Table/Table.js +12 -12
- package/dist/components/Common/UI/Table/Table.js.map +1 -1
- package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
- package/dist/components/Common/UI/Table/TableTypes.d.ts +3 -3
- package/dist/components/Common/UI/Table/TableTypes.js +3 -3
- package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
- package/dist/components/Common/UI/TextArea/TextArea.js +1 -1
- package/dist/components/Common/UI/TextArea/TextArea.js.map +1 -1
- package/dist/components/Common/UI/TextInput/TextInput.js +13 -13
- package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +2 -3
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +2 -3
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -5
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +2 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +2 -3
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -7
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +2 -3
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -11
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -5
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +8 -9
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -3
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +8 -9
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -5
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -3
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -5
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +5 -6
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +17 -18
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +4 -6
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -10
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +2 -3
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -8
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +4 -5
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -5
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +6 -7
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +6 -7
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +2 -3
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -5
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +12 -14
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +5 -7
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -3
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -5
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +70 -68
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +7 -8
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +40 -35
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +8 -10
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +13 -15
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +5 -6
- package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -7
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +33 -33
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -6
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +14 -14
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.d.ts +2 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +3 -4
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +5 -7
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +19 -20
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -3
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +5 -6
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +135 -126
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +77 -76
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +5 -7
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +83 -84
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +2 -4
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +10 -10
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +67 -79
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js +10 -12
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +47 -49
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +63 -65
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js +4 -4
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/Contractor/Profile/useContractorProfile.js +33 -35
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +7 -8
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +4 -5
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Compensation.js +80 -77
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +27 -28
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +22 -23
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +13 -0
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +107 -0
- package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -0
- package/dist/components/Employee/Dashboard/Dashboard.d.ts +5 -0
- package/dist/components/Employee/Dashboard/Dashboard.js +146 -0
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +5 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.js +12 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -0
- package/dist/components/Employee/Dashboard/DashboardFlow.d.ts +5 -0
- package/dist/components/Employee/Dashboard/DashboardFlow.js +25 -0
- package/dist/components/Employee/Dashboard/DashboardFlow.js.map +1 -0
- package/dist/components/Employee/Dashboard/DocumentsView.d.ts +7 -0
- package/dist/components/Employee/Dashboard/DocumentsView.js +51 -0
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -0
- package/dist/components/Employee/Dashboard/JobAndPayView.d.ts +22 -0
- package/dist/components/Employee/Dashboard/JobAndPayView.js +211 -0
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -0
- package/dist/components/Employee/Dashboard/TaxesView.d.ts +13 -0
- package/dist/components/Employee/Dashboard/TaxesView.js +97 -0
- package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +3 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +8 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -0
- package/dist/components/Employee/Dashboard/hooks/index.d.ts +9 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.d.ts +20 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +29 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +30 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +52 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +16 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +22 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +20 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +24 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js.map +1 -0
- package/dist/components/Employee/Dashboard/index.d.ts +14 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +10 -12
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +17 -19
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +11 -13
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +7 -8
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -7
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +5 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -5
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js +22 -22
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +24 -26
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +11 -12
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +7 -8
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -5
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +2 -4
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.d.ts +2 -3
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeListView.js +40 -42
- package/dist/components/Employee/EmployeeList/EmployeeListView.js.map +1 -1
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js +7 -9
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +6 -7
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +10 -11
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -5
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +14 -15
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -6
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +2 -3
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +6 -7
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +10 -11
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -7
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +6 -7
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +4 -5
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +1 -1
- package/dist/components/Employee/Profile/useProfile.js +3 -5
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +7 -8
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -5
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +8 -9
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +10 -11
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +3 -5
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +14 -16
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +12 -13
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +2 -4
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
- package/dist/components/Employee/index.d.ts +2 -0
- package/dist/components/Employee/index.js +28 -26
- package/dist/components/Employee/index.js.map +1 -1
- package/dist/components/Flow/Flow.js +16 -18
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +28 -29
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +14 -14
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +11 -12
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +3 -4
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +10 -11
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +8 -10
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +12 -14
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +74 -69
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +30 -32
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +0 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +19 -19
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +3 -3
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +13 -13
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -7
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +12 -13
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +11 -13
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +2 -2
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +16 -16
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +28 -28
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +22 -24
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +78 -79
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +2 -2
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +224 -201
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +8 -8
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +79 -80
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +18 -18
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -4
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +103 -114
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +16 -18
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +2 -3
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +6 -7
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -4
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +67 -63
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +8 -10
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js +5 -5
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +13 -13
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
- package/dist/components/Payroll/helpers.d.ts +1 -1
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.d.ts +2 -2
- package/dist/components/Payroll/usePreparedPayrollData.js +7 -9
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js +3 -3
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.d.ts +48 -0
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js +94 -0
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +9 -10
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +10 -11
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +9 -10
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js +12 -13
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +13 -14
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.d.ts +3 -3
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +14 -15
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/index.d.ts +2 -4
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.d.ts +3 -0
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.js +15 -0
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js +8 -7
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.d.ts +17 -0
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js +21 -0
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js +7 -7
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +3 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.d.ts +48 -42
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js +73 -101
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchemaParity.test.d.ts +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/index.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +4 -6
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js +111 -112
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +3 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +13 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js +31 -25
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.d.ts +4 -3
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/index.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +5 -19
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js +83 -86
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.js +172 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.module.scss.js +14 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.module.scss.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.d.ts +23 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.js +37 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/index.d.ts +7 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.d.ts +55 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.js +54 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.d.ts +69 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.js +180 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.js +69 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/fields.d.ts +9 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/fields.js +14 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/fields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/index.d.ts +7 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/signCompanyFormSchema.d.ts +25 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/signCompanyFormSchema.js +24 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/signCompanyFormSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.d.ts +57 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.js +101 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.js +71 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.js +179 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/fields.d.ts +53 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/fields.js +164 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/fields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/index.d.ts +9 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/signEmployeeFormSchema.d.ts +150 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/signEmployeeFormSchema.js +152 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.d.ts +151 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.js +172 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +6 -7
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/index.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.d.ts +4 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js +85 -83
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.d.ts +8 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js +18 -17
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/index.d.ts +7 -4
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +45 -42
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +55 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +25 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.d.ts +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +69 -46
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +122 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js +8 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListTypes.d.ts +17 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.d.ts +3 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +25 -55
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +66 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorTypes.d.ts +6 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +1 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +71 -66
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js +5 -5
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.d.ts +8 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +71 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js +12 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +206 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +20 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/index.d.ts +6 -0
- package/dist/components/UNSTABLE_TimeOff/index.d.ts +2 -2
- package/dist/components/UNSTABLE_TimeOff/index.js +20 -20
- package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/{TimeOffManagement/shared → shared}/EmployeeTable/EmployeeTableTypes.d.ts +3 -3
- package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.d.ts +30 -0
- package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.js +97 -0
- package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.test.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +52 -50
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +10 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +28 -21
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +10 -11
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ThemeProvider/theme.d.ts +2 -0
- package/dist/contexts/ThemeProvider/theme.js +4 -2
- package/dist/contexts/ThemeProvider/theme.js.map +1 -1
- package/dist/helpers/buildQueryErrorHandling.d.ts +22 -0
- package/dist/helpers/buildQueryErrorHandling.js +11 -0
- package/dist/helpers/buildQueryErrorHandling.js.map +1 -0
- package/dist/helpers/dateFormatting.d.ts +2 -0
- package/dist/helpers/dateFormatting.js +38 -33
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/helpers/formattedStrings.js +40 -33
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/hooks/useCompanyPaymentSpeed.d.ts +6 -0
- package/dist/hooks/useCompanyPaymentSpeed.js +19 -0
- package/dist/hooks/useCompanyPaymentSpeed.js.map +1 -0
- package/dist/hooks/useCompanyPaymentSpeed.test.d.ts +1 -0
- package/dist/i18n/I18n.js +9 -9
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +9 -9
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +18 -12
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +28 -0
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +32 -26
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +36 -34
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
- package/dist/i18n/en/Employee.Dashboard.json.js +26 -0
- package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -0
- package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollHistory.json.js +2 -2
- package/dist/i18n/en/Payroll.PayrollList.json.js +15 -15
- package/dist/i18n/en/Payroll.TransitionCreation.json.js +9 -9
- package/dist/i18n/en/UNSTABLE.PayScheduleForm.json.js +24 -0
- package/dist/i18n/en/UNSTABLE.PayScheduleForm.json.js.map +1 -0
- package/dist/i18n/en/UNSTABLE.SignCompanyForm.json.js +20 -0
- package/dist/i18n/en/UNSTABLE.SignCompanyForm.json.js.map +1 -0
- package/dist/i18n/en/UNSTABLE.SignEmployeeForm.json.js +22 -0
- package/dist/i18n/en/UNSTABLE.SignEmployeeForm.json.js.map +1 -0
- package/dist/i18n/en/UNSTABLE.SignEmployeeI9Form.json.js +70 -0
- package/dist/i18n/en/UNSTABLE.SignEmployeeI9Form.json.js.map +1 -0
- package/dist/i18n/en/common.json.d.ts +3 -1
- package/dist/i18n/en/common.json.js +5 -5
- package/dist/shared/constants.d.ts +10 -0
- package/dist/shared/constants.js +15 -10
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +348 -29
- package/dist/types/sdkHooks.d.ts +2 -4
- package/docs/reference/endpoint-inventory.json +119 -29
- package/package.json +19 -19
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.d.ts +0 -26
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js +0 -24
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.d.ts +0 -3
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js +0 -14
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.d.ts +0 -6
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js +0 -14
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.d.ts +0 -4
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js +0 -8
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.d.ts +0 -6
- package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.js +0 -50
- package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/shared/EmployeeTable/EmployeeTable.d.ts +0 -2
- package/dist/helpers/requiredIf.d.ts +0 -13
- package/dist/helpers/requiredIf.js +0 -8
- package/dist/helpers/requiredIf.js.map +0 -1
- /package/dist/components/UNSTABLE_Hooks/form/{deriveFieldsMetadata.test.d.ts → buildFormSchema.test.d.ts} +0 -0
- /package/dist/components/UNSTABLE_TimeOff/{TimeOffManagement/shared → shared}/EmployeeTable/index.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
2
|
+
import { OptionalFieldsToRequire } from '../../form/buildFormSchema';
|
|
3
3
|
export declare const CompensationErrorCodes: {
|
|
4
4
|
readonly REQUIRED: "REQUIRED";
|
|
5
5
|
readonly RATE_MINIMUM: "RATE_MINIMUM";
|
|
@@ -26,53 +26,56 @@ declare const fieldValidators: {
|
|
|
26
26
|
Year: "Year";
|
|
27
27
|
Paycheck: "Paycheck";
|
|
28
28
|
}>;
|
|
29
|
-
rate: z.
|
|
30
|
-
startDate: z.
|
|
29
|
+
rate: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
30
|
+
startDate: z.ZodPipe<z.ZodTransform<string | null, unknown>, z.ZodNullable<z.ZodISODate>>;
|
|
31
31
|
adjustForMinimumWage: z.ZodBoolean;
|
|
32
|
-
minimumWageId: z.
|
|
33
|
-
stateWcCovered: z.
|
|
34
|
-
stateWcClassCode: z.
|
|
35
|
-
twoPercentShareholder: z.
|
|
32
|
+
minimumWageId: z.ZodString;
|
|
33
|
+
stateWcCovered: z.ZodPipe<z.ZodTransform<boolean | undefined, unknown>, z.ZodBoolean>;
|
|
34
|
+
stateWcClassCode: z.ZodString;
|
|
35
|
+
twoPercentShareholder: z.ZodBoolean;
|
|
36
36
|
};
|
|
37
|
-
export type CompensationField = Exclude<keyof typeof fieldValidators, 'adjustForMinimumWage' | 'minimumWageId' | 'stateWcCovered' | 'stateWcClassCode' | 'twoPercentShareholder'>;
|
|
38
37
|
export type CompensationFormData = {
|
|
39
38
|
[K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>;
|
|
40
39
|
};
|
|
40
|
+
declare const requiredFieldsConfig: {
|
|
41
|
+
jobTitle: "create";
|
|
42
|
+
flsaStatus: "create";
|
|
43
|
+
paymentUnit: "create";
|
|
44
|
+
rate: "create";
|
|
45
|
+
startDate: "create";
|
|
46
|
+
minimumWageId: (data: {
|
|
47
|
+
jobTitle: string;
|
|
48
|
+
flsaStatus: "Exempt" | "Salaried Nonexempt" | "Nonexempt" | "Owner" | "Commission Only Exempt" | "Commission Only Nonexempt";
|
|
49
|
+
paymentUnit: "Hour" | "Week" | "Month" | "Year" | "Paycheck";
|
|
50
|
+
rate: number;
|
|
51
|
+
startDate: string | null;
|
|
52
|
+
adjustForMinimumWage: boolean;
|
|
53
|
+
minimumWageId: string;
|
|
54
|
+
stateWcCovered: boolean;
|
|
55
|
+
stateWcClassCode: string;
|
|
56
|
+
twoPercentShareholder: boolean;
|
|
57
|
+
}) => boolean;
|
|
58
|
+
stateWcClassCode: (data: {
|
|
59
|
+
jobTitle: string;
|
|
60
|
+
flsaStatus: "Exempt" | "Salaried Nonexempt" | "Nonexempt" | "Owner" | "Commission Only Exempt" | "Commission Only Nonexempt";
|
|
61
|
+
paymentUnit: "Hour" | "Week" | "Month" | "Year" | "Paycheck";
|
|
62
|
+
rate: number;
|
|
63
|
+
startDate: string | null;
|
|
64
|
+
adjustForMinimumWage: boolean;
|
|
65
|
+
minimumWageId: string;
|
|
66
|
+
stateWcCovered: boolean;
|
|
67
|
+
stateWcClassCode: string;
|
|
68
|
+
twoPercentShareholder: boolean;
|
|
69
|
+
}) => boolean;
|
|
70
|
+
};
|
|
71
|
+
export type CompensationOptionalFieldsToRequire = OptionalFieldsToRequire<typeof requiredFieldsConfig>;
|
|
41
72
|
export type CompensationFormOutputs = CompensationFormData;
|
|
42
73
|
interface CompensationSchemaOptions {
|
|
43
74
|
mode?: 'create' | 'update';
|
|
44
|
-
|
|
75
|
+
optionalFieldsToRequire?: CompensationOptionalFieldsToRequire;
|
|
45
76
|
withStartDateField?: boolean;
|
|
46
77
|
}
|
|
47
|
-
export declare function createCompensationSchema(options?: CompensationSchemaOptions):
|
|
48
|
-
rate: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodNumber>;
|
|
49
|
-
startDate: z.ZodPipe<z.ZodTransform<{} | null | undefined, unknown>, z.ZodNullable<z.ZodISODate>>;
|
|
50
|
-
stateWcCovered: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
|
|
51
|
-
jobTitle: z.ZodString;
|
|
52
|
-
flsaStatus: z.ZodEnum<{
|
|
53
|
-
Exempt: "Exempt";
|
|
54
|
-
"Salaried Nonexempt": "Salaried Nonexempt";
|
|
55
|
-
Nonexempt: "Nonexempt";
|
|
56
|
-
Owner: "Owner";
|
|
57
|
-
"Commission Only Exempt": "Commission Only Exempt";
|
|
58
|
-
"Commission Only Nonexempt": "Commission Only Nonexempt";
|
|
59
|
-
}>;
|
|
60
|
-
paymentUnit: z.ZodEnum<{
|
|
61
|
-
Hour: "Hour";
|
|
62
|
-
Week: "Week";
|
|
63
|
-
Month: "Month";
|
|
64
|
-
Year: "Year";
|
|
65
|
-
Paycheck: "Paycheck";
|
|
66
|
-
}>;
|
|
67
|
-
adjustForMinimumWage: z.ZodBoolean;
|
|
68
|
-
minimumWageId: z.ZodOptional<z.ZodString>;
|
|
69
|
-
stateWcClassCode: z.ZodOptional<z.ZodString>;
|
|
70
|
-
twoPercentShareholder: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
-
}, z.core.$strip>;
|
|
72
|
-
export declare const CompensationSchema: z.ZodObject<{
|
|
73
|
-
rate: z.ZodPipe<z.ZodTransform<{}, unknown>, z.ZodNumber>;
|
|
74
|
-
startDate: z.ZodPipe<z.ZodTransform<{} | null | undefined, unknown>, z.ZodNullable<z.ZodISODate>>;
|
|
75
|
-
stateWcCovered: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
|
|
78
|
+
export declare function createCompensationSchema(options?: CompensationSchemaOptions): import('../../form').BuildFormSchemaResult<{
|
|
76
79
|
jobTitle: z.ZodString;
|
|
77
80
|
flsaStatus: z.ZodEnum<{
|
|
78
81
|
Exempt: "Exempt";
|
|
@@ -89,9 +92,12 @@ export declare const CompensationSchema: z.ZodObject<{
|
|
|
89
92
|
Year: "Year";
|
|
90
93
|
Paycheck: "Paycheck";
|
|
91
94
|
}>;
|
|
95
|
+
rate: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
96
|
+
startDate: z.ZodPipe<z.ZodTransform<string | null, unknown>, z.ZodNullable<z.ZodISODate>>;
|
|
92
97
|
adjustForMinimumWage: z.ZodBoolean;
|
|
93
|
-
minimumWageId: z.
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
98
|
+
minimumWageId: z.ZodString;
|
|
99
|
+
stateWcCovered: z.ZodPipe<z.ZodTransform<boolean | undefined, unknown>, z.ZodBoolean>;
|
|
100
|
+
stateWcClassCode: z.ZodString;
|
|
101
|
+
twoPercentShareholder: z.ZodBoolean;
|
|
102
|
+
}>;
|
|
97
103
|
export {};
|
|
@@ -1,118 +1,90 @@
|
|
|
1
1
|
import { z as e } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { FlsaStatus as
|
|
5
|
-
import { yearlyRate as
|
|
6
|
-
const
|
|
2
|
+
import { buildFormSchema as d } from "../../form/buildFormSchema.js";
|
|
3
|
+
import { coerceStringBoolean as i, coerceToISODate as N, coerceNaN as m } from "../../form/preprocessors.js";
|
|
4
|
+
import { FlsaStatus as t, FLSA_OVERTIME_SALARY_LIMIT as O, PAY_PERIODS as r } from "../../../../shared/constants.js";
|
|
5
|
+
import { yearlyRate as T } from "../../../../helpers/payRateCalculator.js";
|
|
6
|
+
const E = {
|
|
7
7
|
REQUIRED: "REQUIRED",
|
|
8
8
|
RATE_MINIMUM: "RATE_MINIMUM",
|
|
9
9
|
RATE_EXEMPT_THRESHOLD: "RATE_EXEMPT_THRESHOLD",
|
|
10
10
|
PAYMENT_UNIT_OWNER: "PAYMENT_UNIT_OWNER",
|
|
11
11
|
PAYMENT_UNIT_COMMISSION: "PAYMENT_UNIT_COMMISSION",
|
|
12
12
|
RATE_COMMISSION_ZERO: "RATE_COMMISSION_ZERO"
|
|
13
|
-
},
|
|
14
|
-
jobTitle: e.string()
|
|
13
|
+
}, n = {
|
|
14
|
+
jobTitle: e.string(),
|
|
15
15
|
flsaStatus: e.enum([
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
t.EXEMPT,
|
|
17
|
+
t.SALARIED_NONEXEMPT,
|
|
18
|
+
t.NONEXEMPT,
|
|
19
|
+
t.OWNER,
|
|
20
|
+
t.COMMISSION_ONLY_EXEMPT,
|
|
21
|
+
t.COMMISSION_ONLY_NONEXEMPT
|
|
22
22
|
]),
|
|
23
23
|
paymentUnit: e.enum([
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
r.HOUR,
|
|
25
|
+
r.WEEK,
|
|
26
|
+
r.MONTH,
|
|
27
|
+
r.YEAR,
|
|
28
|
+
r.PAYCHECK
|
|
29
29
|
]),
|
|
30
|
-
rate: e.
|
|
31
|
-
startDate: e.iso.date().nullable()
|
|
30
|
+
rate: e.preprocess(m(0), e.number()),
|
|
31
|
+
startDate: e.preprocess(N, e.iso.date().nullable()),
|
|
32
32
|
adjustForMinimumWage: e.boolean(),
|
|
33
|
-
minimumWageId: e.string()
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
});
|
|
85
|
-
const { flsaStatus: E, paymentUnit: I } = a, d = a.rate;
|
|
86
|
-
E === s.EXEMPT || E === s.SALARIED_NONEXEMPT || E === s.NONEXEMPT ? d < 1 ? r.addIssue({
|
|
87
|
-
code: e.ZodIssueCode.custom,
|
|
88
|
-
path: ["rate"],
|
|
89
|
-
message: o.RATE_MINIMUM
|
|
90
|
-
}) : E === s.EXEMPT && f(d, I) < p && r.addIssue({
|
|
91
|
-
code: e.ZodIssueCode.custom,
|
|
92
|
-
path: ["rate"],
|
|
93
|
-
message: o.RATE_EXEMPT_THRESHOLD
|
|
94
|
-
}) : E === s.OWNER ? (I !== i.PAYCHECK && r.addIssue({
|
|
95
|
-
code: e.ZodIssueCode.custom,
|
|
96
|
-
path: ["paymentUnit"],
|
|
97
|
-
message: o.PAYMENT_UNIT_OWNER
|
|
98
|
-
}), d < 1 && r.addIssue({
|
|
99
|
-
code: e.ZodIssueCode.custom,
|
|
100
|
-
path: ["rate"],
|
|
101
|
-
message: o.RATE_MINIMUM
|
|
102
|
-
})) : [s.COMMISSION_ONLY_EXEMPT, s.COMMISSION_ONLY_NONEXEMPT].includes(E) && (I !== i.YEAR && r.addIssue({
|
|
103
|
-
code: e.ZodIssueCode.custom,
|
|
104
|
-
path: ["paymentUnit"],
|
|
105
|
-
message: o.PAYMENT_UNIT_COMMISSION
|
|
106
|
-
}), d !== 0 && r.addIssue({
|
|
107
|
-
code: e.ZodIssueCode.custom,
|
|
108
|
-
path: ["rate"],
|
|
109
|
-
message: o.RATE_COMMISSION_ZERO
|
|
110
|
-
}));
|
|
33
|
+
minimumWageId: e.string(),
|
|
34
|
+
// Radio group delivers 'true'/'false' strings; coerceStringBoolean converts to boolean
|
|
35
|
+
stateWcCovered: e.preprocess(i, e.boolean()),
|
|
36
|
+
stateWcClassCode: e.string(),
|
|
37
|
+
twoPercentShareholder: e.boolean()
|
|
38
|
+
}, u = {
|
|
39
|
+
jobTitle: "create",
|
|
40
|
+
flsaStatus: "create",
|
|
41
|
+
paymentUnit: "create",
|
|
42
|
+
rate: "create",
|
|
43
|
+
startDate: "create",
|
|
44
|
+
minimumWageId: (o) => o.adjustForMinimumWage,
|
|
45
|
+
stateWcClassCode: (o) => String(o.stateWcCovered) === "true"
|
|
46
|
+
};
|
|
47
|
+
function _(o, a) {
|
|
48
|
+
const { flsaStatus: s, paymentUnit: I, rate: M } = o;
|
|
49
|
+
s === t.EXEMPT || s === t.SALARIED_NONEXEMPT || s === t.NONEXEMPT ? M < 1 ? a.addIssue({
|
|
50
|
+
code: e.ZodIssueCode.custom,
|
|
51
|
+
path: ["rate"],
|
|
52
|
+
message: E.RATE_MINIMUM
|
|
53
|
+
}) : s === t.EXEMPT && T(M, I) < O && a.addIssue({
|
|
54
|
+
code: e.ZodIssueCode.custom,
|
|
55
|
+
path: ["rate"],
|
|
56
|
+
message: E.RATE_EXEMPT_THRESHOLD
|
|
57
|
+
}) : s === t.OWNER ? (I !== r.PAYCHECK && a.addIssue({
|
|
58
|
+
code: e.ZodIssueCode.custom,
|
|
59
|
+
path: ["paymentUnit"],
|
|
60
|
+
message: E.PAYMENT_UNIT_OWNER
|
|
61
|
+
}), M < 1 && a.addIssue({
|
|
62
|
+
code: e.ZodIssueCode.custom,
|
|
63
|
+
path: ["rate"],
|
|
64
|
+
message: E.RATE_MINIMUM
|
|
65
|
+
})) : (s === t.COMMISSION_ONLY_EXEMPT || s === t.COMMISSION_ONLY_NONEXEMPT) && (I !== r.YEAR && a.addIssue({
|
|
66
|
+
code: e.ZodIssueCode.custom,
|
|
67
|
+
path: ["paymentUnit"],
|
|
68
|
+
message: E.PAYMENT_UNIT_COMMISSION
|
|
69
|
+
}), M !== 0 && a.addIssue({
|
|
70
|
+
code: e.ZodIssueCode.custom,
|
|
71
|
+
path: ["rate"],
|
|
72
|
+
message: E.RATE_COMMISSION_ZERO
|
|
73
|
+
}));
|
|
74
|
+
}
|
|
75
|
+
function A(o = {}) {
|
|
76
|
+
const { mode: a = "create", optionalFieldsToRequire: s, withStartDateField: I = !0 } = o;
|
|
77
|
+
return d(n, {
|
|
78
|
+
requiredFieldsConfig: u,
|
|
79
|
+
requiredErrorCode: E.REQUIRED,
|
|
80
|
+
mode: a,
|
|
81
|
+
optionalFieldsToRequire: s,
|
|
82
|
+
excludeFields: I ? [] : ["startDate"],
|
|
83
|
+
superRefine: _
|
|
111
84
|
});
|
|
112
85
|
}
|
|
113
|
-
g();
|
|
114
86
|
export {
|
|
115
|
-
|
|
116
|
-
|
|
87
|
+
E as CompensationErrorCodes,
|
|
88
|
+
A as createCompensationSchema
|
|
117
89
|
};
|
|
118
90
|
//# sourceMappingURL=compensationSchema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compensationSchema.js","sources":["../../../../../src/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport { composeFormSchema } from '../../form/composeFormSchema'\nimport {\n filterRequiredFields,\n resolveRequiredFields,\n type RequiredFields,\n} from '../../form/resolveRequiredFields'\nimport { FLSA_OVERTIME_SALARY_LIMIT, FlsaStatus, PAY_PERIODS } from '@/shared/constants'\nimport { yearlyRate } from '@/helpers/payRateCalculator'\n\nexport const CompensationErrorCodes = {\n REQUIRED: 'REQUIRED',\n RATE_MINIMUM: 'RATE_MINIMUM',\n RATE_EXEMPT_THRESHOLD: 'RATE_EXEMPT_THRESHOLD',\n PAYMENT_UNIT_OWNER: 'PAYMENT_UNIT_OWNER',\n PAYMENT_UNIT_COMMISSION: 'PAYMENT_UNIT_COMMISSION',\n RATE_COMMISSION_ZERO: 'RATE_COMMISSION_ZERO',\n} as const\n\nexport type CompensationErrorCode =\n (typeof CompensationErrorCodes)[keyof typeof CompensationErrorCodes]\n\nconst fieldValidators = {\n jobTitle: z.string().min(1, { message: CompensationErrorCodes.REQUIRED }),\n flsaStatus: z.enum([\n FlsaStatus.EXEMPT,\n FlsaStatus.SALARIED_NONEXEMPT,\n FlsaStatus.NONEXEMPT,\n FlsaStatus.OWNER,\n FlsaStatus.COMMISSION_ONLY_EXEMPT,\n FlsaStatus.COMMISSION_ONLY_NONEXEMPT,\n ]),\n paymentUnit: z.enum([\n PAY_PERIODS.HOUR,\n PAY_PERIODS.WEEK,\n PAY_PERIODS.MONTH,\n PAY_PERIODS.YEAR,\n PAY_PERIODS.PAYCHECK,\n ]),\n rate: z.number().optional(),\n startDate: z.iso.date().nullable().optional(),\n adjustForMinimumWage: z.boolean(),\n minimumWageId: z.string().optional(),\n stateWcCovered: z.boolean().optional(),\n stateWcClassCode: z.string().optional(),\n twoPercentShareholder: z.boolean().optional(),\n}\n\nconst FIXED_FIELDS = new Set([\n 'adjustForMinimumWage',\n 'minimumWageId',\n 'stateWcCovered',\n 'stateWcClassCode',\n 'twoPercentShareholder',\n])\n\nexport type CompensationField = Exclude<\n keyof typeof fieldValidators,\n | 'adjustForMinimumWage'\n | 'minimumWageId'\n | 'stateWcCovered'\n | 'stateWcClassCode'\n | 'twoPercentShareholder'\n>\n\nexport type CompensationFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\nexport type CompensationFormOutputs = CompensationFormData\n\nconst runtimeFieldValidators = {\n ...fieldValidators,\n rate: z.preprocess(\n val => {\n if (val === undefined || val === null || Number.isNaN(val)) return 0\n return val\n },\n z.number({ error: () => CompensationErrorCodes.REQUIRED }),\n ),\n startDate: z.preprocess(\n val => {\n if (val instanceof Date) return val.toISOString().split('T')[0]\n if (val === null || val === '' || val === undefined) return null\n return val\n },\n z.iso.date({ error: () => CompensationErrorCodes.REQUIRED }).nullable(),\n ),\n stateWcCovered: z\n .preprocess(val => (typeof val === 'string' ? val === 'true' : val), z.boolean())\n .optional(),\n}\n\nconst REQUIRED_ON_CREATE = new Set<CompensationField>([\n 'jobTitle',\n 'flsaStatus',\n 'rate',\n 'paymentUnit',\n])\nconst REQUIRED_ON_UPDATE = new Set<CompensationField>([])\n\ninterface CompensationSchemaOptions {\n mode?: 'create' | 'update'\n requiredFields?: RequiredFields<CompensationField>\n withStartDateField?: boolean\n}\n\nexport function createCompensationSchema(options: CompensationSchemaOptions = {}) {\n const { mode = 'create', requiredFields, withStartDateField = true } = options\n\n const effectiveRequiredFields = withStartDateField\n ? requiredFields\n : filterRequiredFields(requiredFields, 'startDate')\n\n const effectiveRequiredOnCreate = new Set(REQUIRED_ON_CREATE)\n if (withStartDateField) {\n effectiveRequiredOnCreate.add('startDate')\n }\n\n const baseSchema = composeFormSchema({\n fieldValidators: runtimeFieldValidators,\n fixedFields: FIXED_FIELDS,\n requiredOnCreate: effectiveRequiredOnCreate,\n requiredOnUpdate: REQUIRED_ON_UPDATE,\n mode,\n requiredFields: effectiveRequiredFields,\n })\n\n const modeDefaults = mode === 'create' ? effectiveRequiredOnCreate : REQUIRED_ON_UPDATE\n const partnerRequired = new Set(resolveRequiredFields(effectiveRequiredFields, mode))\n const isStartDateRequired = modeDefaults.has('startDate') || partnerRequired.has('startDate')\n\n return baseSchema.superRefine((data, ctx) => {\n if (isStartDateRequired && data.startDate == null) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['startDate'],\n message: CompensationErrorCodes.REQUIRED,\n })\n }\n\n if (data.adjustForMinimumWage && (!data.minimumWageId || data.minimumWageId.trim() === '')) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['minimumWageId'],\n message: CompensationErrorCodes.REQUIRED,\n })\n }\n\n if (\n data.stateWcCovered === true &&\n (!data.stateWcClassCode || data.stateWcClassCode.trim() === '')\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['stateWcClassCode'],\n message: CompensationErrorCodes.REQUIRED,\n })\n }\n\n const { flsaStatus, paymentUnit } = data\n const rate = data.rate\n\n if (\n flsaStatus === FlsaStatus.EXEMPT ||\n flsaStatus === FlsaStatus.SALARIED_NONEXEMPT ||\n flsaStatus === FlsaStatus.NONEXEMPT\n ) {\n if (rate < 1) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_MINIMUM,\n })\n } else if (\n flsaStatus === FlsaStatus.EXEMPT &&\n yearlyRate(rate, paymentUnit) < FLSA_OVERTIME_SALARY_LIMIT\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_EXEMPT_THRESHOLD,\n })\n }\n } else if (flsaStatus === FlsaStatus.OWNER) {\n if (paymentUnit !== PAY_PERIODS.PAYCHECK) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['paymentUnit'],\n message: CompensationErrorCodes.PAYMENT_UNIT_OWNER,\n })\n }\n if (rate < 1) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_MINIMUM,\n })\n }\n } else if (\n [FlsaStatus.COMMISSION_ONLY_EXEMPT, FlsaStatus.COMMISSION_ONLY_NONEXEMPT].includes(flsaStatus)\n ) {\n if (paymentUnit !== PAY_PERIODS.YEAR) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['paymentUnit'],\n message: CompensationErrorCodes.PAYMENT_UNIT_COMMISSION,\n })\n }\n if (rate !== 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_COMMISSION_ZERO,\n })\n }\n }\n })\n}\n\nexport const CompensationSchema = createCompensationSchema()\n"],"names":["CompensationErrorCodes","fieldValidators","z","FlsaStatus","PAY_PERIODS","FIXED_FIELDS","runtimeFieldValidators","val","REQUIRED_ON_CREATE","REQUIRED_ON_UPDATE","createCompensationSchema","options","mode","requiredFields","withStartDateField","effectiveRequiredFields","filterRequiredFields","effectiveRequiredOnCreate","baseSchema","composeFormSchema","modeDefaults","partnerRequired","resolveRequiredFields","isStartDateRequired","data","ctx","flsaStatus","paymentUnit","rate","yearlyRate","FLSA_OVERTIME_SALARY_LIMIT"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"compensationSchema.js","sources":["../../../../../src/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n buildFormSchema,\n type RequiredFieldConfig,\n type OptionalFieldsToRequire,\n} from '../../form/buildFormSchema'\nimport { coerceNaN, coerceToISODate, coerceStringBoolean } from '../../form/preprocessors'\nimport { FLSA_OVERTIME_SALARY_LIMIT, FlsaStatus, PAY_PERIODS } from '@/shared/constants'\nimport { yearlyRate } from '@/helpers/payRateCalculator'\n\n// ── Error codes ────────────────────────────────────────────────────────\n\nexport const CompensationErrorCodes = {\n REQUIRED: 'REQUIRED',\n RATE_MINIMUM: 'RATE_MINIMUM',\n RATE_EXEMPT_THRESHOLD: 'RATE_EXEMPT_THRESHOLD',\n PAYMENT_UNIT_OWNER: 'PAYMENT_UNIT_OWNER',\n PAYMENT_UNIT_COMMISSION: 'PAYMENT_UNIT_COMMISSION',\n RATE_COMMISSION_ZERO: 'RATE_COMMISSION_ZERO',\n} as const\n\nexport type CompensationErrorCode =\n (typeof CompensationErrorCodes)[keyof typeof CompensationErrorCodes]\n\nconst fieldValidators = {\n jobTitle: z.string(),\n flsaStatus: z.enum([\n FlsaStatus.EXEMPT,\n FlsaStatus.SALARIED_NONEXEMPT,\n FlsaStatus.NONEXEMPT,\n FlsaStatus.OWNER,\n FlsaStatus.COMMISSION_ONLY_EXEMPT,\n FlsaStatus.COMMISSION_ONLY_NONEXEMPT,\n ]),\n paymentUnit: z.enum([\n PAY_PERIODS.HOUR,\n PAY_PERIODS.WEEK,\n PAY_PERIODS.MONTH,\n PAY_PERIODS.YEAR,\n PAY_PERIODS.PAYCHECK,\n ]),\n rate: z.preprocess(coerceNaN(0), z.number()),\n startDate: z.preprocess(coerceToISODate, z.iso.date().nullable()),\n adjustForMinimumWage: z.boolean(),\n minimumWageId: z.string(),\n // Radio group delivers 'true'/'false' strings; coerceStringBoolean converts to boolean\n stateWcCovered: z.preprocess(coerceStringBoolean, z.boolean()),\n stateWcClassCode: z.string(),\n twoPercentShareholder: z.boolean(),\n}\n\nexport type CompensationFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\n\n// ── Required fields config (requiredness rules per field) ────────────\n\nconst requiredFieldsConfig = {\n jobTitle: 'create',\n flsaStatus: 'create',\n paymentUnit: 'create',\n rate: 'create',\n startDate: 'create',\n minimumWageId: data => data.adjustForMinimumWage,\n stateWcClassCode: data => String(data.stateWcCovered) === 'true',\n} satisfies RequiredFieldConfig<typeof fieldValidators>\n\nfunction validateFlsaRules(data: CompensationFormData, ctx: z.RefinementCtx) {\n const { flsaStatus, paymentUnit, rate } = data\n\n if (\n flsaStatus === FlsaStatus.EXEMPT ||\n flsaStatus === FlsaStatus.SALARIED_NONEXEMPT ||\n flsaStatus === FlsaStatus.NONEXEMPT\n ) {\n if (rate < 1) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_MINIMUM,\n })\n } else if (\n flsaStatus === FlsaStatus.EXEMPT &&\n yearlyRate(rate, paymentUnit) < FLSA_OVERTIME_SALARY_LIMIT\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_EXEMPT_THRESHOLD,\n })\n }\n } else if (flsaStatus === FlsaStatus.OWNER) {\n if (paymentUnit !== PAY_PERIODS.PAYCHECK) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['paymentUnit'],\n message: CompensationErrorCodes.PAYMENT_UNIT_OWNER,\n })\n }\n if (rate < 1) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_MINIMUM,\n })\n }\n /* eslint-disable @typescript-eslint/no-unnecessary-condition -- explicit match prevents a future FLSA status from silently falling into commission rules */\n } else if (\n flsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT ||\n flsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT\n ) {\n /* eslint-enable @typescript-eslint/no-unnecessary-condition */\n if (paymentUnit !== PAY_PERIODS.YEAR) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['paymentUnit'],\n message: CompensationErrorCodes.PAYMENT_UNIT_COMMISSION,\n })\n }\n if (rate !== 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_COMMISSION_ZERO,\n })\n }\n }\n}\n\n// ── Schema factory ───────────────────────────────────────────────────\n\nexport type CompensationOptionalFieldsToRequire = OptionalFieldsToRequire<\n typeof requiredFieldsConfig\n>\nexport type CompensationFormOutputs = CompensationFormData\n\ninterface CompensationSchemaOptions {\n mode?: 'create' | 'update'\n optionalFieldsToRequire?: CompensationOptionalFieldsToRequire\n withStartDateField?: boolean\n}\n\nexport function createCompensationSchema(options: CompensationSchemaOptions = {}) {\n const { mode = 'create', optionalFieldsToRequire, withStartDateField = true } = options\n\n return buildFormSchema(fieldValidators, {\n requiredFieldsConfig,\n requiredErrorCode: CompensationErrorCodes.REQUIRED,\n mode,\n optionalFieldsToRequire,\n excludeFields: withStartDateField ? [] : ['startDate'],\n superRefine: validateFlsaRules,\n })\n}\n"],"names":["CompensationErrorCodes","fieldValidators","z","FlsaStatus","PAY_PERIODS","coerceNaN","coerceToISODate","coerceStringBoolean","requiredFieldsConfig","data","validateFlsaRules","ctx","flsaStatus","paymentUnit","rate","yearlyRate","FLSA_OVERTIME_SALARY_LIMIT","createCompensationSchema","options","mode","optionalFieldsToRequire","withStartDateField","buildFormSchema"],"mappings":";;;;;AAYO,MAAMA,IAAyB;AAAA,EACpC,UAAU;AAAA,EACV,cAAc;AAAA,EACd,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,yBAAyB;AAAA,EACzB,sBAAsB;AACxB,GAKMC,IAAkB;AAAA,EACtB,UAAUC,EAAE,OAAA;AAAA,EACZ,YAAYA,EAAE,KAAK;AAAA,IACjBC,EAAW;AAAA,IACXA,EAAW;AAAA,IACXA,EAAW;AAAA,IACXA,EAAW;AAAA,IACXA,EAAW;AAAA,IACXA,EAAW;AAAA,EAAA,CACZ;AAAA,EACD,aAAaD,EAAE,KAAK;AAAA,IAClBE,EAAY;AAAA,IACZA,EAAY;AAAA,IACZA,EAAY;AAAA,IACZA,EAAY;AAAA,IACZA,EAAY;AAAA,EAAA,CACb;AAAA,EACD,MAAMF,EAAE,WAAWG,EAAU,CAAC,GAAGH,EAAE,QAAQ;AAAA,EAC3C,WAAWA,EAAE,WAAWI,GAAiBJ,EAAE,IAAI,OAAO,UAAU;AAAA,EAChE,sBAAsBA,EAAE,QAAA;AAAA,EACxB,eAAeA,EAAE,OAAA;AAAA;AAAA,EAEjB,gBAAgBA,EAAE,WAAWK,GAAqBL,EAAE,SAAS;AAAA,EAC7D,kBAAkBA,EAAE,OAAA;AAAA,EACpB,uBAAuBA,EAAE,QAAA;AAC3B,GAQMM,IAAuB;AAAA,EAC3B,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,MAAM;AAAA,EACN,WAAW;AAAA,EACX,eAAe,OAAQC,EAAK;AAAA,EAC5B,kBAAkB,CAAAA,MAAQ,OAAOA,EAAK,cAAc,MAAM;AAC5D;AAEA,SAASC,EAAkBD,GAA4BE,GAAsB;AAC3E,QAAM,EAAE,YAAAC,GAAY,aAAAC,GAAa,MAAAC,EAAA,IAASL;AAE1C,EACEG,MAAeT,EAAW,UAC1BS,MAAeT,EAAW,sBAC1BS,MAAeT,EAAW,YAEtBW,IAAO,IACTH,EAAI,SAAS;AAAA,IACX,MAAMT,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,MAAM;AAAA,IACb,SAASF,EAAuB;AAAA,EAAA,CACjC,IAEDY,MAAeT,EAAW,UAC1BY,EAAWD,GAAMD,CAAW,IAAIG,KAEhCL,EAAI,SAAS;AAAA,IACX,MAAMT,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,MAAM;AAAA,IACb,SAASF,EAAuB;AAAA,EAAA,CACjC,IAEMY,MAAeT,EAAW,SAC/BU,MAAgBT,EAAY,YAC9BO,EAAI,SAAS;AAAA,IACX,MAAMT,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,aAAa;AAAA,IACpB,SAASF,EAAuB;AAAA,EAAA,CACjC,GAECc,IAAO,KACTH,EAAI,SAAS;AAAA,IACX,MAAMT,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,MAAM;AAAA,IACb,SAASF,EAAuB;AAAA,EAAA,CACjC,MAIHY,MAAeT,EAAW,0BAC1BS,MAAeT,EAAW,+BAGtBU,MAAgBT,EAAY,QAC9BO,EAAI,SAAS;AAAA,IACX,MAAMT,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,aAAa;AAAA,IACpB,SAASF,EAAuB;AAAA,EAAA,CACjC,GAECc,MAAS,KACXH,EAAI,SAAS;AAAA,IACX,MAAMT,EAAE,aAAa;AAAA,IACrB,MAAM,CAAC,MAAM;AAAA,IACb,SAASF,EAAuB;AAAA,EAAA,CACjC;AAGP;AAeO,SAASiB,EAAyBC,IAAqC,IAAI;AAChF,QAAM,EAAE,MAAAC,IAAO,UAAU,yBAAAC,GAAyB,oBAAAC,IAAqB,OAASH;AAEhF,SAAOI,EAAgBrB,GAAiB;AAAA,IACtC,sBAAAO;AAAA,IACA,mBAAmBR,EAAuB;AAAA,IAC1C,MAAAmB;AAAA,IACA,yBAAAC;AAAA,IACA,eAAeC,IAAqB,KAAK,CAAC,WAAW;AAAA,IACrD,aAAaX;AAAA,EAAA,CACd;AACH;"}
|
package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchemaParity.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -26,7 +26,7 @@ export type MinimumWageIdFieldProps = HookFieldProps<SelectHookFieldProps<Requir
|
|
|
26
26
|
export declare function MinimumWageIdField(props: MinimumWageIdFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
export type TwoPercentShareholderFieldProps = HookFieldProps<CheckboxHookFieldProps>;
|
|
28
28
|
export declare function TwoPercentShareholderField(props: TwoPercentShareholderFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
export type StateWcCoveredFieldProps = HookFieldProps<RadioGroupHookFieldProps<never,
|
|
29
|
+
export type StateWcCoveredFieldProps = HookFieldProps<RadioGroupHookFieldProps<never, boolean>>;
|
|
30
30
|
export declare function StateWcCoveredField(props: StateWcCoveredFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
export type StateWcClassCodeFieldProps = HookFieldProps<SelectHookFieldProps<RequiredValidation, WARiskClassCode>>;
|
|
32
32
|
export declare function StateWcClassCodeField(props: StateWcClassCodeFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sources":["../../../../../src/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.tsx"],"sourcesContent":["import type { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { PaymentUnit } from '@gusto/embedded-api/models/components/compensation'\nimport type { TextInputHookFieldProps } from '../../form/fields/TextInputHookField'\nimport type { SelectHookFieldProps } from '../../form/fields/SelectHookField'\nimport type { NumberInputHookFieldProps } from '../../form/fields/NumberInputHookField'\nimport type { CheckboxHookFieldProps } from '../../form/fields/CheckboxHookField'\nimport type { RadioGroupHookFieldProps } from '../../form/fields/RadioGroupHookField'\nimport type { DatePickerHookFieldProps } from '../../form/fields/DatePickerHookField'\nimport {\n TextInputHookField,\n SelectHookField,\n NumberInputHookField,\n CheckboxHookField,\n RadioGroupHookField,\n DatePickerHookField,\n} from '../../form/fields'\nimport type { CompensationErrorCodes } from './compensationSchema'\nimport type { HookFieldProps } from '@/types/sdkHooks'\nimport type { WARiskClassCode } from '@/models/WA_RISK_CODES'\n\nexport type RequiredValidation = typeof CompensationErrorCodes.REQUIRED\nexport type RateValidation = (typeof CompensationErrorCodes)[\n | 'REQUIRED'\n | 'RATE_MINIMUM'\n | 'RATE_EXEMPT_THRESHOLD']\n\nexport type JobTitleFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>\n\nexport function JobTitleField(props: JobTitleFieldProps) {\n return <TextInputHookField {...props} name=\"jobTitle\" />\n}\n\nexport type FlsaStatusFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, FlsaStatusType>\n>\n\nexport function FlsaStatusField(props: FlsaStatusFieldProps) {\n return <SelectHookField {...props} name=\"flsaStatus\" />\n}\n\nexport type RateFieldProps = HookFieldProps<NumberInputHookFieldProps<RateValidation>>\n\nexport function RateField(props: RateFieldProps) {\n return <NumberInputHookField {...props} name=\"rate\" format=\"currency\" min={0} />\n}\n\nexport type PaymentUnitFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, PaymentUnit>\n>\n\nexport function PaymentUnitField(props: PaymentUnitFieldProps) {\n return <SelectHookField {...props} name=\"paymentUnit\" />\n}\n\nexport type AdjustForMinimumWageFieldProps = HookFieldProps<CheckboxHookFieldProps>\n\nexport function AdjustForMinimumWageField(props: AdjustForMinimumWageFieldProps) {\n return <CheckboxHookField {...props} name=\"adjustForMinimumWage\" />\n}\n\nexport type MinimumWageIdFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, MinimumWage>\n>\n\nexport function MinimumWageIdField(props: MinimumWageIdFieldProps) {\n return <SelectHookField {...props} name=\"minimumWageId\" />\n}\n\nexport type TwoPercentShareholderFieldProps = HookFieldProps<CheckboxHookFieldProps>\n\nexport function TwoPercentShareholderField(props: TwoPercentShareholderFieldProps) {\n return <CheckboxHookField {...props} name=\"twoPercentShareholder\" />\n}\n\nexport type StateWcCoveredFieldProps = HookFieldProps<RadioGroupHookFieldProps<never,
|
|
1
|
+
{"version":3,"file":"fields.js","sources":["../../../../../src/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.tsx"],"sourcesContent":["import type { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { PaymentUnit } from '@gusto/embedded-api/models/components/compensation'\nimport type { TextInputHookFieldProps } from '../../form/fields/TextInputHookField'\nimport type { SelectHookFieldProps } from '../../form/fields/SelectHookField'\nimport type { NumberInputHookFieldProps } from '../../form/fields/NumberInputHookField'\nimport type { CheckboxHookFieldProps } from '../../form/fields/CheckboxHookField'\nimport type { RadioGroupHookFieldProps } from '../../form/fields/RadioGroupHookField'\nimport type { DatePickerHookFieldProps } from '../../form/fields/DatePickerHookField'\nimport {\n TextInputHookField,\n SelectHookField,\n NumberInputHookField,\n CheckboxHookField,\n RadioGroupHookField,\n DatePickerHookField,\n} from '../../form/fields'\nimport type { CompensationErrorCodes } from './compensationSchema'\nimport type { HookFieldProps } from '@/types/sdkHooks'\nimport type { WARiskClassCode } from '@/models/WA_RISK_CODES'\n\nexport type RequiredValidation = typeof CompensationErrorCodes.REQUIRED\nexport type RateValidation = (typeof CompensationErrorCodes)[\n | 'REQUIRED'\n | 'RATE_MINIMUM'\n | 'RATE_EXEMPT_THRESHOLD']\n\nexport type JobTitleFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>\n\nexport function JobTitleField(props: JobTitleFieldProps) {\n return <TextInputHookField {...props} name=\"jobTitle\" />\n}\n\nexport type FlsaStatusFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, FlsaStatusType>\n>\n\nexport function FlsaStatusField(props: FlsaStatusFieldProps) {\n return <SelectHookField {...props} name=\"flsaStatus\" />\n}\n\nexport type RateFieldProps = HookFieldProps<NumberInputHookFieldProps<RateValidation>>\n\nexport function RateField(props: RateFieldProps) {\n return <NumberInputHookField {...props} name=\"rate\" format=\"currency\" min={0} />\n}\n\nexport type PaymentUnitFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, PaymentUnit>\n>\n\nexport function PaymentUnitField(props: PaymentUnitFieldProps) {\n return <SelectHookField {...props} name=\"paymentUnit\" />\n}\n\nexport type AdjustForMinimumWageFieldProps = HookFieldProps<CheckboxHookFieldProps>\n\nexport function AdjustForMinimumWageField(props: AdjustForMinimumWageFieldProps) {\n return <CheckboxHookField {...props} name=\"adjustForMinimumWage\" />\n}\n\nexport type MinimumWageIdFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, MinimumWage>\n>\n\nexport function MinimumWageIdField(props: MinimumWageIdFieldProps) {\n return <SelectHookField {...props} name=\"minimumWageId\" />\n}\n\nexport type TwoPercentShareholderFieldProps = HookFieldProps<CheckboxHookFieldProps>\n\nexport function TwoPercentShareholderField(props: TwoPercentShareholderFieldProps) {\n return <CheckboxHookField {...props} name=\"twoPercentShareholder\" />\n}\n\nexport type StateWcCoveredFieldProps = HookFieldProps<RadioGroupHookFieldProps<never, boolean>>\n\nexport function StateWcCoveredField(props: StateWcCoveredFieldProps) {\n return <RadioGroupHookField {...props} name=\"stateWcCovered\" />\n}\n\nexport type StateWcClassCodeFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, WARiskClassCode>\n>\n\nexport function StateWcClassCodeField(props: StateWcClassCodeFieldProps) {\n return <SelectHookField {...props} name=\"stateWcClassCode\" />\n}\n\nexport type StartDateFieldProps = HookFieldProps<\n DatePickerHookFieldProps<typeof CompensationErrorCodes.REQUIRED>\n>\n\nexport function StartDateField(props: StartDateFieldProps) {\n return <DatePickerHookField {...props} name=\"startDate\" />\n}\n"],"names":["JobTitleField","props","jsx","TextInputHookField","FlsaStatusField","SelectHookField","RateField","NumberInputHookField","PaymentUnitField","AdjustForMinimumWageField","CheckboxHookField","MinimumWageIdField","TwoPercentShareholderField","StateWcCoveredField","RadioGroupHookField","StateWcClassCodeField","StartDateField","DatePickerHookField"],"mappings":";;;;;;;AA6BO,SAASA,EAAcC,GAA2B;AACvD,SAAO,gBAAAC,EAACC,GAAA,EAAoB,GAAGF,GAAO,MAAK,YAAW;AACxD;AAMO,SAASG,EAAgBH,GAA6B;AAC3D,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,cAAa;AACvD;AAIO,SAASK,EAAUL,GAAuB;AAC/C,SAAO,gBAAAC,EAACK,KAAsB,GAAGN,GAAO,MAAK,QAAO,QAAO,YAAW,KAAK,EAAA,CAAG;AAChF;AAMO,SAASO,EAAiBP,GAA8B;AAC7D,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,eAAc;AACxD;AAIO,SAASQ,EAA0BR,GAAuC;AAC/E,SAAO,gBAAAC,EAACQ,GAAA,EAAmB,GAAGT,GAAO,MAAK,wBAAuB;AACnE;AAMO,SAASU,EAAmBV,GAAgC;AACjE,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,iBAAgB;AAC1D;AAIO,SAASW,EAA2BX,GAAwC;AACjF,SAAO,gBAAAC,EAACQ,GAAA,EAAmB,GAAGT,GAAO,MAAK,yBAAwB;AACpE;AAIO,SAASY,EAAoBZ,GAAiC;AACnE,SAAO,gBAAAC,EAACY,GAAA,EAAqB,GAAGb,GAAO,MAAK,kBAAiB;AAC/D;AAMO,SAASc,EAAsBd,GAAmC;AACvE,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,oBAAmB;AAC7D;AAMO,SAASe,EAAef,GAA4B;AACzD,SAAO,gBAAAC,EAACe,GAAA,EAAqB,GAAGhB,GAAO,MAAK,aAAY;AAC1D;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./types/i18next.d.ts"
|
|
2
2
|
export { useCompensationForm } from './useCompensationForm';
|
|
3
|
-
export type { CompensationSubmitCallbacks, CompensationSubmitOptions,
|
|
3
|
+
export type { CompensationSubmitCallbacks, CompensationSubmitOptions, UseCompensationFormProps, UseCompensationFormResult, UseCompensationFormReady, CompensationFieldsMetadata, CompensationFormFields, } from './useCompensationForm';
|
|
4
4
|
export { CompensationForm } from './CompensationForm';
|
|
5
5
|
export type { CompensationFormProps } from './CompensationForm';
|
|
6
|
-
export {
|
|
6
|
+
export { createCompensationSchema, CompensationErrorCodes, type CompensationErrorCode, type CompensationOptionalFieldsToRequire, type CompensationFormData, type CompensationFormOutputs, } from './compensationSchema';
|
|
7
7
|
export type { RequiredValidation, RateValidation, StartDateFieldProps, JobTitleFieldProps, FlsaStatusFieldProps, RateFieldProps, PaymentUnitFieldProps, AdjustForMinimumWageFieldProps, MinimumWageIdFieldProps, TwoPercentShareholderFieldProps, StateWcCoveredFieldProps, StateWcClassCodeFieldProps, } from './fields';
|
|
@@ -3,8 +3,7 @@ import { Compensation, PaymentUnit } from '@gusto/embedded-api/models/components
|
|
|
3
3
|
import { Job } from '@gusto/embedded-api/models/components/job';
|
|
4
4
|
import { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype';
|
|
5
5
|
import { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage';
|
|
6
|
-
import {
|
|
7
|
-
import { CompensationField, CompensationFormData } from './compensationSchema';
|
|
6
|
+
import { CompensationOptionalFieldsToRequire, CompensationFormData } from './compensationSchema';
|
|
8
7
|
import { JobTitleField, FlsaStatusField, RateField, PaymentUnitField, AdjustForMinimumWageField, MinimumWageIdField, TwoPercentShareholderField, StateWcCoveredField, StateWcClassCodeField, StartDateField } from './fields';
|
|
9
8
|
import { HookSubmitResult } from '../../../../types/sdkHooks';
|
|
10
9
|
import { WARiskClassCode } from '../../../../models/WA_RISK_CODES';
|
|
@@ -17,17 +16,16 @@ export interface CompensationSubmitOptions {
|
|
|
17
16
|
employeeId?: string;
|
|
18
17
|
startDate?: string;
|
|
19
18
|
}
|
|
20
|
-
export type CompensationRequiredFields = RequiredFields<CompensationField>;
|
|
21
19
|
export interface UseCompensationFormProps {
|
|
22
20
|
employeeId?: string;
|
|
23
21
|
withStartDateField?: boolean;
|
|
24
22
|
jobId?: string;
|
|
25
|
-
|
|
23
|
+
optionalFieldsToRequire?: CompensationOptionalFieldsToRequire;
|
|
26
24
|
defaultValues?: Partial<CompensationFormData>;
|
|
27
25
|
validationMode?: UseFormProps['mode'];
|
|
28
26
|
shouldFocusError?: boolean;
|
|
29
27
|
}
|
|
30
|
-
export declare function useCompensationForm({ employeeId, withStartDateField, jobId,
|
|
28
|
+
export declare function useCompensationForm({ employeeId, withStartDateField, jobId, optionalFieldsToRequire, defaultValues: partnerDefaults, validationMode, shouldFocusError, }: UseCompensationFormProps): {
|
|
31
29
|
isLoading: true;
|
|
32
30
|
errorHandling: import('../../../../types/sdkHooks').HookErrorHandling;
|
|
33
31
|
data?: undefined;
|
|
@@ -87,7 +85,7 @@ export declare function useCompensationForm({ employeeId, withStartDateField, jo
|
|
|
87
85
|
isRequired?: boolean;
|
|
88
86
|
hasRedactedValue?: boolean;
|
|
89
87
|
};
|
|
90
|
-
stateWcCovered: import('../../../../types/sdkHooks').FieldMetadataWithOptions<
|
|
88
|
+
stateWcCovered: import('../../../../types/sdkHooks').FieldMetadataWithOptions<boolean>;
|
|
91
89
|
stateWcClassCode: import('../../../../types/sdkHooks').FieldMetadataWithOptions<WARiskClassCode>;
|
|
92
90
|
};
|
|
93
91
|
hookFormInternals: {
|