@gusto/embedded-react-sdk 0.36.0 → 0.37.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/README.md +6 -0
- package/dist/UNSTABLE_Hooks.d.ts +1 -1
- package/dist/UNSTABLE_Hooks.js +50 -6
- package/dist/UNSTABLE_Hooks.js.map +1 -1
- package/dist/components/Base/Base.d.ts +8 -9
- package/dist/components/Base/Base.js +123 -102
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/createCompoundContext.js.map +1 -1
- package/dist/components/Base/index.d.ts +1 -1
- package/dist/components/Base/useBase.d.ts +3 -7
- package/dist/components/Base/useBase.js.map +1 -1
- package/dist/components/Base/useBaseSubmit.d.ts +3 -5
- package/dist/components/Base/useBaseSubmit.js +27 -50
- package/dist/components/Base/useBaseSubmit.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.js +42 -36
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.d.ts +2 -0
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js +22 -19
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.d.ts +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js +32 -30
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.d.ts +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js +36 -34
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.d.ts +5 -3
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js +52 -40
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
- package/dist/components/Common/Fields/FileInputField/FileInputField.js +24 -22
- package/dist/components/Common/Fields/FileInputField/FileInputField.js.map +1 -1
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js +24 -22
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.d.ts +2 -0
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js +31 -28
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +3 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js +30 -27
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.d.ts +3 -1
- package/dist/components/Common/Fields/SelectField/SelectField.js +31 -28
- package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
- package/dist/components/Common/Fields/SwitchField/SwitchField.d.ts +2 -0
- package/dist/components/Common/Fields/SwitchField/SwitchField.js +24 -21
- package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js +24 -22
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js.map +1 -1
- package/dist/components/Common/Fields/TextInputField/TextInputField.d.ts +2 -0
- package/dist/components/Common/Fields/TextInputField/TextInputField.js +26 -23
- package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useField.d.ts +3 -2
- package/dist/components/Common/Fields/hooks/useField.js +37 -33
- package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableList.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +10 -15
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -14
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +14 -19
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Button/Button.js +33 -29
- package/dist/components/Common/UI/Button/Button.js.map +1 -1
- package/dist/components/Common/UI/Button/Button.module.scss.js +5 -3
- package/dist/components/Common/UI/Button/Button.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Button/ButtonTypes.d.ts +4 -0
- package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +1 -1
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +94 -80
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -11
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -10
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -11
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +6 -9
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +8 -9
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -9
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +13 -14
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +8 -9
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +2 -5
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +10 -11
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -11
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -13
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +8 -9
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -13
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +12 -15
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -8
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -8
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -15
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +8 -9
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +8 -9
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +8 -11
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -19
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +6 -8
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -11
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +8 -11
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +11 -12
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +10 -14
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +8 -11
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +5 -7
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +15 -19
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +8 -9
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +6 -9
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +17 -19
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -10
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +8 -9
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +12 -15
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +9 -12
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +6 -10
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +8 -9
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +60 -63
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -13
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +11 -14
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +19 -21
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +10 -11
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -8
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +8 -9
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -9
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -8
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +8 -9
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +3 -7
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +6 -8
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +10 -11
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +29 -30
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -3
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +10 -14
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -5
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +12 -14
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +18 -21
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +3 -4
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +17 -19
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +6 -8
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +2 -4
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -5
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/Contractor/Profile/useContractorProfile.js +33 -32
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +20 -22
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +12 -14
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +27 -28
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +23 -25
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +61 -57
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +15 -16
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +15 -16
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +18 -19
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +6 -7
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -9
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +10 -14
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +8 -9
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +24 -26
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +9 -11
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +8 -9
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +6 -9
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +6 -9
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -7
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +5 -8
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +16 -17
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +8 -9
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +7 -10
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +10 -13
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js +42 -42
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +8 -9
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +14 -15
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +8 -11
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -8
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +9 -10
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -10
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +9 -10
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +10 -11
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +8 -11
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +14 -17
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.d.ts +3 -3
- package/dist/components/Employee/Profile/HomeAddress.js +45 -44
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +10 -13
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js +30 -29
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +8 -9
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +8 -11
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/StateTaxes.js +50 -50
- package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +8 -9
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +8 -11
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +10 -13
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.js +53 -53
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +8 -9
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.d.ts +11 -0
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +123 -0
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -0
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.d.ts +11 -0
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +89 -0
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.d.ts +2 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js +30 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js.map +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +24 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +76 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/index.d.ts +3 -0
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.d.ts +8 -0
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +177 -0
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.test.d.ts +1 -0
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.d.ts +9 -0
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js +86 -0
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -0
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.d.ts +20 -0
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +100 -0
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -0
- package/dist/components/Employee/Terminations/TerminationsData.d.ts +6 -0
- package/dist/components/Employee/Terminations/index.d.ts +8 -0
- package/dist/components/Employee/Terminations/types.d.ts +1 -0
- package/dist/components/Employee/index.d.ts +7 -0
- package/dist/components/Employee/index.js +34 -28
- package/dist/components/Employee/index.js.map +1 -1
- package/dist/components/Flow/Flow.js +20 -23
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +16 -18
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +18 -20
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +34 -35
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +41 -41
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +8 -10
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlow.d.ts +2 -0
- package/dist/components/Payroll/Dismissal/DismissalFlow.js +32 -0
- package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -0
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.d.ts +16 -0
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +52 -0
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +7 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +73 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.d.ts +9 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +50 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -0
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/index.d.ts +3 -0
- package/dist/components/Payroll/Dismissal/dismissalStateMachine.d.ts +6 -0
- package/dist/components/Payroll/Dismissal/dismissalStateMachine.js +51 -0
- package/dist/components/Payroll/Dismissal/dismissalStateMachine.js.map +1 -0
- package/dist/components/Payroll/Dismissal/dismissalStateMachine.test.d.ts +1 -0
- package/dist/components/Payroll/Dismissal/index.d.ts +3 -0
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.d.ts +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +89 -76
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.module.scss.js +6 -6
- package/dist/components/Payroll/GrossUpModal/GrossUpModalTypes.d.ts +0 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js +25 -18
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +5 -0
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +31 -24
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +78 -75
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.d.ts +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +75 -68
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.module.scss.js +8 -0
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.module.scss.js.map +1 -0
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationTypes.d.ts +0 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +18 -26
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.module.scss.js +4 -4
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +4 -4
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +1 -0
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +1 -0
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -9
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +12 -14
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +11 -14
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +174 -148
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -3
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +71 -71
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.d.ts +3 -2
- package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js +8 -8
- package/dist/components/Payroll/PayrollConfiguration/grossUpHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +5 -3
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +76 -70
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +47 -42
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +5 -3
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +256 -219
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +19 -21
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js +19 -0
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js.map +1 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +3 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js +21 -0
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -0
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +95 -64
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +53 -47
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +38 -40
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +25 -23
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +55 -43
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +2 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +110 -95
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +12 -8
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +15 -15
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +59 -59
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +7 -10
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +2 -4
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +11 -13
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -5
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlow.d.ts +2 -0
- package/dist/components/Payroll/Transition/TransitionFlow.js +38 -0
- package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -0
- package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +19 -0
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js +54 -0
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -0
- package/dist/components/Payroll/Transition/index.d.ts +3 -0
- package/dist/components/Payroll/Transition/transitionStateMachine.d.ts +6 -0
- package/dist/components/Payroll/Transition/transitionStateMachine.js +58 -0
- package/dist/components/Payroll/Transition/transitionStateMachine.js.map +1 -0
- package/dist/components/Payroll/Transition/transitionStateMachine.test.d.ts +1 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.d.ts +2 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +92 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.d.ts +2 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +109 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.module.scss.js +8 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.module.scss.js.map +1 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +28 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js +21 -0
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -0
- package/dist/components/Payroll/TransitionCreation/index.d.ts +3 -0
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.d.ts +8 -0
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +83 -0
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -0
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.d.ts +16 -0
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js +100 -0
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -0
- package/dist/components/Payroll/TransitionPayrollAlert/index.d.ts +2 -0
- package/dist/components/Payroll/helpers.d.ts +6 -1
- package/dist/components/Payroll/helpers.js +100 -84
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +6 -0
- package/dist/components/Payroll/index.js +32 -26
- package/dist/components/Payroll/index.js.map +1 -1
- package/dist/components/Payroll/payrollTypes.d.ts +21 -0
- package/dist/components/Payroll/payrollTypes.js +27 -0
- package/dist/components/Payroll/payrollTypes.js.map +1 -0
- package/dist/components/Payroll/usePreparedPayrollData.js +6 -8
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/collectErrors.d.ts +6 -0
- package/dist/components/UNSTABLE_Hooks/collectErrors.js +9 -0
- package/dist/components/UNSTABLE_Hooks/collectErrors.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.d.ts +8 -0
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js +10 -0
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.d.ts +10 -0
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js +13 -0
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.d.ts +23 -0
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js +24 -0
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.d.ts +26 -0
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js +24 -0
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.d.ts +53 -0
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js +34 -0
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/composeSubmitHandler.test.d.ts +1 -0
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.d.ts +3 -0
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js +14 -0
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.test.d.ts +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.d.ts +11 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +34 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.d.ts +11 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js +34 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.d.ts +14 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +40 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.d.ts +12 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +40 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.d.ts +12 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js +40 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.d.ts +11 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +34 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.d.ts +13 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +38 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/index.d.ts +15 -0
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.d.ts +2 -0
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js +8 -0
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.d.ts +18 -0
- package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.js +10 -0
- package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/getFormSubmissionValues.test.d.ts +1 -0
- package/dist/components/UNSTABLE_Hooks/form/index.d.ts +16 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.d.ts +4 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js +13 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.d.ts +6 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js +14 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/types.d.ts +27 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.d.ts +2 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js +17 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.d.ts +4 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js +8 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.d.ts +23 -0
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js +11 -0
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/withOptions.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/form/withOptions.js +7 -0
- package/dist/components/UNSTABLE_Hooks/form/withOptions.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +149 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.d.ts +97 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js +121 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.d.ts +34 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js +50 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/index.d.ts +7 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +104 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js +259 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +112 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +39 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js +45 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.d.ts +23 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js +46 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/index.d.ts +7 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +77 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js +153 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +69 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.d.ts +10 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js +14 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/index.d.ts +7 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.d.ts +68 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js +129 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.d.ts +25 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js +24 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/index.d.ts +9 -0
- package/dist/components/UNSTABLE_Hooks/types.d.ts +49 -0
- package/dist/components/UNSTABLE_Hooks/useErrorHandling.d.ts +9 -0
- package/dist/components/UNSTABLE_Hooks/useErrorHandling.js +12 -0
- package/dist/components/UNSTABLE_Hooks/useErrorHandling.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/useErrorHandling.test.d.ts +1 -0
- package/dist/contexts/ApiProvider/ApiProvider.js +11 -11
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +43 -50
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.d.ts +10 -2
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
- package/dist/contexts/ObservabilityProvider/index.d.ts +1 -1
- package/dist/contexts/ObservabilityProvider/sanitization.d.ts +0 -14
- package/dist/contexts/ObservabilityProvider/sanitization.js +51 -51
- package/dist/contexts/ObservabilityProvider/sanitization.js.map +1 -1
- package/dist/contexts/ObservabilityProvider/useSanitizedObservability.d.ts +0 -3
- package/dist/contexts/ObservabilityProvider/useSanitizedObservability.js.map +1 -1
- package/dist/contexts/ThemeProvider/useTheme.js.map +1 -1
- package/dist/helpers/requiredIf.d.ts +13 -0
- package/dist/helpers/requiredIf.js +8 -0
- package/dist/helpers/requiredIf.js.map +1 -0
- package/dist/i18n/I18n.js +7 -7
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +26 -0
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +24 -0
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +32 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +52 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffRequests.json.js +21 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffRequests.json.js.map +1 -0
- package/dist/i18n/en/Employee.Terminations.TerminateEmployee.json.js +18 -0
- package/dist/i18n/en/Employee.Terminations.TerminateEmployee.json.js.map +1 -0
- package/dist/i18n/en/Employee.Terminations.TerminationFlow.json.js +12 -0
- package/dist/i18n/en/Employee.Terminations.TerminationFlow.json.js.map +1 -0
- package/dist/i18n/en/Employee.Terminations.TerminationSummary.json.js +20 -0
- package/dist/i18n/en/Employee.Terminations.TerminationSummary.json.js.map +1 -0
- package/dist/i18n/en/Payroll.Dismissal.json.js +22 -0
- package/dist/i18n/en/Payroll.Dismissal.json.js.map +1 -0
- package/dist/i18n/en/Payroll.GrossUpModal.json.js +16 -14
- package/dist/i18n/en/Payroll.GrossUpModal.json.js.map +1 -1
- package/dist/i18n/en/Payroll.OffCycleCreation.json.js +15 -11
- package/dist/i18n/en/Payroll.OffCycleCreation.json.js.map +1 -1
- package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +1 -1
- package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +31 -25
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollList.json.js +20 -18
- package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
- package/dist/i18n/en/Payroll.Transition.json.js +8 -0
- package/dist/i18n/en/Payroll.Transition.json.js.map +1 -0
- package/dist/i18n/en/Payroll.TransitionCreation.json.js +26 -0
- package/dist/i18n/en/Payroll.TransitionCreation.json.js.map +1 -0
- package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js +18 -0
- package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js.map +1 -0
- package/dist/i18n/en/UNSTABLE.CompensationForm.json.js +58 -0
- package/dist/i18n/en/UNSTABLE.CompensationForm.json.js.map +1 -0
- package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js +34 -0
- package/dist/i18n/en/UNSTABLE.EmployeeDetailsForm.json.js.map +1 -0
- package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js +24 -0
- package/dist/i18n/en/UNSTABLE.WorkAddressForm.json.js.map +1 -0
- package/dist/i18n/en/common.json.d.ts +2 -1
- package/dist/i18n/en/common.json.js +9 -9
- package/dist/index.d.ts +3 -2
- package/dist/index.js +14 -13
- package/dist/models/WA_RISK_CODES.d.ts +5 -2866
- package/dist/models/WA_RISK_CODES.js.map +1 -1
- package/dist/shared/constants.d.ts +32 -0
- package/dist/shared/constants.js +83 -65
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +707 -1
- package/dist/types/observability.d.ts +31 -65
- package/dist/types/sdkError.d.ts +97 -0
- package/dist/types/sdkError.js +95 -0
- package/dist/types/sdkError.js.map +1 -0
- package/dist/types/sdkError.test.d.ts +1 -0
- package/docs/reference/endpoint-inventory.json +212 -14
- package/package.json +17 -17
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.d.ts +0 -6
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js +0 -70
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js.map +0 -1
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +0 -7
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js +0 -6
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +0 -1
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.d.ts +0 -9
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js +0 -40
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js.map +0 -1
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/index.d.ts +0 -5
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.d.ts +0 -2
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js +0 -12
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js.map +0 -1
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/index.d.ts +0 -2
- package/dist/contexts/ObservabilityProvider/observabilityUtils.d.ts +0 -5
- package/dist/contexts/ObservabilityProvider/observabilityUtils.js +0 -45
- package/dist/contexts/ObservabilityProvider/observabilityUtils.js.map +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./types/i18next.d.ts"
|
|
2
|
+
export type { FieldMetadata, FieldMetadataWithOptions, FieldsMetadata, ValidationMessages, BaseFieldProps, HookFieldProps, } from './types';
|
|
3
|
+
export { withOptions } from './withOptions';
|
|
4
|
+
export type { FormFieldsMetadataContextValue } from './FormFieldsMetadataContext';
|
|
5
|
+
export { FormFieldsMetadataProvider } from './FormFieldsMetadataProvider';
|
|
6
|
+
export { SDKFormProvider } from './SDKFormProvider';
|
|
7
|
+
export { useFieldsMetadata } from './useFieldsMetadata';
|
|
8
|
+
export { useFieldErrorMessage } from './useFieldErrorMessage';
|
|
9
|
+
export { resolveFieldError } from './resolveFieldError';
|
|
10
|
+
export { useHookFieldResolution } from './useHookFieldResolution';
|
|
11
|
+
export { deriveFieldsMetadata } from './deriveFieldsMetadata';
|
|
12
|
+
export { composeFormSchema } from './composeFormSchema';
|
|
13
|
+
export { resolveRequiredFields, filterRequiredFields, type RequiredFields, } from './resolveRequiredFields';
|
|
14
|
+
export { composeSubmitHandler } from './composeSubmitHandler';
|
|
15
|
+
export { createGetFormSubmissionValues } from './getFormSubmissionValues';
|
|
16
|
+
export { TextInputHookField, type TextInputHookFieldProps, SelectHookField, type SelectHookFieldProps, CheckboxHookField, type CheckboxHookFieldProps, NumberInputHookField, type NumberInputHookFieldProps, DatePickerHookField, type DatePickerHookFieldProps, RadioGroupHookField, type RadioGroupHookFieldProps, type TextInputProps, type SelectProps, type SelectOption, type CheckboxProps, type NumberInputProps, type DatePickerProps, type RadioGroupProps, type RadioGroupOption, SwitchHookField, type SwitchHookFieldProps, type SwitchProps, } from './fields';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { FieldErrors } from 'react-hook-form';
|
|
2
|
+
import { ValidationMessages } from './types';
|
|
3
|
+
import { SDKError } from '../../../types/sdkError';
|
|
4
|
+
export declare function resolveFieldError<TErrorCode extends string>(fieldName: string, formErrors: FieldErrors, sdkErrors: SDKError[], validationMessages?: ValidationMessages<TErrorCode>): string | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function i(e, f, n, o) {
|
|
2
|
+
const r = f[e]?.message;
|
|
3
|
+
if (r && o?.[r])
|
|
4
|
+
return o[r];
|
|
5
|
+
for (const t of n) {
|
|
6
|
+
const s = t.fieldErrors.find((d) => d.field === e);
|
|
7
|
+
if (s?.message) return s.message;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
i as resolveFieldError
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=resolveFieldError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveFieldError.js","sources":["../../../../src/components/UNSTABLE_Hooks/form/resolveFieldError.ts"],"sourcesContent":["import type { FieldErrors } from 'react-hook-form'\nimport type { ValidationMessages } from './types'\nimport type { SDKError } from '@/types/sdkError'\n\nexport function resolveFieldError<TErrorCode extends string>(\n fieldName: string,\n formErrors: FieldErrors,\n sdkErrors: SDKError[],\n validationMessages?: ValidationMessages<TErrorCode>,\n): string | undefined {\n const errorCode = formErrors[fieldName]?.message as TErrorCode | undefined\n if (errorCode && validationMessages?.[errorCode]) {\n return validationMessages[errorCode]\n }\n\n for (const sdkError of sdkErrors) {\n const fieldError = sdkError.fieldErrors.find(fe => fe.field === fieldName)\n if (fieldError?.message) return fieldError.message\n }\n\n return undefined\n}\n"],"names":["resolveFieldError","fieldName","formErrors","sdkErrors","validationMessages","errorCode","sdkError","fieldError","fe"],"mappings":"AAIO,SAASA,EACdC,GACAC,GACAC,GACAC,GACoB;AACpB,QAAMC,IAAYH,EAAWD,CAAS,GAAG;AACzC,MAAII,KAAaD,IAAqBC,CAAS;AAC7C,WAAOD,EAAmBC,CAAS;AAGrC,aAAWC,KAAYH,GAAW;AAChC,UAAMI,IAAaD,EAAS,YAAY,KAAK,CAAAE,MAAMA,EAAG,UAAUP,CAAS;AACzE,QAAIM,GAAY,QAAS,QAAOA,EAAW;AAAA,EAC7C;AAGF;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type RequiredFields<T> = T[] | {
|
|
2
|
+
create?: T[];
|
|
3
|
+
update?: T[];
|
|
4
|
+
};
|
|
5
|
+
export declare function resolveRequiredFields<T>(requiredFields: RequiredFields<T> | undefined, mode: 'create' | 'update'): T[];
|
|
6
|
+
export declare function filterRequiredFields<T>(requiredFields: RequiredFields<T> | undefined, exclude: T): RequiredFields<T> | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
function f(t, a) {
|
|
2
|
+
return t ? Array.isArray(t) ? t : (a === "create" ? t.create : t.update) ?? [] : [];
|
|
3
|
+
}
|
|
4
|
+
function n(t, a) {
|
|
5
|
+
return t && (Array.isArray(t) ? t.filter((r) => r !== a) : {
|
|
6
|
+
...t.create && { create: t.create.filter((r) => r !== a) },
|
|
7
|
+
...t.update && { update: t.update.filter((r) => r !== a) }
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
n as filterRequiredFields,
|
|
12
|
+
f as resolveRequiredFields
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=resolveRequiredFields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolveRequiredFields.js","sources":["../../../../src/components/UNSTABLE_Hooks/form/resolveRequiredFields.ts"],"sourcesContent":["export type RequiredFields<T> = T[] | { create?: T[]; update?: T[] }\n\nexport function resolveRequiredFields<T>(\n requiredFields: RequiredFields<T> | undefined,\n mode: 'create' | 'update',\n): T[] {\n if (!requiredFields) return []\n if (Array.isArray(requiredFields)) return requiredFields\n return (mode === 'create' ? requiredFields.create : requiredFields.update) ?? []\n}\n\nexport function filterRequiredFields<T>(\n requiredFields: RequiredFields<T> | undefined,\n exclude: T,\n): RequiredFields<T> | undefined {\n if (!requiredFields) return requiredFields\n if (Array.isArray(requiredFields)) return requiredFields.filter(f => f !== exclude)\n return {\n ...(requiredFields.create && { create: requiredFields.create.filter(f => f !== exclude) }),\n ...(requiredFields.update && { update: requiredFields.update.filter(f => f !== exclude) }),\n }\n}\n"],"names":["resolveRequiredFields","requiredFields","mode","filterRequiredFields","exclude","f"],"mappings":"AAEO,SAASA,EACdC,GACAC,GACK;AACL,SAAKD,IACD,MAAM,QAAQA,CAAc,IAAUA,KAClCC,MAAS,WAAWD,EAAe,SAASA,EAAe,WAAW,CAAA,IAFlD,CAAA;AAG9B;AAEO,SAASE,EACdF,GACAG,GAC+B;AAC/B,SAAKH,MACD,MAAM,QAAQA,CAAc,IAAUA,EAAe,OAAO,CAAAI,MAAKA,MAAMD,CAAO,IAC3E;AAAA,IACL,GAAIH,EAAe,UAAU,EAAE,QAAQA,EAAe,OAAO,OAAO,CAAAI,MAAKA,MAAMD,CAAO,EAAA;AAAA,IACtF,GAAIH,EAAe,UAAU,EAAE,QAAQA,EAAe,OAAO,OAAO,CAAAI,MAAKA,MAAMD,CAAO,EAAA;AAAA,EAAE;AAE5F;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface FieldMetadata {
|
|
3
|
+
name: string;
|
|
4
|
+
isRequired?: boolean;
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
hasRedactedValue?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface FieldMetadataWithOptions<TEntry = unknown> extends FieldMetadata {
|
|
9
|
+
options: Array<{
|
|
10
|
+
label: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}>;
|
|
13
|
+
entries?: TEntry[];
|
|
14
|
+
}
|
|
15
|
+
export type FieldsMetadata = {
|
|
16
|
+
[key: string]: FieldMetadata | FieldMetadataWithOptions;
|
|
17
|
+
};
|
|
18
|
+
/** Maps every error code a schema field can produce to a partner-supplied display string. */
|
|
19
|
+
export type ValidationMessages<TErrorCode extends string> = Record<TErrorCode, string>;
|
|
20
|
+
export interface BaseFieldProps {
|
|
21
|
+
label: string;
|
|
22
|
+
description?: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
/** Strips `name` from a HookField props type for domain-specific field components that bind `name` internally. */
|
|
25
|
+
export type HookFieldProps<TProps extends {
|
|
26
|
+
name: string;
|
|
27
|
+
}> = Omit<TProps, 'name'>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useFormContext as d } from "react-hook-form";
|
|
2
|
+
import { useFormFieldsMetadataContext as i } from "./FormFieldsMetadataContext.js";
|
|
3
|
+
function E(o, e) {
|
|
4
|
+
const {
|
|
5
|
+
formState: { errors: s }
|
|
6
|
+
} = d(), n = i()?.errors ?? [], r = s[o]?.message;
|
|
7
|
+
if (r && e?.[r])
|
|
8
|
+
return e[r];
|
|
9
|
+
for (const f of n) {
|
|
10
|
+
const t = f.fieldErrors.find((c) => c.field === o);
|
|
11
|
+
if (t?.message) return t.message;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
E as useFieldErrorMessage
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=useFieldErrorMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFieldErrorMessage.js","sources":["../../../../src/components/UNSTABLE_Hooks/form/useFieldErrorMessage.ts"],"sourcesContent":["import { useFormContext } from 'react-hook-form'\nimport { useFormFieldsMetadataContext } from './FormFieldsMetadataContext'\nimport type { ValidationMessages } from './types'\n\nexport function useFieldErrorMessage<TErrorCode extends string>(\n fieldName: string,\n validationMessages?: ValidationMessages<TErrorCode>,\n): string | undefined {\n const {\n formState: { errors },\n } = useFormContext()\n const context = useFormFieldsMetadataContext()\n const sdkErrors = context?.errors ?? []\n\n const errorCode = errors[fieldName]?.message as TErrorCode | undefined\n if (errorCode && validationMessages?.[errorCode]) {\n return validationMessages[errorCode]\n }\n\n for (const sdkError of sdkErrors) {\n const fieldError = sdkError.fieldErrors.find(fe => fe.field === fieldName)\n if (fieldError?.message) return fieldError.message\n }\n\n return undefined\n}\n"],"names":["useFieldErrorMessage","fieldName","validationMessages","errors","useFormContext","sdkErrors","useFormFieldsMetadataContext","errorCode","sdkError","fieldError","fe"],"mappings":";;AAIO,SAASA,EACdC,GACAC,GACoB;AACpB,QAAM;AAAA,IACJ,WAAW,EAAE,QAAAC,EAAA;AAAA,EAAO,IAClBC,EAAA,GAEEC,IADUC,EAAA,GACW,UAAU,CAAA,GAE/BC,IAAYJ,EAAOF,CAAS,GAAG;AACrC,MAAIM,KAAaL,IAAqBK,CAAS;AAC7C,WAAOL,EAAmBK,CAAS;AAGrC,aAAWC,KAAYH,GAAW;AAChC,UAAMI,IAAaD,EAAS,YAAY,KAAK,CAAAE,MAAMA,EAAG,UAAUT,CAAS;AACzE,QAAIQ,GAAY,QAAS,QAAOA,EAAW;AAAA,EAC7C;AAGF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFieldsMetadata.js","sources":["../../../../src/components/UNSTABLE_Hooks/form/useFieldsMetadata.ts"],"sourcesContent":["import type { FieldMetadata, FieldMetadataWithOptions, FieldsMetadata } from './types'\nimport { useFormFieldsMetadataContext } from './FormFieldsMetadataContext'\n\nexport function useFieldsMetadata<\n TFieldsMetadata extends {\n [K in keyof TFieldsMetadata]: FieldMetadata | FieldMetadataWithOptions\n } = FieldsMetadata,\n>(): TFieldsMetadata {\n const context = useFormFieldsMetadataContext()\n return (context?.metadata ?? {}) as TFieldsMetadata\n}\n"],"names":["useFieldsMetadata","useFormFieldsMetadataContext"],"mappings":";AAGO,SAASA,IAIK;AAEnB,SADgBC,EAAA,GACC,YAAY,CAAA;AAC/B;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Control } from 'react-hook-form';
|
|
2
|
+
import { BaseFormHookReady } from '../types';
|
|
3
|
+
import { FieldsMetadata, ValidationMessages } from './types';
|
|
4
|
+
interface HookFieldResolution {
|
|
5
|
+
metadata: FieldsMetadata;
|
|
6
|
+
control: Control | undefined;
|
|
7
|
+
errorMessage: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Resolves all data a HookField needs from either a `formHookResult` prop or
|
|
11
|
+
* the standard context providers (FormProvider + FormFieldsMetadataProvider).
|
|
12
|
+
*
|
|
13
|
+
* When `formHookResult` is provided, metadata/errors/control are read from
|
|
14
|
+
* the prop — no context providers required. When absent, falls back to the
|
|
15
|
+
* existing context-based path.
|
|
16
|
+
*
|
|
17
|
+
* Uses `useFormState` to establish a proper RHF subscription for error updates.
|
|
18
|
+
* When `control` is provided (prop path), useFormState subscribes directly via
|
|
19
|
+
* the control object. When absent (context path), it falls back to useFormContext
|
|
20
|
+
* internally. The `name` parameter scopes the subscription to this field.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useHookFieldResolution<TErrorCode extends string>(name: string, formHookResult: BaseFormHookReady | undefined, validationMessages?: ValidationMessages<TErrorCode>): HookFieldResolution;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useFormState as i } from "react-hook-form";
|
|
2
|
+
import { useFormFieldsMetadataContext as c } from "./FormFieldsMetadataContext.js";
|
|
3
|
+
import { resolveFieldError as l } from "./resolveFieldError.js";
|
|
4
|
+
function M(o, r, s) {
|
|
5
|
+
const t = c(), a = r?.form.fieldsMetadata ?? t?.metadata ?? {}, e = r?.form.hookFormInternals.formMethods.control, { errors: n } = i({ control: e, name: o }), d = r ? r.errorHandling.errors : t?.errors ?? [], m = l(o, n, d, s);
|
|
6
|
+
return { metadata: a, control: e, errorMessage: m };
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
M as useHookFieldResolution
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=useHookFieldResolution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHookFieldResolution.js","sources":["../../../../src/components/UNSTABLE_Hooks/form/useHookFieldResolution.ts"],"sourcesContent":["import type { Control } from 'react-hook-form'\nimport { useFormState } from 'react-hook-form'\nimport type { BaseFormHookReady } from '../types'\nimport { useFormFieldsMetadataContext } from './FormFieldsMetadataContext'\nimport { resolveFieldError } from './resolveFieldError'\nimport type { FieldsMetadata, ValidationMessages } from './types'\n\ninterface HookFieldResolution {\n metadata: FieldsMetadata\n control: Control | undefined\n errorMessage: string | undefined\n}\n\n/**\n * Resolves all data a HookField needs from either a `formHookResult` prop or\n * the standard context providers (FormProvider + FormFieldsMetadataProvider).\n *\n * When `formHookResult` is provided, metadata/errors/control are read from\n * the prop — no context providers required. When absent, falls back to the\n * existing context-based path.\n *\n * Uses `useFormState` to establish a proper RHF subscription for error updates.\n * When `control` is provided (prop path), useFormState subscribes directly via\n * the control object. When absent (context path), it falls back to useFormContext\n * internally. The `name` parameter scopes the subscription to this field.\n */\nexport function useHookFieldResolution<TErrorCode extends string>(\n name: string,\n formHookResult: BaseFormHookReady | undefined,\n validationMessages?: ValidationMessages<TErrorCode>,\n): HookFieldResolution {\n const metadataContext = useFormFieldsMetadataContext()\n\n const metadata = formHookResult?.form.fieldsMetadata ?? metadataContext?.metadata ?? {}\n\n const control = formHookResult?.form.hookFormInternals.formMethods.control\n\n const { errors: formErrors } = useFormState({ control, name })\n\n const sdkErrors = formHookResult\n ? formHookResult.errorHandling.errors\n : (metadataContext?.errors ?? [])\n\n const errorMessage = resolveFieldError(name, formErrors, sdkErrors, validationMessages)\n\n return { metadata, control, errorMessage }\n}\n"],"names":["useHookFieldResolution","name","formHookResult","validationMessages","metadataContext","useFormFieldsMetadataContext","metadata","control","formErrors","useFormState","sdkErrors","errorMessage","resolveFieldError"],"mappings":";;;AA0BO,SAASA,EACdC,GACAC,GACAC,GACqB;AACrB,QAAMC,IAAkBC,EAAA,GAElBC,IAAWJ,GAAgB,KAAK,kBAAkBE,GAAiB,YAAY,CAAA,GAE/EG,IAAUL,GAAgB,KAAK,kBAAkB,YAAY,SAE7D,EAAE,QAAQM,EAAA,IAAeC,EAAa,EAAE,SAAAF,GAAS,MAAAN,GAAM,GAEvDS,IAAYR,IACdA,EAAe,cAAc,SAC5BE,GAAiB,UAAU,CAAA,GAE1BO,IAAeC,EAAkBX,GAAMO,GAAYE,GAAWP,CAAkB;AAEtF,SAAO,EAAE,UAAAG,GAAU,SAAAC,GAAS,cAAAI,EAAA;AAC9B;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withOptions.js","sources":["../../../../src/components/UNSTABLE_Hooks/form/withOptions.ts"],"sourcesContent":["import type { FieldMetadata, FieldMetadataWithOptions } from './types'\n\nexport function withOptions<TEntry = unknown>(\n base: FieldMetadata,\n options: Array<{ label: string; value: string }>,\n entries?: TEntry[],\n): FieldMetadataWithOptions<TEntry> {\n if (entries !== undefined) {\n return { ...base, options, entries }\n }\n return { ...base, options }\n}\n"],"names":["withOptions","base","options","entries"],"mappings":"AAEO,SAASA,EACdC,GACAC,GACAC,GACkC;AAClC,SAAIA,MAAY,SACP,EAAE,GAAGF,GAAM,SAAAC,GAAS,SAAAC,EAAA,IAEtB,EAAE,GAAGF,GAAM,SAAAC,EAAA;AACpB;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UseCompensationFormProps } from './useCompensationForm';
|
|
2
|
+
import { BaseComponentInterface } from '../../../Base';
|
|
3
|
+
export interface CompensationFormProps extends UseCompensationFormProps, Omit<BaseComponentInterface, 'defaultValues'> {
|
|
4
|
+
}
|
|
5
|
+
export declare function CompensationForm({ FallbackComponent, ...props }: CompensationFormProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { jsx as t, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as R, Trans as C } from "react-i18next";
|
|
3
|
+
import { SDKFormProvider as D } from "../../form/SDKFormProvider.js";
|
|
4
|
+
import { useCompensationForm as f } from "./useCompensationForm.js";
|
|
5
|
+
import { useComponentContext as b } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
|
+
import { BaseBoundaries as L, BaseLayout as d } from "../../../Base/Base.js";
|
|
7
|
+
import "../../../Base/useBase.js";
|
|
8
|
+
import { Form as M } from "../../../Common/Form/Form.js";
|
|
9
|
+
import { ActionsLayout as U } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
10
|
+
import { FLSA_OVERTIME_SALARY_LIMIT as T, componentEvents as r } from "../../../../shared/constants.js";
|
|
11
|
+
import { useI18n as I, useComponentDictionary as S } from "../../../../i18n/I18n.js";
|
|
12
|
+
import g from "../../../../hooks/useNumberFormatter.js";
|
|
13
|
+
function W({ onEvent: n, dictionary: l, ...E }) {
|
|
14
|
+
I("UNSTABLE.CompensationForm"), S("UNSTABLE.CompensationForm", l);
|
|
15
|
+
const { t: e } = R("UNSTABLE.CompensationForm"), m = b(), c = g("currency"), a = f(E);
|
|
16
|
+
if (a.isLoading)
|
|
17
|
+
return /* @__PURE__ */ t(d, { isLoading: !0, error: a.errorHandling.errors });
|
|
18
|
+
const { Fields: i } = a.form, p = async () => {
|
|
19
|
+
const o = await a.actions.onSubmit({
|
|
20
|
+
onJobCreated: (s) => {
|
|
21
|
+
n(r.EMPLOYEE_JOB_CREATED, s);
|
|
22
|
+
},
|
|
23
|
+
onJobUpdated: (s) => {
|
|
24
|
+
n(r.EMPLOYEE_JOB_UPDATED, s);
|
|
25
|
+
},
|
|
26
|
+
onCompensationUpdated: (s) => {
|
|
27
|
+
n(r.EMPLOYEE_COMPENSATION_UPDATED, s);
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
o && n(r.EMPLOYEE_COMPENSATION_DONE, o.data);
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ t(d, { error: a.errorHandling.errors, children: /* @__PURE__ */ t(D, { formHookResult: a, children: /* @__PURE__ */ u(
|
|
33
|
+
M,
|
|
34
|
+
{
|
|
35
|
+
onSubmit: (o) => {
|
|
36
|
+
o.preventDefault(), p();
|
|
37
|
+
},
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ t(m.Heading, { as: "h2", children: a.status.mode === "create" ? e("addTitle") : e("editTitle") }),
|
|
40
|
+
i.StartDate && /* @__PURE__ */ t(
|
|
41
|
+
i.StartDate,
|
|
42
|
+
{
|
|
43
|
+
label: e("startDateLabel"),
|
|
44
|
+
validationMessages: {
|
|
45
|
+
REQUIRED: e("fieldValidations.startDate.REQUIRED")
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ t(
|
|
50
|
+
i.JobTitle,
|
|
51
|
+
{
|
|
52
|
+
label: e("jobTitle"),
|
|
53
|
+
validationMessages: {
|
|
54
|
+
REQUIRED: e("fieldValidations.jobTitle.REQUIRED")
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
i.FlsaStatus && /* @__PURE__ */ t(
|
|
59
|
+
i.FlsaStatus,
|
|
60
|
+
{
|
|
61
|
+
label: e("employeeClassification"),
|
|
62
|
+
description: /* @__PURE__ */ t(
|
|
63
|
+
C,
|
|
64
|
+
{
|
|
65
|
+
t: e,
|
|
66
|
+
i18nKey: "classificationLink",
|
|
67
|
+
components: {
|
|
68
|
+
ClassificationLink: /* @__PURE__ */ t(m.Link, {})
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
),
|
|
72
|
+
getOptionLabel: (o) => e(`flsaStatusLabels.${o}`, o),
|
|
73
|
+
validationMessages: {
|
|
74
|
+
REQUIRED: e("fieldValidations.flsaStatus.REQUIRED")
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
/* @__PURE__ */ t(
|
|
79
|
+
i.Rate,
|
|
80
|
+
{
|
|
81
|
+
label: e("amount"),
|
|
82
|
+
validationMessages: {
|
|
83
|
+
REQUIRED: e("fieldValidations.rate.REQUIRED"),
|
|
84
|
+
RATE_MINIMUM: e("fieldValidations.rate.RATE_MINIMUM"),
|
|
85
|
+
RATE_EXEMPT_THRESHOLD: e("fieldValidations.rate.RATE_EXEMPT_THRESHOLD", {
|
|
86
|
+
limit: c(T)
|
|
87
|
+
})
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
),
|
|
91
|
+
/* @__PURE__ */ t(
|
|
92
|
+
i.PaymentUnit,
|
|
93
|
+
{
|
|
94
|
+
label: e("paymentUnitLabel"),
|
|
95
|
+
description: e("paymentUnitDescription"),
|
|
96
|
+
getOptionLabel: (o) => e(`paymentUnitOptions.${o}`, o),
|
|
97
|
+
validationMessages: {
|
|
98
|
+
REQUIRED: e("fieldValidations.paymentUnit.REQUIRED")
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
),
|
|
102
|
+
i.AdjustForMinimumWage && /* @__PURE__ */ t(
|
|
103
|
+
i.AdjustForMinimumWage,
|
|
104
|
+
{
|
|
105
|
+
label: e("adjustForMinimumWage"),
|
|
106
|
+
description: e("adjustForMinimumWageDescription")
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
i.MinimumWageId && /* @__PURE__ */ t(
|
|
110
|
+
i.MinimumWageId,
|
|
111
|
+
{
|
|
112
|
+
label: e("minimumWageLabel"),
|
|
113
|
+
description: e("minimumWageDescription"),
|
|
114
|
+
validationMessages: {
|
|
115
|
+
REQUIRED: e("fieldValidations.minimumWageId.REQUIRED")
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
i.TwoPercentShareholder && /* @__PURE__ */ t(i.TwoPercentShareholder, { label: e("twoPercentStakeholderLabel") }),
|
|
120
|
+
i.StateWcCovered && /* @__PURE__ */ t(
|
|
121
|
+
i.StateWcCovered,
|
|
122
|
+
{
|
|
123
|
+
label: e("stateWcCoveredLabel"),
|
|
124
|
+
description: e("stateWcCoveredDescription"),
|
|
125
|
+
getOptionLabel: (o) => e(o === "yes" ? "stateWcCoveredYes" : "stateWcCoveredNo")
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
i.StateWcClassCode && /* @__PURE__ */ t(
|
|
129
|
+
i.StateWcClassCode,
|
|
130
|
+
{
|
|
131
|
+
label: e("stateWcClassCodeLabel"),
|
|
132
|
+
description: e("stateWcClassCodeDescription"),
|
|
133
|
+
validationMessages: {
|
|
134
|
+
REQUIRED: e("fieldValidations.stateWcClassCode.REQUIRED")
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
),
|
|
138
|
+
/* @__PURE__ */ t(U, { children: /* @__PURE__ */ t(m.Button, { type: "submit", isLoading: a.status.isPending, children: e("saveNewJobCta") }) })
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
) }) });
|
|
142
|
+
}
|
|
143
|
+
function j({ FallbackComponent: n, ...l }) {
|
|
144
|
+
return /* @__PURE__ */ t(L, { componentName: "UNSTABLE.CompensationForm", FallbackComponent: n, children: /* @__PURE__ */ t(W, { ...l }) });
|
|
145
|
+
}
|
|
146
|
+
export {
|
|
147
|
+
j as CompensationForm
|
|
148
|
+
};
|
|
149
|
+
//# sourceMappingURL=CompensationForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CompensationForm.js","sources":["../../../../../src/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { SDKFormProvider } from '../../form/SDKFormProvider'\nimport { useCompensationForm } from './useCompensationForm'\nimport type { UseCompensationFormProps } from './useCompensationForm'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { BaseBoundaries, BaseLayout, type BaseComponentInterface } from '@/components/Base'\nimport { Form } from '@/components/Common/Form'\nimport { ActionsLayout } from '@/components/Common'\nimport { componentEvents, FLSA_OVERTIME_SALARY_LIMIT } from '@/shared/constants'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\n\nexport interface CompensationFormProps\n extends UseCompensationFormProps, Omit<BaseComponentInterface, 'defaultValues'> {}\n\nfunction CompensationFormRoot({ onEvent, dictionary, ...hookProps }: CompensationFormProps) {\n useI18n('UNSTABLE.CompensationForm')\n useComponentDictionary('UNSTABLE.CompensationForm', dictionary)\n const { t } = useTranslation('UNSTABLE.CompensationForm')\n const Components = useComponentContext()\n const formatCurrency = useNumberFormatter('currency')\n const compensation = useCompensationForm(hookProps)\n\n if (compensation.isLoading) {\n return <BaseLayout isLoading error={compensation.errorHandling.errors} />\n }\n\n const { Fields } = compensation.form\n\n const handleSubmit = async () => {\n const result = await compensation.actions.onSubmit({\n onJobCreated: job => {\n onEvent(componentEvents.EMPLOYEE_JOB_CREATED, job)\n },\n onJobUpdated: job => {\n onEvent(componentEvents.EMPLOYEE_JOB_UPDATED, job)\n },\n onCompensationUpdated: comp => {\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_UPDATED, comp)\n },\n })\n if (result) {\n onEvent(componentEvents.EMPLOYEE_COMPENSATION_DONE, result.data)\n }\n }\n\n return (\n <BaseLayout error={compensation.errorHandling.errors}>\n <SDKFormProvider formHookResult={compensation}>\n <Form\n onSubmit={e => {\n e.preventDefault()\n void handleSubmit()\n }}\n >\n <Components.Heading as=\"h2\">\n {compensation.status.mode === 'create' ? t('addTitle') : t('editTitle')}\n </Components.Heading>\n\n {Fields.StartDate && (\n <Fields.StartDate\n label={t('startDateLabel')}\n validationMessages={{\n REQUIRED: t('fieldValidations.startDate.REQUIRED'),\n }}\n />\n )}\n\n <Fields.JobTitle\n label={t('jobTitle')}\n validationMessages={{\n REQUIRED: t('fieldValidations.jobTitle.REQUIRED'),\n }}\n />\n\n {Fields.FlsaStatus && (\n <Fields.FlsaStatus\n label={t('employeeClassification')}\n description={\n <Trans\n t={t}\n i18nKey=\"classificationLink\"\n components={{\n ClassificationLink: <Components.Link />,\n }}\n />\n }\n getOptionLabel={status => t(`flsaStatusLabels.${status}`, status)}\n validationMessages={{\n REQUIRED: t('fieldValidations.flsaStatus.REQUIRED'),\n }}\n />\n )}\n\n <Fields.Rate\n label={t('amount')}\n validationMessages={{\n REQUIRED: t('fieldValidations.rate.REQUIRED'),\n RATE_MINIMUM: t('fieldValidations.rate.RATE_MINIMUM'),\n RATE_EXEMPT_THRESHOLD: t('fieldValidations.rate.RATE_EXEMPT_THRESHOLD', {\n limit: formatCurrency(FLSA_OVERTIME_SALARY_LIMIT),\n }),\n }}\n />\n\n <Fields.PaymentUnit\n label={t('paymentUnitLabel')}\n description={t('paymentUnitDescription')}\n getOptionLabel={unit => t(`paymentUnitOptions.${unit}`, unit)}\n validationMessages={{\n REQUIRED: t('fieldValidations.paymentUnit.REQUIRED'),\n }}\n />\n\n {Fields.AdjustForMinimumWage && (\n <Fields.AdjustForMinimumWage\n label={t('adjustForMinimumWage')}\n description={t('adjustForMinimumWageDescription')}\n />\n )}\n\n {Fields.MinimumWageId && (\n <Fields.MinimumWageId\n label={t('minimumWageLabel')}\n description={t('minimumWageDescription')}\n validationMessages={{\n REQUIRED: t('fieldValidations.minimumWageId.REQUIRED'),\n }}\n />\n )}\n\n {Fields.TwoPercentShareholder && (\n <Fields.TwoPercentShareholder label={t('twoPercentStakeholderLabel')} />\n )}\n\n {Fields.StateWcCovered && (\n <Fields.StateWcCovered\n label={t('stateWcCoveredLabel')}\n description={t('stateWcCoveredDescription')}\n getOptionLabel={key =>\n key === 'yes' ? t('stateWcCoveredYes') : t('stateWcCoveredNo')\n }\n />\n )}\n\n {Fields.StateWcClassCode && (\n <Fields.StateWcClassCode\n label={t('stateWcClassCodeLabel')}\n description={t('stateWcClassCodeDescription')}\n validationMessages={{\n REQUIRED: t('fieldValidations.stateWcClassCode.REQUIRED'),\n }}\n />\n )}\n\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={compensation.status.isPending}>\n {t('saveNewJobCta')}\n </Components.Button>\n </ActionsLayout>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n\nexport function CompensationForm({ FallbackComponent, ...props }: CompensationFormProps) {\n return (\n <BaseBoundaries componentName=\"UNSTABLE.CompensationForm\" FallbackComponent={FallbackComponent}>\n <CompensationFormRoot {...props} />\n </BaseBoundaries>\n )\n}\n"],"names":["CompensationFormRoot","onEvent","dictionary","hookProps","useI18n","useComponentDictionary","t","useTranslation","Components","useComponentContext","formatCurrency","useNumberFormatter","compensation","useCompensationForm","BaseLayout","Fields","handleSubmit","result","job","componentEvents","comp","jsx","SDKFormProvider","jsxs","Form","e","Trans","status","FLSA_OVERTIME_SALARY_LIMIT","unit","key","ActionsLayout","CompensationForm","FallbackComponent","props","BaseBoundaries"],"mappings":";;;;;;;;;;;;AAeA,SAASA,EAAqB,EAAE,SAAAC,GAAS,YAAAC,GAAY,GAAGC,KAAoC;AAC1F,EAAAC,EAAQ,2BAA2B,GACnCC,EAAuB,6BAA6BH,CAAU;AAC9D,QAAM,EAAE,GAAAI,EAAA,IAAMC,EAAe,2BAA2B,GAClDC,IAAaC,EAAA,GACbC,IAAiBC,EAAmB,UAAU,GAC9CC,IAAeC,EAAoBV,CAAS;AAElD,MAAIS,EAAa;AACf,6BAAQE,GAAA,EAAW,WAAS,IAAC,OAAOF,EAAa,cAAc,QAAQ;AAGzE,QAAM,EAAE,QAAAG,MAAWH,EAAa,MAE1BI,IAAe,YAAY;AAC/B,UAAMC,IAAS,MAAML,EAAa,QAAQ,SAAS;AAAA,MACjD,cAAc,CAAAM,MAAO;AACnB,QAAAjB,EAAQkB,EAAgB,sBAAsBD,CAAG;AAAA,MACnD;AAAA,MACA,cAAc,CAAAA,MAAO;AACnB,QAAAjB,EAAQkB,EAAgB,sBAAsBD,CAAG;AAAA,MACnD;AAAA,MACA,uBAAuB,CAAAE,MAAQ;AAC7B,QAAAnB,EAAQkB,EAAgB,+BAA+BC,CAAI;AAAA,MAC7D;AAAA,IAAA,CACD;AACD,IAAIH,KACFhB,EAAQkB,EAAgB,4BAA4BF,EAAO,IAAI;AAAA,EAEnE;AAEA,SACE,gBAAAI,EAACP,KAAW,OAAOF,EAAa,cAAc,QAC5C,UAAA,gBAAAS,EAACC,GAAA,EAAgB,gBAAgBV,GAC/B,UAAA,gBAAAW;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAU,CAAAC,MAAK;AACb,QAAAA,EAAE,eAAA,GACGT,EAAA;AAAA,MACP;AAAA,MAEA,UAAA;AAAA,QAAA,gBAAAK,EAACb,EAAW,SAAX,EAAmB,IAAG,MACpB,UAAAI,EAAa,OAAO,SAAS,WAAWN,EAAE,UAAU,IAAIA,EAAE,WAAW,GACxE;AAAA,QAECS,EAAO,aACN,gBAAAM;AAAA,UAACN,EAAO;AAAA,UAAP;AAAA,YACC,OAAOT,EAAE,gBAAgB;AAAA,YACzB,oBAAoB;AAAA,cAClB,UAAUA,EAAE,qCAAqC;AAAA,YAAA;AAAA,UACnD;AAAA,QAAA;AAAA,QAIJ,gBAAAe;AAAA,UAACN,EAAO;AAAA,UAAP;AAAA,YACC,OAAOT,EAAE,UAAU;AAAA,YACnB,oBAAoB;AAAA,cAClB,UAAUA,EAAE,oCAAoC;AAAA,YAAA;AAAA,UAClD;AAAA,QAAA;AAAA,QAGDS,EAAO,cACN,gBAAAM;AAAA,UAACN,EAAO;AAAA,UAAP;AAAA,YACC,OAAOT,EAAE,wBAAwB;AAAA,YACjC,aACE,gBAAAe;AAAA,cAACK;AAAA,cAAA;AAAA,gBACC,GAAApB;AAAA,gBACA,SAAQ;AAAA,gBACR,YAAY;AAAA,kBACV,oBAAoB,gBAAAe,EAACb,EAAW,MAAX,CAAA,CAAgB;AAAA,gBAAA;AAAA,cACvC;AAAA,YAAA;AAAA,YAGJ,gBAAgB,CAAAmB,MAAUrB,EAAE,oBAAoBqB,CAAM,IAAIA,CAAM;AAAA,YAChE,oBAAoB;AAAA,cAClB,UAAUrB,EAAE,sCAAsC;AAAA,YAAA;AAAA,UACpD;AAAA,QAAA;AAAA,QAIJ,gBAAAe;AAAA,UAACN,EAAO;AAAA,UAAP;AAAA,YACC,OAAOT,EAAE,QAAQ;AAAA,YACjB,oBAAoB;AAAA,cAClB,UAAUA,EAAE,gCAAgC;AAAA,cAC5C,cAAcA,EAAE,oCAAoC;AAAA,cACpD,uBAAuBA,EAAE,+CAA+C;AAAA,gBACtE,OAAOI,EAAekB,CAA0B;AAAA,cAAA,CACjD;AAAA,YAAA;AAAA,UACH;AAAA,QAAA;AAAA,QAGF,gBAAAP;AAAA,UAACN,EAAO;AAAA,UAAP;AAAA,YACC,OAAOT,EAAE,kBAAkB;AAAA,YAC3B,aAAaA,EAAE,wBAAwB;AAAA,YACvC,gBAAgB,CAAAuB,MAAQvB,EAAE,sBAAsBuB,CAAI,IAAIA,CAAI;AAAA,YAC5D,oBAAoB;AAAA,cAClB,UAAUvB,EAAE,uCAAuC;AAAA,YAAA;AAAA,UACrD;AAAA,QAAA;AAAA,QAGDS,EAAO,wBACN,gBAAAM;AAAA,UAACN,EAAO;AAAA,UAAP;AAAA,YACC,OAAOT,EAAE,sBAAsB;AAAA,YAC/B,aAAaA,EAAE,iCAAiC;AAAA,UAAA;AAAA,QAAA;AAAA,QAInDS,EAAO,iBACN,gBAAAM;AAAA,UAACN,EAAO;AAAA,UAAP;AAAA,YACC,OAAOT,EAAE,kBAAkB;AAAA,YAC3B,aAAaA,EAAE,wBAAwB;AAAA,YACvC,oBAAoB;AAAA,cAClB,UAAUA,EAAE,yCAAyC;AAAA,YAAA;AAAA,UACvD;AAAA,QAAA;AAAA,QAIHS,EAAO,yBACN,gBAAAM,EAACN,EAAO,uBAAP,EAA6B,OAAOT,EAAE,4BAA4B,GAAG;AAAA,QAGvES,EAAO,kBACN,gBAAAM;AAAA,UAACN,EAAO;AAAA,UAAP;AAAA,YACC,OAAOT,EAAE,qBAAqB;AAAA,YAC9B,aAAaA,EAAE,2BAA2B;AAAA,YAC1C,gBAAgB,OACEA,EAAhBwB,MAAQ,QAAU,sBAAyB,kBAAN;AAAA,UAAwB;AAAA,QAAA;AAAA,QAKlEf,EAAO,oBACN,gBAAAM;AAAA,UAACN,EAAO;AAAA,UAAP;AAAA,YACC,OAAOT,EAAE,uBAAuB;AAAA,YAChC,aAAaA,EAAE,6BAA6B;AAAA,YAC5C,oBAAoB;AAAA,cAClB,UAAUA,EAAE,4CAA4C;AAAA,YAAA;AAAA,UAC1D;AAAA,QAAA;AAAA,QAIJ,gBAAAe,EAACU,GAAA,EACC,UAAA,gBAAAV,EAACb,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWI,EAAa,OAAO,WAC7D,UAAAN,EAAE,eAAe,GACpB,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAEJ,EAAA,CACF;AAEJ;AAEO,SAAS0B,EAAiB,EAAE,mBAAAC,GAAmB,GAAGC,KAAgC;AACvF,SACE,gBAAAb,EAACc,KAAe,eAAc,6BAA4B,mBAAAF,GACxD,UAAA,gBAAAZ,EAACrB,GAAA,EAAsB,GAAGkC,EAAA,CAAO,EAAA,CACnC;AAEJ;"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { RequiredFields } from '../../form/resolveRequiredFields';
|
|
3
|
+
export declare const CompensationErrorCodes: {
|
|
4
|
+
readonly REQUIRED: "REQUIRED";
|
|
5
|
+
readonly RATE_MINIMUM: "RATE_MINIMUM";
|
|
6
|
+
readonly RATE_EXEMPT_THRESHOLD: "RATE_EXEMPT_THRESHOLD";
|
|
7
|
+
readonly PAYMENT_UNIT_OWNER: "PAYMENT_UNIT_OWNER";
|
|
8
|
+
readonly PAYMENT_UNIT_COMMISSION: "PAYMENT_UNIT_COMMISSION";
|
|
9
|
+
readonly RATE_COMMISSION_ZERO: "RATE_COMMISSION_ZERO";
|
|
10
|
+
};
|
|
11
|
+
export type CompensationErrorCode = (typeof CompensationErrorCodes)[keyof typeof CompensationErrorCodes];
|
|
12
|
+
declare const fieldValidators: {
|
|
13
|
+
jobTitle: z.ZodString;
|
|
14
|
+
flsaStatus: z.ZodEnum<{
|
|
15
|
+
Exempt: "Exempt";
|
|
16
|
+
"Salaried Nonexempt": "Salaried Nonexempt";
|
|
17
|
+
Nonexempt: "Nonexempt";
|
|
18
|
+
Owner: "Owner";
|
|
19
|
+
"Commission Only Exempt": "Commission Only Exempt";
|
|
20
|
+
"Commission Only Nonexempt": "Commission Only Nonexempt";
|
|
21
|
+
}>;
|
|
22
|
+
paymentUnit: z.ZodEnum<{
|
|
23
|
+
Hour: "Hour";
|
|
24
|
+
Week: "Week";
|
|
25
|
+
Month: "Month";
|
|
26
|
+
Year: "Year";
|
|
27
|
+
Paycheck: "Paycheck";
|
|
28
|
+
}>;
|
|
29
|
+
rate: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
startDate: z.ZodOptional<z.ZodNullable<z.ZodISODate>>;
|
|
31
|
+
adjustForMinimumWage: z.ZodBoolean;
|
|
32
|
+
minimumWageId: z.ZodOptional<z.ZodString>;
|
|
33
|
+
stateWcCovered: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
stateWcClassCode: z.ZodOptional<z.ZodString>;
|
|
35
|
+
twoPercentShareholder: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
+
};
|
|
37
|
+
export type CompensationField = Exclude<keyof typeof fieldValidators, 'adjustForMinimumWage' | 'minimumWageId' | 'stateWcCovered' | 'stateWcClassCode' | 'twoPercentShareholder'>;
|
|
38
|
+
export type CompensationFormData = {
|
|
39
|
+
[K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>;
|
|
40
|
+
};
|
|
41
|
+
export type CompensationFormOutputs = CompensationFormData;
|
|
42
|
+
interface CompensationSchemaOptions {
|
|
43
|
+
mode?: 'create' | 'update';
|
|
44
|
+
requiredFields?: RequiredFields<CompensationField>;
|
|
45
|
+
withStartDateField?: boolean;
|
|
46
|
+
}
|
|
47
|
+
export declare function createCompensationSchema(options?: CompensationSchemaOptions): z.ZodObject<{
|
|
48
|
+
rate: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>;
|
|
49
|
+
startDate: z.ZodPipe<z.ZodTransform<{} | undefined, unknown>, 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, unknown>, z.ZodNumber>;
|
|
74
|
+
startDate: z.ZodPipe<z.ZodTransform<{} | undefined, unknown>, z.ZodISODate>;
|
|
75
|
+
stateWcCovered: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodBoolean>>;
|
|
76
|
+
jobTitle: z.ZodString;
|
|
77
|
+
flsaStatus: z.ZodEnum<{
|
|
78
|
+
Exempt: "Exempt";
|
|
79
|
+
"Salaried Nonexempt": "Salaried Nonexempt";
|
|
80
|
+
Nonexempt: "Nonexempt";
|
|
81
|
+
Owner: "Owner";
|
|
82
|
+
"Commission Only Exempt": "Commission Only Exempt";
|
|
83
|
+
"Commission Only Nonexempt": "Commission Only Nonexempt";
|
|
84
|
+
}>;
|
|
85
|
+
paymentUnit: z.ZodEnum<{
|
|
86
|
+
Hour: "Hour";
|
|
87
|
+
Week: "Week";
|
|
88
|
+
Month: "Month";
|
|
89
|
+
Year: "Year";
|
|
90
|
+
Paycheck: "Paycheck";
|
|
91
|
+
}>;
|
|
92
|
+
adjustForMinimumWage: z.ZodBoolean;
|
|
93
|
+
minimumWageId: z.ZodOptional<z.ZodString>;
|
|
94
|
+
stateWcClassCode: z.ZodOptional<z.ZodString>;
|
|
95
|
+
twoPercentShareholder: z.ZodOptional<z.ZodBoolean>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
export {};
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { z as e } from "zod";
|
|
2
|
+
import { composeFormSchema as u } from "../../form/composeFormSchema.js";
|
|
3
|
+
import { filterRequiredFields as M } from "../../form/resolveRequiredFields.js";
|
|
4
|
+
import { FlsaStatus as t, FLSA_OVERTIME_SALARY_LIMIT as R, PAY_PERIODS as r } from "../../../../shared/constants.js";
|
|
5
|
+
import { yearlyRate as N } from "../../../../helpers/payRateCalculator.js";
|
|
6
|
+
const a = {
|
|
7
|
+
REQUIRED: "REQUIRED",
|
|
8
|
+
RATE_MINIMUM: "RATE_MINIMUM",
|
|
9
|
+
RATE_EXEMPT_THRESHOLD: "RATE_EXEMPT_THRESHOLD",
|
|
10
|
+
PAYMENT_UNIT_OWNER: "PAYMENT_UNIT_OWNER",
|
|
11
|
+
PAYMENT_UNIT_COMMISSION: "PAYMENT_UNIT_COMMISSION",
|
|
12
|
+
RATE_COMMISSION_ZERO: "RATE_COMMISSION_ZERO"
|
|
13
|
+
}, O = {
|
|
14
|
+
jobTitle: e.string().min(1, { message: a.REQUIRED }),
|
|
15
|
+
flsaStatus: e.enum([
|
|
16
|
+
t.EXEMPT,
|
|
17
|
+
t.SALARIED_NONEXEMPT,
|
|
18
|
+
t.NONEXEMPT,
|
|
19
|
+
t.OWNER,
|
|
20
|
+
t.COMMISSION_ONLY_EXEMPT,
|
|
21
|
+
t.COMMISSION_ONLY_NONEXEMPT
|
|
22
|
+
]),
|
|
23
|
+
paymentUnit: e.enum([
|
|
24
|
+
r.HOUR,
|
|
25
|
+
r.WEEK,
|
|
26
|
+
r.MONTH,
|
|
27
|
+
r.YEAR,
|
|
28
|
+
r.PAYCHECK
|
|
29
|
+
]),
|
|
30
|
+
rate: e.number().optional(),
|
|
31
|
+
startDate: e.iso.date().nullable().optional(),
|
|
32
|
+
adjustForMinimumWage: e.boolean(),
|
|
33
|
+
minimumWageId: e.string().optional(),
|
|
34
|
+
stateWcCovered: e.boolean().optional(),
|
|
35
|
+
stateWcClassCode: e.string().optional(),
|
|
36
|
+
twoPercentShareholder: e.boolean().optional()
|
|
37
|
+
}, c = /* @__PURE__ */ new Set([
|
|
38
|
+
"adjustForMinimumWage",
|
|
39
|
+
"minimumWageId",
|
|
40
|
+
"stateWcCovered",
|
|
41
|
+
"stateWcClassCode",
|
|
42
|
+
"twoPercentShareholder"
|
|
43
|
+
]), S = {
|
|
44
|
+
...O,
|
|
45
|
+
rate: e.preprocess((s) => Number.isNaN(s) ? void 0 : s, e.number()),
|
|
46
|
+
startDate: e.preprocess((s) => {
|
|
47
|
+
if (s instanceof Date) return s.toISOString().split("T")[0];
|
|
48
|
+
if (!(s === null || s === ""))
|
|
49
|
+
return s;
|
|
50
|
+
}, e.iso.date()),
|
|
51
|
+
stateWcCovered: e.preprocess((s) => typeof s == "string" ? s === "true" : s, e.boolean()).optional()
|
|
52
|
+
}, T = /* @__PURE__ */ new Set([
|
|
53
|
+
"jobTitle",
|
|
54
|
+
"flsaStatus",
|
|
55
|
+
"rate",
|
|
56
|
+
"paymentUnit"
|
|
57
|
+
]), _ = /* @__PURE__ */ new Set([]);
|
|
58
|
+
function C(s, o) {
|
|
59
|
+
s.adjustForMinimumWage && (!s.minimumWageId || s.minimumWageId.trim() === "") && o.addIssue({
|
|
60
|
+
code: e.ZodIssueCode.custom,
|
|
61
|
+
path: ["minimumWageId"],
|
|
62
|
+
message: a.REQUIRED
|
|
63
|
+
}), s.stateWcCovered === !0 && (!s.stateWcClassCode || s.stateWcClassCode.trim() === "") && o.addIssue({
|
|
64
|
+
code: e.ZodIssueCode.custom,
|
|
65
|
+
path: ["stateWcClassCode"],
|
|
66
|
+
message: a.REQUIRED
|
|
67
|
+
});
|
|
68
|
+
const { flsaStatus: i, paymentUnit: E, rate: d } = s;
|
|
69
|
+
i === t.EXEMPT || i === t.SALARIED_NONEXEMPT || i === t.NONEXEMPT ? (i === t.EXEMPT && d !== void 0 && N(d, E) < R && o.addIssue({
|
|
70
|
+
code: e.ZodIssueCode.custom,
|
|
71
|
+
path: ["rate"],
|
|
72
|
+
message: a.RATE_EXEMPT_THRESHOLD
|
|
73
|
+
}), d === void 0 ? o.addIssue({
|
|
74
|
+
code: e.ZodIssueCode.custom,
|
|
75
|
+
path: ["rate"],
|
|
76
|
+
message: a.REQUIRED
|
|
77
|
+
}) : d < 1 && o.addIssue({
|
|
78
|
+
code: e.ZodIssueCode.custom,
|
|
79
|
+
path: ["rate"],
|
|
80
|
+
message: a.RATE_MINIMUM
|
|
81
|
+
})) : i === t.OWNER ? (E !== r.PAYCHECK && o.addIssue({
|
|
82
|
+
code: e.ZodIssueCode.custom,
|
|
83
|
+
path: ["paymentUnit"],
|
|
84
|
+
message: a.PAYMENT_UNIT_OWNER
|
|
85
|
+
}), d === void 0 ? o.addIssue({
|
|
86
|
+
code: e.ZodIssueCode.custom,
|
|
87
|
+
path: ["rate"],
|
|
88
|
+
message: a.REQUIRED
|
|
89
|
+
}) : d < 1 && o.addIssue({
|
|
90
|
+
code: e.ZodIssueCode.custom,
|
|
91
|
+
path: ["rate"],
|
|
92
|
+
message: a.RATE_MINIMUM
|
|
93
|
+
})) : [t.COMMISSION_ONLY_EXEMPT, t.COMMISSION_ONLY_NONEXEMPT].includes(i) && (E !== r.YEAR && o.addIssue({
|
|
94
|
+
code: e.ZodIssueCode.custom,
|
|
95
|
+
path: ["paymentUnit"],
|
|
96
|
+
message: a.PAYMENT_UNIT_COMMISSION
|
|
97
|
+
}), d !== 0 && o.addIssue({
|
|
98
|
+
code: e.ZodIssueCode.custom,
|
|
99
|
+
path: ["rate"],
|
|
100
|
+
message: a.RATE_COMMISSION_ZERO
|
|
101
|
+
}));
|
|
102
|
+
}
|
|
103
|
+
function p(s = {}) {
|
|
104
|
+
const { mode: o = "create", requiredFields: i, withStartDateField: E = !0 } = s, d = E ? i : M(i, "startDate"), n = new Set(T);
|
|
105
|
+
return E && n.add("startDate"), u({
|
|
106
|
+
fieldValidators: S,
|
|
107
|
+
fixedFields: c,
|
|
108
|
+
requiredOnCreate: n,
|
|
109
|
+
requiredOnUpdate: _,
|
|
110
|
+
mode: o,
|
|
111
|
+
requiredFields: d
|
|
112
|
+
}).superRefine((I, m) => {
|
|
113
|
+
C(I, m);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
p();
|
|
117
|
+
export {
|
|
118
|
+
a as CompensationErrorCodes,
|
|
119
|
+
p as createCompensationSchema
|
|
120
|
+
};
|
|
121
|
+
//# sourceMappingURL=compensationSchema.js.map
|