@gusto/embedded-react-sdk 0.57.1 → 0.57.3
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 +33 -0
- package/dist/components/Base/Base.js +2 -3
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +32 -32
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -1
- package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -8
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -10
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -6
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +10 -11
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -8
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -6
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -12
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +11 -13
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -7
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -6
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +7 -9
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -11
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +5 -7
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -9
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +10 -12
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +8 -10
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -6
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +6 -8
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +11 -13
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -6
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -6
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.js +66 -62
- package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
- package/dist/components/Company/PaySchedule/PayScheduleForm.module.scss.js +2 -2
- package/dist/components/Company/PaySchedule/management/AutoPilotDialog/AutoPilotDialog.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/AutoPilotDialog/useAutoPilotDialog.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.js +34 -14
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentDepartmentStepPresentation.js +106 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentDepartmentStepPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentEmployeeStepPresentation.js +136 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentEmployeeStepPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.js +38 -20
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.js +78 -44
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.js +45 -37
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.js +253 -92
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/departmentAccess.js +22 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/departmentAccess.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/employeeJob.js +13 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/employeeJob.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/payScheduleAssignmentStateMachine.js +48 -43
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/payScheduleAssignmentStateMachine.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/scheduleLabel.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/useAssignableEmployees.js +57 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleAssignment/useAssignableEmployees.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleCompensationOverviewPresentation.js +11 -13
- package/dist/components/Company/PaySchedule/management/PayScheduleCompensationOverviewPresentation.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleDepartmentOverviewPresentation.js +83 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleDepartmentOverviewPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleEmployeeOverviewPresentation.js +84 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleEmployeeOverviewPresentation.js.map +1 -0
- package/dist/components/Company/PaySchedule/management/PayScheduleManagementComponents.js +49 -44
- package/dist/components/Company/PaySchedule/management/PayScheduleManagementComponents.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleOverview.js +109 -39
- package/dist/components/Company/PaySchedule/management/PayScheduleOverview.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/PayScheduleOverviewPresentation.js.map +1 -1
- package/dist/components/Company/PaySchedule/management/payScheduleManagementStateMachine.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -7
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -6
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -8
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -6
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +3 -6
- package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js +5 -5
- package/dist/components/Contractor/Address/shared/useContractorAddressForm/useContractorAddressForm.js.map +1 -1
- package/dist/components/Contractor/Address/shared/useContractorAddressSummary/useContractorAddressSummary.js +1 -1
- package/dist/components/Contractor/Address/shared/useContractorAddressSummary/useContractorAddressSummary.js.map +1 -1
- package/dist/components/Contractor/Compensation/management/CompensationCard/CompensationCard.js +16 -17
- package/dist/components/Contractor/Compensation/management/CompensationCard/CompensationCard.js.map +1 -1
- package/dist/components/Contractor/Compensation/shared/useContractorCompensationSummary/useContractorCompensationSummary.js +4 -4
- package/dist/components/Contractor/Compensation/shared/useContractorCompensationSummary/useContractorCompensationSummary.js.map +1 -1
- package/dist/components/Contractor/Compensation/shared/useContractorPayForm/useContractorPayForm.js +3 -3
- package/dist/components/Contractor/Compensation/shared/useContractorPayForm/useContractorPayForm.js.map +1 -1
- package/dist/components/Contractor/ContractorList/shared/useContractorList.js +6 -6
- package/dist/components/Contractor/ContractorList/shared/useContractorList.js.map +1 -1
- package/dist/components/Contractor/Dashboard/Dashboard.js +20 -20
- package/dist/components/Contractor/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Contractor/Dismissal/useDismissal/useDismissal.js +10 -10
- package/dist/components/Contractor/Dismissal/useDismissal/useDismissal.js.map +1 -1
- package/dist/components/Contractor/Documents/management/DocumentsCard/DocumentsCard.js +8 -9
- package/dist/components/Contractor/Documents/management/DocumentsCard/DocumentsCard.js.map +1 -1
- package/dist/components/Contractor/Landing/Landing.js +43 -39
- package/dist/components/Contractor/Landing/Landing.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +3 -3
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/shared/ContractorBankAccountFormBody/ContractorBankAccountFormBody.js +6 -8
- package/dist/components/Contractor/PaymentMethod/shared/ContractorBankAccountFormBody/ContractorBankAccountFormBody.js.map +1 -1
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js +1 -1
- package/dist/components/Contractor/Payments/CreateHistoricalPayment/CreateHistoricalPayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +10 -10
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js +4 -4
- package/dist/components/Contractor/Payments/HistoricalPaymentSummary/HistoricalPaymentSummary.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +8 -8
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +5 -5
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +3 -3
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -1
- package/dist/components/Contractor/Profile/management/ProfileCard/ProfileCard.js +26 -27
- package/dist/components/Contractor/Profile/management/ProfileCard/ProfileCard.js.map +1 -1
- package/dist/components/Contractor/Profile/management/ProfileEditForm.js +11 -11
- package/dist/components/Contractor/Profile/onboarding/SelfOnboardingContractorProfile.js +1 -1
- package/dist/components/Contractor/Profile/onboarding/SelfOnboardingContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorDetailsForm/useContractorDetailsForm.js.map +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorProfileSummary/useContractorProfileSummary.js +1 -1
- package/dist/components/Contractor/Profile/shared/useContractorProfileSummary/useContractorProfileSummary.js.map +1 -1
- package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingComponents.js +2 -9
- package/dist/components/Contractor/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +18 -18
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.js +6 -6
- package/dist/components/Contractor/shared/SelectContractors/useSelectContractors.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +25 -25
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.js +15 -15
- package/dist/components/Employee/Compensation/shared/useCompensationManagement/useCompensationManagement.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.js +25 -25
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js +12 -13
- package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js.map +1 -1
- package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js +12 -13
- package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js +6 -8
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -6
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js +7 -7
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js +1 -1
- package/dist/components/Employee/Documents/onboarding/EmployeeDocuments/EmployeeDocuments.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js +3 -4
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +3 -4
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +6 -6
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +37 -33
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +27 -27
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js +22 -24
- package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js.map +1 -1
- package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js +8 -9
- package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js.map +1 -1
- package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js +14 -15
- package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js.map +1 -1
- package/dist/components/Employee/Profile/management/ProfileEditForm.js +1 -1
- package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js +6 -6
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/useEmployeeProfileSummary.js +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeProfileSummary/useEmployeeProfileSummary.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js +8 -15
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js +7 -8
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js.map +1 -1
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +7 -8
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +11 -11
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js +12 -12
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummary.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +26 -26
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +56 -54
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +14 -16
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -8
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +9 -11
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +66 -64
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +6 -6
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.js +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +75 -89
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +9 -9
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +44 -46
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +63 -61
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
- package/dist/components/Payroll/TransitionPayroll/useResolveTransitionPayroll.js +14 -13
- package/dist/components/Payroll/TransitionPayroll/useResolveTransitionPayroll.js.map +1 -1
- package/dist/components/Payroll/helpers.js +53 -49
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/payrollTypes.js +1 -1
- package/dist/components/Payroll/payrollTypes.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +13 -16
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.js +2 -2
- package/dist/components/Payroll/useUnprocessedTransitionPayPeriods.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +2 -4
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +6 -8
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +28 -30
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
- package/dist/contexts/ApiProvider/payrollOffCycleReasonEnumHook.js +1 -1
- package/dist/contexts/ApiProvider/payrollOffCycleReasonEnumHook.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -4
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/helpers/dateFormatting.js +47 -40
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/i18n/en/Company.Management.PaySchedule.json.js +37 -17
- package/dist/i18n/en/Company.Management.PaySchedule.json.js.map +1 -1
- package/dist/i18n/en/Company.Management.PayScheduleAssignment.json.js +20 -10
- package/dist/i18n/en/Company.Management.PayScheduleAssignment.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollHistory.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollList.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +1 -1
- package/dist/package.json.js +1 -1
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +8 -10
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +12 -14
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +13 -15
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SelectHookField.js +10 -12
- package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js +14 -16
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js +8 -10
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
- package/dist/shared/constants.js +5 -5
- package/dist/shared/constants.js.map +1 -1
- package/dist/src/components/Common/DateRangeFilter/DateRangeFilter.d.ts +2 -2
- package/dist/src/components/Common/OnboardingStatusBadge/index.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/PayScheduleForm.d.ts +6 -0
- package/dist/src/components/Company/PaySchedule/management/AutoPilotDialog/AutoPilotDialog.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/management/AutoPilotDialog/useAutoPilotDialog.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentCompensationStepPresentation.d.ts +10 -3
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentDepartmentStepPresentation.d.ts +21 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentEmployeeStepPresentation.d.ts +34 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentScheduleStepPresentation.d.ts +9 -3
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/AssignmentTypeStepPresentation.d.ts +5 -1
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignment.d.ts +10 -10
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/PayScheduleAssignmentComponents.d.ts +12 -4
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/departmentAccess.d.ts +19 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/employeeJob.d.ts +17 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/scheduleLabel.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/useAssignableEmployees.d.ts +34 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleAssignment/usePayScheduleAssignment.d.ts +16 -3
- package/dist/src/components/Company/PaySchedule/management/PayScheduleCompensationOverviewPresentation.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/management/PayScheduleDepartmentOverviewPresentation.d.ts +23 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleEmployeeOverviewPresentation.d.ts +25 -0
- package/dist/src/components/Company/PaySchedule/management/PayScheduleManagementComponents.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/management/PayScheduleOverviewPresentation.d.ts +1 -1
- package/dist/src/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +1 -1
- package/dist/src/components/Contractor/Landing/Landing.d.ts +5 -2
- package/dist/src/components/Employee/Landing/Landing.d.ts +5 -2
- package/dist/src/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollEditEmployee/shared/usePayrollEditEmployeeForm/usePayrollEditEmployeeForm.d.ts +2 -2
- package/dist/src/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/PayrollList/PayrollListPresentation.d.ts +2 -2
- package/dist/src/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +1 -1
- package/dist/src/components/Payroll/helpers.d.ts +22 -2
- package/dist/src/components/Payroll/usePreparedPayrollData.d.ts +2 -2
- package/dist/src/helpers/dateFormatting.d.ts +13 -0
- package/dist/src/i18n/types.d.ts +96 -6
- package/dist/src/models/external.d.ts +63 -48
- package/dist/src/shared/constants.d.ts +1 -1
- package/dist/style.css +1 -1
- package/docs/guides/endpoint-inventory.json +33 -13
- package/package.json +21 -21
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RFCDate as d } from "@gusto/embedded-api/types/rfcdate";
|
|
1
2
|
const s = (t) => {
|
|
2
3
|
if (!t) return null;
|
|
3
4
|
if (typeof t == "string") {
|
|
@@ -14,30 +15,30 @@ const s = (t) => {
|
|
|
14
15
|
}, c = (t) => (e, n) => {
|
|
15
16
|
const r = s(e);
|
|
16
17
|
return r ? r.toLocaleDateString(n, t) : "";
|
|
17
|
-
},
|
|
18
|
+
}, S = c({
|
|
18
19
|
weekday: "short",
|
|
19
20
|
month: "short",
|
|
20
21
|
day: "numeric"
|
|
21
|
-
}),
|
|
22
|
+
}), w = c({
|
|
22
23
|
weekday: "short",
|
|
23
24
|
month: "short",
|
|
24
25
|
day: "numeric",
|
|
25
26
|
year: "numeric"
|
|
26
|
-
}),
|
|
27
|
+
}), N = c({
|
|
27
28
|
month: "short",
|
|
28
29
|
day: "numeric"
|
|
29
|
-
}),
|
|
30
|
+
}), F = c({
|
|
30
31
|
month: "short",
|
|
31
32
|
day: "numeric",
|
|
32
33
|
year: "numeric"
|
|
33
|
-
}),
|
|
34
|
+
}), T = c({
|
|
34
35
|
month: "long",
|
|
35
36
|
day: "numeric"
|
|
36
|
-
}),
|
|
37
|
+
}), M = c({
|
|
37
38
|
month: "long",
|
|
38
39
|
day: "numeric",
|
|
39
40
|
year: "numeric"
|
|
40
|
-
}),
|
|
41
|
+
}), $ = (t, e) => {
|
|
41
42
|
const n = s(t);
|
|
42
43
|
if (!n) return { time: "", date: "" };
|
|
43
44
|
const r = n.toLocaleTimeString(e, {
|
|
@@ -51,7 +52,7 @@ const s = (t) => {
|
|
|
51
52
|
day: "numeric"
|
|
52
53
|
});
|
|
53
54
|
return { time: r, date: o };
|
|
54
|
-
},
|
|
55
|
+
}, L = (t, e, n) => {
|
|
55
56
|
const r = s(t), o = s(e);
|
|
56
57
|
if (!r || !o)
|
|
57
58
|
return { startDate: "", endDate: "" };
|
|
@@ -64,7 +65,7 @@ const s = (t) => {
|
|
|
64
65
|
year: "numeric"
|
|
65
66
|
});
|
|
66
67
|
return { startDate: a, endDate: i };
|
|
67
|
-
},
|
|
68
|
+
}, Y = (t, e, n, r) => {
|
|
68
69
|
const o = s(t), a = s(e);
|
|
69
70
|
if (!o || !a) return "";
|
|
70
71
|
const i = r?.useShortMonth ? "short" : "long", m = o.toLocaleDateString(n, {
|
|
@@ -76,72 +77,78 @@ const s = (t) => {
|
|
|
76
77
|
year: "numeric"
|
|
77
78
|
});
|
|
78
79
|
return `${m}–${D}`;
|
|
79
|
-
},
|
|
80
|
+
}, l = (t) => {
|
|
80
81
|
if (isNaN(t.getTime()))
|
|
81
82
|
return null;
|
|
82
83
|
const e = String(t.getFullYear()).padStart(4, "0"), n = String(t.getMonth() + 1).padStart(2, "0"), r = String(t.getDate()).padStart(2, "0");
|
|
83
84
|
return `${e}-${n}-${r}`;
|
|
84
|
-
},
|
|
85
|
+
}, R = (t) => {
|
|
86
|
+
const e = l(t);
|
|
87
|
+
if (!e)
|
|
88
|
+
throw new RangeError(`Cannot convert an invalid date to RFCDate: ${String(t)}`);
|
|
89
|
+
return new d(e);
|
|
90
|
+
}, W = (t) => {
|
|
85
91
|
if (!t) return "";
|
|
86
92
|
const e = s(t);
|
|
87
93
|
if (!e) return "";
|
|
88
94
|
const n = e.getFullYear(), r = String(e.getMonth() + 1).padStart(2, "0"), o = String(e.getDate()).padStart(2, "0");
|
|
89
95
|
return `${n}-${r}-${o}`;
|
|
90
|
-
},
|
|
96
|
+
}, p = (t) => !t || isNaN(t.getTime()) ? null : new Date(t.getFullYear(), t.getMonth(), t.getDate()), u = 1e3 * 60 * 60, g = u * 24, k = (t) => {
|
|
91
97
|
const e = s(t);
|
|
92
98
|
if (!e) return null;
|
|
93
99
|
const n = /* @__PURE__ */ new Date();
|
|
94
100
|
return (e.getTime() - n.getTime()) / u;
|
|
95
|
-
},
|
|
101
|
+
}, P = (t) => {
|
|
96
102
|
const e = s(t);
|
|
97
103
|
if (!e) return null;
|
|
98
104
|
const n = /* @__PURE__ */ new Date();
|
|
99
|
-
return (e.getTime() - n.getTime()) /
|
|
100
|
-
},
|
|
105
|
+
return (e.getTime() - n.getTime()) / g;
|
|
106
|
+
}, h = (t) => {
|
|
101
107
|
const e = t.getDay();
|
|
102
108
|
return e === 0 || e === 6;
|
|
103
|
-
},
|
|
109
|
+
}, f = (t, e) => {
|
|
104
110
|
const n = new Date(t);
|
|
105
111
|
return n.setDate(n.getDate() + e), n;
|
|
106
|
-
},
|
|
112
|
+
}, v = (t, e) => {
|
|
107
113
|
const n = new Date(t);
|
|
108
114
|
return n.setFullYear(n.getFullYear() + e), n;
|
|
109
|
-
},
|
|
115
|
+
}, C = (t, e) => {
|
|
110
116
|
let n = new Date(t);
|
|
111
117
|
n.setHours(0, 0, 0, 0);
|
|
112
118
|
let r = 0;
|
|
113
119
|
for (; r < e; )
|
|
114
|
-
n =
|
|
120
|
+
n = f(n, 1), h(n) || r++;
|
|
115
121
|
return n;
|
|
116
122
|
};
|
|
117
|
-
function
|
|
123
|
+
function _(t, e) {
|
|
118
124
|
if (!(t == null || e == null))
|
|
119
125
|
return `${String(t).padStart(2, "0")}-${String(e).padStart(2, "0")}`;
|
|
120
126
|
}
|
|
121
|
-
function
|
|
127
|
+
function z(t) {
|
|
122
128
|
return new Date(2023, t, 0).getDate();
|
|
123
129
|
}
|
|
124
130
|
export {
|
|
125
131
|
u as MS_PER_HOUR,
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
132
|
+
C as addBusinessDays,
|
|
133
|
+
f as addDays,
|
|
134
|
+
v as addYears,
|
|
135
|
+
T as formatDateLong,
|
|
136
|
+
M as formatDateLongWithYear,
|
|
137
|
+
N as formatDateShort,
|
|
138
|
+
S as formatDateShortWithWeekday,
|
|
139
|
+
w as formatDateShortWithWeekdayAndYear,
|
|
140
|
+
F as formatDateShortWithYear,
|
|
141
|
+
l as formatDateToStringDate,
|
|
142
|
+
$ as formatDateWithTime,
|
|
143
|
+
_ as formatMonthDay,
|
|
144
|
+
L as formatPayPeriod,
|
|
145
|
+
Y as formatPayPeriodRange,
|
|
146
|
+
z as getDaysInMonth,
|
|
147
|
+
P as getDaysUntil,
|
|
148
|
+
k as getHoursUntil,
|
|
149
|
+
p as normalizeDateToLocal,
|
|
144
150
|
s as normalizeToDate,
|
|
145
|
-
|
|
151
|
+
W as normalizeToISOString,
|
|
152
|
+
R as toRFCDate
|
|
146
153
|
};
|
|
147
154
|
//# sourceMappingURL=dateFormatting.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateFormatting.js","sources":["../../src/helpers/dateFormatting.ts"],"sourcesContent":["/**\n * Normalizes any date input (string, Date, or undefined) to a Date object.\n *\n * @remarks Handles `YYYY-MM-DD` strings by parsing them in local time to avoid\n * timezone drift. Also accepts ISO timestamp strings and existing `Date`\n * instances. Returns `null` for nullish, empty, or unparseable input.\n *\n * @param dateInput - The date value to normalize.\n * @returns A `Date` instance, or `null` if the input is missing or invalid.\n * @internal\n */\nexport const normalizeToDate = (dateInput?: string | Date | null): Date | null => {\n if (!dateInput) return null\n\n if (typeof dateInput === 'string') {\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(dateInput)) {\n const parts = dateInput.split('-')\n if (parts.length !== 3) return null\n\n const numbers = parts.map(Number)\n const year = numbers[0]\n const month = numbers[1]\n const day = numbers[2]\n if (year === undefined || month === undefined || day === undefined) {\n return null\n }\n\n if (\n isNaN(year) ||\n isNaN(month) ||\n isNaN(day) ||\n month < 1 ||\n month > 12 ||\n day < 1 ||\n day > 31\n ) {\n return null\n }\n\n return new Date(year, month - 1, day)\n }\n\n const parsedDate = new Date(dateInput)\n return isNaN(parsedDate.getTime()) ? null : parsedDate\n }\n\n if (dateInput instanceof Date) {\n return isNaN(dateInput.getTime()) ? null : dateInput\n }\n\n return null\n}\n\n/**\n * Creates a date formatter function that handles both string and Date inputs.\n */\nconst createDateFormatter =\n (options: Intl.DateTimeFormatOptions) =>\n (dateInput?: string | Date | null, locale?: string): string => {\n const date = normalizeToDate(dateInput)\n if (!date) return ''\n return date.toLocaleDateString(locale, options)\n }\n\n/**\n * Formats a date as a short weekday plus short month and day (e.g. `Mon, Jan 5`).\n *\n * @internal\n */\nexport const formatDateShortWithWeekday = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n})\n\n/**\n * Formats a date as a short weekday, short month, day, and year (e.g. `Mon, Jan 5, 2025`).\n *\n * @internal\n */\nexport const formatDateShortWithWeekdayAndYear = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\n/**\n * Formats a date as a short month and day (e.g. `Jan 5`).\n *\n * @internal\n */\nexport const formatDateShort = createDateFormatter({\n month: 'short',\n day: 'numeric',\n})\n\n/**\n * Formats a date as a short month, day, and year (e.g. `Jan 5, 2025`).\n *\n * @internal\n */\nexport const formatDateShortWithYear = createDateFormatter({\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\n/**\n * Formats a date as a long month and day (e.g. `January 5`).\n *\n * @internal\n */\nexport const formatDateLong = createDateFormatter({\n month: 'long',\n day: 'numeric',\n})\n\n/**\n * Formats a date as a long month, day, and year (e.g. `January 5, 2025`).\n *\n * @internal\n */\nexport const formatDateLongWithYear = createDateFormatter({\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n})\n\n/**\n * Splits a date into separate locale-formatted time and date strings.\n *\n * @param dateInput - The date value to format.\n * @param locale - Optional BCP 47 locale tag passed to `toLocaleString`.\n * @returns An object with `time` (e.g. `3:45 PM EST`) and `date` (e.g. `Mon, Jan 5`).\n * Both fields are empty strings when the input cannot be parsed.\n * @internal\n */\nexport const formatDateWithTime = (\n dateInput?: string | Date | null,\n locale?: string,\n): { time: string; date: string } => {\n const date = normalizeToDate(dateInput)\n if (!date) return { time: '', date: '' }\n\n const time = date.toLocaleTimeString(locale, {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n timeZoneName: 'short',\n })\n\n const dateString = date.toLocaleDateString(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n })\n\n return { time, date: dateString }\n}\n\n/**\n * Formats a pay period start and end date for display as separate fields.\n *\n * @remarks Start date renders with the long month and day; end date renders\n * with the short month, day, and year.\n *\n * @param startDateInput - Pay period start date.\n * @param endDateInput - Pay period end date.\n * @param locale - Optional BCP 47 locale tag passed to `toLocaleDateString`.\n * @returns Formatted `startDate` and `endDate` strings. Both fields are empty\n * strings when either input cannot be parsed.\n * @internal\n */\nexport const formatPayPeriod = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n): { startDate: string; endDate: string } => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) {\n return { startDate: '', endDate: '' }\n }\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: 'long',\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n })\n\n return { startDate: startFormatted, endDate: endFormatted }\n}\n\n/**\n * Formats a pay period as a single en-dash–separated range string.\n *\n * @param startDateInput - Pay period start date.\n * @param endDateInput - Pay period end date.\n * @param locale - Optional BCP 47 locale tag passed to `toLocaleDateString`.\n * @param options - When `useShortMonth` is true, both ends use short month names.\n * Otherwise both use the long month name.\n * @returns The formatted range (e.g. `January 1–January 15, 2025`), or an empty\n * string when either input cannot be parsed.\n * @internal\n */\nexport const formatPayPeriodRange = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n options?: { useShortMonth?: boolean },\n): string => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) return ''\n\n const monthFormat = options?.useShortMonth ? 'short' : 'long'\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n year: 'numeric',\n })\n\n return `${startFormatted}–${endFormatted}`\n}\n\n/**\n * Formats a `Date` as a `YYYY-MM-DD` string using the local year, month, and day.\n *\n * @param date - The date to format.\n * @returns A zero-padded `YYYY-MM-DD` string, or `null` when the input is an invalid date.\n * @internal\n */\nexport const formatDateToStringDate = (date: Date): string | null => {\n if (isNaN(date.getTime())) {\n return null\n }\n const year = String(date.getFullYear()).padStart(4, '0')\n const month = String(date.getMonth() + 1).padStart(2, '0')\n const day = String(date.getDate()).padStart(2, '0')\n return `${year}-${month}-${day}`\n}\n\n/**\n * Converts any parseable date string to a `YYYY-MM-DD` ISO string using local time.\n *\n * @remarks Reads the local year, month, and day so the calendar date is\n * preserved regardless of the runtime timezone. Safe for dates parsed from\n * locale-format strings (e.g. `4/16/1998`) or ISO strings, both of which land\n * at local midnight when normalized.\n *\n * @param value - The date string to convert.\n * @returns A `YYYY-MM-DD` string, or `''` for nullish, empty, or unparseable input.\n * @internal\n */\nexport const normalizeToISOString = (value?: string | null): string => {\n if (!value) return ''\n const date = normalizeToDate(value)\n if (!date) return ''\n const year = date.getFullYear()\n const month = String(date.getMonth() + 1).padStart(2, '0')\n const day = String(date.getDate()).padStart(2, '0')\n return `${year}-${month}-${day}`\n}\n\n/**\n * Normalizes a `Date` to local midnight, stripping any time-of-day component.\n *\n * @param date - The date to normalize, or `null`.\n * @returns A new `Date` at local midnight, or `null` when the input is missing or invalid.\n * @internal\n */\nexport const normalizeDateToLocal = (date: Date | null): Date | null => {\n if (!date || isNaN(date.getTime())) {\n return null\n }\n return new Date(date.getFullYear(), date.getMonth(), date.getDate())\n}\n\n/**\n * Number of milliseconds in one hour.\n *\n * @internal\n */\nexport const MS_PER_HOUR = 1000 * 60 * 60\nconst MS_PER_DAY = MS_PER_HOUR * 24\n\n/**\n * Returns the number of hours from now until a deadline.\n *\n * @param deadline - Target date in the future (or past, for negative results).\n * @returns Hours until `deadline` (fractional, negative if `deadline` is in\n * the past), or `null` when the input cannot be parsed.\n * @internal\n */\nexport const getHoursUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_HOUR\n}\n\n/**\n * Returns the number of days from now until a deadline.\n *\n * @param deadline - Target date in the future (or past, for negative results).\n * @returns Days until `deadline` (fractional, negative if `deadline` is in\n * the past), or `null` when the input cannot be parsed.\n * @internal\n */\nexport const getDaysUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_DAY\n}\n\n/**\n * Returns whether a date falls on Saturday or Sunday.\n *\n * @param date - The date to test.\n * @returns `true` if `date` is a weekend day.\n * @internal\n */\nconst isWeekend = (date: Date): boolean => {\n const day = date.getDay()\n return day === 0 || day === 6\n}\n\n/**\n * Returns a new `Date` offset from the input by a given number of days.\n *\n * @param date - The base date. Not mutated.\n * @param days - Number of days to add (negative values subtract).\n * @returns A new `Date` shifted by `days`.\n * @internal\n */\nexport const addDays = (date: Date, days: number): Date => {\n const result = new Date(date)\n result.setDate(result.getDate() + days)\n return result\n}\n\n/**\n * Returns a new `Date` offset by a given number of years.\n *\n * @param date - The base date. Not mutated.\n * @param years - Number of years to add (negative values subtract).\n * @returns A new `Date` shifted by `years`.\n * @internal\n */\nexport const addYears = (date: Date, years: number): Date => {\n const result = new Date(date)\n result.setFullYear(result.getFullYear() + years)\n return result\n}\n\n/**\n * Returns a new `Date` offset by a given number of business days (Monday–Friday).\n *\n * @remarks Skips Saturdays and Sundays when counting. The result is normalized\n * to local midnight. Does not account for holidays.\n *\n * @param startDate - The base date. Not mutated.\n * @param businessDays - Number of business days to add.\n * @returns A new `Date` shifted forward by `businessDays` weekdays.\n * @internal\n */\nexport const addBusinessDays = (startDate: Date, businessDays: number): Date => {\n let currentDate = new Date(startDate)\n currentDate.setHours(0, 0, 0, 0)\n let daysAdded = 0\n\n while (daysAdded < businessDays) {\n currentDate = addDays(currentDate, 1)\n if (!isWeekend(currentDate)) {\n daysAdded++\n }\n }\n\n return currentDate\n}\n\n/**\n * Formats numeric month and day as a zero-padded `MM-DD` string.\n *\n * @param month - Month number, 1–12.\n * @param day - Day-of-month number, 1–31.\n * @returns A `MM-DD` string, or `undefined` when either argument is missing.\n * @internal\n */\nexport function formatMonthDay(month?: number, day?: number): string | undefined {\n if (month == null || day == null) return undefined\n return `${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`\n}\n\n/**\n * Returns the number of days in a given month (1-indexed).\n *\n * @remarks Uses a non-leap year, so February always returns 28.\n *\n * @param month - Month number, 1–12.\n * @returns The number of days in that month.\n * @internal\n */\nexport function getDaysInMonth(month: number): number {\n return new Date(2023, month, 0).getDate()\n}\n"],"names":["normalizeToDate","dateInput","parts","numbers","year","month","day","parsedDate","createDateFormatter","options","locale","date","formatDateShortWithWeekday","formatDateShortWithWeekdayAndYear","formatDateShort","formatDateShortWithYear","formatDateLong","formatDateLongWithYear","formatDateWithTime","time","dateString","formatPayPeriod","startDateInput","endDateInput","startDate","endDate","startFormatted","endFormatted","formatPayPeriodRange","monthFormat","formatDateToStringDate","normalizeToISOString","value","normalizeDateToLocal","MS_PER_HOUR","MS_PER_DAY","getHoursUntil","deadline","deadlineDate","now","getDaysUntil","isWeekend","addDays","days","result","addYears","years","addBusinessDays","businessDays","currentDate","daysAdded","formatMonthDay","getDaysInMonth"],"mappings":"AAWO,MAAMA,IAAkB,CAACC,MAAkD;AAChF,MAAI,CAACA,EAAW,QAAO;AAEvB,MAAI,OAAOA,KAAc,UAAU;AACjC,QAAI,sBAAsB,KAAKA,CAAS,GAAG;AACzC,YAAMC,IAAQD,EAAU,MAAM,GAAG;AACjC,UAAIC,EAAM,WAAW,EAAG,QAAO;AAE/B,YAAMC,IAAUD,EAAM,IAAI,MAAM,GAC1BE,IAAOD,EAAQ,CAAC,GAChBE,IAAQF,EAAQ,CAAC,GACjBG,IAAMH,EAAQ,CAAC;AAKrB,aAJIC,MAAS,UAAaC,MAAU,UAAaC,MAAQ,UAKvD,MAAMF,CAAI,KACV,MAAMC,CAAK,KACX,MAAMC,CAAG,KACTD,IAAQ,KACRA,IAAQ,MACRC,IAAM,KACNA,IAAM,KAEC,OAGF,IAAI,KAAKF,GAAMC,IAAQ,GAAGC,CAAG;AAAA,IACtC;AAEA,UAAMC,IAAa,IAAI,KAAKN,CAAS;AACrC,WAAO,MAAMM,EAAW,QAAA,CAAS,IAAI,OAAOA;AAAA,EAC9C;AAEA,SAAIN,aAAqB,OAChB,MAAMA,EAAU,QAAA,CAAS,IAAI,OAAOA,IAGtC;AACT,GAKMO,IACJ,CAACC,MACD,CAACR,GAAkCS,MAA4B;AAC7D,QAAMC,IAAOX,EAAgBC,CAAS;AACtC,SAAKU,IACEA,EAAK,mBAAmBD,GAAQD,CAAO,IAD5B;AAEpB,GAOWG,IAA6BJ,EAAoB;AAAA,EAC5D,SAAS;AAAA,EACT,OAAO;AAAA,EACP,KAAK;AACP,CAAC,GAOYK,IAAoCL,EAAoB;AAAA,EACnE,SAAS;AAAA,EACT,OAAO;AAAA,EACP,KAAK;AAAA,EACL,MAAM;AACR,CAAC,GAOYM,IAAkBN,EAAoB;AAAA,EACjD,OAAO;AAAA,EACP,KAAK;AACP,CAAC,GAOYO,IAA0BP,EAAoB;AA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EAAE,QAAA;AAClC;"}
|
|
1
|
+
{"version":3,"file":"dateFormatting.js","sources":["../../src/helpers/dateFormatting.ts"],"sourcesContent":["import { RFCDate } from '@gusto/embedded-api/types/rfcdate'\n\n/**\n * Normalizes any date input (string, Date, or undefined) to a Date object.\n *\n * @remarks Handles `YYYY-MM-DD` strings by parsing them in local time to avoid\n * timezone drift. Also accepts ISO timestamp strings and existing `Date`\n * instances. Returns `null` for nullish, empty, or unparseable input.\n *\n * @param dateInput - The date value to normalize.\n * @returns A `Date` instance, or `null` if the input is missing or invalid.\n * @internal\n */\nexport const normalizeToDate = (dateInput?: string | Date | null): Date | null => {\n if (!dateInput) return null\n\n if (typeof dateInput === 'string') {\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(dateInput)) {\n const parts = dateInput.split('-')\n if (parts.length !== 3) return null\n\n const numbers = parts.map(Number)\n const year = numbers[0]\n const month = numbers[1]\n const day = numbers[2]\n if (year === undefined || month === undefined || day === undefined) {\n return null\n }\n\n if (\n isNaN(year) ||\n isNaN(month) ||\n isNaN(day) ||\n month < 1 ||\n month > 12 ||\n day < 1 ||\n day > 31\n ) {\n return null\n }\n\n return new Date(year, month - 1, day)\n }\n\n const parsedDate = new Date(dateInput)\n return isNaN(parsedDate.getTime()) ? null : parsedDate\n }\n\n if (dateInput instanceof Date) {\n return isNaN(dateInput.getTime()) ? null : dateInput\n }\n\n return null\n}\n\n/**\n * Creates a date formatter function that handles both string and Date inputs.\n */\nconst createDateFormatter =\n (options: Intl.DateTimeFormatOptions) =>\n (dateInput?: string | Date | null, locale?: string): string => {\n const date = normalizeToDate(dateInput)\n if (!date) return ''\n return date.toLocaleDateString(locale, options)\n }\n\n/**\n * Formats a date as a short weekday plus short month and day (e.g. `Mon, Jan 5`).\n *\n * @internal\n */\nexport const formatDateShortWithWeekday = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n})\n\n/**\n * Formats a date as a short weekday, short month, day, and year (e.g. `Mon, Jan 5, 2025`).\n *\n * @internal\n */\nexport const formatDateShortWithWeekdayAndYear = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\n/**\n * Formats a date as a short month and day (e.g. `Jan 5`).\n *\n * @internal\n */\nexport const formatDateShort = createDateFormatter({\n month: 'short',\n day: 'numeric',\n})\n\n/**\n * Formats a date as a short month, day, and year (e.g. `Jan 5, 2025`).\n *\n * @internal\n */\nexport const formatDateShortWithYear = createDateFormatter({\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\n/**\n * Formats a date as a long month and day (e.g. `January 5`).\n *\n * @internal\n */\nexport const formatDateLong = createDateFormatter({\n month: 'long',\n day: 'numeric',\n})\n\n/**\n * Formats a date as a long month, day, and year (e.g. `January 5, 2025`).\n *\n * @internal\n */\nexport const formatDateLongWithYear = createDateFormatter({\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n})\n\n/**\n * Splits a date into separate locale-formatted time and date strings.\n *\n * @param dateInput - The date value to format.\n * @param locale - Optional BCP 47 locale tag passed to `toLocaleString`.\n * @returns An object with `time` (e.g. `3:45 PM EST`) and `date` (e.g. `Mon, Jan 5`).\n * Both fields are empty strings when the input cannot be parsed.\n * @internal\n */\nexport const formatDateWithTime = (\n dateInput?: string | Date | null,\n locale?: string,\n): { time: string; date: string } => {\n const date = normalizeToDate(dateInput)\n if (!date) return { time: '', date: '' }\n\n const time = date.toLocaleTimeString(locale, {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n timeZoneName: 'short',\n })\n\n const dateString = date.toLocaleDateString(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n })\n\n return { time, date: dateString }\n}\n\n/**\n * Formats a pay period start and end date for display as separate fields.\n *\n * @remarks Start date renders with the long month and day; end date renders\n * with the short month, day, and year.\n *\n * @param startDateInput - Pay period start date.\n * @param endDateInput - Pay period end date.\n * @param locale - Optional BCP 47 locale tag passed to `toLocaleDateString`.\n * @returns Formatted `startDate` and `endDate` strings. Both fields are empty\n * strings when either input cannot be parsed.\n * @internal\n */\nexport const formatPayPeriod = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n): { startDate: string; endDate: string } => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) {\n return { startDate: '', endDate: '' }\n }\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: 'long',\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n })\n\n return { startDate: startFormatted, endDate: endFormatted }\n}\n\n/**\n * Formats a pay period as a single en-dash–separated range string.\n *\n * @param startDateInput - Pay period start date.\n * @param endDateInput - Pay period end date.\n * @param locale - Optional BCP 47 locale tag passed to `toLocaleDateString`.\n * @param options - When `useShortMonth` is true, both ends use short month names.\n * Otherwise both use the long month name.\n * @returns The formatted range (e.g. `January 1–January 15, 2025`), or an empty\n * string when either input cannot be parsed.\n * @internal\n */\nexport const formatPayPeriodRange = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n options?: { useShortMonth?: boolean },\n): string => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) return ''\n\n const monthFormat = options?.useShortMonth ? 'short' : 'long'\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n year: 'numeric',\n })\n\n return `${startFormatted}–${endFormatted}`\n}\n\n/**\n * Formats a `Date` as a `YYYY-MM-DD` string using the local year, month, and day.\n *\n * @param date - The date to format.\n * @returns A zero-padded `YYYY-MM-DD` string, or `null` when the input is an invalid date.\n * @internal\n */\nexport const formatDateToStringDate = (date: Date): string | null => {\n if (isNaN(date.getTime())) {\n return null\n }\n const year = String(date.getFullYear()).padStart(4, '0')\n const month = String(date.getMonth() + 1).padStart(2, '0')\n const day = String(date.getDate()).padStart(2, '0')\n return `${year}-${month}-${day}`\n}\n\n/**\n * Converts a `Date` into an `RFCDate` for the same local calendar day.\n *\n * @remarks Use this instead of `new RFCDate(date)`, which serializes through\n * `toISOString()` and shifts the day back by one in timezones ahead of UTC.\n *\n * @param date - The date to convert.\n * @returns An `RFCDate` carrying the local year, month, and day of `date`.\n * @throws RangeError when `date` is an invalid date.\n * @internal\n */\nexport const toRFCDate = (date: Date): RFCDate => {\n const dateString = formatDateToStringDate(date)\n if (!dateString) {\n throw new RangeError(`Cannot convert an invalid date to RFCDate: ${String(date)}`)\n }\n return new RFCDate(dateString)\n}\n\n/**\n * Converts any parseable date string to a `YYYY-MM-DD` ISO string using local time.\n *\n * @remarks Reads the local year, month, and day so the calendar date is\n * preserved regardless of the runtime timezone. Safe for dates parsed from\n * locale-format strings (e.g. `4/16/1998`) or ISO strings, both of which land\n * at local midnight when normalized.\n *\n * @param value - The date string to convert.\n * @returns A `YYYY-MM-DD` string, or `''` for nullish, empty, or unparseable input.\n * @internal\n */\nexport const normalizeToISOString = (value?: string | null): string => {\n if (!value) return ''\n const date = normalizeToDate(value)\n if (!date) return ''\n const year = date.getFullYear()\n const month = String(date.getMonth() + 1).padStart(2, '0')\n const day = String(date.getDate()).padStart(2, '0')\n return `${year}-${month}-${day}`\n}\n\n/**\n * Normalizes a `Date` to local midnight, stripping any time-of-day component.\n *\n * @param date - The date to normalize, or `null`.\n * @returns A new `Date` at local midnight, or `null` when the input is missing or invalid.\n * @internal\n */\nexport const normalizeDateToLocal = (date: Date | null): Date | null => {\n if (!date || isNaN(date.getTime())) {\n return null\n }\n return new Date(date.getFullYear(), date.getMonth(), date.getDate())\n}\n\n/**\n * Number of milliseconds in one hour.\n *\n * @internal\n */\nexport const MS_PER_HOUR = 1000 * 60 * 60\nconst MS_PER_DAY = MS_PER_HOUR * 24\n\n/**\n * Returns the number of hours from now until a deadline.\n *\n * @param deadline - Target date in the future (or past, for negative results).\n * @returns Hours until `deadline` (fractional, negative if `deadline` is in\n * the past), or `null` when the input cannot be parsed.\n * @internal\n */\nexport const getHoursUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_HOUR\n}\n\n/**\n * Returns the number of days from now until a deadline.\n *\n * @param deadline - Target date in the future (or past, for negative results).\n * @returns Days until `deadline` (fractional, negative if `deadline` is in\n * the past), or `null` when the input cannot be parsed.\n * @internal\n */\nexport const getDaysUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_DAY\n}\n\n/**\n * Returns whether a date falls on Saturday or Sunday.\n *\n * @param date - The date to test.\n * @returns `true` if `date` is a weekend day.\n * @internal\n */\nconst isWeekend = (date: Date): boolean => {\n const day = date.getDay()\n return day === 0 || day === 6\n}\n\n/**\n * Returns a new `Date` offset from the input by a given number of days.\n *\n * @param date - The base date. Not mutated.\n * @param days - Number of days to add (negative values subtract).\n * @returns A new `Date` shifted by `days`.\n * @internal\n */\nexport const addDays = (date: Date, days: number): Date => {\n const result = new Date(date)\n result.setDate(result.getDate() + days)\n return result\n}\n\n/**\n * Returns a new `Date` offset by a given number of years.\n *\n * @param date - The base date. Not mutated.\n * @param years - Number of years to add (negative values subtract).\n * @returns A new `Date` shifted by `years`.\n * @internal\n */\nexport const addYears = (date: Date, years: number): Date => {\n const result = new Date(date)\n result.setFullYear(result.getFullYear() + years)\n return result\n}\n\n/**\n * Returns a new `Date` offset by a given number of business days (Monday–Friday).\n *\n * @remarks Skips Saturdays and Sundays when counting. The result is normalized\n * to local midnight. Does not account for holidays.\n *\n * @param startDate - The base date. Not mutated.\n * @param businessDays - Number of business days to add.\n * @returns A new `Date` shifted forward by `businessDays` weekdays.\n * @internal\n */\nexport const addBusinessDays = (startDate: Date, businessDays: number): Date => {\n let currentDate = new Date(startDate)\n currentDate.setHours(0, 0, 0, 0)\n let daysAdded = 0\n\n while (daysAdded < businessDays) {\n currentDate = addDays(currentDate, 1)\n if (!isWeekend(currentDate)) {\n daysAdded++\n }\n }\n\n return currentDate\n}\n\n/**\n * Formats numeric month and day as a zero-padded `MM-DD` string.\n *\n * @param month - Month number, 1–12.\n * @param day - Day-of-month number, 1–31.\n * @returns A `MM-DD` string, or `undefined` when either argument is missing.\n * @internal\n */\nexport function formatMonthDay(month?: number, day?: number): string | undefined {\n if (month == null || day == null) return undefined\n return `${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`\n}\n\n/**\n * Returns the number of days in a given month (1-indexed).\n *\n * @remarks Uses a non-leap year, so February always returns 28.\n *\n * @param month - Month number, 1–12.\n * @returns The number of days in that month.\n * @internal\n */\nexport function getDaysInMonth(month: number): number {\n return new Date(2023, month, 0).getDate()\n}\n"],"names":["normalizeToDate","dateInput","parts","numbers","year","month","day","parsedDate","createDateFormatter","options","locale","date","formatDateShortWithWeekday","formatDateShortWithWeekdayAndYear","formatDateShort","formatDateShortWithYear","formatDateLong","formatDateLongWithYear","formatDateWithTime","time","dateString","formatPayPeriod","startDateInput","endDateInput","startDate","endDate","startFormatted","endFormatted","formatPayPeriodRange","monthFormat","formatDateToStringDate","toRFCDate","RFCDate","normalizeToISOString","value","normalizeDateToLocal","MS_PER_HOUR","MS_PER_DAY","getHoursUntil","deadline","deadlineDate","now","getDaysUntil","isWeekend","addDays","days","result","addYears","years","addBusinessDays","businessDays","currentDate","daysAdded","formatMonthDay","getDaysInMonth"],"mappings":";AAaO,MAAMA,IAAkB,CAACC,MAAkD;AAChF,MAAI,CAACA,EAAW,QAAO;AAEvB,MAAI,OAAOA,KAAc,UAAU;AACjC,QAAI,sBAAsB,KAAKA,CAAS,GAAG;AACzC,YAAMC,IAAQD,EAAU,MAAM,GAAG;AACjC,UAAIC,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
|
+
const e = "Pay schedule", a = "You have assigned everyone to be on one pay schedule.", t = "You have assigned employees to pay schedules by compensation type.", o = "Pay schedules by compensation type", s = "Manage", n = "Edit", c = "Edit schedule", l = "Edit pay schedule", d = "Edit AutoPilot", i = "Pay schedule actions", p = { name: "Name", frequency: "Frequency", schedule: "Schedule", department: "Department", employees: "Employees" }, y = { hourly: "Hourly", salaried: "Salaried" }, r = { label: "AutoPilot", enabled: "Enabled", disabled: "Disabled" }, m = { assignmentUpdated: "Pay schedule assignment updated." }, u = "You have assigned employees to pay schedules by department.", h = "Pay schedules by department", b = "Uncategorized employees", g = "Unnamed department", P = { anchorEndOfPayPeriodDescription: "The last date of the first pay period; can be the same as the first pay date.", payrollDeadline: "Run payroll by" }, D = "You have assigned pay schedules per employee.", E = "Pay schedules by employee", C = "{{count}} employee", f = "{{count}} employees", v = "Employee assignments are unavailable because required employee or compensation data is missing. Check employees:read and compensations:read access, or contact your administrator.", A = {
|
|
2
2
|
title: e,
|
|
3
|
-
description:
|
|
4
|
-
compensationDescription:
|
|
5
|
-
compensationTableLabel:
|
|
6
|
-
manageCta:
|
|
3
|
+
description: a,
|
|
4
|
+
compensationDescription: t,
|
|
5
|
+
compensationTableLabel: o,
|
|
6
|
+
manageCta: s,
|
|
7
7
|
editCta: n,
|
|
8
8
|
editScheduleCta: c,
|
|
9
9
|
editScheduleAriaLabel: l,
|
|
10
10
|
editAutoPilotAriaLabel: d,
|
|
11
11
|
rowMenuTriggerLabel: i,
|
|
12
|
-
labels:
|
|
12
|
+
labels: p,
|
|
13
13
|
compensationTypes: y,
|
|
14
|
-
autoPilot:
|
|
15
|
-
alerts:
|
|
14
|
+
autoPilot: r,
|
|
15
|
+
alerts: m,
|
|
16
|
+
departmentDescription: u,
|
|
17
|
+
departmentTableLabel: h,
|
|
18
|
+
uncategorizedEmployees: b,
|
|
19
|
+
unnamedDepartment: g,
|
|
20
|
+
scheduleForm: P,
|
|
21
|
+
employeeDescription: D,
|
|
22
|
+
employeeTableLabel: E,
|
|
23
|
+
employeeCount_one: C,
|
|
24
|
+
employeeCount_other: f,
|
|
25
|
+
employeeAccessDenied: v
|
|
16
26
|
};
|
|
17
27
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
28
|
+
m as alerts,
|
|
29
|
+
r as autoPilot,
|
|
30
|
+
t as compensationDescription,
|
|
31
|
+
o as compensationTableLabel,
|
|
22
32
|
y as compensationTypes,
|
|
23
|
-
|
|
24
|
-
|
|
33
|
+
A as default,
|
|
34
|
+
u as departmentDescription,
|
|
35
|
+
h as departmentTableLabel,
|
|
36
|
+
a as description,
|
|
25
37
|
d as editAutoPilotAriaLabel,
|
|
26
38
|
n as editCta,
|
|
27
39
|
l as editScheduleAriaLabel,
|
|
28
40
|
c as editScheduleCta,
|
|
29
|
-
|
|
30
|
-
|
|
41
|
+
v as employeeAccessDenied,
|
|
42
|
+
C as employeeCount_one,
|
|
43
|
+
f as employeeCount_other,
|
|
44
|
+
D as employeeDescription,
|
|
45
|
+
E as employeeTableLabel,
|
|
46
|
+
p as labels,
|
|
47
|
+
s as manageCta,
|
|
31
48
|
i as rowMenuTriggerLabel,
|
|
32
|
-
|
|
49
|
+
P as scheduleForm,
|
|
50
|
+
e as title,
|
|
51
|
+
b as uncategorizedEmployees,
|
|
52
|
+
g as unnamedDepartment
|
|
33
53
|
};
|
|
34
54
|
//# sourceMappingURL=Company.Management.PaySchedule.json.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Company.Management.PaySchedule.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Company.Management.PaySchedule.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,20 +1,30 @@
|
|
|
1
|
-
const e = { heading: "Choose schedule type", description: "After you choose, you can create a pay schedule for each group.", options: { single: { label: "Everyone on one schedule", description: "Choose one pay schedule for all your employees" }, hourlySalaried: { label: "Separate schedules by compensation type", description: "Choose one pay schedule for hourly employees and another for salaried employees" } } }, a = { heading: "Assign employees", payScheduleLabel: "Pay schedule", payScheduleDescription: "The pay schedule to use for all employees.", addPayScheduleCta: "Add pay schedule" },
|
|
1
|
+
const e = { heading: "Choose schedule type", description: "After you choose, you can create a pay schedule for each group.", options: { single: { label: "Everyone on one schedule", description: "Choose one pay schedule for all your employees" }, hourlySalaried: { label: "Separate schedules by compensation type", description: "Choose one pay schedule for hourly employees and another for salaried employees" }, byDepartment: { label: "By department", description: "Assign pay schedules to departments. Use this to pay Sales or other commission-based department separately." }, byEmployee: { label: "By employee", description: "Assign a pay schedule to each individual employee." } } }, a = { heading: "Assign employees", payScheduleLabel: "Pay schedule", payScheduleDescription: "The pay schedule to use for all employees.", addPayScheduleCta: "Add pay schedule" }, s = { heading: "Assign employees", hourlyPayScheduleLabel: "Hourly employees", hourlyPayScheduleDescription: "The pay schedule to use for hourly employees.", salariedPayScheduleLabel: "Salaried employees", salariedPayScheduleDescription: "The pay schedule to use for salaried employees.", addPayScheduleCta: "Add pay schedule" }, o = { heading: "Review changes", noChangesHeading: "There are no changes to review.", noChangesDescription: "If you intended to make changes, please go back and make them.", employeeChangesHeading: "Employees affected", nameLabel: "Name", transitionPayPeriodLabel: "Transition pay period", payFrequencyLabel: "New pay frequency", firstPayPeriodLabel: "First pay period", noTransitionNeeded: "No transition needed" }, n = "Back", t = "Continue", l = "Submit", d = { heading: "Assign employees", defaultPayScheduleLabel: "Uncategorized employees", defaultPayScheduleDescription: "Select a pay schedule for employees who aren't assigned to any department.", unnamedDepartment: "Unnamed department", addPayScheduleCta: "Add pay schedule" }, p = { anchorEndOfPayPeriodDescription: "The last date of the first pay period; can be the same as the first pay date.", payrollDeadline: "Run payroll by" }, y = "Department schedules are unavailable because access to departments is missing. You can choose another schedule type or contact your administrator.", i = { heading: "Assign employees", employeesLabel: "Employees", employeeLabel: "Employee", payScheduleLabel: "Pay schedule", scheduleForEmployee: "Pay schedule for {{name}}", tableLabel: "Employee pay schedule assignments", addPayScheduleCta: "Add pay schedule", typeLabel: "Type", types: { salariedExempt: "Salaried / Exempt", hourly: "Hourly / Nonexempt", salariedNonexempt: "Salaried / Nonexempt", owner: "Owner" } }, r = "Employee assignments are unavailable because required employee or compensation data is missing. Check employees:read and compensations:read access, or contact your administrator.", c = {
|
|
2
2
|
typeStep: e,
|
|
3
3
|
scheduleStep: a,
|
|
4
|
-
compensationStep:
|
|
5
|
-
reviewStep:
|
|
4
|
+
compensationStep: s,
|
|
5
|
+
reviewStep: o,
|
|
6
6
|
backCta: n,
|
|
7
|
-
continueCta:
|
|
8
|
-
submitCta:
|
|
7
|
+
continueCta: t,
|
|
8
|
+
submitCta: l,
|
|
9
|
+
departmentStep: d,
|
|
10
|
+
scheduleForm: p,
|
|
11
|
+
departmentAccessDenied: y,
|
|
12
|
+
employeeStep: i,
|
|
13
|
+
employeeAccessDenied: r
|
|
9
14
|
};
|
|
10
15
|
export {
|
|
11
16
|
n as backCta,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
s as compensationStep,
|
|
18
|
+
t as continueCta,
|
|
19
|
+
c as default,
|
|
20
|
+
y as departmentAccessDenied,
|
|
21
|
+
d as departmentStep,
|
|
22
|
+
r as employeeAccessDenied,
|
|
23
|
+
i as employeeStep,
|
|
24
|
+
o as reviewStep,
|
|
25
|
+
p as scheduleForm,
|
|
16
26
|
a as scheduleStep,
|
|
17
|
-
|
|
27
|
+
l as submitCta,
|
|
18
28
|
e as typeStep
|
|
19
29
|
};
|
|
20
30
|
//# sourceMappingURL=Company.Management.PayScheduleAssignment.json.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Company.Management.PayScheduleAssignment.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Company.Management.PayScheduleAssignment.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const e = "Payroll history",
|
|
1
|
+
const e = "Payroll history", t = { startDate: "From", endDate: "To", apply: "Apply", cancel: "Cancel", reset: "Reset", selectDates: "Select dates", triggerLabel: "Filter by date, {{selection}}" }, a = { label: "Payroll history" }, l = { payPeriod: "Pay period", type: "Type", payDate: "Pay date", status: "Status", totalPayroll: "Total payroll" }, o = { viewSummary: "View payroll summary", viewReceipt: "View payroll receipt", cancelPayroll: "Cancel payroll" }, r = { default: { title: "No payroll history", description: "When you run payrolls, they'll appear here for easy reference." }, filtered: { title: "No payrolls in this date range", description: "Try adjusting the date filter to see more payrolls." } }, y = { noAmount: "—" }, i = { title: "Cancel {{payPeriod}} payroll?", body: "You may cancel this payroll and run it again later. Your changes will be saved.", deadline: "Run this payroll by {{time}} on {{date}} to pay your employees on time.", primaryAction: "Yes, cancel payroll", secondaryAction: "No, go back" }, s = {
|
|
2
2
|
title: e,
|
|
3
|
-
dateFilter:
|
|
4
|
-
dataView:
|
|
3
|
+
dateFilter: t,
|
|
4
|
+
dataView: a,
|
|
5
5
|
columns: l,
|
|
6
6
|
menu: o,
|
|
7
7
|
emptyState: r,
|
|
@@ -11,8 +11,8 @@ const e = "Payroll history", a = { startDate: "From", endDate: "To", apply: "App
|
|
|
11
11
|
export {
|
|
12
12
|
i as cancelDialog,
|
|
13
13
|
l as columns,
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
a as dataView,
|
|
15
|
+
t as dateFilter,
|
|
16
16
|
s as default,
|
|
17
17
|
r as emptyState,
|
|
18
18
|
y as labels,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = { default: { title: "All payrolls have been processed" }, filtered: { title: "No payrolls in this date range", description: "Try adjusting the date filter to see more payrolls." } }, l = "Upcoming payroll", t = { startDate: "From", endDate: "To", apply: "Apply", cancel: "Cancel", reset: "Reset", selectDates: "Select dates",
|
|
1
|
+
const e = { default: { title: "All payrolls have been processed" }, filtered: { title: "No payrolls in this date range", description: "Try adjusting the date filter to see more payrolls." } }, l = "Upcoming payroll", t = { startDate: "From", endDate: "To", apply: "Apply", cancel: "Cancel", reset: "Reset", selectDates: "Select dates", triggerLabel: "Filter by date, {{selection}}" }, a = "Payrolls", o = "Run Payroll", r = "Review and submit", s = "Skip payroll", n = "Payroll actions", c = { title: "Skip payroll for {{payPeriod}}?", body: "Before skipping this payroll, check your state's pay frequency laws. If you don't pay the team on time, it could lead to penalties or fines.", confirmCta: "Yes, skip payroll", cancelCta: "No, go back" }, y = "Payroll skipped", i = "Cancel payroll", p = { title: "Cancel {{payPeriod}} payroll?", body: "This will permanently remove this off-cycle payroll. Any changes you've made will be lost.", confirmCta: "Yes, cancel payroll", cancelCta: "No, go back" }, d = "Payroll cancelled", u = { External: "External", "Off-Cycle": "Off-Cycle", Regular: "Regular" }, f = ["Pay period", "Type", "Pay date", "Run by", "Status"], P = { title: "Run an off-cycle payroll", description: "You can pay an employee outside of your normal payroll schedule by running an off-cycle payroll.", button: "Run off-cycle payroll" }, b = {
|
|
2
2
|
emptyState: e,
|
|
3
3
|
title: l,
|
|
4
4
|
dateFilter: t,
|
|
@@ -7,8 +7,8 @@ const e = { default: { title: "All payrolls have been processed" }, filtered: {
|
|
|
7
7
|
submitPayrollCta: r,
|
|
8
8
|
skipPayrollCta: s,
|
|
9
9
|
payrollMenuLabel: n,
|
|
10
|
-
skipPayrollDialog:
|
|
11
|
-
skipSuccessAlert:
|
|
10
|
+
skipPayrollDialog: c,
|
|
11
|
+
skipSuccessAlert: y,
|
|
12
12
|
deletePayrollCta: i,
|
|
13
13
|
deletePayrollDialog: p,
|
|
14
14
|
deleteSuccessAlert: d,
|
|
@@ -28,8 +28,8 @@ export {
|
|
|
28
28
|
a as payrollsListLabel,
|
|
29
29
|
o as runPayrollTitle,
|
|
30
30
|
s as skipPayrollCta,
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
c as skipPayrollDialog,
|
|
32
|
+
y as skipSuccessAlert,
|
|
33
33
|
r as submitPayrollCta,
|
|
34
34
|
f as tableHeaders,
|
|
35
35
|
l as title,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e = "Submit", a = "Back", t = "Save and exit", o = "Review payroll", l = "Payroll summary", s = "{{payrollType}} payroll for <dateWrapper>{{payPeriod}}</dateWrapper>", i = "{{payrollType}} payroll", n = "Submit", r = "Edit", y = "Cancel payroll", p = "Cancel {{payPeriod}} payroll?", c = "Cancel payroll?", d = "You may cancel this payroll and run it again later. Your changes will be saved.", m = "Run this payroll by {{
|
|
1
|
+
const e = "Submit", a = "Back", t = "Save and exit", o = "Review payroll", l = "Payroll summary", s = "{{payrollType}} payroll for <dateWrapper>{{payPeriod}}</dateWrapper>", i = "{{payrollType}} payroll", n = "Submit", r = "Edit", y = "Cancel payroll", p = "Cancel {{payPeriod}} payroll?", c = "Cancel payroll?", d = "You may cancel this payroll and run it again later. Your changes will be saved.", m = "Run this payroll by {{time}} on {{date}} to pay your employees on time.", u = "Yes, cancel payroll", b = "No, go back", T = "View payroll receipt", h = "Download paystub pdf", g = "Generating paystub…", D = "Submitting payroll...", f = "This may take a minute or two. You can navigate away while this happens.", w = "Loading payroll...", P = "Cancelling payroll...", x = "This payroll has been cancelled.", C = "This payroll has changed", k = "Refresh or return to your payrolls to continue.", L = "Back to payrolls", S = "Skipped", v = { payrollLoadFailed: "There was an issue loading this payroll. Please try again.", directDepositDeadline: "To pay your employees with direct deposit by {{payDate}}, you'll need to run payroll by {{time}} on {{date}}.", directDepositDeadlineText: "Make sure to submit before the deadline to ensure timely payments.", paystubPdfError: "There was an issue generating the paystub PDF. Please try again later.", payrollProcessedTitle: "Payroll submitted", payrollProcessedMessage: "{{amount}} will be debited on {{date}}. Make sure you have these funds available.", payrollProcessingFailedTitle: "There was an error submitting payroll", payrollProcessingFailedCtaLabel: "Recalculate payroll", wireDetailsSubmittedTitle: "Wire details submitted", wireDetailsSubmittedMessage: "Once we receive the funds from your bank we'll pay your team on {{checkDate}}" }, E = "Payroll Summary", B = "Payroll summary (Wire funds)", W = "Payroll summary (4-day direct deposit)", F = "Payroll summary table", _ = { label: "Payroll details", companyPaysTab: "Company pays", companyPaysTable: "Company pays by employee", hoursWorkedTab: "Hours worked", hoursWorkedTable: "Hours worked by employee", employeeTakeHomeTab: "Employee take home", employeeTakeHomeTable: "Employee take home by employee", taxesTab: "Taxed and debited", taxesTable: "Taxes breakdown", debitedTable: "Debited totals by company" }, O = { totalPayroll: "Total payroll", debitAmount: "Debit amount", wireAmount: "Wire amount", wireTransferDeadline: "Wire transfer deadline", employees: "Employees", grossPay: "Gross Pay", reimbursements: "Reimbursements", debitAccount: "Debit account", debitDate: "Debit date", employeePayDate: "Employee pay date", companyTaxes: "Company taxes", companyBenefits: "Company benefits", companyPays: "Company pays", compensationType: "Compensation type", regular: "Regular", overtime: "Overtime (1.5x)", doubleOT: "Overtime (2x)", timeOff: "Paid time off", totalHours: "Total hours", paymentType: "Payment type", employeeTaxes: "Employee taxes", employeeBenefits: "Employee benefits", payment: "Payment", deductions: "Deductions", taxDescription: "Tax description", byYourEmployees: "By your employees", byYourCompany: "By your company", debitedByGusto: "Debited by Gusto", taxesTotal: "Total", paystub: "Paystub", footerTotalsLabel: "Totals", footerTotalsDescription: "All employees in this payroll" }, R = "Totals", Y = "Direct deposits", H = "Reimbursements", M = "Garnishments", A = "Taxes (Employees and Employers)", G = { exempt: "Salaried / Exempt", nonexempt: "Hourly / Nonexempt" }, N = { genericBlockerTitle: "Submission blocked", genericBlockerMessage: "This payroll cannot be submitted. Please contact support for assistance.", fastAchOptions: { description: "Payroll can still be funded by selecting one of the options below. The selected funding method will only be used for this cycle and will not apply to future payroll.", fundingOptionsLabel: "Funding options", wireLabel: "Wire funds", wireFastestBadge: "Fastest", wireDescription: "Pay your employees on time by sending a wire transfer. We'll provide instructions on the next step.", directDepositLabel: "Switch to 4-day direct deposit", directDepositDescription: "Delay your employees pay date by four days and process using regular debits.", employeePayDate: "Employee pay date: {{date}}" }, fast_ach_threshold_exceeded: { title: "You have exceeded the limit at which you can process {{days}} payroll." }, needs_earned_access_for_fast_ach: { title: "You have not yet earned access to faster payroll." } }, V = {
|
|
2
2
|
breadcrumbLabel: e,
|
|
3
3
|
backCta: a,
|
|
4
4
|
exitFlowCta: t,
|
package/dist/package.json.js
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import { useHookFieldResolution as
|
|
3
|
-
import { withFieldElementRegistry as
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
import { CheckboxField as u } from "../../../components/Common/Fields/CheckboxField/CheckboxField.js";
|
|
7
|
-
function h({
|
|
2
|
+
import { useHookFieldResolution as c } from "../useHookFieldResolution.js";
|
|
3
|
+
import { withFieldElementRegistry as u } from "./withFieldElementRegistry.js";
|
|
4
|
+
import { CheckboxField as p } from "../../../components/Common/Fields/CheckboxField/CheckboxField.js";
|
|
5
|
+
function F({
|
|
8
6
|
name: e,
|
|
9
7
|
formHookResult: o,
|
|
10
8
|
label: t,
|
|
@@ -12,15 +10,15 @@ function h({
|
|
|
12
10
|
validationMessages: s,
|
|
13
11
|
FieldComponent: d
|
|
14
12
|
}) {
|
|
15
|
-
const { metadata: l, control: m, errorMessage: a, fieldElementRegistry: f } =
|
|
13
|
+
const { metadata: l, control: m, errorMessage: a, fieldElementRegistry: f } = c(
|
|
16
14
|
e,
|
|
17
15
|
o,
|
|
18
16
|
s
|
|
19
17
|
), i = l[e];
|
|
20
|
-
return
|
|
18
|
+
return u(
|
|
21
19
|
f,
|
|
22
20
|
/* @__PURE__ */ n(
|
|
23
|
-
|
|
21
|
+
p,
|
|
24
22
|
{
|
|
25
23
|
name: e,
|
|
26
24
|
control: m,
|
|
@@ -35,6 +33,6 @@ function h({
|
|
|
35
33
|
);
|
|
36
34
|
}
|
|
37
35
|
export {
|
|
38
|
-
|
|
36
|
+
F as CheckboxHookField
|
|
39
37
|
};
|
|
40
38
|
//# sourceMappingURL=CheckboxHookField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxHookField.js","sources":["../../../../src/partner-hook-utils/form/fields/CheckboxHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport type { BaseFieldProps, ValidationMessages, FormHookResult } from '../../types'\nimport { withFieldElementRegistry } from './withFieldElementRegistry'\nimport { CheckboxField } from '@/components/Common'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\n\n/**\n * Props accepted by a checkbox field surfaced through a form hook.\n * Exposes `validationMessages` for custom error text alongside the shared base\n * field attributes (`label`, `description`).\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @public\n * @group Hook field props\n */\nexport interface CheckboxHookFieldProps<TErrorCode extends string = never> extends BaseFieldProps {\n /** The field name; must match the corresponding key in the form schema. */\n name: string\n /** Form hook result to connect to; falls back to the nearest `SDKFormProvider` when omitted. */\n formHookResult?: FormHookResult\n /** Custom error text keyed by validation error code. */\n validationMessages?: ValidationMessages<TErrorCode>\n /** Replaces the default checkbox UI component; must accept the same props as `CheckboxProps`. */\n FieldComponent?: ComponentType<CheckboxProps>\n}\n\n/**\n * Checkbox field connected to a partner form hook result via `useHookFieldResolution`.\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @param props - Field configuration including `name`, `formHookResult`, and label content.\n * @returns The rendered checkbox field wrapped in the field element registry.\n * @internal\n */\nexport function CheckboxHookField<TErrorCode extends string>({\n name,\n formHookResult,\n label,\n description,\n validationMessages,\n FieldComponent,\n}: CheckboxHookFieldProps<TErrorCode>) {\n const { metadata, control, errorMessage, fieldElementRegistry } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = metadata[name]\n\n return withFieldElementRegistry(\n fieldElementRegistry,\n <CheckboxField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n FieldComponent={FieldComponent}\n />,\n )\n}\n"],"names":["CheckboxHookField","name","formHookResult","label","description","validationMessages","FieldComponent","metadata","control","errorMessage","fieldElementRegistry","useHookFieldResolution","fieldMetadata","withFieldElementRegistry","jsx","CheckboxField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CheckboxHookField.js","sources":["../../../../src/partner-hook-utils/form/fields/CheckboxHookField.tsx"],"sourcesContent":["import type { ComponentType } from 'react'\nimport { useHookFieldResolution } from '../useHookFieldResolution'\nimport type { BaseFieldProps, ValidationMessages, FormHookResult } from '../../types'\nimport { withFieldElementRegistry } from './withFieldElementRegistry'\nimport { CheckboxField } from '@/components/Common'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\n\n/**\n * Props accepted by a checkbox field surfaced through a form hook.\n * Exposes `validationMessages` for custom error text alongside the shared base\n * field attributes (`label`, `description`).\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @public\n * @group Hook field props\n */\nexport interface CheckboxHookFieldProps<TErrorCode extends string = never> extends BaseFieldProps {\n /** The field name; must match the corresponding key in the form schema. */\n name: string\n /** Form hook result to connect to; falls back to the nearest `SDKFormProvider` when omitted. */\n formHookResult?: FormHookResult\n /** Custom error text keyed by validation error code. */\n validationMessages?: ValidationMessages<TErrorCode>\n /** Replaces the default checkbox UI component; must accept the same props as `CheckboxProps`. */\n FieldComponent?: ComponentType<CheckboxProps>\n}\n\n/**\n * Checkbox field connected to a partner form hook result via `useHookFieldResolution`.\n *\n * @typeParam TErrorCode - Validation error code keys mapped via `validationMessages`.\n * @param props - Field configuration including `name`, `formHookResult`, and label content.\n * @returns The rendered checkbox field wrapped in the field element registry.\n * @internal\n */\nexport function CheckboxHookField<TErrorCode extends string>({\n name,\n formHookResult,\n label,\n description,\n validationMessages,\n FieldComponent,\n}: CheckboxHookFieldProps<TErrorCode>) {\n const { metadata, control, errorMessage, fieldElementRegistry } = useHookFieldResolution(\n name,\n formHookResult,\n validationMessages,\n )\n const fieldMetadata = metadata[name]\n\n return withFieldElementRegistry(\n fieldElementRegistry,\n <CheckboxField\n name={name}\n control={control}\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={fieldMetadata?.isRequired}\n isDisabled={fieldMetadata?.isDisabled}\n FieldComponent={FieldComponent}\n />,\n )\n}\n"],"names":["CheckboxHookField","name","formHookResult","label","description","validationMessages","FieldComponent","metadata","control","errorMessage","fieldElementRegistry","useHookFieldResolution","fieldMetadata","withFieldElementRegistry","jsx","CheckboxField"],"mappings":";;;;AAmCO,SAASA,EAA6C;AAAA,EAC3D,MAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AACF,GAAuC;AACrC,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,cAAAC,GAAc,sBAAAC,MAAyBC;AAAA,IAChEV;AAAA,IACAC;AAAA,IACAG;AAAA,EAAA,GAEIO,IAAgBL,EAASN,CAAI;AAEnC,SAAOY;AAAA,IACLH;AAAA,IACA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAAd;AAAA,QACA,SAAAO;AAAA,QACA,OAAAL;AAAA,QACA,aAAAC;AAAA,QACA,cAAAK;AAAA,QACA,YAAYG,GAAe;AAAA,QAC3B,YAAYA,GAAe;AAAA,QAC3B,gBAAAN;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -1,48 +1,46 @@
|
|
|
1
1
|
import { jsx as b } from "react/jsx-runtime";
|
|
2
2
|
import { useHookFieldResolution as c } from "../useHookFieldResolution.js";
|
|
3
3
|
import { withFieldElementRegistry as F } from "./withFieldElementRegistry.js";
|
|
4
|
-
import "classnames";
|
|
5
|
-
import "../../../shared/constants.js";
|
|
6
4
|
import { NumberInputField as g } from "../../../components/Common/Fields/NumberInputField/NumberInputField.js";
|
|
7
|
-
function
|
|
5
|
+
function D({
|
|
8
6
|
name: e,
|
|
9
7
|
formHookResult: t,
|
|
10
8
|
label: o,
|
|
11
9
|
description: r,
|
|
12
10
|
format: s,
|
|
13
|
-
min:
|
|
14
|
-
max:
|
|
15
|
-
placeholder:
|
|
11
|
+
min: d,
|
|
12
|
+
max: l,
|
|
13
|
+
placeholder: m,
|
|
16
14
|
validationMessages: u,
|
|
17
15
|
FieldComponent: n
|
|
18
16
|
}) {
|
|
19
|
-
const { metadata:
|
|
17
|
+
const { metadata: a, control: f, errorMessage: p, fieldElementRegistry: R } = c(
|
|
20
18
|
e,
|
|
21
19
|
t,
|
|
22
20
|
u
|
|
23
|
-
), i =
|
|
21
|
+
), i = a[e];
|
|
24
22
|
return F(
|
|
25
23
|
R,
|
|
26
24
|
/* @__PURE__ */ b(
|
|
27
25
|
g,
|
|
28
26
|
{
|
|
29
27
|
name: e,
|
|
30
|
-
control:
|
|
28
|
+
control: f,
|
|
31
29
|
label: o,
|
|
32
30
|
description: r,
|
|
33
|
-
errorMessage:
|
|
31
|
+
errorMessage: p,
|
|
34
32
|
isRequired: i?.isRequired,
|
|
35
33
|
isDisabled: i?.isDisabled,
|
|
36
34
|
format: s,
|
|
37
|
-
min:
|
|
38
|
-
max:
|
|
39
|
-
placeholder:
|
|
35
|
+
min: d,
|
|
36
|
+
max: l,
|
|
37
|
+
placeholder: m,
|
|
40
38
|
FieldComponent: n
|
|
41
39
|
}
|
|
42
40
|
)
|
|
43
41
|
);
|
|
44
42
|
}
|
|
45
43
|
export {
|
|
46
|
-
|
|
44
|
+
D as NumberInputHookField
|
|
47
45
|
};
|
|
48
46
|
//# sourceMappingURL=NumberInputHookField.js.map
|