@gusto/embedded-react-sdk 0.8.0 → 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 +20 -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/DataCards.module.scss.js +5 -3
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
- 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/FadeIn/FadeIn.module.scss.js +4 -4
- package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.js +1 -1
- package/dist/components/Common/FieldCaption/FieldCaption.js.map +1 -0
- package/dist/components/Common/{UI/FieldCaption → FieldCaption}/index.d.ts +1 -0
- package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.js +1 -1
- package/dist/components/Common/FieldDescription/FieldDescription.js.map +1 -0
- package/dist/components/Common/{UI/FieldDescription → FieldDescription}/index.d.ts +1 -0
- package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.js +1 -1
- package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.js.map +1 -0
- package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/index.d.ts +1 -0
- package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.js +1 -1
- package/dist/components/Common/FieldLayout/FieldLayout.js.map +1 -0
- package/dist/components/Common/FieldLayout/FieldLayoutTypes.d.ts +52 -0
- package/dist/components/Common/{UI/FieldLayout → 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/{UI/Fieldset → Fieldset}/Fieldset.js +1 -1
- package/dist/components/Common/Fieldset/Fieldset.js.map +1 -0
- package/dist/components/Common/{UI/Fieldset → 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/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.js +2 -2
- package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.js.map +1 -0
- package/dist/components/Common/{UI/HorizontalFieldLayout → 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/SignatureForm.d.ts +12 -6
- package/dist/components/Common/SignatureForm/SignatureForm.js +10 -10
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- 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/Alert.d.ts +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +13 -12
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/AlertTypes.d.ts +16 -4
- package/dist/components/Common/UI/Alert/index.d.ts +1 -0
- package/dist/components/Common/UI/Badge/BadgeTypes.d.ts +6 -0
- package/dist/components/Common/UI/Button/Button.js +28 -27
- package/dist/components/Common/UI/Button/Button.js.map +1 -1
- package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
- package/dist/components/Common/UI/Button/ButtonTypes.d.ts +29 -4
- package/dist/components/Common/UI/Button/index.d.ts +1 -0
- package/dist/components/Common/UI/CalendarPreview/CalendarPreviewTypes.d.ts +24 -0
- package/dist/components/Common/UI/CalendarPreview/index.d.ts +1 -0
- package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
- package/dist/components/Common/UI/Card/CardTypes.d.ts +12 -4
- package/dist/components/Common/UI/Checkbox/Checkbox.js +4 -4
- package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Common/UI/Checkbox/CheckboxTypes.d.ts +16 -1
- package/dist/components/Common/UI/Checkbox/index.d.ts +1 -0
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js +4 -4
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +33 -3
- package/dist/components/Common/UI/CheckboxGroup/index.d.ts +1 -0
- package/dist/components/Common/UI/ComboBox/ComboBox.js +8 -8
- package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +31 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.js +13 -13
- package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +25 -1
- package/dist/components/Common/UI/DatePicker/index.d.ts +1 -0
- package/dist/components/Common/UI/Heading/HeadingTypes.d.ts +12 -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/LinkTypes.d.ts +53 -1
- package/dist/components/Common/UI/Link/index.d.ts +1 -0
- package/dist/components/Common/UI/List/ListTypes.d.ts +3 -5
- package/dist/components/Common/UI/List/index.d.ts +1 -0
- package/dist/components/Common/UI/Menu/MenuTypes.d.ts +30 -0
- package/dist/components/Common/UI/Menu/index.d.ts +1 -0
- package/dist/components/Common/UI/NumberInput/NumberInput.js +4 -4
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInputTypes.d.ts +34 -1
- package/dist/components/Common/UI/NumberInput/index.d.ts +1 -0
- package/dist/components/Common/UI/ProgressBar/ProgressBarTypes.d.ts +12 -0
- package/dist/components/Common/UI/ProgressBar/index.d.ts +1 -0
- package/dist/components/Common/UI/Radio/Radio.js +1 -1
- package/dist/components/Common/UI/Radio/Radio.js.map +1 -1
- package/dist/components/Common/UI/Radio/RadioTypes.d.ts +16 -1
- package/dist/components/Common/UI/Radio/index.d.ts +1 -0
- package/dist/components/Common/UI/RadioGroup/RadioGroup.js +4 -4
- package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +33 -3
- package/dist/components/Common/UI/RadioGroup/index.d.ts +1 -0
- package/dist/components/Common/UI/Select/Select.js +8 -8
- package/dist/components/Common/UI/Select/Select.js.map +1 -1
- package/dist/components/Common/UI/Select/SelectTypes.d.ts +34 -1
- package/dist/components/Common/UI/Select/index.d.ts +1 -0
- package/dist/components/Common/UI/Switch/Switch.js +1 -1
- package/dist/components/Common/UI/Switch/Switch.js.map +1 -1
- package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +25 -1
- package/dist/components/Common/UI/Switch/index.d.ts +1 -0
- package/dist/components/Common/UI/Table/TableTypes.d.ts +21 -0
- package/dist/components/Common/UI/Table/index.d.ts +1 -0
- package/dist/components/Common/UI/Text/TextTypes.d.ts +18 -0
- package/dist/components/Common/UI/Text/index.d.ts +1 -0
- package/dist/components/Common/UI/TextInput/TextInput.js +1 -1
- package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
- package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +22 -1
- 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 +26 -25
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +7 -7
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.d.ts +2 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.d.ts +41 -15
- package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.js +17 -20
- package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.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/InviteSignatory.js +10 -10
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +17 -11
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +42 -45
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.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/BankAccountForm.js +6 -6
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +12 -6
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +2 -2
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- 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/BankAccount/BankAccountVerify/BankAccountVerify.js +10 -10
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +12 -6
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +17 -17
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.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 +31 -31
- 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.d.ts +18 -8
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -15
- 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/Form.d.ts +27 -11
- package/dist/components/Company/Locations/LocationForm/Form.js +24 -24
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +24 -24
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- 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 +68 -67
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +28 -31
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.module.scss.js +8 -0
- package/dist/components/Company/PaySchedule/_parts/List.module.scss.js.map +1 -0
- 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.d.ts +31 -13
- package/dist/components/Company/PaySchedule/usePaySchedule.js +13 -19
- 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/Form.d.ts +3 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +3 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +66 -77
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- 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 +48 -47
- 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/List.js +10 -10
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Compensation/index.d.ts +1 -0
- package/dist/components/Employee/Compensation/useCompensation.d.ts +53 -45
- package/dist/components/Employee/Compensation/useCompensation.js +59 -68
- package/dist/components/Employee/Compensation/useCompensation.js.map +1 -1
- package/dist/components/Employee/Deductions/Deductions.d.ts +11 -7
- package/dist/components/Employee/Deductions/Deductions.js +76 -74
- 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.d.ts +34 -14
- package/dist/components/Employee/Deductions/useDeductions.js +10 -29
- 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/SignatureForm.js +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- 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/BankAccount.d.ts +22 -10
- package/dist/components/Employee/PaymentMethod/BankAccount.js +9 -9
- package/dist/components/Employee/PaymentMethod/BankAccount.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +74 -74
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +10 -6
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +8 -8
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/index.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +92 -37
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +31 -39
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +68 -31
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +33 -46
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.d.ts +33 -13
- package/dist/components/Employee/Profile/HomeAddress.js +39 -38
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +81 -32
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +60 -74
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.d.ts +1 -1
- package/dist/components/Employee/Profile/Profile.js +69 -72
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/SelfPersonalDetails.d.ts +44 -15
- package/dist/components/Employee/Profile/SelfPersonalDetails.js +18 -21
- package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +1 -1
- 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/FederalForm.d.ts +28 -12
- package/dist/components/Employee/Taxes/FederalForm.js +28 -28
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/StateForm.d.ts +9 -5
- package/dist/components/Employee/Taxes/StateForm.js +6 -6
- 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 +78 -77
- 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 +5 -0
- package/dist/contexts/ApiProvider/ApiProvider.js +34 -0
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -0
- package/dist/contexts/GustoApiProvider/index.d.ts +1 -0
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +2 -7
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +26 -24
- 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/helpers/validations.d.ts +6 -5
- package/dist/helpers/validations.js +10 -17
- package/dist/helpers/validations.js.map +1 -1
- 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 +7 -4
- package/dist/components/Common/UI/FieldCaption/FieldCaption.js.map +0 -1
- package/dist/components/Common/UI/FieldDescription/FieldDescription.js.map +0 -1
- package/dist/components/Common/UI/FieldErrorMessage/FieldErrorMessage.js.map +0 -1
- package/dist/components/Common/UI/FieldLayout/FieldLayout.js.map +0 -1
- package/dist/components/Common/UI/FieldLayout/FieldLayoutTypes.d.ts +0 -19
- package/dist/components/Common/UI/Fieldset/Fieldset.js.map +0 -1
- package/dist/components/Common/UI/HorizontalFieldLayout/HorizontalFieldLayout.js.map +0 -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/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.d.ts +0 -0
- /package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.module.scss.js +0 -0
- /package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.module.scss.js.map +0 -0
- /package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.d.ts +0 -0
- /package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.module.scss.js +0 -0
- /package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.module.scss.js.map +0 -0
- /package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.d.ts +0 -0
- /package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.module.scss.js +0 -0
- /package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.module.scss.js.map +0 -0
- /package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.d.ts +0 -0
- /package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.module.scss.js +0 -0
- /package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.module.scss.js.map +0 -0
- /package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.d.ts +0 -0
- /package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.module.scss.js +0 -0
- /package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.module.scss.js.map +0 -0
- /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.d.ts +0 -0
- /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.module.scss.js +0 -0
- /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.module.scss.js.map +0 -0
- /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayoutTypes.d.ts +0 -0
- /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
|
@@ -7,11 +7,10 @@ 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 [x, y] = t("InviteSignatoryContext");
|
|
13
12
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
y as InviteSignatoryProvider,
|
|
14
|
+
x as useInviteSignatory
|
|
16
15
|
};
|
|
17
16
|
//# sourceMappingURL=useInviteSignatory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInviteSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype InviteSignatoryContextType = {\n isPending: boolean\n}\n\nexport type InviteSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title'> & {\n confirmEmail: string\n }\n>\n\nconst [useInviteSignatory, InviteSignatoryProvider] =\n createCompoundContext<InviteSignatoryContextType>('InviteSignatoryContext')\n\nexport { useInviteSignatory, InviteSignatoryProvider }\n"],"names":["useInviteSignatory","InviteSignatoryProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useInviteSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype InviteSignatoryContextType = {\n isPending: boolean\n}\n\nexport type InviteSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title'> & {\n confirmEmail: string\n }\n>\n\nconst [useInviteSignatory, InviteSignatoryProvider] =\n createCompoundContext<InviteSignatoryContextType>('InviteSignatoryContext')\n\nexport { useInviteSignatory, InviteSignatoryProvider }\n"],"names":["useInviteSignatory","InviteSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;AAcA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
|
|
@@ -7,15 +7,14 @@ 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 y = {
|
|
13
12
|
createSignatory: "createSignatory",
|
|
14
13
|
inviteSignatory: "inviteSignatory"
|
|
15
|
-
}, [
|
|
14
|
+
}, [S, c] = t("AssignSignatoryContext");
|
|
16
15
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
c as AssignSignatoryProvider,
|
|
17
|
+
y as SignatoryAssignmentMode,
|
|
18
|
+
S as useAssignSignatory
|
|
20
19
|
};
|
|
21
20
|
//# sourceMappingURL=useAssignSignatory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAssignSignatory.js","sources":["../../../../src/components/Company/AssignSignatory/useAssignSignatory.ts"],"sourcesContent":["import { type CreateSignatoryDefaultValues } from './CreateSignatory'\nimport { type InviteSignatoryDefaultValues } from './InviteSignatory'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const SignatoryAssignmentMode = {\n createSignatory: 'createSignatory',\n inviteSignatory: 'inviteSignatory',\n} as const\n\nexport type AssignSignatoryDefaultValues = RequireAtLeastOne<{\n create?: CreateSignatoryDefaultValues\n invite?: InviteSignatoryDefaultValues\n}>\n\ntype AssignSignatoryContextType = {\n companyId: string\n signatoryId?: string\n defaultValues?: AssignSignatoryDefaultValues\n onSignatoryAssignmentModeChange: (mode: string) => void\n onSignatoryFormEvent: BaseComponentInterface['onEvent']\n}\n\nconst [useAssignSignatory, AssignSignatoryProvider] =\n createCompoundContext<AssignSignatoryContextType>('AssignSignatoryContext')\n\nexport { useAssignSignatory, AssignSignatoryProvider }\n"],"names":["SignatoryAssignmentMode","useAssignSignatory","AssignSignatoryProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAssignSignatory.js","sources":["../../../../src/components/Company/AssignSignatory/useAssignSignatory.ts"],"sourcesContent":["import { type CreateSignatoryDefaultValues } from './CreateSignatory'\nimport { type InviteSignatoryDefaultValues } from './InviteSignatory'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport const SignatoryAssignmentMode = {\n createSignatory: 'createSignatory',\n inviteSignatory: 'inviteSignatory',\n} as const\n\nexport type AssignSignatoryDefaultValues = RequireAtLeastOne<{\n create?: CreateSignatoryDefaultValues\n invite?: InviteSignatoryDefaultValues\n}>\n\ntype AssignSignatoryContextType = {\n companyId: string\n signatoryId?: string\n defaultValues?: AssignSignatoryDefaultValues\n onSignatoryAssignmentModeChange: (mode: string) => void\n onSignatoryFormEvent: BaseComponentInterface['onEvent']\n}\n\nconst [useAssignSignatory, AssignSignatoryProvider] =\n createCompoundContext<AssignSignatoryContextType>('AssignSignatoryContext')\n\nexport { useAssignSignatory, AssignSignatoryProvider }\n"],"names":["SignatoryAssignmentMode","useAssignSignatory","AssignSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;AAMO,MAAMA,IAA0B;AAAA,EACrC,iBAAiB;AAAA,EACjB,iBAAiB;AACnB,GAeM,CAACC,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseComponentInterface } from '../../Base';
|
|
2
|
+
export interface LocationsProps extends BaseComponentInterface<'Company.BankAccount'> {
|
|
3
|
+
companyId: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function BankAccount({ companyId, onEvent, dictionary }: LocationsProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare namespace BankAccount {
|
|
7
|
+
var BankAccountList: typeof import("./BankAccountList/BankAccountList").BankAccountList;
|
|
8
|
+
var BankAccountForm: typeof import("./BankAccountForm/BankAccountForm").BankAccountForm;
|
|
9
|
+
var BankAccountVerify: typeof import("./BankAccountVerify/BankAccountVerify").BankAccountVerify;
|
|
10
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { createMachine as s } from "robot3";
|
|
3
|
+
import { useBankAccountsGetSuspense as k } from "@gusto/embedded-api/react-query/bankAccountsGet";
|
|
4
|
+
import { BankAccountListContextual as A, BankAccountFormContextual as p } from "./BankAccountComponents.js";
|
|
5
|
+
import { bankAccountStateMachine as f } from "./stateMachine.js";
|
|
6
|
+
import { BankAccountList as B } from "./BankAccountList/BankAccountList.js";
|
|
7
|
+
import { BankAccountForm as l } from "./BankAccountForm/BankAccountForm.js";
|
|
8
|
+
import { BankAccountVerify as L } from "./BankAccountVerify/BankAccountVerify.js";
|
|
9
|
+
import { Flow as h } from "../../Flow/Flow.js";
|
|
10
|
+
import { useComponentDictionary as y } from "../../../i18n/I18n.js";
|
|
11
|
+
function n({ companyId: t, onEvent: a, dictionary: r }) {
|
|
12
|
+
y("Company.BankAccount", r);
|
|
13
|
+
const { data: m } = k({ companyId: t }), c = m.companyBankAccountList, o = c.length > 0 ? c[0] : null, e = s(
|
|
14
|
+
o ? "viewBankAccount" : "addBankAccount",
|
|
15
|
+
f,
|
|
16
|
+
(i) => ({
|
|
17
|
+
...i,
|
|
18
|
+
component: o ? A : p,
|
|
19
|
+
companyId: t,
|
|
20
|
+
bankAccount: o,
|
|
21
|
+
showVerifiedMessage: !1
|
|
22
|
+
})
|
|
23
|
+
);
|
|
24
|
+
return /* @__PURE__ */ u(h, { machine: e, onEvent: a });
|
|
25
|
+
}
|
|
26
|
+
n.BankAccountList = B;
|
|
27
|
+
n.BankAccountForm = l;
|
|
28
|
+
n.BankAccountVerify = L;
|
|
29
|
+
export {
|
|
30
|
+
n as BankAccount
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=BankAccount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BankAccount.js","sources":["../../../../src/components/Company/BankAccount/BankAccount.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport { useBankAccountsGetSuspense } from '@gusto/embedded-api/react-query/bankAccountsGet'\nimport {\n BankAccountFormContextual,\n type BankAccountContextInterface,\n} from './BankAccountComponents'\nimport { bankAccountStateMachine } from './stateMachine'\nimport { BankAccountListContextual } from './BankAccountComponents'\nimport { BankAccountList } from './BankAccountList/BankAccountList'\nimport { BankAccountForm } from './BankAccountForm/BankAccountForm'\nimport { BankAccountVerify } from './BankAccountVerify/BankAccountVerify'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface LocationsProps extends BaseComponentInterface<'Company.BankAccount'> {\n companyId: string\n}\n\nexport function BankAccount({ companyId, onEvent, dictionary }: LocationsProps) {\n useComponentDictionary('Company.BankAccount', dictionary)\n const { data } = useBankAccountsGetSuspense({ companyId })\n const companyBankAccountList = data.companyBankAccountList!\n //Currently, we only support a single default bank account per company.\n const bankAccount = companyBankAccountList.length > 0 ? companyBankAccountList[0]! : null\n\n const manageLocations = createMachine(\n bankAccount ? 'viewBankAccount' : 'addBankAccount',\n bankAccountStateMachine,\n (initialContext: BankAccountContextInterface) => ({\n ...initialContext,\n component: bankAccount ? BankAccountListContextual : BankAccountFormContextual,\n companyId,\n bankAccount,\n showVerifiedMessage: false,\n }),\n )\n return <Flow machine={manageLocations} onEvent={onEvent} />\n}\n\nBankAccount.BankAccountList = BankAccountList\nBankAccount.BankAccountForm = BankAccountForm\nBankAccount.BankAccountVerify = BankAccountVerify\n"],"names":["BankAccount","companyId","onEvent","dictionary","useComponentDictionary","data","useBankAccountsGetSuspense","companyBankAccountList","bankAccount","manageLocations","createMachine","bankAccountStateMachine","initialContext","BankAccountListContextual","BankAccountFormContextual","jsx","Flow","BankAccountList","BankAccountForm","BankAccountVerify"],"mappings":";;;;;;;;;;AAmBO,SAASA,EAAY,EAAE,WAAAC,GAAW,SAAAC,GAAS,YAAAC,KAA8B;AAC9E,EAAAC,EAAuB,uBAAuBD,CAAU;AACxD,QAAM,EAAE,MAAAE,EAAK,IAAIC,EAA2B,EAAE,WAAAL,GAAW,GACnDM,IAAyBF,EAAK,wBAE9BG,IAAcD,EAAuB,SAAS,IAAIA,EAAuB,CAAC,IAAK,MAE/EE,IAAkBC;AAAA,IACtBF,IAAc,oBAAoB;AAAA,IAClCG;AAAA,IACA,CAACC,OAAiD;AAAA,MAChD,GAAGA;AAAA,MACH,WAAWJ,IAAcK,IAA4BC;AAAA,MACrD,WAAAb;AAAA,MACA,aAAAO;AAAA,MACA,qBAAqB;AAAA,IACvB;AAAA,EACF;AACA,SAAQ,gBAAAO,EAAAC,GAAA,EAAK,SAASP,GAAiB,SAAAP,EAAkB,CAAA;AAC3D;AAEAF,EAAY,kBAAkBiB;AAC9BjB,EAAY,kBAAkBkB;AAC9BlB,EAAY,oBAAoBmB;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o, jsxs as F, Fragment as C } from "react/jsx-runtime";
|
|
2
|
-
import { useBankAccountsCreateMutation as
|
|
3
|
-
import { useForm as
|
|
4
|
-
import {
|
|
2
|
+
import { useBankAccountsCreateMutation as k } from "@gusto/embedded-api/react-query/bankAccountsCreate";
|
|
3
|
+
import { useForm as b, FormProvider as g } from "react-hook-form";
|
|
4
|
+
import { zodResolver as v } from "@hookform/resolvers/zod";
|
|
5
5
|
import { Head as m } from "./Head.js";
|
|
6
6
|
import { BankAccountFormSchema as y, Form as c } from "./Form.js";
|
|
7
7
|
import { Actions as i } from "./Actions.js";
|
|
@@ -17,8 +17,8 @@ function r(n) {
|
|
|
17
17
|
}
|
|
18
18
|
function T({ companyId: n, className: a, children: t }) {
|
|
19
19
|
E("Company.BankAccount");
|
|
20
|
-
const { onEvent: u, baseSubmitHandler: s } = S(), { mutateAsync: d, isPending: l } =
|
|
21
|
-
resolver:
|
|
20
|
+
const { onEvent: u, baseSubmitHandler: s } = S(), { mutateAsync: d, isPending: l } = k(), { control: f, ...e } = b({
|
|
21
|
+
resolver: v(y),
|
|
22
22
|
defaultValues: { accountNumber: "", routingNumber: "" }
|
|
23
23
|
}), p = async (A) => {
|
|
24
24
|
await s(A, async (h) => {
|
|
@@ -29,7 +29,7 @@ function T({ companyId: n, className: a, children: t }) {
|
|
|
29
29
|
u(R.COMPANY_BANK_ACCOUNT_CREATED, B);
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
|
-
return /* @__PURE__ */ o("section", { className: a, children: /* @__PURE__ */ o(
|
|
32
|
+
return /* @__PURE__ */ o("section", { className: a, children: /* @__PURE__ */ o(g, { ...e, control: f, children: /* @__PURE__ */ o(x, { onSubmit: e.handleSubmit(p), children: /* @__PURE__ */ o(P, { value: { isPending: l }, children: /* @__PURE__ */ o(H, { flexDirection: "column", gap: 32, children: t || /* @__PURE__ */ F(C, { children: [
|
|
33
33
|
/* @__PURE__ */ o(m, {}),
|
|
34
34
|
/* @__PURE__ */ o(c, {}),
|
|
35
35
|
/* @__PURE__ */ o(i, {})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BankAccountForm.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/BankAccountForm.tsx"],"sourcesContent":["import { useBankAccountsCreateMutation } from '@gusto/embedded-api/react-query/bankAccountsCreate'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport {
|
|
1
|
+
{"version":3,"file":"BankAccountForm.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/BankAccountForm.tsx"],"sourcesContent":["import { useBankAccountsCreateMutation } from '@gusto/embedded-api/react-query/bankAccountsCreate'\nimport { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { Head } from './Head'\nimport type { BankAccountFormInputs } from './Form'\nimport { BankAccountFormSchema, Form } from './Form'\nimport { Actions } from './Actions'\nimport { BankAccountFormProvider } from './context'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { componentEvents } from '@/shared/constants'\n\ninterface BankAccountFormProps extends CommonComponentInterface {\n companyId: string\n}\n\nexport function BankAccountForm(props: BankAccountFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children }: BankAccountFormProps) {\n useI18n('Company.BankAccount')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { mutateAsync: createBankAccount, isPending: isPendingCreate } =\n useBankAccountsCreateMutation()\n\n const { control, ...methods } = useForm<BankAccountFormInputs>({\n resolver: zodResolver(BankAccountFormSchema),\n defaultValues: { accountNumber: '', routingNumber: '' },\n })\n\n const onSubmit = async (data: BankAccountFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n const { companyBankAccount } = await createBankAccount({\n //Account type is always checking for company bank accounts\n request: { companyId, requestBody: { ...payload, accountType: 'Checking' } },\n })\n onEvent(componentEvents.COMPANY_BANK_ACCOUNT_CREATED, companyBankAccount)\n })\n }\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <BankAccountFormProvider value={{ isPending: isPendingCreate }}>\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </BankAccountFormProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\nBankAccountForm.Head = Head\nBankAccountForm.Form = Form\nBankAccountForm.Actions = Actions\n"],"names":["BankAccountForm","props","jsx","BaseComponent","Root","companyId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","createBankAccount","isPendingCreate","useBankAccountsCreateMutation","control","methods","useForm","zodResolver","BankAccountFormSchema","onSubmit","data","payload","companyBankAccount","componentEvents","FormProvider","HtmlForm","BankAccountFormProvider","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;;;;;;;;;AAoBO,SAASA,EAAgBC,GAAsD;AAElF,SAAA,gBAAAC,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;AAEJ;AACA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,KAAkC;AACtE,EAAAC,EAAQ,qBAAqB;AAC7B,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAkB,IAAIC,EAAQ,GAEzC,EAAE,aAAaC,GAAmB,WAAWC,EAAA,IACjDC,EAA8B,GAE1B,EAAE,SAAAC,GAAS,GAAGC,EAAA,IAAYC,EAA+B;AAAA,IAC7D,UAAUC,EAAYC,CAAqB;AAAA,IAC3C,eAAe,EAAE,eAAe,IAAI,eAAe,GAAG;AAAA,EAAA,CACvD,GAEKC,IAAW,OAAOC,MAAgC;AAChD,UAAAX,EAAkBW,GAAM,OAAMC,MAAW;AAC7C,YAAM,EAAE,oBAAAC,MAAuB,MAAMX,EAAkB;AAAA;AAAA,QAErD,SAAS,EAAE,WAAAP,GAAW,aAAa,EAAE,GAAGiB,GAAS,aAAa,WAAa,EAAA;AAAA,MAAA,CAC5E;AACO,MAAAb,EAAAe,EAAgB,8BAA8BD,CAAkB;AAAA,IAAA,CACzE;AAAA,EACH;AACA,SACG,gBAAArB,EAAA,WAAA,EAAQ,WAAAI,GACP,UAAA,gBAAAJ,EAACuB,GAAc,EAAA,GAAGT,GAAS,SAAAD,GACzB,UAAC,gBAAAb,EAAAwB,GAAA,EAAS,UAAUV,EAAQ,aAAaI,CAAQ,GAC/C,UAAC,gBAAAlB,EAAAyB,GAAA,EAAwB,OAAO,EAAE,WAAWd,EAC3C,GAAA,UAAA,gBAAAX,EAAC0B,GAAK,EAAA,eAAc,UAAS,KAAK,IAC/B,UAAArB,KAIG,gBAAAsB,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAA5B,EAAC6B,GAAK,EAAA;AAAA,sBACLC,GAAK,EAAA;AAAA,sBACLC,GAAQ,CAAA,CAAA;AAAA,EAAA,EAAA,CACX,EAEJ,CAAA,EAAA,CACF,EACF,CAAA,EAAA,CACF,EACF,CAAA;AAEJ;AACAjC,EAAgB,OAAO+B;AACvB/B,EAAgB,OAAOgC;AACvBhC,EAAgB,UAAUiC;"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const BankAccountFormSchema:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
},
|
|
6
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const BankAccountFormSchema: z.ZodObject<{
|
|
3
|
+
routingNumber: z.ZodString;
|
|
4
|
+
accountNumber: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
routingNumber: string;
|
|
7
|
+
accountNumber: string;
|
|
8
|
+
}, {
|
|
9
|
+
routingNumber: string;
|
|
10
|
+
accountNumber: string;
|
|
11
|
+
}>;
|
|
12
|
+
export type BankAccountFormInputs = z.infer<typeof BankAccountFormSchema>;
|
|
7
13
|
export declare function Form(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as t, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { z as n } from "zod";
|
|
3
3
|
import { useTranslation as i } from "react-i18next";
|
|
4
4
|
import { accountNumberValidation as m, routingNumberValidation as u } from "../../../../helpers/validations.js";
|
|
5
5
|
import { Flex as a } from "../../../Common/Flex/Flex.js";
|
|
6
6
|
import { TextInputField as e } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
7
|
-
const N = n({
|
|
7
|
+
const N = n.object({
|
|
8
8
|
routingNumber: u,
|
|
9
9
|
accountNumber: m
|
|
10
10
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/Form.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { accountNumberValidation, routingNumberValidation } from '@/helpers/validations'\nimport { Flex, TextInputField } from '@/components/Common'\n\nexport const BankAccountFormSchema = z.object({\n routingNumber: routingNumberValidation,\n accountNumber: accountNumberValidation,\n})\n\nexport type BankAccountFormInputs = z.infer<typeof BankAccountFormSchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.BankAccount')\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <TextInputField\n name=\"routingNumber\"\n isRequired\n label={t('form.routingNumberLabel')}\n description={t('form.routingNumberDescription')}\n errorMessage={t('validations.routingNumber')}\n />\n <TextInputField\n name=\"accountNumber\"\n label={t('form.accountNumberLabel')}\n isRequired\n errorMessage={t('validations.accountNumber')}\n />\n </Flex>\n )\n}\n"],"names":["BankAccountFormSchema","z","routingNumberValidation","accountNumberValidation","Form","t","useTranslation","jsxs","Flex","jsx","TextInputField"],"mappings":";;;;;;AAKa,MAAAA,IAAwBC,EAAE,OAAO;AAAA,EAC5C,eAAeC;AAAA,EACf,eAAeC;AACjB,CAAC;AAIM,SAASC,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB;AAElD,SACG,gBAAAC,EAAAC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAOL,EAAE,yBAAyB;AAAA,QAClC,aAAaA,EAAE,+BAA+B;AAAA,QAC9C,cAAcA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAC7C;AAAA,IACA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOL,EAAE,yBAAyB;AAAA,QAClC,YAAU;AAAA,QACV,cAAcA,EAAE,2BAA2B;AAAA,MAAA;AAAA,IAAA;AAAA,EAC7C,GACF;AAEJ;"}
|
|
@@ -7,11 +7,10 @@ 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 [k, x] = o("BankAccountContext");
|
|
13
12
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
x as BankAccountFormProvider,
|
|
14
|
+
k as useBankAccountForm
|
|
16
15
|
};
|
|
17
16
|
//# sourceMappingURL=context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype BankAccountFormContextType = {\n isPending: boolean\n}\n\nconst [useBankAccountForm, BankAccountFormProvider] =\n createCompoundContext<BankAccountFormContextType>('BankAccountContext')\n\nexport { useBankAccountForm, BankAccountFormProvider }\n"],"names":["useBankAccountForm","BankAccountFormProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"context.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountForm/context.ts"],"sourcesContent":["import { createCompoundContext } from '@/components/Base'\n\ntype BankAccountFormContextType = {\n isPending: boolean\n}\n\nconst [useBankAccountForm, BankAccountFormProvider] =\n createCompoundContext<BankAccountFormContextType>('BankAccountContext')\n\nexport { useBankAccountForm, BankAccountFormProvider }\n"],"names":["useBankAccountForm","BankAccountFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;AAMA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,oBAAoB;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as v, Fragment as C } from "react/jsx-runtime";
|
|
2
2
|
import { useForm as b, FormProvider as V } from "react-hook-form";
|
|
3
|
-
import {
|
|
3
|
+
import { zodResolver as x } from "@hookform/resolvers/zod";
|
|
4
4
|
import { useBankAccountsVerifyMutation as E } from "@gusto/embedded-api/react-query/bankAccountsVerify";
|
|
5
5
|
import { Head as c } from "./Head.js";
|
|
6
6
|
import { BankAccountVerifyProvider as S } from "./context.js";
|
|
@@ -15,29 +15,29 @@ import { componentEvents as m } from "../../../../shared/constants.js";
|
|
|
15
15
|
function r(n) {
|
|
16
16
|
return /* @__PURE__ */ o(g, { ...n, children: /* @__PURE__ */ o(_, { ...n, children: n.children }) });
|
|
17
17
|
}
|
|
18
|
-
function _({ companyId: n, bankAccountId: u, className:
|
|
18
|
+
function _({ companyId: n, bankAccountId: u, className: d, children: t }) {
|
|
19
19
|
I("Company.BankAccount");
|
|
20
|
-
const { onEvent: e, baseSubmitHandler:
|
|
20
|
+
const { onEvent: e, baseSubmitHandler: f } = H(), { mutateAsync: l, isPending: p } = E(), { control: A, ...i } = b({
|
|
21
21
|
resolver: x(N),
|
|
22
22
|
defaultValues: { deposit1: 0, deposit2: 0 }
|
|
23
23
|
}), h = async (B) => {
|
|
24
|
-
await
|
|
25
|
-
const { companyBankAccount:
|
|
26
|
-
request: { companyId: n, bankAccountUuid: u, requestBody:
|
|
24
|
+
await f(B, async (F) => {
|
|
25
|
+
const { companyBankAccount: k } = await l({
|
|
26
|
+
request: { companyId: n, bankAccountUuid: u, requestBody: F }
|
|
27
27
|
});
|
|
28
|
-
e(m.COMPANY_BANK_ACCOUNT_VERIFIED,
|
|
28
|
+
e(m.COMPANY_BANK_ACCOUNT_VERIFIED, k);
|
|
29
29
|
});
|
|
30
30
|
}, y = () => {
|
|
31
31
|
e(m.CANCEL);
|
|
32
32
|
};
|
|
33
|
-
return /* @__PURE__ */ o("section", { className:
|
|
33
|
+
return /* @__PURE__ */ o("section", { className: d, children: /* @__PURE__ */ o(V, { ...i, control: A, children: /* @__PURE__ */ o(P, { onSubmit: i.handleSubmit(h), children: /* @__PURE__ */ o(
|
|
34
34
|
S,
|
|
35
35
|
{
|
|
36
36
|
value: {
|
|
37
37
|
isPending: p,
|
|
38
38
|
handleCancel: y
|
|
39
39
|
},
|
|
40
|
-
children: /* @__PURE__ */ o(R, { flexDirection: "column", gap: 32, children: t || /* @__PURE__ */
|
|
40
|
+
children: /* @__PURE__ */ o(R, { flexDirection: "column", gap: 32, children: t || /* @__PURE__ */ v(C, { children: [
|
|
41
41
|
/* @__PURE__ */ o(c, {}),
|
|
42
42
|
/* @__PURE__ */ o(a, {}),
|
|
43
43
|
/* @__PURE__ */ o(s, {})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BankAccountVerify.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport {
|
|
1
|
+
{"version":3,"file":"BankAccountVerify.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.tsx"],"sourcesContent":["import { FormProvider, useForm } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport { useBankAccountsVerifyMutation } from '@gusto/embedded-api/react-query/bankAccountsVerify'\nimport { Head } from './Head'\nimport { BankAccountVerifyProvider } from './context'\nimport type { BankAccountVerifyInputs } from './Form'\nimport { BankAccountVerifySchema, Form } from './Form'\nimport { Actions } from './Actions'\nimport { Form as HtmlForm } from '@/components/Common/Form'\nimport type { BaseComponentInterface, CommonComponentInterface } from '@/components/Base/Base'\nimport { BaseComponent } from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n/I18n'\nimport { Flex } from '@/components/Common/Flex/Flex'\nimport { componentEvents } from '@/shared/constants'\n\ninterface BankAccountVerifyProps extends CommonComponentInterface {\n companyId: string\n bankAccountId: string\n}\n\nexport function BankAccountVerify(props: BankAccountVerifyProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, bankAccountId, className, children }: BankAccountVerifyProps) {\n useI18n('Company.BankAccount')\n const { onEvent, baseSubmitHandler } = useBase()\n const { mutateAsync: verifyBankAccount, isPending } = useBankAccountsVerifyMutation()\n\n const { control, ...methods } = useForm<BankAccountVerifyInputs>({\n resolver: zodResolver(BankAccountVerifySchema),\n defaultValues: { deposit1: 0, deposit2: 0 },\n })\n\n const onSubmit = async (data: BankAccountVerifyInputs) => {\n await baseSubmitHandler(data, async payload => {\n const { companyBankAccount } = await verifyBankAccount({\n request: { companyId, bankAccountUuid: bankAccountId, requestBody: payload },\n })\n onEvent(componentEvents.COMPANY_BANK_ACCOUNT_VERIFIED, companyBankAccount)\n })\n }\n const handleCancel = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n return (\n <section className={className}>\n <FormProvider {...methods} control={control}>\n <HtmlForm onSubmit={methods.handleSubmit(onSubmit)}>\n <BankAccountVerifyProvider\n value={{\n isPending,\n handleCancel,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Form />\n <Actions />\n </>\n )}\n </Flex>\n </BankAccountVerifyProvider>\n </HtmlForm>\n </FormProvider>\n </section>\n )\n}\nBankAccountVerify.Head = Head\nBankAccountVerify.Form = Form\nBankAccountVerify.Actions = Actions\n"],"names":["BankAccountVerify","props","jsx","BaseComponent","Root","companyId","bankAccountId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","verifyBankAccount","isPending","useBankAccountsVerifyMutation","control","methods","useForm","zodResolver","BankAccountVerifySchema","onSubmit","data","payload","companyBankAccount","componentEvents","handleCancel","FormProvider","HtmlForm","BankAccountVerifyProvider","Flex","jsxs","Fragment","Head","Form","Actions"],"mappings":";;;;;;;;;;;;;;AAqBO,SAASA,EAAkBC,GAAwD;AAEtF,SAAA,gBAAAC,EAACC,GAAe,EAAA,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAMA,EAAA,SAAA,CAAS,EACnC,CAAA;AAEJ;AACA,SAASG,EAAK,EAAE,WAAAC,GAAW,eAAAC,GAAe,WAAAC,GAAW,UAAAC,KAAoC;AACvF,EAAAC,EAAQ,qBAAqB;AAC7B,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAkB,IAAIC,EAAQ,GACzC,EAAE,aAAaC,GAAmB,WAAAC,EAAA,IAAcC,EAA8B,GAE9E,EAAE,SAAAC,GAAS,GAAGC,EAAA,IAAYC,EAAiC;AAAA,IAC/D,UAAUC,EAAYC,CAAuB;AAAA,IAC7C,eAAe,EAAE,UAAU,GAAG,UAAU,EAAE;AAAA,EAAA,CAC3C,GAEKC,IAAW,OAAOC,MAAkC;AAClD,UAAAX,EAAkBW,GAAM,OAAMC,MAAW;AAC7C,YAAM,EAAE,oBAAAC,MAAuB,MAAMX,EAAkB;AAAA,QACrD,SAAS,EAAE,WAAAR,GAAW,iBAAiBC,GAAe,aAAaiB,EAAQ;AAAA,MAAA,CAC5E;AACO,MAAAb,EAAAe,EAAgB,+BAA+BD,CAAkB;AAAA,IAAA,CAC1E;AAAA,EACH,GACME,IAAe,MAAM;AACzB,IAAAhB,EAAQe,EAAgB,MAAM;AAAA,EAChC;AAEA,SACG,gBAAAvB,EAAA,WAAA,EAAQ,WAAAK,GACP,UAAA,gBAAAL,EAACyB,KAAc,GAAGV,GAAS,SAAAD,GACzB,UAAA,gBAAAd,EAAC0B,GAAS,EAAA,UAAUX,EAAQ,aAAaI,CAAQ,GAC/C,UAAA,gBAAAnB;AAAA,IAAC2B;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,WAAAf;AAAA,QACA,cAAAY;AAAA,MACF;AAAA,MAEA,UAAA,gBAAAxB,EAAC4B,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAtB,KAIG,gBAAAuB,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAA9B,EAAC+B,GAAK,EAAA;AAAA,0BACLC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,EAAA,CACX,EAEJ,CAAA;AAAA,IAAA;AAAA,EAAA,EAEJ,CAAA,EACF,CAAA,GACF;AAEJ;AACAnC,EAAkB,OAAOiC;AACzBjC,EAAkB,OAAOkC;AACzBlC,EAAkB,UAAUmC;"}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const BankAccountVerifySchema:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
},
|
|
6
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const BankAccountVerifySchema: z.ZodObject<{
|
|
3
|
+
deposit1: z.ZodNumber;
|
|
4
|
+
deposit2: z.ZodNumber;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
deposit1: number;
|
|
7
|
+
deposit2: number;
|
|
8
|
+
}, {
|
|
9
|
+
deposit1: number;
|
|
10
|
+
deposit2: number;
|
|
11
|
+
}>;
|
|
12
|
+
export type BankAccountVerifyInputs = z.infer<typeof BankAccountVerifySchema>;
|
|
7
13
|
export declare function Form(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { Flex as
|
|
5
|
-
import { NumberInputField as
|
|
6
|
-
const
|
|
7
|
-
deposit1:
|
|
8
|
-
deposit2:
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { z as o } from "zod";
|
|
3
|
+
import { useTranslation as n } from "react-i18next";
|
|
4
|
+
import { Flex as s } from "../../../Common/Flex/Flex.js";
|
|
5
|
+
import { NumberInputField as i } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
6
|
+
const u = o.object({
|
|
7
|
+
deposit1: o.number().min(0),
|
|
8
|
+
deposit2: o.number().min(0)
|
|
9
9
|
});
|
|
10
|
-
function
|
|
11
|
-
const { t: e } =
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
|
|
10
|
+
function l() {
|
|
11
|
+
const { t: e } = n("Company.BankAccount");
|
|
12
|
+
return /* @__PURE__ */ t(s, { flexDirection: "column", gap: 20, children: [
|
|
13
|
+
/* @__PURE__ */ r(
|
|
14
|
+
i,
|
|
15
15
|
{
|
|
16
16
|
name: "deposit1",
|
|
17
17
|
format: "currency",
|
|
@@ -21,8 +21,8 @@ function x() {
|
|
|
21
21
|
errorMessage: e("validations.deposit1")
|
|
22
22
|
}
|
|
23
23
|
),
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
|
|
24
|
+
/* @__PURE__ */ r(
|
|
25
|
+
i,
|
|
26
26
|
{
|
|
27
27
|
name: "deposit2",
|
|
28
28
|
format: "currency",
|
|
@@ -35,7 +35,7 @@ function x() {
|
|
|
35
35
|
] });
|
|
36
36
|
}
|
|
37
37
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
u as BankAccountVerifySchema,
|
|
39
|
+
l as Form
|
|
40
40
|
};
|
|
41
41
|
//# sourceMappingURL=Form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountVerify/Form.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../../../src/components/Company/BankAccount/BankAccountVerify/Form.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useTranslation } from 'react-i18next'\nimport { Flex, NumberInputField } from '@/components/Common'\n\nexport const BankAccountVerifySchema = z.object({\n deposit1: z.number().min(0),\n deposit2: z.number().min(0),\n})\n\nexport type BankAccountVerifyInputs = z.infer<typeof BankAccountVerifySchema>\n\nexport function Form() {\n const { t } = useTranslation('Company.BankAccount')\n\n return (\n <Flex flexDirection=\"column\" gap={20}>\n <NumberInputField\n name=\"deposit1\"\n format=\"currency\"\n isRequired\n label={t('deposit1Label')}\n description={t('deposit1Description')}\n errorMessage={t('validations.deposit1')}\n />\n <NumberInputField\n name=\"deposit2\"\n format=\"currency\"\n label={t('deposit2Label')}\n description={t('deposit2Description')}\n isRequired\n errorMessage={t('validations.deposit2')}\n />\n </Flex>\n )\n}\n"],"names":["BankAccountVerifySchema","z","Form","t","useTranslation","jsxs","Flex","jsx","NumberInputField"],"mappings":";;;;;AAIa,MAAAA,IAA0BC,EAAE,OAAO;AAAA,EAC9C,UAAUA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC1B,UAAUA,EAAE,OAAO,EAAE,IAAI,CAAC;AAC5B,CAAC;AAIM,SAASC,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,qBAAqB;AAElD,SACG,gBAAAC,EAAAC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,QAAO;AAAA,QACP,YAAU;AAAA,QACV,OAAOL,EAAE,eAAe;AAAA,QACxB,aAAaA,EAAE,qBAAqB;AAAA,QACpC,cAAcA,EAAE,sBAAsB;AAAA,MAAA;AAAA,IACxC;AAAA,IACA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,QAAO;AAAA,QACP,OAAOL,EAAE,eAAe;AAAA,QACxB,aAAaA,EAAE,qBAAqB;AAAA,QACpC,YAAU;AAAA,QACV,cAAcA,EAAE,sBAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,EACxC,GACF;AAEJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface ActionsProps {\n continueCtaLabel?: string\n}\n\nexport function Actions({ continueCtaLabel }: ActionsProps) {\n const { t } = useTranslation('Company.DocumentList')\n const { handleContinue } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue}>\n {continueCtaLabel || t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","continueCtaLabel","t","useTranslation","handleContinue","useDocumentList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;AASgB,SAAAA,EAAQ,EAAE,kBAAAC,KAAkC;AAC1D,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,gBAAAC,EAAe,IAAIC,EAAgB,GACrCC,IAAaC,EAAoB;AAEvC,SACG,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAF,EAAW,QAAX,EAAkB,SAASF,GACzB,UAAoBH,KAAAC,EAAE,aAAa,EACtC,CAAA,GACF;AAEJ;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseComponentInterface } from '../../../Base/Base';
|
|
2
|
+
interface DocumentListProps extends BaseComponentInterface<'Company.DocumentList'> {
|
|
3
|
+
companyId: string;
|
|
4
|
+
signatoryId?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function DocumentList(props: DocumentListProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare namespace DocumentList {
|
|
8
|
+
var Head: typeof import("./Head").Head;
|
|
9
|
+
var ManageSignatories: typeof import("./ManageSignatories").ManageSignatories;
|
|
10
|
+
var List: typeof import("./List").List;
|
|
11
|
+
var Actions: typeof import("./Actions").Actions;
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as o, jsxs as F, Fragment as L } from "react/jsx-runtime";
|
|
2
|
+
import { useCompanyFormsGetAllSuspense as O } from "@gusto/embedded-api/react-query/companyFormsGetAll";
|
|
3
|
+
import { useSignatoriesListSuspense as _ } from "@gusto/embedded-api/react-query/signatoriesList";
|
|
4
|
+
import { Head as a } from "./Head.js";
|
|
5
|
+
import { List as c } from "./List.js";
|
|
6
|
+
import { ManageSignatories as u } from "./ManageSignatories.js";
|
|
7
|
+
import { Actions as l } from "./Actions.js";
|
|
8
|
+
import { DocumentListProvider as y } from "./useDocumentList.js";
|
|
9
|
+
import { useI18n as M } from "../../../../i18n/I18n.js";
|
|
10
|
+
import { BaseComponent as A } from "../../../Base/Base.js";
|
|
11
|
+
import { useBase as R } from "../../../Base/useBase.js";
|
|
12
|
+
import { Flex as D } from "../../../Common/Flex/Flex.js";
|
|
13
|
+
import { companyEvents as i } from "../../../../shared/constants.js";
|
|
14
|
+
function t(n) {
|
|
15
|
+
return /* @__PURE__ */ o(A, { ...n, children: /* @__PURE__ */ o(E, { ...n, children: n.children }) });
|
|
16
|
+
}
|
|
17
|
+
function E({ companyId: n, signatoryId: s, className: d, children: m }) {
|
|
18
|
+
M("Company.DocumentList");
|
|
19
|
+
const { onEvent: e } = R(), {
|
|
20
|
+
data: { formList: f },
|
|
21
|
+
error: p
|
|
22
|
+
} = O({
|
|
23
|
+
companyId: n
|
|
24
|
+
}), g = f, {
|
|
25
|
+
data: { signatoryList: h }
|
|
26
|
+
} = _({
|
|
27
|
+
companyUuid: n
|
|
28
|
+
}), r = h[0], S = !!s && r?.uuid === s;
|
|
29
|
+
return /* @__PURE__ */ o("section", { className: d, children: /* @__PURE__ */ o(
|
|
30
|
+
y,
|
|
31
|
+
{
|
|
32
|
+
value: {
|
|
33
|
+
companyForms: g,
|
|
34
|
+
documentListError: p,
|
|
35
|
+
handleRequestFormToSign: (C) => {
|
|
36
|
+
e(i.COMPANY_VIEW_FORM_TO_SIGN, C);
|
|
37
|
+
},
|
|
38
|
+
handleChangeSignatory: () => {
|
|
39
|
+
e(i.COMPANY_FORM_EDIT_SIGNATORY, r);
|
|
40
|
+
},
|
|
41
|
+
handleContinue: () => {
|
|
42
|
+
e(i.COMPANY_FORMS_DONE);
|
|
43
|
+
},
|
|
44
|
+
isSelfSignatory: S,
|
|
45
|
+
signatory: r
|
|
46
|
+
},
|
|
47
|
+
children: /* @__PURE__ */ o(D, { flexDirection: "column", gap: 32, children: m || /* @__PURE__ */ F(L, { children: [
|
|
48
|
+
/* @__PURE__ */ o(a, {}),
|
|
49
|
+
/* @__PURE__ */ o(u, {}),
|
|
50
|
+
/* @__PURE__ */ o(c, {}),
|
|
51
|
+
/* @__PURE__ */ o(l, {})
|
|
52
|
+
] }) })
|
|
53
|
+
}
|
|
54
|
+
) });
|
|
55
|
+
}
|
|
56
|
+
t.Head = a;
|
|
57
|
+
t.ManageSignatories = u;
|
|
58
|
+
t.List = c;
|
|
59
|
+
t.Actions = l;
|
|
60
|
+
export {
|
|
61
|
+
t as DocumentList
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=DocumentList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentList.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { useCompanyFormsGetAllSuspense } from '@gusto/embedded-api/react-query/companyFormsGetAll'\nimport { useSignatoriesListSuspense } from '@gusto/embedded-api/react-query/signatoriesList'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { ManageSignatories } from './ManageSignatories'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\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 DocumentListProps extends BaseComponentInterface<'Company.DocumentList'> {\n companyId: string\n signatoryId?: string\n}\n\nexport function DocumentList(props: DocumentListProps) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\n\nfunction Root({ companyId, signatoryId, className, children }: DocumentListProps) {\n useI18n('Company.DocumentList')\n const { onEvent } = useBase()\n\n const {\n data: { formList },\n error: documentListError,\n } = useCompanyFormsGetAllSuspense({\n companyId,\n })\n const companyForms = formList!\n\n const {\n data: { signatoryList },\n } = useSignatoriesListSuspense({\n companyUuid: companyId,\n })\n const signatories = signatoryList!\n\n // For now, this will only ever have one entry for the current signatory since companies can\n // only have one signatory. If that changes in the future, this UX will need to be revisited.\n const signatory = signatories[0]\n const isSelfSignatory = !!signatoryId && signatory?.uuid === signatoryId\n\n const handleRequestFormToSign = (form: FormSchema) => {\n onEvent(companyEvents.COMPANY_VIEW_FORM_TO_SIGN, form)\n }\n\n const handleChangeSignatory = () => {\n onEvent(companyEvents.COMPANY_FORM_EDIT_SIGNATORY, signatory)\n }\n\n const handleContinue = () => {\n onEvent(companyEvents.COMPANY_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n companyForms,\n documentListError,\n handleRequestFormToSign,\n handleChangeSignatory,\n handleContinue,\n isSelfSignatory,\n signatory,\n }}\n >\n <Flex flexDirection=\"column\" gap={32}>\n {children ? (\n children\n ) : (\n <>\n <Head />\n <ManageSignatories />\n <List />\n <Actions />\n </>\n )}\n </Flex>\n </DocumentListProvider>\n </section>\n )\n}\n\nDocumentList.Head = Head\nDocumentList.ManageSignatories = ManageSignatories\nDocumentList.List = List\nDocumentList.Actions = Actions\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","companyId","signatoryId","className","children","useI18n","onEvent","useBase","formList","documentListError","useCompanyFormsGetAllSuspense","companyForms","signatoryList","useSignatoriesListSuspense","signatory","isSelfSignatory","DocumentListProvider","form","companyEvents","Flex","jsxs","Fragment","Head","ManageSignatories","List","Actions"],"mappings":";;;;;;;;;;;;;AAmBO,SAASA,EAAaC,GAA0B;AAEnD,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,aAAAC,GAAa,WAAAC,GAAW,UAAAC,KAA+B;AAChF,EAAAC,EAAQ,sBAAsB;AACxB,QAAA,EAAE,SAAAC,EAAQ,IAAIC,EAAQ,GAEtB;AAAA,IACJ,MAAM,EAAE,UAAAC,EAAS;AAAA,IACjB,OAAOC;AAAA,MACLC,EAA8B;AAAA,IAChC,WAAAT;AAAA,EAAA,CACD,GACKU,IAAeH,GAEf;AAAA,IACJ,MAAM,EAAE,eAAAI,EAAc;AAAA,MACpBC,EAA2B;AAAA,IAC7B,aAAaZ;AAAA,EAAA,CACd,GAKKa,IAJcF,EAIU,CAAC,GACzBG,IAAkB,CAAC,CAACb,KAAeY,GAAW,SAASZ;AAe3D,SAAA,gBAAAJ,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACkB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,cAAAL;AAAA,QACA,mBAAAF;AAAA,QACA,yBAlBwB,CAACQ,MAAqB;AAC5C,UAAAX,EAAAY,EAAc,2BAA2BD,CAAI;AAAA,QACvD;AAAA,QAiBQ,uBAfsB,MAAM;AAC1B,UAAAX,EAAAY,EAAc,6BAA6BJ,CAAS;AAAA,QAC9D;AAAA,QAcQ,gBAZe,MAAM;AAC3B,UAAAR,EAAQY,EAAc,kBAAkB;AAAA,QAC1C;AAAA,QAWQ,iBAAAH;AAAA,QACA,WAAAD;AAAA,MACF;AAAA,MAEA,UAAA,gBAAAhB,EAACqB,KAAK,eAAc,UAAS,KAAK,IAC/B,UAAAf,KAIG,gBAAAgB,EAAAC,GAAA,EAAA,UAAA;AAAA,QAAA,gBAAAvB,EAACwB,GAAK,EAAA;AAAA,0BACLC,GAAkB,EAAA;AAAA,0BAClBC,GAAK,EAAA;AAAA,0BACLC,GAAQ,CAAA,CAAA;AAAA,MAAA,EAAA,CACX,EAEJ,CAAA;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;AAEA7B,EAAa,OAAO0B;AACpB1B,EAAa,oBAAoB2B;AACjC3B,EAAa,OAAO4B;AACpB5B,EAAa,UAAU6B;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Head.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/Head.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Head() {\n const { t } = useTranslation('Company.DocumentList')\n const Components = useComponentContext()\n\n return <Components.Heading as=\"h2\">{t('documentListTitle')}</Components.Heading>\n}\n"],"names":["Head","t","useTranslation","Components","useComponentContext","jsx"],"mappings":";;;AAGO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,sBAAsB,GAC7CC,IAAaC,EAAoB;AAEhC,SAAA,gBAAAC,EAACF,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,mBAAmB,GAAE;AAC7D;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"List.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { DocumentList, type FormData } from '@/components/Common/DocumentList'\n\nfunction List() {\n const { companyForms, handleRequestFormToSign, documentListError, isSelfSignatory } =\n useDocumentList()\n\n const { t } = useTranslation('Company.DocumentList')\n\n const onRequestSign = (requestedForm: FormData) => {\n const companyForm = companyForms.find(currentForm => currentForm.uuid === requestedForm.uuid)\n handleRequestFormToSign(companyForm || requestedForm)\n }\n\n return (\n <DocumentList\n forms={companyForms.map(form => ({\n uuid: form.uuid,\n title: form.title,\n description: form.description,\n requires_signing: form.requiresSigning,\n }))}\n onRequestSign={onRequestSign}\n withError={!!documentListError}\n label={t('documentListLabel')}\n columnLabels={{\n form: t('formColumnLabel'),\n action: t('actionColumnLabel'),\n }}\n statusLabels={{\n signCta: t('signDocumentCta'),\n notSigned: t('notSigned'),\n complete: t('signDocumentComplete'),\n }}\n emptyStateLabel={t('emptyTableTitle')}\n errorLabel={t('documentListError')}\n canSign={isSelfSignatory}\n />\n )\n}\n\nexport { List }\n"],"names":["List","companyForms","handleRequestFormToSign","documentListError","isSelfSignatory","useDocumentList","useTranslation","onRequestSign","requestedForm","companyForm","currentForm","jsx","DocumentList","form"],"mappings":";;;;AAIA,SAASA,IAAO;AACd,QAAM,EAAE,cAAAC,GAAc,yBAAAC,GAAyB,mBAAAC,GAAmB,iBAAAC,EAAA,IAChEC,EAAgB,GAEZ,EAAE,EAAA,IAAMC,EAAe,sBAAsB,GAE7CC,IAAgB,CAACC,MAA4B;AACjD,UAAMC,IAAcR,EAAa,KAAK,OAAeS,EAAY,SAASF,EAAc,IAAI;AAC5F,IAAAN,EAAwBO,KAAeD,CAAa;AAAA,EACtD;AAGE,SAAA,gBAAAG;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAOX,EAAa,IAAI,CAASY,OAAA;AAAA,QAC/B,MAAMA,EAAK;AAAA,QACX,OAAOA,EAAK;AAAA,QACZ,aAAaA,EAAK;AAAA,QAClB,kBAAkBA,EAAK;AAAA,MAAA,EACvB;AAAA,MACF,eAAAN;AAAA,MACA,WAAW,CAAC,CAACJ;AAAA,MACb,OAAO,EAAE,mBAAmB;AAAA,MAC5B,cAAc;AAAA,QACZ,MAAM,EAAE,iBAAiB;AAAA,QACzB,QAAQ,EAAE,mBAAmB;AAAA,MAC/B;AAAA,MACA,cAAc;AAAA,QACZ,SAAS,EAAE,iBAAiB;AAAA,QAC5B,WAAW,EAAE,WAAW;AAAA,QACxB,UAAU,EAAE,sBAAsB;AAAA,MACpC;AAAA,MACA,iBAAiB,EAAE,iBAAiB;AAAA,MACpC,YAAY,EAAE,mBAAmB;AAAA,MACjC,SAASC;AAAA,IAAA;AAAA,EACX;AAEJ;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ManageSignatories.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/ManageSignatories.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport styles from './ManageSignatories.module.scss'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { firstLastName } from '@/helpers/formattedStrings'\nimport { SIGNATORY_TITLES } from '@/shared/constants'\n\nfunction isValidSignatoryTitle(\n title: string | null | undefined,\n): title is keyof typeof SIGNATORY_TITLES {\n return !!title && title in SIGNATORY_TITLES\n}\n\nexport function ManageSignatories() {\n const { t } = useTranslation('Company.DocumentList')\n const { isSelfSignatory, signatory, handleChangeSignatory } = useDocumentList()\n const Components = useComponentContext()\n\n let signatorySubtext = t('noSignatorySubtext')\n\n if (isSelfSignatory) {\n signatorySubtext = t('selfSignatorySubtext')\n } else if (signatory) {\n signatorySubtext = t('otherSignatorySubtext', {\n signatory: firstLastName({\n first_name: signatory.firstName,\n last_name: signatory.lastName,\n }),\n title: isValidSignatoryTitle(signatory.title)\n ? t(`signatoryTitles.${SIGNATORY_TITLES[signatory.title]}`, { ns: 'common' })\n : signatory.title,\n })\n }\n\n return (\n <section className={styles.container}>\n <Components.Alert\n status=\"warning\"\n label={isSelfSignatory ? t('selfSignatoryTitle') : t('otherSignatoryTitle')}\n >\n <Components.Text>{signatorySubtext}</Components.Text>\n <Components.Button variant=\"secondary\" onClick={handleChangeSignatory}>\n {signatory ? t('changeSignatoryCta') : t('assignSignatoryCta')}\n </Components.Button>\n </Components.Alert>\n </section>\n )\n}\n"],"names":["isValidSignatoryTitle","title","SIGNATORY_TITLES","ManageSignatories","useTranslation","isSelfSignatory","signatory","handleChangeSignatory","useDocumentList","Components","useComponentContext","signatorySubtext","firstLastName","jsx","styles","jsxs"],"mappings":";;;;;;;AAOA,SAASA,EACPC,GACwC;AACjC,SAAA,CAAC,CAACA,KAASA,KAASC;AAC7B;AAEO,SAASC,IAAoB;AAClC,QAAM,EAAE,EAAA,IAAMC,EAAe,sBAAsB,GAC7C,EAAE,iBAAAC,GAAiB,WAAAC,GAAW,uBAAAC,EAAA,IAA0BC,EAAgB,GACxEC,IAAaC,EAAoB;AAEnC,MAAAC,IAAmB,EAAE,oBAAoB;AAE7C,SAAIN,IACFM,IAAmB,EAAE,sBAAsB,IAClCL,MACTK,IAAmB,EAAE,yBAAyB;AAAA,IAC5C,WAAWC,EAAc;AAAA,MACvB,YAAYN,EAAU;AAAA,MACtB,WAAWA,EAAU;AAAA,IAAA,CACtB;AAAA,IACD,OAAON,EAAsBM,EAAU,KAAK,IACxC,EAAE,mBAAmBJ,EAAiBI,EAAU,KAAK,CAAC,IAAI,EAAE,IAAI,SAAS,CAAC,IAC1EA,EAAU;AAAA,EAAA,CACf,IAIA,gBAAAO,EAAA,WAAA,EAAQ,WAAWC,EAAO,WACzB,UAAA,gBAAAC;AAAA,IAACN,EAAW;AAAA,IAAX;AAAA,MACC,QAAO;AAAA,MACP,OAAyB,EAAlBJ,IAAoB,uBAA0B,qBAAN;AAAA,MAE/C,UAAA;AAAA,QAAC,gBAAAQ,EAAAJ,EAAW,MAAX,EAAiB,UAAiBE,EAAA,CAAA;AAAA,QAClC,gBAAAE,EAAAJ,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASF,GAC7C,UAAY,EAAZD,IAAc,uBAA0B,oBAAN,EACrC,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -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 t } from "../../../Base/createCompoundContext.js";
|
|
12
|
-
const [
|
|
11
|
+
const [C, x] = t(
|
|
13
12
|
"CompanyDocumentListContext"
|
|
14
13
|
);
|
|
15
14
|
export {
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
x as DocumentListProvider,
|
|
16
|
+
C as useDocumentList
|
|
18
17
|
};
|
|
19
18
|
//# sourceMappingURL=useDocumentList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Company/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { type Form as FormSchema } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n companyForms: FormSchema[]\n documentListError: Error | null\n handleRequestFormToSign: (form: FormSchema) => void\n handleChangeSignatory: () => void\n handleContinue: () => void\n isSelfSignatory: boolean\n signatory?: Signatory\n}\n\nconst [useDocumentList, DocumentListProvider] = createCompoundContext<DocumentListContextType>(\n 'CompanyDocumentListContext',\n)\n\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;AAcM,MAAA,CAACA,GAAiBC,CAAoB,IAAIC;AAAA,EAC9C;AACF;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DocumentList } from './documentSignerStateMachine';
|
|
2
|
+
import { SignatureForm } from './SignatureForm';
|
|
3
|
+
import { BaseComponentInterface } from '../../Base';
|
|
4
|
+
export interface DocumentSignerProps extends BaseComponentInterface<'Company.DocumentList'> {
|
|
5
|
+
companyId: string;
|
|
6
|
+
signatoryId?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const DocumentSigner: {
|
|
9
|
+
({ companyId, signatoryId, onEvent, dictionary, }: DocumentSignerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
DocumentList: typeof DocumentList;
|
|
11
|
+
SignatureForm: typeof SignatureForm;
|
|
12
|
+
};
|