@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
|
@@ -1,40 +1,38 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as n } from "react";
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { TaxPayerType as
|
|
5
|
-
import { useFederalTaxes as
|
|
6
|
-
import { Flex as
|
|
7
|
-
import "
|
|
8
|
-
import "../../../
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const { t: e } = c("Company.FederalTaxes"), { federalTaxDetails: s } = u(), i = F(), m = g(s?.hasEin), p = n(
|
|
15
|
-
() => Object.values(_).map((o) => ({
|
|
3
|
+
import { useTranslation as d, Trans as t } from "react-i18next";
|
|
4
|
+
import { TaxPayerType as y, FilingForm as u } from "@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails";
|
|
5
|
+
import { useFederalTaxes as b } from "./useFederalTaxes.js";
|
|
6
|
+
import { Flex as g } from "../../Common/Flex/Flex.js";
|
|
7
|
+
import { usePlaceholderEin as x, normalizeEin as F } from "../../../helpers/federalEin.js";
|
|
8
|
+
import { useComponentContext as T } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
9
|
+
import { TextInputField as a } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
10
|
+
import { SelectField as l } from "../../Common/Fields/SelectField/SelectField.js";
|
|
11
|
+
function N() {
|
|
12
|
+
const { t: e } = d("Company.FederalTaxes"), { federalTaxDetails: s } = b(), i = T(), m = x(s?.hasEin), p = n(
|
|
13
|
+
() => Object.values(y).map((o) => ({
|
|
16
14
|
value: o,
|
|
17
15
|
label: e(`taxPayerType.${o}`)
|
|
18
16
|
})),
|
|
19
17
|
[e]
|
|
20
18
|
), f = n(
|
|
21
|
-
() => Object.values(
|
|
19
|
+
() => Object.values(u).map((o) => ({
|
|
22
20
|
value: o,
|
|
23
21
|
label: e(`filingForm.${o}`)
|
|
24
22
|
})),
|
|
25
23
|
[e]
|
|
26
24
|
);
|
|
27
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ c(g, { flexDirection: "column", gap: 28, children: [
|
|
28
26
|
/* @__PURE__ */ r(
|
|
29
|
-
|
|
27
|
+
a,
|
|
30
28
|
{
|
|
31
29
|
name: "federalEin",
|
|
32
|
-
label: e("
|
|
30
|
+
label: e("federalEinLabel"),
|
|
33
31
|
description: /* @__PURE__ */ r(
|
|
34
32
|
t,
|
|
35
33
|
{
|
|
36
34
|
t: e,
|
|
37
|
-
i18nKey: "
|
|
35
|
+
i18nKey: "federalEinDescription",
|
|
38
36
|
components: {
|
|
39
37
|
applyLink: /* @__PURE__ */ r(
|
|
40
38
|
i.Link,
|
|
@@ -48,30 +46,30 @@ function v() {
|
|
|
48
46
|
}
|
|
49
47
|
),
|
|
50
48
|
isRequired: !0,
|
|
51
|
-
transform:
|
|
49
|
+
transform: F,
|
|
52
50
|
placeholder: m
|
|
53
51
|
}
|
|
54
52
|
),
|
|
55
53
|
/* @__PURE__ */ r(
|
|
56
|
-
|
|
54
|
+
l,
|
|
57
55
|
{
|
|
58
56
|
name: "taxPayerType",
|
|
59
|
-
label: e("
|
|
60
|
-
description: e("
|
|
57
|
+
label: e("taxpayerTypeLabel"),
|
|
58
|
+
description: e("taxpayerTypeDescription"),
|
|
61
59
|
options: p,
|
|
62
60
|
isRequired: !0
|
|
63
61
|
}
|
|
64
62
|
),
|
|
65
63
|
/* @__PURE__ */ r(
|
|
66
|
-
|
|
64
|
+
l,
|
|
67
65
|
{
|
|
68
66
|
name: "filingForm",
|
|
69
|
-
label: e("
|
|
67
|
+
label: e("federalFilingFormLabel"),
|
|
70
68
|
description: /* @__PURE__ */ r(
|
|
71
69
|
t,
|
|
72
70
|
{
|
|
73
71
|
t: e,
|
|
74
|
-
i18nKey: "
|
|
72
|
+
i18nKey: "federalFilingFormDescription",
|
|
75
73
|
components: {
|
|
76
74
|
irsLink: /* @__PURE__ */ r(
|
|
77
75
|
i.Link,
|
|
@@ -89,18 +87,18 @@ function v() {
|
|
|
89
87
|
}
|
|
90
88
|
),
|
|
91
89
|
/* @__PURE__ */ r(
|
|
92
|
-
|
|
90
|
+
a,
|
|
93
91
|
{
|
|
94
92
|
name: "legalName",
|
|
95
|
-
label: e("
|
|
96
|
-
description: e("
|
|
93
|
+
label: e("legalEntityNameLabel"),
|
|
94
|
+
description: e("legalEntityNameDescription"),
|
|
97
95
|
isRequired: !0,
|
|
98
|
-
errorMessage: e("
|
|
96
|
+
errorMessage: e("legalEntityNameError")
|
|
99
97
|
}
|
|
100
98
|
)
|
|
101
99
|
] });
|
|
102
100
|
}
|
|
103
101
|
export {
|
|
104
|
-
|
|
102
|
+
N as Form
|
|
105
103
|
};
|
|
106
104
|
//# sourceMappingURL=Form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../../src/components/Company/FederalTaxes/Form.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation, Trans } from 'react-i18next'\nimport {\n TaxPayerType,\n FilingForm,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { TextInputField, SelectField, Flex } from '@/components/Common'\nimport { usePlaceholderEin, normalizeEin } from '@/helpers/federalEin'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Form() {\n const { t } = useTranslation('Company.FederalTaxes')\n const { federalTaxDetails } = useFederalTaxes()\n const Components = useComponentContext()\n\n const placeholderEin = usePlaceholderEin(federalTaxDetails?.hasEin)\n\n const taxPayerTypeOptions = useMemo(\n () =>\n Object.values(TaxPayerType).map(value => ({\n value: value,\n label: t(`taxPayerType.${value}`),\n })),\n [t],\n )\n\n const filingFormOptions = useMemo(\n () =>\n Object.values(FilingForm).map(value => ({\n value: value,\n label: t(`filingForm.${value}`),\n })),\n [t],\n )\n\n return (\n <Flex flexDirection=\"column\" gap={28}>\n <TextInputField\n name=\"federalEin\"\n label={t('
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../../src/components/Company/FederalTaxes/Form.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useTranslation, Trans } from 'react-i18next'\nimport {\n TaxPayerType,\n FilingForm,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { useFederalTaxes } from './useFederalTaxes'\nimport { TextInputField, SelectField, Flex } from '@/components/Common'\nimport { usePlaceholderEin, normalizeEin } from '@/helpers/federalEin'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Form() {\n const { t } = useTranslation('Company.FederalTaxes')\n const { federalTaxDetails } = useFederalTaxes()\n const Components = useComponentContext()\n\n const placeholderEin = usePlaceholderEin(federalTaxDetails?.hasEin)\n\n const taxPayerTypeOptions = useMemo(\n () =>\n Object.values(TaxPayerType).map(value => ({\n value: value,\n label: t(`taxPayerType.${value}`),\n })),\n [t],\n )\n\n const filingFormOptions = useMemo(\n () =>\n Object.values(FilingForm).map(value => ({\n value: value,\n label: t(`filingForm.${value}`),\n })),\n [t],\n )\n\n return (\n <Flex flexDirection=\"column\" gap={28}>\n <TextInputField\n name=\"federalEin\"\n label={t('federalEinLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"federalEinDescription\"\n components={{\n applyLink: (\n <Components.Link\n href=\"https://www.irs.gov/businesses/employer-identification-number\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n isRequired\n transform={normalizeEin}\n placeholder={placeholderEin}\n />\n <SelectField\n name=\"taxPayerType\"\n label={t('taxpayerTypeLabel')}\n description={t('taxpayerTypeDescription')}\n options={taxPayerTypeOptions}\n isRequired\n />\n <SelectField\n name=\"filingForm\"\n label={t('federalFilingFormLabel')}\n description={\n <Trans\n t={t}\n i18nKey=\"federalFilingFormDescription\"\n components={{\n irsLink: (\n <Components.Link\n href=\"https://www.irs.gov/newsroom/employers-should-you-file-form-944-or-941\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n }\n options={filingFormOptions}\n isRequired\n />\n <TextInputField\n name=\"legalName\"\n label={t('legalEntityNameLabel')}\n description={t('legalEntityNameDescription')}\n isRequired\n errorMessage={t('legalEntityNameError')}\n />\n </Flex>\n )\n}\n"],"names":["Form","t","useTranslation","federalTaxDetails","useFederalTaxes","Components","useComponentContext","placeholderEin","usePlaceholderEin","taxPayerTypeOptions","useMemo","TaxPayerType","value","filingFormOptions","FilingForm","jsxs","Flex","jsx","TextInputField","Trans","normalizeEin","SelectField"],"mappings":";;;;;;;;;;AAWO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,mBAAAC,EAAA,IAAsBC,EAAA,GACxBC,IAAaC,EAAA,GAEbC,IAAiBC,EAAkBL,GAAmB,MAAM,GAE5DM,IAAsBC;AAAA,IAC1B,MACE,OAAO,OAAOC,CAAY,EAAE,IAAI,CAAAC,OAAU;AAAA,MACxC,OAAAA;AAAA,MACA,OAAOX,EAAE,gBAAgBW,CAAK,EAAE;AAAA,IAAA,EAChC;AAAA,IACJ,CAACX,CAAC;AAAA,EAAA,GAGEY,IAAoBH;AAAA,IACxB,MACE,OAAO,OAAOI,CAAU,EAAE,IAAI,CAAAF,OAAU;AAAA,MACtC,OAAAA;AAAA,MACA,OAAOX,EAAE,cAAcW,CAAK,EAAE;AAAA,IAAA,EAC9B;AAAA,IACJ,CAACX,CAAC;AAAA,EAAA;AAGJ,SACE,gBAAAc,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOjB,EAAE,iBAAiB;AAAA,QAC1B,aACE,gBAAAgB;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,GAAAlB;AAAA,YACA,SAAQ;AAAA,YACR,YAAY;AAAA,cACV,WACE,gBAAAgB;AAAA,gBAACZ,EAAW;AAAA,gBAAX;AAAA,kBACC,MAAK;AAAA,kBACL,QAAO;AAAA,kBACP,KAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,YACN;AAAA,UAEJ;AAAA,QAAA;AAAA,QAGJ,YAAU;AAAA,QACV,WAAWe;AAAA,QACX,aAAab;AAAA,MAAA;AAAA,IAAA;AAAA,IAEf,gBAAAU;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpB,EAAE,mBAAmB;AAAA,QAC5B,aAAaA,EAAE,yBAAyB;AAAA,QACxC,SAASQ;AAAA,QACT,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAQ;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOpB,EAAE,wBAAwB;AAAA,QACjC,aACE,gBAAAgB;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,GAAAlB;AAAA,YACA,SAAQ;AAAA,YACR,YAAY;AAAA,cACV,SACE,gBAAAgB;AAAA,gBAACZ,EAAW;AAAA,gBAAX;AAAA,kBACC,MAAK;AAAA,kBACL,QAAO;AAAA,kBACP,KAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,YACN;AAAA,UAEJ;AAAA,QAAA;AAAA,QAGJ,SAASQ;AAAA,QACT,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOjB,EAAE,sBAAsB;AAAA,QAC/B,aAAaA,EAAE,4BAA4B;AAAA,QAC3C,YAAU;AAAA,QACV,cAAcA,EAAE,sBAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,EACxC,GACF;AAEJ;"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useTranslation as
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as t, Trans as i } from "react-i18next";
|
|
3
3
|
import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
4
4
|
function l() {
|
|
5
|
-
const { t: r } =
|
|
6
|
-
return /* @__PURE__ */
|
|
5
|
+
const { t: r } = t("Company.FederalTaxes"), n = s();
|
|
6
|
+
return /* @__PURE__ */ o("header", { children: [
|
|
7
7
|
/* @__PURE__ */ e(n.Heading, { as: "h2", children: r("pageTitle") }),
|
|
8
8
|
/* @__PURE__ */ e(n.Text, { children: /* @__PURE__ */ e(
|
|
9
9
|
i,
|
|
10
10
|
{
|
|
11
11
|
t: r,
|
|
12
|
-
i18nKey: "
|
|
12
|
+
i18nKey: "entityTypeAndLegalNameIntro",
|
|
13
13
|
components: {
|
|
14
14
|
einLink: /* @__PURE__ */ e(
|
|
15
15
|
n.Link,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Head.js","sources":["../../../../src/components/Company/FederalTaxes/Head.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Head() {\n const { t } = useTranslation('Company.FederalTaxes')\n const Components = useComponentContext()\n\n return (\n <header>\n <Components.Heading as=\"h2\">{t('pageTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n t={t}\n i18nKey=\"
|
|
1
|
+
{"version":3,"file":"Head.js","sources":["../../../../src/components/Company/FederalTaxes/Head.tsx"],"sourcesContent":["import { Trans, useTranslation } from 'react-i18next'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Head() {\n const { t } = useTranslation('Company.FederalTaxes')\n const Components = useComponentContext()\n\n return (\n <header>\n <Components.Heading as=\"h2\">{t('pageTitle')}</Components.Heading>\n <Components.Text>\n <Trans\n t={t}\n i18nKey=\"entityTypeAndLegalNameIntro\"\n components={{\n einLink: (\n <Components.Link\n href=\"https://www.irs.gov/businesses/employer-identification-number#lost\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n />\n ),\n }}\n />\n </Components.Text>\n </header>\n )\n}\n"],"names":["Head","t","useTranslation","Components","useComponentContext","jsx","Trans"],"mappings":";;;AAGO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7CC,IAAaC,EAAA;AAEnB,2BACG,UAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACF,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,WAAW,GAAE;AAAA,IAC5C,gBAAAI,EAACF,EAAW,MAAX,EACC,UAAA,gBAAAE;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,GAAAL;AAAA,QACA,SAAQ;AAAA,QACR,YAAY;AAAA,UACV,SACE,gBAAAI;AAAA,YAACF,EAAW;AAAA,YAAX;AAAA,cACC,MAAK;AAAA,cACL,QAAO;AAAA,cACP,KAAI;AAAA,YAAA;AAAA,UAAA;AAAA,QACN;AAAA,MAEJ;AAAA,IAAA,EACF,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as o } from "zod";
|
|
2
|
-
import { FilingForm as
|
|
2
|
+
import { FilingForm as e, TaxPayerType as r } from "@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react-error-boundary";
|
|
@@ -10,22 +10,20 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
|
10
10
|
import "@tanstack/react-query";
|
|
11
11
|
import "../../Base/useBase.js";
|
|
12
12
|
import "../../../shared/constants.js";
|
|
13
|
-
import "classnames";
|
|
14
|
-
import "dompurify";
|
|
15
|
-
import "../../../contexts/LocaleProvider/useLocale.js";
|
|
16
13
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
|
+
import "dompurify";
|
|
17
15
|
import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
|
|
18
|
-
const
|
|
16
|
+
const y = o.object({
|
|
19
17
|
federalEin: o.string().optional(),
|
|
20
|
-
taxPayerType: o.enum(Object.values(
|
|
21
|
-
filingForm: o.enum(Object.values(
|
|
18
|
+
taxPayerType: o.enum(Object.values(r)).optional(),
|
|
19
|
+
filingForm: o.enum(Object.values(e)).optional(),
|
|
22
20
|
legalName: o.string().min(1)
|
|
23
|
-
}), [
|
|
21
|
+
}), [C, b] = t(
|
|
24
22
|
"CompanyFederalTaxesContext"
|
|
25
23
|
);
|
|
26
24
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
y as FederalTaxFormSchema,
|
|
26
|
+
b as FederalTaxesProvider,
|
|
27
|
+
C as useFederalTaxes
|
|
30
28
|
};
|
|
31
29
|
//# sourceMappingURL=useFederalTaxes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/useFederalTaxes.ts"],"sourcesContent":["import { z } from 'zod'\nimport type { FederalTaxDetails } from '@gusto/embedded-api/models/components/federaltaxdetails'\nimport {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const FederalTaxFormSchema = z.object({\n federalEin: z.string().optional(),\n taxPayerType: z.enum(Object.values(TaxPayerType) as [string, ...string[]]).optional(),\n filingForm: z.enum(Object.values(FilingForm) as [string, ...string[]]).optional(),\n legalName: z.string().min(1),\n})\n\nexport type FederalTaxFormInputs = z.input<typeof FederalTaxFormSchema>\n\nexport type FederalTaxesDefaultValues = RequireAtLeastOne<{\n taxPayerType?: FederalTaxFormInputs['taxPayerType']\n filingForm?: FederalTaxFormInputs['filingForm']\n legalName?: FederalTaxFormInputs['legalName']\n}>\n\ntype FederalTaxesContextType = {\n isPending: boolean\n federalTaxDetails?: FederalTaxDetails\n}\n\nconst [useFederalTaxes, FederalTaxesProvider] = createCompoundContext<FederalTaxesContextType>(\n 'CompanyFederalTaxesContext',\n)\n\nexport { useFederalTaxes, FederalTaxesProvider }\n"],"names":["FederalTaxFormSchema","z","TaxPayerType","FilingForm","useFederalTaxes","FederalTaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AASO,MAAMA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAA,EAAS,SAAA;AAAA,EACvB,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAA;AAAA,EAC3E,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAA;AAAA,EACvE,WAAWF,EAAE,OAAA,EAAS,IAAI,CAAC;AAC7B,CAAC,GAeK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useIndustryApiState as
|
|
4
|
-
import "classnames";
|
|
5
|
-
import "../../../shared/constants.js";
|
|
2
|
+
import { useTranslation as s } from "react-i18next";
|
|
3
|
+
import { useIndustryApiState as i } from "./Context.js";
|
|
6
4
|
import { ActionsLayout as m } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
5
|
import { useComponentContext as e } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
-
const
|
|
9
|
-
const { t: o } =
|
|
6
|
+
const f = () => {
|
|
7
|
+
const { t: o } = s("Company.Industry"), { isPending: n } = i(), r = e();
|
|
10
8
|
return /* @__PURE__ */ t(m, { children: /* @__PURE__ */ t(r.Button, { type: "submit", isLoading: n, children: o("submitCta") }) });
|
|
11
9
|
};
|
|
12
10
|
export {
|
|
13
|
-
|
|
11
|
+
f as Actions
|
|
14
12
|
};
|
|
15
13
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/Industry/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryApiState } from './Context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Industry')\n const { isPending } = useIndustryApiState()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useIndustryApiState","Components","useComponentContext","jsx","ActionsLayout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Company/Industry/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryApiState } from './Context'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Industry')\n const { isPending } = useIndustryApiState()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={isPending}>\n {t('submitCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","isPending","useIndustryApiState","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChBC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GACzC,UAAAF,EAAE,WAAW,GAChB,GACF;AAEJ;"}
|
|
@@ -8,20 +8,18 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "../../Base/useBase.js";
|
|
10
10
|
import "../../../shared/constants.js";
|
|
11
|
-
import "classnames";
|
|
12
|
-
import "dompurify";
|
|
13
|
-
import "../../../contexts/LocaleProvider/useLocale.js";
|
|
14
11
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
+
import "dompurify";
|
|
15
13
|
import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
|
|
16
|
-
const [
|
|
14
|
+
const [c, A] = t("IndustryItems", {
|
|
17
15
|
items: []
|
|
18
|
-
}), [
|
|
16
|
+
}), [P, f] = t("IndustryApi", {
|
|
19
17
|
isPending: !1
|
|
20
18
|
});
|
|
21
19
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
f as IndustryApiStateProvider,
|
|
21
|
+
A as IndustryItemsProvider,
|
|
22
|
+
P as useIndustryApiState,
|
|
23
|
+
c as useIndustryItems
|
|
26
24
|
};
|
|
27
25
|
//# sourceMappingURL=Context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Context.js","sources":["../../../../src/components/Company/Industry/Context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\nimport type { ComboBoxOption } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\n\nconst [useIndustryItems, IndustryItemsProvider] = createCompoundContext('IndustryItems', {\n items: [] as ComboBoxOption[],\n})\n\nconst [useIndustryApiState, IndustryApiStateProvider] = createCompoundContext('IndustryApi', {\n isPending: false,\n})\n\nexport { IndustryApiStateProvider, IndustryItemsProvider, useIndustryItems, useIndustryApiState }\n"],"names":["useIndustryItems","IndustryItemsProvider","createCompoundContext","useIndustryApiState","IndustryApiStateProvider"],"mappings":";;;;;;;;;;;;;AAGA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC,EAAsB,iBAAiB;AAAA,EACvF,OAAO,CAAA;AACT,CAAC,GAEK,CAACC,GAAqBC,CAAwB,IAAIF,EAAsB,eAAe;AAAA,EAC3F,WAAW;AACb,CAAC;"}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useIndustryItems as
|
|
4
|
-
import "
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return /* @__PURE__ */ t(
|
|
10
|
-
i,
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as t } from "react-i18next";
|
|
3
|
+
import { useIndustryItems as s } from "./Context.js";
|
|
4
|
+
import { ComboBoxField as m } from "../../Common/Fields/ComboBoxField/ComboBoxField.js";
|
|
5
|
+
const p = () => {
|
|
6
|
+
const { t: o } = t("Company.Industry"), { items: e } = s();
|
|
7
|
+
return /* @__PURE__ */ r(
|
|
8
|
+
m,
|
|
11
9
|
{
|
|
12
10
|
isRequired: !0,
|
|
13
|
-
options:
|
|
11
|
+
options: e,
|
|
14
12
|
label: o("label"),
|
|
15
13
|
name: "naics_code",
|
|
16
14
|
placeholder: o("placeholder")
|
|
@@ -18,6 +16,6 @@ const c = () => {
|
|
|
18
16
|
);
|
|
19
17
|
};
|
|
20
18
|
export {
|
|
21
|
-
|
|
19
|
+
p as Edit
|
|
22
20
|
};
|
|
23
21
|
//# sourceMappingURL=Edit.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Edit.js","sources":["../../../../src/components/Company/Industry/Edit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryItems } from './Context'\nimport { ComboBoxField } from '@/components/Common'\n\nexport interface IndustryFormFields {\n naics_code: string\n}\n\nexport const Edit = () => {\n const { t } = useTranslation('Company.Industry')\n const { items } = useIndustryItems()\n\n return (\n <ComboBoxField\n isRequired\n options={items}\n label={t('label')}\n name=\"naics_code\"\n placeholder={t('placeholder')}\n />\n )\n}\n"],"names":["Edit","t","useTranslation","items","useIndustryItems","jsx","ComboBoxField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Edit.js","sources":["../../../../src/components/Company/Industry/Edit.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useIndustryItems } from './Context'\nimport { ComboBoxField } from '@/components/Common'\n\nexport interface IndustryFormFields {\n naics_code: string\n}\n\nexport const Edit = () => {\n const { t } = useTranslation('Company.Industry')\n const { items } = useIndustryItems()\n\n return (\n <ComboBoxField\n isRequired\n options={items}\n label={t('label')}\n name=\"naics_code\"\n placeholder={t('placeholder')}\n />\n )\n}\n"],"names":["Edit","t","useTranslation","items","useIndustryItems","jsx","ComboBoxField"],"mappings":";;;;AAQO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,kBAAkB,GACzC,EAAE,OAAAC,EAAA,IAAUC,EAAA;AAElB,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAU;AAAA,MACV,SAASH;AAAA,MACT,OAAOF,EAAE,OAAO;AAAA,MAChB,MAAK;AAAA,MACL,aAAaA,EAAE,aAAa;AAAA,IAAA;AAAA,EAAA;AAGlC;"}
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { jsxs as r, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as a } from "react-i18next";
|
|
3
3
|
import { useLocationsForm as e } from "./useLocationForm.js";
|
|
4
|
-
import "
|
|
5
|
-
import "../../../../
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const { t: o } = a("Company.Locations"), { handleCancel: i, isPending: s } = e(), t = c();
|
|
10
|
-
return /* @__PURE__ */ r(m, { children: [
|
|
4
|
+
import { ActionsLayout as c } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
5
|
+
import { useComponentContext as m } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
|
+
const f = () => {
|
|
7
|
+
const { t: o } = a("Company.Locations"), { handleCancel: i, isPending: s } = e(), t = m();
|
|
8
|
+
return /* @__PURE__ */ r(c, { children: [
|
|
11
9
|
/* @__PURE__ */ n(t.Button, { variant: "secondary", onClick: i, children: o("cancelCta") }),
|
|
12
10
|
/* @__PURE__ */ n(t.Button, { type: "submit", isLoading: s, "data-testid": "location-submit", children: o("saveCta") })
|
|
13
11
|
] });
|
|
14
12
|
};
|
|
15
13
|
export {
|
|
16
|
-
|
|
14
|
+
f as Actions
|
|
17
15
|
};
|
|
18
16
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsForm } from './useLocationForm'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Locations')\n const { handleCancel, isPending } = useLocationsForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending} data-testid=\"location-submit\">\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleCancel","isPending","useLocationsForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useLocationsForm } from './useLocationForm'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const Actions = () => {\n const { t } = useTranslation('Company.Locations')\n const { handleCancel, isPending } = useLocationsForm()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button variant=\"secondary\" onClick={handleCancel}>\n {t('cancelCta')}\n </Components.Button>\n <Components.Button type=\"submit\" isLoading={isPending} data-testid=\"location-submit\">\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleCancel","isPending","useLocationsForm","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;AAKO,MAAMA,IAAU,MAAM;AAC3B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1C,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcC,EAAA,GAC9BC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAAF,EAAE,WAAW,EAAA,CAChB;AAAA,IACA,gBAAAQ,EAACH,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWF,GAAW,eAAY,mBAChE,UAAAH,EAAE,SAAS,EAAA,CACd;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -4,13 +4,12 @@ import { useTranslation as l } from "react-i18next";
|
|
|
4
4
|
import { zipValidation as n, phoneValidation as m } from "../../../../helpers/validations.js";
|
|
5
5
|
import { Flex as d } from "../../../Common/Flex/Flex.js";
|
|
6
6
|
import { Grid as p } from "../../../Common/Grid/Grid.js";
|
|
7
|
-
import "classnames";
|
|
8
7
|
import { STATES_ABBR as c } from "../../../../shared/constants.js";
|
|
9
8
|
import { useMaskedTransform as u, commonMasks as b } from "../../../../helpers/mask.js";
|
|
10
9
|
import { TextInputField as s } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
11
10
|
import { SelectField as f } from "../../../Common/Fields/SelectField/SelectField.js";
|
|
12
11
|
import { CheckboxGroupField as g } from "../../../Common/Fields/CheckboxGroupField/CheckboxGroupField.js";
|
|
13
|
-
const
|
|
12
|
+
const q = i.object({
|
|
14
13
|
phoneNumber: m,
|
|
15
14
|
street1: i.string().min(1),
|
|
16
15
|
street2: i.string().optional(),
|
|
@@ -19,7 +18,7 @@ const k = i.object({
|
|
|
19
18
|
zip: n,
|
|
20
19
|
addressType: i.array(i.enum(["mailingAddress", "filingAddress"])).optional()
|
|
21
20
|
});
|
|
22
|
-
function
|
|
21
|
+
function k() {
|
|
23
22
|
const { t: e } = l("Company.Locations"), o = u(b.phoneMask);
|
|
24
23
|
return /* @__PURE__ */ t(d, { flexDirection: "column", gap: 20, children: [
|
|
25
24
|
/* @__PURE__ */ t(
|
|
@@ -105,7 +104,7 @@ function S() {
|
|
|
105
104
|
] });
|
|
106
105
|
}
|
|
107
106
|
export {
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
k as Form,
|
|
108
|
+
q as LocationFormSchema
|
|
110
109
|
};
|
|
111
110
|
//# sourceMappingURL=Form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { phoneValidation, zipValidation } from '@/helpers/validations'\nimport { CheckboxGroupField, Flex, Grid, SelectField, TextInputField } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\nimport { commonMasks, useMaskedTransform } from '@/helpers/mask'\n\nexport const LocationFormSchema = z.object({\n phoneNumber: phoneValidation,\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: zipValidation,\n addressType: z.array(z.enum(['mailingAddress', 'filingAddress'])).optional(),\n})\n\nexport type LocationFormInputs = z.infer<typeof LocationFormSchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.Locations')\n const transform = useMaskedTransform(commonMasks.phoneMask)\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <Grid\n gap={{ base: 20, small: 8 }}\n gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }}\n >\n <TextInputField\n name=\"street1\"\n isRequired\n label={t('street1Label')}\n errorMessage={t('validations.street1')}\n />\n <TextInputField name=\"street2\" label={t('street2Label')} />\n <TextInputField\n name=\"city\"\n label={t('cityLabel')}\n isRequired\n errorMessage={t('validations.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map((stateAbbr: (typeof STATES_ABBR)[number]) => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common' }),\n value: stateAbbr,\n }))}\n label={t('stateLabel')}\n placeholder={t('statePlaceholder')}\n errorMessage={t('validations.state')}\n isRequired\n />\n <TextInputField\n name=\"zip\"\n isRequired\n label={t('zipLabel')}\n errorMessage={t('validations.zip')}\n />\n <TextInputField\n name=\"phoneNumber\"\n isRequired\n label={t('phoneNumberLabel')}\n errorMessage={t('validations.phone')}\n transform={transform}\n />\n </Grid>\n <CheckboxGroupField\n name=\"addressType\"\n label={t('addressTypeLabel')}\n options={[\n {\n value: 'mailingAddress',\n label: t('mailingAddressLabel'),\n description: t('mailingAddressDescription'),\n },\n {\n value: 'filingAddress',\n label: t('filingAddressLabel'),\n description: t('filingAddressDescription'),\n },\n ]}\n />\n </Flex>\n )\n}\n"],"names":["LocationFormSchema","z","phoneValidation","zipValidation","Form","t","useTranslation","transform","useMaskedTransform","commonMasks","jsxs","Flex","Grid","jsx","TextInputField","SelectField","STATES_ABBR","stateAbbr","CheckboxGroupField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/Locations/LocationForm/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { phoneValidation, zipValidation } from '@/helpers/validations'\nimport { CheckboxGroupField, Flex, Grid, SelectField, TextInputField } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\nimport { commonMasks, useMaskedTransform } from '@/helpers/mask'\n\nexport const LocationFormSchema = z.object({\n phoneNumber: phoneValidation,\n street1: z.string().min(1),\n street2: z.string().optional(),\n city: z.string().min(1),\n state: z.string().min(1),\n zip: zipValidation,\n addressType: z.array(z.enum(['mailingAddress', 'filingAddress'])).optional(),\n})\n\nexport type LocationFormInputs = z.infer<typeof LocationFormSchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.Locations')\n const transform = useMaskedTransform(commonMasks.phoneMask)\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <Grid\n gap={{ base: 20, small: 8 }}\n gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }}\n >\n <TextInputField\n name=\"street1\"\n isRequired\n label={t('street1Label')}\n errorMessage={t('validations.street1')}\n />\n <TextInputField name=\"street2\" label={t('street2Label')} />\n <TextInputField\n name=\"city\"\n label={t('cityLabel')}\n isRequired\n errorMessage={t('validations.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map((stateAbbr: (typeof STATES_ABBR)[number]) => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common' }),\n value: stateAbbr,\n }))}\n label={t('stateLabel')}\n placeholder={t('statePlaceholder')}\n errorMessage={t('validations.state')}\n isRequired\n />\n <TextInputField\n name=\"zip\"\n isRequired\n label={t('zipLabel')}\n errorMessage={t('validations.zip')}\n />\n <TextInputField\n name=\"phoneNumber\"\n isRequired\n label={t('phoneNumberLabel')}\n errorMessage={t('validations.phone')}\n transform={transform}\n />\n </Grid>\n <CheckboxGroupField\n name=\"addressType\"\n label={t('addressTypeLabel')}\n options={[\n {\n value: 'mailingAddress',\n label: t('mailingAddressLabel'),\n description: t('mailingAddressDescription'),\n },\n {\n value: 'filingAddress',\n label: t('filingAddressLabel'),\n description: t('filingAddressDescription'),\n },\n ]}\n />\n </Flex>\n )\n}\n"],"names":["LocationFormSchema","z","phoneValidation","zipValidation","Form","t","useTranslation","transform","useMaskedTransform","commonMasks","jsxs","Flex","Grid","jsx","TextInputField","SelectField","STATES_ABBR","stateAbbr","CheckboxGroupField"],"mappings":";;;;;;;;;;;AAOO,MAAMA,IAAqBC,EAAE,OAAO;AAAA,EACzC,aAAaC;AAAA,EACb,SAASD,EAAE,SAAS,IAAI,CAAC;AAAA,EACzB,SAASA,EAAE,OAAA,EAAS,SAAA;AAAA,EACpB,MAAMA,EAAE,SAAS,IAAI,CAAC;AAAA,EACtB,OAAOA,EAAE,SAAS,IAAI,CAAC;AAAA,EACvB,KAAKE;AAAA,EACL,aAAaF,EAAE,MAAMA,EAAE,KAAK,CAAC,kBAAkB,eAAe,CAAC,CAAC,EAAE,SAAA;AACpE,CAAC;AAIM,SAASG,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,mBAAmB,GAC1CC,IAAYC,EAAmBC,EAAY,SAAS;AAE1D,SACE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,KAAK,EAAE,MAAM,IAAI,OAAO,EAAA;AAAA,QACxB,qBAAqB,EAAE,MAAM,OAAO,OAAO,CAAC,OAAO,KAAK,EAAA;AAAA,QAExD,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,YAAU;AAAA,cACV,OAAOT,EAAE,cAAc;AAAA,cACvB,cAAcA,EAAE,qBAAqB;AAAA,YAAA;AAAA,UAAA;AAAA,4BAEtCS,GAAA,EAAe,MAAK,WAAU,OAAOT,EAAE,cAAc,GAAG;AAAA,UACzD,gBAAAQ;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,OAAOT,EAAE,WAAW;AAAA,cACpB,YAAU;AAAA,cACV,cAAcA,EAAE,kBAAkB;AAAA,YAAA;AAAA,UAAA;AAAA,UAEpC,gBAAAQ;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,SAASC,EAAY,IAAI,CAACC,OAA6C;AAAA,gBACrE,OAAOZ,EAAE,cAAcY,CAAS,IAAI,EAAE,IAAI,UAAU;AAAA,gBACpD,OAAOA;AAAA,cAAA,EACP;AAAA,cACF,OAAOZ,EAAE,YAAY;AAAA,cACrB,aAAaA,EAAE,kBAAkB;AAAA,cACjC,cAAcA,EAAE,mBAAmB;AAAA,cACnC,YAAU;AAAA,YAAA;AAAA,UAAA;AAAA,UAEZ,gBAAAQ;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,YAAU;AAAA,cACV,OAAOT,EAAE,UAAU;AAAA,cACnB,cAAcA,EAAE,iBAAiB;AAAA,YAAA;AAAA,UAAA;AAAA,UAEnC,gBAAAQ;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,YAAU;AAAA,cACV,OAAOT,EAAE,kBAAkB;AAAA,cAC3B,cAAcA,EAAE,mBAAmB;AAAA,cACnC,WAAAE;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF,gBAAAM;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOb,EAAE,kBAAkB;AAAA,QAC3B,SAAS;AAAA,UACP;AAAA,YACE,OAAO;AAAA,YACP,OAAOA,EAAE,qBAAqB;AAAA,YAC9B,aAAaA,EAAE,2BAA2B;AAAA,UAAA;AAAA,UAE5C;AAAA,YACE,OAAO;AAAA,YACP,OAAOA,EAAE,oBAAoB;AAAA,YAC7B,aAAaA,EAAE,0BAA0B;AAAA,UAAA;AAAA,QAC3C;AAAA,MACF;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
|
|
@@ -10,12 +10,10 @@ import { Actions as I } from "./Actions.js";
|
|
|
10
10
|
import { LocationsFormProvider as M } from "./useLocationForm.js";
|
|
11
11
|
import { Form as _ } from "../../../Common/Form/Form.js";
|
|
12
12
|
import { Flex as w } from "../../../Common/Flex/Flex.js";
|
|
13
|
-
import "classnames";
|
|
14
|
-
import { componentEvents as a } from "../../../../shared/constants.js";
|
|
15
|
-
import "react-i18next";
|
|
16
13
|
import { BaseComponent as z } from "../../../Base/Base.js";
|
|
17
14
|
import { useBase as U } from "../../../Base/useBase.js";
|
|
18
15
|
import { useI18n as j } from "../../../../i18n/I18n.js";
|
|
16
|
+
import { componentEvents as a } from "../../../../shared/constants.js";
|
|
19
17
|
function H(t) {
|
|
20
18
|
const {
|
|
21
19
|
data: { location: e }
|
|
@@ -25,7 +23,7 @@ function H(t) {
|
|
|
25
23
|
function p({
|
|
26
24
|
companyId: t,
|
|
27
25
|
location: e,
|
|
28
|
-
className:
|
|
26
|
+
className: n,
|
|
29
27
|
children: r
|
|
30
28
|
}) {
|
|
31
29
|
j("Company.Locations");
|
|
@@ -38,12 +36,12 @@ function p({
|
|
|
38
36
|
street2: e?.street2 ?? "",
|
|
39
37
|
state: e?.state ?? "",
|
|
40
38
|
zip: e?.zip ?? "",
|
|
41
|
-
addressType: L.filter((
|
|
39
|
+
addressType: L.filter((i) => e?.[i] ?? !1)
|
|
42
40
|
}
|
|
43
41
|
}), v = () => {
|
|
44
42
|
s(a.CANCEL);
|
|
45
|
-
}, C = async (
|
|
46
|
-
await f(
|
|
43
|
+
}, C = async (i) => {
|
|
44
|
+
await f(i, async (F) => {
|
|
47
45
|
const { addressType: c, ...P } = F, u = {
|
|
48
46
|
...P,
|
|
49
47
|
mailingAddress: c?.includes("mailingAddress"),
|
|
@@ -68,7 +66,7 @@ function p({
|
|
|
68
66
|
}
|
|
69
67
|
});
|
|
70
68
|
};
|
|
71
|
-
return /* @__PURE__ */ o("section", { className:
|
|
69
|
+
return /* @__PURE__ */ o("section", { className: n, children: /* @__PURE__ */ o(E, { ...d, control: h, children: /* @__PURE__ */ o(_, { onSubmit: d.handleSubmit(C), children: /* @__PURE__ */ o(
|
|
72
70
|
M,
|
|
73
71
|
{
|
|
74
72
|
value: { handleCancel: v, isPending: A || y },
|
|
@@ -80,16 +78,16 @@ function p({
|
|
|
80
78
|
}
|
|
81
79
|
) }) }) });
|
|
82
80
|
}
|
|
83
|
-
function
|
|
81
|
+
function ne({
|
|
84
82
|
companyId: t,
|
|
85
83
|
locationId: e,
|
|
86
|
-
className:
|
|
84
|
+
className: n,
|
|
87
85
|
children: r,
|
|
88
86
|
...s
|
|
89
87
|
}) {
|
|
90
|
-
return /* @__PURE__ */ o(z, { ...s, children: e ? /* @__PURE__ */ o(H, { companyId: t, locationId: e, className:
|
|
88
|
+
return /* @__PURE__ */ o(z, { ...s, children: e ? /* @__PURE__ */ o(H, { companyId: t, locationId: e, className: n, children: r }) : /* @__PURE__ */ o(p, { companyId: t, className: n, children: r }) });
|
|
91
89
|
}
|
|
92
90
|
export {
|
|
93
|
-
|
|
91
|
+
ne as LocationForm
|
|
94
92
|
};
|
|
95
93
|
//# sourceMappingURL=LocationForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/LocationForm.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useLocationsUpdateMutation } from '@gusto/embedded-api/react-query/locationsUpdate'\nimport { useLocationsRetrieveSuspense } from '@gusto/embedded-api/react-query/locationsRetrieve'\nimport { useLocationsCreateMutation } from '@gusto/embedded-api/react-query/locationsCreate'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { Head } from './Head'\nimport type { LocationFormInputs } from './Form'\nimport { Form, LocationFormSchema } from './Form'\nimport { Actions } from './Actions'\nimport { LocationsFormProvider } from './useLocationForm'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport type { WithRequired } from '@/types/Helpers'\n\ninterface LocationFormProps extends CommonComponentInterface {\n companyId: string\n locationId?: string\n}\n\n/**Accounting for conditional logic where location data needs to be fetched only if locationId is present */\nfunction RootWithLocation(props: WithRequired<LocationFormProps, 'locationId'>) {\n const {\n data: { location },\n } = useLocationsRetrieveSuspense({ locationId: props.locationId })\n return <Root {...props} location={location} />\n}\n\nfunction Root({\n companyId,\n location,\n className,\n children,\n}: LocationFormProps & { location?: Location }) {\n useI18n('Company.Locations')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { mutateAsync: createLocation, isPending: isPendingCreate } = useLocationsCreateMutation()\n const { mutateAsync: updateLocation, isPending: isPendingUpdate } = useLocationsUpdateMutation()\n const addressType = ['mailingAddress', 'filingAddress'] as const\n\n const { control, ...methods } = useForm<LocationFormInputs>({\n resolver: zodResolver(LocationFormSchema),\n defaultValues: {\n city: location?.city ?? '',\n phoneNumber: location?.phoneNumber ?? '',\n street1: location?.street1 ?? '',\n street2: location?.street2 ?? '',\n state: location?.state ?? '',\n zip: location?.zip ?? '',\n addressType: addressType.filter(key => location?.[key] ?? false),\n },\n })\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n const onSubmit = async (data: LocationFormInputs) => {\n await baseSubmitHandler(data, async innerData => {\n const { addressType, ...payload } = innerData\n\n const requestBody = {\n ...payload,\n mailingAddress: addressType?.includes('mailingAddress'),\n filingAddress: addressType?.includes('filingAddress'),\n }\n\n if (location && location.version !== undefined) {\n // Edit existing location\n const { location: responseData } = await updateLocation({\n request: {\n locationId: location.uuid,\n requestBody: { ...requestBody, version: location.version },\n },\n })\n onEvent(componentEvents.COMPANY_LOCATION_UPDATED, responseData)\n } else {\n // Add new location\n const { location: responseData } = await createLocation({\n request: {\n companyId,\n requestBody,\n },\n })\n onEvent(componentEvents.COMPANY_LOCATION_CREATED, responseData)\n }\n })\n }\n\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <LocationsFormProvider\n value={{ handleCancel, isPending: isPendingCreate || isPendingUpdate }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </LocationsFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\n\nexport function LocationForm({\n companyId,\n locationId,\n className,\n children,\n ...props\n}: LocationFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n {locationId ? (\n <RootWithLocation companyId={companyId} locationId={locationId} className={className}>\n {children}\n </RootWithLocation>\n ) : (\n <Root companyId={companyId} className={className}>\n {children}\n </Root>\n )}\n </BaseComponent>\n )\n}\n"],"names":["RootWithLocation","props","location","useLocationsRetrieveSuspense","jsx","Root","companyId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","createLocation","isPendingCreate","useLocationsCreateMutation","updateLocation","isPendingUpdate","useLocationsUpdateMutation","addressType","control","methods","useForm","zodResolver","LocationFormSchema","key","handleCancel","componentEvents","onSubmit","data","innerData","payload","requestBody","responseData","FormProvider","HtmlForm","LocationsFormProvider","Flex","jsxs","Fragment","Head","Form","Actions","LocationForm","locationId","BaseComponent"],"mappings":"
|
|
1
|
+
{"version":3,"file":"LocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/LocationForm.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useLocationsUpdateMutation } from '@gusto/embedded-api/react-query/locationsUpdate'\nimport { useLocationsRetrieveSuspense } from '@gusto/embedded-api/react-query/locationsRetrieve'\nimport { useLocationsCreateMutation } from '@gusto/embedded-api/react-query/locationsCreate'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { Head } from './Head'\nimport type { LocationFormInputs } from './Form'\nimport { Form, LocationFormSchema } from './Form'\nimport { Actions } from './Actions'\nimport { LocationsFormProvider } from './useLocationForm'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base'\nimport { BaseComponent, useBase } from '@/components/Base'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport type { WithRequired } from '@/types/Helpers'\n\ninterface LocationFormProps extends CommonComponentInterface {\n companyId: string\n locationId?: string\n}\n\n/**Accounting for conditional logic where location data needs to be fetched only if locationId is present */\nfunction RootWithLocation(props: WithRequired<LocationFormProps, 'locationId'>) {\n const {\n data: { location },\n } = useLocationsRetrieveSuspense({ locationId: props.locationId })\n return <Root {...props} location={location} />\n}\n\nfunction Root({\n companyId,\n location,\n className,\n children,\n}: LocationFormProps & { location?: Location }) {\n useI18n('Company.Locations')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { mutateAsync: createLocation, isPending: isPendingCreate } = useLocationsCreateMutation()\n const { mutateAsync: updateLocation, isPending: isPendingUpdate } = useLocationsUpdateMutation()\n const addressType = ['mailingAddress', 'filingAddress'] as const\n\n const { control, ...methods } = useForm<LocationFormInputs>({\n resolver: zodResolver(LocationFormSchema),\n defaultValues: {\n city: location?.city ?? '',\n phoneNumber: location?.phoneNumber ?? '',\n street1: location?.street1 ?? '',\n street2: location?.street2 ?? '',\n state: location?.state ?? '',\n zip: location?.zip ?? '',\n addressType: addressType.filter(key => location?.[key] ?? false),\n },\n })\n\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n const onSubmit = async (data: LocationFormInputs) => {\n await baseSubmitHandler(data, async innerData => {\n const { addressType, ...payload } = innerData\n\n const requestBody = {\n ...payload,\n mailingAddress: addressType?.includes('mailingAddress'),\n filingAddress: addressType?.includes('filingAddress'),\n }\n\n if (location && location.version !== undefined) {\n // Edit existing location\n const { location: responseData } = await updateLocation({\n request: {\n locationId: location.uuid,\n requestBody: { ...requestBody, version: location.version },\n },\n })\n onEvent(componentEvents.COMPANY_LOCATION_UPDATED, responseData)\n } else {\n // Add new location\n const { location: responseData } = await createLocation({\n request: {\n companyId,\n requestBody,\n },\n })\n onEvent(componentEvents.COMPANY_LOCATION_CREATED, responseData)\n }\n })\n }\n\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <LocationsFormProvider\n value={{ handleCancel, isPending: isPendingCreate || isPendingUpdate }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </LocationsFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\n\nexport function LocationForm({\n companyId,\n locationId,\n className,\n children,\n ...props\n}: LocationFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n {locationId ? (\n <RootWithLocation companyId={companyId} locationId={locationId} className={className}>\n {children}\n </RootWithLocation>\n ) : (\n <Root companyId={companyId} className={className}>\n {children}\n </Root>\n )}\n </BaseComponent>\n )\n}\n"],"names":["RootWithLocation","props","location","useLocationsRetrieveSuspense","jsx","Root","companyId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","createLocation","isPendingCreate","useLocationsCreateMutation","updateLocation","isPendingUpdate","useLocationsUpdateMutation","addressType","control","methods","useForm","zodResolver","LocationFormSchema","key","handleCancel","componentEvents","onSubmit","data","innerData","payload","requestBody","responseData","FormProvider","HtmlForm","LocationsFormProvider","Flex","jsxs","Fragment","Head","Form","Actions","LocationForm","locationId","BaseComponent"],"mappings":";;;;;;;;;;;;;;;;AAyBA,SAASA,EAAiBC,GAAsD;AAC9E,QAAM;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAA;AAAA,EAAS,IACfC,EAA6B,EAAE,YAAYF,EAAM,YAAY;AACjE,SAAO,gBAAAG,EAACC,GAAA,EAAM,GAAGJ,GAAO,UAAAC,EAAA,CAAoB;AAC9C;AAEA,SAASG,EAAK;AAAA,EACZ,WAAAC;AAAA,EACA,UAAAJ;AAAA,EACA,WAAAK;AAAA,EACA,UAAAC;AACF,GAAgD;AAC9C,EAAAC,EAAQ,mBAAmB;AAC3B,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,aAAaC,GAAgB,WAAWC,EAAA,IAAoBC,EAAA,GAC9D,EAAE,aAAaC,GAAgB,WAAWC,EAAA,IAAoBC,EAAA,GAC9DC,IAAc,CAAC,kBAAkB,eAAe,GAEhD,EAAE,SAAAC,GAAS,GAAGC,EAAA,IAAYC,EAA4B;AAAA,IAC1D,UAAUC,EAAYC,CAAkB;AAAA,IACxC,eAAe;AAAA,MACb,MAAMtB,GAAU,QAAQ;AAAA,MACxB,aAAaA,GAAU,eAAe;AAAA,MACtC,SAASA,GAAU,WAAW;AAAA,MAC9B,SAASA,GAAU,WAAW;AAAA,MAC9B,OAAOA,GAAU,SAAS;AAAA,MAC1B,KAAKA,GAAU,OAAO;AAAA,MACtB,aAAaiB,EAAY,OAAO,OAAOjB,IAAWuB,CAAG,KAAK,EAAK;AAAA,IAAA;AAAA,EACjE,CACD,GAEKC,IAAe,MAAM;AACzB,IAAAhB,EAAQiB,EAAgB,MAAM;AAAA,EAChC,GACMC,IAAW,OAAOC,MAA6B;AACnD,UAAMlB,EAAkBkB,GAAM,OAAMC,MAAa;AAC/C,YAAM,EAAE,aAAAX,GAAa,GAAGY,MAAYD,GAE9BE,IAAc;AAAA,QAClB,GAAGD;AAAA,QACH,gBAAgBZ,GAAa,SAAS,gBAAgB;AAAA,QACtD,eAAeA,GAAa,SAAS,eAAe;AAAA,MAAA;AAGtD,UAAIjB,KAAYA,EAAS,YAAY,QAAW;AAE9C,cAAM,EAAE,UAAU+B,EAAA,IAAiB,MAAMjB,EAAe;AAAA,UACtD,SAAS;AAAA,YACP,YAAYd,EAAS;AAAA,YACrB,aAAa,EAAE,GAAG8B,GAAa,SAAS9B,EAAS,QAAA;AAAA,UAAQ;AAAA,QAC3D,CACD;AACD,QAAAQ,EAAQiB,EAAgB,0BAA0BM,CAAY;AAAA,MAChE,OAAO;AAEL,cAAM,EAAE,UAAUA,EAAA,IAAiB,MAAMpB,EAAe;AAAA,UACtD,SAAS;AAAA,YACP,WAAAP;AAAA,YACA,aAAA0B;AAAA,UAAA;AAAA,QACF,CACD;AACD,QAAAtB,EAAQiB,EAAgB,0BAA0BM,CAAY;AAAA,MAChE;AAAA,IACF,CAAC;AAAA,EACH;AAEA,SACE,gBAAA7B,EAAC,WAAA,EAAQ,WAAAG,GACP,UAAA,gBAAAH,EAAC8B,KAAc,GAAGb,GAAS,SAAAD,GACzB,UAAA,gBAAAhB,EAAC+B,GAAA,EAAS,UAAUd,EAAQ,aAAaO,CAAQ,GAC/C,UAAA,gBAAAxB;AAAA,IAACgC;AAAA,IAAA;AAAA,MACC,OAAO,EAAE,cAAAV,GAAc,WAAWZ,KAAmBG,EAAA;AAAA,MAErD,UAAA,gBAAAb,EAACiC,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAA7B,KAGC,gBAAA8B,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAnC,EAACoC,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA,EACF,CACF,GACF,GACF;AAEJ;AAEO,SAASC,GAAa;AAAA,EAC3B,WAAArC;AAAA,EACA,YAAAsC;AAAA,EACA,WAAArC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGP;AACL,GAA+C;AAC7C,2BACG4C,GAAA,EAAe,GAAG5C,GAChB,UAAA2C,sBACE5C,GAAA,EAAiB,WAAAM,GAAsB,YAAAsC,GAAwB,WAAArC,GAC7D,UAAAC,GACH,IAEA,gBAAAJ,EAACC,KAAK,WAAAC,GAAsB,WAAAC,GACzB,UAAAC,GACH,GAEJ;AAEJ;"}
|
|
@@ -8,16 +8,14 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "../../../Base/useBase.js";
|
|
10
10
|
import "../../../../shared/constants.js";
|
|
11
|
-
import "classnames";
|
|
12
|
-
import "dompurify";
|
|
13
|
-
import "../../../../contexts/LocaleProvider/useLocale.js";
|
|
14
11
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
+
import "dompurify";
|
|
15
13
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
16
|
-
const [
|
|
14
|
+
const [F, d] = o(
|
|
17
15
|
"CompanyDocumentFormContext"
|
|
18
16
|
);
|
|
19
17
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
d as LocationsFormProvider,
|
|
19
|
+
F as useLocationsForm
|
|
22
20
|
};
|
|
23
21
|
//# sourceMappingURL=useLocationForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocationForm.js","sources":["../../../../../src/components/Company/Locations/LocationForm/useLocationForm.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype LocationsFormContextType = {\n isPending: boolean\n handleCancel: () => void\n}\n\nconst [useLocationsForm, LocationsFormProvider] = createCompoundContext<LocationsFormContextType>(\n 'CompanyDocumentFormContext',\n)\n\nexport { useLocationsForm, LocationsFormProvider }\n"],"names":["useLocationsForm","LocationsFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;AAOA,MAAM,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
|