@gusto/embedded-react-sdk 0.8.1 → 0.8.2
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 +11 -3
- package/dist/components/Base/Base.d.ts +6 -5
- package/dist/components/Base/Base.js +40 -39
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/index.d.ts +1 -0
- package/dist/components/Common/ActionsLayout/index.d.ts +1 -0
- package/dist/components/Common/DataView/DataCards/index.d.ts +1 -0
- package/dist/components/Common/DataView/index.d.ts +1 -0
- package/dist/components/Common/DocumentList/index.d.ts +1 -0
- package/dist/components/Common/DocumentViewer/index.d.ts +1 -0
- package/dist/components/Common/FieldCaption/index.d.ts +1 -0
- package/dist/components/Common/FieldDescription/index.d.ts +1 -0
- package/dist/components/Common/FieldErrorMessage/index.d.ts +1 -0
- package/dist/components/Common/FieldLayout/index.d.ts +1 -0
- package/dist/components/Common/Fields/CheckboxField/index.d.ts +1 -0
- package/dist/components/Common/Fields/CheckboxGroupField/index.d.ts +1 -0
- package/dist/components/Common/Fields/ComboBoxField/index.d.ts +1 -0
- package/dist/components/Common/Fields/DatePickerField/index.d.ts +1 -0
- package/dist/components/Common/Fields/NumberInputField/index.d.ts +1 -0
- package/dist/components/Common/Fields/RadioGroupField/index.d.ts +1 -0
- package/dist/components/Common/Fields/SelectField/index.d.ts +1 -0
- package/dist/components/Common/Fields/SwitchField/index.d.ts +1 -0
- package/dist/components/Common/Fields/TextInputField/index.d.ts +1 -0
- package/dist/components/Common/Fieldset/index.d.ts +1 -0
- package/dist/components/Common/Flex/index.d.ts +1 -0
- package/dist/components/Common/Form/index.d.ts +1 -0
- package/dist/components/Common/HamburgerMenu/index.d.ts +1 -0
- package/dist/components/Common/HorizontalFieldLayout/index.d.ts +1 -0
- package/dist/components/Common/PaginationControl/index.d.ts +1 -0
- package/dist/components/Common/ReorderableList/index.d.ts +1 -0
- package/dist/components/Common/SignatureForm/index.d.ts +1 -0
- package/dist/components/Common/TaxInputs/index.d.ts +1 -0
- package/dist/components/Common/UI/Alert/index.d.ts +1 -0
- package/dist/components/Common/UI/Button/index.d.ts +1 -0
- package/dist/components/Common/UI/CalendarPreview/index.d.ts +1 -0
- package/dist/components/Common/UI/Checkbox/index.d.ts +1 -0
- package/dist/components/Common/UI/CheckboxGroup/index.d.ts +1 -0
- package/dist/components/Common/UI/DatePicker/index.d.ts +1 -0
- package/dist/components/Common/UI/Heading/index.d.ts +1 -0
- package/dist/components/Common/UI/Input/index.d.ts +1 -0
- package/dist/components/Common/UI/Link/index.d.ts +1 -0
- package/dist/components/Common/UI/List/index.d.ts +1 -0
- package/dist/components/Common/UI/Menu/index.d.ts +1 -0
- package/dist/components/Common/UI/NumberInput/index.d.ts +1 -0
- package/dist/components/Common/UI/ProgressBar/index.d.ts +1 -0
- package/dist/components/Common/UI/Radio/index.d.ts +1 -0
- package/dist/components/Common/UI/RadioGroup/index.d.ts +1 -0
- package/dist/components/Common/UI/Select/index.d.ts +1 -0
- package/dist/components/Common/UI/Switch/index.d.ts +1 -0
- package/dist/components/Common/UI/Table/index.d.ts +1 -0
- package/dist/components/Common/UI/Text/index.d.ts +1 -0
- package/dist/components/Common/UI/TextInput/index.d.ts +1 -0
- package/dist/components/Common/VisuallyHidden/index.d.ts +1 -0
- package/dist/components/Common/index.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/AssignSignatory.d.ts +3 -3
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +20 -19
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/index.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/index.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/index.d.ts +1 -0
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccount.d.ts +10 -0
- package/dist/components/Company/BankAccount/BankAccount.js +32 -0
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -0
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -0
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +13 -0
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +63 -0
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -0
- package/dist/components/Company/DocumentSigner/DocumentList/Head.js.map +1 -0
- package/dist/components/Company/DocumentSigner/DocumentList/List.js.map +1 -0
- package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.js.map +1 -0
- package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/index.d.ts +1 -0
- package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -0
- package/dist/components/Company/DocumentSigner/DocumentSigner.d.ts +12 -0
- package/dist/components/Company/DocumentSigner/DocumentSigner.js +41 -0
- package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -0
- package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js.map +1 -0
- package/dist/components/Company/DocumentSigner/SignatureForm/Form.js.map +1 -0
- package/dist/components/Company/DocumentSigner/SignatureForm/Head.js.map +1 -0
- package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js.map +1 -0
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.d.ts +14 -0
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +72 -0
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -0
- package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/index.d.ts +1 -0
- package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -0
- package/dist/components/Company/DocumentSigner/assignSignatoryState.js.map +1 -0
- package/dist/components/Company/DocumentSigner/documentSignerStateMachine.js.map +1 -0
- package/dist/components/Company/DocumentSigner/index.d.ts +2 -0
- package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -0
- package/dist/components/Company/FederalTaxes/FederalTaxes.d.ts +1 -4
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +27 -27
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/index.d.ts +1 -0
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +11 -12
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Industry.d.ts +1 -1
- package/dist/components/Company/Industry/Industry.js +29 -28
- package/dist/components/Company/Industry/Industry.js.map +1 -1
- package/dist/components/Company/Industry/index.d.ts +1 -0
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/Locations.d.ts +9 -0
- package/dist/components/Company/Locations/Locations.js +27 -0
- package/dist/components/Company/Locations/Locations.js.map +1 -0
- package/dist/components/Company/Locations/LocationsList/LocationsList.d.ts +3 -3
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +27 -32
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/index.d.ts +1 -0
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +2 -2
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js +13 -13
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js +3 -3
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.d.ts +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +15 -15
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.d.ts +2 -2
- package/dist/components/Company/PaySchedule/PaySchedule.js +63 -62
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/index.d.ts +1 -0
- package/dist/components/Company/PaySchedule/index.d.ts +1 -0
- package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxes.d.ts +9 -0
- package/dist/components/Company/StateTaxes/StateTaxes.js +27 -0
- package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -0
- package/dist/components/Company/StateTaxes/{StateTaxesFlowComponents.js → StateTaxesComponents.js} +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -0
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +3 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +1 -1
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
- package/dist/components/Company/index.d.ts +7 -6
- package/dist/components/Company/index.js +18 -18
- package/dist/components/Employee/Compensation/Compensation.d.ts +1 -1
- package/dist/components/Employee/Compensation/Compensation.js +45 -44
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +17 -16
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/index.d.ts +1 -0
- package/dist/components/Employee/Compensation/useCompensation.d.ts +6 -46
- package/dist/components/Employee/Compensation/useCompensation.js +60 -45
- package/dist/components/Employee/Compensation/useCompensation.js.map +1 -1
- package/dist/components/Employee/Deductions/Deductions.d.ts +2 -2
- package/dist/components/Employee/Deductions/Deductions.js +73 -71
- package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/index.d.ts +1 -0
- package/dist/components/Employee/Deductions/useDeductions.js +6 -7
- package/dist/components/Employee/Deductions/useDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentSigner.d.ts +11 -0
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js +27 -0
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -0
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/index.d.ts +2 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.d.ts +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +38 -38
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.d.ts +1 -1
- package/dist/components/Employee/Landing/Landing.js +5 -5
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/Landing/index.d.ts +1 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.d.ts +27 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +29 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -0
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +107 -0
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -0
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.d.ts +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +30 -30
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/index.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +68 -68
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/index.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +1 -1
- package/dist/components/Employee/Profile/Profile.d.ts +1 -1
- package/dist/components/Employee/Profile/Profile.js +89 -88
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/SelfPersonalDetails.d.ts +2 -2
- package/dist/components/Employee/Profile/index.d.ts +1 -0
- package/dist/components/Employee/Profile/useProfile.js +3 -4
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +17 -0
- package/dist/components/{Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingComponents.js → Employee/SelfOnboardingFlow/SelfOnboardingComponents.js} +7 -7
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -0
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.d.ts +2 -0
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js +22 -0
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -0
- package/dist/components/{Flow/StateMachines/employeeSelfOnboarding.js → Employee/SelfOnboardingFlow/selfOnboardingMachine.js} +4 -4
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -0
- package/dist/components/Employee/Taxes/StateForm.d.ts +3 -3
- package/dist/components/Employee/Taxes/StateForm.js +1 -1
- package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.d.ts +1 -1
- package/dist/components/Employee/Taxes/Taxes.js +82 -78
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/index.d.ts +1 -0
- package/dist/components/Employee/Taxes/useTaxes.js +3 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/index.d.ts +4 -1
- package/dist/components/Employee/index.js +20 -16
- package/dist/components/Employee/index.js.map +1 -1
- package/dist/components/Flow/useFlow.d.ts +2 -1
- package/dist/components/Flow/useFlow.js.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/contexts/ApiProvider/ApiProvider.d.ts +1 -1
- package/dist/contexts/ApiProvider/ApiProvider.js +17 -17
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/GustoApiProvider/index.d.ts +1 -0
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +2 -7
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +16 -14
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/GustoProvider/index.d.ts +2 -1
- package/dist/contexts/LocaleProvider/index.d.ts +1 -0
- package/dist/contexts/ThemeProvider/index.d.ts +1 -0
- package/dist/contexts/index.d.ts +1 -0
- package/dist/hooks/useForkRef/index.d.ts +1 -0
- package/dist/i18n/I18n.d.ts +2 -0
- package/dist/i18n/I18n.js +27 -21
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/index.d.ts +1 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +7 -13
- package/dist/index.js.map +1 -1
- package/dist/shared/constants.d.ts +1 -1
- package/dist/shared/constants.js +1 -1
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/Helpers.d.ts +14 -0
- package/dist/types/i18next.d.ts +60 -61
- package/package.json +1 -1
- package/dist/components/Company/BankAccount/BankAccountFlow.d.ts +0 -5
- package/dist/components/Company/BankAccount/BankAccountFlow.js +0 -24
- package/dist/components/Company/BankAccount/BankAccountFlow.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/DocumentList/Actions.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/DocumentList/DocumentList.d.ts +0 -13
- package/dist/components/Company/DocumentSignerFlow/DocumentList/DocumentList.js +0 -69
- package/dist/components/Company/DocumentSignerFlow/DocumentList/DocumentList.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/DocumentList/Head.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/DocumentList/List.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/DocumentList/ManageSignatories.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/DocumentList/useDocumentList.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/DocumentSignerFlow.d.ts +0 -6
- package/dist/components/Company/DocumentSignerFlow/DocumentSignerFlow.js +0 -35
- package/dist/components/Company/DocumentSignerFlow/DocumentSignerFlow.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/SignatureForm/Actions.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/SignatureForm/Form.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/SignatureForm/Head.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/SignatureForm/Preview.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/SignatureForm/SignatureForm.d.ts +0 -17
- package/dist/components/Company/DocumentSignerFlow/SignatureForm/SignatureForm.js +0 -78
- package/dist/components/Company/DocumentSignerFlow/SignatureForm/SignatureForm.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/SignatureForm/useSignatureForm.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/assignSignatoryState.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/documentSignerStateMachine.js.map +0 -1
- package/dist/components/Company/DocumentSignerFlow/index.d.ts +0 -1
- package/dist/components/Company/DocumentSignerFlow/stateMachine.js.map +0 -1
- package/dist/components/Company/Locations/LocationsFlow.d.ts +0 -5
- package/dist/components/Company/Locations/LocationsFlow.js +0 -21
- package/dist/components/Company/Locations/LocationsFlow.js.map +0 -1
- package/dist/components/Company/StateTaxes/StateTaxesFlow.d.ts +0 -5
- package/dist/components/Company/StateTaxes/StateTaxesFlow.js +0 -21
- package/dist/components/Company/StateTaxes/StateTaxesFlow.js.map +0 -1
- package/dist/components/Company/StateTaxes/StateTaxesFlowComponents.js.map +0 -1
- package/dist/components/Employee/DocumentSigner/DocumentSignerFlow.d.ts +0 -5
- package/dist/components/Employee/DocumentSigner/DocumentSignerFlow.js +0 -21
- package/dist/components/Employee/DocumentSigner/DocumentSignerFlow.js.map +0 -1
- package/dist/components/Flow/EmployeeOnboardingFlow.d.ts +0 -27
- package/dist/components/Flow/EmployeeOnboardingFlow.js +0 -29
- package/dist/components/Flow/EmployeeOnboardingFlow.js.map +0 -1
- package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingComponents.d.ts +0 -5
- package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingComponents.js.map +0 -1
- package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingFlow.d.ts +0 -13
- package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingFlow.js +0 -26
- package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingFlow.js.map +0 -1
- package/dist/components/Flow/StateMachines/employeeOnboarding.js +0 -136
- package/dist/components/Flow/StateMachines/employeeOnboarding.js.map +0 -1
- package/dist/components/Flow/StateMachines/employeeSelfOnboarding.js.map +0 -1
- package/dist/components/Flow/StateMachines/index.d.ts +0 -2
- package/dist/components/Flow/index.d.ts +0 -2
- package/dist/components/Flow/index.js +0 -7
- package/dist/components/Flow/index.js.map +0 -1
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/Actions.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/Actions.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/Head.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/Head.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/List.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/List.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/ManageSignatories.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/ManageSignatories.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/ManageSignatories.module.scss.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/ManageSignatories.module.scss.js.map +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/useDocumentList.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Actions.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Actions.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Form.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Form.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Head.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Head.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Preview.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Preview.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/useSignatureForm.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/assignSignatoryState.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/assignSignatoryState.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/documentSignerStateMachine.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/documentSignerStateMachine.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/stateMachine.d.ts +0 -0
- /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/stateMachine.js +0 -0
- /package/dist/components/Company/{DocumentSignerFlow/useDocumentSignerFlow.d.ts → DocumentSigner/useDocumentSigner.d.ts} +0 -0
- /package/dist/components/Company/StateTaxes/{StateTaxesFlowComponents.d.ts → StateTaxesComponents.d.ts} +0 -0
- /package/dist/components/{Flow/StateMachines/employeeOnboarding.d.ts → Employee/OnboardingFlow/onboardingStateMachine.d.ts} +0 -0
- /package/dist/components/{Flow/StateMachines/employeeSelfOnboarding.d.ts → Employee/SelfOnboardingFlow/selfOnboardingMachine.d.ts} +0 -0
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useFederalTaxDetailsUpdateMutation as
|
|
1
|
+
import { jsx as e, jsxs as y, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { useFederalTaxDetailsUpdateMutation as D } from "@gusto/embedded-api/react-query/federalTaxDetailsUpdate";
|
|
3
3
|
import { useFederalTaxDetailsGetSuspense as h } from "@gusto/embedded-api/react-query/federalTaxDetailsGet";
|
|
4
|
-
import { useForm as
|
|
5
|
-
import { zodResolver as
|
|
6
|
-
import { FederalTaxFormSchema as
|
|
7
|
-
import { Form as
|
|
8
|
-
import { Form as
|
|
4
|
+
import { useForm as E, FormProvider as P } from "react-hook-form";
|
|
5
|
+
import { zodResolver as v } from "@hookform/resolvers/zod";
|
|
6
|
+
import { FederalTaxFormSchema as A, FederalTaxesProvider as N } from "./useFederalTaxes.js";
|
|
7
|
+
import { Form as S } from "../../Common/Form/Form.js";
|
|
8
|
+
import { Form as C } from "./Form.js";
|
|
9
9
|
import { Actions as _ } from "./Actions.js";
|
|
10
10
|
import { Head as b } from "./Head.js";
|
|
11
|
-
import { useI18n as R } from "../../../i18n/I18n.js";
|
|
12
|
-
import { BaseComponent as
|
|
13
|
-
import { useBase as
|
|
14
|
-
import { Flex as
|
|
11
|
+
import { useI18n as R, useComponentDictionary as M } from "../../../i18n/I18n.js";
|
|
12
|
+
import { BaseComponent as B } from "../../Base/Base.js";
|
|
13
|
+
import { useBase as O } from "../../Base/useBase.js";
|
|
14
|
+
import { Flex as j } from "../../Common/Flex/Flex.js";
|
|
15
15
|
import { companyEvents as l } from "../../../shared/constants.js";
|
|
16
|
-
function
|
|
17
|
-
return /* @__PURE__ */ e(
|
|
16
|
+
function Z(a) {
|
|
17
|
+
return /* @__PURE__ */ e(B, { ...a, children: /* @__PURE__ */ e(q, { ...a, children: a.children }) });
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
R("Company.FederalTaxes");
|
|
21
|
-
const { onEvent:
|
|
22
|
-
resolver:
|
|
19
|
+
function q({ companyId: a, children: t, className: s, defaultValues: i, dictionary: d }) {
|
|
20
|
+
R("Company.FederalTaxes"), M("Company.FederalTaxes", d);
|
|
21
|
+
const { onEvent: n, baseSubmitHandler: f } = O(), { data: c } = h({ companyId: a }), r = c.federalTaxDetails, { mutateAsync: p, isPending: F } = D(), m = E({
|
|
22
|
+
resolver: v(A),
|
|
23
23
|
defaultValues: {
|
|
24
24
|
federalEin: r.hasEin ? void 0 : "",
|
|
25
25
|
taxPayerType: r.taxPayerType ? r.taxPayerType : i?.taxPayerType,
|
|
26
26
|
filingForm: r.filingForm ? r.filingForm : i?.filingForm,
|
|
27
27
|
legalName: r.legalName ?? i?.legalName
|
|
28
28
|
}
|
|
29
|
-
}),
|
|
30
|
-
await
|
|
31
|
-
const
|
|
29
|
+
}), x = async (u) => {
|
|
30
|
+
await f(u, async (o) => {
|
|
31
|
+
const T = await p({
|
|
32
32
|
request: {
|
|
33
33
|
companyId: a,
|
|
34
34
|
requestBody: {
|
|
@@ -40,28 +40,28 @@ function O({ companyId: a, children: t, className: s, defaultValues: i }) {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
-
|
|
43
|
+
n(
|
|
44
44
|
l.COMPANY_FEDERAL_TAXES_UPDATED,
|
|
45
|
-
|
|
46
|
-
),
|
|
45
|
+
T.federalTaxDetails
|
|
46
|
+
), n(l.COMPANY_FEDERAL_TAXES_DONE);
|
|
47
47
|
});
|
|
48
48
|
};
|
|
49
49
|
return /* @__PURE__ */ e("section", { className: s, children: /* @__PURE__ */ e(
|
|
50
|
-
|
|
50
|
+
N,
|
|
51
51
|
{
|
|
52
52
|
value: {
|
|
53
53
|
isPending: F,
|
|
54
54
|
federalTaxDetails: r
|
|
55
55
|
},
|
|
56
|
-
children: /* @__PURE__ */ e(
|
|
56
|
+
children: /* @__PURE__ */ e(P, { ...m, children: /* @__PURE__ */ e(S, { onSubmit: m.handleSubmit(x), children: /* @__PURE__ */ e(j, { flexDirection: "column", gap: 32, children: t || /* @__PURE__ */ y(g, { children: [
|
|
57
57
|
/* @__PURE__ */ e(b, {}),
|
|
58
|
-
/* @__PURE__ */ e(
|
|
58
|
+
/* @__PURE__ */ e(C, {}),
|
|
59
59
|
/* @__PURE__ */ e(_, {})
|
|
60
60
|
] }) }) }) })
|
|
61
61
|
}
|
|
62
62
|
) });
|
|
63
63
|
}
|
|
64
64
|
export {
|
|
65
|
-
|
|
65
|
+
Z as FederalTaxes
|
|
66
66
|
};
|
|
67
67
|
//# sourceMappingURL=FederalTaxes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/FederalTaxes.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"FederalTaxes.js","sources":["../../../../src/components/Company/FederalTaxes/FederalTaxes.tsx"],"sourcesContent":["import { useFederalTaxDetailsUpdateMutation } from '@gusto/embedded-api/react-query/federalTaxDetailsUpdate'\nimport { useFederalTaxDetailsGetSuspense } from '@gusto/embedded-api/react-query/federalTaxDetailsGet'\nimport type {\n FilingForm,\n TaxPayerType,\n} from '@gusto/embedded-api/models/operations/putv1companiescompanyidfederaltaxdetails'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport {\n FederalTaxesProvider,\n type FederalTaxFormInputs,\n FederalTaxFormSchema,\n type FederalTaxesDefaultValues,\n} from './useFederalTaxes'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport { Form } from '@/components/Company/FederalTaxes/Form'\nimport { Actions } from '@/components/Company/FederalTaxes/Actions'\nimport { Head } from '@/components/Company/FederalTaxes/Head'\nimport { useI18n } from '@/i18n'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\nimport { useComponentDictionary } from '@/i18n'\n\ninterface FederalTaxesProps extends CommonComponentInterface<'Company.FederalTaxes'> {\n companyId: string\n defaultValues?: FederalTaxesDefaultValues\n}\n\nexport function FederalTaxes(props: FederalTaxesProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, children, className, defaultValues, dictionary }: FederalTaxesProps) {\n useI18n('Company.FederalTaxes')\n useComponentDictionary('Company.FederalTaxes', dictionary)\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useFederalTaxDetailsGetSuspense({ companyId })\n const federalTaxDetails = data.federalTaxDetails!\n\n const { mutateAsync: updateFederalTaxDetails, isPending } = useFederalTaxDetailsUpdateMutation()\n\n const formMethods = useForm<FederalTaxFormInputs>({\n resolver: zodResolver(FederalTaxFormSchema),\n defaultValues: {\n federalEin: federalTaxDetails.hasEin ? undefined : '',\n taxPayerType: federalTaxDetails.taxPayerType\n ? (federalTaxDetails.taxPayerType as TaxPayerType)\n : defaultValues?.taxPayerType,\n filingForm: federalTaxDetails.filingForm\n ? (federalTaxDetails.filingForm as FilingForm)\n : defaultValues?.filingForm,\n legalName: federalTaxDetails.legalName ?? defaultValues?.legalName,\n },\n })\n\n const handleSubmit = async (data: FederalTaxFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const updateFederalTaxDetailsResponse = await updateFederalTaxDetails({\n request: {\n companyId: companyId,\n requestBody: {\n ein: payload.federalEin,\n taxPayerType: payload.taxPayerType as TaxPayerType | undefined,\n filingForm: payload.filingForm as FilingForm | undefined,\n legalName: payload.legalName,\n version: federalTaxDetails.version as string,\n },\n },\n })\n\n onEvent(\n companyEvents.COMPANY_FEDERAL_TAXES_UPDATED,\n updateFederalTaxDetailsResponse.federalTaxDetails,\n )\n onEvent(companyEvents.COMPANY_FEDERAL_TAXES_DONE)\n })\n }\n\n return (\n <section className={className}>\n <FederalTaxesProvider\n value={{\n isPending,\n federalTaxDetails,\n }}\n >\n <FormProvider {...formMethods}>\n <HtmlForm onSubmit={formMethods.handleSubmit(handleSubmit)}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </HtmlForm>\n </FormProvider>\n </FederalTaxesProvider>\n </section>\n )\n}\n"],"names":["FederalTaxes","props","jsx","BaseComponent","Root","companyId","children","className","defaultValues","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","data","useFederalTaxDetailsGetSuspense","federalTaxDetails","updateFederalTaxDetails","isPending","useFederalTaxDetailsUpdateMutation","formMethods","useForm","zodResolver","FederalTaxFormSchema","handleSubmit","payload","updateFederalTaxDetailsResponse","companyEvents","FederalTaxesProvider","FormProvider","HtmlForm","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;;;;;;;;;;AA+BO,SAASA,EAAaC,GAAmD;AAE5E,SAAA,gBAAAC,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,UAAAC,GAAU,WAAAC,GAAW,eAAAC,GAAe,YAAAC,KAAiC;AAC9F,EAAAC,EAAQ,sBAAsB,GAC9BC,EAAuB,wBAAwBF,CAAU;AACzD,QAAM,EAAE,SAAAG,GAAS,mBAAAC,EAAkB,IAAIC,EAAQ,GAEzC,EAAE,MAAAC,EAAK,IAAIC,EAAgC,EAAE,WAAAX,GAAW,GACxDY,IAAoBF,EAAK,mBAEzB,EAAE,aAAaG,GAAyB,WAAAC,EAAA,IAAcC,EAAmC,GAEzFC,IAAcC,EAA8B;AAAA,IAChD,UAAUC,EAAYC,CAAoB;AAAA,IAC1C,eAAe;AAAA,MACb,YAAYP,EAAkB,SAAS,SAAY;AAAA,MACnD,cAAcA,EAAkB,eAC3BA,EAAkB,eACnBT,GAAe;AAAA,MACnB,YAAYS,EAAkB,aACzBA,EAAkB,aACnBT,GAAe;AAAA,MACnB,WAAWS,EAAkB,aAAaT,GAAe;AAAA,IAAA;AAAA,EAC3D,CACD,GAEKiB,IAAe,OAAOV,MAA+B;AACnD,UAAAF,EAAkBE,GAAM,OAAMW,MAAW;AACvC,YAAAC,IAAkC,MAAMT,EAAwB;AAAA,QACpE,SAAS;AAAA,UACP,WAAAb;AAAA,UACA,aAAa;AAAA,YACX,KAAKqB,EAAQ;AAAA,YACb,cAAcA,EAAQ;AAAA,YACtB,YAAYA,EAAQ;AAAA,YACpB,WAAWA,EAAQ;AAAA,YACnB,SAAST,EAAkB;AAAA,UAAA;AAAA,QAC7B;AAAA,MACF,CACD;AAED,MAAAL;AAAA,QACEgB,EAAc;AAAA,QACdD,EAAgC;AAAA,MAClC,GACAf,EAAQgB,EAAc,0BAA0B;AAAA,IAAA,CACjD;AAAA,EACH;AAGE,SAAA,gBAAA1B,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAAC2B;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,WAAAV;AAAA,QACA,mBAAAF;AAAA,MACF;AAAA,MAEA,4BAACa,GAAc,EAAA,GAAGT,GAChB,UAAC,gBAAAnB,EAAA6B,GAAA,EAAS,UAAUV,EAAY,aAAaI,CAAY,GACvD,UAAA,gBAAAvB,EAAC8B,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAA1B,KAIG,gBAAA2B,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAAhC,EAACiC,GAAK,EAAA;AAAA,0BACLC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,GACX,EAAA,CAEJ,GACF,EACF,CAAA;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { z as
|
|
2
|
-
import { FilingForm as
|
|
1
|
+
import { z as e } from "zod";
|
|
2
|
+
import { FilingForm as o, 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";
|
|
@@ -9,19 +9,18 @@ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
|
9
9
|
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
10
10
|
import "../../Base/useBase.js";
|
|
11
11
|
import "dompurify";
|
|
12
|
-
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
12
|
import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
|
|
14
|
-
const
|
|
15
|
-
federalEin:
|
|
16
|
-
taxPayerType:
|
|
17
|
-
filingForm:
|
|
18
|
-
legalName:
|
|
19
|
-
}), [
|
|
13
|
+
const u = e.object({
|
|
14
|
+
federalEin: e.string().optional(),
|
|
15
|
+
taxPayerType: e.enum(Object.values(r)).optional(),
|
|
16
|
+
filingForm: e.enum(Object.values(o)).optional(),
|
|
17
|
+
legalName: e.string().min(1)
|
|
18
|
+
}), [f, g] = t(
|
|
20
19
|
"CompanyFederalTaxesContext"
|
|
21
20
|
);
|
|
22
21
|
export {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
u as FederalTaxFormSchema,
|
|
23
|
+
g as FederalTaxesProvider,
|
|
24
|
+
f as useFederalTaxes
|
|
26
25
|
};
|
|
27
26
|
//# 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":";;;;;;;;;;;;AASa,MAAAA,IAAuBC,EAAE,OAAO;AAAA,EAC3C,YAAYA,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,cAAcA,EAAE,KAAK,OAAO,OAAOC,CAAY,CAA0B,EAAE,SAAS;AAAA,EACpF,YAAYD,EAAE,KAAK,OAAO,OAAOE,CAAU,CAA0B,EAAE,SAAS;AAAA,EAChF,WAAWF,EAAE,OAAO,EAAE,IAAI,CAAC;AAC7B,CAAC,GAeK,CAACG,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
|
|
@@ -7,17 +7,16 @@ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
|
7
7
|
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
8
8
|
import "../../Base/useBase.js";
|
|
9
9
|
import "dompurify";
|
|
10
|
-
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
11
10
|
import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
|
|
12
|
-
const [
|
|
11
|
+
const [I, y] = t("IndustryItems", {
|
|
13
12
|
items: []
|
|
14
|
-
}), [
|
|
13
|
+
}), [a, c] = t("IndustryApi", {
|
|
15
14
|
isPending: !1
|
|
16
15
|
});
|
|
17
16
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
c as IndustryApiStateProvider,
|
|
18
|
+
y as IndustryItemsProvider,
|
|
19
|
+
a as useIndustryApiState,
|
|
20
|
+
I as useIndustryItems
|
|
22
21
|
};
|
|
23
22
|
//# 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,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { BaseComponentInterface } from '../../Base';
|
|
3
|
-
export type IndustryProps<T> = Pick<BaseComponentInterface
|
|
3
|
+
export type IndustryProps<T> = Pick<BaseComponentInterface<'Company.Industry'>, 'onEvent' | 'dictionary'> & Partial<Pick<HTMLAttributes<T>, 'children' | 'className'>> & {
|
|
4
4
|
companyId: string;
|
|
5
5
|
};
|
|
6
6
|
export declare function Industry<T>(props: IndustryProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { useCallback as
|
|
3
|
-
import { useIndustrySelectionGetSuspense as
|
|
4
|
-
import { useIndustrySelectionUpdateMutation as
|
|
5
|
-
import { useQueryClient as
|
|
6
|
-
import { Actions as
|
|
7
|
-
import { Head as
|
|
8
|
-
import { Edit as
|
|
9
|
-
import { IndustryApiStateProvider as
|
|
10
|
-
import { IndustrySelect as
|
|
11
|
-
import { componentEvents as
|
|
12
|
-
import { BaseComponent as
|
|
2
|
+
import { useCallback as C } from "react";
|
|
3
|
+
import { useIndustrySelectionGetSuspense as I, invalidateAllIndustrySelectionGet as S } from "@gusto/embedded-api/react-query/industrySelectionGet";
|
|
4
|
+
import { useIndustrySelectionUpdateMutation as E } from "@gusto/embedded-api/react-query/industrySelectionUpdate";
|
|
5
|
+
import { useQueryClient as A } from "@tanstack/react-query";
|
|
6
|
+
import { Actions as v } from "./Actions.js";
|
|
7
|
+
import { Head as b } from "./Head.js";
|
|
8
|
+
import { Edit as h } from "./Edit.js";
|
|
9
|
+
import { IndustryApiStateProvider as q } from "./Context.js";
|
|
10
|
+
import { IndustrySelect as w } from "./IndustrySelect.js";
|
|
11
|
+
import { componentEvents as B } from "../../../shared/constants.js";
|
|
12
|
+
import { BaseComponent as D } from "../../Base/Base.js";
|
|
13
13
|
import { useBase as H } from "../../Base/useBase.js";
|
|
14
|
-
import { useI18n as P } from "../../../i18n/I18n.js";
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
import { useI18n as P, useComponentDictionary as _ } from "../../../i18n/I18n.js";
|
|
15
|
+
function x({ children: o, className: u, companyId: n, dictionary: a }) {
|
|
16
|
+
_("Company.Industry", a);
|
|
17
|
+
const { baseSubmitHandler: r, onEvent: i } = H(), s = A(), {
|
|
18
|
+
data: { industry: d }
|
|
19
|
+
} = I({ companyId: n }), { isPending: c, mutateAsync: m } = E(), p = C(
|
|
20
|
+
async (y) => {
|
|
21
|
+
await r(y, async ({ naics_code: l }) => {
|
|
21
22
|
const f = await m({
|
|
22
|
-
request: { companyId:
|
|
23
|
+
request: { companyId: n, requestBody: { naicsCode: l } }
|
|
23
24
|
});
|
|
24
|
-
await S(s), i(
|
|
25
|
+
await S(s), i(B.COMPANY_INDUSTRY_SELECTED, f.industry);
|
|
25
26
|
});
|
|
26
27
|
},
|
|
27
|
-
[r,
|
|
28
|
+
[r, n, m, i, s]
|
|
28
29
|
);
|
|
29
|
-
return /* @__PURE__ */ t("section", { className: u, children: /* @__PURE__ */ t(
|
|
30
|
+
return /* @__PURE__ */ t("section", { className: u, children: /* @__PURE__ */ t(q, { value: { isPending: c }, children: /* @__PURE__ */ t(w, { naics_code: d?.naicsCode, onValid: p, children: o }) }) });
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
return P("Company.Industry"), /* @__PURE__ */ t(
|
|
32
|
+
function e(o) {
|
|
33
|
+
return P("Company.Industry"), /* @__PURE__ */ t(D, { ...o, children: /* @__PURE__ */ t(x, { ...o }) });
|
|
33
34
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
e.Actions = v;
|
|
36
|
+
e.Edit = h;
|
|
37
|
+
e.Head = b;
|
|
37
38
|
export {
|
|
38
|
-
|
|
39
|
+
e as Industry
|
|
39
40
|
};
|
|
40
41
|
//# sourceMappingURL=Industry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Industry.js","sources":["../../../../src/components/Company/Industry/Industry.tsx"],"sourcesContent":["import { useCallback, type HTMLAttributes } from 'react'\nimport {\n useIndustrySelectionGetSuspense,\n invalidateAllIndustrySelectionGet,\n} from '@gusto/embedded-api/react-query/industrySelectionGet'\nimport { useIndustrySelectionUpdateMutation } from '@gusto/embedded-api/react-query/industrySelectionUpdate'\nimport { useQueryClient } from '@tanstack/react-query'\nimport { Actions } from './Actions'\nimport { Head } from './Head'\nimport type { IndustryFormFields } from './Edit'\nimport { Edit } from './Edit'\nimport { IndustryApiStateProvider } from './Context'\nimport { IndustrySelect } from './IndustrySelect'\nimport { componentEvents } from '@/shared/constants'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport { useI18n } from '@/i18n'\n\nexport type IndustryProps<T> = Pick<
|
|
1
|
+
{"version":3,"file":"Industry.js","sources":["../../../../src/components/Company/Industry/Industry.tsx"],"sourcesContent":["import { useCallback, type HTMLAttributes } from 'react'\nimport {\n useIndustrySelectionGetSuspense,\n invalidateAllIndustrySelectionGet,\n} from '@gusto/embedded-api/react-query/industrySelectionGet'\nimport { useIndustrySelectionUpdateMutation } from '@gusto/embedded-api/react-query/industrySelectionUpdate'\nimport { useQueryClient } from '@tanstack/react-query'\nimport { Actions } from './Actions'\nimport { Head } from './Head'\nimport type { IndustryFormFields } from './Edit'\nimport { Edit } from './Edit'\nimport { IndustryApiStateProvider } from './Context'\nimport { IndustrySelect } from './IndustrySelect'\nimport { componentEvents } from '@/shared/constants'\nimport { BaseComponent, useBase, type BaseComponentInterface } from '@/components/Base'\nimport { useI18n, useComponentDictionary } from '@/i18n'\n\nexport type IndustryProps<T> = Pick<\n BaseComponentInterface<'Company.Industry'>,\n 'onEvent' | 'dictionary'\n> &\n Partial<Pick<HTMLAttributes<T>, 'children' | 'className'>> & {\n companyId: string\n }\n\nfunction Root<T>({ children, className, companyId, dictionary }: IndustryProps<T>) {\n useComponentDictionary('Company.Industry', dictionary)\n const { baseSubmitHandler, onEvent } = useBase()\n const queryClient = useQueryClient()\n\n const {\n data: { industry },\n } = useIndustrySelectionGetSuspense({ companyId })\n\n const { isPending, mutateAsync: mutateIndustry } = useIndustrySelectionUpdateMutation()\n\n const onValid = useCallback(\n async (data: IndustryFormFields) => {\n await baseSubmitHandler(data, async ({ naics_code }) => {\n const response = await mutateIndustry({\n request: { companyId, requestBody: { naicsCode: naics_code } },\n })\n await invalidateAllIndustrySelectionGet(queryClient)\n onEvent(componentEvents.COMPANY_INDUSTRY_SELECTED, response.industry)\n })\n },\n [baseSubmitHandler, companyId, mutateIndustry, onEvent, queryClient],\n )\n\n return (\n <section className={className}>\n <IndustryApiStateProvider value={{ isPending }}>\n <IndustrySelect naics_code={industry?.naicsCode} onValid={onValid}>\n {children}\n </IndustrySelect>\n </IndustryApiStateProvider>\n </section>\n )\n}\n\nexport function Industry<T>(props: IndustryProps<T>) {\n useI18n('Company.Industry')\n\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nIndustry.Actions = Actions\nIndustry.Edit = Edit\nIndustry.Head = Head\n"],"names":["Root","children","className","companyId","dictionary","useComponentDictionary","baseSubmitHandler","onEvent","useBase","queryClient","useQueryClient","industry","useIndustrySelectionGetSuspense","isPending","mutateIndustry","useIndustrySelectionUpdateMutation","onValid","useCallback","data","naics_code","response","invalidateAllIndustrySelectionGet","componentEvents","jsx","IndustryApiStateProvider","IndustrySelect","Industry","props","useI18n","BaseComponent","Actions","Edit","Head"],"mappings":";;;;;;;;;;;;;;AAyBA,SAASA,EAAQ,EAAE,UAAAC,GAAU,WAAAC,GAAW,WAAAC,GAAW,YAAAC,KAAgC;AACjF,EAAAC,EAAuB,oBAAoBD,CAAU;AACrD,QAAM,EAAE,mBAAAE,GAAmB,SAAAC,EAAQ,IAAIC,EAAQ,GACzCC,IAAcC,EAAe,GAE7B;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAS;AAAA,EAAA,IACfC,EAAgC,EAAE,WAAAT,GAAW,GAE3C,EAAE,WAAAU,GAAW,aAAaC,EAAA,IAAmBC,EAAmC,GAEhFC,IAAUC;AAAA,IACd,OAAOC,MAA6B;AAClC,YAAMZ,EAAkBY,GAAM,OAAO,EAAE,YAAAC,QAAiB;AAChD,cAAAC,IAAW,MAAMN,EAAe;AAAA,UACpC,SAAS,EAAE,WAAAX,GAAW,aAAa,EAAE,WAAWgB,EAAa,EAAA;AAAA,QAAA,CAC9D;AACD,cAAME,EAAkCZ,CAAW,GAC3CF,EAAAe,EAAgB,2BAA2BF,EAAS,QAAQ;AAAA,MAAA,CACrE;AAAA,IACH;AAAA,IACA,CAACd,GAAmBH,GAAWW,GAAgBP,GAASE,CAAW;AAAA,EACrE;AAEA,2BACG,WAAQ,EAAA,WAAAP,GACP,UAAC,gBAAAqB,EAAAC,GAAA,EAAyB,OAAO,EAAE,WAAAX,EACjC,GAAA,UAAA,gBAAAU,EAACE,KAAe,YAAYd,GAAU,WAAW,SAAAK,GAC9C,UAAAf,EAAA,CACH,EACF,CAAA,GACF;AAEJ;AAEO,SAASyB,EAAYC,GAAyB;AACnD,SAAAC,EAAQ,kBAAkB,GAGxB,gBAAAL,EAACM,KAAe,GAAGF,GACjB,4BAAC3B,GAAM,EAAA,GAAG2B,GAAO,EACnB,CAAA;AAEJ;AAEAD,EAAS,UAAUI;AACnBJ,EAAS,OAAOK;AAChBL,EAAS,OAAOM;"}
|
|
@@ -7,13 +7,12 @@ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
|
7
7
|
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
8
8
|
import "../../../Base/useBase.js";
|
|
9
9
|
import "dompurify";
|
|
10
|
-
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
11
10
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
12
|
-
const [
|
|
11
|
+
const [C, u] = o(
|
|
13
12
|
"CompanyDocumentFormContext"
|
|
14
13
|
);
|
|
15
14
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
u as LocationsFormProvider,
|
|
16
|
+
C as useLocationsForm
|
|
18
17
|
};
|
|
19
18
|
//# 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":";;;;;;;;;;AAOM,MAAA,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseComponentInterface } from '../../Base';
|
|
2
|
+
export interface LocationsProps extends BaseComponentInterface<'Company.Locations'> {
|
|
3
|
+
companyId: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function Locations({ companyId, onEvent, dictionary }: LocationsProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare namespace Locations {
|
|
7
|
+
var LocationsList: typeof import("./LocationsList").LocationsList;
|
|
8
|
+
var LocationForm: typeof import("./LocationForm/LocationForm").LocationForm;
|
|
9
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { createMachine as c } from "robot3";
|
|
3
|
+
import { locationsStateMachine as e } from "./stateMachine.js";
|
|
4
|
+
import { LocationsListContextual as s } from "./locationsStateMachine.js";
|
|
5
|
+
import { LocationForm as p } from "./LocationForm/LocationForm.js";
|
|
6
|
+
import { Flow as L } from "../../Flow/Flow.js";
|
|
7
|
+
import { useComponentDictionary as f } from "../../../i18n/I18n.js";
|
|
8
|
+
import { LocationsList as u } from "./LocationsList/LocationsList.js";
|
|
9
|
+
function o({ companyId: t, onEvent: i, dictionary: n }) {
|
|
10
|
+
f("Company.Locations", n);
|
|
11
|
+
const m = c(
|
|
12
|
+
"index",
|
|
13
|
+
e,
|
|
14
|
+
(r) => ({
|
|
15
|
+
...r,
|
|
16
|
+
component: s,
|
|
17
|
+
companyId: t
|
|
18
|
+
})
|
|
19
|
+
);
|
|
20
|
+
return /* @__PURE__ */ a(L, { machine: m, onEvent: i });
|
|
21
|
+
}
|
|
22
|
+
o.LocationsList = u;
|
|
23
|
+
o.LocationForm = p;
|
|
24
|
+
export {
|
|
25
|
+
o as Locations
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=Locations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Locations.js","sources":["../../../../src/components/Company/Locations/Locations.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { type LocationsContextInterface } from './locationsStateMachine'\nimport { locationsStateMachine } from './stateMachine'\nimport { LocationsListContextual } from './locationsStateMachine'\nimport { LocationsList } from './LocationsList'\nimport { LocationForm } from './LocationForm/LocationForm'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface LocationsProps extends BaseComponentInterface<'Company.Locations'> {\n companyId: string\n}\n\nexport function Locations({ companyId, onEvent, dictionary }: LocationsProps) {\n useComponentDictionary('Company.Locations', dictionary)\n\n const manageLocations = createMachine(\n 'index',\n locationsStateMachine,\n (initialContext: LocationsContextInterface) => ({\n ...initialContext,\n component: LocationsListContextual,\n companyId,\n }),\n )\n return <Flow machine={manageLocations} onEvent={onEvent} />\n}\n\nLocations.LocationsList = LocationsList\nLocations.LocationForm = LocationForm\n"],"names":["Locations","companyId","onEvent","dictionary","useComponentDictionary","manageLocations","createMachine","locationsStateMachine","initialContext","LocationsListContextual","jsx","Flow","LocationsList","LocationForm"],"mappings":";;;;;;;;AAcO,SAASA,EAAU,EAAE,WAAAC,GAAW,SAAAC,GAAS,YAAAC,KAA8B;AAC5E,EAAAC,EAAuB,qBAAqBD,CAAU;AAEtD,QAAME,IAAkBC;AAAA,IACtB;AAAA,IACAC;AAAA,IACA,CAACC,OAA+C;AAAA,MAC9C,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,WAAAR;AAAA,IACF;AAAA,EACF;AACA,SAAQ,gBAAAS,EAAAC,GAAA,EAAK,SAASN,GAAiB,SAAAH,EAAkB,CAAA;AAC3D;AAEAF,EAAU,gBAAgBY;AAC1BZ,EAAU,eAAea;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
interface LocationsListProps extends
|
|
1
|
+
import { BaseComponentInterface } from '../../../Base/Base';
|
|
2
|
+
interface LocationsListProps extends BaseComponentInterface {
|
|
3
3
|
companyId: string;
|
|
4
4
|
}
|
|
5
|
-
export declare function LocationsList(
|
|
5
|
+
export declare function LocationsList(props: LocationsListProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export declare namespace LocationsList {
|
|
7
7
|
var Head: typeof import("./Head").Head;
|
|
8
8
|
var List: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,72 +1,67 @@
|
|
|
1
1
|
import { jsx as e, jsxs as C, Fragment as A } from "react/jsx-runtime";
|
|
2
2
|
import { useLocationsGetSuspense as N } from "@gusto/embedded-api/react-query/locationsGet";
|
|
3
|
-
import { useState as
|
|
4
|
-
import { Head as
|
|
5
|
-
import { List as
|
|
6
|
-
import { Actions as
|
|
3
|
+
import { useState as d } from "react";
|
|
4
|
+
import { Head as l } from "./Head.js";
|
|
5
|
+
import { List as h } from "./List.js";
|
|
6
|
+
import { Actions as P } from "./Actions.js";
|
|
7
7
|
import { LocationsListProvider as O } from "./useLocationsList.js";
|
|
8
8
|
import { useI18n as x } from "../../../../i18n/I18n.js";
|
|
9
9
|
import { BaseComponent as E } from "../../../Base/Base.js";
|
|
10
10
|
import { useBase as I } from "../../../Base/useBase.js";
|
|
11
11
|
import { Flex as v } from "../../../Common/Flex/Flex.js";
|
|
12
|
-
import { companyEvents as
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
className: r,
|
|
16
|
-
children: n,
|
|
17
|
-
...o
|
|
18
|
-
}) {
|
|
19
|
-
return /* @__PURE__ */ e(E, { ...o, children: /* @__PURE__ */ e(M, { companyId: s, className: r, children: n }) });
|
|
12
|
+
import { companyEvents as s } from "../../../../shared/constants.js";
|
|
13
|
+
function i(o) {
|
|
14
|
+
return /* @__PURE__ */ e(E, { ...o, children: /* @__PURE__ */ e(M, { ...o, children: o.children }) });
|
|
20
15
|
}
|
|
21
|
-
function M({ companyId:
|
|
16
|
+
function M({ companyId: o, className: g, children: c }) {
|
|
22
17
|
x("Company.Locations");
|
|
23
|
-
const { onEvent:
|
|
18
|
+
const { onEvent: a } = I(), [m, n] = d(1), [p, L] = d(5), {
|
|
24
19
|
data: { locationList: u, httpMeta: f }
|
|
25
|
-
} = N({ companyId:
|
|
26
|
-
return /* @__PURE__ */ e("section", { className:
|
|
20
|
+
} = N({ companyId: o, page: m, per: p }), r = Number(f.response.headers.get("x-total-pages") ?? 1);
|
|
21
|
+
return /* @__PURE__ */ e("section", { className: g, children: /* @__PURE__ */ e(
|
|
27
22
|
O,
|
|
28
23
|
{
|
|
29
24
|
value: {
|
|
30
25
|
locationList: u ?? [],
|
|
31
|
-
currentPage:
|
|
32
|
-
totalPages:
|
|
26
|
+
currentPage: m,
|
|
27
|
+
totalPages: r,
|
|
33
28
|
handleFirstPage: () => {
|
|
34
|
-
|
|
29
|
+
n(1);
|
|
35
30
|
},
|
|
36
31
|
handlePreviousPage: () => {
|
|
37
|
-
|
|
32
|
+
n((t) => Math.max(t - 1, 1));
|
|
38
33
|
},
|
|
39
34
|
handleNextPage: () => {
|
|
40
|
-
|
|
35
|
+
n((t) => Math.min(t + 1, r));
|
|
41
36
|
},
|
|
42
37
|
handleLastPage: () => {
|
|
43
|
-
|
|
38
|
+
n(r);
|
|
44
39
|
},
|
|
45
40
|
handleItemsPerPageChange: (t) => {
|
|
46
41
|
L(t);
|
|
47
42
|
},
|
|
48
43
|
handleAddLocation: () => {
|
|
49
|
-
|
|
44
|
+
a(s.COMPANY_LOCATION_CREATE);
|
|
50
45
|
},
|
|
51
46
|
handleEditLocation: (t) => {
|
|
52
|
-
|
|
47
|
+
a(s.COMPANY_LOCATION_EDIT, { uuid: t });
|
|
53
48
|
},
|
|
54
49
|
handleContinue: () => {
|
|
55
|
-
|
|
50
|
+
a(s.COMPANY_LOCATION_DONE);
|
|
56
51
|
}
|
|
57
52
|
},
|
|
58
|
-
children: /* @__PURE__ */ e(v, { flexDirection: "column", gap: 32, children:
|
|
53
|
+
children: /* @__PURE__ */ e(v, { flexDirection: "column", gap: 32, children: c || /* @__PURE__ */ C(A, { children: [
|
|
54
|
+
/* @__PURE__ */ e(l, {}),
|
|
59
55
|
/* @__PURE__ */ e(h, {}),
|
|
60
|
-
/* @__PURE__ */ e(P, {})
|
|
61
|
-
/* @__PURE__ */ e(p, {})
|
|
56
|
+
/* @__PURE__ */ e(P, {})
|
|
62
57
|
] }) })
|
|
63
58
|
}
|
|
64
59
|
) });
|
|
65
60
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
i.Head = l;
|
|
62
|
+
i.List = h;
|
|
63
|
+
i.Actions = P;
|
|
69
64
|
export {
|
|
70
|
-
|
|
65
|
+
i as LocationsList
|
|
71
66
|
};
|
|
72
67
|
//# sourceMappingURL=LocationsList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/LocationsList.tsx"],"sourcesContent":["import { useLocationsGetSuspense } from '@gusto/embedded-api/react-query/locationsGet'\nimport { useState } from 'react'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { LocationsListProvider } from './useLocationsList'\nimport { useI18n } from '@/i18n'\nimport
|
|
1
|
+
{"version":3,"file":"LocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/LocationsList.tsx"],"sourcesContent":["import { useLocationsGetSuspense } from '@gusto/embedded-api/react-query/locationsGet'\nimport { useState } from 'react'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { LocationsListProvider } from './useLocationsList'\nimport { useI18n } from '@/i18n'\nimport { BaseComponent, type BaseComponentInterface } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { companyEvents } from '@/shared/constants'\n\ninterface LocationsListProps extends BaseComponentInterface {\n companyId: string\n}\n\nexport function LocationsList(props: LocationsListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, className, children }: LocationsListProps) {\n useI18n('Company.Locations')\n const { onEvent } = useBase()\n\n const [currentPage, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState(5)\n\n const {\n data: { locationList, httpMeta },\n } = useLocationsGetSuspense({ companyId, page: currentPage, per: itemsPerPage })\n\n const totalPages = Number(httpMeta.response.headers.get('x-total-pages') ?? 1)\n\n const handleItemsPerPageChange = (newCount: number) => {\n setItemsPerPage(newCount)\n }\n const handleFirstPage = () => {\n setCurrentPage(1)\n }\n const handlePreviousPage = () => {\n setCurrentPage(prevPage => Math.max(prevPage - 1, 1))\n }\n const handleNextPage = () => {\n setCurrentPage(prevPage => Math.min(prevPage + 1, totalPages))\n }\n const handleLastPage = () => {\n setCurrentPage(totalPages)\n }\n\n const handleContinue = () => {\n onEvent(companyEvents.COMPANY_LOCATION_DONE)\n }\n const handleAddLocation = () => {\n onEvent(companyEvents.COMPANY_LOCATION_CREATE)\n }\n const handleEditLocation = (uuid: string) => {\n onEvent(companyEvents.COMPANY_LOCATION_EDIT, { uuid })\n }\n\n return (\n <section className={className}>\n <LocationsListProvider\n value={{\n locationList: locationList ?? [],\n currentPage,\n totalPages,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n handleAddLocation,\n handleEditLocation,\n handleContinue,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <List />\n <Actions />\n </>\n )}\n </Flex>\n </LocationsListProvider>\n </section>\n )\n}\n\nLocationsList.Head = Head\nLocationsList.List = List\nLocationsList.Actions = Actions\n"],"names":["LocationsList","props","jsx","BaseComponent","Root","companyId","className","children","useI18n","onEvent","useBase","currentPage","setCurrentPage","useState","itemsPerPage","setItemsPerPage","locationList","httpMeta","useLocationsGetSuspense","totalPages","LocationsListProvider","prevPage","newCount","companyEvents","uuid","Flex","jsxs","Fragment","Head","List","Actions"],"mappings":";;;;;;;;;;;;AAgBO,SAASA,EAAcC,GAA2B;AAErD,SAAA,gBAAAC,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;AAEJ;AAEA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,KAAgC;AACpE,EAAAC,EAAQ,mBAAmB;AACrB,QAAA,EAAE,SAAAC,EAAQ,IAAIC,EAAQ,GAEtB,CAACC,GAAaC,CAAc,IAAIC,EAAS,CAAC,GAC1C,CAACC,GAAcC,CAAe,IAAIF,EAAS,CAAC,GAE5C;AAAA,IACJ,MAAM,EAAE,cAAAG,GAAc,UAAAC,EAAS;AAAA,EAAA,IAC7BC,EAAwB,EAAE,WAAAb,GAAW,MAAMM,GAAa,KAAKG,GAAc,GAEzEK,IAAa,OAAOF,EAAS,SAAS,QAAQ,IAAI,eAAe,KAAK,CAAC;AA6B3E,SAAA,gBAAAf,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACkB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,cAAcJ,KAAgB,CAAC;AAAA,QAC/B,aAAAL;AAAA,QACA,YAAAQ;AAAA,QACA,iBA9BgB,MAAM;AAC5B,UAAAP,EAAe,CAAC;AAAA,QAClB;AAAA,QA6BQ,oBA5BmB,MAAM;AAC/B,UAAAA,EAAe,OAAY,KAAK,IAAIS,IAAW,GAAG,CAAC,CAAC;AAAA,QACtD;AAAA,QA2BQ,gBA1Be,MAAM;AAC3B,UAAAT,EAAe,OAAY,KAAK,IAAIS,IAAW,GAAGF,CAAU,CAAC;AAAA,QAC/D;AAAA,QAyBQ,gBAxBe,MAAM;AAC3B,UAAAP,EAAeO,CAAU;AAAA,QAC3B;AAAA,QAuBQ,0BArCyB,CAACG,MAAqB;AACrD,UAAAP,EAAgBO,CAAQ;AAAA,QAC1B;AAAA,QAoCQ,mBAnBkB,MAAM;AAC9B,UAAAb,EAAQc,EAAc,uBAAuB;AAAA,QAC/C;AAAA,QAkBQ,oBAjBmB,CAACC,MAAiB;AAC3C,UAAAf,EAAQc,EAAc,uBAAuB,EAAE,MAAAC,EAAA,CAAM;AAAA,QACvD;AAAA,QAgBQ,gBAxBe,MAAM;AAC3B,UAAAf,EAAQc,EAAc,qBAAqB;AAAA,QAC7C;AAAA,MAuBM;AAAA,MAEA,UAAA,gBAAArB,EAACuB,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAlB,KAIG,gBAAAmB,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAAzB,EAAC0B,GAAK,EAAA;AAAA,0BACLC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,EAAA,CACX,EAEJ,CAAA;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAEA9B,EAAc,OAAO4B;AACrB5B,EAAc,OAAO6B;AACrB7B,EAAc,UAAU8B;"}
|
|
@@ -7,13 +7,12 @@ import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
|
7
7
|
import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
8
8
|
import "../../../Base/useBase.js";
|
|
9
9
|
import "dompurify";
|
|
10
|
-
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
11
10
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
12
|
-
const [
|
|
11
|
+
const [a, C] = o(
|
|
13
12
|
"CompanyDocumentListContext"
|
|
14
13
|
);
|
|
15
14
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
C as LocationsListProvider,
|
|
16
|
+
a as useLocationsList
|
|
18
17
|
};
|
|
19
18
|
//# sourceMappingURL=useLocationsList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n currentPage: number\n handleItemsPerPageChange: (n: number) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocationsList.js","sources":["../../../../../src/components/Company/Locations/LocationsList/useLocationsList.ts"],"sourcesContent":["import { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\n\ntype LocationsListContextType = {\n locationList: Location[]\n totalPages: number\n currentPage: number\n handleItemsPerPageChange: (n: number) => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleEditLocation: (uuid: string) => void\n handleAddLocation: () => void\n handleContinue: () => void\n}\n\nconst [useLocationsList, LocationsListProvider] = createCompoundContext<LocationsListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useLocationsList, LocationsListProvider }\n"],"names":["useLocationsList","LocationsListProvider","createCompoundContext"],"mappings":";;;;;;;;;;AAiBM,MAAA,CAACA,GAAkBC,CAAqB,IAAIC;AAAA,EAChD;AACF;"}
|
|
@@ -21,6 +21,6 @@ export declare function IndustryContextual(): import("react/jsx-runtime").JSX.El
|
|
|
21
21
|
export declare function BankAccountContextual(): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
export declare function EmployeesContextual(): import("react/jsx-runtime").JSX.Element;
|
|
23
23
|
export declare function PayScheduleContextual(): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export declare function
|
|
25
|
-
export declare function
|
|
24
|
+
export declare function StateTaxesContextual(): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function DocumentSignerContextual(): import("react/jsx-runtime").JSX.Element;
|
|
26
26
|
export declare function OnboardingOverviewContextual(): import("react/jsx-runtime").JSX.Element;
|