@gusto/embedded-react-sdk 0.11.1 → 0.11.3-rc.1
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 +17 -0
- package/dist/assets/icons/alert-circle.svg.js.map +1 -1
- package/dist/assets/icons/caret-down.svg.js +1 -1
- package/dist/assets/icons/caret-down.svg.js.map +1 -1
- package/dist/assets/icons/caret-left.svg.js.map +1 -1
- package/dist/assets/icons/caret-right.svg.js.map +1 -1
- package/dist/assets/icons/checkbox.svg.js.map +1 -1
- package/dist/assets/icons/error.svg.js.map +1 -1
- package/dist/assets/icons/hamburger.svg.js.map +1 -1
- package/dist/assets/icons/info.svg.js.map +1 -1
- package/dist/assets/icons/list.svg.js.map +1 -1
- package/dist/assets/icons/magnifyingGlass.png.js.map +1 -1
- package/dist/assets/icons/pagination_next.svg.js.map +1 -1
- package/dist/assets/icons/pagination_previous.svg.js.map +1 -1
- package/dist/assets/icons/pencil.svg.js.map +1 -1
- package/dist/assets/icons/success_check.svg.js.map +1 -1
- package/dist/assets/icons/trashcan.svg.js.map +1 -1
- package/dist/assets/icons/unchecked_circular.svg.js.map +1 -1
- package/dist/assets/icons/verification_pending.svg.js.map +1 -1
- package/dist/assets/icons/warning.svg.js.map +1 -1
- package/dist/components/Base/Base.js +19 -18
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/createCompoundContext.js.map +1 -1
- package/dist/components/Base/useBase.js.map +1 -1
- package/dist/components/Common/ActionsLayout/ActionsLayout.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Common/DataView/useDataView.js.map +1 -1
- package/dist/components/Common/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Common/DocumentList/DocumentList.module.scss.js +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +1 -1
- package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js +1 -1
- package/dist/components/Common/FadeIn/FadeIn.js.map +1 -1
- package/dist/components/Common/FieldCaption/FieldCaption.js +7 -4
- package/dist/components/Common/FieldCaption/FieldCaption.js.map +1 -1
- package/dist/components/Common/FieldCaption/FieldCaption.module.scss.js +1 -1
- package/dist/components/Common/FieldDescription/FieldDescription.js.map +1 -1
- package/dist/components/Common/FieldDescription/FieldDescription.module.scss.js +1 -1
- package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.js.map +1 -1
- package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.module.scss.js +1 -1
- package/dist/components/Common/FieldLayout/FieldLayout.js.map +1 -1
- package/dist/components/Common/FieldLayout/FieldLayout.module.scss.js +10 -10
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.d.ts +1 -0
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js +35 -20
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
- package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
- package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.js.map +1 -1
- package/dist/components/Common/Fieldset/Fieldset.js.map +1 -1
- package/dist/components/Common/Flex/Flex.d.ts +2 -2
- package/dist/components/Common/Flex/Flex.js +5 -5
- package/dist/components/Common/Flex/Flex.js.map +1 -1
- package/dist/components/Common/Form/Form.js.map +1 -1
- package/dist/components/Common/Form/Form.module.scss.js +2 -2
- package/dist/components/Common/Grid/Grid.d.ts +2 -2
- package/dist/components/Common/Grid/Grid.js +13 -13
- package/dist/components/Common/Grid/Grid.js.map +1 -1
- package/dist/components/Common/HamburgerMenu/HamburgerMenu.js.map +1 -1
- package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.js.map +1 -1
- package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.module.scss.js +12 -12
- package/dist/components/Common/InternalError/InternalError.js.map +1 -1
- package/dist/components/Common/InternalError/InternalError.module.scss.js +1 -1
- package/dist/components/Common/Loading/Loading.js.map +1 -1
- package/dist/components/Common/Loading/Loading.module.scss.js +1 -1
- package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControl.module.scss.js +1 -1
- package/dist/components/Common/ReorderableList/DropZone.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableItem.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableList.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableList.module.scss.js +15 -15
- package/dist/components/Common/RequirementsList/RequirementsList.js.map +1 -1
- package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +6 -4
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.module.scss.js +6 -6
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +12 -10
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +8 -6
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +1 -1
- package/dist/components/Common/UI/Badge/Badge.js +4 -4
- package/dist/components/Common/UI/Badge/Badge.js.map +1 -1
- package/dist/components/Common/UI/Badge/Badge.module.scss.js +4 -4
- package/dist/components/Common/UI/Button/Button.d.ts +1 -1
- package/dist/components/Common/UI/Button/Button.js +22 -24
- 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/ButtonIcon.d.ts +1 -1
- package/dist/components/Common/UI/Button/ButtonIcon.js +7 -5
- package/dist/components/Common/UI/Button/ButtonIcon.js.map +1 -1
- package/dist/components/Common/UI/Button/ButtonIcon.module.scss.js +8 -0
- package/dist/components/Common/UI/Button/ButtonIcon.module.scss.js.map +1 -0
- package/dist/components/Common/UI/Button/ButtonTypes.d.ts +2 -6
- package/dist/components/Common/UI/CalendarPreview/CalendarLegend.js.map +1 -1
- package/dist/components/Common/UI/CalendarPreview/CalendarPreview.js.map +1 -1
- package/dist/components/Common/UI/CalendarPreview/CalendarPreview.module.scss.js +5 -5
- package/dist/components/Common/UI/Card/Card.js.map +1 -1
- package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
- package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +6 -6
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.module.scss.js +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.js +36 -36
- package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +6 -6
- package/dist/components/Common/UI/Heading/Heading.js.map +1 -1
- package/dist/components/Common/UI/Heading/Heading.module.scss.js +11 -11
- package/dist/components/Common/UI/Input/Input.js.map +1 -1
- package/dist/components/Common/UI/Input/Input.module.scss.js +12 -12
- package/dist/components/Common/UI/Link/Link.js.map +1 -1
- package/dist/components/Common/UI/Link/Link.module.scss.js +1 -1
- package/dist/components/Common/UI/List/List.module.scss.js +1 -1
- package/dist/components/Common/UI/List/OrderedList.js.map +1 -1
- package/dist/components/Common/UI/List/UnorderedList.js.map +1 -1
- package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
- package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
- package/dist/components/Common/UI/NumberInput/NumberInput.js +36 -38
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.module.scss.js +1 -1
- package/dist/components/Common/UI/Radio/Radio.js.map +1 -1
- package/dist/components/Common/UI/Radio/Radio.module.scss.js +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroup.module.scss.js +1 -1
- package/dist/components/Common/UI/Select/Select.js +13 -13
- package/dist/components/Common/UI/Select/Select.js.map +1 -1
- package/dist/components/Common/UI/Select/Select.module.scss.js +1 -1
- package/dist/components/Common/UI/Switch/Switch.js.map +1 -1
- package/dist/components/Common/UI/Switch/Switch.module.scss.js +4 -4
- package/dist/components/Common/UI/Table/Table.js.map +1 -1
- package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
- package/dist/components/Common/UI/Text/Text.js.map +1 -1
- package/dist/components/Common/UI/Text/Text.module.scss.js +16 -20
- package/dist/components/Common/UI/Text/Text.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Text/TextTypes.d.ts +1 -1
- package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
- package/dist/components/Common/UI/hooks/useFieldIds.js.map +1 -1
- package/dist/components/Common/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/dist/components/Common/hooks/useAsyncError.js.map +1 -1
- package/dist/components/Common/hooks/useMenu.js.map +1 -1
- package/dist/components/Common/hooks/useNumberFormatter.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +3 -2
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +8 -6
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +10 -8
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +11 -11
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +8 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/SignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +8 -7
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountComponents.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +11 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/AccountView.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +12 -10
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Head.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +13 -11
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +6 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Head.js.map +1 -1
- package/dist/components/Company/BankAccount/stateMachine.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +7 -5
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +7 -6
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Head.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Head.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +3 -2
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/assignSignatoryState.js.map +1 -1
- package/dist/components/Company/DocumentSigner/documentSignerStateMachine.js.map +1 -1
- package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +9 -7
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +7 -6
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +5 -3
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +7 -5
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +12 -10
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Industry/Head.js.map +1 -1
- package/dist/components/Company/Industry/Industry.js.map +1 -1
- package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +8 -6
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Head.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +4 -3
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/Locations.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Head.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +4 -2
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +9 -8
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/Locations/locationsStateMachine.js.map +1 -1
- package/dist/components/Company/Locations/stateMachine.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +14 -12
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +8 -6
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +3 -2
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +33 -31
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +12 -10
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +51 -52
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.module.scss.js +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +8 -6
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +15 -13
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +0 -3
- package/dist/components/Company/PaySchedule/usePaySchedule.js +8 -8
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +7 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +8 -8
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Head.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +8 -6
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Head.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +7 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
- package/dist/components/Contractor/Address/Actions.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +5 -4
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +1 -1
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/Head.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +6 -5
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/List/index.js.map +1 -1
- package/dist/components/Contractor/List/useContractorList.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +17 -16
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +7 -5
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +3 -2
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -2
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +10 -10
- package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js.map +1 -1
- package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
- package/dist/components/Contractor/Submit/index.js +11 -9
- package/dist/components/Contractor/Submit/index.js.map +1 -1
- package/dist/components/Contractor/Submit/index.module.scss.js +2 -2
- package/dist/components/Employee/Compensation/Actions.js +6 -5
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +15 -14
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/Head.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +25 -23
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Compensation/useCompensation.js.map +1 -1
- package/dist/components/Employee/Deductions/Deductions.d.ts +8 -14
- package/dist/components/Employee/Deductions/Deductions.js +47 -140
- package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.d.ts +23 -0
- package/dist/components/Employee/Deductions/DeductionsComponents.js +31 -0
- package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +41 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +135 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +6 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +99 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -0
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.d.ts +15 -0
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +49 -0
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -0
- package/dist/components/Employee/Deductions/stateMachine.d.ts +7 -0
- package/dist/components/Employee/Deductions/stateMachine.js +107 -0
- package/dist/components/Employee/Deductions/stateMachine.js.map +1 -0
- package/dist/components/Employee/Deductions/useDeductions.d.ts +2 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +7 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Head.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +4 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/Form.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/Head.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/Preview.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +8 -7
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/stateMachine.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +6 -4
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +7 -5
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +15 -14
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +13 -12
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.module.scss.js +6 -6
- package/dist/components/Employee/PaymentMethod/Actions.js +9 -7
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccount.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +6 -5
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +10 -8
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Head.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +3 -2
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +11 -10
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +9 -7
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +10 -9
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/Head.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/WorkAddress.js.map +1 -1
- package/dist/components/Employee/Profile/getEmployeeAddressForProfile.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +4 -3
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +10 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +14 -12
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
- package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +4 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Flow/useFlow.js.map +1 -1
- package/dist/contexts/ApiProvider/ApiProvider.d.ts +5 -2
- package/dist/contexts/ApiProvider/ApiProvider.js +34 -30
- package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
- package/dist/contexts/ComponentAdapter/ComponentsProvider.js.map +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +6 -4
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +16 -14
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/GustoProvider/SDKI18next.js.map +1 -1
- package/dist/contexts/GustoProvider/index.d.ts +2 -0
- package/dist/contexts/LoadingIndicatorProvider/LoadingIndicatorProvider.js.map +1 -1
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
- package/dist/contexts/LocaleProvider/LocaleProvider.js.map +1 -1
- package/dist/contexts/LocaleProvider/useLocale.js.map +1 -1
- package/dist/contexts/ThemeProvider/ThemeProvider.d.ts +2 -3
- package/dist/contexts/ThemeProvider/ThemeProvider.js +20 -24
- package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/contexts/ThemeProvider/theme.d.ts +90 -0
- package/dist/contexts/ThemeProvider/theme.js +117 -0
- package/dist/contexts/ThemeProvider/theme.js.map +1 -0
- package/dist/contexts/ThemeProvider/useTheme.js.map +1 -1
- package/dist/contexts/index.d.ts +4 -0
- package/dist/helpers/LRUCache.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +10 -2
- package/dist/helpers/dateFormatting.js +30 -7
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/helpers/dateFormatting.test.d.ts +1 -0
- package/dist/helpers/ensureRequired.js.map +1 -1
- package/dist/helpers/federalEin.js.map +1 -1
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/helpers/getDataProps.js.map +1 -1
- package/dist/helpers/mask.js.map +1 -1
- package/dist/helpers/payRateCalculator.js.map +1 -1
- package/dist/helpers/rem.js +2 -3
- package/dist/helpers/rem.js.map +1 -1
- package/dist/helpers/responsive.d.ts +0 -3
- package/dist/helpers/responsive.js +20 -34
- package/dist/helpers/responsive.js.map +1 -1
- package/dist/helpers/ssn.js.map +1 -1
- package/dist/helpers/validations.js.map +1 -1
- package/dist/hooks/useContainerBreakpoints/useContainerBreakpoints.js.map +1 -1
- package/dist/hooks/useForkRef/useForkRef.js.map +1 -1
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.AddBank.json.js +12 -12
- package/dist/i18n/en/Company.Addresses.json.js +12 -12
- package/dist/i18n/en/Company.AssignSignatory.json.js +5 -54
- package/dist/i18n/en/Company.AssignSignatory.json.js.map +1 -1
- package/dist/i18n/en/Company.BankAccount.json.js +19 -40
- package/dist/i18n/en/Company.BankAccount.json.js.map +1 -1
- package/dist/i18n/en/Company.DocumentList.json.js +15 -15
- package/dist/i18n/en/Company.FederalTaxes.json.js +16 -32
- package/dist/i18n/en/Company.FederalTaxes.json.js.map +1 -1
- package/dist/i18n/en/Company.Locations.json.js +43 -49
- package/dist/i18n/en/Company.Locations.json.js.map +1 -1
- package/dist/i18n/en/Company.OnboardingOverview.json.js +14 -36
- package/dist/i18n/en/Company.OnboardingOverview.json.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +1 -44
- package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
- package/dist/i18n/en/Company.SignatureForm.json.js +9 -9
- package/dist/i18n/en/Company.StateTaxes.json.js +1 -25
- package/dist/i18n/en/Company.StateTaxes.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Address.json.js +19 -24
- package/dist/i18n/en/Contractor.Address.json.js.map +1 -1
- package/dist/i18n/en/Contractor.ContractorList.json.js +9 -12
- package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
- package/dist/i18n/en/Contractor.ContractorSubmit.json.js +10 -14
- package/dist/i18n/en/Contractor.ContractorSubmit.json.js.map +1 -1
- package/dist/i18n/en/Contractor.NewHireReport.json.js +5 -7
- package/dist/i18n/en/Contractor.NewHireReport.json.js.map +1 -1
- package/dist/i18n/en/Contractor.PaymentMethod.json.js +4 -17
- package/dist/i18n/en/Contractor.PaymentMethod.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Profile.json.js +1 -58
- package/dist/i18n/en/Contractor.Profile.json.js.map +1 -1
- package/dist/i18n/en/Employee.BankAccount.json.js +17 -19
- package/dist/i18n/en/Employee.BankAccount.json.js.map +1 -1
- package/dist/i18n/en/Employee.Compensation.json.js +31 -65
- package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
- package/dist/i18n/en/Employee.Deductions.json.js +64 -69
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/i18n/en/Employee.DocumentSigner.json.js +23 -23
- package/dist/i18n/en/Employee.EmployeeList.json.js +29 -29
- package/dist/i18n/en/Employee.HomeAddress.json.js +23 -28
- package/dist/i18n/en/Employee.HomeAddress.json.js.map +1 -1
- package/dist/i18n/en/Employee.Landing.json.js +11 -15
- package/dist/i18n/en/Employee.Landing.json.js.map +1 -1
- package/dist/i18n/en/Employee.OnboardingSummary.json.js +6 -28
- package/dist/i18n/en/Employee.OnboardingSummary.json.js.map +1 -1
- package/dist/i18n/en/Employee.PaySchedules.json.js +1 -5
- package/dist/i18n/en/Employee.PaySchedules.json.js.map +1 -1
- package/dist/i18n/en/Employee.PaymentMethod.json.js +29 -36
- package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
- package/dist/i18n/en/Employee.Profile.json.js +16 -22
- package/dist/i18n/en/Employee.Profile.json.js.map +1 -1
- package/dist/i18n/en/Employee.SplitPaycheck.json.js +21 -25
- package/dist/i18n/en/Employee.SplitPaycheck.json.js.map +1 -1
- package/dist/i18n/en/Employee.StateTaxes.json.js +4 -4
- package/dist/i18n/en/Employee.Taxes.json.js +26 -29
- package/dist/i18n/en/Employee.Taxes.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollHistoryList.json.js +9 -9
- package/dist/i18n/en/common.json.d.ts +1 -1
- package/dist/i18n/en/common.json.js +1 -147
- package/dist/i18n/en/common.json.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/dist/models/NAICSValues.js.map +1 -1
- package/dist/models/WA_RISK_CODES.js.map +1 -1
- package/dist/shared/constants.d.ts +8 -0
- package/dist/shared/constants.js +9 -5
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/hooks.d.ts +36 -0
- package/dist/types/i18next.d.ts +0 -1
- package/package.json +5 -5
- package/dist/components/Common/UI/NumberInput/NumberInput.module.scss.js +0 -8
- package/dist/components/Common/UI/NumberInput/NumberInput.module.scss.js.map +0 -1
- package/dist/components/Employee/Deductions/Actions.js +0 -25
- package/dist/components/Employee/Deductions/Actions.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionForm.d.ts +0 -1
- package/dist/components/Employee/Deductions/DeductionForm.js +0 -76
- package/dist/components/Employee/Deductions/DeductionForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsList.d.ts +0 -2
- package/dist/components/Employee/Deductions/DeductionsList.js +0 -58
- package/dist/components/Employee/Deductions/DeductionsList.js.map +0 -1
- package/dist/components/Employee/Deductions/Head.js +0 -13
- package/dist/components/Employee/Deductions/Head.js.map +0 -1
- package/dist/components/Employee/Deductions/IncludeDeductionsForm.d.ts +0 -1
- package/dist/components/Employee/Deductions/IncludeDeductionsForm.js +0 -25
- package/dist/components/Employee/Deductions/IncludeDeductionsForm.js.map +0 -1
- package/dist/components/Employee/Deductions/useDeductions.js +0 -33
- package/dist/components/Employee/Deductions/useDeductions.js.map +0 -1
- package/dist/contexts/ThemeProvider/createTheme.d.ts +0 -22
- package/dist/contexts/ThemeProvider/createTheme.js +0 -271
- package/dist/contexts/ThemeProvider/createTheme.js.map +0 -1
- package/dist/types/GTheme.d.ts +0 -255
- /package/dist/contexts/ThemeProvider/{createTheme.test.d.ts → theme.test.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { useEmployeeFormsListSuspense as f } from "@gusto/embedded-api/react-query/employeeFormsList";
|
|
3
3
|
import { Head as d } from "./Head.js";
|
|
4
4
|
import { List as E } from "./List.js";
|
|
@@ -9,18 +9,19 @@ import { useBase as L } from "../../../Base/useBase.js";
|
|
|
9
9
|
import { useI18n as S } from "../../../../i18n/I18n.js";
|
|
10
10
|
import { componentEvents as m } from "../../../../shared/constants.js";
|
|
11
11
|
import { Flex as g } from "../../../Common/Flex/Flex.js";
|
|
12
|
-
|
|
12
|
+
import "classnames";
|
|
13
|
+
function B(e) {
|
|
13
14
|
return /* @__PURE__ */ o(F, { ...e, children: /* @__PURE__ */ o(O, { ...e }) });
|
|
14
15
|
}
|
|
15
16
|
function O({ employeeId: e, className: s, children: n }) {
|
|
16
17
|
S("Employee.DocumentSigner");
|
|
17
|
-
const { onEvent: t } = L(), { data: u, error: c } = f({ employeeId: e }), i = u.formList,
|
|
18
|
+
const { onEvent: t } = L(), { data: u, error: c } = f({ employeeId: e }), i = u.formList, p = i.every((r) => !r.requiresSigning);
|
|
18
19
|
return /* @__PURE__ */ o("section", { className: s, children: /* @__PURE__ */ o(
|
|
19
20
|
h,
|
|
20
21
|
{
|
|
21
22
|
value: {
|
|
22
23
|
employeeForms: i,
|
|
23
|
-
hasSignedAllForms:
|
|
24
|
+
hasSignedAllForms: p,
|
|
24
25
|
handleContinue: () => {
|
|
25
26
|
t(m.EMPLOYEE_FORMS_DONE);
|
|
26
27
|
},
|
|
@@ -29,7 +30,7 @@ function O({ employeeId: e, className: s, children: n }) {
|
|
|
29
30
|
},
|
|
30
31
|
documentListError: c
|
|
31
32
|
},
|
|
32
|
-
children: n || /* @__PURE__ */
|
|
33
|
+
children: n || /* @__PURE__ */ l(g, { flexDirection: "column", children: [
|
|
33
34
|
/* @__PURE__ */ o(d, {}),
|
|
34
35
|
/* @__PURE__ */ o(E, {}),
|
|
35
36
|
/* @__PURE__ */ o(a, {})
|
|
@@ -38,6 +39,6 @@ function O({ employeeId: e, className: s, children: n }) {
|
|
|
38
39
|
) });
|
|
39
40
|
}
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
B as DocumentList
|
|
42
43
|
};
|
|
43
44
|
//# sourceMappingURL=DocumentList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { useEmployeeFormsListSuspense } from '@gusto/embedded-api/react-query/employeeFormsList'\nimport { type Form } from '@gusto/embedded-api/models/components/form'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\n\ninterface DocumentListProps extends CommonComponentInterface {\n employeeId: string\n}\n\nexport function DocumentList(props: DocumentListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, className, children }: DocumentListProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent } = useBase()\n\n const { data, error: documentListError } = useEmployeeFormsListSuspense({ employeeId })\n const employeeForms = data.formList!\n\n const hasSignedAllForms = employeeForms.every(employeeForm => !employeeForm.requiresSigning)\n\n const handleRequestFormToSign = (data: Form) => {\n onEvent(componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: data.uuid })\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n employeeForms,\n hasSignedAllForms,\n handleContinue,\n handleRequestFormToSign,\n documentListError,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </DocumentListProvider>\n </section>\n )\n}\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","employeeId","className","children","useI18n","onEvent","useBase","data","documentListError","useEmployeeFormsListSuspense","employeeForms","hasSignedAllForms","employeeForm","DocumentListProvider","componentEvents","jsxs","Flex","Head","List","Actions"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/DocumentList.tsx"],"sourcesContent":["import { useEmployeeFormsListSuspense } from '@gusto/embedded-api/react-query/employeeFormsList'\nimport { type Form } from '@gusto/embedded-api/models/components/form'\nimport { Head } from './Head'\nimport { List } from './List'\nimport { Actions } from './Actions'\nimport { DocumentListProvider } from './useDocumentList'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\n\ninterface DocumentListProps extends CommonComponentInterface {\n employeeId: string\n}\n\nexport function DocumentList(props: DocumentListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, className, children }: DocumentListProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent } = useBase()\n\n const { data, error: documentListError } = useEmployeeFormsListSuspense({ employeeId })\n const employeeForms = data.formList!\n\n const hasSignedAllForms = employeeForms.every(employeeForm => !employeeForm.requiresSigning)\n\n const handleRequestFormToSign = (data: Form) => {\n onEvent(componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: data.uuid })\n }\n\n const handleContinue = () => {\n onEvent(componentEvents.EMPLOYEE_FORMS_DONE)\n }\n\n return (\n <section className={className}>\n <DocumentListProvider\n value={{\n employeeForms,\n hasSignedAllForms,\n handleContinue,\n handleRequestFormToSign,\n documentListError,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </DocumentListProvider>\n </section>\n )\n}\n"],"names":["DocumentList","props","jsx","BaseComponent","Root","employeeId","className","children","useI18n","onEvent","useBase","data","documentListError","useEmployeeFormsListSuspense","employeeForms","hasSignedAllForms","employeeForm","DocumentListProvider","componentEvents","jsxs","Flex","Head","List","Actions"],"mappings":";;;;;;;;;;;;AAoBO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,WAAAC,GAAW,UAAAC,KAA+B;AACpE,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,EAAA,IAAYC,EAAA,GAEd,EAAE,MAAAC,GAAM,OAAOC,EAAA,IAAsBC,EAA6B,EAAE,YAAAR,GAAY,GAChFS,IAAgBH,EAAK,UAErBI,IAAoBD,EAAc,MAAM,CAAAE,MAAgB,CAACA,EAAa,eAAe;AAU3F,SACE,gBAAAd,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACe;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,eAAAH;AAAA,QACA,mBAAAC;AAAA,QACA,gBAVe,MAAM;AAC3B,UAAAN,EAAQS,EAAgB,mBAAmB;AAAA,QAC7C;AAAA,QASQ,yBAfwB,CAACP,MAAe;AAC9C,UAAAF,EAAQS,EAAgB,4BAA4B,EAAE,MAAMP,EAAK,MAAM;AAAA,QACzE;AAAA,QAcQ,mBAAAC;AAAA,MAAA;AAAA,MAGD,UAAAL,KAGC,gBAAAY,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAlB,EAACmB,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Head.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/Head.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nfunction Head() {\n const { t } = useTranslation('Employee.DocumentSigner')\n const Components = useComponentContext()\n\n return <Components.Heading as=\"h2\">{t('documentListTitle')}</Components.Heading>\n}\n\nexport { Head }\n"],"names":["Head","t","useTranslation","Components","useComponentContext","jsx"],"mappings":";;;AAGA,SAASA,IAAO;AACd,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChDC,IAAaC,
|
|
1
|
+
{"version":3,"file":"Head.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/Head.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nfunction Head() {\n const { t } = useTranslation('Employee.DocumentSigner')\n const Components = useComponentContext()\n\n return <Components.Heading as=\"h2\">{t('documentListTitle')}</Components.Heading>\n}\n\nexport { Head }\n"],"names":["Head","t","useTranslation","Components","useComponentContext","jsx"],"mappings":";;;AAGA,SAASA,IAAO;AACd,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChDC,IAAaC,EAAA;AAEnB,SAAO,gBAAAC,EAACF,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,mBAAmB,GAAE;AAC7D;"}
|
|
@@ -2,8 +2,10 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { useTranslation as m } from "react-i18next";
|
|
3
3
|
import { useDocumentList as s } from "./useDocumentList.js";
|
|
4
4
|
import { Flex as l } from "../../../Common/Flex/Flex.js";
|
|
5
|
+
import "classnames";
|
|
6
|
+
import "../../../../shared/constants.js";
|
|
5
7
|
import { DocumentList as u } from "../../../Common/DocumentList/DocumentList.js";
|
|
6
|
-
function
|
|
8
|
+
function f() {
|
|
7
9
|
const { employeeForms: i, handleRequestFormToSign: n, documentListError: r } = s(), { t: e } = m("Employee.DocumentSigner");
|
|
8
10
|
return /* @__PURE__ */ o("section", { style: { width: "100%" }, children: /* @__PURE__ */ o(l, { flexDirection: "column", gap: 32, children: /* @__PURE__ */ o(
|
|
9
11
|
u,
|
|
@@ -32,6 +34,6 @@ function L() {
|
|
|
32
34
|
) }) });
|
|
33
35
|
}
|
|
34
36
|
export {
|
|
35
|
-
|
|
37
|
+
f as List
|
|
36
38
|
};
|
|
37
39
|
//# sourceMappingURL=List.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { Flex, DocumentList as SharedDocumentList } from '@/components/Common'\n\nexport function List() {\n const { employeeForms, handleRequestFormToSign, documentListError } = useDocumentList()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <section style={{ width: '100%' }}>\n <Flex flexDirection=\"column\" gap={32}>\n <SharedDocumentList\n forms={employeeForms.map(form => ({\n uuid: form.uuid,\n title: form.title,\n description: form.description,\n requires_signing: form.requiresSigning,\n }))}\n onRequestSign={handleRequestFormToSign}\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 />\n </Flex>\n </section>\n )\n}\n"],"names":["List","employeeForms","handleRequestFormToSign","documentListError","useDocumentList","t","useTranslation","jsx","Flex","SharedDocumentList","form"],"mappings":"
|
|
1
|
+
{"version":3,"file":"List.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/List.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { Flex, DocumentList as SharedDocumentList } from '@/components/Common'\n\nexport function List() {\n const { employeeForms, handleRequestFormToSign, documentListError } = useDocumentList()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <section style={{ width: '100%' }}>\n <Flex flexDirection=\"column\" gap={32}>\n <SharedDocumentList\n forms={employeeForms.map(form => ({\n uuid: form.uuid,\n title: form.title,\n description: form.description,\n requires_signing: form.requiresSigning,\n }))}\n onRequestSign={handleRequestFormToSign}\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 />\n </Flex>\n </section>\n )\n}\n"],"names":["List","employeeForms","handleRequestFormToSign","documentListError","useDocumentList","t","useTranslation","jsx","Flex","SharedDocumentList","form"],"mappings":";;;;;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,eAAAC,GAAe,yBAAAC,GAAyB,mBAAAC,EAAA,IAAsBC,EAAA,GAChE,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;AAEtD,SACE,gBAAAC,EAAC,WAAA,EAAQ,OAAO,EAAE,OAAO,UACvB,UAAA,gBAAAA,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,IAChC,UAAA,gBAAAD;AAAA,IAACE;AAAAA,IAAA;AAAA,MACC,OAAOR,EAAc,IAAI,CAAAS,OAAS;AAAA,QAChC,MAAMA,EAAK;AAAA,QACX,OAAOA,EAAK;AAAA,QACZ,aAAaA,EAAK;AAAA,QAClB,kBAAkBA,EAAK;AAAA,MAAA,EACvB;AAAA,MACF,eAAeR;AAAA,MACf,WAAW,CAAC,CAACC;AAAA,MACb,OAAOE,EAAE,mBAAmB;AAAA,MAC5B,cAAc;AAAA,QACZ,MAAMA,EAAE,iBAAiB;AAAA,QACzB,QAAQA,EAAE,mBAAmB;AAAA,MAAA;AAAA,MAE/B,cAAc;AAAA,QACZ,SAASA,EAAE,iBAAiB;AAAA,QAC5B,WAAWA,EAAE,WAAW;AAAA,QACxB,UAAUA,EAAE,sBAAsB;AAAA,MAAA;AAAA,MAEpC,iBAAiBA,EAAE,iBAAiB;AAAA,MACpC,YAAYA,EAAE,mBAAmB;AAAA,IAAA;AAAA,EAAA,GAErC,EAAA,CACF;AAEJ;"}
|
|
@@ -8,13 +8,14 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "../../../Base/useBase.js";
|
|
10
10
|
import "../../../../shared/constants.js";
|
|
11
|
+
import "classnames";
|
|
11
12
|
import "dompurify";
|
|
12
13
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
14
|
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
15
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
16
|
+
const [a, f] = t("DocumentListContext");
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
f as DocumentListProvider,
|
|
19
|
+
a as useDocumentList
|
|
19
20
|
};
|
|
20
21
|
//# sourceMappingURL=useDocumentList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDocumentList.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/useDocumentList.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype DocumentListContextType = {\n employeeForms: Form[]\n hasSignedAllForms: boolean\n handleContinue: () => void\n handleRequestFormToSign: (form: Form) => void\n documentListError: Error | null\n formToSign?: Form\n}\n\nconst [useDocumentList, DocumentListProvider] =\n createCompoundContext<DocumentListContextType>('DocumentListContext')\nexport { useDocumentList, DocumentListProvider }\n"],"names":["useDocumentList","DocumentListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAYA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentSigner.js","sources":["../../../../src/components/Employee/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport {\n DocumentListContextual,\n type DocumentSignerContextInterface,\n} from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface DocumentSignerProps extends BaseComponentInterface<'Employee.DocumentSigner'> {\n employeeId: string\n}\n\nexport const DocumentSigner = ({ employeeId, onEvent, dictionary }: DocumentSignerProps) => {\n useComponentDictionary('Employee.DocumentSigner', dictionary)\n\n const documentSigner = createMachine(\n 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: DocumentListContextual,\n employeeId,\n }),\n )\n return <Flow machine={documentSigner} onEvent={onEvent} />\n}\n"],"names":["DocumentSigner","employeeId","onEvent","dictionary","useComponentDictionary","documentSigner","createMachine","documentSignerMachine","initialContext","DocumentListContextual","jsx","Flow"],"mappings":";;;;;;AAcO,MAAMA,IAAiB,CAAC,EAAE,YAAAC,GAAY,SAAAC,GAAS,YAAAC,QAAsC;AAC1F,EAAAC,EAAuB,2BAA2BD,CAAU;AAE5D,QAAME,IAAiBC;AAAA,IACrB;AAAA,IACAC;AAAA,IACA,CAACC,OAAoD;AAAA,MACnD,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,YAAAR;AAAA,
|
|
1
|
+
{"version":3,"file":"DocumentSigner.js","sources":["../../../../src/components/Employee/DocumentSigner/DocumentSigner.tsx"],"sourcesContent":["import { createMachine } from 'robot3'\nimport {\n DocumentListContextual,\n type DocumentSignerContextInterface,\n} from './documentSignerStateMachine'\nimport { documentSignerMachine } from './stateMachine'\nimport { Flow } from '@/components/Flow/Flow'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { useComponentDictionary } from '@/i18n/I18n'\n\nexport interface DocumentSignerProps extends BaseComponentInterface<'Employee.DocumentSigner'> {\n employeeId: string\n}\n\nexport const DocumentSigner = ({ employeeId, onEvent, dictionary }: DocumentSignerProps) => {\n useComponentDictionary('Employee.DocumentSigner', dictionary)\n\n const documentSigner = createMachine(\n 'index',\n documentSignerMachine,\n (initialContext: DocumentSignerContextInterface) => ({\n ...initialContext,\n component: DocumentListContextual,\n employeeId,\n }),\n )\n return <Flow machine={documentSigner} onEvent={onEvent} />\n}\n"],"names":["DocumentSigner","employeeId","onEvent","dictionary","useComponentDictionary","documentSigner","createMachine","documentSignerMachine","initialContext","DocumentListContextual","jsx","Flow"],"mappings":";;;;;;AAcO,MAAMA,IAAiB,CAAC,EAAE,YAAAC,GAAY,SAAAC,GAAS,YAAAC,QAAsC;AAC1F,EAAAC,EAAuB,2BAA2BD,CAAU;AAE5D,QAAME,IAAiBC;AAAA,IACrB;AAAA,IACAC;AAAA,IACA,CAACC,OAAoD;AAAA,MACnD,GAAGA;AAAA,MACH,WAAWC;AAAA,MACX,YAAAR;AAAA,IAAA;AAAA,EACF;AAEF,SAAO,gBAAAS,EAACC,GAAA,EAAK,SAASN,GAAgB,SAAAH,EAAA,CAAkB;AAC1D;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useSignatureForm } from './useSignatureForm'\nimport { SignatureFormActions } from '@/components/Common/SignatureForm'\n\nexport function Actions() {\n const { handleBack, isPending } = useSignatureForm()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <SignatureFormActions\n onBack={handleBack}\n backLabel={t('backCta')}\n submitLabel={t('signFormCta')}\n isLoading={isPending}\n />\n )\n}\n"],"names":["Actions","handleBack","isPending","useSignatureForm","t","useTranslation","jsx","SignatureFormActions"],"mappings":";;;;AAIO,SAASA,IAAU;AACxB,QAAM,EAAE,YAAAC,GAAY,WAAAC,
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useSignatureForm } from './useSignatureForm'\nimport { SignatureFormActions } from '@/components/Common/SignatureForm'\n\nexport function Actions() {\n const { handleBack, isPending } = useSignatureForm()\n const { t } = useTranslation('Employee.DocumentSigner')\n\n return (\n <SignatureFormActions\n onBack={handleBack}\n backLabel={t('backCta')}\n submitLabel={t('signFormCta')}\n isLoading={isPending}\n />\n )\n}\n"],"names":["Actions","handleBack","isPending","useSignatureForm","t","useTranslation","jsx","SignatureFormActions"],"mappings":";;;;AAIO,SAASA,IAAU;AACxB,QAAM,EAAE,YAAAC,GAAY,WAAAC,EAAA,IAAcC,EAAA,GAC5B,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;AAEtD,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,QAAQN;AAAA,MACR,WAAWG,EAAE,SAAS;AAAA,MACtB,aAAaA,EAAE,aAAa;AAAA,MAC5B,WAAWF;AAAA,IAAA;AAAA,EAAA;AAGjB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/Form.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { SignatureFormFields } from '@/components/Common/SignatureForm'\n\nexport function Form() {\n const { t } = useTranslation('Employee.DocumentSigner')\n return (\n <SignatureFormFields\n signatureLabel=\"Signature\"\n signatureDescription={t('signatureFieldDescription')}\n signatureError={t('signatureFieldError')}\n confirmationLabel={t('confirmSignatureCheckboxLabel')}\n confirmationError={t('confirmSignatureError')}\n />\n )\n}\n"],"names":["Form","t","useTranslation","jsx","SignatureFormFields"],"mappings":";;;AAGO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;
|
|
1
|
+
{"version":3,"file":"Form.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/Form.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { SignatureFormFields } from '@/components/Common/SignatureForm'\n\nexport function Form() {\n const { t } = useTranslation('Employee.DocumentSigner')\n return (\n <SignatureFormFields\n signatureLabel=\"Signature\"\n signatureDescription={t('signatureFieldDescription')}\n signatureError={t('signatureFieldError')}\n confirmationLabel={t('confirmSignatureCheckboxLabel')}\n confirmationError={t('confirmSignatureError')}\n />\n )\n}\n"],"names":["Form","t","useTranslation","jsx","SignatureFormFields"],"mappings":";;;AAGO,SAASA,IAAO;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB;AACtD,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,gBAAe;AAAA,MACf,sBAAsBH,EAAE,2BAA2B;AAAA,MACnD,gBAAgBA,EAAE,qBAAqB;AAAA,MACvC,mBAAmBA,EAAE,+BAA+B;AAAA,MACpD,mBAAmBA,EAAE,uBAAuB;AAAA,IAAA;AAAA,EAAA;AAGlD;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Head.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/Head.tsx"],"sourcesContent":["import { useTranslation, Trans } from 'react-i18next'\nimport { useSignatureForm } from './useSignatureForm'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Head() {\n const { form, pdfUrl } = useSignatureForm()\n const { t } = useTranslation('Employee.DocumentSigner')\n const Components = useComponentContext()\n\n return (\n <section>\n <Components.Heading as=\"h2\">\n {t('signatureFormTitle', { formTitle: form.title })}\n </Components.Heading>\n {pdfUrl && (\n <Components.Text>\n <Trans\n t={t}\n i18nKey=\"downloadPrompt\"\n values={{\n description: form.description,\n }}\n components={{\n downloadLink: (\n <Components.Link\n href={pdfUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n download={`${form.title || 'form'}.pdf`}\n />\n ),\n }}\n />\n </Components.Text>\n )}\n </section>\n )\n}\n"],"names":["Head","form","pdfUrl","useSignatureForm","useTranslation","Components","useComponentContext","jsx","Trans"],"mappings":";;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,MAAAC,GAAM,QAAAC,
|
|
1
|
+
{"version":3,"file":"Head.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/Head.tsx"],"sourcesContent":["import { useTranslation, Trans } from 'react-i18next'\nimport { useSignatureForm } from './useSignatureForm'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Head() {\n const { form, pdfUrl } = useSignatureForm()\n const { t } = useTranslation('Employee.DocumentSigner')\n const Components = useComponentContext()\n\n return (\n <section>\n <Components.Heading as=\"h2\">\n {t('signatureFormTitle', { formTitle: form.title })}\n </Components.Heading>\n {pdfUrl && (\n <Components.Text>\n <Trans\n t={t}\n i18nKey=\"downloadPrompt\"\n values={{\n description: form.description,\n }}\n components={{\n downloadLink: (\n <Components.Link\n href={pdfUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n download={`${form.title || 'form'}.pdf`}\n />\n ),\n }}\n />\n </Components.Text>\n )}\n </section>\n )\n}\n"],"names":["Head","form","pdfUrl","useSignatureForm","useTranslation","Components","useComponentContext","jsx","Trans"],"mappings":";;;;AAIO,SAASA,IAAO;AACrB,QAAM,EAAE,MAAAC,GAAM,QAAAC,EAAA,IAAWC,EAAA,GACnB,EAAE,EAAA,IAAMC,EAAe,yBAAyB,GAChDC,IAAaC,EAAA;AAEnB,2BACG,WAAA,EACC,UAAA;AAAA,IAAA,gBAAAC,EAACF,EAAW,SAAX,EAAmB,IAAG,MACpB,UAAA,EAAE,sBAAsB,EAAE,WAAWJ,EAAK,MAAA,CAAO,EAAA,CACpD;AAAA,IACCC,KACC,gBAAAK,EAACF,EAAW,MAAX,EACC,UAAA,gBAAAE;AAAA,MAACC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,SAAQ;AAAA,QACR,QAAQ;AAAA,UACN,aAAaP,EAAK;AAAA,QAAA;AAAA,QAEpB,YAAY;AAAA,UACV,cACE,gBAAAM;AAAA,YAACF,EAAW;AAAA,YAAX;AAAA,cACC,MAAMH;AAAA,cACN,QAAO;AAAA,cACP,KAAI;AAAA,cACJ,UAAU,GAAGD,EAAK,SAAS,MAAM;AAAA,YAAA;AAAA,UAAA;AAAA,QACnC;AAAA,MAEJ;AAAA,IAAA,EACF,CACF;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Preview.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/Preview.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useSignatureForm } from './useSignatureForm'\nimport { DocumentViewer } from '@/components/Common/DocumentViewer'\n\nexport function Preview() {\n const { form, pdfUrl } = useSignatureForm()\n const { t } = useTranslation('Company.SignatureForm')\n\n return (\n <DocumentViewer\n url={pdfUrl}\n title={form.title}\n downloadInstructions={t('downloadInstructions')}\n viewDocumentLabel={t('viewDocumentCta')}\n />\n )\n}\n"],"names":["Preview","form","pdfUrl","useSignatureForm","t","useTranslation","jsx","DocumentViewer"],"mappings":";;;;AAIO,SAASA,IAAU;AACxB,QAAM,EAAE,MAAAC,GAAM,QAAAC,
|
|
1
|
+
{"version":3,"file":"Preview.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/Preview.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useSignatureForm } from './useSignatureForm'\nimport { DocumentViewer } from '@/components/Common/DocumentViewer'\n\nexport function Preview() {\n const { form, pdfUrl } = useSignatureForm()\n const { t } = useTranslation('Company.SignatureForm')\n\n return (\n <DocumentViewer\n url={pdfUrl}\n title={form.title}\n downloadInstructions={t('downloadInstructions')}\n viewDocumentLabel={t('viewDocumentCta')}\n />\n )\n}\n"],"names":["Preview","form","pdfUrl","useSignatureForm","t","useTranslation","jsx","DocumentViewer"],"mappings":";;;;AAIO,SAASA,IAAU;AACxB,QAAM,EAAE,MAAAC,GAAM,QAAAC,EAAA,IAAWC,EAAA,GACnB,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB;AAEpD,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,KAAKL;AAAA,MACL,OAAOD,EAAK;AAAA,MACZ,sBAAsBG,EAAE,sBAAsB;AAAA,MAC9C,mBAAmBA,EAAE,iBAAiB;AAAA,IAAA;AAAA,EAAA;AAG5C;"}
|
|
@@ -12,13 +12,14 @@ import { useBase as C } from "../../../Base/useBase.js";
|
|
|
12
12
|
import { useI18n as G } from "../../../../i18n/I18n.js";
|
|
13
13
|
import { componentEvents as i } from "../../../../shared/constants.js";
|
|
14
14
|
import { Flex as M } from "../../../Common/Flex/Flex.js";
|
|
15
|
+
import "classnames";
|
|
15
16
|
import { SignatureForm as R } from "../../../Common/SignatureForm/SignatureForm.js";
|
|
16
|
-
function
|
|
17
|
+
function W(r) {
|
|
17
18
|
return /* @__PURE__ */ o(A, { ...r, children: /* @__PURE__ */ o(j, { ...r }) });
|
|
18
19
|
}
|
|
19
|
-
function j({ employeeId: r, formId: s, className: u, children:
|
|
20
|
+
function j({ employeeId: r, formId: s, className: u, children: t }) {
|
|
20
21
|
G("Employee.DocumentSigner");
|
|
21
|
-
const { onEvent:
|
|
22
|
+
const { onEvent: e, baseSubmitHandler: a } = C(), { data: c } = x({ employeeId: r, formId: s }), n = c.form, {
|
|
22
23
|
data: { formPdf: f }
|
|
23
24
|
} = h({ employeeId: r, formId: n.uuid }), d = f.documentUrl, { mutateAsync: p, isPending: l } = P();
|
|
24
25
|
return /* @__PURE__ */ o("section", { className: u, children: /* @__PURE__ */ o(
|
|
@@ -27,7 +28,7 @@ function j({ employeeId: r, formId: s, className: u, children: e }) {
|
|
|
27
28
|
value: {
|
|
28
29
|
pdfUrl: d,
|
|
29
30
|
handleBack: () => {
|
|
30
|
-
|
|
31
|
+
e(i.CANCEL);
|
|
31
32
|
},
|
|
32
33
|
form: n,
|
|
33
34
|
isPending: l
|
|
@@ -45,10 +46,10 @@ function j({ employeeId: r, formId: s, className: u, children: e }) {
|
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
});
|
|
48
|
-
|
|
49
|
+
e(i.EMPLOYEE_SIGN_FORM, S);
|
|
49
50
|
}
|
|
50
51
|
});
|
|
51
|
-
}, children: /* @__PURE__ */ o(M, { flexDirection: "column", children:
|
|
52
|
+
}, children: /* @__PURE__ */ o(M, { flexDirection: "column", children: t || /* @__PURE__ */ F(E, { children: [
|
|
52
53
|
/* @__PURE__ */ o(v, {}),
|
|
53
54
|
/* @__PURE__ */ o(B, {}),
|
|
54
55
|
/* @__PURE__ */ o(b, {}),
|
|
@@ -58,6 +59,6 @@ function j({ employeeId: r, formId: s, className: u, children: e }) {
|
|
|
58
59
|
) });
|
|
59
60
|
}
|
|
60
61
|
export {
|
|
61
|
-
|
|
62
|
+
W as SignatureForm
|
|
62
63
|
};
|
|
63
64
|
//# sourceMappingURL=SignatureForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useEmployeeFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/employeeFormsGetPdf'\nimport { useEmployeeFormsSignMutation } from '@gusto/embedded-api/react-query/employeeFormsSign'\nimport { useEmployeeFormsGetSuspense } from '@gusto/embedded-api/react-query/employeeFormsGet'\nimport { Form as FormComponent } from './Form'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { Preview } from './Preview'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\nimport type { SignatureFormInputs } from '@/components/Common/SignatureForm'\nimport { SignatureForm as SharedSignatureForm } from '@/components/Common/SignatureForm'\n\ninterface SignatureFormProps extends CommonComponentInterface {\n employeeId: string\n formId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className, children }: SignatureFormProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useEmployeeFormsGetSuspense({ employeeId, formId })\n const form = data.form!\n\n const {\n data: { formPdf },\n } = useEmployeeFormsGetPdfSuspense({ employeeId, formId: form.uuid })\n const pdfUrl = formPdf!.documentUrl\n\n const { mutateAsync: signForm, isPending: isSignFormPending } = useEmployeeFormsSignMutation()\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n if (form.uuid) {\n const { form: signFormResult } = await signForm({\n request: {\n employeeId,\n formId: form.uuid,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, signFormResult)\n }\n })\n }\n\n return (\n <section className={className}>\n <SignatureFormProvider\n value={{\n pdfUrl,\n handleBack,\n form,\n isPending: isSignFormPending,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\">\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <FormComponent />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n </section>\n )\n}\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","data","useEmployeeFormsGetSuspense","form","formPdf","useEmployeeFormsGetPdfSuspense","pdfUrl","signForm","isSignFormPending","useEmployeeFormsSignMutation","SignatureFormProvider","componentEvents","SharedSignatureForm","payload","signFormResult","Flex","jsxs","Fragment","Head","Preview","FormComponent","Actions"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { useEmployeeFormsGetPdfSuspense } from '@gusto/embedded-api/react-query/employeeFormsGetPdf'\nimport { useEmployeeFormsSignMutation } from '@gusto/embedded-api/react-query/employeeFormsSign'\nimport { useEmployeeFormsGetSuspense } from '@gusto/embedded-api/react-query/employeeFormsGet'\nimport { Form as FormComponent } from './Form'\nimport { Head } from './Head'\nimport { Actions } from './Actions'\nimport { Preview } from './Preview'\nimport { SignatureFormProvider } from './useSignatureForm'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { useI18n } from '@/i18n'\nimport { componentEvents } from '@/shared/constants'\nimport { Flex } from '@/components/Common'\nimport type { SignatureFormInputs } from '@/components/Common/SignatureForm'\nimport { SignatureForm as SharedSignatureForm } from '@/components/Common/SignatureForm'\n\ninterface SignatureFormProps extends CommonComponentInterface {\n employeeId: string\n formId: string\n}\n\nexport function SignatureForm(props: SignatureFormProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props} />\n </BaseComponent>\n )\n}\n\nfunction Root({ employeeId, formId, className, children }: SignatureFormProps) {\n useI18n('Employee.DocumentSigner')\n const { onEvent, baseSubmitHandler } = useBase()\n\n const { data } = useEmployeeFormsGetSuspense({ employeeId, formId })\n const form = data.form!\n\n const {\n data: { formPdf },\n } = useEmployeeFormsGetPdfSuspense({ employeeId, formId: form.uuid })\n const pdfUrl = formPdf!.documentUrl\n\n const { mutateAsync: signForm, isPending: isSignFormPending } = useEmployeeFormsSignMutation()\n\n const handleBack = () => {\n onEvent(componentEvents.CANCEL)\n }\n\n const handleSubmit = async (data: SignatureFormInputs) => {\n await baseSubmitHandler(data, async payload => {\n if (form.uuid) {\n const { form: signFormResult } = await signForm({\n request: {\n employeeId,\n formId: form.uuid,\n requestBody: {\n signatureText: payload.signature,\n agree: payload.confirmSignature,\n },\n },\n })\n onEvent(componentEvents.EMPLOYEE_SIGN_FORM, signFormResult)\n }\n })\n }\n\n return (\n <section className={className}>\n <SignatureFormProvider\n value={{\n pdfUrl,\n handleBack,\n form,\n isPending: isSignFormPending,\n }}\n >\n <SharedSignatureForm onSubmit={handleSubmit}>\n <Flex flexDirection=\"column\">\n {children ? (\n children\n ) : (\n <>\n <Head />\n <Preview />\n <FormComponent />\n <Actions />\n </>\n )}\n </Flex>\n </SharedSignatureForm>\n </SignatureFormProvider>\n </section>\n )\n}\n"],"names":["SignatureForm","props","jsx","BaseComponent","Root","employeeId","formId","className","children","useI18n","onEvent","baseSubmitHandler","useBase","data","useEmployeeFormsGetSuspense","form","formPdf","useEmployeeFormsGetPdfSuspense","pdfUrl","signForm","isSignFormPending","useEmployeeFormsSignMutation","SignatureFormProvider","componentEvents","SharedSignatureForm","payload","signFormResult","Flex","jsxs","Fragment","Head","Preview","FormComponent","Actions"],"mappings":";;;;;;;;;;;;;;;;AAyBO,SAASA,EAAcC,GAAoD;AAChF,SACE,gBAAAC,EAACC,KAAe,GAAGF,GACjB,4BAACG,GAAA,EAAM,GAAGH,GAAO,EAAA,CACnB;AAEJ;AAEA,SAASG,EAAK,EAAE,YAAAC,GAAY,QAAAC,GAAQ,WAAAC,GAAW,UAAAC,KAAgC;AAC7E,EAAAC,EAAQ,yBAAyB;AACjC,QAAM,EAAE,SAAAC,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GAEjC,EAAE,MAAAC,EAAA,IAASC,EAA4B,EAAE,YAAAT,GAAY,QAAAC,GAAQ,GAC7DS,IAAOF,EAAK,MAEZ;AAAA,IACJ,MAAM,EAAE,SAAAG,EAAA;AAAA,EAAQ,IACdC,EAA+B,EAAE,YAAAZ,GAAY,QAAQU,EAAK,MAAM,GAC9DG,IAASF,EAAS,aAElB,EAAE,aAAaG,GAAU,WAAWC,EAAA,IAAsBC,EAAA;AAwBhE,SACE,gBAAAnB,EAAC,aAAQ,WAAAK,GACP,UAAA,gBAAAL;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,QAAAJ;AAAA,QACA,YA3BW,MAAM;AACvB,UAAAR,EAAQa,EAAgB,MAAM;AAAA,QAChC;AAAA,QA0BQ,MAAAR;AAAA,QACA,WAAWK;AAAA,MAAA;AAAA,MAGb,UAAA,gBAAAlB,EAACsB,GAAA,EAAoB,UA5BN,OAAOX,MAA8B;AACxD,cAAMF,EAAkBE,GAAM,OAAMY,MAAW;AAC7C,cAAIV,EAAK,MAAM;AACb,kBAAM,EAAE,MAAMW,EAAA,IAAmB,MAAMP,EAAS;AAAA,cAC9C,SAAS;AAAA,gBACP,YAAAd;AAAA,gBACA,QAAQU,EAAK;AAAA,gBACb,aAAa;AAAA,kBACX,eAAeU,EAAQ;AAAA,kBACvB,OAAOA,EAAQ;AAAA,gBAAA;AAAA,cACjB;AAAA,YACF,CACD;AACD,YAAAf,EAAQa,EAAgB,oBAAoBG,CAAc;AAAA,UAC5D;AAAA,QACF,CAAC;AAAA,MACH,GAaQ,UAAA,gBAAAxB,EAACyB,KAAK,eAAc,UACjB,UAAAnB,KAGC,gBAAAoB,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAA3B,EAAC4B,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAQ;AAAA,0BACRC,GAAA,EAAc;AAAA,0BACdC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX,GAEJ,EAAA,CACF;AAAA,IAAA;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -8,13 +8,14 @@ import "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
|
|
|
8
8
|
import "@tanstack/react-query";
|
|
9
9
|
import "../../../Base/useBase.js";
|
|
10
10
|
import "../../../../shared/constants.js";
|
|
11
|
+
import "classnames";
|
|
11
12
|
import "dompurify";
|
|
12
13
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
14
|
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
15
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
15
|
-
const [
|
|
16
|
+
const [d, s] = o("SignatureFormContext");
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
s as SignatureFormProvider,
|
|
19
|
+
d as useSignatureForm
|
|
19
20
|
};
|
|
20
21
|
//# sourceMappingURL=useSignatureForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentSignerStateMachine.js","sources":["../../../../src/components/Employee/DocumentSigner/documentSignerStateMachine.tsx"],"sourcesContent":["import { type Form } from '@gusto/embedded-api/models/components/form'\nimport { DocumentList } from './DocumentList/DocumentList'\nimport { SignatureForm } from './SignatureForm/SignatureForm'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { componentEvents } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\nexport type EventPayloads = {\n [componentEvents.EMPLOYEE_SIGN_FORM]: Form\n [componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN]: { uuid: string }\n [componentEvents.CANCEL]: undefined\n}\n\nexport interface DocumentSignerContextInterface extends FlowContextInterface {\n employeeId: string\n formId?: string\n}\n\nexport function DocumentListContextual() {\n const { employeeId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return <DocumentList employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function SignatureFormContextual() {\n const { employeeId, formId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return (\n <SignatureForm\n employeeId={ensureRequired(employeeId)}\n formId={ensureRequired(formId)}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["DocumentListContextual","employeeId","onEvent","useFlow","DocumentList","ensureRequired","SignatureFormContextual","formId","jsx","SignatureForm"],"mappings":";;;;;AAkBO,SAASA,IAAyB;AACvC,QAAM,EAAE,YAAAC,GAAY,SAAAC,
|
|
1
|
+
{"version":3,"file":"documentSignerStateMachine.js","sources":["../../../../src/components/Employee/DocumentSigner/documentSignerStateMachine.tsx"],"sourcesContent":["import { type Form } from '@gusto/embedded-api/models/components/form'\nimport { DocumentList } from './DocumentList/DocumentList'\nimport { SignatureForm } from './SignatureForm/SignatureForm'\nimport { useFlow, type FlowContextInterface } from '@/components/Flow/useFlow'\nimport type { componentEvents } from '@/shared/constants'\nimport { ensureRequired } from '@/helpers/ensureRequired'\n\nexport type EventPayloads = {\n [componentEvents.EMPLOYEE_SIGN_FORM]: Form\n [componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN]: { uuid: string }\n [componentEvents.CANCEL]: undefined\n}\n\nexport interface DocumentSignerContextInterface extends FlowContextInterface {\n employeeId: string\n formId?: string\n}\n\nexport function DocumentListContextual() {\n const { employeeId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return <DocumentList employeeId={ensureRequired(employeeId)} onEvent={onEvent} />\n}\n\nexport function SignatureFormContextual() {\n const { employeeId, formId, onEvent } = useFlow<DocumentSignerContextInterface>()\n\n return (\n <SignatureForm\n employeeId={ensureRequired(employeeId)}\n formId={ensureRequired(formId)}\n onEvent={onEvent}\n />\n )\n}\n"],"names":["DocumentListContextual","employeeId","onEvent","useFlow","DocumentList","ensureRequired","SignatureFormContextual","formId","jsx","SignatureForm"],"mappings":";;;;;AAkBO,SAASA,IAAyB;AACvC,QAAM,EAAE,YAAAC,GAAY,SAAAC,EAAA,IAAYC,EAAA;AAEhC,2BAAQC,GAAA,EAAa,YAAYC,EAAeJ,CAAU,GAAG,SAAAC,GAAkB;AACjF;AAEO,SAASI,IAA0B;AACxC,QAAM,EAAE,YAAAL,GAAY,QAAAM,GAAQ,SAAAL,EAAA,IAAYC,EAAA;AAExC,SACE,gBAAAK;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,YAAYJ,EAAeJ,CAAU;AAAA,MACrC,QAAQI,EAAeE,CAAM;AAAA,MAC7B,SAAAL;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stateMachine.js","sources":["../../../../src/components/Employee/DocumentSigner/stateMachine.ts"],"sourcesContent":["import { state, transition, reduce, state as final } from 'robot3'\nimport type { DocumentSignerContextInterface, EventPayloads } from './documentSignerStateMachine'\nimport { SignatureFormContextual, DocumentListContextual } from './documentSignerStateMachine'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType } from '@/types/Helpers'\n\nexport const documentSignerMachine = {\n index: state(\n transition(\n componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN,\n 'signatureForm',\n reduce(\n (\n ctx: DocumentSignerContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN>,\n ): DocumentSignerContextInterface => ({\n ...ctx,\n formId: ev.payload.uuid,\n component: SignatureFormContextual,\n }),\n ),\n ),\n transition(componentEvents.EMPLOYEE_FORMS_DONE, 'done'),\n ),\n signatureForm: state(\n transition(\n componentEvents.CANCEL,\n 'index',\n reduce(\n (\n ctx: DocumentSignerContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.CANCEL>,\n ): DocumentSignerContextInterface => ({\n ...ctx,\n formId: undefined,\n component: DocumentListContextual,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_SIGN_FORM,\n 'index',\n reduce(\n (\n ctx: DocumentSignerContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.EMPLOYEE_SIGN_FORM>,\n ): DocumentSignerContextInterface => ({\n ...ctx,\n formId: undefined,\n component: DocumentListContextual,\n }),\n ),\n ),\n ),\n done: final(),\n}\n"],"names":["documentSignerMachine","state","transition","componentEvents","reduce","ctx","ev","SignatureFormContextual","DocumentListContextual","final"],"mappings":";;;AAMO,MAAMA,IAAwB;AAAA,EACnC,OAAOC;AAAA,IACLC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CACEC,GACAC,OACoC;AAAA,UACpC,GAAGD;AAAA,UACH,QAAQC,EAAG,QAAQ;AAAA,UACnB,WAAWC;AAAA,
|
|
1
|
+
{"version":3,"file":"stateMachine.js","sources":["../../../../src/components/Employee/DocumentSigner/stateMachine.ts"],"sourcesContent":["import { state, transition, reduce, state as final } from 'robot3'\nimport type { DocumentSignerContextInterface, EventPayloads } from './documentSignerStateMachine'\nimport { SignatureFormContextual, DocumentListContextual } from './documentSignerStateMachine'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType } from '@/types/Helpers'\n\nexport const documentSignerMachine = {\n index: state(\n transition(\n componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN,\n 'signatureForm',\n reduce(\n (\n ctx: DocumentSignerContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.EMPLOYEE_VIEW_FORM_TO_SIGN>,\n ): DocumentSignerContextInterface => ({\n ...ctx,\n formId: ev.payload.uuid,\n component: SignatureFormContextual,\n }),\n ),\n ),\n transition(componentEvents.EMPLOYEE_FORMS_DONE, 'done'),\n ),\n signatureForm: state(\n transition(\n componentEvents.CANCEL,\n 'index',\n reduce(\n (\n ctx: DocumentSignerContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.CANCEL>,\n ): DocumentSignerContextInterface => ({\n ...ctx,\n formId: undefined,\n component: DocumentListContextual,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_SIGN_FORM,\n 'index',\n reduce(\n (\n ctx: DocumentSignerContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.EMPLOYEE_SIGN_FORM>,\n ): DocumentSignerContextInterface => ({\n ...ctx,\n formId: undefined,\n component: DocumentListContextual,\n }),\n ),\n ),\n ),\n done: final(),\n}\n"],"names":["documentSignerMachine","state","transition","componentEvents","reduce","ctx","ev","SignatureFormContextual","DocumentListContextual","final"],"mappings":";;;AAMO,MAAMA,IAAwB;AAAA,EACnC,OAAOC;AAAA,IACLC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CACEC,GACAC,OACoC;AAAA,UACpC,GAAGD;AAAA,UACH,QAAQC,EAAG,QAAQ;AAAA,UACnB,WAAWC;AAAA,QAAA;AAAA,MACb;AAAA,IACF;AAAA,IAEFL,EAAWC,EAAgB,qBAAqB,MAAM;AAAA,EAAA;AAAA,EAExD,eAAeF;AAAA,IACbC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CACEC,GACAC,OACoC;AAAA,UACpC,GAAGD;AAAA,UACH,QAAQ;AAAA,UACR,WAAWG;AAAA,QAAA;AAAA,MACb;AAAA,IACF;AAAA,IAEFN;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CACEC,GACAC,OACoC;AAAA,UACpC,GAAGD;AAAA,UACH,QAAQ;AAAA,UACR,WAAWG;AAAA,QAAA;AAAA,MACb;AAAA,IACF;AAAA,EACF;AAAA,EAEF,MAAMC,EAAA;AACR;"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as r } from "react-i18next";
|
|
3
3
|
import { useEmployeeList as m } from "./useEmployeeList.js";
|
|
4
|
+
import "classnames";
|
|
5
|
+
import "../../../shared/constants.js";
|
|
4
6
|
import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
5
|
-
import { useComponentContext as
|
|
6
|
-
function
|
|
7
|
-
const { t } = r("Employee.EmployeeList"), { handleSkip: n, employees: e } = m(), i =
|
|
7
|
+
import { useComponentContext as p } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
+
function d() {
|
|
9
|
+
const { t } = r("Employee.EmployeeList"), { handleSkip: n, employees: e } = m(), i = p();
|
|
8
10
|
return e.length === 0 ? null : /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(i.Button, { onClick: n, isLoading: !1, children: t("continueCta") }) });
|
|
9
11
|
}
|
|
10
12
|
export {
|
|
11
|
-
|
|
13
|
+
d as Actions
|
|
12
14
|
};
|
|
13
15
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/EmployeeList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeeList } from './useEmployeeList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.EmployeeList')\n const { handleSkip, employees } = useEmployeeList()\n const Components = useComponentContext()\n\n if (employees.length === 0) {\n return null\n }\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleSkip} isLoading={false}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleSkip","employees","useEmployeeList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../src/components/Employee/EmployeeList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useEmployeeList } from './useEmployeeList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.EmployeeList')\n const { handleSkip, employees } = useEmployeeList()\n const Components = useComponentContext()\n\n if (employees.length === 0) {\n return null\n }\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleSkip} isLoading={false}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleSkip","employees","useEmployeeList","Components","useComponentContext","jsx","ActionsLayout"],"mappings":";;;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,EAAA,IAAMC,EAAe,uBAAuB,GAC9C,EAAE,YAAAC,GAAY,WAAAC,EAAA,IAAcC,EAAA,GAC5BC,IAAaC,EAAA;AAEnB,SAAIH,EAAU,WAAW,IAChB,OAIP,gBAAAI,EAACC,GAAA,EACC,UAAA,gBAAAD,EAACF,EAAW,QAAX,EAAkB,SAASH,GAAY,WAAW,IAChD,UAAA,EAAE,aAAa,GAClB,GACF;AAEJ;"}
|
|
@@ -8,8 +8,9 @@ import { Actions as F } from "./Actions.js";
|
|
|
8
8
|
import { BaseComponent as U } from "../../Base/Base.js";
|
|
9
9
|
import { useBase as W } from "../../Base/useBase.js";
|
|
10
10
|
import { Flex as q } from "../../Common/Flex/Flex.js";
|
|
11
|
-
import
|
|
11
|
+
import "classnames";
|
|
12
12
|
import { componentEvents as s, EmployeeOnboardingStatus as l } from "../../../shared/constants.js";
|
|
13
|
+
import { useI18n as j, useComponentDictionary as k } from "../../../i18n/I18n.js";
|
|
13
14
|
import { Head as H } from "./Head.js";
|
|
14
15
|
import { List as V } from "./List.js";
|
|
15
16
|
import { useFlow as z } from "../../Flow/useFlow.js";
|
|
@@ -92,12 +93,12 @@ function K({ companyId: n, className: m, children: c, dictionary: y }) {
|
|
|
92
93
|
}
|
|
93
94
|
) });
|
|
94
95
|
}
|
|
95
|
-
const
|
|
96
|
+
const ye = () => {
|
|
96
97
|
const { companyId: n, onEvent: m } = z();
|
|
97
98
|
return /* @__PURE__ */ o(J, { companyId: n, onEvent: m });
|
|
98
99
|
};
|
|
99
100
|
export {
|
|
100
101
|
J as EmployeeList,
|
|
101
|
-
|
|
102
|
+
ye as EmployeeListContextual
|
|
102
103
|
};
|
|
103
104
|
//# sourceMappingURL=EmployeeList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/EmployeeList.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useEmployeesListSuspense } from '@gusto/embedded-api/react-query/employeesList'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { useEmployeesDeleteMutation } from '@gusto/embedded-api/react-query/employeesDelete'\nimport { useEmployeesUpdateOnboardingStatusMutation } from '@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus'\nimport type { OnboardingContextInterface } from '../OnboardingFlow/OnboardingFlow'\nimport { EmployeeListProvider } from './useEmployeeList'\nimport { Actions } from './Actions'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { componentEvents, EmployeeOnboardingStatus } from '@/shared/constants'\nimport { Head } from '@/components/Employee/EmployeeList/Head'\nimport { List } from '@/components/Employee/EmployeeList/List'\nimport { useFlow } from '@/components/Flow/useFlow'\n\n//Interface for component specific props\ninterface EmployeeListProps extends CommonComponentInterface<'Employee.EmployeeList'> {\n companyId: string\n}\n\nexport function EmployeeList(props: EmployeeListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children, dictionary }: EmployeeListProps) {\n //Using i18n hook to directly load necessary namespace\n useI18n('Employee.EmployeeList')\n useComponentDictionary('Employee.EmployeeList', dictionary)\n //Getting props from base context\n const { onEvent, baseSubmitHandler } = useBase()\n const [currentPage, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState(5)\n\n const { data } = useEmployeesListSuspense({ companyId, page: currentPage, per: itemsPerPage })\n const { httpMeta, showEmployees: employeeList } = data\n const employees = employeeList!\n\n const { mutateAsync: deleteEmployeeMutation } = useEmployeesDeleteMutation()\n const { mutateAsync: updateEmployeeOnboardingStatusMutation } =\n useEmployeesUpdateOnboardingStatusMutation()\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 const handleDelete = async (uuid: string) => {\n await baseSubmitHandler(uuid, async payload => {\n await deleteEmployeeMutation({\n request: { employeeId: payload },\n })\n\n onEvent(componentEvents.EMPLOYEE_DELETED, { employeeId: payload })\n })\n }\n /**Set onboarding status to self_onboarding_awaiting_admin_review and proceed to edit */\n const handleReview = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n onEvent(componentEvents.EMPLOYEE_UPDATE, {\n employeeId,\n onboardingStatus: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n })\n }\n /**Update employee onboarding status reverting it back to admin_onboarding_incomplete */\n const handleCancelSelfOnboarding = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n })\n })\n }\n const updateOnboardingStatus = async (data: { employeeId: string; status: OnboardingStatus }) => {\n await baseSubmitHandler(data, async ({ employeeId, status }) => {\n const { employeeOnboardingStatus: responseData } =\n await updateEmployeeOnboardingStatusMutation({\n request: { employeeId, requestBody: { onboardingStatus: status } },\n })\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_STATUS_UPDATED, responseData)\n })\n }\n const handleNew = () => {\n onEvent(componentEvents.EMPLOYEE_CREATE)\n }\n const handleSkip = () => {\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_DONE)\n }\n\n const handleEdit = (uuid: string, onboardingStatus?: OnboardingStatus) => {\n onEvent(componentEvents.EMPLOYEE_UPDATE, { employeeId: uuid, onboardingStatus })\n }\n return (\n <section className={className}>\n <EmployeeListProvider\n value={{\n handleEdit,\n handleNew,\n handleReview,\n handleDelete,\n employees,\n currentPage,\n totalPages,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleCancelSelfOnboarding,\n handleItemsPerPageChange,\n handleSkip,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </EmployeeListProvider>\n </section>\n )\n}\n\n/**\n * Wrapper used inside Flows -> exposes flow context for required parameters\n */\nexport const EmployeeListContextual = () => {\n const { companyId, onEvent } = useFlow<OnboardingContextInterface>()\n return <EmployeeList companyId={companyId} onEvent={onEvent} />\n}\n"],"names":["EmployeeList","props","jsx","BaseComponent","Root","companyId","className","children","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","currentPage","setCurrentPage","useState","itemsPerPage","setItemsPerPage","data","useEmployeesListSuspense","httpMeta","employeeList","employees","deleteEmployeeMutation","useEmployeesDeleteMutation","updateEmployeeOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","totalPages","handleItemsPerPageChange","newCount","handleFirstPage","handlePreviousPage","prevPage","handleNextPage","handleLastPage","handleDelete","uuid","payload","componentEvents","handleReview","employeeId","updateOnboardingStatus","EmployeeOnboardingStatus","handleCancelSelfOnboarding","status","responseData","EmployeeListProvider","onboardingStatus","jsxs","Flex","Head","List","Actions","EmployeeListContextual","useFlow"],"mappings":"
|
|
1
|
+
{"version":3,"file":"EmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/EmployeeList.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useEmployeesListSuspense } from '@gusto/embedded-api/react-query/employeesList'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { useEmployeesDeleteMutation } from '@gusto/embedded-api/react-query/employeesDelete'\nimport { useEmployeesUpdateOnboardingStatusMutation } from '@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus'\nimport type { OnboardingContextInterface } from '../OnboardingFlow/OnboardingFlow'\nimport { EmployeeListProvider } from './useEmployeeList'\nimport { Actions } from './Actions'\nimport {\n BaseComponent,\n type BaseComponentInterface,\n type CommonComponentInterface,\n} from '@/components/Base/Base'\nimport { useBase } from '@/components/Base/useBase'\nimport { Flex } from '@/components/Common'\nimport { useI18n, useComponentDictionary } from '@/i18n'\nimport { componentEvents, EmployeeOnboardingStatus } from '@/shared/constants'\nimport { Head } from '@/components/Employee/EmployeeList/Head'\nimport { List } from '@/components/Employee/EmployeeList/List'\nimport { useFlow } from '@/components/Flow/useFlow'\n\n//Interface for component specific props\ninterface EmployeeListProps extends CommonComponentInterface<'Employee.EmployeeList'> {\n companyId: string\n}\n\nexport function EmployeeList(props: EmployeeListProps & BaseComponentInterface) {\n return (\n <BaseComponent {...props}>\n <Root {...props}>{props.children}</Root>\n </BaseComponent>\n )\n}\nfunction Root({ companyId, className, children, dictionary }: EmployeeListProps) {\n //Using i18n hook to directly load necessary namespace\n useI18n('Employee.EmployeeList')\n useComponentDictionary('Employee.EmployeeList', dictionary)\n //Getting props from base context\n const { onEvent, baseSubmitHandler } = useBase()\n const [currentPage, setCurrentPage] = useState(1)\n const [itemsPerPage, setItemsPerPage] = useState(5)\n\n const { data } = useEmployeesListSuspense({ companyId, page: currentPage, per: itemsPerPage })\n const { httpMeta, showEmployees: employeeList } = data\n const employees = employeeList!\n\n const { mutateAsync: deleteEmployeeMutation } = useEmployeesDeleteMutation()\n const { mutateAsync: updateEmployeeOnboardingStatusMutation } =\n useEmployeesUpdateOnboardingStatusMutation()\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 const handleDelete = async (uuid: string) => {\n await baseSubmitHandler(uuid, async payload => {\n await deleteEmployeeMutation({\n request: { employeeId: payload },\n })\n\n onEvent(componentEvents.EMPLOYEE_DELETED, { employeeId: payload })\n })\n }\n /**Set onboarding status to self_onboarding_awaiting_admin_review and proceed to edit */\n const handleReview = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n onEvent(componentEvents.EMPLOYEE_UPDATE, {\n employeeId,\n onboardingStatus: EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n })\n })\n }\n /**Update employee onboarding status reverting it back to admin_onboarding_incomplete */\n const handleCancelSelfOnboarding = async (data: string) => {\n await baseSubmitHandler(data, async employeeId => {\n await updateOnboardingStatus({\n employeeId,\n status: EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n })\n })\n }\n const updateOnboardingStatus = async (data: { employeeId: string; status: OnboardingStatus }) => {\n await baseSubmitHandler(data, async ({ employeeId, status }) => {\n const { employeeOnboardingStatus: responseData } =\n await updateEmployeeOnboardingStatusMutation({\n request: { employeeId, requestBody: { onboardingStatus: status } },\n })\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_STATUS_UPDATED, responseData)\n })\n }\n const handleNew = () => {\n onEvent(componentEvents.EMPLOYEE_CREATE)\n }\n const handleSkip = () => {\n onEvent(componentEvents.EMPLOYEE_ONBOARDING_DONE)\n }\n\n const handleEdit = (uuid: string, onboardingStatus?: OnboardingStatus) => {\n onEvent(componentEvents.EMPLOYEE_UPDATE, { employeeId: uuid, onboardingStatus })\n }\n return (\n <section className={className}>\n <EmployeeListProvider\n value={{\n handleEdit,\n handleNew,\n handleReview,\n handleDelete,\n employees,\n currentPage,\n totalPages,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleCancelSelfOnboarding,\n handleItemsPerPageChange,\n handleSkip,\n }}\n >\n {children ? (\n children\n ) : (\n <Flex flexDirection=\"column\">\n <Head />\n <List />\n <Actions />\n </Flex>\n )}\n </EmployeeListProvider>\n </section>\n )\n}\n\n/**\n * Wrapper used inside Flows -> exposes flow context for required parameters\n */\nexport const EmployeeListContextual = () => {\n const { companyId, onEvent } = useFlow<OnboardingContextInterface>()\n return <EmployeeList companyId={companyId} onEvent={onEvent} />\n}\n"],"names":["EmployeeList","props","jsx","BaseComponent","Root","companyId","className","children","dictionary","useI18n","useComponentDictionary","onEvent","baseSubmitHandler","useBase","currentPage","setCurrentPage","useState","itemsPerPage","setItemsPerPage","data","useEmployeesListSuspense","httpMeta","employeeList","employees","deleteEmployeeMutation","useEmployeesDeleteMutation","updateEmployeeOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","totalPages","handleItemsPerPageChange","newCount","handleFirstPage","handlePreviousPage","prevPage","handleNextPage","handleLastPage","handleDelete","uuid","payload","componentEvents","handleReview","employeeId","updateOnboardingStatus","EmployeeOnboardingStatus","handleCancelSelfOnboarding","status","responseData","EmployeeListProvider","onboardingStatus","jsxs","Flex","Head","List","Actions","EmployeeListContextual","useFlow"],"mappings":";;;;;;;;;;;;;;;;AA0BO,SAASA,EAAaC,GAAmD;AAC9E,SACE,gBAAAC,EAACC,GAAA,EAAe,GAAGF,GACjB,UAAA,gBAAAC,EAACE,KAAM,GAAGH,GAAQ,UAAAA,EAAM,SAAA,CAAS,EAAA,CACnC;AAEJ;AACA,SAASG,EAAK,EAAE,WAAAC,GAAW,WAAAC,GAAW,UAAAC,GAAU,YAAAC,KAAiC;AAE/E,EAAAC,EAAQ,uBAAuB,GAC/BC,EAAuB,yBAAyBF,CAAU;AAE1D,QAAM,EAAE,SAAAG,GAAS,mBAAAC,EAAA,IAAsBC,EAAA,GACjC,CAACC,GAAaC,CAAc,IAAIC,EAAS,CAAC,GAC1C,CAACC,GAAcC,CAAe,IAAIF,EAAS,CAAC,GAE5C,EAAE,MAAAG,MAASC,EAAyB,EAAE,WAAAf,GAAW,MAAMS,GAAa,KAAKG,GAAc,GACvF,EAAE,UAAAI,GAAU,eAAeC,EAAA,IAAiBH,GAC5CI,IAAYD,GAEZ,EAAE,aAAaE,EAAA,IAA2BC,EAAA,GAC1C,EAAE,aAAaC,EAAA,IACnBC,EAAA,GAEIC,IAAa,OAAOP,EAAS,SAAS,QAAQ,IAAI,eAAe,KAAK,CAAC,GAEvEQ,IAA2B,CAACC,MAAqB;AACrD,IAAAZ,EAAgBY,CAAQ;AAAA,EAC1B,GACMC,IAAkB,MAAM;AAC5B,IAAAhB,EAAe,CAAC;AAAA,EAClB,GACMiB,IAAqB,MAAM;AAC/B,IAAAjB,EAAe,OAAY,KAAK,IAAIkB,IAAW,GAAG,CAAC,CAAC;AAAA,EACtD,GACMC,IAAiB,MAAM;AAC3B,IAAAnB,EAAe,OAAY,KAAK,IAAIkB,IAAW,GAAGL,CAAU,CAAC;AAAA,EAC/D,GACMO,IAAiB,MAAM;AAC3B,IAAApB,EAAea,CAAU;AAAA,EAC3B,GACMQ,IAAe,OAAOC,MAAiB;AAC3C,UAAMzB,EAAkByB,GAAM,OAAMC,MAAW;AAC7C,YAAMd,EAAuB;AAAA,QAC3B,SAAS,EAAE,YAAYc,EAAA;AAAA,MAAQ,CAChC,GAED3B,EAAQ4B,EAAgB,kBAAkB,EAAE,YAAYD,GAAS;AAAA,IACnE,CAAC;AAAA,EACH,GAEME,IAAe,OAAOrB,MAAiB;AAC3C,UAAMP,EAAkBO,GAAM,OAAMsB,MAAc;AAChD,YAAMC,EAAuB;AAAA,QAC3B,YAAAD;AAAA,QACA,QAAQE,EAAyB;AAAA,MAAA,CAClC,GACDhC,EAAQ4B,EAAgB,iBAAiB;AAAA,QACvC,YAAAE;AAAA,QACA,kBAAkBE,EAAyB;AAAA,MAAA,CAC5C;AAAA,IACH,CAAC;AAAA,EACH,GAEMC,IAA6B,OAAOzB,MAAiB;AACzD,UAAMP,EAAkBO,GAAM,OAAMsB,MAAc;AAChD,YAAMC,EAAuB;AAAA,QAC3B,YAAAD;AAAA,QACA,QAAQE,EAAyB;AAAA,MAAA,CAClC;AAAA,IACH,CAAC;AAAA,EACH,GACMD,IAAyB,OAAOvB,MAA2D;AAC/F,UAAMP,EAAkBO,GAAM,OAAO,EAAE,YAAAsB,GAAY,QAAAI,QAAa;AAC9D,YAAM,EAAE,0BAA0BC,EAAA,IAChC,MAAMpB,EAAuC;AAAA,QAC3C,SAAS,EAAE,YAAAe,GAAY,aAAa,EAAE,kBAAkBI,IAAO;AAAA,MAAE,CAClE;AACH,MAAAlC,EAAQ4B,EAAgB,oCAAoCO,CAAY;AAAA,IAC1E,CAAC;AAAA,EACH;AAWA,SACE,gBAAA5C,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAAC6C;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,YAPW,CAACV,GAAcW,MAAwC;AACxE,UAAArC,EAAQ4B,EAAgB,iBAAiB,EAAE,YAAYF,GAAM,kBAAAW,GAAkB;AAAA,QACjF;AAAA,QAMQ,WAfU,MAAM;AACtB,UAAArC,EAAQ4B,EAAgB,eAAe;AAAA,QACzC;AAAA,QAcQ,cAAAC;AAAA,QACA,cAAAJ;AAAA,QACA,WAAAb;AAAA,QACA,aAAAT;AAAA,QACA,YAAAc;AAAA,QACA,iBAAAG;AAAA,QACA,oBAAAC;AAAA,QACA,gBAAAE;AAAA,QACA,gBAAAC;AAAA,QACA,4BAAAS;AAAA,QACA,0BAAAf;AAAA,QACA,YAxBW,MAAM;AACvB,UAAAlB,EAAQ4B,EAAgB,wBAAwB;AAAA,QAClD;AAAA,MAsBQ;AAAA,MAGD,UAAAhC,KAGC,gBAAA0C,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAAhD,EAACiD,GAAA,EAAK;AAAA,0BACLC,GAAA,EAAK;AAAA,0BACLC,GAAA,CAAA,CAAQ;AAAA,MAAA,EAAA,CACX;AAAA,IAAA;AAAA,EAAA,GAGN;AAEJ;AAKO,MAAMC,KAAyB,MAAM;AAC1C,QAAM,EAAE,WAAAjD,GAAW,SAAAM,EAAA,IAAY4C,EAAA;AAC/B,SAAO,gBAAArD,EAACF,GAAA,EAAa,WAAAK,GAAsB,SAAAM,EAAA,CAAkB;AAC/D;"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as n } from "react-i18next";
|
|
3
3
|
import { Flex as r } from "../../Common/Flex/Flex.js";
|
|
4
|
+
import "classnames";
|
|
5
|
+
import "../../../shared/constants.js";
|
|
4
6
|
import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
5
|
-
const
|
|
6
|
-
const { t } = n("Employee.EmployeeList"), o = m();
|
|
7
|
-
return /* @__PURE__ */
|
|
7
|
+
const f = () => {
|
|
8
|
+
const { t: e } = n("Employee.EmployeeList"), o = m();
|
|
9
|
+
return /* @__PURE__ */ t(r, { justifyContent: "space-between", alignItems: "center", children: /* @__PURE__ */ t(o.Heading, { as: "h2", children: e("title") }) });
|
|
8
10
|
};
|
|
9
11
|
export {
|
|
10
|
-
|
|
12
|
+
f as Head
|
|
11
13
|
};
|
|
12
14
|
//# sourceMappingURL=Head.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Head.js","sources":["../../../../src/components/Employee/EmployeeList/Head.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for EmployeeList component\nexport const Head = () => {\n const { t } = useTranslation('Employee.EmployeeList')\n const Components = useComponentContext()\n\n return (\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n </Flex>\n )\n}\n"],"names":["Head","useTranslation","Components","useComponentContext","jsx","Flex"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Head.js","sources":["../../../../src/components/Employee/EmployeeList/Head.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n// Head slot for EmployeeList component\nexport const Head = () => {\n const { t } = useTranslation('Employee.EmployeeList')\n const Components = useComponentContext()\n\n return (\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <Components.Heading as=\"h2\">{t('title')}</Components.Heading>\n </Flex>\n )\n}\n"],"names":["Head","t","useTranslation","Components","useComponentContext","jsx","Flex"],"mappings":";;;;;;AAKO,MAAMA,IAAO,MAAM;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,uBAAuB,GAC9CC,IAAaC,EAAA;AAEnB,SACE,gBAAAC,EAACC,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAC9C,UAAA,gBAAAD,EAACF,EAAW,SAAX,EAAmB,IAAG,MAAM,UAAAF,EAAE,OAAO,GAAE,GAC1C;AAEJ;"}
|
|
@@ -3,18 +3,19 @@ import { useTranslation as A } from "react-i18next";
|
|
|
3
3
|
import { useState as T } from "react";
|
|
4
4
|
import k from "./List.module.scss.js";
|
|
5
5
|
import { useEmployeeList as w } from "./useEmployeeList.js";
|
|
6
|
-
import
|
|
6
|
+
import "classnames";
|
|
7
|
+
import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as B } from "../../../shared/constants.js";
|
|
8
|
+
import { EmptyData as M } from "../../Common/EmptyData/EmptyData.js";
|
|
7
9
|
import { ActionsLayout as h } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
8
|
-
import { useComponentContext as
|
|
9
|
-
import { HamburgerMenu as
|
|
10
|
-
import { EmployeeOnboardingStatusBadge as
|
|
10
|
+
import { useComponentContext as y } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
11
|
+
import { HamburgerMenu as G } from "../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
12
|
+
import { EmployeeOnboardingStatusBadge as R } from "../../Common/OnboardingStatusBadge/index.js";
|
|
11
13
|
import s from "../../../assets/icons/pencil.svg.js";
|
|
12
|
-
import
|
|
13
|
-
import { EmployeeOnboardingStatus as i, EmployeeSelfOnboardingStatuses as x } from "../../../shared/constants.js";
|
|
14
|
+
import x from "../../../assets/icons/trashcan.svg.js";
|
|
14
15
|
import { firstLastName as F } from "../../../helpers/formattedStrings.js";
|
|
15
16
|
import { useDataView as V } from "../../Common/DataView/useDataView.js";
|
|
16
17
|
import { DataView as j } from "../../Common/DataView/DataView.js";
|
|
17
|
-
const
|
|
18
|
+
const rt = () => {
|
|
18
19
|
const {
|
|
19
20
|
handleDelete: g,
|
|
20
21
|
employees: d,
|
|
@@ -30,7 +31,7 @@ const it = () => {
|
|
|
30
31
|
currentPage: O,
|
|
31
32
|
totalPages: _,
|
|
32
33
|
handleSkip: D
|
|
33
|
-
} = w(), r =
|
|
34
|
+
} = w(), r = y(), { t: a } = A("Employee.EmployeeList"), [I, u] = T(/* @__PURE__ */ new Set()), { ...P } = V({
|
|
34
35
|
data: d,
|
|
35
36
|
columns: [
|
|
36
37
|
{
|
|
@@ -45,7 +46,7 @@ const it = () => {
|
|
|
45
46
|
key: "status",
|
|
46
47
|
title: a("statusLabel"),
|
|
47
48
|
render: ({ onboarded: t, onboardingStatus: n }) => /* @__PURE__ */ e(
|
|
48
|
-
|
|
49
|
+
R,
|
|
49
50
|
{
|
|
50
51
|
onboarded: t,
|
|
51
52
|
onboardingStatus: n
|
|
@@ -61,7 +62,7 @@ const it = () => {
|
|
|
61
62
|
p(t.uuid, t.onboardingStatus ?? void 0);
|
|
62
63
|
},
|
|
63
64
|
icon: /* @__PURE__ */ e(s, { "aria-hidden": !0 })
|
|
64
|
-
}),
|
|
65
|
+
}), B.has(t.onboarding_status ?? "") && n.push({
|
|
65
66
|
label: a("cancelSelfOnboardingCta"),
|
|
66
67
|
onClick: async () => {
|
|
67
68
|
await b(t.uuid);
|
|
@@ -83,9 +84,9 @@ const it = () => {
|
|
|
83
84
|
});
|
|
84
85
|
});
|
|
85
86
|
},
|
|
86
|
-
icon: /* @__PURE__ */ e(
|
|
87
|
+
icon: /* @__PURE__ */ e(x, { "aria-hidden": !0 })
|
|
87
88
|
}), /* @__PURE__ */ e(
|
|
88
|
-
|
|
89
|
+
G,
|
|
89
90
|
{
|
|
90
91
|
items: n,
|
|
91
92
|
triggerLabel: a("hamburgerTitle"),
|
|
@@ -102,7 +103,7 @@ const it = () => {
|
|
|
102
103
|
currentPage: O,
|
|
103
104
|
totalPages: _
|
|
104
105
|
},
|
|
105
|
-
emptyState: () => /* @__PURE__ */ e(
|
|
106
|
+
emptyState: () => /* @__PURE__ */ e(M, { title: a("emptyTableTitle"), description: a("emptyTableDescription"), children: /* @__PURE__ */ c(h, { justifyContent: "center", children: [
|
|
106
107
|
/* @__PURE__ */ e(r.Button, { variant: "secondary", onClick: D, children: a("skipCta") }),
|
|
107
108
|
/* @__PURE__ */ e(r.Button, { variant: "primary", onClick: l, children: a("addEmployeeCTA") })
|
|
108
109
|
] }) })
|
|
@@ -113,6 +114,6 @@ const it = () => {
|
|
|
113
114
|
] });
|
|
114
115
|
};
|
|
115
116
|
export {
|
|
116
|
-
|
|
117
|
+
rt as List
|
|
117
118
|
};
|
|
118
119
|
//# sourceMappingURL=List.js.map
|