@gusto/embedded-react-sdk 0.43.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +100 -0
- package/README.md +23 -5
- package/dist/assets/icons/edit-02.svg.js +10 -0
- package/dist/assets/icons/edit-02.svg.js.map +1 -0
- package/dist/components/Common/DataView/DataTable/DataTable.js +86 -64
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.js +52 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.js.map +1 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.module.scss.js +18 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.module.scss.js.map +1 -0
- package/dist/components/Common/Fields/hooks/FieldElementRegistryProvider.d.ts +13 -0
- package/dist/components/Common/Fields/hooks/FieldElementRegistryProvider.js +12 -0
- package/dist/components/Common/Fields/hooks/FieldElementRegistryProvider.js.map +1 -0
- package/dist/components/Common/Fields/hooks/fieldElementRegistry.d.ts +21 -0
- package/dist/components/Common/Fields/hooks/fieldElementRegistry.js +29 -0
- package/dist/components/Common/Fields/hooks/fieldElementRegistry.js.map +1 -0
- package/dist/components/Common/Fields/hooks/useField.js +43 -37
- package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
- package/dist/components/Common/Flex/Flex.d.ts +2 -1
- package/dist/components/Common/Flex/Flex.js +14 -12
- package/dist/components/Common/Flex/Flex.js.map +1 -1
- package/dist/components/Common/Flex/Flex.module.scss.js +4 -4
- package/dist/components/Common/TaxInputs/TaxInputs.js +1 -1
- package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
- package/dist/components/Common/UI/Button/Button.module.scss.js +2 -2
- package/dist/components/Common/UI/Dialog/Dialog.js +35 -36
- package/dist/components/Common/UI/Dialog/Dialog.js.map +1 -1
- package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +2 -2
- package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -7
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -2
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +6 -7
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +2 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +6 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +9 -10
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +6 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +8 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +6 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -7
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -3
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +6 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js +26 -25
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/useSignCompanyForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +6 -5
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -3
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +3 -2
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +11 -8
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +3 -2
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +9 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +5 -4
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +4 -5
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +12 -13
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/index.d.ts +2 -0
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +6 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +7 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +8 -7
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -7
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +6 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +11 -10
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +3 -2
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -3
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +6 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.js +2 -3
- package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleList.js +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js +53 -52
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +12 -11
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +67 -63
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +6 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.d.ts +2 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js +6 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/rhfKey.js.map +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +57 -26
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +6 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/exports/companyOnboarding.d.ts +3 -0
- package/dist/components/Company/exports/companyOnboarding.js +21 -15
- package/dist/components/Company/exports/companyOnboarding.js.map +1 -1
- package/dist/components/Company/index.d.ts +1 -0
- package/dist/components/Company/index.js +14 -12
- package/dist/components/Company/index.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +3 -4
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +6 -7
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/Head.js +7 -6
- package/dist/components/Contractor/Address/Head.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +8 -5
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +17 -17
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +3 -2
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +3 -2
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +2 -3
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +6 -5
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +3 -2
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +3 -2
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +3 -2
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +8 -7
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +34 -33
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +1 -1
- package/dist/components/Employee/Compensation/Compensation.d.ts +7 -4
- package/dist/components/Employee/Compensation/Compensation.js +72 -179
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/CompensationFlowComponents.d.ts +27 -0
- package/dist/components/Employee/Compensation/CompensationFlowComponents.js +61 -0
- package/dist/components/Employee/Compensation/CompensationFlowComponents.js.map +1 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.d.ts +14 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js +128 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensation.js.map +1 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.d.ts +17 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js +224 -0
- package/dist/components/Employee/Compensation/EditCompensation/EditCompensationPresentation.js.map +1 -0
- package/dist/components/Employee/Compensation/EditCompensation/index.d.ts +5 -0
- package/dist/components/Employee/Compensation/JobsList/JobsList.d.ts +5 -0
- package/dist/components/Employee/Compensation/JobsList/JobsList.js +47 -0
- package/dist/components/Employee/Compensation/JobsList/JobsList.js.map +1 -0
- package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.d.ts +11 -0
- package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js +98 -0
- package/dist/components/Employee/Compensation/JobsList/JobsListPresentation.js.map +1 -0
- package/dist/components/Employee/Compensation/JobsList/index.d.ts +5 -0
- package/dist/components/Employee/Compensation/{useCompensation.d.ts → compensationSchema.d.ts} +0 -22
- package/dist/components/Employee/Compensation/{useCompensation.js → compensationSchema.js} +9 -12
- package/dist/components/Employee/Compensation/compensationSchema.js.map +1 -0
- package/dist/components/Employee/Compensation/compensationStateMachine.d.ts +6 -0
- package/dist/components/Employee/Compensation/compensationStateMachine.js +73 -0
- package/dist/components/Employee/Compensation/compensationStateMachine.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +62 -36
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +81 -57
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +5 -12
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +22 -35
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/index.d.ts +5 -3
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.d.ts +55 -13
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +216 -226
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.d.ts +15 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js +27 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCurrentCompensationForm.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.d.ts +19 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +29 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/index.d.ts +7 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.d.ts +43 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js +37 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/jobSchema.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.d.ts +13 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js +26 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useCurrentJobForm.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +56 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +180 -0
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -0
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +15 -13
- package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +3 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.js +33 -15
- package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
- package/dist/components/Employee/Dashboard/DocumentsView.js +13 -11
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.js +11 -9
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
- package/dist/components/Employee/Dashboard/TaxesView.js +21 -19
- package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +3 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +54 -33
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +14 -11
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +36 -33
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +6 -3
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +2 -3
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +7 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +7 -8
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +6 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +3 -2
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js +69 -68
- package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +3 -2
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js +8 -7
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -1
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js +18 -17
- package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/index.d.ts +3 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.d.ts +8 -0
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js +71 -0
- package/dist/components/Employee/FederalTaxes/management/FederalTaxes.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/management/index.d.ts +2 -0
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.d.ts +8 -0
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +55 -0
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/onboarding/index.d.ts +2 -0
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.d.ts +15 -0
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +104 -0
- package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/shared/index.d.ts +3 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.d.ts +41 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js +40 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.d.ts +18 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +31 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js.map +1 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/index.d.ts +5 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.d.ts +37 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js +140 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/useFederalTaxesForm.js.map +1 -0
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +2 -3
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +8 -8
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +2 -2
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +4 -4
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +8 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/management/Profile.d.ts +6 -0
- package/dist/components/Employee/Profile/management/Profile.js +122 -0
- package/dist/components/Employee/Profile/management/Profile.js.map +1 -0
- package/dist/components/Employee/Profile/management/Profile.module.scss.js +8 -0
- package/dist/components/Employee/Profile/management/Profile.module.scss.js.map +1 -0
- package/dist/components/Employee/Profile/{AdminProfile.js → onboarding/AdminProfile.js} +15 -15
- package/dist/components/Employee/Profile/onboarding/AdminProfile.js.map +1 -0
- package/dist/components/Employee/Profile/{EmployeeProfile.js → onboarding/EmployeeProfile.js} +14 -14
- package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js.map +1 -0
- package/dist/components/Employee/Profile/{Profile.d.ts → onboarding/Profile.d.ts} +2 -2
- package/dist/components/Employee/Profile/{Profile.js → onboarding/Profile.js} +4 -4
- package/dist/components/Employee/Profile/onboarding/Profile.js.map +1 -0
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +9 -4
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js +61 -58
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +40 -39
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +47 -46
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +14 -14
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/StateTaxes/index.d.ts +2 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxes.d.ts +6 -0
- package/dist/components/Employee/StateTaxes/management/StateTaxes.js +59 -0
- package/dist/components/Employee/StateTaxes/management/StateTaxes.js.map +1 -0
- package/dist/components/Employee/StateTaxes/management/index.d.ts +2 -0
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.d.ts +8 -0
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +49 -0
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -0
- package/dist/components/Employee/StateTaxes/onboarding/index.d.ts +2 -0
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.d.ts +14 -0
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +32 -0
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -0
- package/dist/components/Employee/StateTaxes/shared/index.d.ts +3 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/__fixtures__/stateTaxesFixtures.d.ts +8 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/__fixtures__/toWireFormat.d.ts +36 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.d.ts +56 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.js +116 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.js.map +1 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.d.ts +12 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +76 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js.map +1 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.d.ts +14 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.js +23 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMapping.js.map +1 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldMeta.d.ts +6 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldProps.d.ts +39 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.d.ts +46 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js +93 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fields.js.map +1 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/index.d.ts +6 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.d.ts +36 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js +159 -0
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/useEmployeeStateTaxesForm.js.map +1 -0
- package/dist/components/Employee/Taxes/Actions.js +9 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +5 -4
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +6 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +3 -2
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +4 -4
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +3 -2
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +2 -3
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
- package/dist/components/Employee/exports/employeeManagement.d.ts +3 -0
- package/dist/components/Employee/exports/employeeManagement.js +16 -10
- package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
- package/dist/components/Employee/exports/employeeOnboarding.d.ts +3 -3
- package/dist/components/Employee/exports/employeeOnboarding.js +19 -19
- package/dist/components/Employee/index.d.ts +2 -1
- package/dist/components/Employee/index.js +37 -37
- package/dist/components/Flow/FlowHeader.js +8 -8
- package/dist/components/Flow/FlowHeader.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +47 -46
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +4 -4
- package/dist/components/InformationRequests/InformationRequests.js +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +3 -2
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +22 -20
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +3 -2
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +1 -0
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +7 -6
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +3 -2
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +9 -8
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +2 -3
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +2 -3
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +17 -16
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +3 -2
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +3 -2
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +2 -3
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +3 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +4 -4
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +6 -6
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +3 -2
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +3 -2
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +13 -10
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +2 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/AddEmployeesToPolicy/AddEmployeesToPolicy.js +3 -2
- package/dist/components/TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.d.ts +6 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js +149 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetail.js.map +1 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.d.ts +2 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +80 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailTypes.d.ts +21 -0
- package/dist/components/TimeOff/HolidayPolicyDetail/index.d.ts +5 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/HolidaySelectionForm/HolidaySelectionForm.d.ts +1 -0
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +115 -0
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/HolidaySelectionForm/HolidaySelectionFormPresentation.js +9 -7
- package/dist/components/TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +2 -0
- package/dist/components/TimeOff/PolicyList/PolicyList.js +103 -0
- package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -0
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +135 -0
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyListTypes.d.ts +1 -1
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js +70 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettings.js.map +1 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettings.module.scss.js +16 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js +164 -0
- package/dist/components/TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettingsTypes.d.ts +1 -1
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +31 -0
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyTypeSelector/PolicyTypeSelectorPresentation.d.ts +1 -1
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +68 -0
- package/dist/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyTypeSelector/PolicyTypeSelectorTypes.d.ts +1 -0
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/TimeOffFlowComponents.d.ts +3 -3
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js +117 -0
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -0
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.d.ts +9 -0
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.js +25 -0
- package/dist/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/timeOffStateMachine.d.ts +4 -2
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +487 -0
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.d.ts +1 -0
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +158 -0
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +85 -76
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.d.ts +6 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +143 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +2 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +103 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +41 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.d.ts +9 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +216 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/SelectEmployees/useSelectEmployeesData.d.ts +2 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +64 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.d.ts +9 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +56 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.d.ts +5 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +251 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js +10 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.module.scss.js.map +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.d.ts +2 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +143 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailTypes.d.ts +52 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/index.d.ts +7 -0
- package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js +9 -0
- package/dist/components/TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +1 -0
- package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.d.ts +6 -0
- package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.js +9 -0
- package/dist/components/TimeOff/ViewHolidayPolicyDetails/ViewHolidayPolicyDetails.js.map +1 -0
- package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js +9 -0
- package/dist/components/TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/index.d.ts +5 -4
- package/dist/components/TimeOff/index.js +27 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +2 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +95 -0
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/EmployeeTable/EmployeeTableTypes.d.ts +2 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.d.ts +3 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +86 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayoutTypes.d.ts +27 -0
- package/dist/components/TimeOff/shared/PolicyDetailLayout/index.d.ts +3 -0
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/holidayHelpers.d.ts +1 -1
- package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/holidayHelpers.js +8 -8
- package/dist/components/TimeOff/shared/holidayHelpers.js.map +1 -0
- package/dist/components/TimeOff/shared/holidayHelpers.test.d.ts +1 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +11 -10
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +2 -0
- package/dist/helpers/dateFormatting.js +4 -0
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/i18n/I18n.js +11 -10
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.StateTaxes.json.js +1 -1
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +12 -14
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +18 -16
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js +14 -0
- package/dist/i18n/en/Company.TimeOff.PolicyDetail.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +24 -16
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +14 -14
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +46 -42
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js.map +1 -1
- package/dist/i18n/en/Employee.FederalTaxes.json.js +16 -10
- package/dist/i18n/en/Employee.FederalTaxes.json.js.map +1 -1
- package/dist/i18n/en/Employee.Profile.json.js +24 -20
- package/dist/i18n/en/Employee.Profile.json.js.map +1 -1
- package/dist/i18n/en/Employee.StateTaxes.json.js +14 -6
- package/dist/i18n/en/Employee.StateTaxes.json.js.map +1 -1
- package/dist/i18n/en/Payroll.GrossUpModal.json.js +12 -10
- package/dist/i18n/en/Payroll.GrossUpModal.json.js.map +1 -1
- package/dist/index.d.ts +8 -2
- package/dist/index.js +118 -93
- package/dist/index.js.map +1 -1
- package/dist/partner-hook-utils/form/SDKFormProvider.js +18 -14
- package/dist/partner-hook-utils/form/SDKFormProvider.js.map +1 -1
- package/dist/partner-hook-utils/form/buildFormSchema.js +41 -41
- package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -1
- package/dist/partner-hook-utils/form/composeSubmitHandler.d.ts +10 -6
- package/dist/partner-hook-utils/form/composeSubmitHandler.js +49 -26
- package/dist/partner-hook-utils/form/composeSubmitHandler.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +27 -23
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +33 -29
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +37 -33
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +32 -28
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SelectHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/SelectHookField.js +34 -30
- package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SwitchHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js +23 -19
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/TextInputHookField.d.ts +1 -1
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js +31 -27
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/withFieldElementRegistry.d.ts +10 -0
- package/dist/partner-hook-utils/form/fields/withFieldElementRegistry.js +9 -0
- package/dist/partner-hook-utils/form/fields/withFieldElementRegistry.js.map +1 -0
- package/dist/partner-hook-utils/form/index.d.ts +3 -0
- package/dist/partner-hook-utils/form/resolveFieldError.js +10 -7
- package/dist/partner-hook-utils/form/resolveFieldError.js.map +1 -1
- package/dist/partner-hook-utils/form/useFieldErrorMessage.js +10 -7
- package/dist/partner-hook-utils/form/useFieldErrorMessage.js.map +1 -1
- package/dist/partner-hook-utils/form/useHookFieldResolution.d.ts +10 -3
- package/dist/partner-hook-utils/form/useHookFieldResolution.js +6 -6
- package/dist/partner-hook-utils/form/useHookFieldResolution.js.map +1 -1
- package/dist/partner-hook-utils/form/useHookFormInternals.d.ts +22 -0
- package/dist/partner-hook-utils/form/useHookFormInternals.js +12 -0
- package/dist/partner-hook-utils/form/useHookFormInternals.js.map +1 -0
- package/dist/partner-hook-utils/types.d.ts +15 -0
- package/dist/shared/constants.d.ts +22 -0
- package/dist/shared/constants.js +41 -30
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +62 -14
- package/docs/reference/endpoint-inventory.json +313 -122
- package/package.json +18 -16
- package/dist/components/Employee/Compensation/Actions.d.ts +0 -1
- package/dist/components/Employee/Compensation/Actions.js +0 -39
- package/dist/components/Employee/Compensation/Actions.js.map +0 -1
- package/dist/components/Employee/Compensation/Edit.d.ts +0 -5
- package/dist/components/Employee/Compensation/Edit.js +0 -179
- package/dist/components/Employee/Compensation/Edit.js.map +0 -1
- package/dist/components/Employee/Compensation/Head.d.ts +0 -1
- package/dist/components/Employee/Compensation/Head.js +0 -22
- package/dist/components/Employee/Compensation/Head.js.map +0 -1
- package/dist/components/Employee/Compensation/List.d.ts +0 -1
- package/dist/components/Employee/Compensation/List.js +0 -72
- package/dist/components/Employee/Compensation/List.js.map +0 -1
- package/dist/components/Employee/Compensation/useCompensation.js.map +0 -1
- package/dist/components/Employee/FederalTaxes/Actions.d.ts +0 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +0 -14
- package/dist/components/Employee/FederalTaxes/Actions.js.map +0 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.d.ts +0 -12
- package/dist/components/Employee/FederalTaxes/FederalForm.js +0 -110
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +0 -1
- package/dist/components/Employee/FederalTaxes/FederalTaxes.d.ts +0 -6
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js +0 -84
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +0 -1
- package/dist/components/Employee/FederalTaxes/Head.d.ts +0 -1
- package/dist/components/Employee/FederalTaxes/Head.js +0 -24
- package/dist/components/Employee/FederalTaxes/Head.js.map +0 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.d.ts +0 -5
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +0 -21
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +0 -1
- package/dist/components/Employee/Profile/AdminProfile.js.map +0 -1
- package/dist/components/Employee/Profile/EmployeeProfile.js.map +0 -1
- package/dist/components/Employee/Profile/Profile.js.map +0 -1
- package/dist/components/Employee/Profile/index.d.ts +0 -2
- package/dist/components/Employee/StateTaxes/Actions.d.ts +0 -1
- package/dist/components/Employee/StateTaxes/Actions.js +0 -14
- package/dist/components/Employee/StateTaxes/Actions.js.map +0 -1
- package/dist/components/Employee/StateTaxes/StateForm.d.ts +0 -6
- package/dist/components/Employee/StateTaxes/StateForm.js +0 -34
- package/dist/components/Employee/StateTaxes/StateForm.js.map +0 -1
- package/dist/components/Employee/StateTaxes/StateTaxes.d.ts +0 -7
- package/dist/components/Employee/StateTaxes/StateTaxes.js +0 -98
- package/dist/components/Employee/StateTaxes/StateTaxes.js.map +0 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.d.ts +0 -8
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +0 -21
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +0 -49
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +0 -107
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +0 -125
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js +0 -66
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.module.scss.js +0 -16
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js +0 -154
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +0 -29
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +0 -67
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +0 -112
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js +0 -317
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +0 -72
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployees.d.ts +0 -2
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.d.ts +0 -6
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +0 -66
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +0 -2
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +0 -82
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +0 -24
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.d.ts +0 -7
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +0 -70
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTypes.d.ts +0 -24
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +0 -56
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js +0 -35
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js +0 -35
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.d.ts +0 -5
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js +0 -35
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.d.ts +0 -5
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js +0 -35
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/index.js +0 -27
- package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +0 -2
- package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTable.js +0 -90
- package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTable.js.map +0 -1
- package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.js.map +0 -1
- /package/dist/components/Employee/{Compensation/shared/useCompensationForm/compensationSchemaParity.test.d.ts → FederalTaxes/shared/useFederalTaxesForm/federalTaxesSchema.test.d.ts} +0 -0
- /package/dist/components/Employee/Profile/{AdminProfile.d.ts → onboarding/AdminProfile.d.ts} +0 -0
- /package/dist/components/Employee/Profile/{AdminProfile.module.scss.js → onboarding/AdminProfile.module.scss.js} +0 -0
- /package/dist/components/Employee/Profile/{AdminProfile.module.scss.js.map → onboarding/AdminProfile.module.scss.js.map} +0 -0
- /package/dist/components/Employee/Profile/{EmployeeProfile.d.ts → onboarding/EmployeeProfile.d.ts} +0 -0
- /package/dist/components/Employee/Profile/{EmployeeProfile.module.scss.js → onboarding/EmployeeProfile.module.scss.js} +0 -0
- /package/dist/components/Employee/Profile/{EmployeeProfile.module.scss.js.map → onboarding/EmployeeProfile.module.scss.js.map} +0 -0
- /package/dist/components/{UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.test.d.ts → Employee/StateTaxes/shared/useEmployeeStateTaxesForm/employeeStateTaxesSchema.test.d.ts} +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/AddEmployeesHoliday/AddEmployeesHoliday.js +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/HolidaySelectionForm/HolidaySelectionFormPresentation.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyList.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyListPresentation.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyListPresentation.module.scss.js +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyList/PolicyListPresentation.module.scss.js.map +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettings.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettings.module.scss.js.map +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettingsPresentation.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicyTypeSelector/PolicyTypeSelector.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/TimeOffFlow.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/TimeOffFlow.js +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffFlow/index.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff/shared/holidayHelpers.test.d.ts → TimeOff/TimeOffFlow/timeOffStateMachine.test.d.ts} +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js.map +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/TimeOffManagement/PolicyConfigurationForm/index.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/index.js.map +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/EmployeeTable/EmployeeTable.module.scss.js +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/EmployeeTable/EmployeeTable.module.scss.js.map +0 -0
- /package/dist/components/{UNSTABLE_TimeOff → TimeOff}/shared/EmployeeTable/index.d.ts +0 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import { jsx as e, jsxs as l, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { useId as n } from "react";
|
|
3
|
+
import { useForm as T, useWatch as o, FormProvider as D } from "react-hook-form";
|
|
4
|
+
import { useTranslation as V } from "react-i18next";
|
|
5
|
+
import a from "./PolicySettings.module.scss.js";
|
|
6
|
+
import { Flex as x } from "../../Common/Flex/Flex.js";
|
|
7
|
+
import "classnames";
|
|
8
|
+
import "../../../shared/constants.js";
|
|
9
|
+
import { ActionsLayout as k } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
10
|
+
import { Form as R } from "../../Common/Form/Form.js";
|
|
11
|
+
import { useComponentContext as U } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
+
import { useI18n as _ } from "../../../i18n/I18n.js";
|
|
13
|
+
import { NumberInputField as s } from "../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
14
|
+
import { SwitchField as t } from "../../Common/Fields/SwitchField/SwitchField.js";
|
|
15
|
+
function ii({
|
|
16
|
+
accrualMethod: m,
|
|
17
|
+
onContinue: v,
|
|
18
|
+
onBack: O,
|
|
19
|
+
defaultValues: L
|
|
20
|
+
}) {
|
|
21
|
+
_("Company.TimeOff.CreateTimeOffPolicy");
|
|
22
|
+
const { t: i } = V("Company.TimeOff.CreateTimeOffPolicy"), { Heading: P, Button: d } = U(), u = n(), p = n(), b = n(), g = n(), y = n(), c = T({
|
|
23
|
+
defaultValues: {
|
|
24
|
+
accrualMaximumEnabled: !1,
|
|
25
|
+
balanceMaximumEnabled: !1,
|
|
26
|
+
carryOverLimitEnabled: !1,
|
|
27
|
+
waitingPeriodEnabled: !1,
|
|
28
|
+
paidOutOnTermination: !1,
|
|
29
|
+
...L
|
|
30
|
+
}
|
|
31
|
+
}), { control: r } = c, E = o({ control: r, name: "accrualMaximumEnabled" }), M = o({ control: r, name: "balanceMaximumEnabled" }), N = o({ control: r, name: "carryOverLimitEnabled" }), w = o({ control: r, name: "waitingPeriodEnabled" }), h = m === "hours_worked", f = m === "fixed_per_pay_period", H = h || f, C = h || f, F = (I) => {
|
|
32
|
+
v(I);
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ e(D, { ...c, children: /* @__PURE__ */ e(R, { "aria-labelledby": u, onSubmit: c.handleSubmit(F), children: /* @__PURE__ */ e("div", { className: a.policySettings, children: /* @__PURE__ */ l(x, { flexDirection: "column", gap: 32, children: [
|
|
35
|
+
/* @__PURE__ */ e(P, { as: "h2", id: u, children: i("policySettings.title") }),
|
|
36
|
+
/* @__PURE__ */ l(x, { flexDirection: "column", gap: 20, children: [
|
|
37
|
+
H && /* @__PURE__ */ l(S, { children: [
|
|
38
|
+
/* @__PURE__ */ l("div", { className: a.settingRow, children: [
|
|
39
|
+
/* @__PURE__ */ e(
|
|
40
|
+
s,
|
|
41
|
+
{
|
|
42
|
+
className: a.settingField,
|
|
43
|
+
id: p,
|
|
44
|
+
name: "accrualMaximum",
|
|
45
|
+
label: i("policySettings.accrualMaximumLabel"),
|
|
46
|
+
description: i("policySettings.accrualMaximumHint"),
|
|
47
|
+
adornmentEnd: i("policySettings.hoursUnit"),
|
|
48
|
+
placeholder: i("policySettings.numberOfHoursPlaceholder"),
|
|
49
|
+
isDisabled: !E,
|
|
50
|
+
min: 0
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ e("div", { className: a.toggleCell, children: /* @__PURE__ */ e(
|
|
54
|
+
t,
|
|
55
|
+
{
|
|
56
|
+
name: "accrualMaximumEnabled",
|
|
57
|
+
label: i("policySettings.accrualMaximumLabel"),
|
|
58
|
+
shouldVisuallyHideLabel: !0,
|
|
59
|
+
"aria-controls": p
|
|
60
|
+
}
|
|
61
|
+
) })
|
|
62
|
+
] }),
|
|
63
|
+
/* @__PURE__ */ e("hr", { className: a.divider })
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ l("div", { className: a.settingRow, children: [
|
|
66
|
+
/* @__PURE__ */ e(
|
|
67
|
+
s,
|
|
68
|
+
{
|
|
69
|
+
className: a.settingField,
|
|
70
|
+
id: b,
|
|
71
|
+
name: "balanceMaximum",
|
|
72
|
+
label: i("policySettings.balanceMaximumLabel"),
|
|
73
|
+
description: i("policySettings.balanceMaximumHint"),
|
|
74
|
+
adornmentEnd: i("policySettings.hoursUnit"),
|
|
75
|
+
placeholder: i("policySettings.numberOfHoursPlaceholder"),
|
|
76
|
+
isDisabled: !M,
|
|
77
|
+
min: 0
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
/* @__PURE__ */ e("div", { className: a.toggleCell, children: /* @__PURE__ */ e(
|
|
81
|
+
t,
|
|
82
|
+
{
|
|
83
|
+
name: "balanceMaximumEnabled",
|
|
84
|
+
label: i("policySettings.balanceMaximumLabel"),
|
|
85
|
+
shouldVisuallyHideLabel: !0,
|
|
86
|
+
"aria-controls": b
|
|
87
|
+
}
|
|
88
|
+
) })
|
|
89
|
+
] }),
|
|
90
|
+
/* @__PURE__ */ e("hr", { className: a.divider }),
|
|
91
|
+
/* @__PURE__ */ l("div", { className: a.settingRow, children: [
|
|
92
|
+
/* @__PURE__ */ e(
|
|
93
|
+
s,
|
|
94
|
+
{
|
|
95
|
+
className: a.settingField,
|
|
96
|
+
id: g,
|
|
97
|
+
name: "carryOverLimit",
|
|
98
|
+
label: i("policySettings.carryOverLimitLabel"),
|
|
99
|
+
description: i("policySettings.carryOverLimitHint"),
|
|
100
|
+
adornmentEnd: i("policySettings.hoursUnit"),
|
|
101
|
+
placeholder: i("policySettings.numberOfHoursPlaceholder"),
|
|
102
|
+
isDisabled: !N,
|
|
103
|
+
min: 0
|
|
104
|
+
}
|
|
105
|
+
),
|
|
106
|
+
/* @__PURE__ */ e("div", { className: a.toggleCell, children: /* @__PURE__ */ e(
|
|
107
|
+
t,
|
|
108
|
+
{
|
|
109
|
+
name: "carryOverLimitEnabled",
|
|
110
|
+
label: i("policySettings.carryOverLimitLabel"),
|
|
111
|
+
shouldVisuallyHideLabel: !0,
|
|
112
|
+
"aria-controls": g
|
|
113
|
+
}
|
|
114
|
+
) })
|
|
115
|
+
] }),
|
|
116
|
+
/* @__PURE__ */ e("hr", { className: a.divider }),
|
|
117
|
+
C && /* @__PURE__ */ l(S, { children: [
|
|
118
|
+
/* @__PURE__ */ l("div", { className: a.settingRow, children: [
|
|
119
|
+
/* @__PURE__ */ e(
|
|
120
|
+
s,
|
|
121
|
+
{
|
|
122
|
+
className: a.settingField,
|
|
123
|
+
id: y,
|
|
124
|
+
name: "waitingPeriod",
|
|
125
|
+
label: i("policySettings.waitingPeriodLabel"),
|
|
126
|
+
description: i("policySettings.waitingPeriodHint"),
|
|
127
|
+
adornmentEnd: i("policySettings.daysUnit"),
|
|
128
|
+
placeholder: i("policySettings.numberOfDaysPlaceholder"),
|
|
129
|
+
isDisabled: !w,
|
|
130
|
+
min: 0
|
|
131
|
+
}
|
|
132
|
+
),
|
|
133
|
+
/* @__PURE__ */ e("div", { className: a.toggleCell, children: /* @__PURE__ */ e(
|
|
134
|
+
t,
|
|
135
|
+
{
|
|
136
|
+
name: "waitingPeriodEnabled",
|
|
137
|
+
label: i("policySettings.waitingPeriodLabel"),
|
|
138
|
+
shouldVisuallyHideLabel: !0,
|
|
139
|
+
"aria-controls": y
|
|
140
|
+
}
|
|
141
|
+
) })
|
|
142
|
+
] }),
|
|
143
|
+
/* @__PURE__ */ e("hr", { className: a.divider })
|
|
144
|
+
] }),
|
|
145
|
+
/* @__PURE__ */ e(
|
|
146
|
+
t,
|
|
147
|
+
{
|
|
148
|
+
name: "paidOutOnTermination",
|
|
149
|
+
label: i("policySettings.paidOutOnTerminationLabel"),
|
|
150
|
+
description: i("policySettings.paidOutOnTerminationHint")
|
|
151
|
+
}
|
|
152
|
+
),
|
|
153
|
+
/* @__PURE__ */ e("hr", { className: a.divider }),
|
|
154
|
+
/* @__PURE__ */ l(k, { children: [
|
|
155
|
+
/* @__PURE__ */ e(d, { variant: "secondary", onClick: O, children: i("backCta") }),
|
|
156
|
+
/* @__PURE__ */ e(d, { variant: "primary", type: "submit", children: i("policySettings.continueCta") })
|
|
157
|
+
] })
|
|
158
|
+
] })
|
|
159
|
+
] }) }) }) });
|
|
160
|
+
}
|
|
161
|
+
export {
|
|
162
|
+
ii as PolicySettingsPresentation
|
|
163
|
+
};
|
|
164
|
+
//# sourceMappingURL=PolicySettingsPresentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PolicySettingsPresentation.js","sources":["../../../../src/components/TimeOff/PolicySettings/PolicySettingsPresentation.tsx"],"sourcesContent":["import { useId } from 'react'\nimport { FormProvider, useForm, useWatch } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport type { PolicySettingsFormData, PolicySettingsPresentationProps } from './PolicySettingsTypes'\nimport styles from './PolicySettings.module.scss'\nimport { Flex, ActionsLayout, NumberInputField, SwitchField } from '@/components/Common'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\nexport function PolicySettingsPresentation({\n accrualMethod,\n onContinue,\n onBack,\n defaultValues,\n}: PolicySettingsPresentationProps) {\n useI18n('Company.TimeOff.CreateTimeOffPolicy')\n const { t } = useTranslation('Company.TimeOff.CreateTimeOffPolicy')\n const { Heading, Button } = useComponentContext()\n const headingId = useId()\n\n const accrualMaxInputId = useId()\n const balanceMaxInputId = useId()\n const carryOverInputId = useId()\n const waitingPeriodInputId = useId()\n\n const formMethods = useForm<PolicySettingsFormData>({\n defaultValues: {\n accrualMaximumEnabled: false,\n balanceMaximumEnabled: false,\n carryOverLimitEnabled: false,\n waitingPeriodEnabled: false,\n paidOutOnTermination: false,\n ...defaultValues,\n },\n })\n\n const { control } = formMethods\n const accrualMaximumEnabled = useWatch({ control, name: 'accrualMaximumEnabled' })\n const balanceMaximumEnabled = useWatch({ control, name: 'balanceMaximumEnabled' })\n const carryOverLimitEnabled = useWatch({ control, name: 'carryOverLimitEnabled' })\n const waitingPeriodEnabled = useWatch({ control, name: 'waitingPeriodEnabled' })\n\n const isHoursWorked = accrualMethod === 'hours_worked'\n const isFixedPerPayPeriod = accrualMethod === 'fixed_per_pay_period'\n const showAccrualMaximum = isHoursWorked || isFixedPerPayPeriod\n const showWaitingPeriod = isHoursWorked || isFixedPerPayPeriod\n\n const handleSubmit = (data: PolicySettingsFormData) => {\n onContinue(data)\n }\n\n return (\n <FormProvider {...formMethods}>\n <HtmlForm aria-labelledby={headingId} onSubmit={formMethods.handleSubmit(handleSubmit)}>\n <div className={styles.policySettings}>\n <Flex flexDirection=\"column\" gap={32}>\n <Heading as=\"h2\" id={headingId}>\n {t('policySettings.title')}\n </Heading>\n\n <Flex flexDirection=\"column\" gap={20}>\n {showAccrualMaximum && (\n <>\n <div className={styles.settingRow}>\n <NumberInputField\n className={styles.settingField}\n id={accrualMaxInputId}\n name=\"accrualMaximum\"\n label={t('policySettings.accrualMaximumLabel')}\n description={t('policySettings.accrualMaximumHint')}\n adornmentEnd={t('policySettings.hoursUnit')}\n placeholder={t('policySettings.numberOfHoursPlaceholder')}\n isDisabled={!accrualMaximumEnabled}\n min={0}\n />\n <div className={styles.toggleCell}>\n <SwitchField\n name=\"accrualMaximumEnabled\"\n label={t('policySettings.accrualMaximumLabel')}\n shouldVisuallyHideLabel\n aria-controls={accrualMaxInputId}\n />\n </div>\n </div>\n\n <hr className={styles.divider} />\n </>\n )}\n\n <div className={styles.settingRow}>\n <NumberInputField\n className={styles.settingField}\n id={balanceMaxInputId}\n name=\"balanceMaximum\"\n label={t('policySettings.balanceMaximumLabel')}\n description={t('policySettings.balanceMaximumHint')}\n adornmentEnd={t('policySettings.hoursUnit')}\n placeholder={t('policySettings.numberOfHoursPlaceholder')}\n isDisabled={!balanceMaximumEnabled}\n min={0}\n />\n <div className={styles.toggleCell}>\n <SwitchField\n name=\"balanceMaximumEnabled\"\n label={t('policySettings.balanceMaximumLabel')}\n shouldVisuallyHideLabel\n aria-controls={balanceMaxInputId}\n />\n </div>\n </div>\n\n <hr className={styles.divider} />\n\n <div className={styles.settingRow}>\n <NumberInputField\n className={styles.settingField}\n id={carryOverInputId}\n name=\"carryOverLimit\"\n label={t('policySettings.carryOverLimitLabel')}\n description={t('policySettings.carryOverLimitHint')}\n adornmentEnd={t('policySettings.hoursUnit')}\n placeholder={t('policySettings.numberOfHoursPlaceholder')}\n isDisabled={!carryOverLimitEnabled}\n min={0}\n />\n <div className={styles.toggleCell}>\n <SwitchField\n name=\"carryOverLimitEnabled\"\n label={t('policySettings.carryOverLimitLabel')}\n shouldVisuallyHideLabel\n aria-controls={carryOverInputId}\n />\n </div>\n </div>\n\n <hr className={styles.divider} />\n\n {showWaitingPeriod && (\n <>\n <div className={styles.settingRow}>\n <NumberInputField\n className={styles.settingField}\n id={waitingPeriodInputId}\n name=\"waitingPeriod\"\n label={t('policySettings.waitingPeriodLabel')}\n description={t('policySettings.waitingPeriodHint')}\n adornmentEnd={t('policySettings.daysUnit')}\n placeholder={t('policySettings.numberOfDaysPlaceholder')}\n isDisabled={!waitingPeriodEnabled}\n min={0}\n />\n <div className={styles.toggleCell}>\n <SwitchField\n name=\"waitingPeriodEnabled\"\n label={t('policySettings.waitingPeriodLabel')}\n shouldVisuallyHideLabel\n aria-controls={waitingPeriodInputId}\n />\n </div>\n </div>\n\n <hr className={styles.divider} />\n </>\n )}\n\n <SwitchField\n name=\"paidOutOnTermination\"\n label={t('policySettings.paidOutOnTerminationLabel')}\n description={t('policySettings.paidOutOnTerminationHint')}\n />\n\n <hr className={styles.divider} />\n\n <ActionsLayout>\n <Button variant=\"secondary\" onClick={onBack}>\n {t('backCta')}\n </Button>\n <Button variant=\"primary\" type=\"submit\">\n {t('policySettings.continueCta')}\n </Button>\n </ActionsLayout>\n </Flex>\n </Flex>\n </div>\n </HtmlForm>\n </FormProvider>\n )\n}\n"],"names":["PolicySettingsPresentation","accrualMethod","onContinue","onBack","defaultValues","useI18n","t","useTranslation","Heading","Button","useComponentContext","headingId","useId","accrualMaxInputId","balanceMaxInputId","carryOverInputId","waitingPeriodInputId","formMethods","useForm","control","accrualMaximumEnabled","useWatch","balanceMaximumEnabled","carryOverLimitEnabled","waitingPeriodEnabled","isHoursWorked","isFixedPerPayPeriod","showAccrualMaximum","showWaitingPeriod","handleSubmit","data","jsx","FormProvider","HtmlForm","styles","Flex","jsxs","Fragment","NumberInputField","SwitchField","ActionsLayout"],"mappings":";;;;;;;;;;;;;;AAUO,SAASA,GAA2B;AAAA,EACzC,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC;AACF,GAAoC;AAClC,EAAAC,EAAQ,qCAAqC;AAC7C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qCAAqC,GAC5D,EAAE,SAAAC,GAAS,QAAAC,EAAA,IAAWC,EAAA,GACtBC,IAAYC,EAAA,GAEZC,IAAoBD,EAAA,GACpBE,IAAoBF,EAAA,GACpBG,IAAmBH,EAAA,GACnBI,IAAuBJ,EAAA,GAEvBK,IAAcC,EAAgC;AAAA,IAClD,eAAe;AAAA,MACb,uBAAuB;AAAA,MACvB,uBAAuB;AAAA,MACvB,uBAAuB;AAAA,MACvB,sBAAsB;AAAA,MACtB,sBAAsB;AAAA,MACtB,GAAGd;AAAA,IAAA;AAAA,EACL,CACD,GAEK,EAAE,SAAAe,MAAYF,GACdG,IAAwBC,EAAS,EAAE,SAAAF,GAAS,MAAM,yBAAyB,GAC3EG,IAAwBD,EAAS,EAAE,SAAAF,GAAS,MAAM,yBAAyB,GAC3EI,IAAwBF,EAAS,EAAE,SAAAF,GAAS,MAAM,yBAAyB,GAC3EK,IAAuBH,EAAS,EAAE,SAAAF,GAAS,MAAM,wBAAwB,GAEzEM,IAAgBxB,MAAkB,gBAClCyB,IAAsBzB,MAAkB,wBACxC0B,IAAqBF,KAAiBC,GACtCE,IAAoBH,KAAiBC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,UAC5B,UAAAH,EAAE,4BAA4B,EAAA,CACjC;AAAA,MAAA,EAAA,CACF;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF,EAAA,CACF,GACF,GACF;AAEJ;"}
|
package/dist/components/{UNSTABLE_TimeOff → TimeOff}/PolicySettings/PolicySettingsTypes.d.ts
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type PolicySettingsAccrualMethod = 'hours_worked' | '
|
|
1
|
+
export type PolicySettingsAccrualMethod = 'hours_worked' | 'fixed_per_pay_period' | 'fixed_all_at_once';
|
|
2
2
|
export interface PolicySettingsFormData {
|
|
3
3
|
accrualMaximumEnabled: boolean;
|
|
4
4
|
accrualMaximum?: number;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useHolidayPayPoliciesGet as l } from "@gusto/embedded-api/react-query/holidayPayPoliciesGet";
|
|
3
|
+
import { PolicyTypeSelectorPresentation as c } from "./PolicyTypeSelectorPresentation.js";
|
|
4
|
+
import { BaseComponent as y } from "../../Base/Base.js";
|
|
5
|
+
import { useBase as m } from "../../Base/useBase.js";
|
|
6
|
+
import { componentEvents as t } from "../../../shared/constants.js";
|
|
7
|
+
function _(o) {
|
|
8
|
+
return /* @__PURE__ */ n(y, { ...o, children: /* @__PURE__ */ n(s, { ...o }) });
|
|
9
|
+
}
|
|
10
|
+
function s({ companyId: o, defaultPolicyType: i }) {
|
|
11
|
+
const { onEvent: e } = m(), r = !!l({ companyUuid: o }).data?.holidayPayPolicy;
|
|
12
|
+
return /* @__PURE__ */ n(
|
|
13
|
+
c,
|
|
14
|
+
{
|
|
15
|
+
onContinue: (a) => {
|
|
16
|
+
e(t.TIME_OFF_POLICY_TYPE_SELECTED, {
|
|
17
|
+
policyType: a
|
|
18
|
+
});
|
|
19
|
+
},
|
|
20
|
+
onCancel: () => {
|
|
21
|
+
e(t.CANCEL);
|
|
22
|
+
},
|
|
23
|
+
defaultPolicyType: i,
|
|
24
|
+
holidayPolicyExists: r
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
_ as PolicyTypeSelector
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=PolicyTypeSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PolicyTypeSelector.js","sources":["../../../../src/components/TimeOff/PolicyTypeSelector/PolicyTypeSelector.tsx"],"sourcesContent":["import { useHolidayPayPoliciesGet } from '@gusto/embedded-api/react-query/holidayPayPoliciesGet'\nimport { PolicyTypeSelectorPresentation } from './PolicyTypeSelectorPresentation'\nimport type { PolicyType } from './PolicyTypeSelectorTypes'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { componentEvents } from '@/shared/constants'\n\nexport interface PolicyTypeSelectorProps extends BaseComponentInterface<'Company.TimeOff.SelectPolicyType'> {\n companyId: string\n defaultPolicyType?: PolicyType\n}\n\nexport function PolicyTypeSelector(props: PolicyTypeSelectorProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, defaultPolicyType }: PolicyTypeSelectorProps) {\n const { onEvent } = useBase()\n\n const holidayQuery = useHolidayPayPoliciesGet({ companyUuid: companyId })\n const holidayPolicyExists = Boolean(holidayQuery.data?.holidayPayPolicy)\n\n const handleContinue = (policyType: PolicyType) => {\n onEvent(componentEvents.TIME_OFF_POLICY_TYPE_SELECTED, {\n policyType,\n })\n }\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n return (\n <PolicyTypeSelectorPresentation\n onContinue={handleContinue}\n onCancel={handleCancel}\n defaultPolicyType={defaultPolicyType}\n holidayPolicyExists={holidayPolicyExists}\n />\n )\n}\n"],"names":["PolicyTypeSelector","props","jsx","BaseComponent","Root","companyId","defaultPolicyType","onEvent","useBase","holidayPolicyExists","useHolidayPayPoliciesGet","PolicyTypeSelectorPresentation","policyType","componentEvents"],"mappings":";;;;;;AAYO,SAASA,EAAmBC,GAAgC;AACjE,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,mBAAAC,KAA8C;AACvE,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAGdC,IAAsB,EADPC,EAAyB,EAAE,aAAaL,GAAW,EACvB,MAAM;AAYvD,SACE,gBAAAH;AAAA,IAACS;AAAA,IAAA;AAAA,MACC,YAZmB,CAACC,MAA2B;AACjD,QAAAL,EAAQM,EAAgB,+BAA+B;AAAA,UACrD,YAAAD;AAAA,QAAA,CACD;AAAA,MACH;AAAA,MASI,UAPiB,MAAM;AACzB,QAAAL,EAAQM,EAAgB,MAAM;AAAA,MAChC;AAAA,MAMI,mBAAAP;AAAA,MACA,qBAAAG;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PolicyTypeSelectorPresentationProps } from './PolicyTypeSelectorTypes';
|
|
2
|
-
export declare function PolicyTypeSelectorPresentation({ onContinue, onCancel, defaultPolicyType, }: PolicyTypeSelectorPresentationProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function PolicyTypeSelectorPresentation({ onContinue, onCancel, defaultPolicyType, holidayPolicyExists, }: PolicyTypeSelectorPresentationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx as i, jsxs as t } from "react/jsx-runtime";
|
|
2
|
+
import { useId as h, useMemo as b } from "react";
|
|
3
|
+
import { useForm as T, FormProvider as v } from "react-hook-form";
|
|
4
|
+
import { useTranslation as x } from "react-i18next";
|
|
5
|
+
import { Flex as p } from "../../Common/Flex/Flex.js";
|
|
6
|
+
import "classnames";
|
|
7
|
+
import "../../../shared/constants.js";
|
|
8
|
+
import { ActionsLayout as C } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
9
|
+
import { Form as L } from "../../Common/Form/Form.js";
|
|
10
|
+
import { useComponentContext as S } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
11
|
+
import { useI18n as g } from "../../../i18n/I18n.js";
|
|
12
|
+
import { RadioGroupField as F } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
13
|
+
function G({
|
|
14
|
+
onContinue: c,
|
|
15
|
+
onCancel: m,
|
|
16
|
+
defaultPolicyType: s,
|
|
17
|
+
holidayPolicyExists: n = !1
|
|
18
|
+
}) {
|
|
19
|
+
g("Company.TimeOff.SelectPolicyType");
|
|
20
|
+
const { t: e } = x("Company.TimeOff.SelectPolicyType"), { Heading: d, Text: u, Button: r } = S(), l = h(), a = T({
|
|
21
|
+
defaultValues: {
|
|
22
|
+
policyType: s
|
|
23
|
+
}
|
|
24
|
+
}), y = b(() => {
|
|
25
|
+
const o = [];
|
|
26
|
+
return n || o.push({
|
|
27
|
+
value: "holiday",
|
|
28
|
+
label: e("holidayLabel"),
|
|
29
|
+
description: e("holidayHint")
|
|
30
|
+
}), o.push(
|
|
31
|
+
{
|
|
32
|
+
value: "vacation",
|
|
33
|
+
label: e("timeOffLabel"),
|
|
34
|
+
description: e("timeOffHint")
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
value: "sick",
|
|
38
|
+
label: e("sickLeaveLabel"),
|
|
39
|
+
description: e("sickLeaveHint")
|
|
40
|
+
}
|
|
41
|
+
), o;
|
|
42
|
+
}, [e, n]), f = (o) => {
|
|
43
|
+
c(o.policyType);
|
|
44
|
+
};
|
|
45
|
+
return /* @__PURE__ */ i(v, { ...a, children: /* @__PURE__ */ i(L, { "aria-labelledby": l, onSubmit: a.handleSubmit(f), children: /* @__PURE__ */ t(p, { flexDirection: "column", gap: 24, children: [
|
|
46
|
+
/* @__PURE__ */ t(p, { flexDirection: "column", gap: 4, children: [
|
|
47
|
+
/* @__PURE__ */ i(d, { as: "h2", id: l, children: e("title") }),
|
|
48
|
+
/* @__PURE__ */ i(u, { variant: "supporting", children: e("policyTypeHint") })
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ i(
|
|
51
|
+
F,
|
|
52
|
+
{
|
|
53
|
+
name: "policyType",
|
|
54
|
+
label: e("policyTypeLabel"),
|
|
55
|
+
options: y,
|
|
56
|
+
isRequired: !0
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ t(C, { children: [
|
|
60
|
+
/* @__PURE__ */ i(r, { variant: "secondary", onClick: m, children: e("cancelCta") }),
|
|
61
|
+
/* @__PURE__ */ i(r, { variant: "primary", type: "submit", children: e("continueCta") })
|
|
62
|
+
] })
|
|
63
|
+
] }) }) });
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
G as PolicyTypeSelectorPresentation
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=PolicyTypeSelectorPresentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PolicyTypeSelectorPresentation.js","sources":["../../../../src/components/TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.tsx"],"sourcesContent":["import { useId, useMemo } from 'react'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport type { PolicyType, PolicyTypeSelectorPresentationProps } from './PolicyTypeSelectorTypes'\nimport { Flex, ActionsLayout, RadioGroupField } from '@/components/Common'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\n\ninterface PolicyTypeSelectorFormData {\n policyType: PolicyType\n}\n\nexport function PolicyTypeSelectorPresentation({\n onContinue,\n onCancel,\n defaultPolicyType,\n holidayPolicyExists = false,\n}: PolicyTypeSelectorPresentationProps) {\n useI18n('Company.TimeOff.SelectPolicyType')\n const { t } = useTranslation('Company.TimeOff.SelectPolicyType')\n const { Heading, Text, Button } = useComponentContext()\n const headingId = useId()\n\n const formMethods = useForm<PolicyTypeSelectorFormData>({\n defaultValues: {\n policyType: defaultPolicyType as PolicyType,\n },\n })\n\n const policyTypeOptions = useMemo(() => {\n const options: Array<{ value: PolicyType; label: string; description: string }> = []\n if (!holidayPolicyExists) {\n options.push({\n value: 'holiday',\n label: t('holidayLabel'),\n description: t('holidayHint'),\n })\n }\n options.push(\n {\n value: 'vacation',\n label: t('timeOffLabel'),\n description: t('timeOffHint'),\n },\n {\n value: 'sick',\n label: t('sickLeaveLabel'),\n description: t('sickLeaveHint'),\n },\n )\n return options\n }, [t, holidayPolicyExists])\n\n const handleSubmit = (data: PolicyTypeSelectorFormData) => {\n onContinue(data.policyType)\n }\n\n return (\n <FormProvider {...formMethods}>\n <HtmlForm aria-labelledby={headingId} onSubmit={formMethods.handleSubmit(handleSubmit)}>\n <Flex flexDirection=\"column\" gap={24}>\n <Flex flexDirection=\"column\" gap={4}>\n <Heading as=\"h2\" id={headingId}>\n {t('title')}\n </Heading>\n <Text variant=\"supporting\">{t('policyTypeHint')}</Text>\n </Flex>\n\n <RadioGroupField<PolicyType>\n name=\"policyType\"\n label={t('policyTypeLabel')}\n options={policyTypeOptions}\n isRequired\n />\n\n <ActionsLayout>\n <Button variant=\"secondary\" onClick={onCancel}>\n {t('cancelCta')}\n </Button>\n <Button variant=\"primary\" type=\"submit\">\n {t('continueCta')}\n </Button>\n </ActionsLayout>\n </Flex>\n </HtmlForm>\n </FormProvider>\n )\n}\n"],"names":["PolicyTypeSelectorPresentation","onContinue","onCancel","defaultPolicyType","holidayPolicyExists","useI18n","t","useTranslation","Heading","Text","Button","useComponentContext","headingId","useId","formMethods","useForm","policyTypeOptions","useMemo","options","handleSubmit","data","FormProvider","jsx","HtmlForm","jsxs","Flex","RadioGroupField","ActionsLayout"],"mappings":";;;;;;;;;;;;AAaO,SAASA,EAA+B;AAAA,EAC7C,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA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,gBAAgB,EAAA,CAAE;AAAA,IAAA,GAClD;AAAA,IAEA,gBAAAgB;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpB,EAAE,iBAAiB;AAAA,QAC1B,SAASU;AAAA,QACT,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,sBAGXW,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAL,EAACZ,KAAO,SAAQ,aAAY,SAASR,GAClC,UAAAI,EAAE,WAAW,GAChB;AAAA,MACA,gBAAAgB,EAACZ,KAAO,SAAQ,WAAU,MAAK,UAC5B,UAAAJ,EAAE,aAAa,EAAA,CAClB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,EAAA,CACF,GACF,GACF;AAEJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimeOffFlow.js","sources":["../../../../src/components/TimeOff/TimeOffFlow/TimeOffFlow.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useMemo } from 'react'\nimport { timeOffMachine } from './timeOffStateMachine'\nimport type { TimeOffFlowProps, TimeOffFlowContextInterface } from './TimeOffFlowComponents'\nimport { PolicyListContextual } from './TimeOffFlowComponents'\nimport { Flow } from '@/components/Flow/Flow'\n\nexport const TimeOffFlow = ({ companyId, onEvent }: TimeOffFlowProps) => {\n const timeOffFlow = useMemo(\n () =>\n createMachine(\n 'policyList',\n timeOffMachine,\n (initialContext: TimeOffFlowContextInterface) => ({\n ...initialContext,\n component: PolicyListContextual,\n companyId,\n }),\n ),\n [companyId],\n )\n return <Flow machine={timeOffFlow} onEvent={onEvent} />\n}\n"],"names":["TimeOffFlow","companyId","onEvent","timeOffFlow","useMemo","createMachine","timeOffMachine","initialContext","PolicyListContextual","jsx","Flow"],"mappings":";;;;;;AAOO,MAAMA,IAAc,CAAC,EAAE,WAAAC,GAAW,SAAAC,QAAgC;AACvE,QAAMC,IAAcC;AAAA,IAClB,MACEC;AAAA,MACE;AAAA,MACAC;AAAA,MACA,CAACC,OAAiD;AAAA,QAChD,GAAGA;AAAA,QACH,WAAWC;AAAA,QACX,WAAAP;AAAA,MAAA;AAAA,IACF;AAAA,IAEJ,CAACA,CAAS;AAAA,EAAA;AAEZ,SAAO,gBAAAQ,EAACC,GAAA,EAAK,SAASP,GAAa,SAAAD,EAAA,CAAkB;AACvD;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { TimeOffPolicyType } from './timeOffPolicyTypes';
|
|
2
3
|
import { FlowContextInterface } from '../../Flow/useFlow';
|
|
3
4
|
import { BaseComponentInterface } from '../../Base';
|
|
4
5
|
export interface TimeOffFlowProps extends BaseComponentInterface {
|
|
@@ -9,7 +10,6 @@ export type TimeOffFlowAlert = {
|
|
|
9
10
|
title: string;
|
|
10
11
|
content?: ReactNode;
|
|
11
12
|
};
|
|
12
|
-
export type TimeOffPolicyType = 'sick' | 'vacation' | 'holiday';
|
|
13
13
|
export interface TimeOffFlowContextInterface extends FlowContextInterface {
|
|
14
14
|
companyId: string;
|
|
15
15
|
policyType?: TimeOffPolicyType;
|
|
@@ -21,9 +21,9 @@ export declare function SelectPolicyTypeContextual(): import("react/jsx-runtime"
|
|
|
21
21
|
export declare function PolicyDetailsFormContextual(): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export declare function PolicySettingsContextual(): import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export declare function AddEmployeesToPolicyContextual(): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export declare function
|
|
25
|
-
export declare function ViewPolicyEmployeesContextual(): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function TimeOffPolicyDetailContextual(): import("react/jsx-runtime").JSX.Element;
|
|
26
25
|
export declare function HolidaySelectionFormContextual(): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function EditHolidaySelectionFormContextual(): import("react/jsx-runtime").JSX.Element;
|
|
27
27
|
export declare function AddEmployeesHolidayContextual(): import("react/jsx-runtime").JSX.Element;
|
|
28
28
|
export declare function ViewHolidayEmployeesContextual(): import("react/jsx-runtime").JSX.Element;
|
|
29
29
|
export declare function ViewHolidayScheduleContextual(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { jsxs as y, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { PolicyList as x } from "../PolicyList/PolicyList.js";
|
|
3
|
+
import { PolicyTypeSelector as E } from "../PolicyTypeSelector/PolicyTypeSelector.js";
|
|
4
|
+
import { PolicySettings as P } from "../PolicySettings/PolicySettings.js";
|
|
5
|
+
import { AddEmployeesToPolicy as h } from "../AddEmployeesToPolicy/AddEmployeesToPolicy.js";
|
|
6
|
+
import { TimeOffPolicyDetail as C } from "../TimeOffPolicyDetail/TimeOffPolicyDetail.js";
|
|
7
|
+
import { HolidaySelectionForm as u } from "../HolidaySelectionForm/HolidaySelectionForm.js";
|
|
8
|
+
import { AddEmployeesHoliday as T } from "../AddEmployeesHoliday/AddEmployeesHoliday.js";
|
|
9
|
+
import { ViewHolidayEmployees as v } from "../ViewHolidayEmployees/ViewHolidayEmployees.js";
|
|
10
|
+
import { ViewHolidaySchedule as A } from "../ViewHolidaySchedule/ViewHolidaySchedule.js";
|
|
11
|
+
import { assertCreatablePolicyType as f } from "./timeOffPolicyTypes.js";
|
|
12
|
+
import { useFlow as p } from "../../Flow/useFlow.js";
|
|
13
|
+
import { Flex as a } from "../../Common/Flex/Flex.js";
|
|
14
|
+
import "classnames";
|
|
15
|
+
import "../../../shared/constants.js";
|
|
16
|
+
import { ensureRequired as c } from "../../../helpers/ensureRequired.js";
|
|
17
|
+
import { useComponentContext as d } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
18
|
+
import { PolicyConfigurationForm as D } from "../TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js";
|
|
19
|
+
function M() {
|
|
20
|
+
const { onEvent: t, companyId: e, alerts: i } = p(), { Alert: l } = d();
|
|
21
|
+
return /* @__PURE__ */ y(a, { flexDirection: "column", gap: 8, children: [
|
|
22
|
+
i?.map((o, r) => /* @__PURE__ */ n(l, { status: o.type, label: o.title, children: o.content }, r)),
|
|
23
|
+
/* @__PURE__ */ n(x, { onEvent: t, companyId: c(e) })
|
|
24
|
+
] });
|
|
25
|
+
}
|
|
26
|
+
function N() {
|
|
27
|
+
const { onEvent: t, companyId: e, policyType: i, alerts: l } = p(), { Alert: o } = d(), r = i === "sick" || i === "vacation" || i === "holiday" ? i : void 0;
|
|
28
|
+
return /* @__PURE__ */ y(a, { flexDirection: "column", gap: 8, children: [
|
|
29
|
+
l?.map((m, s) => /* @__PURE__ */ n(o, { status: m.type, label: m.title, children: m.content }, s)),
|
|
30
|
+
/* @__PURE__ */ n(
|
|
31
|
+
E,
|
|
32
|
+
{
|
|
33
|
+
onEvent: t,
|
|
34
|
+
companyId: c(e),
|
|
35
|
+
defaultPolicyType: r
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
] });
|
|
39
|
+
}
|
|
40
|
+
function Q() {
|
|
41
|
+
const { onEvent: t, companyId: e, policyType: i, policyId: l, alerts: o } = p(), { Alert: r } = d(), m = c(i);
|
|
42
|
+
return f(m), /* @__PURE__ */ y(a, { flexDirection: "column", gap: 8, children: [
|
|
43
|
+
o?.map((s, I) => /* @__PURE__ */ n(r, { status: s.type, label: s.title, children: s.content }, I)),
|
|
44
|
+
/* @__PURE__ */ n(
|
|
45
|
+
D,
|
|
46
|
+
{
|
|
47
|
+
onEvent: t,
|
|
48
|
+
companyId: c(e),
|
|
49
|
+
policyType: m,
|
|
50
|
+
policyId: l
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
] });
|
|
54
|
+
}
|
|
55
|
+
function U() {
|
|
56
|
+
const { onEvent: t, policyId: e, alerts: i } = p(), { Alert: l } = d();
|
|
57
|
+
return /* @__PURE__ */ y(a, { flexDirection: "column", gap: 8, children: [
|
|
58
|
+
i?.map((o, r) => /* @__PURE__ */ n(l, { status: o.type, label: o.title, children: o.content }, r)),
|
|
59
|
+
/* @__PURE__ */ n(P, { onEvent: t, policyId: c(e) })
|
|
60
|
+
] });
|
|
61
|
+
}
|
|
62
|
+
function W() {
|
|
63
|
+
const { onEvent: t, companyId: e, policyId: i, policyType: l } = p(), o = c(l);
|
|
64
|
+
return f(o), /* @__PURE__ */ n(
|
|
65
|
+
h,
|
|
66
|
+
{
|
|
67
|
+
onEvent: t,
|
|
68
|
+
companyId: c(e),
|
|
69
|
+
policyId: c(i),
|
|
70
|
+
policyType: o
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
function X() {
|
|
75
|
+
const { onEvent: t, policyId: e } = p();
|
|
76
|
+
return /* @__PURE__ */ n(C, { onEvent: t, policyId: c(e) });
|
|
77
|
+
}
|
|
78
|
+
function Y() {
|
|
79
|
+
const { onEvent: t, companyId: e, alerts: i } = p(), { Alert: l } = d();
|
|
80
|
+
return /* @__PURE__ */ y(a, { flexDirection: "column", gap: 8, children: [
|
|
81
|
+
i?.map((o, r) => /* @__PURE__ */ n(l, { status: o.type, label: o.title, children: o.content }, r)),
|
|
82
|
+
/* @__PURE__ */ n(u, { onEvent: t, companyId: c(e), mode: "create" })
|
|
83
|
+
] });
|
|
84
|
+
}
|
|
85
|
+
function Z() {
|
|
86
|
+
const { onEvent: t, companyId: e, alerts: i } = p(), { Alert: l } = d();
|
|
87
|
+
return /* @__PURE__ */ y(a, { flexDirection: "column", gap: 8, children: [
|
|
88
|
+
i?.map((o, r) => /* @__PURE__ */ n(l, { status: o.type, label: o.title, children: o.content }, r)),
|
|
89
|
+
/* @__PURE__ */ n(u, { onEvent: t, companyId: c(e), mode: "edit" })
|
|
90
|
+
] });
|
|
91
|
+
}
|
|
92
|
+
function _() {
|
|
93
|
+
const { onEvent: t, companyId: e } = p();
|
|
94
|
+
return /* @__PURE__ */ n(T, { onEvent: t, companyId: c(e) });
|
|
95
|
+
}
|
|
96
|
+
function $() {
|
|
97
|
+
const { onEvent: t, companyId: e } = p();
|
|
98
|
+
return /* @__PURE__ */ n(v, { onEvent: t, companyId: c(e) });
|
|
99
|
+
}
|
|
100
|
+
function oo() {
|
|
101
|
+
const { onEvent: t, companyId: e } = p();
|
|
102
|
+
return /* @__PURE__ */ n(A, { onEvent: t, companyId: c(e) });
|
|
103
|
+
}
|
|
104
|
+
export {
|
|
105
|
+
_ as AddEmployeesHolidayContextual,
|
|
106
|
+
W as AddEmployeesToPolicyContextual,
|
|
107
|
+
Z as EditHolidaySelectionFormContextual,
|
|
108
|
+
Y as HolidaySelectionFormContextual,
|
|
109
|
+
Q as PolicyDetailsFormContextual,
|
|
110
|
+
M as PolicyListContextual,
|
|
111
|
+
U as PolicySettingsContextual,
|
|
112
|
+
N as SelectPolicyTypeContextual,
|
|
113
|
+
X as TimeOffPolicyDetailContextual,
|
|
114
|
+
$ as ViewHolidayEmployeesContextual,
|
|
115
|
+
oo as ViewHolidayScheduleContextual
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=TimeOffFlowComponents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimeOffFlowComponents.js","sources":["../../../../src/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { PolicyList } from '../PolicyList/PolicyList'\nimport { PolicyTypeSelector } from '../PolicyTypeSelector/PolicyTypeSelector'\nimport { PolicyConfigurationForm } from '../TimeOffManagement/PolicyConfigurationForm'\nimport { PolicySettings } from '../PolicySettings/PolicySettings'\nimport { AddEmployeesToPolicy } from '../AddEmployeesToPolicy/AddEmployeesToPolicy'\nimport { TimeOffPolicyDetail } from '../TimeOffPolicyDetail/TimeOffPolicyDetail'\nimport { HolidaySelectionForm } from '../HolidaySelectionForm/HolidaySelectionForm'\nimport { AddEmployeesHoliday } from '../AddEmployeesHoliday/AddEmployeesHoliday'\nimport { ViewHolidayEmployees } from '../ViewHolidayEmployees/ViewHolidayEmployees'\nimport { ViewHolidaySchedule } from '../ViewHolidaySchedule/ViewHolidaySchedule'\nimport { assertCreatablePolicyType, type TimeOffPolicyType } from './timeOffPolicyTypes'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { Flex } from '@/components/Common'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport interface TimeOffFlowProps extends BaseComponentInterface {\n companyId: string\n}\n\nexport type TimeOffFlowAlert = {\n type: 'error' | 'info' | 'success'\n title: string\n content?: ReactNode\n}\n\nexport interface TimeOffFlowContextInterface extends FlowContextInterface {\n companyId: string\n policyType?: TimeOffPolicyType\n policyId?: string\n alerts?: TimeOffFlowAlert[]\n}\n\nexport function PolicyListContextual() {\n const { onEvent, companyId, alerts } = useFlow<TimeOffFlowContextInterface>()\n const { Alert } = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\" gap={8}>\n {alerts?.map((alert, index) => (\n <Alert key={index} status={alert.type} label={alert.title}>\n {alert.content}\n </Alert>\n ))}\n <PolicyList onEvent={onEvent} companyId={ensureRequired(companyId)} />\n </Flex>\n )\n}\n\nexport function SelectPolicyTypeContextual() {\n const { onEvent, companyId, policyType, alerts } = useFlow<TimeOffFlowContextInterface>()\n const { Alert } = useComponentContext()\n\n const selectorDefault =\n policyType === 'sick' || policyType === 'vacation' || policyType === 'holiday'\n ? policyType\n : undefined\n\n return (\n <Flex flexDirection=\"column\" gap={8}>\n {alerts?.map((alert, index) => (\n <Alert key={index} status={alert.type} label={alert.title}>\n {alert.content}\n </Alert>\n ))}\n <PolicyTypeSelector\n onEvent={onEvent}\n companyId={ensureRequired(companyId)}\n defaultPolicyType={selectorDefault}\n />\n </Flex>\n )\n}\n\nexport function PolicyDetailsFormContextual() {\n const { onEvent, companyId, policyType, policyId, alerts } =\n useFlow<TimeOffFlowContextInterface>()\n const { Alert } = useComponentContext()\n const requiredPolicyType = ensureRequired(policyType)\n assertCreatablePolicyType(requiredPolicyType)\n\n return (\n <Flex flexDirection=\"column\" gap={8}>\n {alerts?.map((alert, index) => (\n <Alert key={index} status={alert.type} label={alert.title}>\n {alert.content}\n </Alert>\n ))}\n <PolicyConfigurationForm\n onEvent={onEvent}\n companyId={ensureRequired(companyId)}\n policyType={requiredPolicyType}\n policyId={policyId}\n />\n </Flex>\n )\n}\n\nexport function PolicySettingsContextual() {\n const { onEvent, policyId, alerts } = useFlow<TimeOffFlowContextInterface>()\n const { Alert } = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\" gap={8}>\n {alerts?.map((alert, index) => (\n <Alert key={index} status={alert.type} label={alert.title}>\n {alert.content}\n </Alert>\n ))}\n <PolicySettings onEvent={onEvent} policyId={ensureRequired(policyId)} />\n </Flex>\n )\n}\n\nexport function AddEmployeesToPolicyContextual() {\n const { onEvent, companyId, policyId, policyType } = useFlow<TimeOffFlowContextInterface>()\n const requiredPolicyType = ensureRequired(policyType)\n assertCreatablePolicyType(requiredPolicyType)\n return (\n <AddEmployeesToPolicy\n onEvent={onEvent}\n companyId={ensureRequired(companyId)}\n policyId={ensureRequired(policyId)}\n policyType={requiredPolicyType}\n />\n )\n}\n\nexport function TimeOffPolicyDetailContextual() {\n const { onEvent, policyId } = useFlow<TimeOffFlowContextInterface>()\n return <TimeOffPolicyDetail onEvent={onEvent} policyId={ensureRequired(policyId)} />\n}\n\nexport function HolidaySelectionFormContextual() {\n const { onEvent, companyId, alerts } = useFlow<TimeOffFlowContextInterface>()\n const { Alert } = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\" gap={8}>\n {alerts?.map((alert, index) => (\n <Alert key={index} status={alert.type} label={alert.title}>\n {alert.content}\n </Alert>\n ))}\n <HolidaySelectionForm onEvent={onEvent} companyId={ensureRequired(companyId)} mode=\"create\" />\n </Flex>\n )\n}\n\nexport function EditHolidaySelectionFormContextual() {\n const { onEvent, companyId, alerts } = useFlow<TimeOffFlowContextInterface>()\n const { Alert } = useComponentContext()\n\n return (\n <Flex flexDirection=\"column\" gap={8}>\n {alerts?.map((alert, index) => (\n <Alert key={index} status={alert.type} label={alert.title}>\n {alert.content}\n </Alert>\n ))}\n <HolidaySelectionForm onEvent={onEvent} companyId={ensureRequired(companyId)} mode=\"edit\" />\n </Flex>\n )\n}\n\nexport function AddEmployeesHolidayContextual() {\n const { onEvent, companyId } = useFlow<TimeOffFlowContextInterface>()\n return <AddEmployeesHoliday onEvent={onEvent} companyId={ensureRequired(companyId)} />\n}\n\nexport function ViewHolidayEmployeesContextual() {\n const { onEvent, companyId } = useFlow<TimeOffFlowContextInterface>()\n return <ViewHolidayEmployees onEvent={onEvent} companyId={ensureRequired(companyId)} />\n}\n\nexport function ViewHolidayScheduleContextual() {\n const { onEvent, companyId } = useFlow<TimeOffFlowContextInterface>()\n return <ViewHolidaySchedule onEvent={onEvent} companyId={ensureRequired(companyId)} />\n}\n"],"names":["PolicyListContextual","onEvent","companyId","alerts","useFlow","Alert","useComponentContext","jsxs","Flex","alert","index","PolicyList","ensureRequired","SelectPolicyTypeContextual","policyType","selectorDefault","jsx","PolicyTypeSelector","PolicyDetailsFormContextual","policyId","requiredPolicyType","assertCreatablePolicyType","PolicyConfigurationForm","PolicySettingsContextual","PolicySettings","AddEmployeesToPolicyContextual","AddEmployeesToPolicy","TimeOffPolicyDetailContextual","TimeOffPolicyDetail","HolidaySelectionFormContextual","HolidaySelectionForm","EditHolidaySelectionFormContextual","AddEmployeesHolidayContextual","AddEmployeesHoliday","ViewHolidayEmployeesContextual","ViewHolidayEmployees","ViewHolidayScheduleContextual","ViewHolidaySchedule"],"mappings":";;;;;;;;;;;;;;;;;;AAmCO,SAASA,IAAuB;AACrC,QAAM,EAAE,SAAAC,GAAS,WAAAC,GAAW,QAAAC,EAAA,IAAWC,EAAA,GACjC,EAAE,OAAAC,EAAA,IAAUC,EAAA;AAElB,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAC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B,SAAApC,GAAkB,WAAWW,EAAeV,CAAS,GAAG;AACtF;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PolicyType } from '@gusto/embedded-api/models/components/timeoffpolicy';
|
|
2
|
+
export type CreatableTimeOffPolicyType = Extract<PolicyType, 'sick' | 'vacation'>;
|
|
3
|
+
export type TimeOffPolicyType = PolicyType | 'holiday';
|
|
4
|
+
export declare const EDITABLE_TIME_OFF_POLICY_TYPES: readonly ["sick", "vacation", "holiday"];
|
|
5
|
+
export type EditableTimeOffPolicyType = (typeof EDITABLE_TIME_OFF_POLICY_TYPES)[number];
|
|
6
|
+
export declare function isEditableTimeOffPolicyType(policyType: string | null | undefined): policyType is EditableTimeOffPolicyType;
|
|
7
|
+
export declare const LISTED_TIME_OFF_POLICY_TYPES: readonly ["sick", "vacation"];
|
|
8
|
+
export declare function isListedTimeOffPolicyType(policyType: PolicyType | null | undefined): policyType is CreatableTimeOffPolicyType;
|
|
9
|
+
export declare function assertCreatablePolicyType(policyType: TimeOffPolicyType): asserts policyType is CreatableTimeOffPolicyType;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const t = ["sick", "vacation", "holiday"];
|
|
2
|
+
function c(i) {
|
|
3
|
+
return t.includes(i);
|
|
4
|
+
}
|
|
5
|
+
const e = [
|
|
6
|
+
"sick",
|
|
7
|
+
"vacation"
|
|
8
|
+
];
|
|
9
|
+
function o(i) {
|
|
10
|
+
return e.includes(i);
|
|
11
|
+
}
|
|
12
|
+
function n(i) {
|
|
13
|
+
if (i !== "sick" && i !== "vacation")
|
|
14
|
+
throw new Error(
|
|
15
|
+
`Expected creatable time-off policy type ('sick' or 'vacation'), got '${i}'`
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
t as EDITABLE_TIME_OFF_POLICY_TYPES,
|
|
20
|
+
e as LISTED_TIME_OFF_POLICY_TYPES,
|
|
21
|
+
n as assertCreatablePolicyType,
|
|
22
|
+
c as isEditableTimeOffPolicyType,
|
|
23
|
+
o as isListedTimeOffPolicyType
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=timeOffPolicyTypes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeOffPolicyTypes.js","sources":["../../../../src/components/TimeOff/TimeOffFlow/timeOffPolicyTypes.ts"],"sourcesContent":["import type { PolicyType } from '@gusto/embedded-api/models/components/timeoffpolicy'\n\n// SDK exposes more PolicyType values (bereavement, custom, etc.) but only\n// vacation and sick are creatable through the time-off policy endpoint.\n// Holiday is a distinct concept routed through @gusto/embedded-api's\n// holidayPayPolicies* hooks against a different endpoint family.\nexport type CreatableTimeOffPolicyType = Extract<PolicyType, 'sick' | 'vacation'>\nexport type TimeOffPolicyType = PolicyType | 'holiday'\n\nexport const EDITABLE_TIME_OFF_POLICY_TYPES = ['sick', 'vacation', 'holiday'] as const\n\nexport type EditableTimeOffPolicyType = (typeof EDITABLE_TIME_OFF_POLICY_TYPES)[number]\n\nexport function isEditableTimeOffPolicyType(\n policyType: string | null | undefined,\n): policyType is EditableTimeOffPolicyType {\n return EDITABLE_TIME_OFF_POLICY_TYPES.includes(policyType as EditableTimeOffPolicyType)\n}\n\n// Subset of types the SDK surfaces from the time_off_policies endpoint.\n// Holiday lives on a separate endpoint and is merged into the list by the caller.\nexport const LISTED_TIME_OFF_POLICY_TYPES = [\n 'sick',\n 'vacation',\n] as const satisfies readonly PolicyType[]\n\nexport function isListedTimeOffPolicyType(\n policyType: PolicyType | null | undefined,\n): policyType is CreatableTimeOffPolicyType {\n return LISTED_TIME_OFF_POLICY_TYPES.includes(policyType as CreatableTimeOffPolicyType)\n}\n\nexport function assertCreatablePolicyType(\n policyType: TimeOffPolicyType,\n): asserts policyType is CreatableTimeOffPolicyType {\n if (policyType !== 'sick' && policyType !== 'vacation') {\n throw new Error(\n `Expected creatable time-off policy type ('sick' or 'vacation'), got '${policyType}'`,\n )\n }\n}\n"],"names":["EDITABLE_TIME_OFF_POLICY_TYPES","isEditableTimeOffPolicyType","policyType","LISTED_TIME_OFF_POLICY_TYPES","isListedTimeOffPolicyType","assertCreatablePolicyType"],"mappings":"AASO,MAAMA,IAAiC,CAAC,QAAQ,YAAY,SAAS;AAIrE,SAASC,EACdC,GACyC;AACzC,SAAOF,EAA+B,SAASE,CAAuC;AACxF;AAIO,MAAMC,IAA+B;AAAA,EAC1C;AAAA,EACA;AACF;AAEO,SAASC,EACdF,GAC0C;AAC1C,SAAOC,EAA6B,SAASD,CAAwC;AACvF;AAEO,SAASG,EACdH,GACkD;AAClD,MAAIA,MAAe,UAAUA,MAAe;AAC1C,UAAM,IAAI;AAAA,MACR,wEAAwEA,CAAU;AAAA,IAAA;AAGxF;"}
|
|
@@ -4,11 +4,13 @@ export declare const timeOffMachine: {
|
|
|
4
4
|
policyDetailsForm: import('robot3').MachineState<any>;
|
|
5
5
|
policySettings: import('robot3').MachineState<any>;
|
|
6
6
|
addEmployeesToPolicy: import('robot3').MachineState<any>;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
viewTimeOffPolicyDetail: import('robot3').MachineState<any>;
|
|
8
|
+
editPolicyDetailsForm: import('robot3').MachineState<any>;
|
|
9
|
+
editPolicySettings: import('robot3').MachineState<any>;
|
|
9
10
|
holidaySelectionForm: import('robot3').MachineState<any>;
|
|
10
11
|
addEmployeesHoliday: import('robot3').MachineState<any>;
|
|
11
12
|
viewHolidayEmployees: import('robot3').MachineState<any>;
|
|
12
13
|
viewHolidaySchedule: import('robot3').MachineState<any>;
|
|
14
|
+
editHolidaySelectionForm: import('robot3').MachineState<any>;
|
|
13
15
|
final: import('robot3').MachineState<any>;
|
|
14
16
|
};
|