@gusto/embedded-react-sdk 0.17.0 → 0.18.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 +35 -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/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/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/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/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/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/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 +2 -4
- package/dist/components/Company/FederalTaxes/Form.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 +30 -31
- 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/useContractorProfile.js +3 -4
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +3 -4
- package/dist/components/Contractor/Submit/Submit.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 +10 -9
- 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 +6 -6
- 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 +18 -19
- 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 +6 -6
- 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 +12 -13
- 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 +9 -11
- 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 +63 -44
- 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 +6 -6
- 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/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/PayrollConfiguration/PayrollConfiguration.js +64 -64
- 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/PayrollEditEmployeePresentation.js +127 -119
- 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 +4 -4
- 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 +117 -129
- 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 +89 -78
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +192 -211
- 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/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.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 +40 -38
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- 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/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/en/Company.PaySchedule.json.js +9 -9
- package/dist/i18n/en/Employee.Compensation.json.js +15 -15
- package/dist/i18n/en/Employee.Deductions.json.js +131 -105
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/i18n/en/Employee.FederalTaxes.json.js +9 -9
- package/dist/i18n/en/Employee.HomeAddress.json.js +1 -1
- package/dist/i18n/en/Employee.Taxes.json.js +25 -27
- package/dist/i18n/en/Employee.Taxes.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +23 -23
- package/dist/i18n/en/common.json.d.ts +2 -1
- package/dist/i18n/en/common.json.js +4 -4
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +16 -1
- package/package.json +9 -9
- 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/{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
|
@@ -3,11 +3,10 @@ import { z as t } from "zod";
|
|
|
3
3
|
import { useFormContext as c } from "react-hook-form";
|
|
4
4
|
import { useTranslation as o } from "react-i18next";
|
|
5
5
|
import { Grid as b } from "../../Common/Grid/Grid.js";
|
|
6
|
-
import "classnames";
|
|
7
6
|
import { removeNonDigits as S, addressInline as g } from "../../../helpers/formattedStrings.js";
|
|
8
7
|
import { usePlaceholderSSN as h, normalizeSSN as N } from "../../../helpers/ssn.js";
|
|
9
8
|
import { SSN_REGEX as D, nameValidation as m } from "../../../helpers/validations.js";
|
|
10
|
-
import { TextInputField as
|
|
9
|
+
import { TextInputField as i } from "../../Common/Fields/TextInputField/TextInputField.js";
|
|
11
10
|
import { SelectField as I } from "../../Common/Fields/SelectField/SelectField.js";
|
|
12
11
|
import { DatePickerField as u } from "../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
13
12
|
const v = t.object({
|
|
@@ -15,12 +14,12 @@ const v = t.object({
|
|
|
15
14
|
middleInitial: t.string().optional(),
|
|
16
15
|
lastName: m
|
|
17
16
|
});
|
|
18
|
-
function
|
|
17
|
+
function B() {
|
|
19
18
|
const { t: e } = o("Employee.Profile");
|
|
20
19
|
return /* @__PURE__ */ l(d, { children: [
|
|
21
20
|
/* @__PURE__ */ l(b, { gap: { base: 20, small: 8 }, gridTemplateColumns: { base: "1fr", small: ["1fr", 200] }, children: [
|
|
22
21
|
/* @__PURE__ */ a(
|
|
23
|
-
|
|
22
|
+
i,
|
|
24
23
|
{
|
|
25
24
|
name: "firstName",
|
|
26
25
|
isRequired: !0,
|
|
@@ -28,10 +27,10 @@ function C() {
|
|
|
28
27
|
errorMessage: e("validations.firstName")
|
|
29
28
|
}
|
|
30
29
|
),
|
|
31
|
-
/* @__PURE__ */ a(
|
|
30
|
+
/* @__PURE__ */ a(i, { name: "middleInitial", label: e("middleInitial") })
|
|
32
31
|
] }),
|
|
33
32
|
/* @__PURE__ */ a(
|
|
34
|
-
|
|
33
|
+
i,
|
|
35
34
|
{
|
|
36
35
|
name: "lastName",
|
|
37
36
|
isRequired: !0,
|
|
@@ -46,7 +45,7 @@ const O = t.object({
|
|
|
46
45
|
startDate: t.date().transform((e) => e.toISOString().split("T")[0]),
|
|
47
46
|
email: t.string().email()
|
|
48
47
|
});
|
|
49
|
-
function
|
|
48
|
+
function C({ companyLocations: e }) {
|
|
50
49
|
const { t: r } = o("Employee.Profile"), {
|
|
51
50
|
formState: { errors: n }
|
|
52
51
|
} = c();
|
|
@@ -55,9 +54,9 @@ function L({ companyLocations: e }) {
|
|
|
55
54
|
I,
|
|
56
55
|
{
|
|
57
56
|
name: "workAddress",
|
|
58
|
-
options: e.map((
|
|
59
|
-
value:
|
|
60
|
-
label: g(
|
|
57
|
+
options: e.map((s) => ({
|
|
58
|
+
value: s.uuid,
|
|
59
|
+
label: g(s)
|
|
61
60
|
})),
|
|
62
61
|
label: r("workAddress"),
|
|
63
62
|
description: r("workAddressDescription"),
|
|
@@ -77,7 +76,7 @@ function L({ companyLocations: e }) {
|
|
|
77
76
|
}
|
|
78
77
|
),
|
|
79
78
|
/* @__PURE__ */ a(
|
|
80
|
-
|
|
79
|
+
i,
|
|
81
80
|
{
|
|
82
81
|
name: "email",
|
|
83
82
|
label: r("email"),
|
|
@@ -93,15 +92,15 @@ const R = t.object({
|
|
|
93
92
|
ssn: t.string().transform((e) => S(e)).refine((e) => D.test(e)),
|
|
94
93
|
enableSsn: t.boolean()
|
|
95
94
|
});
|
|
96
|
-
function
|
|
97
|
-
const { setValue: n } = c(), { t:
|
|
95
|
+
function L({ employee: e, onChange: r }) {
|
|
96
|
+
const { setValue: n } = c(), { t: s } = o("Employee.Profile"), p = h(e?.hasSsn);
|
|
98
97
|
return /* @__PURE__ */ a(
|
|
99
|
-
|
|
98
|
+
i,
|
|
100
99
|
{
|
|
101
100
|
isRequired: !0,
|
|
102
101
|
name: "ssn",
|
|
103
|
-
label:
|
|
104
|
-
errorMessage:
|
|
102
|
+
label: s("ssnLabel"),
|
|
103
|
+
errorMessage: s("validations.ssn", { ns: "common" }),
|
|
105
104
|
placeholder: p,
|
|
106
105
|
transform: N,
|
|
107
106
|
onChange: (f) => {
|
|
@@ -113,7 +112,7 @@ function z({ employee: e, onChange: r }) {
|
|
|
113
112
|
const y = t.object({
|
|
114
113
|
dateOfBirth: t.date().transform((e) => e.toISOString().split("T")[0])
|
|
115
114
|
});
|
|
116
|
-
function
|
|
115
|
+
function z() {
|
|
117
116
|
const { t: e } = o("Employee.Profile");
|
|
118
117
|
return /* @__PURE__ */ a(
|
|
119
118
|
u,
|
|
@@ -130,13 +129,13 @@ v.merge(O).merge(R).merge(y).extend({
|
|
|
130
129
|
enableSsn: t.boolean()
|
|
131
130
|
});
|
|
132
131
|
export {
|
|
133
|
-
|
|
132
|
+
C as AdminInputs,
|
|
134
133
|
O as AdminInputsSchema,
|
|
135
|
-
|
|
134
|
+
z as DateOfBirthInput,
|
|
136
135
|
y as DateOfBirthSchema,
|
|
137
|
-
|
|
136
|
+
B as NameInputs,
|
|
138
137
|
v as NameInputsSchema,
|
|
139
|
-
|
|
138
|
+
L as SocialSecurityNumberInput,
|
|
140
139
|
R as SocialSecurityNumberSchema
|
|
141
140
|
};
|
|
142
141
|
//# sourceMappingURL=PersonalDetailsInputs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonalDetailsInputs.js","sources":["../../../../src/components/Employee/Profile/PersonalDetailsInputs.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { type Employee } from '@gusto/embedded-api/models/components/employee'\nimport { SelectField, TextInputField, Grid, DatePickerField } from '@/components/Common'\nimport { addressInline, removeNonDigits } from '@/helpers/formattedStrings'\nimport { normalizeSSN, usePlaceholderSSN } from '@/helpers/ssn'\nimport { nameValidation, SSN_REGEX } from '@/helpers/validations'\n\nexport const NameInputsSchema = z.object({\n firstName: nameValidation,\n middleInitial: z.string().optional(),\n lastName: nameValidation,\n})\n\nexport function NameInputs() {\n const { t } = useTranslation('Employee.Profile')\n\n return (\n <>\n <Grid gap={{ base: 20, small: 8 }} gridTemplateColumns={{ base: '1fr', small: ['1fr', 200] }}>\n <TextInputField\n name=\"firstName\"\n isRequired\n label={t('firstName')}\n errorMessage={t('validations.firstName')}\n />\n <TextInputField name=\"middleInitial\" label={t('middleInitial')} />\n </Grid>\n <TextInputField\n name=\"lastName\"\n isRequired\n label={t('lastName')}\n errorMessage={t('validations.lastName')}\n />\n </>\n )\n}\n\nexport const AdminInputsSchema = z.object({\n workAddress: z.string().min(1),\n startDate: z.date().transform(date => date.toISOString().split('T')[0]),\n email: z.string().email(),\n})\n\ntype AdminInputsSchemaType = z.infer<typeof AdminInputsSchema>\n\ninterface AdminInputsProps {\n companyLocations: Location[]\n}\n\nexport function AdminInputs({ companyLocations }: AdminInputsProps) {\n const { t } = useTranslation('Employee.Profile')\n const {\n formState: { errors },\n } = useFormContext<AdminInputsSchemaType>()\n\n return (\n <>\n <SelectField\n name=\"workAddress\"\n options={companyLocations.map(location => ({\n value: location.uuid,\n label: addressInline(location),\n }))}\n label={t('workAddress')}\n description={t('workAddressDescription')}\n placeholder={t('workAddressPlaceholder')}\n errorMessage={t('validations.location', { ns: 'common' })}\n isRequired\n />\n <DatePickerField\n name=\"startDate\"\n label={t('startDateLabel')}\n description={t('startDateDescription')}\n isRequired\n errorMessage={\n errors.startDate?.type === 'custom'\n ? t('validations.startDateOutOfRange')\n : t('validations.startDate')\n }\n />\n <TextInputField\n name=\"email\"\n label={t('email')}\n description={t('emailDescription')}\n errorMessage={t('validations.email')}\n isRequired\n type=\"email\"\n />\n </>\n )\n}\n\nexport const SocialSecurityNumberSchema = z.object({\n ssn: z\n .string()\n .transform(input => removeNonDigits(input))\n .refine(input => SSN_REGEX.test(input)),\n enableSsn: z.boolean(),\n})\n\ntype SocialSecurityNumberSchemaType = z.infer<typeof SocialSecurityNumberSchema>\n\ninterface SocialSecurityNumberInputProps {\n employee?: Employee\n onChange?: (updatedValue: string) => void\n}\n\nexport function SocialSecurityNumberInput({ employee, onChange }: SocialSecurityNumberInputProps) {\n const { setValue } = useFormContext<SocialSecurityNumberSchemaType>()\n const { t } = useTranslation('Employee.Profile')\n const placeholderSSN = usePlaceholderSSN(employee?.hasSsn)\n return (\n <TextInputField\n isRequired\n name=\"ssn\"\n label={t('ssnLabel')}\n errorMessage={t('validations.ssn', { ns: 'common' })}\n placeholder={placeholderSSN}\n transform={normalizeSSN}\n onChange={updatedValue => {\n setValue('enableSsn', true)\n onChange?.(updatedValue)\n }}\n />\n )\n}\n\nexport const DateOfBirthSchema = z.object({\n dateOfBirth: z.date().transform(date => date.toISOString().split('T')[0]),\n})\n\nexport function DateOfBirthInput() {\n const { t } = useTranslation('Employee.Profile')\n return (\n <DatePickerField\n name=\"dateOfBirth\"\n label={t('dobLabel')}\n isRequired\n errorMessage={t('validations.dob', { ns: 'common' })}\n />\n )\n}\n\n// All possible inputs for PersonalDetails forms\nconst PersonalDetailsTotalSchema = NameInputsSchema.merge(AdminInputsSchema)\n .merge(SocialSecurityNumberSchema)\n .merge(DateOfBirthSchema)\n .extend({\n selfOnboarding: z.boolean(),\n enableSsn: z.boolean(),\n })\n\ntype NullableDatesMapper<Source> = {\n [Property in keyof Source]: Source[Property] extends Date\n ? Source[Property] | null\n : Source[Property]\n}\n\nexport type PersonalDetailsPayload = z.infer<typeof PersonalDetailsTotalSchema>\n\n//Typescript magic to mark date fields as nullable for correct defaultvalues\nexport type PersonalDetailsInputs = NullableDatesMapper<z.input<typeof PersonalDetailsTotalSchema>>\n"],"names":["NameInputsSchema","z","nameValidation","NameInputs","t","useTranslation","jsxs","Fragment","Grid","jsx","TextInputField","AdminInputsSchema","date","AdminInputs","companyLocations","errors","useFormContext","SelectField","location","addressInline","DatePickerField","SocialSecurityNumberSchema","input","removeNonDigits","SSN_REGEX","SocialSecurityNumberInput","employee","onChange","setValue","placeholderSSN","usePlaceholderSSN","normalizeSSN","updatedValue","DateOfBirthSchema","DateOfBirthInput"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PersonalDetailsInputs.js","sources":["../../../../src/components/Employee/Profile/PersonalDetailsInputs.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { type Employee } from '@gusto/embedded-api/models/components/employee'\nimport { SelectField, TextInputField, Grid, DatePickerField } from '@/components/Common'\nimport { addressInline, removeNonDigits } from '@/helpers/formattedStrings'\nimport { normalizeSSN, usePlaceholderSSN } from '@/helpers/ssn'\nimport { nameValidation, SSN_REGEX } from '@/helpers/validations'\n\nexport const NameInputsSchema = z.object({\n firstName: nameValidation,\n middleInitial: z.string().optional(),\n lastName: nameValidation,\n})\n\nexport function NameInputs() {\n const { t } = useTranslation('Employee.Profile')\n\n return (\n <>\n <Grid gap={{ base: 20, small: 8 }} gridTemplateColumns={{ base: '1fr', small: ['1fr', 200] }}>\n <TextInputField\n name=\"firstName\"\n isRequired\n label={t('firstName')}\n errorMessage={t('validations.firstName')}\n />\n <TextInputField name=\"middleInitial\" label={t('middleInitial')} />\n </Grid>\n <TextInputField\n name=\"lastName\"\n isRequired\n label={t('lastName')}\n errorMessage={t('validations.lastName')}\n />\n </>\n )\n}\n\nexport const AdminInputsSchema = z.object({\n workAddress: z.string().min(1),\n startDate: z.date().transform(date => date.toISOString().split('T')[0]),\n email: z.string().email(),\n})\n\ntype AdminInputsSchemaType = z.infer<typeof AdminInputsSchema>\n\ninterface AdminInputsProps {\n companyLocations: Location[]\n}\n\nexport function AdminInputs({ companyLocations }: AdminInputsProps) {\n const { t } = useTranslation('Employee.Profile')\n const {\n formState: { errors },\n } = useFormContext<AdminInputsSchemaType>()\n\n return (\n <>\n <SelectField\n name=\"workAddress\"\n options={companyLocations.map(location => ({\n value: location.uuid,\n label: addressInline(location),\n }))}\n label={t('workAddress')}\n description={t('workAddressDescription')}\n placeholder={t('workAddressPlaceholder')}\n errorMessage={t('validations.location', { ns: 'common' })}\n isRequired\n />\n <DatePickerField\n name=\"startDate\"\n label={t('startDateLabel')}\n description={t('startDateDescription')}\n isRequired\n errorMessage={\n errors.startDate?.type === 'custom'\n ? t('validations.startDateOutOfRange')\n : t('validations.startDate')\n }\n />\n <TextInputField\n name=\"email\"\n label={t('email')}\n description={t('emailDescription')}\n errorMessage={t('validations.email')}\n isRequired\n type=\"email\"\n />\n </>\n )\n}\n\nexport const SocialSecurityNumberSchema = z.object({\n ssn: z\n .string()\n .transform(input => removeNonDigits(input))\n .refine(input => SSN_REGEX.test(input)),\n enableSsn: z.boolean(),\n})\n\ntype SocialSecurityNumberSchemaType = z.infer<typeof SocialSecurityNumberSchema>\n\ninterface SocialSecurityNumberInputProps {\n employee?: Employee\n onChange?: (updatedValue: string) => void\n}\n\nexport function SocialSecurityNumberInput({ employee, onChange }: SocialSecurityNumberInputProps) {\n const { setValue } = useFormContext<SocialSecurityNumberSchemaType>()\n const { t } = useTranslation('Employee.Profile')\n const placeholderSSN = usePlaceholderSSN(employee?.hasSsn)\n return (\n <TextInputField\n isRequired\n name=\"ssn\"\n label={t('ssnLabel')}\n errorMessage={t('validations.ssn', { ns: 'common' })}\n placeholder={placeholderSSN}\n transform={normalizeSSN}\n onChange={updatedValue => {\n setValue('enableSsn', true)\n onChange?.(updatedValue)\n }}\n />\n )\n}\n\nexport const DateOfBirthSchema = z.object({\n dateOfBirth: z.date().transform(date => date.toISOString().split('T')[0]),\n})\n\nexport function DateOfBirthInput() {\n const { t } = useTranslation('Employee.Profile')\n return (\n <DatePickerField\n name=\"dateOfBirth\"\n label={t('dobLabel')}\n isRequired\n errorMessage={t('validations.dob', { ns: 'common' })}\n />\n )\n}\n\n// All possible inputs for PersonalDetails forms\nconst PersonalDetailsTotalSchema = NameInputsSchema.merge(AdminInputsSchema)\n .merge(SocialSecurityNumberSchema)\n .merge(DateOfBirthSchema)\n .extend({\n selfOnboarding: z.boolean(),\n enableSsn: z.boolean(),\n })\n\ntype NullableDatesMapper<Source> = {\n [Property in keyof Source]: Source[Property] extends Date\n ? Source[Property] | null\n : Source[Property]\n}\n\nexport type PersonalDetailsPayload = z.infer<typeof PersonalDetailsTotalSchema>\n\n//Typescript magic to mark date fields as nullable for correct defaultvalues\nexport type PersonalDetailsInputs = NullableDatesMapper<z.input<typeof PersonalDetailsTotalSchema>>\n"],"names":["NameInputsSchema","z","nameValidation","NameInputs","t","useTranslation","jsxs","Fragment","Grid","jsx","TextInputField","AdminInputsSchema","date","AdminInputs","companyLocations","errors","useFormContext","SelectField","location","addressInline","DatePickerField","SocialSecurityNumberSchema","input","removeNonDigits","SSN_REGEX","SocialSecurityNumberInput","employee","onChange","setValue","placeholderSSN","usePlaceholderSSN","normalizeSSN","updatedValue","DateOfBirthSchema","DateOfBirthInput"],"mappings":"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"}
|
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { zodResolver as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useForm as
|
|
5
|
-
import { useLocationsGetSuspense as
|
|
6
|
-
import { useEmployeesCreateMutation as
|
|
7
|
-
import { useEmployeesGetSuspense as
|
|
8
|
-
import { useEmployeeAddressesGetSuspense as
|
|
9
|
-
import { useEmployeeAddressesCreateMutation as
|
|
10
|
-
import { useEmployeeAddressesUpdateMutation as
|
|
11
|
-
import { useEmployeeAddressesUpdateWorkAddressMutation as
|
|
12
|
-
import { useEmployeesUpdateMutation as
|
|
13
|
-
import { useEmployeeAddressesGetWorkAddressesSuspense as
|
|
14
|
-
import { useEmployeeAddressesCreateWorkAddressMutation as
|
|
15
|
-
import { RFCDate as
|
|
16
|
-
import { useEmployeesUpdateOnboardingStatusMutation as
|
|
17
|
-
import { AdminPersonalDetailsSchema as
|
|
18
|
-
import { SelfPersonalDetailsSchema as
|
|
19
|
-
import { Head as
|
|
20
|
-
import { Actions as
|
|
21
|
-
import { HomeAddressSchema as
|
|
22
|
-
import { WorkAddress as
|
|
23
|
-
import { ProfileProvider as
|
|
24
|
-
import { getEmployeeAddressForProfile as
|
|
25
|
-
import { Grid as
|
|
26
|
-
import { Form as
|
|
27
|
-
import { BaseComponent as
|
|
28
|
-
import { useBase as
|
|
29
|
-
import { useI18n as
|
|
30
|
-
import { EmployeeOnboardingStatus as
|
|
31
|
-
import { useFlow as
|
|
32
|
-
import { ensureRequired as
|
|
33
|
-
function
|
|
34
|
-
return /* @__PURE__ */ t(
|
|
1
|
+
import { jsx as t, jsxs as k, Fragment as Ee } from "react/jsx-runtime";
|
|
2
|
+
import { zodResolver as fe } from "@hookform/resolvers/zod";
|
|
3
|
+
import { useState as W, useRef as he, useEffect as Oe } from "react";
|
|
4
|
+
import { useForm as Se, useWatch as De, FormProvider as ge } from "react-hook-form";
|
|
5
|
+
import { useLocationsGetSuspense as Pe } from "@gusto/embedded-api/react-query/locationsGet";
|
|
6
|
+
import { useEmployeesCreateMutation as be } from "@gusto/embedded-api/react-query/employeesCreate";
|
|
7
|
+
import { useEmployeesGetSuspense as Ne } from "@gusto/embedded-api/react-query/employeesGet";
|
|
8
|
+
import { useEmployeeAddressesGetSuspense as _e } from "@gusto/embedded-api/react-query/employeeAddressesGet";
|
|
9
|
+
import { useEmployeeAddressesCreateMutation as Ie } from "@gusto/embedded-api/react-query/employeeAddressesCreate";
|
|
10
|
+
import { useEmployeeAddressesUpdateMutation as we } from "@gusto/embedded-api/react-query/employeeAddressesUpdate";
|
|
11
|
+
import { useEmployeeAddressesUpdateWorkAddressMutation as Me } from "@gusto/embedded-api/react-query/employeeAddressesUpdateWorkAddress";
|
|
12
|
+
import { useEmployeesUpdateMutation as Be } from "@gusto/embedded-api/react-query/employeesUpdate";
|
|
13
|
+
import { useEmployeeAddressesGetWorkAddressesSuspense as Ce } from "@gusto/embedded-api/react-query/employeeAddressesGetWorkAddresses";
|
|
14
|
+
import { useEmployeeAddressesCreateWorkAddressMutation as Re } from "@gusto/embedded-api/react-query/employeeAddressesCreateWorkAddress";
|
|
15
|
+
import { RFCDate as v } from "@gusto/embedded-api/types/rfcdate";
|
|
16
|
+
import { useEmployeesUpdateOnboardingStatusMutation as Le } from "@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus";
|
|
17
|
+
import { AdminPersonalDetailsSchema as T, AdminSelfOnboardingPersonalDetailsSchema as ke, AdminPersonalDetails as We } from "./AdminPersonalDetails.js";
|
|
18
|
+
import { SelfPersonalDetailsSchema as ve, SelfPersonalDetails as Te } from "./SelfPersonalDetails.js";
|
|
19
|
+
import { Head as Ge } from "./Head.js";
|
|
20
|
+
import { Actions as Ue } from "./Actions.js";
|
|
21
|
+
import { HomeAddressSchema as G, HomeAddressSchemaWithCompletedOnboarding as qe, HomeAddress as He } from "./HomeAddress.js";
|
|
22
|
+
import { WorkAddress as Fe } from "./WorkAddress.js";
|
|
23
|
+
import { ProfileProvider as Ve } from "./useProfile.js";
|
|
24
|
+
import { getEmployeeAddressForProfile as Ye } from "./getEmployeeAddressForProfile.js";
|
|
25
|
+
import { Grid as ze } from "../../Common/Grid/Grid.js";
|
|
26
|
+
import { Form as xe } from "../../Common/Form/Form.js";
|
|
27
|
+
import { BaseComponent as je } from "../../Base/Base.js";
|
|
28
|
+
import { useBase as Ke } from "../../Base/useBase.js";
|
|
29
|
+
import { useI18n as U, useComponentDictionary as Je } from "../../../i18n/I18n.js";
|
|
30
|
+
import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as Qe, componentEvents as d } from "../../../shared/constants.js";
|
|
31
|
+
import { useFlow as Xe } from "../../Flow/useFlow.js";
|
|
32
|
+
import { ensureRequired as Ze } from "../../../helpers/ensureRequired.js";
|
|
33
|
+
function $e(r) {
|
|
34
|
+
return /* @__PURE__ */ t(je, { ...r, children: r.employeeId ? /* @__PURE__ */ t(er, { ...r, employeeId: r.employeeId, children: r.children }) : /* @__PURE__ */ t(q, { ...r, children: r.children }) });
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function er({ employeeId: r, ...m }) {
|
|
37
37
|
const {
|
|
38
|
-
data: { employee:
|
|
39
|
-
} =
|
|
40
|
-
data: { employeeAddressList:
|
|
41
|
-
} =
|
|
42
|
-
data: { employeeWorkAddressesList:
|
|
43
|
-
} =
|
|
38
|
+
data: { employee: p }
|
|
39
|
+
} = Ne({ employeeId: r }), {
|
|
40
|
+
data: { employeeAddressList: y }
|
|
41
|
+
} = _e({ employeeId: r }), {
|
|
42
|
+
data: { employeeWorkAddressesList: l }
|
|
43
|
+
} = Ce({ employeeId: r });
|
|
44
44
|
return /* @__PURE__ */ t(
|
|
45
|
-
|
|
45
|
+
q,
|
|
46
46
|
{
|
|
47
|
-
...
|
|
48
|
-
employee:
|
|
49
|
-
homeAddresses:
|
|
50
|
-
workAddresses:
|
|
47
|
+
...m,
|
|
48
|
+
employee: p,
|
|
49
|
+
homeAddresses: y,
|
|
50
|
+
workAddresses: l
|
|
51
51
|
}
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
|
-
const
|
|
54
|
+
const g = (r) => r?.onboarded || r?.onboardingStatus === i.ONBOARDING_COMPLETED || r?.onboardingStatus === i.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW || r?.onboardingStatus === i.SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE, q = ({
|
|
55
55
|
isAdmin: r = !1,
|
|
56
|
-
isSelfOnboardingEnabled:
|
|
57
|
-
dictionary:
|
|
58
|
-
...
|
|
56
|
+
isSelfOnboardingEnabled: m = !0,
|
|
57
|
+
dictionary: p,
|
|
58
|
+
...y
|
|
59
59
|
}) => {
|
|
60
|
-
|
|
60
|
+
U("Employee.Profile"), U("Employee.HomeAddress"), Je("Employee.Profile", p);
|
|
61
61
|
const {
|
|
62
|
-
companyId:
|
|
63
|
-
employee:
|
|
64
|
-
homeAddresses:
|
|
65
|
-
workAddresses:
|
|
66
|
-
children:
|
|
67
|
-
className:
|
|
62
|
+
companyId: l,
|
|
63
|
+
employee: u,
|
|
64
|
+
homeAddresses: H,
|
|
65
|
+
workAddresses: P,
|
|
66
|
+
children: b,
|
|
67
|
+
className: F = "",
|
|
68
68
|
defaultValues: s
|
|
69
|
-
} =
|
|
70
|
-
mutateAsync:
|
|
71
|
-
isPending:
|
|
72
|
-
} =
|
|
73
|
-
employee:
|
|
74
|
-
homeAddress:
|
|
75
|
-
workAddress:
|
|
76
|
-
}),
|
|
69
|
+
} = y, { onEvent: n, baseSubmitHandler: V } = Ke(), [Y, N] = W(T), [z, _] = W(G), { data: x } = Pe({ companyId: l }), j = x.locationList, { mutateAsync: K, isPending: J } = be(), { mutateAsync: Q, isPending: X } = Be(), { mutateAsync: Z, isPending: $ } = Re(), { mutateAsync: ee, isPending: re } = Me(), { mutateAsync: te, isPending: oe } = Ie(), { mutateAsync: se, isPending: ne } = we(), {
|
|
70
|
+
mutateAsync: de,
|
|
71
|
+
isPending: ie
|
|
72
|
+
} = Le(), I = { employee: u, workAddresses: P }, ae = Ye(H), me = I.workAddresses?.find((c) => c.active), e = he({
|
|
73
|
+
employee: I.employee,
|
|
74
|
+
homeAddress: ae,
|
|
75
|
+
workAddress: me
|
|
76
|
+
}), S = {
|
|
77
77
|
firstName: e.current.employee?.firstName ?? s?.employee?.firstName ?? "",
|
|
78
78
|
middleInitial: e.current.employee?.middleInitial ?? s?.employee?.middleInitial ?? "",
|
|
79
79
|
lastName: e.current.employee?.lastName ?? s?.employee?.lastName ?? "",
|
|
@@ -88,62 +88,65 @@ const C = ({
|
|
|
88
88
|
zip: e.current.homeAddress?.zip ?? s?.homeAddress?.zip ?? "",
|
|
89
89
|
state: e.current.homeAddress?.state ?? s?.homeAddress?.state ?? "",
|
|
90
90
|
courtesyWithholding: e.current.homeAddress?.courtesyWithholding ?? !1
|
|
91
|
-
},
|
|
92
|
-
...
|
|
93
|
-
selfOnboarding:
|
|
91
|
+
}, le = e.current.employee?.onboarded || e.current.employee?.onboardingStatus === i.ONBOARDING_COMPLETED || e.current.employee?.onboardingStatus !== void 0 && e.current.employee.onboardingStatus !== i.ADMIN_ONBOARDING_INCOMPLETE ? { ...S, enableSsn: !1, selfOnboarding: !0 } : {
|
|
92
|
+
...S,
|
|
93
|
+
selfOnboarding: m ? e.current.employee?.onboardingStatus ? (
|
|
94
94
|
// @ts-expect-error: onboarding_status during runtime can be one of self onboarding statuses
|
|
95
|
-
|
|
95
|
+
Qe.has(e.current.employee.onboarding_status)
|
|
96
96
|
) : s?.inviteEmployeeDefault ?? !1 : !1,
|
|
97
97
|
enableSsn: !e.current.employee?.hasSsn,
|
|
98
98
|
ssn: ""
|
|
99
|
-
},
|
|
100
|
-
...
|
|
99
|
+
}, ue = {
|
|
100
|
+
...S,
|
|
101
101
|
enableSsn: !e.current.employee?.hasSsn,
|
|
102
102
|
ssn: ""
|
|
103
|
-
},
|
|
103
|
+
}, D = Se({
|
|
104
104
|
// @ts-expect-error: Complex discriminated union schema causes type inference issues with zodResolver v5.2.1
|
|
105
|
-
resolver:
|
|
105
|
+
resolver: fe(
|
|
106
106
|
// @ts-expect-error: Zod discriminated union intersection incompatible with zodResolver v5.2.1
|
|
107
|
-
(r ?
|
|
107
|
+
(r ? Y : ve).and(z)
|
|
108
108
|
),
|
|
109
|
-
defaultValues: r ?
|
|
110
|
-
}), { handleSubmit:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
109
|
+
defaultValues: r ? le : ue
|
|
110
|
+
}), { handleSubmit: ce } = D, A = De({ control: D.control, name: "selfOnboarding" });
|
|
111
|
+
Oe(() => {
|
|
112
|
+
if (r) {
|
|
113
|
+
const c = g(u);
|
|
114
|
+
N(A && !c ? ke : T), _(A && c ? qe : G);
|
|
115
|
+
}
|
|
116
|
+
}, [A, r, u?.onboardingStatus, u?.onboarded]);
|
|
117
|
+
const pe = async (c) => {
|
|
118
|
+
await V(c, async (a) => {
|
|
119
|
+
const { workAddress: w, startDate: Ae, selfOnboarding: h, ...O } = a;
|
|
117
120
|
if (e.current.employee) {
|
|
118
|
-
if (r && (
|
|
119
|
-
const { employeeOnboardingStatus:
|
|
121
|
+
if (r && (h && e.current.employee.onboardingStatus === i.ADMIN_ONBOARDING_INCOMPLETE || !h && e.current.employee.onboardingStatus === i.SELF_ONBOARDING_PENDING_INVITE)) {
|
|
122
|
+
const { employeeOnboardingStatus: E } = await de({
|
|
120
123
|
request: {
|
|
121
124
|
employeeId: e.current.employee.uuid,
|
|
122
125
|
requestBody: {
|
|
123
|
-
onboardingStatus:
|
|
126
|
+
onboardingStatus: h ? i.SELF_ONBOARDING_PENDING_INVITE : i.ADMIN_ONBOARDING_INCOMPLETE
|
|
124
127
|
}
|
|
125
128
|
}
|
|
126
129
|
});
|
|
127
130
|
e.current.employee = {
|
|
128
131
|
...e.current.employee,
|
|
129
|
-
onboardingStatus:
|
|
130
|
-
}, n(d.EMPLOYEE_ONBOARDING_STATUS_UPDATED,
|
|
132
|
+
onboardingStatus: E.onboardingStatus
|
|
133
|
+
}, n(d.EMPLOYEE_ONBOARDING_STATUS_UPDATED, E);
|
|
131
134
|
}
|
|
132
|
-
const { employee: o } = await
|
|
135
|
+
const { employee: o } = await Q({
|
|
133
136
|
request: {
|
|
134
137
|
employeeId: e.current.employee.uuid,
|
|
135
|
-
requestBody: { ...
|
|
138
|
+
requestBody: { ...O, version: e.current.employee.version }
|
|
136
139
|
}
|
|
137
140
|
});
|
|
138
141
|
e.current = { ...e.current, employee: o }, n(d.EMPLOYEE_UPDATED, o);
|
|
139
142
|
} else {
|
|
140
|
-
const { employee: o } = await
|
|
143
|
+
const { employee: o } = await K({
|
|
141
144
|
request: {
|
|
142
|
-
companyId:
|
|
145
|
+
companyId: l,
|
|
143
146
|
requestBody: {
|
|
144
|
-
...
|
|
145
|
-
selfOnboarding:
|
|
146
|
-
dateOfBirth:
|
|
147
|
+
...O,
|
|
148
|
+
selfOnboarding: h,
|
|
149
|
+
dateOfBirth: O.dateOfBirth ? new v(O.dateOfBirth) : void 0
|
|
147
150
|
}
|
|
148
151
|
}
|
|
149
152
|
});
|
|
@@ -151,60 +154,63 @@ const C = ({
|
|
|
151
154
|
}
|
|
152
155
|
if (typeof e.current.employee?.uuid != "string")
|
|
153
156
|
throw new Error("Employee id is not available");
|
|
154
|
-
|
|
155
|
-
|
|
157
|
+
const M = g(
|
|
158
|
+
e.current.employee
|
|
159
|
+
);
|
|
160
|
+
if ((!r || !A || M) && (!a.selfOnboarding || M) && "street1" in a && "city" in a && "state" in a && "zip" in a) {
|
|
161
|
+
const { street1: o, street2: E, city: B, state: C, zip: R, courtesyWithholding: L } = a;
|
|
156
162
|
if (e.current.homeAddress) {
|
|
157
|
-
const { employeeAddress:
|
|
163
|
+
const { employeeAddress: f } = await se({
|
|
158
164
|
request: {
|
|
159
165
|
homeAddressUuid: e.current.homeAddress.uuid,
|
|
160
166
|
requestBody: {
|
|
161
167
|
version: e.current.homeAddress.version,
|
|
162
168
|
street1: o,
|
|
163
|
-
street2:
|
|
164
|
-
city:
|
|
165
|
-
state:
|
|
166
|
-
zip:
|
|
167
|
-
courtesyWithholding:
|
|
169
|
+
street2: E,
|
|
170
|
+
city: B,
|
|
171
|
+
state: C,
|
|
172
|
+
zip: R,
|
|
173
|
+
courtesyWithholding: L
|
|
168
174
|
}
|
|
169
175
|
}
|
|
170
176
|
});
|
|
171
|
-
e.current = { ...e.current, homeAddress:
|
|
177
|
+
e.current = { ...e.current, homeAddress: f }, n(d.EMPLOYEE_HOME_ADDRESS_UPDATED, f);
|
|
172
178
|
} else {
|
|
173
|
-
const { employeeAddress:
|
|
179
|
+
const { employeeAddress: f } = await te({
|
|
174
180
|
request: {
|
|
175
181
|
employeeId: e.current.employee.uuid,
|
|
176
182
|
requestBody: {
|
|
177
183
|
street1: o,
|
|
178
|
-
street2:
|
|
179
|
-
city:
|
|
180
|
-
state:
|
|
181
|
-
zip:
|
|
182
|
-
courtesyWithholding:
|
|
184
|
+
street2: E,
|
|
185
|
+
city: B,
|
|
186
|
+
state: C,
|
|
187
|
+
zip: R,
|
|
188
|
+
courtesyWithholding: L
|
|
183
189
|
}
|
|
184
190
|
}
|
|
185
191
|
});
|
|
186
|
-
e.current = { ...e.current, homeAddress:
|
|
192
|
+
e.current = { ...e.current, homeAddress: f }, n(d.EMPLOYEE_HOME_ADDRESS_CREATED, f);
|
|
187
193
|
}
|
|
188
194
|
}
|
|
189
195
|
if (r)
|
|
190
196
|
if (e.current.workAddress) {
|
|
191
|
-
const { employeeWorkAddress: o } = await
|
|
197
|
+
const { employeeWorkAddress: o } = await ee({
|
|
192
198
|
request: {
|
|
193
199
|
workAddressUuid: e.current.workAddress.uuid,
|
|
194
200
|
requestBody: {
|
|
195
201
|
version: e.current.workAddress.version,
|
|
196
|
-
locationUuid:
|
|
202
|
+
locationUuid: w
|
|
197
203
|
}
|
|
198
204
|
}
|
|
199
205
|
});
|
|
200
206
|
e.current = { ...e.current, workAddress: o }, n(d.EMPLOYEE_WORK_ADDRESS_UPDATED, o);
|
|
201
207
|
} else {
|
|
202
|
-
const { employeeWorkAddress: o } = await
|
|
208
|
+
const { employeeWorkAddress: o } = await Z({
|
|
203
209
|
request: {
|
|
204
210
|
employeeId: e.current.employee?.uuid,
|
|
205
211
|
requestBody: {
|
|
206
|
-
locationUuid:
|
|
207
|
-
effectiveDate: new
|
|
212
|
+
locationUuid: w,
|
|
213
|
+
effectiveDate: new v(a.startDate || /* @__PURE__ */ new Date())
|
|
208
214
|
}
|
|
209
215
|
}
|
|
210
216
|
});
|
|
@@ -212,53 +218,54 @@ const C = ({
|
|
|
212
218
|
}
|
|
213
219
|
n(d.EMPLOYEE_PROFILE_DONE, {
|
|
214
220
|
...e.current.employee,
|
|
215
|
-
startDate:
|
|
221
|
+
startDate: Ae
|
|
216
222
|
});
|
|
217
223
|
});
|
|
218
|
-
},
|
|
224
|
+
}, ye = () => {
|
|
219
225
|
n(d.CANCEL);
|
|
220
226
|
};
|
|
221
|
-
return /* @__PURE__ */ t("section", { className:
|
|
222
|
-
|
|
227
|
+
return /* @__PURE__ */ t("section", { className: F, children: /* @__PURE__ */ t(
|
|
228
|
+
Ve,
|
|
223
229
|
{
|
|
224
230
|
value: {
|
|
225
|
-
companyLocations:
|
|
226
|
-
workAddresses:
|
|
231
|
+
companyLocations: j,
|
|
232
|
+
workAddresses: P,
|
|
227
233
|
employee: e.current.employee ?? void 0,
|
|
228
|
-
isSelfOnboardingIntended:
|
|
229
|
-
handleCancel:
|
|
234
|
+
isSelfOnboardingIntended: A,
|
|
235
|
+
handleCancel: ye,
|
|
230
236
|
isAdmin: r,
|
|
231
|
-
isSelfOnboardingEnabled:
|
|
232
|
-
|
|
237
|
+
isSelfOnboardingEnabled: m,
|
|
238
|
+
hasCompletedSelfOnboarding: g(e.current.employee),
|
|
239
|
+
isPending: X || re || oe || ne || J || $ || ie
|
|
233
240
|
},
|
|
234
|
-
children: /* @__PURE__ */ t(
|
|
235
|
-
/* @__PURE__ */
|
|
236
|
-
/* @__PURE__ */ t(
|
|
237
|
-
/* @__PURE__ */ t(ke, {}),
|
|
238
|
-
/* @__PURE__ */ t(Re, {}),
|
|
241
|
+
children: /* @__PURE__ */ t(ge, { ...D, children: /* @__PURE__ */ t(xe, { onSubmit: ce(pe), children: b || /* @__PURE__ */ k(Ee, { children: [
|
|
242
|
+
/* @__PURE__ */ k(ze, { gridTemplateColumns: "1fr", gap: 24, children: [
|
|
243
|
+
/* @__PURE__ */ t(Ge, {}),
|
|
239
244
|
/* @__PURE__ */ t(We, {}),
|
|
240
|
-
/* @__PURE__ */ t(
|
|
245
|
+
/* @__PURE__ */ t(Te, {}),
|
|
246
|
+
/* @__PURE__ */ t(He, {}),
|
|
247
|
+
/* @__PURE__ */ t(Fe, {})
|
|
241
248
|
] }),
|
|
242
|
-
/* @__PURE__ */ t(
|
|
249
|
+
/* @__PURE__ */ t(Ue, {})
|
|
243
250
|
] }) }) })
|
|
244
251
|
}
|
|
245
252
|
) });
|
|
246
|
-
},
|
|
247
|
-
const { companyId: r, employeeId:
|
|
253
|
+
}, Lr = () => {
|
|
254
|
+
const { companyId: r, employeeId: m, onEvent: p, isAdmin: y, defaultValues: l, isSelfOnboardingEnabled: u } = Xe();
|
|
248
255
|
return /* @__PURE__ */ t(
|
|
249
|
-
|
|
256
|
+
$e,
|
|
250
257
|
{
|
|
251
|
-
companyId:
|
|
252
|
-
employeeId:
|
|
253
|
-
onEvent:
|
|
254
|
-
isAdmin:
|
|
255
|
-
defaultValues:
|
|
256
|
-
isSelfOnboardingEnabled:
|
|
258
|
+
companyId: Ze(r),
|
|
259
|
+
employeeId: m,
|
|
260
|
+
onEvent: p,
|
|
261
|
+
isAdmin: y,
|
|
262
|
+
defaultValues: l?.profile,
|
|
263
|
+
isSelfOnboardingEnabled: u
|
|
257
264
|
}
|
|
258
265
|
);
|
|
259
266
|
};
|
|
260
267
|
export {
|
|
261
|
-
|
|
262
|
-
|
|
268
|
+
$e as Profile,
|
|
269
|
+
Lr as ProfileContextual
|
|
263
270
|
};
|
|
264
271
|
//# sourceMappingURL=Profile.js.map
|