@gusto/embedded-react-sdk 0.17.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/dist/assets/icons/icon-error-outline.svg.js +10 -0
- package/dist/assets/icons/icon-error-outline.svg.js.map +1 -0
- package/dist/assets/icons/icon-info-outline.svg.js +10 -0
- package/dist/assets/icons/icon-info-outline.svg.js.map +1 -0
- package/dist/assets/icons/icon-zap-fast.svg.js +10 -0
- package/dist/assets/icons/icon-zap-fast.svg.js.map +1 -0
- package/dist/components/Base/Base.js +50 -65
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/useBase.d.ts +2 -5
- package/dist/components/Base/useBase.js.map +1 -1
- package/dist/components/Common/Fieldset/Fieldset.module.scss.js +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +42 -36
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
- package/dist/components/Common/HamburgerMenu/HamburgerMenu.js +1 -1
- package/dist/components/Common/HamburgerMenu/HamburgerMenu.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControl.js +6 -6
- package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
- package/dist/components/Common/RequirementsList/RequirementsList.js +19 -13
- package/dist/components/Common/RequirementsList/RequirementsList.js.map +1 -1
- package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +4 -7
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -13
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +10 -13
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Badge/index.d.ts +2 -0
- package/dist/components/Common/UI/Banner/Banner.d.ts +3 -0
- package/dist/components/Common/UI/Banner/Banner.js +31 -0
- package/dist/components/Common/UI/Banner/Banner.js.map +1 -0
- package/dist/components/Common/UI/Banner/Banner.module.scss.js +14 -0
- package/dist/components/Common/UI/Banner/Banner.module.scss.js.map +1 -0
- package/dist/components/Common/UI/Banner/BannerTypes.d.ts +21 -0
- package/dist/components/Common/UI/Banner/BannerTypes.js +7 -0
- package/dist/components/Common/UI/Banner/BannerTypes.js.map +1 -0
- package/dist/components/Common/UI/Banner/index.d.ts +4 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +8 -8
- package/dist/components/Common/UI/Dialog/Dialog.js +50 -76
- package/dist/components/Common/UI/Dialog/Dialog.js.map +1 -1
- package/dist/components/Common/UI/Dialog/Dialog.module.scss.js +8 -14
- package/dist/components/Common/UI/Dialog/Dialog.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Link/LinkTypes.d.ts +7 -6
- package/dist/components/Common/UI/List/List.module.scss.js +2 -2
- package/dist/components/Common/UI/Modal/Modal.d.ts +2 -0
- package/dist/components/Common/UI/Modal/Modal.js +90 -0
- package/dist/components/Common/UI/Modal/Modal.js.map +1 -0
- package/dist/components/Common/UI/Modal/Modal.module.scss.js +26 -0
- package/dist/components/Common/UI/Modal/Modal.module.scss.js.map +1 -0
- package/dist/components/Common/UI/Modal/ModalTypes.d.ts +34 -0
- package/dist/components/Common/UI/Modal/ModalTypes.js +8 -0
- package/dist/components/Common/UI/Modal/ModalTypes.js.map +1 -0
- package/dist/components/Common/UI/Modal/index.d.ts +3 -0
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Common/UI/Tabs/Tabs.d.ts +0 -5
- package/dist/components/Common/UI/Tabs/Tabs.js +45 -16
- package/dist/components/Common/UI/Tabs/Tabs.js.map +1 -1
- package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +8 -4
- package/dist/components/Common/UI/Tabs/Tabs.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Tabs/TabsTypes.d.ts +7 -0
- package/dist/components/Common/index.d.ts +0 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -8
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -8
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -10
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +2 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +2 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -6
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +9 -10
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +7 -8
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -8
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -11
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -6
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -12
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +11 -13
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -7
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -13
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.js +13 -13
- package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -6
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +6 -8
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -6
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +7 -9
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -17
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +29 -31
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Head.js +5 -5
- package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -11
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +5 -7
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -9
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +10 -12
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +6 -8
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +4 -5
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +10 -12
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -6
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +6 -8
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +6 -8
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +12 -14
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -6
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +12 -14
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -8
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -4
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -6
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +40 -42
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -12
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +35 -37
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +17 -19
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +13 -15
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -8
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -7
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -6
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -8
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -7
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -6
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +4 -6
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +2 -3
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +6 -8
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +54 -55
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +13 -14
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +4 -6
- 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 -3
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +11 -11
- package/dist/components/Contractor/Profile/useContractorProfile.js +3 -4
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +9 -10
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/Submit/SubmitDone.js +8 -8
- package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +5 -6
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +23 -22
- 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/DeductionsComponents.js +1 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +7 -7
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +2 -2
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +3 -4
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +44 -40
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +3 -4
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/useDeductions.d.ts +2 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -8
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +9 -11
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +11 -13
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -6
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +4 -6
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -4
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +5 -7
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +37 -38
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -6
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +6 -8
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +11 -13
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js +8 -8
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Head.js +7 -7
- package/dist/components/Employee/FederalTaxes/Head.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -6
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +22 -22
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +7 -9
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +4 -5
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +10 -12
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +6 -7
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +3 -4
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -8
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +7 -9
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +38 -35
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.d.ts +52 -0
- package/dist/components/Employee/Profile/HomeAddress.js +64 -45
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +20 -21
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js +150 -143
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.d.ts +1 -0
- package/dist/components/Employee/Profile/useProfile.js +4 -6
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +8 -10
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/StateTaxes.js +4 -4
- package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -6
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +8 -10
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +9 -11
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalHead.js +7 -7
- package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.js +5 -5
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +4 -6
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Flow/Flow.js +16 -18
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +6 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +57 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.d.ts +8 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +79 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/index.d.ts +2 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.d.ts +7 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js +25 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.d.ts +10 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +30 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/index.d.ts +2 -0
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.d.ts +10 -0
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +30 -0
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/index.d.ts +2 -0
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.d.ts +13 -0
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js +63 -0
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/index.d.ts +3 -0
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +9 -11
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +6 -7
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +1 -1
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +77 -76
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +133 -135
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js +5 -3
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +30 -29
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +145 -137
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +5 -7
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +3 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +22 -22
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +40 -27
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +50 -72
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +2 -4
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +42 -37
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +20 -20
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +24 -21
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +3 -9
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +119 -131
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +6 -6
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +125 -94
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +6 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +243 -230
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.module.scss.js +8 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.module.scss.js.map +1 -0
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.d.ts +8 -0
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js +49 -0
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js.map +1 -0
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.d.ts +6 -0
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js +18 -0
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js.map +1 -0
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/index.d.ts +3 -0
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +1 -0
- package/dist/components/Payroll/index.js +8 -6
- package/dist/components/Payroll/index.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +8 -10
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +44 -40
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +5 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +27 -25
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +4 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js +3 -3
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +5 -8
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ThemeProvider/theme.d.ts +1 -0
- package/dist/contexts/ThemeProvider/theme.js +5 -4
- package/dist/contexts/ThemeProvider/theme.js.map +1 -1
- package/dist/helpers/apiErrorToList.d.ts +7 -0
- package/dist/helpers/apiErrorToList.js +23 -0
- package/dist/helpers/apiErrorToList.js.map +1 -0
- package/dist/helpers/breadcrumbHelpers.js +30 -30
- package/dist/helpers/breadcrumbHelpers.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +15 -7
- package/dist/helpers/dateFormatting.js +88 -35
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/helpers/formattedStrings.js +11 -12
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/hooks/useAsyncError.js.map +1 -0
- package/dist/hooks/useDateFormatter.d.ts +19 -0
- package/dist/hooks/useDateFormatter.js +24 -0
- package/dist/hooks/useDateFormatter.js.map +1 -0
- package/dist/hooks/useMenu.js.map +1 -0
- package/dist/{components/Common/hooks → hooks}/useNumberFormatter.js +1 -1
- package/dist/hooks/useNumberFormatter.js.map +1 -0
- package/dist/hooks/useOverflowDetection/index.d.ts +3 -0
- package/dist/hooks/useOverflowDetection/useOverflowDetection.d.ts +7 -0
- package/dist/hooks/useOverflowDetection/useOverflowDetection.js +28 -0
- package/dist/hooks/useOverflowDetection/useOverflowDetection.js.map +1 -0
- package/dist/i18n/I18n.js +1 -1
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.BankAccount.json.js +1 -1
- package/dist/i18n/en/Company.DocumentList.json.js +16 -16
- package/dist/i18n/en/Company.FederalTaxes.json.js +22 -22
- package/dist/i18n/en/Company.PaySchedule.json.js +9 -9
- package/dist/i18n/en/Contractor.ContractorList.json.js +8 -8
- package/dist/i18n/en/Contractor.Submit.json.js +6 -6
- package/dist/i18n/en/Employee.Compensation.json.js +20 -20
- package/dist/i18n/en/Employee.Deductions.json.js +135 -109
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/i18n/en/Employee.EmployeeList.json.js +6 -6
- package/dist/i18n/en/Employee.FederalTaxes.json.js +9 -9
- package/dist/i18n/en/Employee.HomeAddress.json.js +3 -3
- package/dist/i18n/en/Employee.OnboardingSummary.json.js +1 -1
- package/dist/i18n/en/Employee.PaymentMethod.json.js +11 -11
- package/dist/i18n/en/Employee.Taxes.json.js +27 -29
- package/dist/i18n/en/Employee.Taxes.json.js.map +1 -1
- package/dist/i18n/en/Payroll.ConfirmWireDetailsBanner.json.js +14 -0
- package/dist/i18n/en/Payroll.ConfirmWireDetailsBanner.json.js.map +1 -0
- package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js +10 -0
- package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js.map +1 -0
- package/dist/i18n/en/Payroll.PayrollBlocker.json.js +3 -3
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +1 -1
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +4 -4
- package/dist/i18n/en/Payroll.PayrollList.json.js +7 -7
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +37 -35
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollReceipts.json.js +7 -7
- package/dist/i18n/en/Payroll.WireInstructions.json.js +10 -0
- package/dist/i18n/en/Payroll.WireInstructions.json.js.map +1 -0
- package/dist/i18n/en/common.json.d.ts +3 -2
- package/dist/i18n/en/common.json.js +4 -4
- package/dist/shared/constants.d.ts +13 -0
- package/dist/shared/constants.js +56 -47
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +129 -99
- package/package.json +14 -15
- package/dist/components/Common/hooks/useAsyncError.js.map +0 -1
- package/dist/components/Common/hooks/useMenu.js.map +0 -1
- package/dist/components/Common/hooks/useNumberFormatter.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +0 -221
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +0 -8
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +0 -132
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +0 -14
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js +0 -98
- package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js.map +0 -1
- package/dist/i18n/en/Company.AddBank.json.js +0 -28
- package/dist/i18n/en/Company.AddBank.json.js.map +0 -1
- package/dist/i18n/en/Payroll.PayrollSchedule.json.js +0 -27
- package/dist/i18n/en/Payroll.PayrollSchedule.json.js.map +0 -1
- /package/dist/{components/Common/hooks → hooks}/useAsyncError.d.ts +0 -0
- /package/dist/{components/Common/hooks → hooks}/useAsyncError.js +0 -0
- /package/dist/{components/Common/hooks → hooks}/useMenu.d.ts +0 -0
- /package/dist/{components/Common/hooks → hooks}/useMenu.js +0 -0
- /package/dist/{components/Common/hooks → hooks}/useNumberFormatter.d.ts +0 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { jsx as r, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as S } from "react-i18next";
|
|
3
|
+
import { useWireInRequestsListSuspense as I } from "@gusto/embedded-api/react-query/wireInRequestsList";
|
|
4
|
+
import { usePayrollsListSuspense as T } from "@gusto/embedded-api/react-query/payrollsList";
|
|
5
|
+
import { BaseComponent as U } from "../../../Base/Base.js";
|
|
6
|
+
import "../../../Base/useBase.js";
|
|
7
|
+
import { useComponentContext as A } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
+
import { useComponentDictionary as b, useI18n as v } from "../../../../i18n/I18n.js";
|
|
9
|
+
import { Flex as M } from "../../../Common/Flex/Flex.js";
|
|
10
|
+
import { useDateFormatter as F } from "../../../../hooks/useDateFormatter.js";
|
|
11
|
+
function Q(n) {
|
|
12
|
+
return /* @__PURE__ */ r(U, { ...n, children: /* @__PURE__ */ r(Z, { ...n, children: n.children }) });
|
|
13
|
+
}
|
|
14
|
+
const Z = ({
|
|
15
|
+
wireInId: n,
|
|
16
|
+
companyId: m,
|
|
17
|
+
dictionary: d,
|
|
18
|
+
onStartWireTransfer: p
|
|
19
|
+
}) => {
|
|
20
|
+
b("Payroll.ConfirmWireDetailsBanner", d), v("Payroll.ConfirmWireDetailsBanner");
|
|
21
|
+
const { t: i } = S("Payroll.ConfirmWireDetailsBanner"), { Banner: f, Button: y, UnorderedList: g, Text: h } = A(), D = F(), { data: R } = I({
|
|
22
|
+
companyUuid: m
|
|
23
|
+
}), { data: P } = T({
|
|
24
|
+
companyId: m,
|
|
25
|
+
processed: !0
|
|
26
|
+
}), u = (R.wireInRequestList || []).filter(
|
|
27
|
+
(e) => e.status === "awaiting_funds"
|
|
28
|
+
), w = n ? u.filter((e) => e.uuid === n) : u, C = P.payrollList || [], o = w.map((e) => {
|
|
29
|
+
const t = C.find((l) => l.payrollUuid === e.paymentUuid), c = t?.payPeriod ? D.formatPayPeriodRange(t.payPeriod.startDate, t.payPeriod.endDate) : "";
|
|
30
|
+
return {
|
|
31
|
+
wireInRequest: e,
|
|
32
|
+
payroll: t,
|
|
33
|
+
payrollRange: c
|
|
34
|
+
};
|
|
35
|
+
});
|
|
36
|
+
if (o.length === 0)
|
|
37
|
+
return null;
|
|
38
|
+
const a = o.length === 1, { wireInRequest: s, payrollRange: L } = o[0] || {};
|
|
39
|
+
if (a && !s)
|
|
40
|
+
return null;
|
|
41
|
+
const W = (e) => {
|
|
42
|
+
const t = new Date(e), l = t.toLocaleTimeString("en-US", {
|
|
43
|
+
hour: "numeric",
|
|
44
|
+
minute: t.getMinutes() === 0 ? void 0 : "2-digit",
|
|
45
|
+
hour12: !0,
|
|
46
|
+
timeZone: "America/Los_Angeles",
|
|
47
|
+
timeZoneName: "short"
|
|
48
|
+
}).replace(/\s?(AM|PM)/i, (q) => q.trim().toLowerCase()), B = t.toLocaleDateString("en-US", {
|
|
49
|
+
month: "long",
|
|
50
|
+
day: "numeric",
|
|
51
|
+
year: "numeric",
|
|
52
|
+
timeZone: "America/Los_Angeles"
|
|
53
|
+
});
|
|
54
|
+
return { time: l, date: B };
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ r(f, { status: "warning", title: (() => {
|
|
57
|
+
if (a) {
|
|
58
|
+
if (n && s?.wireInDeadline) {
|
|
59
|
+
const { time: e, date: t } = W(s.wireInDeadline);
|
|
60
|
+
return i("banner.title", { time: e, date: t });
|
|
61
|
+
}
|
|
62
|
+
return i("banner.titleWithPayroll", { payrollRange: L });
|
|
63
|
+
}
|
|
64
|
+
return i("banner.titleMultiple", { count: o.length });
|
|
65
|
+
})(), children: /* @__PURE__ */ x(M, { flexDirection: "column", gap: 16, alignItems: "flex-start", children: [
|
|
66
|
+
/* @__PURE__ */ r("div", { children: i("banner.description") }),
|
|
67
|
+
!a && /* @__PURE__ */ r(
|
|
68
|
+
g,
|
|
69
|
+
{
|
|
70
|
+
items: o.map(({ payrollRange: e }, t) => /* @__PURE__ */ r(h, { children: e }, t))
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ r(y, { variant: "secondary", onClick: p, children: i("cta.startWireTransfer") })
|
|
74
|
+
] }) });
|
|
75
|
+
};
|
|
76
|
+
export {
|
|
77
|
+
Q as ConfirmWireDetailsBanner
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=ConfirmWireDetailsBanner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmWireDetailsBanner.js","sources":["../../../../../src/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useWireInRequestsListSuspense } from '@gusto/embedded-api/react-query/wireInRequestsList'\nimport { usePayrollsListSuspense } from '@gusto/embedded-api/react-query/payrollsList'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\ninterface ConfirmWireDetailsBannerProps\n extends BaseComponentInterface<'Payroll.ConfirmWireDetailsBanner'> {\n wireInId?: string\n companyId: string\n onStartWireTransfer: () => void\n}\n\nexport function ConfirmWireDetailsBanner(props: ConfirmWireDetailsBannerProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({\n wireInId,\n companyId,\n dictionary,\n onStartWireTransfer,\n}: ConfirmWireDetailsBannerProps) => {\n useComponentDictionary('Payroll.ConfirmWireDetailsBanner', dictionary)\n useI18n('Payroll.ConfirmWireDetailsBanner')\n const { t } = useTranslation('Payroll.ConfirmWireDetailsBanner')\n const { Banner, Button, UnorderedList, Text } = useComponentContext()\n const dateFormatter = useDateFormatter()\n\n const { data: wireInRequestsData } = useWireInRequestsListSuspense({\n companyUuid: companyId,\n })\n\n const { data: payrollsData } = usePayrollsListSuspense({\n companyId,\n processed: true,\n })\n\n const activeWireInRequests = (wireInRequestsData.wireInRequestList || []).filter(\n request => request.status === 'awaiting_funds',\n )\n const wireInRequests = wireInId\n ? activeWireInRequests.filter(request => request.uuid === wireInId)\n : activeWireInRequests\n\n const payrolls = payrollsData.payrollList || []\n\n const wireInRequestsWithPayrolls = wireInRequests.map(wireInRequest => {\n const payroll = payrolls.find(p => p.payrollUuid === wireInRequest.paymentUuid)\n const payrollRange = payroll?.payPeriod\n ? dateFormatter.formatPayPeriodRange(payroll.payPeriod.startDate, payroll.payPeriod.endDate)\n : ''\n return {\n wireInRequest,\n payroll,\n payrollRange,\n }\n })\n\n if (wireInRequestsWithPayrolls.length === 0) {\n return null\n }\n\n const isSingleWireInRequest = wireInRequestsWithPayrolls.length === 1\n const { wireInRequest, payrollRange } = wireInRequestsWithPayrolls[0] || {}\n\n if (isSingleWireInRequest && !wireInRequest) {\n return null\n }\n\n const formatDeadline = (deadline: string) => {\n const date = new Date(deadline)\n\n const timeRaw = date.toLocaleTimeString('en-US', {\n hour: 'numeric',\n minute: date.getMinutes() === 0 ? undefined : '2-digit',\n hour12: true,\n timeZone: 'America/Los_Angeles',\n timeZoneName: 'short',\n })\n\n const time = timeRaw.replace(/\\s?(AM|PM)/i, match => match.trim().toLowerCase())\n\n const dateString = date.toLocaleDateString('en-US', {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n timeZone: 'America/Los_Angeles',\n })\n\n return { time, date: dateString }\n }\n\n const getBannerTitle = () => {\n if (isSingleWireInRequest) {\n if (wireInId && wireInRequest?.wireInDeadline) {\n const { time, date } = formatDeadline(wireInRequest.wireInDeadline)\n return t('banner.title', { time, date })\n }\n return t('banner.titleWithPayroll', { payrollRange })\n }\n return t('banner.titleMultiple', { count: wireInRequestsWithPayrolls.length })\n }\n\n return (\n <Banner status=\"warning\" title={getBannerTitle()}>\n <Flex flexDirection=\"column\" gap={16} alignItems=\"flex-start\">\n <div>{t('banner.description')}</div>\n {!isSingleWireInRequest && (\n <UnorderedList\n items={wireInRequestsWithPayrolls.map(({ payrollRange }, index) => (\n <Text key={index}>{payrollRange}</Text>\n ))}\n />\n )}\n <Button variant=\"secondary\" onClick={onStartWireTransfer}>\n {t('cta.startWireTransfer')}\n </Button>\n </Flex>\n </Banner>\n )\n}\n"],"names":["ConfirmWireDetailsBanner","props","jsx","BaseComponent","Root","wireInId","companyId","dictionary","onStartWireTransfer","useComponentDictionary","useI18n","t","useTranslation","Banner","Button","UnorderedList","Text","useComponentContext","dateFormatter","useDateFormatter","wireInRequestsData","useWireInRequestsListSuspense","payrollsData","usePayrollsListSuspense","activeWireInRequests","request","wireInRequests","payrolls","wireInRequestsWithPayrolls","wireInRequest","payroll","p","payrollRange","isSingleWireInRequest","formatDeadline","deadline","date","time","match","dateString","jsxs","Flex","index"],"mappings":";;;;;;;;;;AAgBO,SAASA,EAAyBC,GAAsC;AAC7E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMG,IAAO,CAAC;AAAA,EACZ,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,qBAAAC;AACF,MAAqC;AACnC,EAAAC,EAAuB,oCAAoCF,CAAU,GACrEG,EAAQ,kCAAkC;AAC1C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kCAAkC,GACzD,EAAE,QAAAC,GAAQ,QAAAC,GAAQ,eAAAC,GAAe,MAAAC,EAAA,IAASC,EAAA,GAC1CC,IAAgBC,EAAA,GAEhB,EAAE,MAAMC,EAAA,IAAuBC,EAA8B;AAAA,IACjE,aAAaf;AAAA,EAAA,CACd,GAEK,EAAE,MAAMgB,EAAA,IAAiBC,EAAwB;AAAA,IACrD,WAAAjB;AAAA,IACA,WAAW;AAAA,EAAA,CACZ,GAEKkB,KAAwBJ,EAAmB,qBAAqB,CAAA,GAAI;AAAA,IACxE,CAAAK,MAAWA,EAAQ,WAAW;AAAA,EAAA,GAE1BC,IAAiBrB,IACnBmB,EAAqB,OAAO,OAAWC,EAAQ,SAASpB,CAAQ,IAChEmB,GAEEG,IAAWL,EAAa,eAAe,CAAA,GAEvCM,IAA6BF,EAAe,IAAI,CAAAG,MAAiB;AACrE,UAAMC,IAAUH,EAAS,KAAK,OAAKI,EAAE,gBAAgBF,EAAc,WAAW,GACxEG,IAAeF,GAAS,YAC1BZ,EAAc,qBAAqBY,EAAQ,UAAU,WAAWA,EAAQ,UAAU,OAAO,IACzF;AACJ,WAAO;AAAA,MACL,eAAAD;AAAAA,MACA,SAAAC;AAAA,MACA,cAAAE;AAAAA,IAAA;AAAA,EAEJ,CAAC;AAED,MAAIJ,EAA2B,WAAW;AACxC,WAAO;AAGT,QAAMK,IAAwBL,EAA2B,WAAW,GAC9D,EAAE,eAAAC,GAAe,cAAAG,EAAA,IAAiBJ,EAA2B,CAAC,KAAK,CAAA;AAEzE,MAAIK,KAAyB,CAACJ;AAC5B,WAAO;AAGT,QAAMK,IAAiB,CAACC,MAAqB;AAC3C,UAAMC,IAAO,IAAI,KAAKD,CAAQ,GAUxBE,IARUD,EAAK,mBAAmB,SAAS;AAAA,MAC/C,MAAM;AAAA,MACN,QAAQA,EAAK,WAAA,MAAiB,IAAI,SAAY;AAAA,MAC9C,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,cAAc;AAAA,IAAA,CACf,EAEoB,QAAQ,eAAe,OAASE,EAAM,OAAO,aAAa,GAEzEC,IAAaH,EAAK,mBAAmB,SAAS;AAAA,MAClD,OAAO;AAAA,MACP,KAAK;AAAA,MACL,MAAM;AAAA,MACN,UAAU;AAAA,IAAA,CACX;AAED,WAAO,EAAE,MAAAC,GAAM,MAAME,EAAA;AAAA,EACvB;AAaA,SACE,gBAAArC,EAACW,GAAA,EAAO,QAAO,WAAU,QAZJ,MAAM;AAC3B,QAAIoB,GAAuB;AACzB,UAAI5B,KAAYwB,GAAe,gBAAgB;AAC7C,cAAM,EAAE,MAAAQ,GAAM,MAAAD,EAAA,IAASF,EAAeL,EAAc,cAAc;AAClE,eAAOlB,EAAE,gBAAgB,EAAE,MAAA0B,GAAM,MAAAD,GAAM;AAAA,MACzC;AACA,aAAOzB,EAAE,2BAA2B,EAAE,cAAAqB,GAAc;AAAA,IACtD;AACA,WAAOrB,EAAE,wBAAwB,EAAE,OAAOiB,EAA2B,QAAQ;AAAA,EAC/E,GAGkC,GAC9B,UAAA,gBAAAY,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAAI,YAAW,cAC/C,UAAA;AAAA,IAAA,gBAAAvC,EAAC,OAAA,EAAK,UAAAS,EAAE,oBAAoB,EAAA,CAAE;AAAA,IAC7B,CAACsB,KACA,gBAAA/B;AAAA,MAACa;AAAA,MAAA;AAAA,QACC,OAAOa,EAA2B,IAAI,CAAC,EAAE,cAAAI,EAAAA,GAAgBU,MACvD,gBAAAxC,EAACc,GAAA,EAAkB,UAAAgB,EAAAA,GAARU,CAAqB,CACjC;AAAA,MAAA;AAAA,IAAA;AAAA,IAGL,gBAAAxC,EAACY,KAAO,SAAQ,aAAY,SAASN,GAClC,UAAAG,EAAE,uBAAuB,EAAA,CAC5B;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FlowContextInterface } from '../../Flow/useFlow';
|
|
2
|
+
export interface ConfirmWireDetailsContextInterface extends FlowContextInterface {
|
|
3
|
+
companyId: string;
|
|
4
|
+
wireInId?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function WireInstructionsContextual(): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function ConfirmWireDetailsFormContextual(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useFlow as e } from "../../Flow/useFlow.js";
|
|
3
|
+
import { ensureRequired as i } from "../../../helpers/ensureRequired.js";
|
|
4
|
+
import { ConfirmWireDetailsForm as m } from "./ConfirmWireDetailsForm/ConfirmWireDetailsForm.js";
|
|
5
|
+
import { WireInstructions as s } from "./WireInstructions/WireInstructions.js";
|
|
6
|
+
function a() {
|
|
7
|
+
const { companyId: o, wireInId: r, onEvent: n } = e();
|
|
8
|
+
return /* @__PURE__ */ t(s, { companyId: i(o), wireInId: r, onEvent: n });
|
|
9
|
+
}
|
|
10
|
+
function d() {
|
|
11
|
+
const { companyId: o, wireInId: r, onEvent: n } = e();
|
|
12
|
+
return /* @__PURE__ */ t(
|
|
13
|
+
m,
|
|
14
|
+
{
|
|
15
|
+
companyId: i(o),
|
|
16
|
+
wireInId: r,
|
|
17
|
+
onEvent: n
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
d as ConfirmWireDetailsFormContextual,
|
|
23
|
+
a as WireInstructionsContextual
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=ConfirmWireDetailsComponents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmWireDetailsComponents.js","sources":["../../../../src/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.tsx"],"sourcesContent":["import { WireInstructions } from './WireInstructions'\nimport { ConfirmWireDetailsForm } from './ConfirmWireDetailsForm'\nimport { useFlow } from '@/components/Flow/useFlow'\nimport { ensureRequired } from '@/helpers/ensureRequired'\nimport type { FlowContextInterface } from '@/components/Flow/useFlow'\n\nexport interface ConfirmWireDetailsContextInterface extends FlowContextInterface {\n companyId: string\n wireInId?: string\n}\n\nexport function WireInstructionsContextual() {\n const { companyId, wireInId, onEvent } = useFlow<ConfirmWireDetailsContextInterface>()\n\n return (\n <WireInstructions companyId={ensureRequired(companyId)} wireInId={wireInId} onEvent={onEvent} />\n )\n}\n\nexport function ConfirmWireDetailsFormContextual() {\n const { companyId, wireInId, onEvent } = useFlow<ConfirmWireDetailsContextInterface>()\n\n return (\n <ConfirmWireDetailsForm\n companyId={ensureRequired(companyId)}\n wireInId={wireInId}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["WireInstructionsContextual","companyId","wireInId","onEvent","useFlow","WireInstructions","ensureRequired","ConfirmWireDetailsFormContextual","jsx","ConfirmWireDetailsForm"],"mappings":";;;;;AAWO,SAASA,IAA6B;AAC3C,QAAM,EAAE,WAAAC,GAAW,UAAAC,GAAU,SAAAC,EAAA,IAAYC,EAAA;AAEzC,2BACGC,GAAA,EAAiB,WAAWC,EAAeL,CAAS,GAAG,UAAAC,GAAoB,SAAAC,GAAkB;AAElG;AAEO,SAASI,IAAmC;AACjD,QAAM,EAAE,WAAAN,GAAW,UAAAC,GAAU,SAAAC,EAAA,IAAYC,EAAA;AAEzC,SACE,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWH,EAAeL,CAAS;AAAA,MACnC,UAAAC;AAAA,MACA,SAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseComponentInterface } from '../../../Base';
|
|
2
|
+
import { EventType } from '../../../../shared/constants';
|
|
3
|
+
import { OnEventType } from '../../../Base/useBase';
|
|
4
|
+
interface ConfirmWireDetailsFormProps extends BaseComponentInterface<'Payroll.ConfirmWireDetailsForm'> {
|
|
5
|
+
companyId: string;
|
|
6
|
+
wireInId?: string;
|
|
7
|
+
onEvent: OnEventType<EventType, unknown>;
|
|
8
|
+
}
|
|
9
|
+
export declare function ConfirmWireDetailsForm(props: ConfirmWireDetailsFormProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as r, jsxs as e } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as f } from "react-i18next";
|
|
3
|
+
import { BaseComponent as d } from "../../../Base/Base.js";
|
|
4
|
+
import "../../../Base/useBase.js";
|
|
5
|
+
import { useComponentContext as C } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
|
+
import { useComponentDictionary as p, useI18n as u } from "../../../../i18n/I18n.js";
|
|
7
|
+
import { Flex as l } from "../../../Common/Flex/Flex.js";
|
|
8
|
+
import { payrollWireEvents as m } from "../../../../shared/constants.js";
|
|
9
|
+
function O(o) {
|
|
10
|
+
return /* @__PURE__ */ r(d, { ...o, children: /* @__PURE__ */ r(h, { ...o, children: o.children }) });
|
|
11
|
+
}
|
|
12
|
+
const h = ({ companyId: o, wireInId: y, dictionary: a, onEvent: i }) => {
|
|
13
|
+
p("Payroll.ConfirmWireDetailsForm", a), u("Payroll.ConfirmWireDetailsForm");
|
|
14
|
+
const { t: n } = f("Payroll.ConfirmWireDetailsForm"), { Button: t } = C(), c = () => {
|
|
15
|
+
i(m.PAYROLL_WIRE_FORM_DONE);
|
|
16
|
+
}, s = () => {
|
|
17
|
+
i(m.PAYROLL_WIRE_FORM_CANCEL);
|
|
18
|
+
};
|
|
19
|
+
return /* @__PURE__ */ e(l, { flexDirection: "column", gap: 24, children: [
|
|
20
|
+
/* @__PURE__ */ r("h2", { children: n("title") }),
|
|
21
|
+
/* @__PURE__ */ e(l, { gap: 12, justifyContent: "flex-end", children: [
|
|
22
|
+
/* @__PURE__ */ r(t, { variant: "secondary", onClick: s, children: n("cta.cancel") }),
|
|
23
|
+
/* @__PURE__ */ r(t, { variant: "primary", onClick: c, children: n("cta.submit") })
|
|
24
|
+
] })
|
|
25
|
+
] });
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
O as ConfirmWireDetailsForm
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=ConfirmWireDetailsForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfirmWireDetailsForm.js","sources":["../../../../../src/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { payrollWireEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\n\ninterface ConfirmWireDetailsFormProps\n extends BaseComponentInterface<'Payroll.ConfirmWireDetailsForm'> {\n companyId: string\n wireInId?: string\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function ConfirmWireDetailsForm(props: ConfirmWireDetailsFormProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, wireInId, dictionary, onEvent }: ConfirmWireDetailsFormProps) => {\n useComponentDictionary('Payroll.ConfirmWireDetailsForm', dictionary)\n useI18n('Payroll.ConfirmWireDetailsForm')\n const { t } = useTranslation('Payroll.ConfirmWireDetailsForm')\n const { Button } = useComponentContext()\n\n const handleSubmit = () => {\n onEvent(payrollWireEvents.PAYROLL_WIRE_FORM_DONE)\n }\n\n const handleCancel = () => {\n onEvent(payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL)\n }\n\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <h2>{t('title')}</h2>\n\n {/* TODO: Form fields will be implemented in subsequent ticket */}\n\n <Flex gap={12} justifyContent=\"flex-end\">\n <Button variant=\"secondary\" onClick={handleCancel}>\n {t('cta.cancel')}\n </Button>\n <Button variant=\"primary\" onClick={handleSubmit}>\n {t('cta.submit')}\n </Button>\n </Flex>\n </Flex>\n )\n}\n"],"names":["ConfirmWireDetailsForm","props","jsx","BaseComponent","Root","companyId","wireInId","dictionary","onEvent","useComponentDictionary","useI18n","t","useTranslation","Button","useComponentContext","handleSubmit","payrollWireEvents","handleCancel","jsxs","Flex"],"mappings":";;;;;;;;AAeO,SAASA,EAAuBC,GAAoC;AACzE,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMG,IAAO,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,YAAAC,GAAY,SAAAC,QAA2C;AAC1F,EAAAC,EAAuB,kCAAkCF,CAAU,GACnEG,EAAQ,gCAAgC;AACxC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,gCAAgC,GACvD,EAAE,QAAAC,EAAA,IAAWC,EAAA,GAEbC,IAAe,MAAM;AACzB,IAAAP,EAAQQ,EAAkB,sBAAsB;AAAA,EAClD,GAEMC,IAAe,MAAM;AACzB,IAAAT,EAAQQ,EAAkB,wBAAwB;AAAA,EACpD;AAEA,SACE,gBAAAE,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAjB,EAAC,MAAA,EAAI,UAAAS,EAAE,OAAO,EAAA,CAAE;AAAA,IAIhB,gBAAAO,EAACC,GAAA,EAAK,KAAK,IAAI,gBAAe,YAC5B,UAAA;AAAA,MAAA,gBAAAjB,EAACW,KAAO,SAAQ,aAAY,SAASI,GAClC,UAAAN,EAAE,YAAY,GACjB;AAAA,MACA,gBAAAT,EAACW,KAAO,SAAQ,WAAU,SAASE,GAChC,UAAAJ,EAAE,YAAY,EAAA,CACjB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseComponentInterface } from '../../../Base';
|
|
2
|
+
import { EventType } from '../../../../shared/constants';
|
|
3
|
+
import { OnEventType } from '../../../Base/useBase';
|
|
4
|
+
interface WireInstructionsProps extends BaseComponentInterface<'Payroll.WireInstructions'> {
|
|
5
|
+
companyId: string;
|
|
6
|
+
wireInId?: string;
|
|
7
|
+
onEvent: OnEventType<EventType, unknown>;
|
|
8
|
+
}
|
|
9
|
+
export declare function WireInstructions(props: WireInstructionsProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as n, jsxs as e } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as d } from "react-i18next";
|
|
3
|
+
import { BaseComponent as u } from "../../../Base/Base.js";
|
|
4
|
+
import "../../../Base/useBase.js";
|
|
5
|
+
import { useComponentContext as I } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
|
+
import { useComponentDictionary as f, useI18n as p } from "../../../../i18n/I18n.js";
|
|
7
|
+
import { Flex as c } from "../../../Common/Flex/Flex.js";
|
|
8
|
+
import { payrollWireEvents as l } from "../../../../shared/constants.js";
|
|
9
|
+
function P(o) {
|
|
10
|
+
return /* @__PURE__ */ n(u, { ...o, children: /* @__PURE__ */ n(C, { ...o, children: o.children }) });
|
|
11
|
+
}
|
|
12
|
+
const C = ({ companyId: o, wireInId: h, dictionary: s, onEvent: t }) => {
|
|
13
|
+
f("Payroll.WireInstructions", s), p("Payroll.WireInstructions");
|
|
14
|
+
const { t: r } = d("Payroll.WireInstructions"), { Button: i } = I(), m = () => {
|
|
15
|
+
t(l.PAYROLL_WIRE_INSTRUCTIONS_DONE);
|
|
16
|
+
}, a = () => {
|
|
17
|
+
t(l.PAYROLL_WIRE_INSTRUCTIONS_CANCEL);
|
|
18
|
+
};
|
|
19
|
+
return /* @__PURE__ */ e(c, { flexDirection: "column", gap: 24, children: [
|
|
20
|
+
/* @__PURE__ */ n("h2", { children: r("title") }),
|
|
21
|
+
/* @__PURE__ */ e(c, { gap: 12, justifyContent: "flex-end", children: [
|
|
22
|
+
/* @__PURE__ */ n(i, { variant: "secondary", onClick: a, children: r("cta.close") }),
|
|
23
|
+
/* @__PURE__ */ n(i, { variant: "primary", onClick: m, children: r("cta.confirm") })
|
|
24
|
+
] })
|
|
25
|
+
] });
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
P as WireInstructions
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=WireInstructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WireInstructions.js","sources":["../../../../../src/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { payrollWireEvents, type EventType } from '@/shared/constants'\nimport type { OnEventType } from '@/components/Base/useBase'\n\ninterface WireInstructionsProps extends BaseComponentInterface<'Payroll.WireInstructions'> {\n companyId: string\n wireInId?: string\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport function WireInstructions(props: WireInstructionsProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nconst Root = ({ companyId, wireInId, dictionary, onEvent }: WireInstructionsProps) => {\n useComponentDictionary('Payroll.WireInstructions', dictionary)\n useI18n('Payroll.WireInstructions')\n const { t } = useTranslation('Payroll.WireInstructions')\n const { Button } = useComponentContext()\n\n const handleConfirm = () => {\n onEvent(payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_DONE)\n }\n\n const handleClose = () => {\n onEvent(payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_CANCEL)\n }\n\n return (\n <Flex flexDirection=\"column\" gap={24}>\n <h2>{t('title')}</h2>\n\n {/* TODO: Wire instructions content will be implemented in subsequent ticket */}\n\n <Flex gap={12} justifyContent=\"flex-end\">\n <Button variant=\"secondary\" onClick={handleClose}>\n {t('cta.close')}\n </Button>\n <Button variant=\"primary\" onClick={handleConfirm}>\n {t('cta.confirm')}\n </Button>\n </Flex>\n </Flex>\n )\n}\n"],"names":["WireInstructions","props","jsx","BaseComponent","Root","companyId","wireInId","dictionary","onEvent","useComponentDictionary","useI18n","t","useTranslation","Button","useComponentContext","handleConfirm","payrollWireEvents","handleClose","jsxs","Flex"],"mappings":";;;;;;;;AAcO,SAASA,EAAiBC,GAA8B;AAC7D,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AAEA,MAAMG,IAAO,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,YAAAC,GAAY,SAAAC,QAAqC;AACpF,EAAAC,EAAuB,4BAA4BF,CAAU,GAC7DG,EAAQ,0BAA0B;AAClC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,0BAA0B,GACjD,EAAE,QAAAC,EAAA,IAAWC,EAAA,GAEbC,IAAgB,MAAM;AAC1B,IAAAP,EAAQQ,EAAkB,8BAA8B;AAAA,EAC1D,GAEMC,IAAc,MAAM;AACxB,IAAAT,EAAQQ,EAAkB,gCAAgC;AAAA,EAC5D;AAEA,SACE,gBAAAE,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAjB,EAAC,MAAA,EAAI,UAAAS,EAAE,OAAO,EAAA,CAAE;AAAA,IAIhB,gBAAAO,EAACC,GAAA,EAAK,KAAK,IAAI,gBAAe,YAC5B,UAAA;AAAA,MAAA,gBAAAjB,EAACW,KAAO,SAAQ,aAAY,SAASI,GAClC,UAAAN,EAAE,WAAW,GAChB;AAAA,MACA,gBAAAT,EAACW,KAAO,SAAQ,WAAU,SAASE,GAChC,UAAAJ,EAAE,aAAa,EAAA,CAClB;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { payrollWireEvents } from '../../../shared/constants';
|
|
2
|
+
export type EventPayloads = {
|
|
3
|
+
[payrollWireEvents.PAYROLL_WIRE_START_TRANSFER]: undefined;
|
|
4
|
+
[payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_DONE]: undefined;
|
|
5
|
+
[payrollWireEvents.PAYROLL_WIRE_FORM_DONE]: undefined;
|
|
6
|
+
[payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL]: undefined;
|
|
7
|
+
};
|
|
8
|
+
export declare const confirmWireDetailsMachine: {
|
|
9
|
+
banner: import('robot3').MachineState<any>;
|
|
10
|
+
wireInstructions: import('robot3').MachineState<any>;
|
|
11
|
+
confirmForm: import('robot3').MachineState<any>;
|
|
12
|
+
final: import('robot3').MachineState<any>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { state as e, transition as r, reduce as o } from "robot3";
|
|
2
|
+
import { ConfirmWireDetailsFormContextual as i, WireInstructionsContextual as R } from "./ConfirmWireDetailsComponents.js";
|
|
3
|
+
import { payrollWireEvents as t } from "../../../shared/constants.js";
|
|
4
|
+
const s = {
|
|
5
|
+
banner: e(
|
|
6
|
+
r(
|
|
7
|
+
t.PAYROLL_WIRE_START_TRANSFER,
|
|
8
|
+
"wireInstructions",
|
|
9
|
+
o(
|
|
10
|
+
(n) => ({
|
|
11
|
+
...n,
|
|
12
|
+
component: R
|
|
13
|
+
})
|
|
14
|
+
)
|
|
15
|
+
)
|
|
16
|
+
),
|
|
17
|
+
wireInstructions: e(
|
|
18
|
+
r(
|
|
19
|
+
t.PAYROLL_WIRE_INSTRUCTIONS_DONE,
|
|
20
|
+
"confirmForm",
|
|
21
|
+
o(
|
|
22
|
+
(n) => ({
|
|
23
|
+
...n,
|
|
24
|
+
component: i
|
|
25
|
+
})
|
|
26
|
+
)
|
|
27
|
+
),
|
|
28
|
+
r(
|
|
29
|
+
t.PAYROLL_WIRE_FORM_CANCEL,
|
|
30
|
+
"banner",
|
|
31
|
+
o(
|
|
32
|
+
(n) => ({
|
|
33
|
+
...n
|
|
34
|
+
})
|
|
35
|
+
)
|
|
36
|
+
)
|
|
37
|
+
),
|
|
38
|
+
confirmForm: e(
|
|
39
|
+
r(
|
|
40
|
+
t.PAYROLL_WIRE_FORM_DONE,
|
|
41
|
+
"banner",
|
|
42
|
+
o(
|
|
43
|
+
(n) => ({
|
|
44
|
+
...n
|
|
45
|
+
})
|
|
46
|
+
)
|
|
47
|
+
),
|
|
48
|
+
r(
|
|
49
|
+
t.PAYROLL_WIRE_FORM_CANCEL,
|
|
50
|
+
"banner",
|
|
51
|
+
o(
|
|
52
|
+
(n) => ({
|
|
53
|
+
...n
|
|
54
|
+
})
|
|
55
|
+
)
|
|
56
|
+
)
|
|
57
|
+
),
|
|
58
|
+
final: e()
|
|
59
|
+
};
|
|
60
|
+
export {
|
|
61
|
+
s as confirmWireDetailsMachine
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=confirmWireDetailsStateMachine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirmWireDetailsStateMachine.js","sources":["../../../../src/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.tsx"],"sourcesContent":["import { state, transition, reduce } from 'robot3'\nimport type { ConfirmWireDetailsContextInterface } from './ConfirmWireDetailsComponents'\nimport {\n WireInstructionsContextual,\n ConfirmWireDetailsFormContextual,\n} from './ConfirmWireDetailsComponents'\nimport { payrollWireEvents } from '@/shared/constants'\nimport type { MachineTransition } from '@/types/Helpers'\n\nexport type EventPayloads = {\n [payrollWireEvents.PAYROLL_WIRE_START_TRANSFER]: undefined\n [payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_DONE]: undefined\n [payrollWireEvents.PAYROLL_WIRE_FORM_DONE]: undefined\n [payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL]: undefined\n}\n\nexport const confirmWireDetailsMachine = {\n banner: state<MachineTransition>(\n transition(\n payrollWireEvents.PAYROLL_WIRE_START_TRANSFER,\n 'wireInstructions',\n reduce(\n (ctx: ConfirmWireDetailsContextInterface): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n component: WireInstructionsContextual,\n }),\n ),\n ),\n ),\n wireInstructions: state<MachineTransition>(\n transition(\n payrollWireEvents.PAYROLL_WIRE_INSTRUCTIONS_DONE,\n 'confirmForm',\n reduce(\n (ctx: ConfirmWireDetailsContextInterface): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n component: ConfirmWireDetailsFormContextual,\n }),\n ),\n ),\n transition(\n payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL,\n 'banner',\n reduce(\n (ctx: ConfirmWireDetailsContextInterface): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n }),\n ),\n ),\n ),\n confirmForm: state<MachineTransition>(\n transition(\n payrollWireEvents.PAYROLL_WIRE_FORM_DONE,\n 'banner',\n reduce(\n (ctx: ConfirmWireDetailsContextInterface): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n }),\n ),\n ),\n transition(\n payrollWireEvents.PAYROLL_WIRE_FORM_CANCEL,\n 'banner',\n reduce(\n (ctx: ConfirmWireDetailsContextInterface): ConfirmWireDetailsContextInterface => ({\n ...ctx,\n }),\n ),\n ),\n ),\n final: state<MachineTransition>(),\n}\n"],"names":["confirmWireDetailsMachine","state","transition","payrollWireEvents","reduce","ctx","WireInstructionsContextual","ConfirmWireDetailsFormContextual"],"mappings":";;;AAgBO,MAAMA,IAA4B;AAAA,EACvC,QAAQC;AAAA,IACNC;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC;AAAA,QACE,CAACC,OAAiF;AAAA,UAChF,GAAGA;AAAA,UACH,WAAWC;AAAA,QAAA;AAAA,MACb;AAAA,IACF;AAAA,EACF;AAAA,EAEF,kBAAkBL;AAAA,IAChBC;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC;AAAA,QACE,CAACC,OAAiF;AAAA,UAChF,GAAGA;AAAA,UACH,WAAWE;AAAA,QAAA;AAAA,MACb;AAAA,IACF;AAAA,IAEFL;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC;AAAA,QACE,CAACC,OAAiF;AAAA,UAChF,GAAGA;AAAA,QAAA;AAAA,MACL;AAAA,IACF;AAAA,EACF;AAAA,EAEF,aAAaJ;AAAA,IACXC;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC;AAAA,QACE,CAACC,OAAiF;AAAA,UAChF,GAAGA;AAAA,QAAA;AAAA,MACL;AAAA,IACF;AAAA,IAEFH;AAAA,MACEC,EAAkB;AAAA,MAClB;AAAA,MACAC;AAAA,QACE,CAACC,OAAiF;AAAA,UAChF,GAAGA;AAAA,QAAA;AAAA,MACL;AAAA,IACF;AAAA,EACF;AAAA,EAEF,OAAOJ,EAAA;AACT;"}
|
|
@@ -3,25 +3,23 @@ import { useTranslation as P } from "react-i18next";
|
|
|
3
3
|
import { getBlockerTranslationKeys as v } from "../payrollHelpers.js";
|
|
4
4
|
import { useComponentContext as A } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
5
5
|
import { Flex as m } from "../../../Common/Flex/Flex.js";
|
|
6
|
-
import "classnames";
|
|
7
|
-
import "../../../../shared/constants.js";
|
|
8
6
|
import { useI18n as C } from "../../../../i18n/I18n.js";
|
|
9
|
-
function
|
|
10
|
-
blockers:
|
|
7
|
+
function w({
|
|
8
|
+
blockers: n,
|
|
11
9
|
onMultipleViewClick: i,
|
|
12
10
|
multipleViewLabel: h,
|
|
13
11
|
className: s
|
|
14
12
|
}) {
|
|
15
13
|
C("Payroll.PayrollBlocker");
|
|
16
14
|
const { t: e } = P("Payroll.PayrollBlocker"), { Alert: a, Button: f, Text: c, UnorderedList: x } = A();
|
|
17
|
-
if (
|
|
15
|
+
if (n.length === 0)
|
|
18
16
|
return null;
|
|
19
|
-
const y =
|
|
20
|
-
const
|
|
17
|
+
const y = n.length > 1, p = n.map((r) => {
|
|
18
|
+
const o = v(r.key), B = e(o.titleKey, {
|
|
21
19
|
defaultValue: r.key.replace(/_/g, " ").replace(/\b\w/g, (K) => K.toUpperCase())
|
|
22
|
-
}), T = e(
|
|
20
|
+
}), T = e(o.descriptionKey, {
|
|
23
21
|
defaultValue: r.message || e("defaultBlockerDescription")
|
|
24
|
-
}), k = e(
|
|
22
|
+
}), k = e(o.helpTextKey, { defaultValue: e("defaultBlockerHelp") });
|
|
25
23
|
return {
|
|
26
24
|
...r,
|
|
27
25
|
title: B,
|
|
@@ -39,7 +37,7 @@ function F({
|
|
|
39
37
|
a,
|
|
40
38
|
{
|
|
41
39
|
status: "error",
|
|
42
|
-
label: e("multipleIssuesTitle", { count:
|
|
40
|
+
label: e("multipleIssuesTitle", { count: n.length }),
|
|
43
41
|
className: s,
|
|
44
42
|
children: /* @__PURE__ */ d(m, { flexDirection: "column", gap: 16, children: [
|
|
45
43
|
/* @__PURE__ */ l(x, { items: g }),
|
|
@@ -49,6 +47,6 @@ function F({
|
|
|
49
47
|
);
|
|
50
48
|
}
|
|
51
49
|
export {
|
|
52
|
-
|
|
50
|
+
w as PayrollBlockerAlerts
|
|
53
51
|
};
|
|
54
52
|
//# sourceMappingURL=PayrollBlockerAlerts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayrollBlockerAlerts.js","sources":["../../../../../src/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { type ApiPayrollBlocker, getBlockerTranslationKeys } from '../payrollHelpers'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Flex } from '@/components/Common'\nimport { useI18n } from '@/i18n'\n\ninterface PayrollBlockerAlertsProps {\n blockers: ApiPayrollBlocker[]\n className?: string\n onMultipleViewClick?: () => void\n multipleViewLabel?: string\n}\n\n/**\n * PayrollBlockerAlerts - Alert-style component for inline blocker display\n * Shows single blocker as alert, or multiple blockers as summary with \"Review\" button\n * Returns null for empty blocker arrays\n */\nexport function PayrollBlockerAlerts({\n blockers,\n onMultipleViewClick,\n multipleViewLabel,\n className,\n}: PayrollBlockerAlertsProps) {\n useI18n('Payroll.PayrollBlocker')\n const { t } = useTranslation('Payroll.PayrollBlocker')\n const { Alert, Button, Text, UnorderedList } = useComponentContext()\n\n // Return null for empty blockers array\n if (blockers.length === 0) {\n return null\n }\n\n const hasMultipleBlockers = blockers.length > 1\n\n const enrichedBlockers = blockers.map(blocker => {\n const translationKeys = getBlockerTranslationKeys(blocker.key)\n\n const title = t(translationKeys.titleKey, {\n defaultValue: blocker.key.replace(/_/g, ' ').replace(/\\b\\w/g, l => l.toUpperCase()),\n })\n const description = t(translationKeys.descriptionKey, {\n defaultValue: blocker.message || t('defaultBlockerDescription'),\n })\n const helpText = t(translationKeys.helpTextKey, { defaultValue: t('
|
|
1
|
+
{"version":3,"file":"PayrollBlockerAlerts.js","sources":["../../../../../src/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { type ApiPayrollBlocker, getBlockerTranslationKeys } from '../payrollHelpers'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Flex } from '@/components/Common'\nimport { useI18n } from '@/i18n'\n\ninterface PayrollBlockerAlertsProps {\n blockers: ApiPayrollBlocker[]\n className?: string\n onMultipleViewClick?: () => void\n multipleViewLabel?: string\n}\n\n/**\n * PayrollBlockerAlerts - Alert-style component for inline blocker display\n * Shows single blocker as alert, or multiple blockers as summary with \"Review\" button\n * Returns null for empty blocker arrays\n */\nexport function PayrollBlockerAlerts({\n blockers,\n onMultipleViewClick,\n multipleViewLabel,\n className,\n}: PayrollBlockerAlertsProps) {\n useI18n('Payroll.PayrollBlocker')\n const { t } = useTranslation('Payroll.PayrollBlocker')\n const { Alert, Button, Text, UnorderedList } = useComponentContext()\n\n // Return null for empty blockers array\n if (blockers.length === 0) {\n return null\n }\n\n const hasMultipleBlockers = blockers.length > 1\n\n const enrichedBlockers = blockers.map(blocker => {\n const translationKeys = getBlockerTranslationKeys(blocker.key)\n\n const title = t(translationKeys.titleKey, {\n defaultValue: blocker.key.replace(/_/g, ' ').replace(/\\b\\w/g, l => l.toUpperCase()),\n })\n const description = t(translationKeys.descriptionKey, {\n defaultValue: blocker.message || t('defaultBlockerDescription'),\n })\n const helpText = t(translationKeys.helpTextKey, { defaultValue: t('defaultBlockerHelp') })\n\n return {\n ...blocker,\n title,\n description,\n helpText,\n }\n })\n\n const singleBlocker = enrichedBlockers[0]\n\n if (!hasMultipleBlockers && singleBlocker) {\n return (\n <Alert status=\"error\" label={singleBlocker.title} className={className}>\n <Flex flexDirection=\"column\" gap={8}>\n <Text>{singleBlocker.description}</Text>\n {singleBlocker.helpText && singleBlocker.helpText !== singleBlocker.description && (\n <Text variant=\"supporting\" size=\"sm\">\n {singleBlocker.helpText}\n </Text>\n )}\n </Flex>\n </Alert>\n )\n }\n\n const listItems = enrichedBlockers.map(blocker => blocker.title)\n const defaultMultipleLabel = multipleViewLabel || t('viewAllBlockers')\n\n return (\n <Alert\n status=\"error\"\n label={t('multipleIssuesTitle', { count: blockers.length })}\n className={className}\n >\n <Flex flexDirection=\"column\" gap={16}>\n <UnorderedList items={listItems} />\n {onMultipleViewClick && (\n <div>\n <Button variant=\"secondary\" onClick={onMultipleViewClick} title={defaultMultipleLabel}>\n {defaultMultipleLabel}\n </Button>\n </div>\n )}\n </Flex>\n </Alert>\n )\n}\n"],"names":["PayrollBlockerAlerts","blockers","onMultipleViewClick","multipleViewLabel","className","useI18n","t","useTranslation","Alert","Button","Text","UnorderedList","useComponentContext","hasMultipleBlockers","enrichedBlockers","blocker","translationKeys","getBlockerTranslationKeys","title","l","description","helpText","singleBlocker","jsx","jsxs","Flex","listItems","defaultMultipleLabel"],"mappings":";;;;;;AAkBO,SAASA,EAAqB;AAAA,EACnC,UAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,WAAAC;AACF,GAA8B;AAC5B,EAAAC,EAAQ,wBAAwB;AAChC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAC/C,EAAE,OAAAC,GAAO,QAAAC,GAAQ,MAAAC,GAAM,eAAAC,EAAA,IAAkBC,EAAA;AAG/C,MAAIX,EAAS,WAAW;AACtB,WAAO;AAGT,QAAMY,IAAsBZ,EAAS,SAAS,GAExCa,IAAmBb,EAAS,IAAI,CAAAc,MAAW;AAC/C,UAAMC,IAAkBC,EAA0BF,EAAQ,GAAG,GAEvDG,IAAQZ,EAAEU,EAAgB,UAAU;AAAA,MACxC,cAAcD,EAAQ,IAAI,QAAQ,MAAM,GAAG,EAAE,QAAQ,SAAS,CAAAI,MAAKA,EAAE,YAAA,CAAa;AAAA,IAAA,CACnF,GACKC,IAAcd,EAAEU,EAAgB,gBAAgB;AAAA,MACpD,cAAcD,EAAQ,WAAWT,EAAE,2BAA2B;AAAA,IAAA,CAC/D,GACKe,IAAWf,EAAEU,EAAgB,aAAa,EAAE,cAAcV,EAAE,oBAAoB,GAAG;AAEzF,WAAO;AAAA,MACL,GAAGS;AAAA,MACH,OAAAG;AAAA,MACA,aAAAE;AAAA,MACA,UAAAC;AAAA,IAAA;AAAA,EAEJ,CAAC,GAEKC,IAAgBR,EAAiB,CAAC;AAExC,MAAI,CAACD,KAAuBS;AAC1B,WACE,gBAAAC,EAACf,GAAA,EAAM,QAAO,SAAQ,OAAOc,EAAc,OAAO,WAAAlB,GAChD,UAAA,gBAAAoB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAF,EAACb,GAAA,EAAM,YAAc,YAAA,CAAY;AAAA,MAChCY,EAAc,YAAYA,EAAc,aAAaA,EAAc,eAClE,gBAAAC,EAACb,GAAA,EAAK,SAAQ,cAAa,MAAK,MAC7B,YAAc,SAAA,CACjB;AAAA,IAAA,EAAA,CAEJ,EAAA,CACF;AAIJ,QAAMgB,IAAYZ,EAAiB,IAAI,CAAAC,MAAWA,EAAQ,KAAK,GACzDY,IAAuBxB,KAAqBG,EAAE,iBAAiB;AAErE,SACE,gBAAAiB;AAAA,IAACf;AAAA,IAAA;AAAA,MACC,QAAO;AAAA,MACP,OAAOF,EAAE,uBAAuB,EAAE,OAAOL,EAAS,QAAQ;AAAA,MAC1D,WAAAG;AAAA,MAEA,UAAA,gBAAAoB,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,QAAA,gBAAAF,EAACZ,GAAA,EAAc,OAAOe,EAAA,CAAW;AAAA,QAChCxB,KACC,gBAAAqB,EAAC,OAAA,EACC,UAAA,gBAAAA,EAACd,GAAA,EAAO,SAAQ,aAAY,SAASP,GAAqB,OAAOyB,GAC9D,UAAAA,EAAA,CACH,EAAA,CACF;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import
|
|
2
|
+
import { useTranslation as f } from "react-i18next";
|
|
3
|
+
import p from "classnames";
|
|
4
4
|
import u from "./PayrollBlockerList.module.scss.js";
|
|
5
5
|
import { useComponentContext as h } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
6
|
import { FlexItem as x, Flex as o } from "../../../Common/Flex/Flex.js";
|
|
7
|
-
import "../../../../shared/constants.js";
|
|
8
7
|
import { DataView as y } from "../../../Common/DataView/DataView.js";
|
|
9
8
|
import { useDataView as g } from "../../../Common/DataView/useDataView.js";
|
|
10
9
|
import { useI18n as b } from "../../../../i18n/I18n.js";
|
|
11
|
-
function
|
|
10
|
+
function v({ blockers: i, className: s }) {
|
|
12
11
|
b("Payroll.PayrollBlocker");
|
|
13
|
-
const { t: l } =
|
|
12
|
+
const { t: l } = f("Payroll.PayrollBlocker"), { Button: c, Text: n, Heading: m } = h(), d = g({
|
|
14
13
|
data: i,
|
|
15
14
|
columns: [
|
|
16
15
|
{
|
|
@@ -29,12 +28,12 @@ function I({ blockers: i, className: s }) {
|
|
|
29
28
|
}
|
|
30
29
|
]
|
|
31
30
|
});
|
|
32
|
-
return i.length === 0 ? null : /* @__PURE__ */ e("div", { className:
|
|
31
|
+
return i.length === 0 ? null : /* @__PURE__ */ e("div", { className: p(u.root, s), children: /* @__PURE__ */ a(o, { flexDirection: "column", gap: 24, children: [
|
|
33
32
|
/* @__PURE__ */ e(m, { as: "h2", styledAs: "h4", children: l("blockersListTitle") }),
|
|
34
33
|
/* @__PURE__ */ e(y, { ...d, label: l("blockersListTitle") })
|
|
35
34
|
] }) });
|
|
36
35
|
}
|
|
37
36
|
export {
|
|
38
|
-
|
|
37
|
+
v as PayrollBlockerList
|
|
39
38
|
};
|
|
40
39
|
//# sourceMappingURL=PayrollBlockerList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayrollBlockerList.js","sources":["../../../../../src/components/Payroll/PayrollBlocker/components/PayrollBlockerList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport styles from './PayrollBlockerList.module.scss'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Flex, FlexItem } from '@/components/Common'\nimport { DataView } from '@/components/Common/DataView/DataView'\nimport { useDataView } from '@/components/Common/DataView/useDataView'\nimport { useI18n } from '@/i18n'\n\nexport interface PayrollBlocker {\n id: string\n title: string\n description: string\n action?: {\n label: string\n onClick: () => void\n }\n}\n\ninterface PayrollBlockerListProps {\n blockers: PayrollBlocker[]\n className?: string\n}\n\n/**\n * PayrollBlockerList - DataView-based component displaying payroll blockers\n * Shows each blocker with individual resolution buttons\n */\nexport function PayrollBlockerList({ blockers, className }: PayrollBlockerListProps) {\n useI18n('Payroll.PayrollBlocker')\n const { t } = useTranslation('Payroll.PayrollBlocker')\n const { Button, Text, Heading } = useComponentContext()\n\n const dataViewProps = useDataView({\n data: blockers,\n columns: [\n {\n title: t('blockerSectionLabel'),\n render: blocker => (\n <FlexItem flexGrow={1}>\n <Flex flexDirection=\"column\" gap={8}>\n <Text weight=\"semibold\">{blocker.title}</Text>\n <Text variant=\"supporting\">{blocker.description}</Text>\n </Flex>\n </FlexItem>\n ),\n },\n {\n title: '',\n render: blocker => {\n // For presentational purposes, just show the primary action if it exists\n const action = blocker.action\n\n if (!action) {\n return null\n }\n\n return (\n <Flex justifyContent=\"flex-end\" alignItems=\"center\">\n <Button variant=\"secondary\" onClick={action.onClick} title={action.label}>\n {action.label}\n </Button>\n </Flex>\n )\n },\n },\n ],\n })\n\n if (blockers.length === 0) {\n return null\n }\n\n return (\n <div className={classNames(styles.root, className)}>\n <Flex flexDirection=\"column\" gap={24}>\n <Heading as=\"h2\" styledAs=\"h4\">\n {t('blockersListTitle')}\n </Heading>\n\n <DataView {...dataViewProps} label={t('blockersListTitle')} />\n </Flex>\n </div>\n )\n}\n"],"names":["PayrollBlockerList","blockers","className","useI18n","t","useTranslation","Button","Text","Heading","useComponentContext","dataViewProps","useDataView","blocker","jsx","FlexItem","jsxs","Flex","action","classNames","styles","DataView"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PayrollBlockerList.js","sources":["../../../../../src/components/Payroll/PayrollBlocker/components/PayrollBlockerList.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport styles from './PayrollBlockerList.module.scss'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { Flex, FlexItem } from '@/components/Common'\nimport { DataView } from '@/components/Common/DataView/DataView'\nimport { useDataView } from '@/components/Common/DataView/useDataView'\nimport { useI18n } from '@/i18n'\n\nexport interface PayrollBlocker {\n id: string\n title: string\n description: string\n action?: {\n label: string\n onClick: () => void\n }\n}\n\ninterface PayrollBlockerListProps {\n blockers: PayrollBlocker[]\n className?: string\n}\n\n/**\n * PayrollBlockerList - DataView-based component displaying payroll blockers\n * Shows each blocker with individual resolution buttons\n */\nexport function PayrollBlockerList({ blockers, className }: PayrollBlockerListProps) {\n useI18n('Payroll.PayrollBlocker')\n const { t } = useTranslation('Payroll.PayrollBlocker')\n const { Button, Text, Heading } = useComponentContext()\n\n const dataViewProps = useDataView({\n data: blockers,\n columns: [\n {\n title: t('blockerSectionLabel'),\n render: blocker => (\n <FlexItem flexGrow={1}>\n <Flex flexDirection=\"column\" gap={8}>\n <Text weight=\"semibold\">{blocker.title}</Text>\n <Text variant=\"supporting\">{blocker.description}</Text>\n </Flex>\n </FlexItem>\n ),\n },\n {\n title: '',\n render: blocker => {\n // For presentational purposes, just show the primary action if it exists\n const action = blocker.action\n\n if (!action) {\n return null\n }\n\n return (\n <Flex justifyContent=\"flex-end\" alignItems=\"center\">\n <Button variant=\"secondary\" onClick={action.onClick} title={action.label}>\n {action.label}\n </Button>\n </Flex>\n )\n },\n },\n ],\n })\n\n if (blockers.length === 0) {\n return null\n }\n\n return (\n <div className={classNames(styles.root, className)}>\n <Flex flexDirection=\"column\" gap={24}>\n <Heading as=\"h2\" styledAs=\"h4\">\n {t('blockersListTitle')}\n </Heading>\n\n <DataView {...dataViewProps} label={t('blockersListTitle')} />\n </Flex>\n </div>\n )\n}\n"],"names":["PayrollBlockerList","blockers","className","useI18n","t","useTranslation","Button","Text","Heading","useComponentContext","dataViewProps","useDataView","blocker","jsx","FlexItem","jsxs","Flex","action","classNames","styles","DataView"],"mappings":";;;;;;;;;AA4BO,SAASA,EAAmB,EAAE,UAAAC,GAAU,WAAAC,KAAsC;AACnF,EAAAC,EAAQ,wBAAwB;AAChC,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,wBAAwB,GAC/C,EAAE,QAAAC,GAAQ,MAAAC,GAAM,SAAAC,EAAA,IAAYC,EAAA,GAE5BC,IAAgBC,EAAY;AAAA,IAChC,MAAMV;AAAA,IACN,SAAS;AAAA,MACP;AAAA,QACE,OAAOG,EAAE,qBAAqB;AAAA,QAC9B,QAAQ,CAAAQ,MACN,gBAAAC,EAACC,GAAA,EAAS,UAAU,GAClB,UAAA,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,UAAA,gBAAAH,EAACN,GAAA,EAAK,QAAO,YAAY,UAAAK,EAAQ,OAAM;AAAA,UACvC,gBAAAC,EAACN,GAAA,EAAK,SAAQ,cAAc,YAAQ,YAAA,CAAY;AAAA,QAAA,EAAA,CAClD,EAAA,CACF;AAAA,MAAA;AAAA,MAGJ;AAAA,QACE,OAAO;AAAA,QACP,QAAQ,CAAAK,MAAW;AAEjB,gBAAMK,IAASL,EAAQ;AAEvB,iBAAKK,sBAKFD,GAAA,EAAK,gBAAe,YAAW,YAAW,UACzC,4BAACV,GAAA,EAAO,SAAQ,aAAY,SAASW,EAAO,SAAS,OAAOA,EAAO,OAChE,UAAAA,EAAO,OACV,EAAA,CACF,IARO;AAAA,QAUX;AAAA,MAAA;AAAA,IACF;AAAA,EACF,CACD;AAED,SAAIhB,EAAS,WAAW,IACf,OAIP,gBAAAY,EAAC,OAAA,EAAI,WAAWK,EAAWC,EAAO,MAAMjB,CAAS,GAC/C,UAAA,gBAAAa,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAH,EAACL,KAAQ,IAAG,MAAK,UAAS,MACvB,UAAAJ,EAAE,mBAAmB,GACxB;AAAA,sBAECgB,GAAA,EAAU,GAAGV,GAAe,OAAON,EAAE,mBAAmB,EAAA,CAAG;AAAA,EAAA,EAAA,CAC9D,EAAA,CACF;AAEJ;"}
|
|
@@ -25,7 +25,7 @@ function b(r) {
|
|
|
25
25
|
return {
|
|
26
26
|
titleKey: `PayrollBlocker:blockers.${r}.title`,
|
|
27
27
|
descriptionKey: `PayrollBlocker:blockers.${r}.description`,
|
|
28
|
-
helpTextKey: `PayrollBlocker:blockers.${r}.
|
|
28
|
+
helpTextKey: `PayrollBlocker:blockers.${r}.help`,
|
|
29
29
|
defaultActionKey: `PayrollBlocker:blockers.${r}.defaultAction`
|
|
30
30
|
};
|
|
31
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payrollHelpers.js","sources":["../../../../src/components/Payroll/PayrollBlocker/payrollHelpers.ts"],"sourcesContent":["import { PayrollBlockersError } from '@gusto/embedded-api/models/errors/payrollblockerserror'\nimport { UnprocessableEntityErrorObject1 } from '@gusto/embedded-api/models/errors/unprocessableentityerrorobject1'\n\nfunction hasMetadataKey(metadata: unknown): metadata is { key: string } {\n return (\n typeof metadata === 'object' &&\n metadata !== null &&\n 'key' in metadata &&\n typeof (metadata as { key: unknown }).key === 'string'\n )\n}\n\nexport interface ApiPayrollBlocker {\n key: string\n message?: string\n}\n\nexport function isPayrollBlockersError(error: unknown): error is PayrollBlockersError {\n return error instanceof PayrollBlockersError\n}\n\nexport function isUnprocessableEntityWithPayrollBlockers(\n error: unknown,\n): error is UnprocessableEntityErrorObject1 {\n return (\n error instanceof UnprocessableEntityErrorObject1 &&\n Array.isArray(error.errors) &&\n error.errors.some(err => err.category === 'payroll_blocker')\n )\n}\n\nexport function parsePayrollBlockersFromError(error: unknown): ApiPayrollBlocker[] {\n // Handle PayrollBlockersError (dedicated blocker error type)\n if (isPayrollBlockersError(error)) {\n if (!error.errors || error.errors.length === 0) {\n return []\n }\n\n const blockers = error.errors.map(err => {\n const key = hasMetadataKey(err.metadata) ? err.metadata.key : err.errorKey || 'unknown'\n\n return { key, message: err.message }\n })\n\n return blockers\n }\n\n // Handle UnprocessableEntityErrorObject1 with payroll blockers\n if (isUnprocessableEntityWithPayrollBlockers(error)) {\n const blockers = error.errors\n .filter(err => err.category === 'payroll_blocker')\n .map(err => {\n const key = hasMetadataKey(err.metadata) ? err.metadata.key : err.errorKey || 'unknown'\n\n return { key, message: err.message }\n })\n\n return blockers\n }\n\n return []\n}\n\ntype PayrollBlockerError = PayrollBlockersError | UnprocessableEntityErrorObject1\n\nconst hasPayrollBlockers = (error: unknown): error is PayrollBlockerError => {\n if (error instanceof PayrollBlockersError) {\n return true\n }\n if (error instanceof UnprocessableEntityErrorObject1) {\n return (\n Array.isArray(error.errors) && error.errors.some(err => err.category === 'payroll_blocker')\n )\n }\n return false\n}\n\nexport interface PayrollSubmitResult {\n success: boolean\n blockers: ApiPayrollBlocker[]\n}\n\n/**\n * Direct submit handler for payroll operations that handles payroll blockers\n * Returns blockers if found, otherwise throws the error for caller to handle\n */\nexport const payrollSubmitHandler = async (\n payrollHandler: () => Promise<void>,\n): Promise<PayrollSubmitResult> => {\n try {\n await payrollHandler()\n return { success: true, blockers: [] }\n } catch (error: unknown) {\n if (hasPayrollBlockers(error)) {\n const blockers = parsePayrollBlockersFromError(error)\n return { success: false, blockers }\n }\n\n // For non-payroll errors, re-throw\n throw error\n }\n}\n\n/**\n * Get translation keys for a blocker - use these in components with useTranslation\n */\nexport function getBlockerTranslationKeys(key: string) {\n return {\n titleKey: `PayrollBlocker:blockers.${key}.title`,\n descriptionKey: `PayrollBlocker:blockers.${key}.description`,\n helpTextKey: `PayrollBlocker:blockers.${key}.
|
|
1
|
+
{"version":3,"file":"payrollHelpers.js","sources":["../../../../src/components/Payroll/PayrollBlocker/payrollHelpers.ts"],"sourcesContent":["import { PayrollBlockersError } from '@gusto/embedded-api/models/errors/payrollblockerserror'\nimport { UnprocessableEntityErrorObject1 } from '@gusto/embedded-api/models/errors/unprocessableentityerrorobject1'\n\nfunction hasMetadataKey(metadata: unknown): metadata is { key: string } {\n return (\n typeof metadata === 'object' &&\n metadata !== null &&\n 'key' in metadata &&\n typeof (metadata as { key: unknown }).key === 'string'\n )\n}\n\nexport interface ApiPayrollBlocker {\n key: string\n message?: string\n}\n\nexport function isPayrollBlockersError(error: unknown): error is PayrollBlockersError {\n return error instanceof PayrollBlockersError\n}\n\nexport function isUnprocessableEntityWithPayrollBlockers(\n error: unknown,\n): error is UnprocessableEntityErrorObject1 {\n return (\n error instanceof UnprocessableEntityErrorObject1 &&\n Array.isArray(error.errors) &&\n error.errors.some(err => err.category === 'payroll_blocker')\n )\n}\n\nexport function parsePayrollBlockersFromError(error: unknown): ApiPayrollBlocker[] {\n // Handle PayrollBlockersError (dedicated blocker error type)\n if (isPayrollBlockersError(error)) {\n if (!error.errors || error.errors.length === 0) {\n return []\n }\n\n const blockers = error.errors.map(err => {\n const key = hasMetadataKey(err.metadata) ? err.metadata.key : err.errorKey || 'unknown'\n\n return { key, message: err.message }\n })\n\n return blockers\n }\n\n // Handle UnprocessableEntityErrorObject1 with payroll blockers\n if (isUnprocessableEntityWithPayrollBlockers(error)) {\n const blockers = error.errors\n .filter(err => err.category === 'payroll_blocker')\n .map(err => {\n const key = hasMetadataKey(err.metadata) ? err.metadata.key : err.errorKey || 'unknown'\n\n return { key, message: err.message }\n })\n\n return blockers\n }\n\n return []\n}\n\ntype PayrollBlockerError = PayrollBlockersError | UnprocessableEntityErrorObject1\n\nconst hasPayrollBlockers = (error: unknown): error is PayrollBlockerError => {\n if (error instanceof PayrollBlockersError) {\n return true\n }\n if (error instanceof UnprocessableEntityErrorObject1) {\n return (\n Array.isArray(error.errors) && error.errors.some(err => err.category === 'payroll_blocker')\n )\n }\n return false\n}\n\nexport interface PayrollSubmitResult {\n success: boolean\n blockers: ApiPayrollBlocker[]\n}\n\n/**\n * Direct submit handler for payroll operations that handles payroll blockers\n * Returns blockers if found, otherwise throws the error for caller to handle\n */\nexport const payrollSubmitHandler = async (\n payrollHandler: () => Promise<void>,\n): Promise<PayrollSubmitResult> => {\n try {\n await payrollHandler()\n return { success: true, blockers: [] }\n } catch (error: unknown) {\n if (hasPayrollBlockers(error)) {\n const blockers = parsePayrollBlockersFromError(error)\n return { success: false, blockers }\n }\n\n // For non-payroll errors, re-throw\n throw error\n }\n}\n\n/**\n * Get translation keys for a blocker - use these in components with useTranslation\n */\nexport function getBlockerTranslationKeys(key: string) {\n return {\n titleKey: `PayrollBlocker:blockers.${key}.title`,\n descriptionKey: `PayrollBlocker:blockers.${key}.description`,\n helpTextKey: `PayrollBlocker:blockers.${key}.help`,\n defaultActionKey: `PayrollBlocker:blockers.${key}.defaultAction`,\n }\n}\n"],"names":["hasMetadataKey","metadata","isPayrollBlockersError","error","PayrollBlockersError","isUnprocessableEntityWithPayrollBlockers","UnprocessableEntityErrorObject1","err","parsePayrollBlockersFromError","hasPayrollBlockers","payrollSubmitHandler","payrollHandler","getBlockerTranslationKeys","key"],"mappings":";;AAGA,SAASA,EAAeC,GAAgD;AACtE,SACE,OAAOA,KAAa,YACpBA,MAAa,QACb,SAASA,KACT,OAAQA,EAA8B,OAAQ;AAElD;AAOO,SAASC,EAAuBC,GAA+C;AACpF,SAAOA,aAAiBC;AAC1B;AAEO,SAASC,EACdF,GAC0C;AAC1C,SACEA,aAAiBG,KACjB,MAAM,QAAQH,EAAM,MAAM,KAC1BA,EAAM,OAAO,KAAK,CAAAI,MAAOA,EAAI,aAAa,iBAAiB;AAE/D;AAEO,SAASC,EAA8BL,GAAqC;AAEjF,SAAID,EAAuBC,CAAK,IAC1B,CAACA,EAAM,UAAUA,EAAM,OAAO,WAAW,IACpC,CAAA,IAGQA,EAAM,OAAO,IAAI,CAAAI,OAGzB,EAAE,KAFGP,EAAeO,EAAI,QAAQ,IAAIA,EAAI,SAAS,MAAMA,EAAI,YAAY,WAEhE,SAASA,EAAI,QAAA,EAC5B,IAMCF,EAAyCF,CAAK,IAC/BA,EAAM,OACpB,OAAO,CAAAI,MAAOA,EAAI,aAAa,iBAAiB,EAChD,IAAI,CAAAA,OAGI,EAAE,KAFGP,EAAeO,EAAI,QAAQ,IAAIA,EAAI,SAAS,MAAMA,EAAI,YAAY,WAEhE,SAASA,EAAI,QAAA,EAC5B,IAKE,CAAA;AACT;AAIA,MAAME,IAAqB,CAACN,MACtBA,aAAiBC,IACZ,KAELD,aAAiBG,IAEjB,MAAM,QAAQH,EAAM,MAAM,KAAKA,EAAM,OAAO,KAAK,CAAAI,MAAOA,EAAI,aAAa,iBAAiB,IAGvF,IAYIG,IAAuB,OAClCC,MACiC;AACjC,MAAI;AACF,iBAAMA,EAAA,GACC,EAAE,SAAS,IAAM,UAAU,CAAA,EAAC;AAAA,EACrC,SAASR,GAAgB;AACvB,QAAIM,EAAmBN,CAAK;AAE1B,aAAO,EAAE,SAAS,IAAO,UADRK,EAA8BL,CAAK,EAC3B;AAI3B,UAAMA;AAAA,EACR;AACF;AAKO,SAASS,EAA0BC,GAAa;AACrD,SAAO;AAAA,IACL,UAAU,2BAA2BA,CAAG;AAAA,IACxC,gBAAgB,2BAA2BA,CAAG;AAAA,IAC9C,aAAa,2BAA2BA,CAAG;AAAA,IAC3C,kBAAkB,2BAA2BA,CAAG;AAAA,EAAA;AAEpD;"}
|