@gusto/embedded-react-sdk 0.37.0 → 0.38.0-rc.1
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 +45 -0
- package/README.md +3 -0
- package/dist/UNSTABLE_Hooks.d.ts +1 -1
- package/dist/UNSTABLE_Hooks.js +34 -38
- package/dist/UNSTABLE_Hooks.js.map +1 -1
- package/dist/assets/icons/filter-funnel.svg.js +10 -0
- package/dist/assets/icons/filter-funnel.svg.js.map +1 -0
- package/dist/components/Base/Base.js +2 -3
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/createCompoundContext.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.js +42 -36
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
- package/dist/components/Common/DataView/DataTable/DataTable.js +77 -68
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.d.ts +17 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +100 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js +10 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js.map +1 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.d.ts +2 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayoutTypes.d.ts +40 -0
- package/dist/components/Common/DetailViewLayout/index.d.ts +3 -0
- package/dist/components/Common/EmptyData/EmptyData.d.ts +2 -1
- package/dist/components/Common/EmptyData/EmptyData.js +15 -13
- package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js +6 -4
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js +26 -24
- 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 +1 -1
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js +40 -38
- 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.js +27 -25
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js +34 -32
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.d.ts +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.js +34 -32
- package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
- package/dist/components/Common/Fields/SwitchField/SwitchField.js +26 -24
- 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.js +26 -24
- 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/FlowBreadcrumbs/FlowBreadcrumbs.js +21 -20
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +5 -0
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.d.ts +1 -1
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js +10 -8
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableList.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +10 -15
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -14
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +14 -19
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +17 -17
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +5 -0
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.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/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.js +88 -69
- package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +13 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.d.ts +2 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js +74 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js.map +1 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.module.scss.js +30 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.module.scss.js.map +1 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePickerTypes.d.ts +14 -0
- package/dist/components/Common/UI/DateRangePicker/index.d.ts +2 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +2 -2
- package/dist/components/Common/UI/Heading/Heading.d.ts +1 -1
- package/dist/components/Common/UI/Heading/Heading.js +11 -9
- package/dist/components/Common/UI/Heading/Heading.js.map +1 -1
- package/dist/components/Common/UI/Heading/HeadingTypes.d.ts +1 -1
- package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +94 -80
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Common/index.d.ts +2 -0
- 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 +3 -5
- 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 +3 -5
- 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 +5 -7
- 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 +3 -5
- 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 +3 -5
- 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 +3 -5
- 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 +8 -10
- 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 +6 -8
- 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 +3 -5
- 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 +3 -5
- 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 +3 -5
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +59 -59
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +16 -19
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +36 -33
- 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.d.ts +2 -0
- package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -7
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +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 +3 -5
- 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 +3 -5
- 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 +5 -7
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +33 -34
- 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 +135 -126
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +31 -30
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +18 -21
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +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 +13 -13
- package/dist/components/Contractor/Profile/useContractorProfile.js +31 -31
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.d.ts +2 -2
- package/dist/components/Contractor/Submit/Submit.js +44 -46
- 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 +49 -49
- 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 +57 -54
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +17 -19
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +11 -13
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +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 +3 -5
- 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 +3 -5
- 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/EmployeeList.d.ts +2 -5
- package/dist/components/Employee/EmployeeList/EmployeeList.js +45 -95
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeListView.d.ts +15 -0
- package/dist/components/Employee/EmployeeList/EmployeeListView.js +130 -0
- package/dist/components/Employee/EmployeeList/EmployeeListView.js.map +1 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeList.d.ts +9 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js +81 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js.map +1 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.d.ts +17 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js +193 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js.map +1 -0
- package/dist/components/Employee/EmployeeList/index.d.ts +3 -0
- package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +36 -23
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +114 -19
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +7 -10
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +10 -13
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -5
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +14 -15
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +4 -4
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +14 -8
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +10 -11
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +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 +13 -14
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +44 -43
- package/dist/components/Employee/PaymentMethod/PaymentMethod.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.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -7
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +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.js +9 -10
- 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.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +3 -5
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +8 -11
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -5
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +8 -11
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +10 -13
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +3 -5
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +48 -48
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +14 -17
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +37 -33
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.d.ts +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +57 -45
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +8 -11
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
- package/dist/components/Employee/index.d.ts +1 -0
- package/dist/components/Employee/index.js +38 -36
- 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 +3 -4
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +8 -10
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlow.js +14 -14
- package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.d.ts +2 -2
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +21 -20
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +2 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +57 -55
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +8 -11
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.d.ts +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +85 -75
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.module.scss.js +7 -7
- package/dist/components/Payroll/GrossUpModal/GrossUpModalTypes.d.ts +0 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js +24 -18
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +2 -0
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +28 -22
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +92 -84
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +30 -32
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +18 -26
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +21 -21
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +3 -3
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +13 -13
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -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 +194 -190
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +69 -69
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +2 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +102 -76
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +235 -238
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.module.scss.js +7 -7
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.d.ts +11 -0
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +63 -30
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +2 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +43 -41
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/index.d.ts +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.d.ts +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +62 -51
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js +13 -6
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +22 -20
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js +35 -14
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +80 -69
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +0 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +59 -66
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +5 -4
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +96 -105
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +98 -64
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +9 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +223 -123
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +16 -12
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +106 -105
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +231 -222
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +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 +1 -1
- package/dist/components/Payroll/Transition/TransitionFlow.js +29 -27
- package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +1 -0
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +67 -63
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +12 -14
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js +5 -5
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js +44 -55
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
- package/dist/components/Payroll/helpers.d.ts +5 -0
- package/dist/components/Payroll/helpers.js +81 -74
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +2 -4
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js +6 -9
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.d.ts +1 -2
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.d.ts +48 -0
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js +94 -0
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +24 -24
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js +22 -17
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +31 -31
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +27 -27
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js +28 -28
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +24 -24
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.d.ts +5 -4
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +30 -30
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/index.d.ts +5 -2
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.d.ts +3 -0
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.js +15 -0
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.d.ts +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/useDeriveFieldsMetadata.d.ts +17 -0
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js +21 -0
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js +6 -6
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.d.ts +22 -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 +1 -1
- package/dist/components/UNSTABLE_Hooks/form/withOptions.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +7 -9
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.d.ts +48 -42
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js +48 -79
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchemaParity.test.d.ts +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/index.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +13 -15
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js +109 -110
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +17 -19
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +13 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js +31 -25
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.d.ts +5 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js +27 -27
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/index.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +8 -22
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js +81 -84
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +16 -18
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/index.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.d.ts +9 -10
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js +85 -83
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.d.ts +8 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js +18 -17
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/index.d.ts +7 -7
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +46 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +46 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +88 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.d.ts +6 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.js +50 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +73 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +122 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js +8 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListTypes.d.ts +17 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js +46 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.js +25 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +29 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +103 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/index.d.ts +3 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.d.ts +14 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js +290 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.test.d.ts +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/SelectHolidaysPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/SelectHolidaysPresentation.js +55 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/SelectHolidaysPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/SelectHolidaysTypes.d.ts +25 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/index.d.ts +3 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyType.d.ts +7 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyType.js +27 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyType.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyTypePresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyTypePresentation.js +66 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyTypePresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyTypeTypes.d.ts +6 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/index.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/shared/EmployeeTable/EmployeeTable.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/shared/EmployeeTable/EmployeeTableTypes.d.ts +26 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/shared/EmployeeTable/index.d.ts +4 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js +35 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js +35 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js +35 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js +35 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/index.d.ts +25 -0
- package/dist/components/UNSTABLE_TimeOff/index.js +27 -0
- package/dist/components/UNSTABLE_TimeOff/index.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +48 -46
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +10 -13
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.d.ts +10 -2
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
- package/dist/contexts/ThemeProvider/useTheme.js.map +1 -1
- package/dist/helpers/breadcrumbHelpers.d.ts +14 -0
- package/dist/helpers/breadcrumbHelpers.js +35 -26
- package/dist/helpers/breadcrumbHelpers.js.map +1 -1
- package/dist/{components/UNSTABLE_Hooks → helpers}/collectErrors.d.ts +1 -1
- package/dist/{components/UNSTABLE_Hooks → helpers}/collectErrors.js +1 -1
- package/dist/helpers/collectErrors.js.map +1 -0
- package/dist/hooks/useCompanyPaymentSpeed.d.ts +6 -0
- package/dist/hooks/useCompanyPaymentSpeed.js +19 -0
- package/dist/hooks/useCompanyPaymentSpeed.js.map +1 -0
- package/dist/hooks/useCompanyPaymentSpeed.test.d.ts +1 -0
- package/dist/hooks/useDateRangeFilter/useDateRangeFilter.d.ts +20 -0
- package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js +38 -0
- package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js.map +1 -0
- package/dist/hooks/useDateRangeFilter/useDateRangeFilter.test.d.ts +1 -0
- package/dist/{components/UNSTABLE_Hooks → hooks}/useErrorHandling.d.ts +2 -2
- package/dist/{components/UNSTABLE_Hooks → hooks}/useErrorHandling.js +1 -1
- package/dist/hooks/useErrorHandling.js.map +1 -0
- package/dist/hooks/useErrorHandling.test.d.ts +1 -0
- package/dist/hooks/usePagination/usePagination.d.ts +2 -0
- package/dist/hooks/usePagination/usePagination.js +32 -29
- package/dist/hooks/usePagination/usePagination.js.map +1 -1
- package/dist/i18n/I18n.js +24 -24
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +6 -6
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +24 -0
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +32 -0
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +26 -0
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +28 -0
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +38 -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/Contractor.Payments.CreatePayment.json.js +36 -34
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
- package/dist/i18n/en/Employee.EmployeeList.json.js +22 -20
- package/dist/i18n/en/Employee.EmployeeList.json.js.map +1 -1
- package/dist/i18n/en/Employee.ManagementEmployeeList.json.js +40 -0
- package/dist/i18n/en/Employee.ManagementEmployeeList.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.OffCycle.json.js +1 -1
- package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +5 -5
- package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +38 -34
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +29 -25
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollHistory.json.js +12 -12
- package/dist/i18n/en/Payroll.PayrollList.json.js +28 -20
- package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +64 -58
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/Payroll.TransitionCreation.json.js +9 -9
- package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js +8 -8
- package/dist/index.js +18 -16
- package/dist/index.js.map +1 -1
- package/dist/shared/constants.d.ts +46 -0
- package/dist/shared/constants.js +99 -74
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +508 -12
- package/dist/{components/UNSTABLE_Hooks/types.d.ts → types/sdkHooks.d.ts} +28 -2
- package/docs/reference/endpoint-inventory.json +608 -418
- package/package.json +29 -20
- package/dist/components/Employee/EmployeeList/Actions.d.ts +0 -1
- package/dist/components/Employee/EmployeeList/Actions.js +0 -16
- package/dist/components/Employee/EmployeeList/Actions.js.map +0 -1
- package/dist/components/Employee/EmployeeList/Head.d.ts +0 -1
- package/dist/components/Employee/EmployeeList/Head.js +0 -15
- package/dist/components/Employee/EmployeeList/Head.js.map +0 -1
- package/dist/components/Employee/EmployeeList/List.d.ts +0 -2
- package/dist/components/Employee/EmployeeList/List.js +0 -125
- package/dist/components/Employee/EmployeeList/List.js.map +0 -1
- package/dist/components/Employee/EmployeeList/List.module.scss.js +0 -8
- package/dist/components/Employee/EmployeeList/List.module.scss.js.map +0 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.module.scss.js +0 -8
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.module.scss.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/collectErrors.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js +0 -24
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js +0 -14
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/types.d.ts +0 -27
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.d.ts +0 -4
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js +0 -9
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/useErrorHandling.js.map +0 -1
- package/dist/helpers/requiredIf.js +0 -8
- package/dist/helpers/requiredIf.js.map +0 -1
- /package/dist/components/UNSTABLE_Hooks/{useErrorHandling.test.d.ts → form/buildFormSchema.test.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compensationSchema.js","sources":["../../../../../src/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport { composeFormSchema } from '../../form/composeFormSchema'\nimport { filterRequiredFields, type RequiredFields } from '../../form/resolveRequiredFields'\nimport { FLSA_OVERTIME_SALARY_LIMIT, FlsaStatus, PAY_PERIODS } from '@/shared/constants'\nimport { yearlyRate } from '@/helpers/payRateCalculator'\n\nexport const CompensationErrorCodes = {\n REQUIRED: 'REQUIRED',\n RATE_MINIMUM: 'RATE_MINIMUM',\n RATE_EXEMPT_THRESHOLD: 'RATE_EXEMPT_THRESHOLD',\n PAYMENT_UNIT_OWNER: 'PAYMENT_UNIT_OWNER',\n PAYMENT_UNIT_COMMISSION: 'PAYMENT_UNIT_COMMISSION',\n RATE_COMMISSION_ZERO: 'RATE_COMMISSION_ZERO',\n} as const\n\nexport type CompensationErrorCode =\n (typeof CompensationErrorCodes)[keyof typeof CompensationErrorCodes]\n\nconst fieldValidators = {\n jobTitle: z.string().min(1, { message: CompensationErrorCodes.REQUIRED }),\n flsaStatus: z.enum([\n FlsaStatus.EXEMPT,\n FlsaStatus.SALARIED_NONEXEMPT,\n FlsaStatus.NONEXEMPT,\n FlsaStatus.OWNER,\n FlsaStatus.COMMISSION_ONLY_EXEMPT,\n FlsaStatus.COMMISSION_ONLY_NONEXEMPT,\n ]),\n paymentUnit: z.enum([\n PAY_PERIODS.HOUR,\n PAY_PERIODS.WEEK,\n PAY_PERIODS.MONTH,\n PAY_PERIODS.YEAR,\n PAY_PERIODS.PAYCHECK,\n ]),\n rate: z.number().optional(),\n startDate: z.iso.date().nullable().optional(),\n adjustForMinimumWage: z.boolean(),\n minimumWageId: z.string().optional(),\n stateWcCovered: z.boolean().optional(),\n stateWcClassCode: z.string().optional(),\n twoPercentShareholder: z.boolean().optional(),\n}\n\nconst FIXED_FIELDS = new Set([\n 'adjustForMinimumWage',\n 'minimumWageId',\n 'stateWcCovered',\n 'stateWcClassCode',\n 'twoPercentShareholder',\n])\n\nexport type CompensationField = Exclude<\n keyof typeof fieldValidators,\n | 'adjustForMinimumWage'\n | 'minimumWageId'\n | 'stateWcCovered'\n | 'stateWcClassCode'\n | 'twoPercentShareholder'\n>\n\nexport type CompensationFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\nexport type CompensationFormOutputs = CompensationFormData\n\nconst runtimeFieldValidators = {\n ...fieldValidators,\n rate: z.preprocess(val => (Number.isNaN(val) ? undefined : val), z.number()),\n startDate: z.preprocess(val => {\n if (val instanceof Date) return val.toISOString().split('T')[0]\n if (val === null || val === '') return undefined\n return val\n }, z.iso.date()),\n stateWcCovered: z\n .preprocess(val => (typeof val === 'string' ? val === 'true' : val), z.boolean())\n .optional(),\n}\n\nconst REQUIRED_ON_CREATE = new Set<CompensationField>([\n 'jobTitle',\n 'flsaStatus',\n 'rate',\n 'paymentUnit',\n])\nconst REQUIRED_ON_UPDATE = new Set<CompensationField>([])\n\ninterface CompensationSchemaOptions {\n mode?: 'create' | 'update'\n requiredFields?: RequiredFields<CompensationField>\n withStartDateField?: boolean\n}\n\nfunction compensationSuperRefine(data: CompensationFormData, ctx: z.RefinementCtx) {\n if (data.adjustForMinimumWage && (!data.minimumWageId || data.minimumWageId.trim() === '')) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['minimumWageId'],\n message: CompensationErrorCodes.REQUIRED,\n })\n }\n\n if (\n data.stateWcCovered === true &&\n (!data.stateWcClassCode || data.stateWcClassCode.trim() === '')\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['stateWcClassCode'],\n message: CompensationErrorCodes.REQUIRED,\n })\n }\n\n const { flsaStatus, paymentUnit, rate } = data\n\n if (\n flsaStatus === FlsaStatus.EXEMPT ||\n flsaStatus === FlsaStatus.SALARIED_NONEXEMPT ||\n flsaStatus === FlsaStatus.NONEXEMPT\n ) {\n if (\n flsaStatus === FlsaStatus.EXEMPT &&\n rate !== undefined &&\n yearlyRate(rate, paymentUnit) < FLSA_OVERTIME_SALARY_LIMIT\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_EXEMPT_THRESHOLD,\n })\n }\n\n if (rate === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.REQUIRED,\n })\n } else if (rate < 1) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_MINIMUM,\n })\n }\n } else if (flsaStatus === FlsaStatus.OWNER) {\n if (paymentUnit !== PAY_PERIODS.PAYCHECK) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['paymentUnit'],\n message: CompensationErrorCodes.PAYMENT_UNIT_OWNER,\n })\n }\n if (rate === undefined) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.REQUIRED,\n })\n } else if (rate < 1) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_MINIMUM,\n })\n }\n } else if (\n [FlsaStatus.COMMISSION_ONLY_EXEMPT, FlsaStatus.COMMISSION_ONLY_NONEXEMPT].includes(flsaStatus)\n ) {\n if (paymentUnit !== PAY_PERIODS.YEAR) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['paymentUnit'],\n message: CompensationErrorCodes.PAYMENT_UNIT_COMMISSION,\n })\n }\n if (rate !== 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_COMMISSION_ZERO,\n })\n }\n }\n}\n\nexport function createCompensationSchema(options: CompensationSchemaOptions = {}) {\n const { mode = 'create', requiredFields, withStartDateField = true } = options\n\n const effectiveRequiredFields = withStartDateField\n ? requiredFields\n : filterRequiredFields(requiredFields, 'startDate')\n\n const effectiveRequiredOnCreate = new Set(REQUIRED_ON_CREATE)\n if (withStartDateField) {\n effectiveRequiredOnCreate.add('startDate')\n }\n\n const baseSchema = composeFormSchema({\n fieldValidators: runtimeFieldValidators,\n fixedFields: FIXED_FIELDS,\n requiredOnCreate: effectiveRequiredOnCreate,\n requiredOnUpdate: REQUIRED_ON_UPDATE,\n mode,\n requiredFields: effectiveRequiredFields,\n })\n\n return baseSchema.superRefine((data, ctx) => {\n compensationSuperRefine(data as CompensationFormData, ctx)\n })\n}\n\nexport const CompensationSchema = createCompensationSchema()\n"],"names":["CompensationErrorCodes","fieldValidators","z","FlsaStatus","PAY_PERIODS","FIXED_FIELDS","runtimeFieldValidators","val","REQUIRED_ON_CREATE","REQUIRED_ON_UPDATE","compensationSuperRefine","data","ctx","flsaStatus","paymentUnit","rate","yearlyRate","FLSA_OVERTIME_SALARY_LIMIT","createCompensationSchema","options","mode","requiredFields","withStartDateField","effectiveRequiredFields","filterRequiredFields","effectiveRequiredOnCreate","composeFormSchema"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"compensationSchema.js","sources":["../../../../../src/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n buildFormSchema,\n type RequiredFieldConfig,\n type OptionalFieldsToRequire,\n} from '../../form/buildFormSchema'\nimport { coerceNaN, coerceToISODate, coerceStringBoolean } from '../../form/preprocessors'\nimport { FLSA_OVERTIME_SALARY_LIMIT, FlsaStatus, PAY_PERIODS } from '@/shared/constants'\nimport { yearlyRate } from '@/helpers/payRateCalculator'\n\n// ── Error codes ────────────────────────────────────────────────────────\n\nexport const CompensationErrorCodes = {\n REQUIRED: 'REQUIRED',\n RATE_MINIMUM: 'RATE_MINIMUM',\n RATE_EXEMPT_THRESHOLD: 'RATE_EXEMPT_THRESHOLD',\n PAYMENT_UNIT_OWNER: 'PAYMENT_UNIT_OWNER',\n PAYMENT_UNIT_COMMISSION: 'PAYMENT_UNIT_COMMISSION',\n RATE_COMMISSION_ZERO: 'RATE_COMMISSION_ZERO',\n} as const\n\nexport type CompensationErrorCode =\n (typeof CompensationErrorCodes)[keyof typeof CompensationErrorCodes]\n\nconst fieldValidators = {\n jobTitle: z.string(),\n flsaStatus: z.enum([\n FlsaStatus.EXEMPT,\n FlsaStatus.SALARIED_NONEXEMPT,\n FlsaStatus.NONEXEMPT,\n FlsaStatus.OWNER,\n FlsaStatus.COMMISSION_ONLY_EXEMPT,\n FlsaStatus.COMMISSION_ONLY_NONEXEMPT,\n ]),\n paymentUnit: z.enum([\n PAY_PERIODS.HOUR,\n PAY_PERIODS.WEEK,\n PAY_PERIODS.MONTH,\n PAY_PERIODS.YEAR,\n PAY_PERIODS.PAYCHECK,\n ]),\n rate: z.preprocess(coerceNaN(0), z.number()),\n startDate: z.preprocess(coerceToISODate, z.iso.date().nullable()),\n adjustForMinimumWage: z.boolean(),\n minimumWageId: z.string(),\n // Radio group delivers 'true'/'false' strings; coerceStringBoolean converts to boolean\n stateWcCovered: z.preprocess(coerceStringBoolean, z.boolean()),\n stateWcClassCode: z.string(),\n twoPercentShareholder: z.boolean(),\n}\n\nexport type CompensationFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\n\n// ── Required fields config (requiredness rules per field) ────────────\n\nconst requiredFieldsConfig = {\n jobTitle: 'create',\n flsaStatus: 'create',\n paymentUnit: 'create',\n rate: 'create',\n startDate: 'create',\n minimumWageId: data => data.adjustForMinimumWage,\n stateWcClassCode: data => String(data.stateWcCovered) === 'true',\n} satisfies RequiredFieldConfig<typeof fieldValidators>\n\nfunction validateFlsaRules(data: CompensationFormData, ctx: z.RefinementCtx) {\n const { flsaStatus, paymentUnit, rate } = data\n\n if (\n flsaStatus === FlsaStatus.EXEMPT ||\n flsaStatus === FlsaStatus.SALARIED_NONEXEMPT ||\n flsaStatus === FlsaStatus.NONEXEMPT\n ) {\n if (rate < 1) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_MINIMUM,\n })\n } else if (\n flsaStatus === FlsaStatus.EXEMPT &&\n yearlyRate(rate, paymentUnit) < FLSA_OVERTIME_SALARY_LIMIT\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_EXEMPT_THRESHOLD,\n })\n }\n } else if (flsaStatus === FlsaStatus.OWNER) {\n if (paymentUnit !== PAY_PERIODS.PAYCHECK) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['paymentUnit'],\n message: CompensationErrorCodes.PAYMENT_UNIT_OWNER,\n })\n }\n if (rate < 1) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_MINIMUM,\n })\n }\n /* eslint-disable @typescript-eslint/no-unnecessary-condition -- explicit match prevents a future FLSA status from silently falling into commission rules */\n } else if (\n flsaStatus === FlsaStatus.COMMISSION_ONLY_EXEMPT ||\n flsaStatus === FlsaStatus.COMMISSION_ONLY_NONEXEMPT\n ) {\n /* eslint-enable @typescript-eslint/no-unnecessary-condition */\n if (paymentUnit !== PAY_PERIODS.YEAR) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['paymentUnit'],\n message: CompensationErrorCodes.PAYMENT_UNIT_COMMISSION,\n })\n }\n if (rate !== 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['rate'],\n message: CompensationErrorCodes.RATE_COMMISSION_ZERO,\n })\n }\n }\n}\n\n// ── Schema factory ───────────────────────────────────────────────────\n\nexport type CompensationOptionalFieldsToRequire = OptionalFieldsToRequire<\n typeof requiredFieldsConfig\n>\nexport type CompensationFormOutputs = CompensationFormData\n\ninterface CompensationSchemaOptions {\n mode?: 'create' | 'update'\n optionalFieldsToRequire?: CompensationOptionalFieldsToRequire\n withStartDateField?: boolean\n}\n\nexport function createCompensationSchema(options: CompensationSchemaOptions = {}) {\n const { mode = 'create', optionalFieldsToRequire, withStartDateField = true } = options\n\n return buildFormSchema(fieldValidators, {\n requiredFieldsConfig,\n requiredErrorCode: CompensationErrorCodes.REQUIRED,\n mode,\n optionalFieldsToRequire,\n excludeFields: withStartDateField ? [] : ['startDate'],\n superRefine: validateFlsaRules,\n })\n}\n"],"names":["CompensationErrorCodes","fieldValidators","z","FlsaStatus","PAY_PERIODS","coerceNaN","coerceToISODate","coerceStringBoolean","requiredFieldsConfig","data","validateFlsaRules","ctx","flsaStatus","paymentUnit","rate","yearlyRate","FLSA_OVERTIME_SALARY_LIMIT","createCompensationSchema","options","mode","optionalFieldsToRequire","withStartDateField","buildFormSchema"],"mappings":"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"}
|
package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchemaParity.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage';
|
|
2
2
|
import { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype';
|
|
3
3
|
import { PaymentUnit } from '@gusto/embedded-api/models/components/compensation';
|
|
4
|
-
import { HookFieldProps } from '../../form/types';
|
|
5
4
|
import { TextInputHookFieldProps } from '../../form/fields/TextInputHookField';
|
|
6
5
|
import { SelectHookFieldProps } from '../../form/fields/SelectHookField';
|
|
7
6
|
import { NumberInputHookFieldProps } from '../../form/fields/NumberInputHookField';
|
|
@@ -9,6 +8,7 @@ import { CheckboxHookFieldProps } from '../../form/fields/CheckboxHookField';
|
|
|
9
8
|
import { RadioGroupHookFieldProps } from '../../form/fields/RadioGroupHookField';
|
|
10
9
|
import { DatePickerHookFieldProps } from '../../form/fields/DatePickerHookField';
|
|
11
10
|
import { CompensationErrorCodes } from './compensationSchema';
|
|
11
|
+
import { HookFieldProps } from '../../../../types/sdkHooks';
|
|
12
12
|
import { WARiskClassCode } from '../../../../models/WA_RISK_CODES';
|
|
13
13
|
export type RequiredValidation = typeof CompensationErrorCodes.REQUIRED;
|
|
14
14
|
export type RateValidation = (typeof CompensationErrorCodes)['REQUIRED' | 'RATE_MINIMUM' | 'RATE_EXEMPT_THRESHOLD'];
|
|
@@ -26,7 +26,7 @@ export type MinimumWageIdFieldProps = HookFieldProps<SelectHookFieldProps<Requir
|
|
|
26
26
|
export declare function MinimumWageIdField(props: MinimumWageIdFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
export type TwoPercentShareholderFieldProps = HookFieldProps<CheckboxHookFieldProps>;
|
|
28
28
|
export declare function TwoPercentShareholderField(props: TwoPercentShareholderFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
export type StateWcCoveredFieldProps = HookFieldProps<RadioGroupHookFieldProps<never,
|
|
29
|
+
export type StateWcCoveredFieldProps = HookFieldProps<RadioGroupHookFieldProps<never, boolean>>;
|
|
30
30
|
export declare function StateWcCoveredField(props: StateWcCoveredFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
31
31
|
export type StateWcClassCodeFieldProps = HookFieldProps<SelectHookFieldProps<RequiredValidation, WARiskClassCode>>;
|
|
32
32
|
export declare function StateWcClassCodeField(props: StateWcClassCodeFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fields.js","sources":["../../../../../src/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.tsx"],"sourcesContent":["import type { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { PaymentUnit } from '@gusto/embedded-api/models/components/compensation'\nimport type {
|
|
1
|
+
{"version":3,"file":"fields.js","sources":["../../../../../src/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.tsx"],"sourcesContent":["import type { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage'\nimport type { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype'\nimport type { PaymentUnit } from '@gusto/embedded-api/models/components/compensation'\nimport type { TextInputHookFieldProps } from '../../form/fields/TextInputHookField'\nimport type { SelectHookFieldProps } from '../../form/fields/SelectHookField'\nimport type { NumberInputHookFieldProps } from '../../form/fields/NumberInputHookField'\nimport type { CheckboxHookFieldProps } from '../../form/fields/CheckboxHookField'\nimport type { RadioGroupHookFieldProps } from '../../form/fields/RadioGroupHookField'\nimport type { DatePickerHookFieldProps } from '../../form/fields/DatePickerHookField'\nimport {\n TextInputHookField,\n SelectHookField,\n NumberInputHookField,\n CheckboxHookField,\n RadioGroupHookField,\n DatePickerHookField,\n} from '../../form/fields'\nimport type { CompensationErrorCodes } from './compensationSchema'\nimport type { HookFieldProps } from '@/types/sdkHooks'\nimport type { WARiskClassCode } from '@/models/WA_RISK_CODES'\n\nexport type RequiredValidation = typeof CompensationErrorCodes.REQUIRED\nexport type RateValidation = (typeof CompensationErrorCodes)[\n | 'REQUIRED'\n | 'RATE_MINIMUM'\n | 'RATE_EXEMPT_THRESHOLD']\n\nexport type JobTitleFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>\n\nexport function JobTitleField(props: JobTitleFieldProps) {\n return <TextInputHookField {...props} name=\"jobTitle\" />\n}\n\nexport type FlsaStatusFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, FlsaStatusType>\n>\n\nexport function FlsaStatusField(props: FlsaStatusFieldProps) {\n return <SelectHookField {...props} name=\"flsaStatus\" />\n}\n\nexport type RateFieldProps = HookFieldProps<NumberInputHookFieldProps<RateValidation>>\n\nexport function RateField(props: RateFieldProps) {\n return <NumberInputHookField {...props} name=\"rate\" format=\"currency\" min={0} />\n}\n\nexport type PaymentUnitFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, PaymentUnit>\n>\n\nexport function PaymentUnitField(props: PaymentUnitFieldProps) {\n return <SelectHookField {...props} name=\"paymentUnit\" />\n}\n\nexport type AdjustForMinimumWageFieldProps = HookFieldProps<CheckboxHookFieldProps>\n\nexport function AdjustForMinimumWageField(props: AdjustForMinimumWageFieldProps) {\n return <CheckboxHookField {...props} name=\"adjustForMinimumWage\" />\n}\n\nexport type MinimumWageIdFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, MinimumWage>\n>\n\nexport function MinimumWageIdField(props: MinimumWageIdFieldProps) {\n return <SelectHookField {...props} name=\"minimumWageId\" />\n}\n\nexport type TwoPercentShareholderFieldProps = HookFieldProps<CheckboxHookFieldProps>\n\nexport function TwoPercentShareholderField(props: TwoPercentShareholderFieldProps) {\n return <CheckboxHookField {...props} name=\"twoPercentShareholder\" />\n}\n\nexport type StateWcCoveredFieldProps = HookFieldProps<RadioGroupHookFieldProps<never, boolean>>\n\nexport function StateWcCoveredField(props: StateWcCoveredFieldProps) {\n return <RadioGroupHookField {...props} name=\"stateWcCovered\" />\n}\n\nexport type StateWcClassCodeFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, WARiskClassCode>\n>\n\nexport function StateWcClassCodeField(props: StateWcClassCodeFieldProps) {\n return <SelectHookField {...props} name=\"stateWcClassCode\" />\n}\n\nexport type StartDateFieldProps = HookFieldProps<\n DatePickerHookFieldProps<typeof CompensationErrorCodes.REQUIRED>\n>\n\nexport function StartDateField(props: StartDateFieldProps) {\n return <DatePickerHookField {...props} name=\"startDate\" />\n}\n"],"names":["JobTitleField","props","jsx","TextInputHookField","FlsaStatusField","SelectHookField","RateField","NumberInputHookField","PaymentUnitField","AdjustForMinimumWageField","CheckboxHookField","MinimumWageIdField","TwoPercentShareholderField","StateWcCoveredField","RadioGroupHookField","StateWcClassCodeField","StartDateField","DatePickerHookField"],"mappings":";;;;;;;AA6BO,SAASA,EAAcC,GAA2B;AACvD,SAAO,gBAAAC,EAACC,GAAA,EAAoB,GAAGF,GAAO,MAAK,YAAW;AACxD;AAMO,SAASG,EAAgBH,GAA6B;AAC3D,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,cAAa;AACvD;AAIO,SAASK,EAAUL,GAAuB;AAC/C,SAAO,gBAAAC,EAACK,KAAsB,GAAGN,GAAO,MAAK,QAAO,QAAO,YAAW,KAAK,EAAA,CAAG;AAChF;AAMO,SAASO,EAAiBP,GAA8B;AAC7D,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,eAAc;AACxD;AAIO,SAASQ,EAA0BR,GAAuC;AAC/E,SAAO,gBAAAC,EAACQ,GAAA,EAAmB,GAAGT,GAAO,MAAK,wBAAuB;AACnE;AAMO,SAASU,EAAmBV,GAAgC;AACjE,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,iBAAgB;AAC1D;AAIO,SAASW,EAA2BX,GAAwC;AACjF,SAAO,gBAAAC,EAACQ,GAAA,EAAmB,GAAGT,GAAO,MAAK,yBAAwB;AACpE;AAIO,SAASY,EAAoBZ,GAAiC;AACnE,SAAO,gBAAAC,EAACY,GAAA,EAAqB,GAAGb,GAAO,MAAK,kBAAiB;AAC/D;AAMO,SAASc,EAAsBd,GAAmC;AACvE,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,oBAAmB;AAC7D;AAMO,SAASe,EAAef,GAA4B;AACzD,SAAO,gBAAAC,EAACe,GAAA,EAAqB,GAAGhB,GAAO,MAAK,aAAY;AAC1D;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./types/i18next.d.ts"
|
|
2
2
|
export { useCompensationForm } from './useCompensationForm';
|
|
3
|
-
export type { CompensationSubmitCallbacks, CompensationSubmitOptions,
|
|
3
|
+
export type { CompensationSubmitCallbacks, CompensationSubmitOptions, UseCompensationFormProps, UseCompensationFormResult, UseCompensationFormReady, CompensationFieldsMetadata, CompensationFormFields, } from './useCompensationForm';
|
|
4
4
|
export { CompensationForm } from './CompensationForm';
|
|
5
5
|
export type { CompensationFormProps } from './CompensationForm';
|
|
6
|
-
export {
|
|
6
|
+
export { createCompensationSchema, CompensationErrorCodes, type CompensationErrorCode, type CompensationOptionalFieldsToRequire, type CompensationFormData, type CompensationFormOutputs, } from './compensationSchema';
|
|
7
7
|
export type { RequiredValidation, RateValidation, StartDateFieldProps, JobTitleFieldProps, FlsaStatusFieldProps, RateFieldProps, PaymentUnitFieldProps, AdjustForMinimumWageFieldProps, MinimumWageIdFieldProps, TwoPercentShareholderFieldProps, StateWcCoveredFieldProps, StateWcClassCodeFieldProps, } from './fields';
|
|
@@ -3,10 +3,9 @@ import { Compensation, PaymentUnit } from '@gusto/embedded-api/models/components
|
|
|
3
3
|
import { Job } from '@gusto/embedded-api/models/components/job';
|
|
4
4
|
import { FlsaStatusType } from '@gusto/embedded-api/models/components/flsastatustype';
|
|
5
5
|
import { MinimumWage } from '@gusto/embedded-api/models/components/minimumwage';
|
|
6
|
-
import {
|
|
7
|
-
import { RequiredFields } from '../../form/resolveRequiredFields';
|
|
8
|
-
import { CompensationField, CompensationFormData } from './compensationSchema';
|
|
6
|
+
import { CompensationOptionalFieldsToRequire, CompensationFormData } from './compensationSchema';
|
|
9
7
|
import { JobTitleField, FlsaStatusField, RateField, PaymentUnitField, AdjustForMinimumWageField, MinimumWageIdField, TwoPercentShareholderField, StateWcCoveredField, StateWcClassCodeField, StartDateField } from './fields';
|
|
8
|
+
import { HookSubmitResult } from '../../../../types/sdkHooks';
|
|
10
9
|
import { WARiskClassCode } from '../../../../models/WA_RISK_CODES';
|
|
11
10
|
export interface CompensationSubmitCallbacks {
|
|
12
11
|
onJobCreated?: (job: Job) => void;
|
|
@@ -17,19 +16,18 @@ export interface CompensationSubmitOptions {
|
|
|
17
16
|
employeeId?: string;
|
|
18
17
|
startDate?: string;
|
|
19
18
|
}
|
|
20
|
-
export type CompensationRequiredFields = RequiredFields<CompensationField>;
|
|
21
19
|
export interface UseCompensationFormProps {
|
|
22
20
|
employeeId?: string;
|
|
23
21
|
withStartDateField?: boolean;
|
|
24
22
|
jobId?: string;
|
|
25
|
-
|
|
23
|
+
optionalFieldsToRequire?: CompensationOptionalFieldsToRequire;
|
|
26
24
|
defaultValues?: Partial<CompensationFormData>;
|
|
27
25
|
validationMode?: UseFormProps['mode'];
|
|
28
26
|
shouldFocusError?: boolean;
|
|
29
27
|
}
|
|
30
|
-
export declare function useCompensationForm({ employeeId, withStartDateField, jobId,
|
|
28
|
+
export declare function useCompensationForm({ employeeId, withStartDateField, jobId, optionalFieldsToRequire, defaultValues: partnerDefaults, validationMode, shouldFocusError, }: UseCompensationFormProps): {
|
|
31
29
|
isLoading: true;
|
|
32
|
-
errorHandling: import('
|
|
30
|
+
errorHandling: import('../../../../types/sdkHooks').HookErrorHandling;
|
|
33
31
|
data?: undefined;
|
|
34
32
|
status?: undefined;
|
|
35
33
|
actions?: undefined;
|
|
@@ -49,7 +47,7 @@ export declare function useCompensationForm({ employeeId, withStartDateField, jo
|
|
|
49
47
|
actions: {
|
|
50
48
|
onSubmit: (callbacks?: CompensationSubmitCallbacks, options?: CompensationSubmitOptions) => Promise<HookSubmitResult<Compensation | undefined> | undefined>;
|
|
51
49
|
};
|
|
52
|
-
errorHandling: import('
|
|
50
|
+
errorHandling: import('../../../../types/sdkHooks').HookErrorHandling;
|
|
53
51
|
form: {
|
|
54
52
|
Fields: {
|
|
55
53
|
StartDate: typeof StartDateField | undefined;
|
|
@@ -64,31 +62,31 @@ export declare function useCompensationForm({ employeeId, withStartDateField, jo
|
|
|
64
62
|
StateWcClassCode: typeof StateWcClassCodeField | undefined;
|
|
65
63
|
};
|
|
66
64
|
fieldsMetadata: {
|
|
67
|
-
startDate: import('
|
|
68
|
-
jobTitle: import('
|
|
69
|
-
flsaStatus: import('
|
|
65
|
+
startDate: import('../../../../types/sdkHooks').FieldMetadata;
|
|
66
|
+
jobTitle: import('../../../../types/sdkHooks').FieldMetadata;
|
|
67
|
+
flsaStatus: import('../../../../types/sdkHooks').FieldMetadataWithOptions<FlsaStatusType>;
|
|
70
68
|
rate: {
|
|
71
69
|
isDisabled: boolean;
|
|
72
70
|
name: string;
|
|
73
71
|
isRequired?: boolean;
|
|
74
72
|
hasRedactedValue?: boolean;
|
|
75
73
|
};
|
|
76
|
-
paymentUnit: import('
|
|
74
|
+
paymentUnit: import('../../../../types/sdkHooks').FieldMetadataWithOptions<PaymentUnit>;
|
|
77
75
|
adjustForMinimumWage: {
|
|
78
76
|
isDisabled: boolean;
|
|
79
77
|
name: string;
|
|
80
78
|
isRequired?: boolean;
|
|
81
79
|
hasRedactedValue?: boolean;
|
|
82
80
|
};
|
|
83
|
-
minimumWageId: import('
|
|
81
|
+
minimumWageId: import('../../../../types/sdkHooks').FieldMetadataWithOptions<MinimumWage>;
|
|
84
82
|
twoPercentShareholder: {
|
|
85
83
|
isDisabled: boolean;
|
|
86
84
|
name: string;
|
|
87
85
|
isRequired?: boolean;
|
|
88
86
|
hasRedactedValue?: boolean;
|
|
89
87
|
};
|
|
90
|
-
stateWcCovered: import('
|
|
91
|
-
stateWcClassCode: import('
|
|
88
|
+
stateWcCovered: import('../../../../types/sdkHooks').FieldMetadataWithOptions<boolean>;
|
|
89
|
+
stateWcClassCode: import('../../../../types/sdkHooks').FieldMetadataWithOptions<WARiskClassCode>;
|
|
92
90
|
};
|
|
93
91
|
hookFormInternals: {
|
|
94
92
|
formMethods: import('react-hook-form').UseFormReturn<CompensationFormData, unknown, CompensationFormData>;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
import { useForm as
|
|
3
|
-
import { zodResolver as
|
|
4
|
-
import { useJobsAndCompensationsGetJobs as
|
|
5
|
-
import { useJobsAndCompensationsCreateJobMutation as
|
|
6
|
-
import { useJobsAndCompensationsUpdateMutation as
|
|
7
|
-
import { useJobsAndCompensationsUpdateCompensationMutation as
|
|
8
|
-
import { useLocationsGetMinimumWages as
|
|
9
|
-
import { useEmployeeAddressesGetWorkAddresses as
|
|
10
|
-
import { useEmployeesGet as
|
|
11
|
-
import { useFederalTaxDetailsGet as
|
|
12
|
-
import {
|
|
13
|
-
import { withOptions as f } from "../../form/withOptions.js";
|
|
14
|
-
import { deriveFieldsMetadata as we } from "../../form/deriveFieldsMetadata.js";
|
|
1
|
+
import { useMemo as M, useEffect as Ee } from "react";
|
|
2
|
+
import { useForm as Oe, useWatch as w } from "react-hook-form";
|
|
3
|
+
import { zodResolver as he } from "@hookform/resolvers/zod";
|
|
4
|
+
import { useJobsAndCompensationsGetJobs as Ue } from "@gusto/embedded-api/react-query/jobsAndCompensationsGetJobs";
|
|
5
|
+
import { useJobsAndCompensationsCreateJobMutation as Fe } from "@gusto/embedded-api/react-query/jobsAndCompensationsCreateJob";
|
|
6
|
+
import { useJobsAndCompensationsUpdateMutation as Pe } from "@gusto/embedded-api/react-query/jobsAndCompensationsUpdate";
|
|
7
|
+
import { useJobsAndCompensationsUpdateCompensationMutation as De } from "@gusto/embedded-api/react-query/jobsAndCompensationsUpdateCompensation";
|
|
8
|
+
import { useLocationsGetMinimumWages as Ae } from "@gusto/embedded-api/react-query/locationsGetMinimumWages";
|
|
9
|
+
import { useEmployeeAddressesGetWorkAddresses as Te } from "@gusto/embedded-api/react-query/employeeAddressesGetWorkAddresses";
|
|
10
|
+
import { useEmployeesGet as Ne } from "@gusto/embedded-api/react-query/employeesGet";
|
|
11
|
+
import { useFederalTaxDetailsGet as we } from "@gusto/embedded-api/react-query/federalTaxDetailsGet";
|
|
12
|
+
import { withOptions as S } from "../../form/withOptions.js";
|
|
15
13
|
import { createGetFormSubmissionValues as je } from "../../form/getFormSubmissionValues.js";
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
14
|
+
import { useDeriveFieldsMetadata as Ie } from "../../form/useDeriveFieldsMetadata.js";
|
|
15
|
+
import { createCompensationSchema as Le } from "./compensationSchema.js";
|
|
16
|
+
import { StateWcClassCodeField as Je, StateWcCoveredField as _e, TwoPercentShareholderField as Re, MinimumWageIdField as Ve, AdjustForMinimumWageField as Ye, PaymentUnitField as qe, RateField as He, FlsaStatusField as ke, JobTitleField as Xe, StartDateField as xe } from "./fields.js";
|
|
17
|
+
import { useErrorHandling as Ge } from "../../../../hooks/useErrorHandling.js";
|
|
18
|
+
import { PAY_PERIODS as u, FlsaStatus as a, TIP_CREDITS_UNSUPPORTED_STATES as Ke } from "../../../../shared/constants.js";
|
|
19
|
+
import { useBaseSubmit as Qe } from "../../../Base/useBaseSubmit.js";
|
|
20
20
|
import { SDKInternalError as Z } from "../../../../types/sdkError.js";
|
|
21
21
|
import { WA_RISK_CLASS_CODES as ee } from "../../../../models/WA_RISK_CODES.js";
|
|
22
|
-
function
|
|
23
|
-
return e?.compensations?.find((
|
|
22
|
+
function $e(e) {
|
|
23
|
+
return e?.compensations?.find((d) => d.uuid === e.currentCompensationUuid);
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return e.reduce((
|
|
27
|
-
const
|
|
25
|
+
function Be(e) {
|
|
26
|
+
return e.reduce((d, l) => {
|
|
27
|
+
const f = l.compensations?.find(
|
|
28
28
|
(c) => c.uuid === l.currentCompensationUuid
|
|
29
29
|
);
|
|
30
|
-
return !l.primary || !
|
|
30
|
+
return !l.primary || !f ? d : f.flsaStatus ?? d;
|
|
31
31
|
}, void 0);
|
|
32
32
|
}
|
|
33
|
-
const te = Object.keys(
|
|
33
|
+
const te = Object.keys(a).map((e) => a[e]), ze = te.map((e) => ({
|
|
34
34
|
value: e,
|
|
35
35
|
label: e
|
|
36
36
|
})), oe = [
|
|
@@ -39,41 +39,40 @@ const te = Object.keys(s).map((e) => s[e]), $e = te.map((e) => ({
|
|
|
39
39
|
u.MONTH,
|
|
40
40
|
u.YEAR,
|
|
41
41
|
u.PAYCHECK
|
|
42
|
-
],
|
|
42
|
+
], Ze = oe.map((e) => ({
|
|
43
43
|
value: e,
|
|
44
44
|
label: e
|
|
45
45
|
}));
|
|
46
|
-
function
|
|
46
|
+
function Ot({
|
|
47
47
|
employeeId: e,
|
|
48
|
-
withStartDateField:
|
|
48
|
+
withStartDateField: d = !0,
|
|
49
49
|
jobId: l,
|
|
50
|
-
|
|
50
|
+
optionalFieldsToRequire: f,
|
|
51
51
|
defaultValues: c,
|
|
52
|
-
validationMode:
|
|
53
|
-
shouldFocusError:
|
|
52
|
+
validationMode: se = "onSubmit",
|
|
53
|
+
shouldFocusError: ae = !0
|
|
54
54
|
}) {
|
|
55
|
-
const
|
|
55
|
+
const E = Ue(
|
|
56
56
|
{ employeeId: e ?? "" },
|
|
57
57
|
{ enabled: !!e }
|
|
58
|
-
),
|
|
58
|
+
), O = Te(
|
|
59
59
|
{ employeeId: e ?? "" },
|
|
60
60
|
{ enabled: !!e }
|
|
61
|
-
), h =
|
|
62
|
-
{ locationUuid:
|
|
63
|
-
{ enabled: !!
|
|
64
|
-
),
|
|
65
|
-
{ companyId:
|
|
66
|
-
{ enabled: !!
|
|
67
|
-
), W =
|
|
61
|
+
), h = Ne({ employeeId: e ?? "" }, { enabled: !!e }), n = E.data?.jobList, j = O.data?.employeeWorkAddressesList?.find((t) => t.active), I = j?.locationUuid, L = h.data?.employee, U = L?.companyUuid, F = Ae(
|
|
62
|
+
{ locationUuid: I ?? "" },
|
|
63
|
+
{ enabled: !!I }
|
|
64
|
+
), P = we(
|
|
65
|
+
{ companyId: U ?? "" },
|
|
66
|
+
{ enabled: !!U }
|
|
67
|
+
), W = F.data?.minimumWageList ?? [], J = P.data?.federalTaxDetails, _ = J?.taxableAsScorp === !0, o = M(() => n ? l ? n.find((t) => t.uuid === l) ?? null : n.length === 1 ? n[0] ?? null : null : null, [n, l]), C = M(() => $e(o), [o]), ne = M(() => {
|
|
68
68
|
if (n)
|
|
69
|
-
return
|
|
70
|
-
}, [n]), b = !o,
|
|
71
|
-
mode:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}), T = O?.state, ie = o?.hireDate, y = {
|
|
69
|
+
return Be(n);
|
|
70
|
+
}, [n]), b = !o, R = b ? "create" : "update", [V, ie] = M(
|
|
71
|
+
() => Le({ mode: R, optionalFieldsToRequire: f, withStartDateField: d }),
|
|
72
|
+
[R, f, d]
|
|
73
|
+
), D = j?.state, re = o?.hireDate, y = {
|
|
75
74
|
jobTitle: o?.title || c?.jobTitle || "",
|
|
76
|
-
flsaStatus: C?.flsaStatus ?? ne ?? c?.flsaStatus ??
|
|
75
|
+
flsaStatus: C?.flsaStatus ?? ne ?? c?.flsaStatus ?? a.NONEXEMPT,
|
|
77
76
|
rate: Number(C?.rate ?? c?.rate ?? 0),
|
|
78
77
|
adjustForMinimumWage: C?.adjustForMinimumWage ?? !1,
|
|
79
78
|
minimumWageId: C?.minimumWages?.[0]?.uuid ?? "",
|
|
@@ -81,80 +80,80 @@ function gt({
|
|
|
81
80
|
stateWcCovered: o?.stateWcCovered ?? !1,
|
|
82
81
|
stateWcClassCode: o?.stateWcClassCode ?? "",
|
|
83
82
|
twoPercentShareholder: o?.twoPercentShareholder ?? !1,
|
|
84
|
-
startDate:
|
|
85
|
-
},
|
|
86
|
-
resolver:
|
|
87
|
-
mode:
|
|
88
|
-
shouldFocusError:
|
|
83
|
+
startDate: re ?? c?.startDate ?? null
|
|
84
|
+
}, s = Oe({
|
|
85
|
+
resolver: he(V),
|
|
86
|
+
mode: se,
|
|
87
|
+
shouldFocusError: ae,
|
|
89
88
|
defaultValues: y,
|
|
90
89
|
values: y,
|
|
91
90
|
resetOptions: { keepDirtyValues: !0 }
|
|
92
|
-
}),
|
|
93
|
-
control:
|
|
91
|
+
}), m = w({
|
|
92
|
+
control: s.control,
|
|
94
93
|
name: "flsaStatus"
|
|
95
|
-
}),
|
|
96
|
-
control:
|
|
94
|
+
}), de = w({
|
|
95
|
+
control: s.control,
|
|
97
96
|
name: "adjustForMinimumWage"
|
|
98
|
-
}),
|
|
99
|
-
control:
|
|
97
|
+
}), me = w({
|
|
98
|
+
control: s.control,
|
|
100
99
|
name: "stateWcCovered"
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}, [
|
|
105
|
-
const
|
|
100
|
+
}), ue = String(me) === "true";
|
|
101
|
+
Ee(() => {
|
|
102
|
+
m === a.OWNER ? s.setValue("paymentUnit", u.PAYCHECK) : m === a.COMMISSION_ONLY_NONEXEMPT || m === a.COMMISSION_ONLY_EXEMPT ? (s.setValue("paymentUnit", u.YEAR), s.setValue("rate", 0)) : s.setValue("paymentUnit", y.paymentUnit);
|
|
103
|
+
}, [m, s.setValue, y.paymentUnit]);
|
|
104
|
+
const Y = De(), q = Fe(), H = Pe(), le = Y.isPending || q.isPending || H.isPending, { baseSubmitHandler: ce, error: pe, setError: Ce } = Qe("CompensationForm"), k = Ge(e ? [E, O, h, F, P] : [], { error: pe, setError: Ce }), X = m === a.COMMISSION_ONLY_NONEXEMPT || m === a.COMMISSION_ONLY_EXEMPT, fe = m === a.OWNER, Se = m !== a.NONEXEMPT || o?.primary === !0 || b, A = m === a.NONEXEMPT && W.length > 0 && D !== void 0 && !Ke.includes(D), v = D === "WA", We = W.map((t) => ({
|
|
106
105
|
value: t.uuid,
|
|
107
106
|
label: `${t.wage} - ${t.authority}: ${t.notes ?? ""}`
|
|
108
|
-
})),
|
|
107
|
+
})), be = ee.map(({ code: t, description: g }) => ({
|
|
109
108
|
value: t,
|
|
110
|
-
label: `${t}: ${
|
|
111
|
-
})), i =
|
|
109
|
+
label: `${t}: ${g}`
|
|
110
|
+
})), i = Ie(ie, s.control), ye = {
|
|
112
111
|
startDate: i.startDate,
|
|
113
112
|
jobTitle: i.jobTitle,
|
|
114
|
-
flsaStatus:
|
|
113
|
+
flsaStatus: S(
|
|
115
114
|
i.flsaStatus,
|
|
116
|
-
|
|
115
|
+
ze,
|
|
117
116
|
te
|
|
118
117
|
),
|
|
119
|
-
rate: { ...i.rate, isDisabled:
|
|
120
|
-
paymentUnit:
|
|
121
|
-
{ ...i.paymentUnit, isDisabled:
|
|
122
|
-
|
|
118
|
+
rate: { ...i.rate, isDisabled: X },
|
|
119
|
+
paymentUnit: S(
|
|
120
|
+
{ ...i.paymentUnit, isDisabled: fe || X },
|
|
121
|
+
Ze,
|
|
123
122
|
oe
|
|
124
123
|
),
|
|
125
124
|
adjustForMinimumWage: {
|
|
126
125
|
...i.adjustForMinimumWage,
|
|
127
126
|
isDisabled: !A
|
|
128
127
|
},
|
|
129
|
-
minimumWageId:
|
|
128
|
+
minimumWageId: S(
|
|
130
129
|
i.minimumWageId,
|
|
131
|
-
|
|
130
|
+
We,
|
|
132
131
|
W
|
|
133
132
|
),
|
|
134
133
|
twoPercentShareholder: {
|
|
135
134
|
...i.twoPercentShareholder,
|
|
136
|
-
isDisabled: !
|
|
135
|
+
isDisabled: !_
|
|
137
136
|
},
|
|
138
|
-
stateWcCovered:
|
|
137
|
+
stateWcCovered: S(
|
|
139
138
|
{ ...i.stateWcCovered, isDisabled: !v },
|
|
140
139
|
[
|
|
141
140
|
{ label: "Yes", value: "true" },
|
|
142
141
|
{ label: "No", value: "false" }
|
|
143
142
|
],
|
|
144
|
-
[
|
|
143
|
+
[!0, !1]
|
|
145
144
|
),
|
|
146
|
-
stateWcClassCode:
|
|
145
|
+
stateWcClassCode: S(
|
|
147
146
|
{ ...i.stateWcClassCode, isDisabled: !v },
|
|
148
|
-
|
|
147
|
+
be,
|
|
149
148
|
ee
|
|
150
149
|
)
|
|
151
|
-
},
|
|
150
|
+
}, ve = async (t, g) => {
|
|
152
151
|
let x;
|
|
153
152
|
return await new Promise((G) => {
|
|
154
|
-
|
|
155
|
-
async (
|
|
156
|
-
await
|
|
157
|
-
const K =
|
|
153
|
+
s.handleSubmit(
|
|
154
|
+
async (ge) => {
|
|
155
|
+
await ce(ge, async (Me) => {
|
|
156
|
+
const K = g?.employeeId ?? e;
|
|
158
157
|
if (!K)
|
|
159
158
|
throw new Z("employeeId is required to submit compensation");
|
|
160
159
|
const {
|
|
@@ -162,7 +161,7 @@ function gt({
|
|
|
162
161
|
twoPercentShareholder: $,
|
|
163
162
|
startDate: B,
|
|
164
163
|
...r
|
|
165
|
-
} =
|
|
164
|
+
} = Me, T = d && B ? B : g?.startDate;
|
|
166
165
|
let p;
|
|
167
166
|
if (o)
|
|
168
167
|
p = (await H.mutateAsync({
|
|
@@ -171,36 +170,36 @@ function gt({
|
|
|
171
170
|
requestBody: {
|
|
172
171
|
title: Q,
|
|
173
172
|
version: o.version,
|
|
174
|
-
hireDate:
|
|
173
|
+
hireDate: T,
|
|
175
174
|
stateWcClassCode: r.stateWcCovered ? r.stateWcClassCode : null,
|
|
176
175
|
stateWcCovered: r.stateWcCovered,
|
|
177
|
-
twoPercentShareholder: $
|
|
176
|
+
twoPercentShareholder: $
|
|
178
177
|
}
|
|
179
178
|
}
|
|
180
179
|
})).job, t?.onJobUpdated?.(p);
|
|
181
180
|
else {
|
|
182
|
-
if (!
|
|
181
|
+
if (!T)
|
|
183
182
|
throw new Z("Start date is required");
|
|
184
|
-
p = (await
|
|
183
|
+
p = (await q.mutateAsync({
|
|
185
184
|
request: {
|
|
186
185
|
employeeId: K,
|
|
187
186
|
requestBody: {
|
|
188
187
|
title: Q,
|
|
189
|
-
hireDate:
|
|
188
|
+
hireDate: T,
|
|
190
189
|
stateWcCovered: r.stateWcCovered,
|
|
191
190
|
stateWcClassCode: r.stateWcCovered ? r.stateWcClassCode : null,
|
|
192
|
-
twoPercentShareholder: $
|
|
191
|
+
twoPercentShareholder: $
|
|
193
192
|
}
|
|
194
193
|
}
|
|
195
194
|
})).job, t?.onJobCreated?.(p);
|
|
196
195
|
}
|
|
197
|
-
const { compensation: z } = await
|
|
196
|
+
const { compensation: z } = await Y.mutateAsync({
|
|
198
197
|
request: {
|
|
199
198
|
compensationId: p.currentCompensationUuid,
|
|
200
199
|
compensationsUpdateRequestBody: {
|
|
201
200
|
// eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
|
|
202
201
|
version: p.compensations?.find(
|
|
203
|
-
(
|
|
202
|
+
(N) => N.uuid === p.currentCompensationUuid
|
|
204
203
|
)?.version,
|
|
205
204
|
...r,
|
|
206
205
|
rate: String(r.rate),
|
|
@@ -220,7 +219,7 @@ function gt({
|
|
|
220
219
|
)();
|
|
221
220
|
}), x;
|
|
222
221
|
};
|
|
223
|
-
return (e ?
|
|
222
|
+
return (e ? E.isLoading || O.isLoading || h.isLoading || F.isLoading || P.isLoading : !1) || e && (!n || !L || !U || !J) ? { isLoading: !0, errorHandling: k } : {
|
|
224
223
|
isLoading: !1,
|
|
225
224
|
data: {
|
|
226
225
|
compensation: C ?? null,
|
|
@@ -229,31 +228,31 @@ function gt({
|
|
|
229
228
|
minimumWages: W
|
|
230
229
|
},
|
|
231
230
|
status: {
|
|
232
|
-
isPending:
|
|
231
|
+
isPending: le,
|
|
233
232
|
mode: b ? "create" : "update"
|
|
234
233
|
},
|
|
235
|
-
actions: { onSubmit:
|
|
236
|
-
errorHandling:
|
|
234
|
+
actions: { onSubmit: ve },
|
|
235
|
+
errorHandling: k,
|
|
237
236
|
form: {
|
|
238
237
|
Fields: {
|
|
239
|
-
StartDate:
|
|
238
|
+
StartDate: d ? xe : void 0,
|
|
240
239
|
JobTitle: Xe,
|
|
241
|
-
FlsaStatus:
|
|
242
|
-
Rate:
|
|
243
|
-
PaymentUnit:
|
|
244
|
-
AdjustForMinimumWage: A ?
|
|
245
|
-
MinimumWageId: A &&
|
|
246
|
-
TwoPercentShareholder:
|
|
247
|
-
StateWcCovered: v ?
|
|
248
|
-
StateWcClassCode: v &&
|
|
240
|
+
FlsaStatus: Se ? ke : void 0,
|
|
241
|
+
Rate: He,
|
|
242
|
+
PaymentUnit: qe,
|
|
243
|
+
AdjustForMinimumWage: A ? Ye : void 0,
|
|
244
|
+
MinimumWageId: A && de ? Ve : void 0,
|
|
245
|
+
TwoPercentShareholder: _ ? Re : void 0,
|
|
246
|
+
StateWcCovered: v ? _e : void 0,
|
|
247
|
+
StateWcClassCode: v && ue ? Je : void 0
|
|
249
248
|
},
|
|
250
|
-
fieldsMetadata:
|
|
251
|
-
hookFormInternals: { formMethods:
|
|
252
|
-
getFormSubmissionValues: je(
|
|
249
|
+
fieldsMetadata: ye,
|
|
250
|
+
hookFormInternals: { formMethods: s },
|
|
251
|
+
getFormSubmissionValues: je(s, V)
|
|
253
252
|
}
|
|
254
253
|
};
|
|
255
254
|
}
|
|
256
255
|
export {
|
|
257
|
-
|
|
256
|
+
Ot as useCompensationForm
|
|
258
257
|
};
|
|
259
258
|
//# sourceMappingURL=useCompensationForm.js.map
|