@gusto/embedded-react-sdk 0.37.0 → 0.38.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/README.md +3 -0
- package/dist/UNSTABLE_Hooks.d.ts +1 -1
- package/dist/UNSTABLE_Hooks.js +34 -38
- package/dist/UNSTABLE_Hooks.js.map +1 -1
- package/dist/assets/icons/filter-funnel.svg.js +10 -0
- package/dist/assets/icons/filter-funnel.svg.js.map +1 -0
- package/dist/components/Base/Base.js +2 -3
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/createCompoundContext.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.js +42 -36
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
- package/dist/components/Common/DataView/DataTable/DataTable.js +77 -68
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.d.ts +17 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +100 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js +10 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js.map +1 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.d.ts +2 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayoutTypes.d.ts +40 -0
- package/dist/components/Common/DetailViewLayout/index.d.ts +3 -0
- package/dist/components/Common/EmptyData/EmptyData.d.ts +2 -1
- package/dist/components/Common/EmptyData/EmptyData.js +15 -13
- package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js +6 -4
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js +26 -24
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.d.ts +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js +32 -30
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.d.ts +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js +36 -34
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.d.ts +1 -1
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js +40 -38
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
- package/dist/components/Common/Fields/FileInputField/FileInputField.js +24 -22
- package/dist/components/Common/Fields/FileInputField/FileInputField.js.map +1 -1
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js +24 -22
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js +27 -25
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js +34 -32
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.d.ts +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.js +34 -32
- package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
- package/dist/components/Common/Fields/SwitchField/SwitchField.js +26 -24
- package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js +24 -22
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js.map +1 -1
- package/dist/components/Common/Fields/TextInputField/TextInputField.js +26 -24
- package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useField.d.ts +3 -2
- package/dist/components/Common/Fields/hooks/useField.js +37 -33
- package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +21 -20
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +5 -0
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.d.ts +1 -1
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js +10 -8
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableList.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +10 -15
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -14
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +14 -19
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +17 -17
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +5 -0
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js.map +1 -1
- package/dist/components/Common/UI/Button/Button.js +33 -29
- package/dist/components/Common/UI/Button/Button.js.map +1 -1
- package/dist/components/Common/UI/Button/Button.module.scss.js +5 -3
- package/dist/components/Common/UI/Button/Button.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Button/ButtonTypes.d.ts +4 -0
- package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.js +88 -69
- package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +13 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.d.ts +2 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js +74 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js.map +1 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.module.scss.js +30 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.module.scss.js.map +1 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePickerTypes.d.ts +14 -0
- package/dist/components/Common/UI/DateRangePicker/index.d.ts +2 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +2 -2
- package/dist/components/Common/UI/Heading/Heading.d.ts +1 -1
- package/dist/components/Common/UI/Heading/Heading.js +11 -9
- package/dist/components/Common/UI/Heading/Heading.js.map +1 -1
- package/dist/components/Common/UI/Heading/HeadingTypes.d.ts +1 -1
- package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +94 -80
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Common/index.d.ts +2 -0
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -11
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -10
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -11
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +6 -9
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -5
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -9
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +13 -14
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +2 -5
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -7
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -11
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -13
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -5
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -13
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +12 -15
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -8
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -8
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -15
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -5
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -5
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +8 -11
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -19
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +6 -8
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -10
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +8 -11
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -8
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +10 -14
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +8 -11
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +5 -7
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +15 -19
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -5
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +6 -9
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +17 -19
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -10
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -5
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +12 -15
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +9 -12
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +6 -10
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -5
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +59 -59
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +16 -19
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +36 -33
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +11 -14
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +19 -21
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +2 -0
- package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -7
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -8
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -9
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -8
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +3 -7
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +6 -8
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +5 -7
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +33 -34
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -3
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +10 -14
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -5
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +135 -126
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +31 -30
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +18 -21
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +3 -4
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +17 -19
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +6 -8
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +2 -4
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -5
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
- package/dist/components/Contractor/Profile/useContractorProfile.js +31 -31
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.d.ts +2 -2
- package/dist/components/Contractor/Submit/Submit.js +44 -46
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +12 -14
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Compensation.js +49 -49
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +27 -28
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +23 -25
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +57 -54
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +17 -19
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +11 -13
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +18 -19
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +6 -7
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -9
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +10 -14
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -5
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +24 -26
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +9 -11
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -5
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +6 -9
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.d.ts +2 -5
- package/dist/components/Employee/EmployeeList/EmployeeList.js +45 -95
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeListView.d.ts +15 -0
- package/dist/components/Employee/EmployeeList/EmployeeListView.js +130 -0
- package/dist/components/Employee/EmployeeList/EmployeeListView.js.map +1 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeList.d.ts +9 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js +81 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js.map +1 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.d.ts +17 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js +193 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js.map +1 -0
- package/dist/components/Employee/EmployeeList/index.d.ts +3 -0
- package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +36 -23
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +114 -19
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +7 -10
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +10 -13
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -5
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +14 -15
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +4 -4
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +14 -8
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +10 -11
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +8 -11
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -8
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +13 -14
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +44 -43
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -10
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +9 -10
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -7
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +8 -11
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +14 -17
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +9 -10
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +10 -13
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +3 -5
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +8 -11
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -5
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +8 -11
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +10 -13
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +3 -5
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +48 -48
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +14 -17
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +37 -33
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.d.ts +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +57 -45
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +8 -11
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
- package/dist/components/Employee/index.d.ts +1 -0
- package/dist/components/Employee/index.js +38 -36
- package/dist/components/Employee/index.js.map +1 -1
- package/dist/components/Flow/Flow.js +20 -23
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +16 -18
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +18 -20
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +3 -4
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +8 -10
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlow.js +14 -14
- package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.d.ts +2 -2
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +21 -20
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +2 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +57 -55
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +8 -11
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.d.ts +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +85 -75
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.module.scss.js +7 -7
- package/dist/components/Payroll/GrossUpModal/GrossUpModalTypes.d.ts +0 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js +24 -18
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +2 -0
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +28 -22
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +92 -84
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +30 -32
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +18 -26
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +21 -21
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +3 -3
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +13 -13
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -9
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +12 -14
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +11 -14
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +194 -190
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +69 -69
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +2 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +102 -76
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +235 -238
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.module.scss.js +7 -7
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.d.ts +11 -0
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +63 -30
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +2 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +43 -41
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/index.d.ts +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.d.ts +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +62 -51
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js +13 -6
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +22 -20
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js +35 -14
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +80 -69
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +0 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +59 -66
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +5 -4
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +96 -105
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +98 -64
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +9 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +223 -123
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +16 -12
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +106 -105
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +231 -222
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +7 -10
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +2 -4
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +11 -13
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -5
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlow.d.ts +1 -1
- package/dist/components/Payroll/Transition/TransitionFlow.js +29 -27
- package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +1 -0
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +67 -63
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +12 -14
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js +5 -5
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js +44 -55
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
- package/dist/components/Payroll/helpers.d.ts +5 -0
- package/dist/components/Payroll/helpers.js +81 -74
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +2 -4
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js +6 -9
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.d.ts +1 -2
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.d.ts +48 -0
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js +94 -0
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +24 -24
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js +22 -17
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +31 -31
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +27 -27
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js +28 -28
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +24 -24
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.d.ts +5 -4
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +30 -30
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/index.d.ts +5 -2
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.d.ts +3 -0
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.js +15 -0
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.d.ts +4 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js +13 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.d.ts +17 -0
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js +21 -0
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js +6 -6
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.d.ts +22 -0
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js +11 -0
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/withOptions.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/withOptions.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +7 -9
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.d.ts +48 -42
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js +48 -79
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchemaParity.test.d.ts +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/index.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +13 -15
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js +109 -110
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +17 -19
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +13 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js +31 -25
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.d.ts +5 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js +27 -27
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/index.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +8 -22
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js +81 -84
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +16 -18
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/index.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.d.ts +9 -10
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js +85 -83
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.d.ts +8 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js +18 -17
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/index.d.ts +7 -7
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +46 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +46 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +88 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.d.ts +6 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.js +50 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +73 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +122 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js +8 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListTypes.d.ts +17 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js +46 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.js +25 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +29 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +103 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/index.d.ts +3 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.d.ts +14 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js +290 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.test.d.ts +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/SelectHolidaysPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/SelectHolidaysPresentation.js +55 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/SelectHolidaysPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/SelectHolidaysTypes.d.ts +25 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/index.d.ts +3 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyType.d.ts +7 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyType.js +27 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyType.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyTypePresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyTypePresentation.js +66 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyTypePresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyTypeTypes.d.ts +6 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/index.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/shared/EmployeeTable/EmployeeTable.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/shared/EmployeeTable/EmployeeTableTypes.d.ts +26 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/shared/EmployeeTable/index.d.ts +4 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js +35 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js +35 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js +35 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js +35 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/index.d.ts +25 -0
- package/dist/components/UNSTABLE_TimeOff/index.js +27 -0
- package/dist/components/UNSTABLE_TimeOff/index.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +48 -46
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +10 -13
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.d.ts +10 -2
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
- package/dist/contexts/ThemeProvider/useTheme.js.map +1 -1
- package/dist/helpers/breadcrumbHelpers.d.ts +14 -0
- package/dist/helpers/breadcrumbHelpers.js +35 -26
- package/dist/helpers/breadcrumbHelpers.js.map +1 -1
- package/dist/{components/UNSTABLE_Hooks → helpers}/collectErrors.d.ts +1 -1
- package/dist/{components/UNSTABLE_Hooks → helpers}/collectErrors.js +1 -1
- package/dist/helpers/collectErrors.js.map +1 -0
- package/dist/hooks/useCompanyPaymentSpeed.d.ts +6 -0
- package/dist/hooks/useCompanyPaymentSpeed.js +19 -0
- package/dist/hooks/useCompanyPaymentSpeed.js.map +1 -0
- package/dist/hooks/useCompanyPaymentSpeed.test.d.ts +1 -0
- package/dist/hooks/useDateRangeFilter/useDateRangeFilter.d.ts +20 -0
- package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js +38 -0
- package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js.map +1 -0
- package/dist/hooks/useDateRangeFilter/useDateRangeFilter.test.d.ts +1 -0
- package/dist/{components/UNSTABLE_Hooks → hooks}/useErrorHandling.d.ts +2 -2
- package/dist/{components/UNSTABLE_Hooks → hooks}/useErrorHandling.js +1 -1
- package/dist/hooks/useErrorHandling.js.map +1 -0
- package/dist/hooks/useErrorHandling.test.d.ts +1 -0
- package/dist/hooks/usePagination/usePagination.d.ts +2 -0
- package/dist/hooks/usePagination/usePagination.js +32 -29
- package/dist/hooks/usePagination/usePagination.js.map +1 -1
- package/dist/i18n/I18n.js +24 -24
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +6 -6
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +24 -0
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +32 -0
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +26 -0
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +28 -0
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +38 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +52 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffRequests.json.js +21 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffRequests.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +36 -34
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
- package/dist/i18n/en/Employee.EmployeeList.json.js +22 -20
- package/dist/i18n/en/Employee.EmployeeList.json.js.map +1 -1
- package/dist/i18n/en/Employee.ManagementEmployeeList.json.js +40 -0
- package/dist/i18n/en/Employee.ManagementEmployeeList.json.js.map +1 -0
- package/dist/i18n/en/Payroll.GrossUpModal.json.js +16 -14
- package/dist/i18n/en/Payroll.GrossUpModal.json.js.map +1 -1
- package/dist/i18n/en/Payroll.OffCycle.json.js +1 -1
- package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +5 -5
- package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +38 -34
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +29 -25
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollHistory.json.js +12 -12
- package/dist/i18n/en/Payroll.PayrollList.json.js +28 -20
- package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +64 -58
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/Payroll.TransitionCreation.json.js +9 -9
- package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js +8 -8
- package/dist/index.js +18 -16
- package/dist/index.js.map +1 -1
- package/dist/shared/constants.d.ts +46 -0
- package/dist/shared/constants.js +99 -74
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +508 -12
- package/dist/{components/UNSTABLE_Hooks/types.d.ts → types/sdkHooks.d.ts} +28 -2
- package/docs/reference/endpoint-inventory.json +608 -418
- package/package.json +29 -20
- package/dist/components/Employee/EmployeeList/Actions.d.ts +0 -1
- package/dist/components/Employee/EmployeeList/Actions.js +0 -16
- package/dist/components/Employee/EmployeeList/Actions.js.map +0 -1
- package/dist/components/Employee/EmployeeList/Head.d.ts +0 -1
- package/dist/components/Employee/EmployeeList/Head.js +0 -15
- package/dist/components/Employee/EmployeeList/Head.js.map +0 -1
- package/dist/components/Employee/EmployeeList/List.d.ts +0 -2
- package/dist/components/Employee/EmployeeList/List.js +0 -125
- package/dist/components/Employee/EmployeeList/List.js.map +0 -1
- package/dist/components/Employee/EmployeeList/List.module.scss.js +0 -8
- package/dist/components/Employee/EmployeeList/List.module.scss.js.map +0 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.module.scss.js +0 -8
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.module.scss.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/collectErrors.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js +0 -24
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js +0 -14
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/types.d.ts +0 -27
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.d.ts +0 -4
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js +0 -9
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/useErrorHandling.js.map +0 -1
- package/dist/helpers/requiredIf.js +0 -8
- package/dist/helpers/requiredIf.js.map +0 -1
- /package/dist/components/UNSTABLE_Hooks/{useErrorHandling.test.d.ts → form/buildFormSchema.test.d.ts} +0 -0
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { getContractorDisplayName as
|
|
5
|
-
import { PayrollBlockerAlerts as
|
|
6
|
-
import { Flex as a, FlexItem as
|
|
7
|
-
import "
|
|
8
|
-
import "../../../../shared/constants.js";
|
|
9
|
-
import { EmptyData as v } from "../../../Common/EmptyData/EmptyData.js";
|
|
10
|
-
import { HamburgerMenu as I } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
2
|
+
import { useTranslation as k } from "react-i18next";
|
|
3
|
+
import { useMemo as F } from "react";
|
|
4
|
+
import { getContractorDisplayName as M } from "./helpers.js";
|
|
5
|
+
import { PayrollBlockerAlerts as j } from "../../../Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js";
|
|
6
|
+
import { Flex as a, FlexItem as v } from "../../../Common/Flex/Flex.js";
|
|
7
|
+
import { EmptyData as I } from "../../../Common/EmptyData/EmptyData.js";
|
|
11
8
|
import { useComponentContext as S } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
9
|
import { useI18n as O } from "../../../../i18n/I18n.js";
|
|
13
10
|
import { formatHoursDisplay as U } from "../../../Payroll/helpers.js";
|
|
14
11
|
import $ from "../../../../hooks/useNumberFormatter.js";
|
|
15
|
-
import {
|
|
16
|
-
|
|
12
|
+
import { HamburgerMenu as B } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
13
|
+
import { DataView as E } from "../../../Common/DataView/DataView.js";
|
|
14
|
+
const V = "0.000", te = ({
|
|
17
15
|
contractors: m,
|
|
18
16
|
paymentDate: h,
|
|
19
17
|
contractorPayments: u,
|
|
@@ -24,11 +22,12 @@ const E = "0.000", ne = ({
|
|
|
24
22
|
alerts: T,
|
|
25
23
|
payrollBlockers: s = [],
|
|
26
24
|
onViewBlockers: C,
|
|
27
|
-
isLoading: H
|
|
25
|
+
isLoading: H,
|
|
26
|
+
paymentSpeedDays: w
|
|
28
27
|
}) => {
|
|
29
|
-
const { Button:
|
|
28
|
+
const { Button: x, Text: n, Heading: d, TextInput: D, Alert: N } = S();
|
|
30
29
|
O("Contractor.Payments.CreatePayment");
|
|
31
|
-
const { t } =
|
|
30
|
+
const { t } = k("Contractor.Payments.CreatePayment"), o = $("currency"), P = (e) => e ? e.wageType === "Hourly" && e.hourlyRate ? `${t("wageTypes.hourly")} ${o(Number(e.hourlyRate || "0"))}${t("perHour")}` : e.wageType : "", A = F(
|
|
32
31
|
() => u.map((e) => ({
|
|
33
32
|
...e,
|
|
34
33
|
contractorDetails: m.find(
|
|
@@ -41,13 +40,15 @@ const E = "0.000", ne = ({
|
|
|
41
40
|
/* @__PURE__ */ c(a, { justifyContent: "flex-end", gap: 16, children: [
|
|
42
41
|
/* @__PURE__ */ c(a, { flexDirection: "column", gap: 16, children: [
|
|
43
42
|
/* @__PURE__ */ r(d, { as: "h2", children: t("title") }),
|
|
44
|
-
/* @__PURE__ */ r(n, { variant: "supporting", children: t("paymentSpeedNotice"
|
|
43
|
+
/* @__PURE__ */ r(n, { variant: "supporting", children: t("paymentSpeedNotice", {
|
|
44
|
+
count: w
|
|
45
|
+
}) })
|
|
45
46
|
] }),
|
|
46
|
-
/* @__PURE__ */ r(
|
|
47
|
+
/* @__PURE__ */ r(v, { children: /* @__PURE__ */ r(x, { onClick: g, variant: "primary", isLoading: H, children: t("continueCta") }) })
|
|
47
48
|
] }),
|
|
48
|
-
s.length > 0 && /* @__PURE__ */ r(
|
|
49
|
+
s.length > 0 && /* @__PURE__ */ r(j, { blockers: s, onViewBlockersClick: C }),
|
|
49
50
|
Object.values(T).map((e) => /* @__PURE__ */ r(
|
|
50
|
-
|
|
51
|
+
N,
|
|
51
52
|
{
|
|
52
53
|
label: e.title,
|
|
53
54
|
onDismiss: e.onDismiss,
|
|
@@ -57,7 +58,7 @@ const E = "0.000", ne = ({
|
|
|
57
58
|
e.title
|
|
58
59
|
)),
|
|
59
60
|
/* @__PURE__ */ r(a, { flexDirection: "column", gap: 8, children: /* @__PURE__ */ r(
|
|
60
|
-
|
|
61
|
+
D,
|
|
61
62
|
{
|
|
62
63
|
type: "date",
|
|
63
64
|
value: h,
|
|
@@ -69,16 +70,16 @@ const E = "0.000", ne = ({
|
|
|
69
70
|
/* @__PURE__ */ c(a, { flexDirection: "column", gap: 16, children: [
|
|
70
71
|
/* @__PURE__ */ r(d, { as: "h3", children: t("hoursAndPaymentsLabel") }),
|
|
71
72
|
/* @__PURE__ */ r(
|
|
72
|
-
|
|
73
|
+
E,
|
|
73
74
|
{
|
|
74
75
|
columns: [
|
|
75
76
|
{
|
|
76
77
|
title: t("contractorTableHeaders.contractor"),
|
|
77
|
-
render: (e) => /* @__PURE__ */ r(n, { children:
|
|
78
|
+
render: (e) => /* @__PURE__ */ r(n, { children: M(e.contractorDetails) })
|
|
78
79
|
},
|
|
79
80
|
{
|
|
80
81
|
title: t("contractorTableHeaders.wageType"),
|
|
81
|
-
render: (e) => /* @__PURE__ */ r(n, { children:
|
|
82
|
+
render: (e) => /* @__PURE__ */ r(n, { children: P(e.contractorDetails) })
|
|
82
83
|
},
|
|
83
84
|
{
|
|
84
85
|
title: t("contractorTableHeaders.paymentMethod"),
|
|
@@ -88,7 +89,7 @@ const E = "0.000", ne = ({
|
|
|
88
89
|
title: t("contractorTableHeaders.hours"),
|
|
89
90
|
render: (e) => {
|
|
90
91
|
const i = Number(e.hours || "0");
|
|
91
|
-
return /* @__PURE__ */ r(n, { children: e.contractorDetails?.wageType === "Hourly" && i ? U(i) :
|
|
92
|
+
return /* @__PURE__ */ r(n, { children: e.contractorDetails?.wageType === "Hourly" && i ? U(i) : V });
|
|
92
93
|
}
|
|
93
94
|
},
|
|
94
95
|
{
|
|
@@ -108,13 +109,13 @@ const E = "0.000", ne = ({
|
|
|
108
109
|
},
|
|
109
110
|
{
|
|
110
111
|
title: t("contractorTableHeaders.total"),
|
|
111
|
-
render: ({ bonus: e, reimbursement: i, wage:
|
|
112
|
-
const
|
|
113
|
-
return /* @__PURE__ */ r(n, { children: o(
|
|
112
|
+
render: ({ bonus: e, reimbursement: i, wage: L, hours: p, contractorDetails: b }) => {
|
|
113
|
+
const R = Number(e || "0") + Number(i || "0") + Number(L || "0") + (b?.wageType === "Hourly" && p ? Number(p || "0") * Number(b.hourlyRate || "0") : 0);
|
|
114
|
+
return /* @__PURE__ */ r(n, { children: o(R) });
|
|
114
115
|
}
|
|
115
116
|
}
|
|
116
117
|
],
|
|
117
|
-
data:
|
|
118
|
+
data: A,
|
|
118
119
|
footer: () => ({
|
|
119
120
|
"column-0": /* @__PURE__ */ r(n, { weight: "bold", children: t("totalsLabel") }),
|
|
120
121
|
"column-4": /* @__PURE__ */ r(n, { children: o(l.wage) }),
|
|
@@ -124,7 +125,7 @@ const E = "0.000", ne = ({
|
|
|
124
125
|
}),
|
|
125
126
|
label: t("hoursAndPaymentsLabel"),
|
|
126
127
|
itemMenu: (e) => /* @__PURE__ */ r(
|
|
127
|
-
|
|
128
|
+
B,
|
|
128
129
|
{
|
|
129
130
|
items: [
|
|
130
131
|
{
|
|
@@ -137,13 +138,13 @@ const E = "0.000", ne = ({
|
|
|
137
138
|
triggerLabel: t("editContractor")
|
|
138
139
|
}
|
|
139
140
|
),
|
|
140
|
-
emptyState: () => /* @__PURE__ */ r(
|
|
141
|
+
emptyState: () => /* @__PURE__ */ r(I, { title: t("emptyTableTitle"), description: t("emptyTableDescription") })
|
|
141
142
|
}
|
|
142
143
|
)
|
|
143
144
|
] })
|
|
144
145
|
] });
|
|
145
146
|
};
|
|
146
147
|
export {
|
|
147
|
-
|
|
148
|
+
te as CreatePaymentPresentation
|
|
148
149
|
};
|
|
149
150
|
//# sourceMappingURL=CreatePaymentPresentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreatePaymentPresentation.js","sources":["../../../../../src/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Contractor } from '@gusto/embedded-api/models/components/contractor'\nimport type { ContractorPayments } from '@gusto/embedded-api/models/operations/postv1companiescompanyidcontractorpaymentgroups'\nimport { useMemo } from 'react'\nimport type { InternalAlert } from '../types'\nimport { getContractorDisplayName } from './helpers'\nimport type { ApiPayrollBlocker } from '@/components/Payroll/PayrollBlocker/payrollHelpers'\nimport { PayrollBlockerAlerts } from '@/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts'\nimport { DataView, Flex, FlexItem, EmptyData } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { useI18n } from '@/i18n'\nimport { formatHoursDisplay } from '@/components/Payroll/helpers'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\n\nconst ZERO_HOURS_DISPLAY = '0.000'\n\ninterface ContractorPaymentCreatePaymentPresentationProps {\n contractors: Contractor[]\n contractorPayments: (ContractorPayments & { isTouched?: boolean })[]\n paymentDate: string\n onPaymentDateChange: (date: string) => void\n onSaveAndContinue: () => void\n onEditContractor: (contractorUuid: string) => void\n totals: {\n wage: number\n bonus: number\n reimbursement: number\n total: number\n }\n alerts: Record<string, InternalAlert>\n payrollBlockers?: ApiPayrollBlocker[]\n onViewBlockers?: () => void\n isLoading: boolean\n}\n\nexport const CreatePaymentPresentation = ({\n contractors,\n paymentDate,\n contractorPayments,\n onPaymentDateChange,\n onSaveAndContinue,\n onEditContractor,\n totals,\n alerts,\n payrollBlockers = [],\n onViewBlockers,\n isLoading,\n}: ContractorPaymentCreatePaymentPresentationProps) => {\n const { Button, Text, Heading, TextInput, Alert } = useComponentContext()\n useI18n('Contractor.Payments.CreatePayment')\n const { t } = useTranslation('Contractor.Payments.CreatePayment')\n const currencyFormatter = useNumberFormatter('currency')\n\n const formatWageType = (contractor?: Contractor) => {\n if (!contractor) return ''\n if (contractor.wageType === 'Hourly' && contractor.hourlyRate) {\n return `${t('wageTypes.hourly')} ${currencyFormatter(Number(contractor.hourlyRate || '0'))}${t('perHour')}`\n }\n return contractor.wageType\n }\n\n const tableData = useMemo(\n () =>\n contractorPayments.map(payment => {\n return {\n ...payment,\n contractorDetails: contractors.find(\n contractor => contractor.uuid === payment.contractorUuid,\n ),\n }\n }),\n [contractorPayments, contractors],\n )\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex justifyContent=\"flex-end\" gap={16}>\n <Flex flexDirection=\"column\" gap={16}>\n <Heading as=\"h2\">{t('title')}</Heading>\n <Text variant=\"supporting\">{t('paymentSpeedNotice')}</Text>\n </Flex>\n <FlexItem>\n <Button onClick={onSaveAndContinue} variant=\"primary\" isLoading={isLoading}>\n {t('continueCta')}\n </Button>\n </FlexItem>\n </Flex>\n\n {payrollBlockers.length > 0 && (\n <PayrollBlockerAlerts blockers={payrollBlockers} onViewBlockersClick={onViewBlockers} />\n )}\n\n {Object.values(alerts).map(alert => (\n <Alert\n key={alert.title}\n label={alert.title}\n onDismiss={alert.onDismiss}\n status={alert.type}\n >\n {alert.content ?? null}\n </Alert>\n ))}\n\n <Flex flexDirection=\"column\" gap={8}>\n <TextInput\n type=\"date\"\n value={paymentDate}\n onChange={onPaymentDateChange}\n label={t('dateLabel')}\n isRequired\n />\n </Flex>\n\n <Flex flexDirection=\"column\" gap={16}>\n <Heading as=\"h3\">{t('hoursAndPaymentsLabel')}</Heading>\n <DataView\n columns={[\n {\n title: t('contractorTableHeaders.contractor'),\n render: paymentData => (\n <Text>{getContractorDisplayName(paymentData.contractorDetails)}</Text>\n ),\n },\n {\n title: t('contractorTableHeaders.wageType'),\n render: paymentData => <Text>{formatWageType(paymentData.contractorDetails)}</Text>,\n },\n {\n title: t('contractorTableHeaders.paymentMethod'),\n render: paymentData => <Text>{paymentData.paymentMethod || t('na')}</Text>,\n },\n {\n title: t('contractorTableHeaders.hours'),\n render: paymentData => {\n const hours = Number(paymentData.hours || '0')\n return (\n <Text>\n {paymentData.contractorDetails?.wageType === 'Hourly' && hours\n ? formatHoursDisplay(hours)\n : ZERO_HOURS_DISPLAY}\n </Text>\n )\n },\n },\n {\n title: t('contractorTableHeaders.wage'),\n render: paymentData => {\n const amount =\n paymentData.contractorDetails?.wageType === 'Fixed' && paymentData.wage\n ? Number(paymentData.wage || '0')\n : 0\n return <Text>{currencyFormatter(amount)}</Text>\n },\n },\n {\n title: t('contractorTableHeaders.bonus'),\n render: paymentData => (\n <Text>{currencyFormatter(Number(paymentData.bonus || '0'))}</Text>\n ),\n },\n {\n title: t('contractorTableHeaders.reimbursement'),\n render: paymentData => (\n <Text>{currencyFormatter(Number(paymentData.reimbursement || '0'))}</Text>\n ),\n },\n {\n title: t('contractorTableHeaders.total'),\n render: ({ bonus, reimbursement, wage, hours, contractorDetails }) => {\n const totalAmount =\n Number(bonus || '0') +\n Number(reimbursement || '0') +\n Number(wage || '0') +\n (contractorDetails?.wageType === 'Hourly' && hours\n ? Number(hours || '0') * Number(contractorDetails.hourlyRate || '0')\n : 0)\n return <Text>{currencyFormatter(totalAmount)}</Text>\n },\n },\n ]}\n data={tableData}\n footer={() => ({\n 'column-0': <Text weight=\"bold\">{t('totalsLabel')}</Text>,\n 'column-4': <Text>{currencyFormatter(totals.wage)}</Text>,\n 'column-5': <Text>{currencyFormatter(totals.bonus)}</Text>,\n 'column-6': <Text>{currencyFormatter(totals.reimbursement)}</Text>,\n 'column-7': <Text>{currencyFormatter(totals.total)}</Text>,\n })}\n label={t('hoursAndPaymentsLabel')}\n itemMenu={paymentData => (\n <HamburgerMenu\n items={[\n {\n label: t('editContractor'),\n onClick: () => {\n onEditContractor(paymentData.contractorUuid!)\n },\n },\n ]}\n triggerLabel={t('editContractor')}\n />\n )}\n emptyState={() => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n )}\n />\n </Flex>\n </Flex>\n )\n}\n"],"names":["ZERO_HOURS_DISPLAY","CreatePaymentPresentation","contractors","paymentDate","contractorPayments","onPaymentDateChange","onSaveAndContinue","onEditContractor","totals","alerts","payrollBlockers","onViewBlockers","isLoading","Button","Text","Heading","TextInput","Alert","useComponentContext","useI18n","useTranslation","currencyFormatter","useNumberFormatter","formatWageType","contractor","tableData","useMemo","payment","jsxs","Flex","jsx","FlexItem","PayrollBlockerAlerts","alert","DataView","paymentData","getContractorDisplayName","hours","formatHoursDisplay","amount","bonus","reimbursement","wage","contractorDetails","totalAmount","HamburgerMenu","EmptyData"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAMA,IAAqB,SAqBdC,KAA4B,CAAC;AAAA,EACxC,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,iBAAAC,IAAkB,CAAA;AAAA,EAClB,gBAAAC;AAAA,EACA,WAAAC;AACF,MAAuD;AACrD,QAAM,EAAE,QAAAC,GAAQ,MAAAC,GAAM,SAAAC,GAAS,WAAAC,GAAW,OAAAC,EAAA,IAAUC,EAAA;AACpD,EAAAC,EAAQ,mCAAmC;AAC3C,QAAM,EAAE,EAAA,IAAMC,EAAe,mCAAmC,GAC1DC,IAAoBC,EAAmB,UAAU,GAEjDC,IAAiB,CAACC,MACjBA,IACDA,EAAW,aAAa,YAAYA,EAAW,aAC1C,GAAG,EAAE,kBAAkB,CAAC,IAAIH,EAAkB,OAAOG,EAAW,cAAc,GAAG,CAAC,CAAC,GAAG,EAAE,SAAS,CAAC,KAEpGA,EAAW,WAJM,IAOpBC,IAAYC;AAAA,IAChB,MACEtB,EAAmB,IAAI,CAAAuB,OACd;AAAA,MACL,GAAGA;AAAA,MACH,mBAAmBzB,EAAY;AAAA,QAC7B,CAAAsB,MAAcA,EAAW,SAASG,EAAQ;AAAA,MAAA;AAAA,IAC5C,EAEH;AAAA,IACH,CAACvB,GAAoBF,CAAW;AAAA,EAAA;AAGlC,SACE,gBAAA0B,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD,EAACC,GAAA,EAA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cACF;AAAA,cAEF,cAAc,EAAE,gBAAgB;AAAA,YAAA;AAAA,UAAA;AAAA,UAGpC,YAAY,MACV,gBAAAL,EAACgB,GAAA,EAAU,OAAO,EAAE,iBAAiB,GAAG,aAAa,EAAE,uBAAuB,EAAA,CAAG;AAAA,QAAA;AAAA,MAAA;AAAA,IAErF,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"CreatePaymentPresentation.js","sources":["../../../../../src/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { Contractor } from '@gusto/embedded-api/models/components/contractor'\nimport type { ContractorPayments } from '@gusto/embedded-api/models/operations/postv1companiescompanyidcontractorpaymentgroups'\nimport { useMemo } from 'react'\nimport type { InternalAlert } from '../types'\nimport { getContractorDisplayName } from './helpers'\nimport type { ApiPayrollBlocker } from '@/components/Payroll/PayrollBlocker/payrollHelpers'\nimport { PayrollBlockerAlerts } from '@/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts'\nimport { DataView, Flex, FlexItem, EmptyData } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { HamburgerMenu } from '@/components/Common/HamburgerMenu'\nimport { useI18n } from '@/i18n'\nimport { formatHoursDisplay } from '@/components/Payroll/helpers'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\n\nconst ZERO_HOURS_DISPLAY = '0.000'\n\ninterface ContractorPaymentCreatePaymentPresentationProps {\n contractors: Contractor[]\n contractorPayments: (ContractorPayments & { isTouched?: boolean })[]\n paymentDate: string\n onPaymentDateChange: (date: string) => void\n onSaveAndContinue: () => void\n onEditContractor: (contractorUuid: string) => void\n totals: {\n wage: number\n bonus: number\n reimbursement: number\n total: number\n }\n alerts: Record<string, InternalAlert>\n payrollBlockers?: ApiPayrollBlocker[]\n onViewBlockers?: () => void\n isLoading: boolean\n paymentSpeedDays: number\n}\n\nexport const CreatePaymentPresentation = ({\n contractors,\n paymentDate,\n contractorPayments,\n onPaymentDateChange,\n onSaveAndContinue,\n onEditContractor,\n totals,\n alerts,\n payrollBlockers = [],\n onViewBlockers,\n isLoading,\n paymentSpeedDays,\n}: ContractorPaymentCreatePaymentPresentationProps) => {\n const { Button, Text, Heading, TextInput, Alert } = useComponentContext()\n useI18n('Contractor.Payments.CreatePayment')\n const { t } = useTranslation('Contractor.Payments.CreatePayment')\n const currencyFormatter = useNumberFormatter('currency')\n\n const formatWageType = (contractor?: Contractor) => {\n if (!contractor) return ''\n if (contractor.wageType === 'Hourly' && contractor.hourlyRate) {\n return `${t('wageTypes.hourly')} ${currencyFormatter(Number(contractor.hourlyRate || '0'))}${t('perHour')}`\n }\n return contractor.wageType\n }\n\n const tableData = useMemo(\n () =>\n contractorPayments.map(payment => {\n return {\n ...payment,\n contractorDetails: contractors.find(\n contractor => contractor.uuid === payment.contractorUuid,\n ),\n }\n }),\n [contractorPayments, contractors],\n )\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex justifyContent=\"flex-end\" gap={16}>\n <Flex flexDirection=\"column\" gap={16}>\n <Heading as=\"h2\">{t('title')}</Heading>\n <Text variant=\"supporting\">\n {t('paymentSpeedNotice', {\n count: paymentSpeedDays,\n })}\n </Text>\n </Flex>\n <FlexItem>\n <Button onClick={onSaveAndContinue} variant=\"primary\" isLoading={isLoading}>\n {t('continueCta')}\n </Button>\n </FlexItem>\n </Flex>\n\n {payrollBlockers.length > 0 && (\n <PayrollBlockerAlerts blockers={payrollBlockers} onViewBlockersClick={onViewBlockers} />\n )}\n\n {Object.values(alerts).map(alert => (\n <Alert\n key={alert.title}\n label={alert.title}\n onDismiss={alert.onDismiss}\n status={alert.type}\n >\n {alert.content ?? null}\n </Alert>\n ))}\n\n <Flex flexDirection=\"column\" gap={8}>\n <TextInput\n type=\"date\"\n value={paymentDate}\n onChange={onPaymentDateChange}\n label={t('dateLabel')}\n isRequired\n />\n </Flex>\n\n <Flex flexDirection=\"column\" gap={16}>\n <Heading as=\"h3\">{t('hoursAndPaymentsLabel')}</Heading>\n <DataView\n columns={[\n {\n title: t('contractorTableHeaders.contractor'),\n render: paymentData => (\n <Text>{getContractorDisplayName(paymentData.contractorDetails)}</Text>\n ),\n },\n {\n title: t('contractorTableHeaders.wageType'),\n render: paymentData => <Text>{formatWageType(paymentData.contractorDetails)}</Text>,\n },\n {\n title: t('contractorTableHeaders.paymentMethod'),\n render: paymentData => <Text>{paymentData.paymentMethod || t('na')}</Text>,\n },\n {\n title: t('contractorTableHeaders.hours'),\n render: paymentData => {\n const hours = Number(paymentData.hours || '0')\n return (\n <Text>\n {paymentData.contractorDetails?.wageType === 'Hourly' && hours\n ? formatHoursDisplay(hours)\n : ZERO_HOURS_DISPLAY}\n </Text>\n )\n },\n },\n {\n title: t('contractorTableHeaders.wage'),\n render: paymentData => {\n const amount =\n paymentData.contractorDetails?.wageType === 'Fixed' && paymentData.wage\n ? Number(paymentData.wage || '0')\n : 0\n return <Text>{currencyFormatter(amount)}</Text>\n },\n },\n {\n title: t('contractorTableHeaders.bonus'),\n render: paymentData => (\n <Text>{currencyFormatter(Number(paymentData.bonus || '0'))}</Text>\n ),\n },\n {\n title: t('contractorTableHeaders.reimbursement'),\n render: paymentData => (\n <Text>{currencyFormatter(Number(paymentData.reimbursement || '0'))}</Text>\n ),\n },\n {\n title: t('contractorTableHeaders.total'),\n render: ({ bonus, reimbursement, wage, hours, contractorDetails }) => {\n const totalAmount =\n Number(bonus || '0') +\n Number(reimbursement || '0') +\n Number(wage || '0') +\n (contractorDetails?.wageType === 'Hourly' && hours\n ? Number(hours || '0') * Number(contractorDetails.hourlyRate || '0')\n : 0)\n return <Text>{currencyFormatter(totalAmount)}</Text>\n },\n },\n ]}\n data={tableData}\n footer={() => ({\n 'column-0': <Text weight=\"bold\">{t('totalsLabel')}</Text>,\n 'column-4': <Text>{currencyFormatter(totals.wage)}</Text>,\n 'column-5': <Text>{currencyFormatter(totals.bonus)}</Text>,\n 'column-6': <Text>{currencyFormatter(totals.reimbursement)}</Text>,\n 'column-7': <Text>{currencyFormatter(totals.total)}</Text>,\n })}\n label={t('hoursAndPaymentsLabel')}\n itemMenu={paymentData => (\n <HamburgerMenu\n items={[\n {\n label: t('editContractor'),\n onClick: () => {\n onEditContractor(paymentData.contractorUuid!)\n },\n },\n ]}\n triggerLabel={t('editContractor')}\n />\n )}\n emptyState={() => (\n <EmptyData title={t('emptyTableTitle')} description={t('emptyTableDescription')} />\n )}\n />\n </Flex>\n </Flex>\n )\n}\n"],"names":["ZERO_HOURS_DISPLAY","CreatePaymentPresentation","contractors","paymentDate","contractorPayments","onPaymentDateChange","onSaveAndContinue","onEditContractor","totals","alerts","payrollBlockers","onViewBlockers","isLoading","paymentSpeedDays","Button","Text","Heading","TextInput","Alert","useComponentContext","useI18n","useTranslation","currencyFormatter","useNumberFormatter","formatWageType","contractor","tableData","useMemo","payment","jsxs","Flex","jsx","FlexItem","PayrollBlockerAlerts","alert","DataView","paymentData","getContractorDisplayName","hours","formatHoursDisplay","amount","bonus","reimbursement","wage","contractorDetails","totalAmount","HamburgerMenu","EmptyData"],"mappings":";;;;;;;;;;;;;AAeA,MAAMA,IAAqB,SAsBdC,KAA4B,CAAC;AAAA,EACxC,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,iBAAAC,IAAkB,CAAA;AAAA,EAClB,gBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,kBAAAC;AACF,MAAuD;AACrD,QAAM,EAAE,QAAAC,GAAQ,MAAAC,GAAM,SAAAC,GAAS,WAAAC,GAAW,OAAAC,EAAA,IAAUC,EAAA;AACpD,EAAAC,EAAQ,mCAAmC;AAC3C,QAAM,EAAE,EAAA,IAAMC,EAAe,mCAAmC,GAC1DC,IAAoBC,EAAmB,UAAU,GAEjDC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GAAA,EAAM,UAAAO,EAAkBd,EAAO,IAAI,GAAE;AAAA,YAClD,YAAY,gBAAAuB,EAAChB,GAAA,EAAM,UAAAO,EAAkBd,EAAO,KAAK,GAAE;AAAA,YACnD,YAAY,gBAAAuB,EAAChB,GAAA,EAAM,UAAAO,EAAkBd,EAAO,aAAa,GAAE;AAAA,YAC3D,YAAY,gBAAAuB,EAAChB,GAAA,EAAM,UAAAO,EAAkBd,EAAO,KAAK,EAAA,CAAE;AAAA,UAAA;AAAA,UAErD,OAAO,EAAE,uBAAuB;AAAA,UAChC,UAAU,CAAA4B,MACR,gBAAAL;AAAA,YAACe;AAAA,YAAA;AAAA,cACC,OAAO;AAAA,gBACL;AAAA,kBACE,OAAO,EAAE,gBAAgB;AAAA,kBACzB,SAAS,MAAM;AACb,oBAAAvC,EAAiB6B,EAAY,cAAe;AAAA,kBAC9C;AAAA,gBAAA;AAAA,cACF;AAAA,cAEF,cAAc,EAAE,gBAAgB;AAAA,YAAA;AAAA,UAAA;AAAA,UAGpC,YAAY,MACV,gBAAAL,EAACgB,GAAA,EAAU,OAAO,EAAE,iBAAiB,GAAG,aAAa,EAAE,uBAAuB,EAAA,CAAG;AAAA,QAAA;AAAA,MAAA;AAAA,IAErF,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js
CHANGED
|
@@ -5,12 +5,12 @@ import { useTranslation as R } from "react-i18next";
|
|
|
5
5
|
import { useComponentContext as S } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
6
|
import { Flex as i } from "../../../Common/Flex/Flex.js";
|
|
7
7
|
import { Grid as T } from "../../../Common/Grid/Grid.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
8
|
+
import { ActionsLayout as I } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
9
|
+
import { Form as A } from "../../../Common/Form/Form.js";
|
|
10
|
+
import { useI18n as E } from "../../../../i18n/I18n.js";
|
|
11
|
+
import H from "../../../../hooks/useNumberFormatter.js";
|
|
10
12
|
import { NumberInputField as c } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
11
|
-
import {
|
|
12
|
-
import { useI18n as H } from "../../../../i18n/I18n.js";
|
|
13
|
-
import j from "../../../../hooks/useNumberFormatter.js";
|
|
13
|
+
import { RadioGroupField as j } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
14
14
|
const Y = ({
|
|
15
15
|
isOpen: h,
|
|
16
16
|
onClose: m,
|
|
@@ -19,10 +19,10 @@ const Y = ({
|
|
|
19
19
|
contractorPaymentMethod: b
|
|
20
20
|
}) => {
|
|
21
21
|
const u = v();
|
|
22
|
-
|
|
22
|
+
E("Contractor.Payments.CreatePayment");
|
|
23
23
|
const { t: e } = R("Contractor.Payments.CreatePayment", {
|
|
24
24
|
keyPrefix: "editContractorPayment"
|
|
25
|
-
}), { Modal: y, Button: d, Text: p, Heading: a } = S(), f =
|
|
25
|
+
}), { Modal: y, Button: d, Text: p, Heading: a } = S(), f = H("currency"), l = o({
|
|
26
26
|
name: "wageType",
|
|
27
27
|
control: r.control
|
|
28
28
|
}), g = o({
|
|
@@ -54,7 +54,7 @@ const Y = ({
|
|
|
54
54
|
{
|
|
55
55
|
isOpen: h,
|
|
56
56
|
onClose: m,
|
|
57
|
-
footer: /* @__PURE__ */ t(
|
|
57
|
+
footer: /* @__PURE__ */ t(I, { children: [
|
|
58
58
|
/* @__PURE__ */ n(d, { variant: "secondary", onClick: m, children: e("cancelCta") }),
|
|
59
59
|
/* @__PURE__ */ n(
|
|
60
60
|
d,
|
|
@@ -67,7 +67,7 @@ const Y = ({
|
|
|
67
67
|
}
|
|
68
68
|
)
|
|
69
69
|
] }),
|
|
70
|
-
children: /* @__PURE__ */ n(L, { ...r, children: /* @__PURE__ */ n(
|
|
70
|
+
children: /* @__PURE__ */ n(L, { ...r, children: /* @__PURE__ */ n(A, { id: u, onSubmit: r.handleSubmit(s), children: /* @__PURE__ */ t(i, { flexDirection: "column", gap: 32, children: [
|
|
71
71
|
/* @__PURE__ */ t(i, { flexDirection: "column", gap: 16, children: [
|
|
72
72
|
/* @__PURE__ */ n(a, { as: "h2", children: e("title") }),
|
|
73
73
|
/* @__PURE__ */ n(p, { children: e("subtitle") }),
|
|
@@ -127,7 +127,7 @@ const Y = ({
|
|
|
127
127
|
] })
|
|
128
128
|
] }),
|
|
129
129
|
/* @__PURE__ */ n(i, { flexDirection: "column", gap: 16, children: /* @__PURE__ */ n(
|
|
130
|
-
|
|
130
|
+
j,
|
|
131
131
|
{
|
|
132
132
|
name: "paymentMethod",
|
|
133
133
|
options: k,
|
package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { PayrollSubmissionBlockerType } from '@gusto/embedded-api/models/components/payrollsubmissionblockertype';
|
|
2
|
+
import { PaymentSpeed } from '@gusto/embedded-api/models/components/paymentconfigs';
|
|
2
3
|
interface FastAchSubmissionBlockerBannerProps {
|
|
3
4
|
blocker: PayrollSubmissionBlockerType;
|
|
4
5
|
selectedValue?: string;
|
|
5
6
|
onUnblockOptionChange: (blockerType: string, value: string) => void;
|
|
6
|
-
paymentSpeed?:
|
|
7
|
+
paymentSpeed?: PaymentSpeed;
|
|
7
8
|
}
|
|
8
9
|
export declare const FastAchSubmissionBlockerBanner: ({ blocker, selectedValue, onUnblockOptionChange, paymentSpeed, }: FastAchSubmissionBlockerBannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -1,43 +1,40 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as o } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as w } from "react-i18next";
|
|
3
3
|
import { Flex as l } from "../../../Common/Flex/Flex.js";
|
|
4
|
-
import "classnames";
|
|
5
|
-
import "../../../../shared/constants.js";
|
|
6
4
|
import { useComponentContext as B } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
-
import "react";
|
|
8
5
|
import { useDateFormatter as _ } from "../../../../hooks/useDateFormatter.js";
|
|
9
6
|
import v from "../../../../assets/icons/icon-zap-fast.svg.js";
|
|
10
|
-
const
|
|
7
|
+
const F = ({
|
|
11
8
|
blocker: r,
|
|
12
9
|
selectedValue: p,
|
|
13
|
-
onUnblockOptionChange:
|
|
14
|
-
paymentSpeed:
|
|
10
|
+
onUnblockOptionChange: d,
|
|
11
|
+
paymentSpeed: h
|
|
15
12
|
}) => {
|
|
16
|
-
const { t: e } = w("Contractor.Payments.CreatePayment"), { Banner:
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
13
|
+
const { t: e } = w("Contractor.Payments.CreatePayment"), { Banner: m, Text: n, RadioGroup: u, Badge: a } = B(), b = _(), c = r.blockerType || "fast_ach_threshold_exceeded";
|
|
14
|
+
return /* @__PURE__ */ t(m, { status: "error", title: e(c === "fast_ach_threshold_exceeded" ? "previewPresentation.submissionBlockers.fast_ach_threshold_exceeded.title" : "previewPresentation.submissionBlockers.needs_earned_access_for_fast_ach.title", { days: h || "2-day" }), children: /* @__PURE__ */ o(l, { flexDirection: "column", gap: 16, children: [
|
|
15
|
+
/* @__PURE__ */ t(n, { children: e("previewPresentation.submissionBlockers.fastAchOptions.description") }),
|
|
16
|
+
/* @__PURE__ */ t(
|
|
20
17
|
u,
|
|
21
18
|
{
|
|
22
19
|
label: e("previewPresentation.submissionBlockers.fastAchOptions.fundingOptionsLabel"),
|
|
23
20
|
shouldVisuallyHideLabel: !0,
|
|
24
|
-
options: r.unblockOptions?.map((
|
|
25
|
-
const i =
|
|
21
|
+
options: r.unblockOptions?.map((s) => {
|
|
22
|
+
const i = s.unblockType === "wire_in", f = e(i ? "previewPresentation.submissionBlockers.fastAchOptions.wireLabel" : "previewPresentation.submissionBlockers.fastAchOptions.directDepositLabel"), k = e(i ? "previewPresentation.submissionBlockers.fastAchOptions.wireDescription" : "previewPresentation.submissionBlockers.fastAchOptions.directDepositDescription");
|
|
26
23
|
return {
|
|
27
|
-
value:
|
|
24
|
+
value: s.unblockType || "",
|
|
28
25
|
label: /* @__PURE__ */ o(l, { alignItems: "center", gap: 8, children: [
|
|
29
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ t(n, { weight: "semibold", children: f }),
|
|
30
27
|
i && /* @__PURE__ */ o(a, { status: "success", children: [
|
|
31
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ t(v, { "aria-hidden": !0 }),
|
|
32
29
|
" ",
|
|
33
30
|
e(
|
|
34
31
|
"previewPresentation.submissionBlockers.fastAchOptions.wireFastestBadge"
|
|
35
32
|
)
|
|
36
33
|
] }),
|
|
37
|
-
|
|
34
|
+
s.checkDate && /* @__PURE__ */ t(a, { status: "info", children: e(
|
|
38
35
|
"previewPresentation.submissionBlockers.fastAchOptions.contractorPayDate",
|
|
39
36
|
{
|
|
40
|
-
date: b.formatShortWithYear(
|
|
37
|
+
date: b.formatShortWithYear(s.checkDate)
|
|
41
38
|
}
|
|
42
39
|
) })
|
|
43
40
|
] }),
|
|
@@ -45,14 +42,14 @@ const L = ({
|
|
|
45
42
|
};
|
|
46
43
|
}) || [],
|
|
47
44
|
value: p,
|
|
48
|
-
onChange: (
|
|
49
|
-
|
|
45
|
+
onChange: (s) => {
|
|
46
|
+
d(c, s);
|
|
50
47
|
}
|
|
51
48
|
}
|
|
52
49
|
)
|
|
53
50
|
] }) });
|
|
54
51
|
};
|
|
55
52
|
export {
|
|
56
|
-
|
|
53
|
+
F as FastAchSubmissionBlockerBanner
|
|
57
54
|
};
|
|
58
55
|
//# sourceMappingURL=FastAchSubmissionBlockerBanner.js.map
|
package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FastAchSubmissionBlockerBanner.js","sources":["../../../../../src/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { PayrollSubmissionBlockerType } from '@gusto/embedded-api/models/components/payrollsubmissionblockertype'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport IconFast from '@/assets/icons/icon-zap-fast.svg?react'\n\ntype FastAchBlockerType = 'fast_ach_threshold_exceeded' | 'needs_earned_access_for_fast_ach'\n\ninterface FastAchSubmissionBlockerBannerProps {\n blocker: PayrollSubmissionBlockerType\n selectedValue?: string\n onUnblockOptionChange: (blockerType: string, value: string) => void\n paymentSpeed?:
|
|
1
|
+
{"version":3,"file":"FastAchSubmissionBlockerBanner.js","sources":["../../../../../src/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { PayrollSubmissionBlockerType } from '@gusto/embedded-api/models/components/payrollsubmissionblockertype'\nimport type { PaymentSpeed } from '@gusto/embedded-api/models/components/paymentconfigs'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\nimport IconFast from '@/assets/icons/icon-zap-fast.svg?react'\n\ntype FastAchBlockerType = 'fast_ach_threshold_exceeded' | 'needs_earned_access_for_fast_ach'\n\ninterface FastAchSubmissionBlockerBannerProps {\n blocker: PayrollSubmissionBlockerType\n selectedValue?: string\n onUnblockOptionChange: (blockerType: string, value: string) => void\n paymentSpeed?: PaymentSpeed\n}\n\nexport const FastAchSubmissionBlockerBanner = ({\n blocker,\n selectedValue,\n onUnblockOptionChange,\n paymentSpeed,\n}: FastAchSubmissionBlockerBannerProps) => {\n const { t } = useTranslation('Contractor.Payments.CreatePayment')\n const { Banner, Text, RadioGroup, Badge } = useComponentContext()\n const dateFormatter = useDateFormatter()\n const blockerType = (blocker.blockerType || 'fast_ach_threshold_exceeded') as FastAchBlockerType\n\n const titleKey =\n blockerType === 'fast_ach_threshold_exceeded'\n ? 'previewPresentation.submissionBlockers.fast_ach_threshold_exceeded.title'\n : 'previewPresentation.submissionBlockers.needs_earned_access_for_fast_ach.title'\n\n return (\n <Banner status=\"error\" title={t(titleKey, { days: paymentSpeed || '2-day' })}>\n <Flex flexDirection=\"column\" gap={16}>\n <Text>{t('previewPresentation.submissionBlockers.fastAchOptions.description')}</Text>\n <RadioGroup\n label={t('previewPresentation.submissionBlockers.fastAchOptions.fundingOptionsLabel')}\n shouldVisuallyHideLabel\n options={\n blocker.unblockOptions?.map(option => {\n const isWire = option.unblockType === 'wire_in'\n const label = isWire\n ? t('previewPresentation.submissionBlockers.fastAchOptions.wireLabel')\n : t('previewPresentation.submissionBlockers.fastAchOptions.directDepositLabel')\n const description = isWire\n ? t('previewPresentation.submissionBlockers.fastAchOptions.wireDescription')\n : t(\n 'previewPresentation.submissionBlockers.fastAchOptions.directDepositDescription',\n )\n\n return {\n value: option.unblockType || '',\n label: (\n <Flex alignItems=\"center\" gap={8}>\n <Text weight=\"semibold\">{label}</Text>\n {isWire && (\n <Badge status=\"success\">\n <IconFast aria-hidden />{' '}\n {t(\n 'previewPresentation.submissionBlockers.fastAchOptions.wireFastestBadge',\n )}\n </Badge>\n )}\n {option.checkDate && (\n <Badge status=\"info\">\n {t(\n 'previewPresentation.submissionBlockers.fastAchOptions.contractorPayDate',\n {\n date: dateFormatter.formatShortWithYear(option.checkDate),\n },\n )}\n </Badge>\n )}\n </Flex>\n ),\n description,\n }\n }) || []\n }\n value={selectedValue}\n onChange={value => {\n onUnblockOptionChange(blockerType, value)\n }}\n />\n </Flex>\n </Banner>\n )\n}\n"],"names":["FastAchSubmissionBlockerBanner","blocker","selectedValue","onUnblockOptionChange","paymentSpeed","t","useTranslation","Banner","Text","RadioGroup","Badge","useComponentContext","dateFormatter","useDateFormatter","blockerType","js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F,GACF;AAAA,cAEDa,EAAO,aACN,gBAAAD,EAACP,GAAA,EAAM,QAAO,QACX,UAAAL;AAAA,gBACC;AAAA,gBACA;AAAA,kBACE,MAAMO,EAAc,oBAAoBM,EAAO,SAAS;AAAA,gBAAA;AAAA,cAC1D,EACF,CACF;AAAA,YAAA,GAEJ;AAAA,YAEF,aAAAG;AAAA,UAAA;AAAA,QAEJ,CAAC,KAAK,CAAA;AAAA,QAER,OAAOnB;AAAA,QACP,UAAU,CAAAqB,MAAS;AACjB,UAAApB,EAAsBW,GAAaS,CAAK;AAAA,QAC1C;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ContractorPaymentGroupPreview } from '@gusto/embedded-api/models/components/contractorpaymentgrouppreview';
|
|
2
2
|
import { Contractor } from '@gusto/embedded-api/models/components/contractor';
|
|
3
3
|
import { CompanyBankAccount } from '@gusto/embedded-api/models/components/companybankaccount';
|
|
4
|
+
import { PaymentSpeed } from '@gusto/embedded-api/models/components/paymentconfigs';
|
|
4
5
|
interface PreviewPresentationProps {
|
|
5
6
|
contractorPaymentGroup: ContractorPaymentGroupPreview;
|
|
6
7
|
contractors: Contractor[];
|
|
@@ -10,7 +11,7 @@ interface PreviewPresentationProps {
|
|
|
10
11
|
bankAccount?: CompanyBankAccount;
|
|
11
12
|
selectedUnblockOptions?: Record<string, string>;
|
|
12
13
|
onUnblockOptionChange?: (blockerType: string, value: string) => void;
|
|
13
|
-
paymentSpeed?:
|
|
14
|
+
paymentSpeed?: PaymentSpeed;
|
|
14
15
|
}
|
|
15
16
|
export declare const PreviewPresentation: ({ contractorPaymentGroup, contractors, onBackToEdit, onSubmit, isLoading, bankAccount, selectedUnblockOptions, onUnblockOptionChange, paymentSpeed, }: PreviewPresentationProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
17
|
export {};
|
|
@@ -5,14 +5,13 @@ import { getContractorDisplayName as R } from "./helpers.js";
|
|
|
5
5
|
import { FastAchSubmissionBlockerBanner as L } from "./FastAchSubmissionBlockerBanner.js";
|
|
6
6
|
import { GenericBlocker as P } from "./GenericBlocker.js";
|
|
7
7
|
import { Flex as u } from "../../../Common/Flex/Flex.js";
|
|
8
|
-
import "classnames";
|
|
9
|
-
import { PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES as T } from "../../../../shared/constants.js";
|
|
10
8
|
import { useComponentContext as _ } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
11
9
|
import { useI18n as E } from "../../../../i18n/I18n.js";
|
|
12
10
|
import { formatHoursDisplay as F } from "../../../Payroll/helpers.js";
|
|
13
11
|
import j from "../../../../hooks/useNumberFormatter.js";
|
|
12
|
+
import { PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES as T } from "../../../../shared/constants.js";
|
|
14
13
|
import { DataView as p } from "../../../Common/DataView/DataView.js";
|
|
15
|
-
const I = "0.000",
|
|
14
|
+
const I = "0.000", X = ({
|
|
16
15
|
contractorPaymentGroup: i,
|
|
17
16
|
contractors: f,
|
|
18
17
|
onBackToEdit: A,
|
|
@@ -171,6 +170,6 @@ const I = "0.000", G = ({
|
|
|
171
170
|
] });
|
|
172
171
|
};
|
|
173
172
|
export {
|
|
174
|
-
|
|
173
|
+
X as PreviewPresentation
|
|
175
174
|
};
|
|
176
175
|
//# sourceMappingURL=PreviewPresentation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreviewPresentation.js","sources":["../../../../../src/components/Contractor/Payments/CreatePayment/PreviewPresentation.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { ContractorPaymentGroupPreview } from '@gusto/embedded-api/models/components/contractorpaymentgrouppreview'\nimport type { ContractorPaymentForGroupPreview } from '@gusto/embedded-api/models/components/contractorpaymentforgrouppreview'\nimport { useMemo } from 'react'\nimport type { Contractor } from '@gusto/embedded-api/models/components/contractor'\nimport type { CompanyBankAccount } from '@gusto/embedded-api/models/components/companybankaccount'\nimport { getContractorDisplayName } from './helpers'\nimport { FastAchSubmissionBlockerBanner } from './FastAchSubmissionBlockerBanner'\nimport { GenericBlocker } from './GenericBlocker'\nimport { DataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { formatHoursDisplay } from '@/components/Payroll/helpers'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES } from '@/shared/constants'\n\nconst ZERO_HOURS_DISPLAY = '0.000'\n\ninterface PreviewPresentationProps {\n contractorPaymentGroup: ContractorPaymentGroupPreview\n contractors: Contractor[]\n onBackToEdit: () => void\n onSubmit: () => void\n isLoading: boolean\n bankAccount?: CompanyBankAccount\n selectedUnblockOptions?: Record<string, string>\n onUnblockOptionChange?: (blockerType: string, value: string) => void\n paymentSpeed?: string\n}\n\nexport const PreviewPresentation = ({\n contractorPaymentGroup,\n contractors,\n onBackToEdit,\n onSubmit,\n isLoading,\n bankAccount,\n selectedUnblockOptions = {},\n onUnblockOptionChange,\n paymentSpeed,\n}: PreviewPresentationProps) => {\n const { Button, Text, Heading, Alert } = useComponentContext()\n useI18n('Contractor.Payments.CreatePayment')\n const { t } = useTranslation('Contractor.Payments.CreatePayment', {\n keyPrefix: 'previewPresentation',\n })\n const currencyFormatter = useNumberFormatter()\n\n const formatWageType = (contractor: ContractorPaymentForGroupPreview) => {\n if (contractor.wageType === 'Hourly' && contractor.hourlyRate) {\n return `${t('wageTypes.hourly')} ${currencyFormatter(Number(contractor.hourlyRate || '0'))}${t('perHour')}`\n }\n return contractor.wageType\n }\n\n const totals = useMemo(\n () =>\n contractorPaymentGroup.contractorPayments?.reduce(\n (acc, contractor) => {\n acc.wageAmount += Number(contractor.wage || '0')\n acc.bonusAmount += Number(contractor.bonus || '0')\n acc.reimbursementAmount += Number(contractor.reimbursement || '0')\n acc.totalAmount += Number(contractor.wageTotal || '0')\n return acc\n },\n { wageAmount: 0, bonusAmount: 0, reimbursementAmount: 0, totalAmount: 0 },\n ),\n [contractorPaymentGroup.contractorPayments],\n )\n\n const contractorPayments = contractorPaymentGroup.contractorPayments || []\n\n const submissionBlockers = (contractorPaymentGroup.submissionBlockers || []).filter(\n blocker => blocker.status === 'unresolved',\n )\n\n const hasUnresolvableBlockers = submissionBlockers.some(\n blocker => !PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES.includes(blocker.blockerType || ''),\n )\n\n const hasUnselectedBlockers = submissionBlockers.some(\n blocker => !selectedUnblockOptions[blocker.blockerType || ''],\n )\n\n const isSubmitDisabled =\n isLoading ||\n (submissionBlockers.length > 0 && (hasUnresolvableBlockers || hasUnselectedBlockers))\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex justifyContent=\"flex-end\" gap={16}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\">{t('reviewAndSubmitTitle')}</Heading>\n <Text variant=\"supporting\">\n {t('reviewSubtitle', { debitDate: contractorPaymentGroup.debitDate })}\n </Text>\n </Flex>\n <Flex justifyContent=\"flex-end\" gap={16}>\n <Button onClick={onBackToEdit} variant=\"secondary\">\n {t('editButton')}\n </Button>\n <Button\n onClick={onSubmit}\n variant=\"primary\"\n isLoading={isLoading}\n isDisabled={isSubmitDisabled}\n >\n {t('submitButton')}\n </Button>\n </Flex>\n </Flex>\n\n <Alert\n status=\"info\"\n label={t('alerts.submitPaymentsDeadline', {\n checkDate: contractorPaymentGroup.checkDate,\n debitDate: contractorPaymentGroup.debitDate,\n })}\n />\n\n {submissionBlockers.length > 0 &&\n onUnblockOptionChange &&\n submissionBlockers.map(blocker => {\n const blockerType = blocker.blockerType || ''\n\n if (PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES.includes(blockerType)) {\n return (\n <FastAchSubmissionBlockerBanner\n key={blockerType}\n blocker={blocker}\n selectedValue={selectedUnblockOptions[blockerType]}\n onUnblockOptionChange={onUnblockOptionChange}\n paymentSpeed={paymentSpeed}\n />\n )\n }\n\n return <GenericBlocker key={blockerType} blocker={blocker} />\n })}\n\n {/* Payment Summary */}\n <Heading as=\"h3\">{t('paymentSummaryTitle')}</Heading>\n <DataView\n columns={[\n {\n title: t('summaryTableHeaders.totalAmount'),\n render: () => (\n <Text>{currencyFormatter(Number(contractorPaymentGroup.totals?.amount || '0'))}</Text>\n ),\n },\n {\n title: t('summaryTableHeaders.debitAmount'),\n render: () => (\n <Text>\n {currencyFormatter(Number(contractorPaymentGroup.totals?.debitAmount || '0'))}\n </Text>\n ),\n },\n {\n title: t('summaryTableHeaders.debitAccount'),\n render: () => <Text>{bankAccount?.hiddenAccountNumber ?? t('naDebitAccount')}</Text>,\n },\n {\n title: t('summaryTableHeaders.debitDate'),\n render: () => <Text>{contractorPaymentGroup.debitDate || 'debitDate'}</Text>,\n },\n {\n title: t('summaryTableHeaders.contractorPayDate'),\n render: () => <Text>{contractorPaymentGroup.checkDate || 'contractorPayDate'}</Text>,\n },\n ]}\n data={[contractorPaymentGroup]}\n label=\"Payment Summary\"\n />\n\n {/* Contractor Payments Table */}\n <DataView\n columns={[\n {\n title: t('contractorTableHeaders.contractor'),\n render: contractorPayment => (\n <Text>\n {getContractorDisplayName(\n contractors.find(\n contractor => contractor.uuid === contractorPayment.contractorUuid,\n ),\n )}\n </Text>\n ),\n },\n {\n title: t('contractorTableHeaders.wageType'),\n render: contractorPayment => <Text>{formatWageType(contractorPayment)}</Text>,\n },\n {\n title: t('contractorTableHeaders.paymentMethod'),\n render: contractorPayment => <Text>{contractorPayment.paymentMethod || 'N/A'}</Text>,\n },\n {\n title: t('contractorTableHeaders.hours'),\n render: contractorPayment => {\n const hours = Number(contractorPayment.hours || '0')\n return (\n <Text>\n {contractorPayment.wageType === 'Hourly' && hours\n ? formatHoursDisplay(hours)\n : ZERO_HOURS_DISPLAY}\n </Text>\n )\n },\n },\n {\n title: t('contractorTableHeaders.wage'),\n render: contractorPayment => (\n <Text>\n {contractorPayment.wageType === 'Fixed' && contractorPayment.wage\n ? currencyFormatter(Number(contractorPayment.wage || '0'))\n : currencyFormatter(0)}\n </Text>\n ),\n },\n {\n title: t('contractorTableHeaders.bonus'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.bonus || '0'))}</Text>\n ),\n },\n {\n title: t('contractorTableHeaders.reimbursement'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.reimbursement || '0'))}</Text>\n ),\n },\n {\n title: t('contractorTableHeaders.total'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.wageTotal || '0'))}</Text>\n ),\n },\n ]}\n data={contractorPayments}\n footer={() => ({\n 'column-0': <Text weight=\"bold\">{t('totalsLabel')}</Text>,\n 'column-4': <Text>{currencyFormatter(totals?.wageAmount ?? 0)}</Text>,\n 'column-5': <Text>{currencyFormatter(totals?.bonusAmount ?? 0)}</Text>,\n 'column-6': <Text>{currencyFormatter(totals?.reimbursementAmount ?? 0)}</Text>,\n 'column-7': <Text>{currencyFormatter(totals?.totalAmount ?? 0)}</Text>,\n })}\n label={t('whatYourCompanyPays')}\n />\n </Flex>\n )\n}\n"],"names":["ZERO_HOURS_DISPLAY","PreviewPresentation","contractorPaymentGroup","contractors","onBackToEdit","onSubmit","isLoading","bankAccount","selectedUnblockOptions","onUnblockOptionChange","paymentSpeed","Button","Text","Heading","Alert","useComponentContext","useI18n","t","useTranslation","currencyFormatter","useNumberFormatter","formatWageType","contractor","totals","useMemo","acc","contractorPayments","submissionBlockers","blocker","hasUnresolvableBlockers","PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES","hasUnselectedBlockers","isSubmitDisabled","jsxs","Flex","jsx","blockerType","FastAchSubmissionBlockerBanner","GenericBlocker","DataView","contractorPayment","getContractorDisplayName","hours","formatHoursDisplay"],"mappings":";;;;;;;;;;;;;;AAgBA,MAAMA,IAAqB,SAcdC,IAAsB,CAAC;A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AuB,MACN,gBAAAL,EAACvB,GAAA,EAAM,UAAAO,EAAkB,OAAOqB,EAAkB,SAAS,GAAG,CAAC,EAAA,CAAE;AAAA,UAAA;AAAA,UAGrE;AAAA,YACE,OAAOvB,EAAE,sCAAsC;AAAA,YAC/C,QAAQ,CAAAuB,MACN,gBAAAL,EAACvB,GAAA,EAAM,UAAAO,EAAkB,OAAOqB,EAAkB,iBAAiB,GAAG,CAAC,EAAA,CAAE;AAAA,UAAA;AAAA,UAG7E;AAAA,YACE,OAAOvB,EAAE,8BAA8B;AAAA,YACvC,QAAQ,CAAAuB,MACN,gBAAAL,EAACvB,GAAA,EAAM,UAAAO,EAAkB,OAAOqB,EAAkB,aAAa,GAAG,CAAC,EAAA,CAAE;AAAA,UAAA;AAAA,QAEzE;AAAA,QAEF,MAAMd;AAAA,QACN,QAAQ,OAAO;AAAA,UACb,YAAY,gBAAAS,EAACvB,GAAA,EAAK,QAAO,QAAQ,UAAAK,EAAE,aAAa,GAAE;AAAA,UAClD,YAAY,gBAAAkB,EAACvB,GAAA,EAAM,YAAkBW,GAAQ,cAAc,CAAC,GAAE;AAAA,UAC9D,YAAY,gBAAAY,EAACvB,GAAA,EAAM,YAAkBW,GAAQ,eAAe,CAAC,GAAE;AAAA,UAC/D,YAAY,gBAAAY,EAACvB,GAAA,EAAM,YAAkBW,GAAQ,uBAAuB,CAAC,GAAE;AAAA,UACvE,YAAY,gBAAAY,EAACvB,GAAA,EAAM,YAAkBW,GAAQ,eAAe,CAAC,EAAA,CAAE;AAAA,QAAA;AAAA,QAEjE,OAAON,EAAE,qBAAqB;AAAA,MAAA;AAAA,IAAA;AAAA,EAChC,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"PreviewPresentation.js","sources":["../../../../../src/components/Contractor/Payments/CreatePayment/PreviewPresentation.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { ContractorPaymentGroupPreview } from '@gusto/embedded-api/models/components/contractorpaymentgrouppreview'\nimport type { ContractorPaymentForGroupPreview } from '@gusto/embedded-api/models/components/contractorpaymentforgrouppreview'\nimport { useMemo } from 'react'\nimport type { Contractor } from '@gusto/embedded-api/models/components/contractor'\nimport type { CompanyBankAccount } from '@gusto/embedded-api/models/components/companybankaccount'\nimport type { PaymentSpeed } from '@gusto/embedded-api/models/components/paymentconfigs'\nimport { getContractorDisplayName } from './helpers'\nimport { FastAchSubmissionBlockerBanner } from './FastAchSubmissionBlockerBanner'\nimport { GenericBlocker } from './GenericBlocker'\nimport { DataView, Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useI18n } from '@/i18n'\nimport { formatHoursDisplay } from '@/components/Payroll/helpers'\nimport useNumberFormatter from '@/hooks/useNumberFormatter'\nimport { PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES } from '@/shared/constants'\n\nconst ZERO_HOURS_DISPLAY = '0.000'\n\ninterface PreviewPresentationProps {\n contractorPaymentGroup: ContractorPaymentGroupPreview\n contractors: Contractor[]\n onBackToEdit: () => void\n onSubmit: () => void\n isLoading: boolean\n bankAccount?: CompanyBankAccount\n selectedUnblockOptions?: Record<string, string>\n onUnblockOptionChange?: (blockerType: string, value: string) => void\n paymentSpeed?: PaymentSpeed\n}\n\nexport const PreviewPresentation = ({\n contractorPaymentGroup,\n contractors,\n onBackToEdit,\n onSubmit,\n isLoading,\n bankAccount,\n selectedUnblockOptions = {},\n onUnblockOptionChange,\n paymentSpeed,\n}: PreviewPresentationProps) => {\n const { Button, Text, Heading, Alert } = useComponentContext()\n useI18n('Contractor.Payments.CreatePayment')\n const { t } = useTranslation('Contractor.Payments.CreatePayment', {\n keyPrefix: 'previewPresentation',\n })\n const currencyFormatter = useNumberFormatter()\n\n const formatWageType = (contractor: ContractorPaymentForGroupPreview) => {\n if (contractor.wageType === 'Hourly' && contractor.hourlyRate) {\n return `${t('wageTypes.hourly')} ${currencyFormatter(Number(contractor.hourlyRate || '0'))}${t('perHour')}`\n }\n return contractor.wageType\n }\n\n const totals = useMemo(\n () =>\n contractorPaymentGroup.contractorPayments?.reduce(\n (acc, contractor) => {\n acc.wageAmount += Number(contractor.wage || '0')\n acc.bonusAmount += Number(contractor.bonus || '0')\n acc.reimbursementAmount += Number(contractor.reimbursement || '0')\n acc.totalAmount += Number(contractor.wageTotal || '0')\n return acc\n },\n { wageAmount: 0, bonusAmount: 0, reimbursementAmount: 0, totalAmount: 0 },\n ),\n [contractorPaymentGroup.contractorPayments],\n )\n\n const contractorPayments = contractorPaymentGroup.contractorPayments || []\n\n const submissionBlockers = (contractorPaymentGroup.submissionBlockers || []).filter(\n blocker => blocker.status === 'unresolved',\n )\n\n const hasUnresolvableBlockers = submissionBlockers.some(\n blocker => !PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES.includes(blocker.blockerType || ''),\n )\n\n const hasUnselectedBlockers = submissionBlockers.some(\n blocker => !selectedUnblockOptions[blocker.blockerType || ''],\n )\n\n const isSubmitDisabled =\n isLoading ||\n (submissionBlockers.length > 0 && (hasUnresolvableBlockers || hasUnselectedBlockers))\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex justifyContent=\"flex-end\" gap={16}>\n <Flex flexDirection=\"column\" gap={2}>\n <Heading as=\"h2\">{t('reviewAndSubmitTitle')}</Heading>\n <Text variant=\"supporting\">\n {t('reviewSubtitle', { debitDate: contractorPaymentGroup.debitDate })}\n </Text>\n </Flex>\n <Flex justifyContent=\"flex-end\" gap={16}>\n <Button onClick={onBackToEdit} variant=\"secondary\">\n {t('editButton')}\n </Button>\n <Button\n onClick={onSubmit}\n variant=\"primary\"\n isLoading={isLoading}\n isDisabled={isSubmitDisabled}\n >\n {t('submitButton')}\n </Button>\n </Flex>\n </Flex>\n\n <Alert\n status=\"info\"\n label={t('alerts.submitPaymentsDeadline', {\n checkDate: contractorPaymentGroup.checkDate,\n debitDate: contractorPaymentGroup.debitDate,\n })}\n />\n\n {submissionBlockers.length > 0 &&\n onUnblockOptionChange &&\n submissionBlockers.map(blocker => {\n const blockerType = blocker.blockerType || ''\n\n if (PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES.includes(blockerType)) {\n return (\n <FastAchSubmissionBlockerBanner\n key={blockerType}\n blocker={blocker}\n selectedValue={selectedUnblockOptions[blockerType]}\n onUnblockOptionChange={onUnblockOptionChange}\n paymentSpeed={paymentSpeed}\n />\n )\n }\n\n return <GenericBlocker key={blockerType} blocker={blocker} />\n })}\n\n {/* Payment Summary */}\n <Heading as=\"h3\">{t('paymentSummaryTitle')}</Heading>\n <DataView\n columns={[\n {\n title: t('summaryTableHeaders.totalAmount'),\n render: () => (\n <Text>{currencyFormatter(Number(contractorPaymentGroup.totals?.amount || '0'))}</Text>\n ),\n },\n {\n title: t('summaryTableHeaders.debitAmount'),\n render: () => (\n <Text>\n {currencyFormatter(Number(contractorPaymentGroup.totals?.debitAmount || '0'))}\n </Text>\n ),\n },\n {\n title: t('summaryTableHeaders.debitAccount'),\n render: () => <Text>{bankAccount?.hiddenAccountNumber ?? t('naDebitAccount')}</Text>,\n },\n {\n title: t('summaryTableHeaders.debitDate'),\n render: () => <Text>{contractorPaymentGroup.debitDate || 'debitDate'}</Text>,\n },\n {\n title: t('summaryTableHeaders.contractorPayDate'),\n render: () => <Text>{contractorPaymentGroup.checkDate || 'contractorPayDate'}</Text>,\n },\n ]}\n data={[contractorPaymentGroup]}\n label=\"Payment Summary\"\n />\n\n {/* Contractor Payments Table */}\n <DataView\n columns={[\n {\n title: t('contractorTableHeaders.contractor'),\n render: contractorPayment => (\n <Text>\n {getContractorDisplayName(\n contractors.find(\n contractor => contractor.uuid === contractorPayment.contractorUuid,\n ),\n )}\n </Text>\n ),\n },\n {\n title: t('contractorTableHeaders.wageType'),\n render: contractorPayment => <Text>{formatWageType(contractorPayment)}</Text>,\n },\n {\n title: t('contractorTableHeaders.paymentMethod'),\n render: contractorPayment => <Text>{contractorPayment.paymentMethod || 'N/A'}</Text>,\n },\n {\n title: t('contractorTableHeaders.hours'),\n render: contractorPayment => {\n const hours = Number(contractorPayment.hours || '0')\n return (\n <Text>\n {contractorPayment.wageType === 'Hourly' && hours\n ? formatHoursDisplay(hours)\n : ZERO_HOURS_DISPLAY}\n </Text>\n )\n },\n },\n {\n title: t('contractorTableHeaders.wage'),\n render: contractorPayment => (\n <Text>\n {contractorPayment.wageType === 'Fixed' && contractorPayment.wage\n ? currencyFormatter(Number(contractorPayment.wage || '0'))\n : currencyFormatter(0)}\n </Text>\n ),\n },\n {\n title: t('contractorTableHeaders.bonus'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.bonus || '0'))}</Text>\n ),\n },\n {\n title: t('contractorTableHeaders.reimbursement'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.reimbursement || '0'))}</Text>\n ),\n },\n {\n title: t('contractorTableHeaders.total'),\n render: contractorPayment => (\n <Text>{currencyFormatter(Number(contractorPayment.wageTotal || '0'))}</Text>\n ),\n },\n ]}\n data={contractorPayments}\n footer={() => ({\n 'column-0': <Text weight=\"bold\">{t('totalsLabel')}</Text>,\n 'column-4': <Text>{currencyFormatter(totals?.wageAmount ?? 0)}</Text>,\n 'column-5': <Text>{currencyFormatter(totals?.bonusAmount ?? 0)}</Text>,\n 'column-6': <Text>{currencyFormatter(totals?.reimbursementAmount ?? 0)}</Text>,\n 'column-7': <Text>{currencyFormatter(totals?.totalAmount ?? 0)}</Text>,\n })}\n label={t('whatYourCompanyPays')}\n />\n </Flex>\n )\n}\n"],"names":["ZERO_HOURS_DISPLAY","PreviewPresentation","contractorPaymentGroup","contractors","onBackToEdit","onSubmit","isLoading","bankAccount","selectedUnblockOptions","onUnblockOptionChange","paymentSpeed","Button","Text","Heading","Alert","useComponentContext","useI18n","t","useTranslation","currencyFormatter","useNumberFormatter","formatWageType","contractor","totals","useMemo","acc","contractorPayments","submissionBlockers","blocker","hasUnresolvableBlockers","PAYROLL_RESOLVABLE_SUBMISSION_BLOCKER_TYPES","hasUnselectedBlockers","isSubmitDisabled","jsxs","Flex","jsx","blockerType","FastAchSubmissionBlockerBanner","GenericBlocker","DataView","contractorPayment","getContractorDisplayName","hours","formatHoursDisplay"],"mappings":";;;;;;;;;;;;;AAiBA,MAAMA,IAAqB,SAcdC,IAAsB,CAAC;AAAA,EAClC,wBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,wBAAAC,IAAyB,CAAA;AAAA,EACzB,uBAAAC;AAAA,EACA,cAAAC;AACF,MAAgC;AAC9B,QAAM,EAAE,QAAAC,GAAQ,MAAAC,GAAM,SAAAC,GAAS,OAAAC,EAAA,IAAUC,EAAA;AACzC,EAAAC,EAAQ,mCAAmC;AAC3C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qCAAqC;AAAA,IAChE,WAAW;AAAA,EAAA,CACZ,GACKC,IAAoBC,EAAA,GAEpBC,IAAiB,CAACC,MAClBA,EAAW,aAAa,YAAYA,EAAW,aAC1C,GAAGL,EAAE,kBAAkB,CAAC,IAAIE,EAAkB,OAAOG,EAAW,cAAc,GAAG,CAAC,CAAC,GAAGL,EAAE,SAAS,CAAC,KAEpGK,EAAW,UAGdC,IAASC;AAAA,IACb,MACEtB,EAAuB,oBAAoB;AAAA,MACzC,CAACuB,GAAKH,OACJG,EAAI,cAAc,OAAOH,EAAW,QAAQ,GAAG,GAC/CG,EAAI,eAAe,OAAOH,EAAW,SAAS,GAAG,GACjDG,EAAI,uBAAuB,OAAOH,EAAW,iBAAiB,GAAG,GACjEG,EAAI,eAAe,OAAOH,EAAW,aAAa,GAAG,GAC9CG;AAAA,MAET,EAAE,YAAY,GAAG,aAAa,GAAG,qBAAqB,GAAG,aAAa,EAAA;AAAA,IAAE;AAAA,IAE5E,CAACvB,EAAuB,kBAAkB;AAAA,EAAA,GAGtCwB,IAAqBxB,EAAuB,sBAAsB,CAAA,GAElEyB,KAAsBzB,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 +3,26 @@ import { useTranslation as N, Trans as D } from "react-i18next";
|
|
|
3
3
|
import { getContractorDisplayName as x } from "../CreatePayment/helpers.js";
|
|
4
4
|
import u from "./PaymentHistoryPresentation.module.scss.js";
|
|
5
5
|
import { Flex as l } from "../../../Common/Flex/Flex.js";
|
|
6
|
-
import "classnames";
|
|
7
|
-
import "../../../../shared/constants.js";
|
|
8
6
|
import { EmptyData as P } from "../../../Common/EmptyData/EmptyData.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import w from "../../../../hooks/
|
|
14
|
-
import
|
|
15
|
-
import M from "../../../../assets/icons/
|
|
16
|
-
import T from "
|
|
7
|
+
import { useComponentContext as C } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
+
import { useI18n as F } from "../../../../i18n/I18n.js";
|
|
9
|
+
import { formatHoursDisplay as v } from "../../../Payroll/helpers.js";
|
|
10
|
+
import S from "../../../../hooks/useNumberFormatter.js";
|
|
11
|
+
import { useDateFormatter as w } from "../../../../hooks/useDateFormatter.js";
|
|
12
|
+
import L from "../../../../assets/icons/eye.svg.js";
|
|
13
|
+
import M from "../../../../assets/icons/slash-circle.svg.js";
|
|
14
|
+
import { HamburgerMenu as T } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
17
15
|
import { DataView as j } from "../../../Common/DataView/DataView.js";
|
|
18
|
-
const
|
|
16
|
+
const U = ({
|
|
19
17
|
paymentGroup: s,
|
|
20
18
|
contractors: h,
|
|
21
19
|
onViewPayment: b,
|
|
22
20
|
onCancelPayment: f,
|
|
23
21
|
isCancelling: y
|
|
24
22
|
}) => {
|
|
25
|
-
const { Text: n, Heading: c } =
|
|
26
|
-
|
|
27
|
-
const { t } = N("Contractor.Payments.PaymentHistory"), o =
|
|
23
|
+
const { Text: n, Heading: c } = C();
|
|
24
|
+
F("Contractor.Payments.PaymentHistory");
|
|
25
|
+
const { t } = N("Contractor.Payments.PaymentHistory"), o = S("currency"), { formatLongWithYear: g } = w(), d = s.contractorPayments || [];
|
|
28
26
|
return /* @__PURE__ */ m(l, { flexDirection: "column", gap: 32, children: [
|
|
29
27
|
/* @__PURE__ */ m(l, { flexDirection: "column", gap: 8, children: [
|
|
30
28
|
/* @__PURE__ */ r(c, { as: "h2", children: t("title") }),
|
|
@@ -62,7 +60,7 @@ const Z = ({
|
|
|
62
60
|
},
|
|
63
61
|
{
|
|
64
62
|
title: t("tableHeaders.hours"),
|
|
65
|
-
render: ({ hours: e }) => /* @__PURE__ */ r(n, { children: e ?
|
|
63
|
+
render: ({ hours: e }) => /* @__PURE__ */ r(n, { children: e ? v(Number(e)) : "–" })
|
|
66
64
|
},
|
|
67
65
|
{
|
|
68
66
|
title: t("tableHeaders.wage"),
|
|
@@ -90,7 +88,7 @@ const Z = ({
|
|
|
90
88
|
onClick: () => {
|
|
91
89
|
b(e);
|
|
92
90
|
},
|
|
93
|
-
icon: /* @__PURE__ */ r("span", { className: u.icon, children: /* @__PURE__ */ r(
|
|
91
|
+
icon: /* @__PURE__ */ r("span", { className: u.icon, children: /* @__PURE__ */ r(L, { "aria-hidden": !0 }) })
|
|
94
92
|
}
|
|
95
93
|
];
|
|
96
94
|
return i && p.push({
|
|
@@ -98,9 +96,9 @@ const Z = ({
|
|
|
98
96
|
onClick: () => {
|
|
99
97
|
f(a);
|
|
100
98
|
},
|
|
101
|
-
icon: /* @__PURE__ */ r("span", { className: u.icon, children: /* @__PURE__ */ r(
|
|
99
|
+
icon: /* @__PURE__ */ r("span", { className: u.icon, children: /* @__PURE__ */ r(M, { "aria-hidden": !0 }) })
|
|
102
100
|
}), /* @__PURE__ */ r(
|
|
103
|
-
|
|
101
|
+
T,
|
|
104
102
|
{
|
|
105
103
|
items: p,
|
|
106
104
|
triggerLabel: t("tableHeaders.action"),
|
|
@@ -116,6 +114,6 @@ const Z = ({
|
|
|
116
114
|
] });
|
|
117
115
|
};
|
|
118
116
|
export {
|
|
119
|
-
|
|
117
|
+
U as PaymentHistoryPresentation
|
|
120
118
|
};
|
|
121
119
|
//# sourceMappingURL=PaymentHistoryPresentation.js.map
|