@gusto/embedded-react-sdk 0.13.1 → 0.13.3
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 +37 -0
- package/dist/_virtual/_commonjsHelpers.js +7 -0
- package/dist/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/_virtual/index.js +8 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/assets/icons/close.svg.js +10 -0
- package/dist/assets/icons/close.svg.js.map +1 -0
- package/dist/assets/icons/download-cloud.svg.js +10 -0
- package/dist/assets/icons/download-cloud.svg.js.map +1 -0
- package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
- package/dist/components/Common/DataView/DataCards/DataCards.js +28 -23
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +6 -4
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.d.ts +4 -1
- package/dist/components/Common/DataView/DataTable/DataTable.js +70 -50
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataView.d.ts +7 -3
- package/dist/components/Common/DataView/DataView.js +23 -19
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Common/DataView/useDataView.d.ts +4 -1
- package/dist/components/Common/DataView/useDataView.js +15 -13
- package/dist/components/Common/DataView/useDataView.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.d.ts +1 -1
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js +15 -9
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.d.ts +2 -2
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js +21 -15
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.d.ts +2 -2
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js +19 -13
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.d.ts +1 -1
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js +24 -18
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.d.ts +1 -1
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js +18 -12
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +2 -2
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js +19 -13
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.d.ts +2 -2
- package/dist/components/Common/Fields/SelectField/SelectField.js +19 -13
- package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
- package/dist/components/Common/Fields/SwitchField/SwitchField.d.ts +1 -1
- package/dist/components/Common/Fields/SwitchField/SwitchField.js +15 -9
- package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
- package/dist/components/Common/Fields/TextInputField/TextInputField.d.ts +1 -1
- package/dist/components/Common/Fields/TextInputField/TextInputField.js +15 -9
- package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useField.d.ts +8 -7
- package/dist/components/Common/Fields/hooks/useField.js +33 -27
- package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
- package/dist/components/Common/ReorderableList/DropZone.js +5 -5
- package/dist/components/Common/ReorderableList/ReorderableItem.js +8 -8
- package/dist/components/Common/ReorderableList/ReorderableList.js +5 -5
- package/dist/components/Common/SignatureForm/SignatureForm.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
- package/dist/components/Common/UI/Alert/Alert.d.ts +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +28 -21
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +13 -7
- package/dist/components/Common/UI/Alert/Alert.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Alert/AlertTypes.d.ts +10 -0
- package/dist/components/Common/UI/Alert/AlertTypes.js +7 -0
- package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -0
- package/dist/components/Common/UI/Badge/Badge.js +10 -10
- package/dist/components/Common/UI/Badge/Badge.js.map +1 -1
- package/dist/components/Common/UI/Badge/BadgeTypes.d.ts +6 -0
- package/dist/components/Common/UI/Badge/BadgeTypes.js +7 -0
- package/dist/components/Common/UI/Badge/BadgeTypes.js.map +1 -0
- package/dist/components/Common/UI/Button/Button.d.ts +1 -1
- package/dist/components/Common/UI/Button/Button.js +30 -27
- package/dist/components/Common/UI/Button/Button.js.map +1 -1
- package/dist/components/Common/UI/Button/ButtonIcon.js +6 -6
- package/dist/components/Common/UI/Button/ButtonIcon.js.map +1 -1
- package/dist/components/Common/UI/Button/ButtonTypes.d.ts +17 -0
- package/dist/components/Common/UI/Button/ButtonTypes.js +14 -0
- package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -0
- package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
- package/dist/components/Common/UI/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Common/UI/Checkbox/Checkbox.js +51 -49
- package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Common/UI/Checkbox/CheckboxTypes.d.ts +12 -1
- package/dist/components/Common/UI/Checkbox/CheckboxTypes.js +8 -0
- package/dist/components/Common/UI/Checkbox/CheckboxTypes.js.map +1 -0
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js +72 -69
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +9 -0
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js +10 -0
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js.map +1 -0
- package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +2 -2
- package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +2 -2
- package/dist/components/Common/UI/Dialog/Dialog.d.ts +2 -0
- package/dist/components/Common/UI/Dialog/Dialog.js +84 -0
- package/dist/components/Common/UI/Dialog/Dialog.js.map +1 -0
- package/dist/components/Common/UI/Dialog/Dialog.module.scss.js +18 -0
- package/dist/components/Common/UI/Dialog/Dialog.module.scss.js.map +1 -0
- package/dist/components/Common/UI/Dialog/DialogTypes.d.ts +52 -0
- package/dist/components/Common/UI/Dialog/DialogTypes.js +10 -0
- package/dist/components/Common/UI/Dialog/DialogTypes.js.map +1 -0
- package/dist/components/Common/UI/Dialog/index.d.ts +4 -0
- package/dist/components/Common/UI/Input/Input.d.ts +1 -1
- package/dist/components/Common/UI/Input/Input.js +38 -27
- package/dist/components/Common/UI/Input/Input.js.map +1 -1
- package/dist/components/Common/UI/Input/InputTypes.d.ts +7 -0
- package/dist/components/Common/UI/Input/InputTypes.js +7 -0
- package/dist/components/Common/UI/Input/InputTypes.js.map +1 -0
- package/dist/components/Common/UI/Menu/Menu.d.ts +1 -1
- package/dist/components/Common/UI/Menu/Menu.js +32 -30
- package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
- package/dist/components/Common/UI/Menu/Menu.module.scss.js +1 -1
- package/dist/components/Common/UI/Menu/MenuTypes.d.ts +6 -0
- package/dist/components/Common/UI/Menu/MenuTypes.js +7 -0
- package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -0
- package/dist/components/Common/UI/NumberInput/NumberInputTypes.d.ts +2 -2
- package/dist/components/Common/UI/Radio/Radio.d.ts +1 -1
- package/dist/components/Common/UI/Radio/Radio.js +50 -48
- package/dist/components/Common/UI/Radio/Radio.js.map +1 -1
- package/dist/components/Common/UI/Radio/RadioTypes.d.ts +7 -0
- package/dist/components/Common/UI/Radio/RadioTypes.js +8 -0
- package/dist/components/Common/UI/Radio/RadioTypes.js.map +1 -0
- package/dist/components/Common/UI/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroup.js +61 -58
- package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +9 -0
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js +10 -0
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -0
- package/dist/components/Common/UI/Select/SelectTypes.d.ts +2 -2
- package/dist/components/Common/UI/Switch/Switch.d.ts +1 -1
- package/dist/components/Common/UI/Switch/Switch.js +48 -46
- package/dist/components/Common/UI/Switch/Switch.js.map +1 -1
- package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +9 -2
- package/dist/components/Common/UI/Switch/SwitchTypes.js +8 -0
- package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -0
- package/dist/components/Common/UI/Table/Table.d.ts +1 -1
- package/dist/components/Common/UI/Table/Table.js +15 -9
- 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/Table/TableTypes.d.ts +14 -0
- package/dist/components/Common/UI/Table/TableTypes.js +7 -0
- package/dist/components/Common/UI/Table/TableTypes.js.map +1 -0
- package/dist/components/Common/UI/Text/Text.d.ts +1 -1
- package/dist/components/Common/UI/Text/Text.js +23 -25
- package/dist/components/Common/UI/Text/Text.js.map +1 -1
- package/dist/components/Common/UI/Text/TextTypes.d.ts +7 -0
- package/dist/components/Common/UI/Text/TextTypes.js +8 -0
- package/dist/components/Common/UI/Text/TextTypes.js.map +1 -0
- package/dist/components/Common/UI/TextInput/TextInput.d.ts +1 -1
- package/dist/components/Common/UI/TextInput/TextInput.js +53 -49
- package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
- package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +14 -1
- package/dist/components/Common/UI/TextInput/TextInputTypes.js +9 -0
- package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -0
- package/dist/components/Common/UI/hooks/useFieldIds.d.ts +2 -1
- package/dist/components/Common/UI/hooks/useFieldIds.js +11 -6
- package/dist/components/Common/UI/hooks/useFieldIds.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -6
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +2 -3
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +3 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +14 -13
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +2 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +6 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +11 -10
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +8 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +8 -9
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -5
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/stateMachine.d.ts +4 -4
- package/dist/components/Company/BankAccount/stateMachine.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -3
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +9 -8
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +7 -6
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/assignSignatoryState.d.ts +1 -1
- package/dist/components/Company/DocumentSigner/assignSignatoryState.js.map +1 -1
- package/dist/components/Company/DocumentSigner/stateMachine.d.ts +5 -5
- package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +5 -6
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +13 -12
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +3 -4
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -9
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +2 -3
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +4 -5
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +6 -5
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +11 -10
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +6 -7
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +2 -3
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +7 -6
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/Locations/stateMachine.d.ts +3 -3
- package/dist/components/Company/Locations/stateMachine.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.d.ts +10 -10
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +10 -11
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -7
- 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 +3 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +34 -33
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +9 -10
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +17 -16
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +6 -7
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +11 -12
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.d.ts +3 -3
- package/dist/components/Company/StateTaxes/stateTaxesStateMachine.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 +4 -3
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +5 -6
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +17 -17
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.d.ts +7 -7
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +5 -6
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +59 -56
- package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.module.scss.js +8 -0
- package/dist/components/Contractor/Profile/ContractorProfileForm.module.scss.js.map +1 -0
- package/dist/components/Contractor/Profile/useContractorProfile.d.ts +2 -0
- package/dist/components/Contractor/Profile/useContractorProfile.js +94 -93
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +1 -1
- package/dist/components/Employee/Compensation/Actions.js +1 -1
- package/dist/components/Employee/Compensation/Edit.js +12 -12
- package/dist/components/Employee/Compensation/List.js +22 -23
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +8 -8
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
- package/dist/components/Employee/Deductions/EmptyState/EmptyState.d.ts +6 -0
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +8 -8
- package/dist/components/Employee/Deductions/stateMachine.d.ts +5 -5
- package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -7
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +8 -7
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +10 -9
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/stateMachine.d.ts +3 -3
- package/dist/components/Employee/DocumentSigner/stateMachine.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +2 -3
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -4
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +5 -6
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +12 -12
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +6 -7
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +11 -12
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +8 -8
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.d.ts +9 -9
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +8 -9
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +8 -8
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +6 -7
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +31 -29
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js +8 -0
- package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js.map +1 -0
- package/dist/components/Employee/Profile/HomeAddress.js +6 -5
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +22 -21
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js +66 -63
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +3 -4
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.d.ts +5 -5
- package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +7 -8
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +8 -9
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +12 -13
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +3 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +3 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +55 -60
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +85 -90
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +47 -48
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +20 -2
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +309 -101
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.module.scss.js +16 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.module.scss.js.map +1 -0
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.d.ts +7 -0
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +58 -0
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -0
- package/dist/components/Payroll/PayrollEditEmployee/index.d.ts +4 -0
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +19 -0
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +114 -0
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -0
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +15 -0
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +193 -0
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -0
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.module.scss.js +8 -0
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.module.scss.js.map +1 -0
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +7 -0
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +41 -0
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -0
- package/dist/components/Payroll/PayrollList/PayrollList.js +22 -18
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +5 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +94 -53
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/types.d.ts +1 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +3 -2
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +103 -27
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +16 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +408 -54
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +6 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +9 -3
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +86 -24
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +1 -1
- package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js +6 -4
- package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js.map +1 -1
- package/dist/components/Payroll/helpers.d.ts +21 -1
- package/dist/components/Payroll/helpers.js +166 -123
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +2 -0
- package/dist/components/Payroll/index.js +10 -6
- package/dist/components/Payroll/index.js.map +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +21 -19
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.d.ts +78 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +57 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProvider.js +17 -12
- package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +10 -10
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ThemeProvider/theme.d.ts +2 -0
- package/dist/contexts/ThemeProvider/theme.js +10 -8
- package/dist/contexts/ThemeProvider/theme.js.map +1 -1
- package/dist/helpers/applyMissingDefaults.d.ts +5 -0
- package/dist/helpers/applyMissingDefaults.js +10 -0
- package/dist/helpers/applyMissingDefaults.js.map +1 -0
- package/dist/helpers/readableStreamToBlob.d.ts +1 -0
- package/dist/helpers/readableStreamToBlob.js +17 -0
- package/dist/helpers/readableStreamToBlob.js.map +1 -0
- package/dist/hooks/useContainerBreakpoints/useContainerBreakpoints.d.ts +2 -4
- package/dist/hooks/useContainerBreakpoints/useContainerBreakpoints.js.map +1 -1
- package/dist/i18n/I18n.js +9 -9
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Employee.Deductions.json.js +68 -60
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/i18n/en/Employee.Profile.json.js +32 -30
- package/dist/i18n/en/Employee.Profile.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +13 -13
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +34 -14
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollHistory.json.js +22 -0
- package/dist/i18n/en/Payroll.PayrollHistory.json.js.map +1 -0
- package/dist/i18n/en/Payroll.PayrollLanding.json.js +12 -0
- package/dist/i18n/en/Payroll.PayrollLanding.json.js.map +1 -0
- package/dist/i18n/en/Payroll.PayrollList.json.js +14 -8
- package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +50 -14
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollReceipts.json.js +16 -0
- package/dist/i18n/en/Payroll.PayrollReceipts.json.js.map +1 -0
- package/dist/i18n/en/Payroll.RunPayroll.json.js +8 -0
- package/dist/i18n/en/Payroll.RunPayroll.json.js.map +1 -0
- package/dist/node_modules/@react-dnd/asap/dist/AsapQueue.js +40 -0
- package/dist/node_modules/@react-dnd/asap/dist/AsapQueue.js.map +1 -0
- package/dist/node_modules/@react-dnd/asap/dist/RawTask.js +18 -0
- package/dist/node_modules/@react-dnd/asap/dist/RawTask.js.map +1 -0
- package/dist/node_modules/@react-dnd/asap/dist/TaskFactory.js +17 -0
- package/dist/node_modules/@react-dnd/asap/dist/TaskFactory.js.map +1 -0
- package/dist/node_modules/@react-dnd/asap/dist/asap.js +10 -0
- package/dist/node_modules/@react-dnd/asap/dist/asap.js.map +1 -0
- package/dist/node_modules/@react-dnd/asap/dist/makeRequestCall.js +63 -0
- package/dist/node_modules/@react-dnd/asap/dist/makeRequestCall.js.map +1 -0
- package/dist/node_modules/@react-dnd/invariant/dist/index.js +23 -0
- package/dist/node_modules/@react-dnd/invariant/dist/index.js.map +1 -0
- package/dist/node_modules/@react-dnd/shallowequal/dist/index.js +26 -0
- package/dist/node_modules/@react-dnd/shallowequal/dist/index.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/beginDrag.js +71 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/beginDrag.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/drop.js +55 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/drop.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/endDrag.js +19 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/endDrag.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/hover.js +43 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/hover.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/index.js +18 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/index.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/local/setClientOffset.js +14 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/local/setClientOffset.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/publishDragSource.js +13 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/publishDragSource.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/types.js +10 -0
- package/dist/node_modules/dnd-core/dist/actions/dragDrop/types.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/actions/registry.js +44 -0
- package/dist/node_modules/dnd-core/dist/actions/registry.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/classes/DragDropManagerImpl.js +42 -0
- package/dist/node_modules/dnd-core/dist/classes/DragDropManagerImpl.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/classes/DragDropMonitorImpl.js +116 -0
- package/dist/node_modules/dnd-core/dist/classes/DragDropMonitorImpl.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/classes/HandlerRegistryImpl.js +97 -0
- package/dist/node_modules/dnd-core/dist/classes/HandlerRegistryImpl.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/contracts.js +22 -0
- package/dist/node_modules/dnd-core/dist/contracts.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/createDragDropManager.js +20 -0
- package/dist/node_modules/dnd-core/dist/createDragDropManager.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/interfaces.js +8 -0
- package/dist/node_modules/dnd-core/dist/interfaces.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/reducers/dirtyHandlerIds.js +31 -0
- package/dist/node_modules/dnd-core/dist/reducers/dirtyHandlerIds.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/reducers/dragOffset.js +51 -0
- package/dist/node_modules/dnd-core/dist/reducers/dragOffset.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/reducers/dragOperation.js +79 -0
- package/dist/node_modules/dnd-core/dist/reducers/dragOperation.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/reducers/index.js +43 -0
- package/dist/node_modules/dnd-core/dist/reducers/index.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/reducers/refCount.js +17 -0
- package/dist/node_modules/dnd-core/dist/reducers/refCount.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/reducers/stateId.js +7 -0
- package/dist/node_modules/dnd-core/dist/reducers/stateId.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/utils/coords.js +27 -0
- package/dist/node_modules/dnd-core/dist/utils/coords.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/utils/dirtiness.js +13 -0
- package/dist/node_modules/dnd-core/dist/utils/dirtiness.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/utils/equality.js +18 -0
- package/dist/node_modules/dnd-core/dist/utils/equality.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/utils/getNextUniqueId.js +8 -0
- package/dist/node_modules/dnd-core/dist/utils/getNextUniqueId.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/utils/js_utils.js +37 -0
- package/dist/node_modules/dnd-core/dist/utils/js_utils.js.map +1 -0
- package/dist/node_modules/dnd-core/dist/utils/matchesType.js +9 -0
- package/dist/node_modules/dnd-core/dist/utils/matchesType.js.map +1 -0
- package/dist/node_modules/fast-deep-equal/index.js +32 -0
- package/dist/node_modules/fast-deep-equal/index.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/core/DndContext.js +8 -0
- package/dist/node_modules/react-dnd/dist/core/DndContext.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/core/DndProvider.js +67 -0
- package/dist/node_modules/react-dnd/dist/core/DndProvider.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useCollectedProps.js +12 -0
- package/dist/node_modules/react-dnd/dist/hooks/useCollectedProps.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useCollector.js +23 -0
- package/dist/node_modules/react-dnd/dist/hooks/useCollector.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js +26 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/DragSourceImpl.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js +22 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/connectors.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js +21 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDrag.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js +20 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSource.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js +23 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceConnector.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js +16 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragSourceMonitor.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js +14 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useDragType.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js +24 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrag/useRegisteredDragSource.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDragDropManager.js +11 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDragDropManager.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/DropTargetImpl.js +22 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/DropTargetImpl.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/connectors.js +13 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/connectors.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useAccept.js +14 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useAccept.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDrop.js +17 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDrop.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTarget.js +19 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTarget.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetConnector.js +19 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetConnector.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetMonitor.js +16 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useDropTargetMonitor.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useRegisteredDropTarget.js +24 -0
- package/dist/node_modules/react-dnd/dist/hooks/useDrop/useRegisteredDropTarget.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useIsomorphicLayoutEffect.js +6 -0
- package/dist/node_modules/react-dnd/dist/hooks/useIsomorphicLayoutEffect.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useMonitorOutput.js +21 -0
- package/dist/node_modules/react-dnd/dist/hooks/useMonitorOutput.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/hooks/useOptionalFactory.js +11 -0
- package/dist/node_modules/react-dnd/dist/hooks/useOptionalFactory.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js +89 -0
- package/dist/node_modules/react-dnd/dist/internals/DragSourceMonitorImpl.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/internals/DropTargetMonitorImpl.js +60 -0
- package/dist/node_modules/react-dnd/dist/internals/DropTargetMonitorImpl.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js +88 -0
- package/dist/node_modules/react-dnd/dist/internals/SourceConnector.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/internals/TargetConnector.js +58 -0
- package/dist/node_modules/react-dnd/dist/internals/TargetConnector.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/internals/isRef.js +10 -0
- package/dist/node_modules/react-dnd/dist/internals/isRef.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/internals/registration.js +19 -0
- package/dist/node_modules/react-dnd/dist/internals/registration.js.map +1 -0
- package/dist/node_modules/react-dnd/dist/internals/wrapConnectorHooks.js +47 -0
- package/dist/node_modules/react-dnd/dist/internals/wrapConnectorHooks.js.map +1 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/BrowserDetector.js +11 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/BrowserDetector.js.map +1 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/EnterLeaveCounter.js +23 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/EnterLeaveCounter.js.map +1 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/HTML5BackendImpl.js +275 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/HTML5BackendImpl.js.map +1 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/MonotonicInterpolant.js +60 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/MonotonicInterpolant.js.map +1 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/NativeDragSource.js +44 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/NativeDragSource.js.map +1 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/getDataFromDataTransfer.js +11 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/getDataFromDataTransfer.js.map +1 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/index.js +25 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/index.js.map +1 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/nativeTypesConfig.js +49 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeDragSources/nativeTypesConfig.js.map +1 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeTypes.js +8 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/NativeTypes.js.map +1 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/OffsetUtils.js +71 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/OffsetUtils.js.map +1 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/OptionsReader.js +23 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/OptionsReader.js.map +1 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/index.js +8 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/index.js.map +1 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/utils/js_utils.js +23 -0
- package/dist/node_modules/react-dnd-html5-backend/dist/utils/js_utils.js.map +1 -0
- package/dist/node_modules/redux/es/redux.js +159 -0
- package/dist/node_modules/redux/es/redux.js.map +1 -0
- package/dist/shared/constants.d.ts +38 -0
- package/dist/shared/constants.js +67 -37
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/Helpers.d.ts +7 -0
- package/dist/types/i18next.d.ts +202 -20
- package/package.json +17 -16
- package/dist/i18n/en/Payroll.PayrollHistoryList.json.js +0 -16
- package/dist/i18n/en/Payroll.PayrollHistoryList.json.js.map +0 -1
|
@@ -12,13 +12,13 @@ import { useBase as H } from "../../../Base/useBase.js";
|
|
|
12
12
|
import { Form as V } from "../../../Common/Form/Form.js";
|
|
13
13
|
import { Flex as W } from "../../../Common/Flex/Flex.js";
|
|
14
14
|
import "classnames";
|
|
15
|
+
import { ActionsLayout as J } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
16
|
+
import { useComponentDictionary as K, useI18n as Q } from "../../../../i18n/I18n.js";
|
|
15
17
|
import { componentEvents as p } from "../../../../shared/constants.js";
|
|
18
|
+
import { useComponentContext as X } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
19
|
+
import { TextInputField as Z } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
16
20
|
import { RadioGroupField as x } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
17
|
-
import { TextInputField as J } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
18
|
-
import { ActionsLayout as K } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
19
21
|
import { NumberInputField as f } from "../../../Common/Fields/NumberInputField/NumberInputField.js";
|
|
20
|
-
import { useComponentDictionary as Q, useI18n as X } from "../../../../i18n/I18n.js";
|
|
21
|
-
import { useComponentContext as Z } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
22
22
|
import { CheckboxField as $ } from "../../../Common/Fields/CheckboxField/CheckboxField.js";
|
|
23
23
|
const ee = i.object({
|
|
24
24
|
active: i.boolean(),
|
|
@@ -35,8 +35,8 @@ function Me(t) {
|
|
|
35
35
|
return /* @__PURE__ */ n(z, { ...t, children: /* @__PURE__ */ n(ne, { ...t, children: t.children }) });
|
|
36
36
|
}
|
|
37
37
|
function ne({ className: t, children: b, employeeId: g, deductionId: h, dictionary: y }) {
|
|
38
|
-
const { onEvent: u, baseSubmitHandler: P } = H(), { t: r } = N("Employee.Deductions"), m =
|
|
39
|
-
|
|
38
|
+
const { onEvent: u, baseSubmitHandler: P } = H(), { t: r } = N("Employee.Deductions"), m = X();
|
|
39
|
+
K("Employee.Deductions", y), Q("Employee.Deductions");
|
|
40
40
|
const { data: C } = k({ employeeId: g }), e = h ? C.garnishmentList?.find((c) => c.uuid === h) ?? null : null, { mutateAsync: M, isPending: O } = j(), { mutateAsync: L, isPending: T } = Y(), a = B(() => ({
|
|
41
41
|
amount: e?.amount ? Number(e.amount) : 0,
|
|
42
42
|
description: e?.description ?? "",
|
|
@@ -83,7 +83,7 @@ function ne({ className: t, children: b, employeeId: g, deductionId: h, dictiona
|
|
|
83
83
|
}, S = r(e ? "editDeductionTitle" : "addDeductionTitle");
|
|
84
84
|
return /* @__PURE__ */ n("section", { className: t, children: /* @__PURE__ */ n(w, { ...s, children: /* @__PURE__ */ n(V, { onSubmit: s.handleSubmit(R), children: /* @__PURE__ */ n(W, { flexDirection: "column", gap: 32, children: b || /* @__PURE__ */ d(E, { children: [
|
|
85
85
|
/* @__PURE__ */ n(m.Heading, { as: "h2", children: S }),
|
|
86
|
-
/* @__PURE__ */ n(
|
|
86
|
+
/* @__PURE__ */ n(Z, { name: "description", label: r("descriptionLabel"), isRequired: !0 }),
|
|
87
87
|
/* @__PURE__ */ n(
|
|
88
88
|
x,
|
|
89
89
|
{
|
|
@@ -122,7 +122,7 @@ function ne({ className: t, children: b, employeeId: g, deductionId: h, dictiona
|
|
|
122
122
|
/* @__PURE__ */ n(f, { name: "payPeriodMaximum", label: "Pay period maximum", min: 0 })
|
|
123
123
|
] }),
|
|
124
124
|
/* @__PURE__ */ n($, { name: "courtOrdered", label: r("courtOrderedLabel") }),
|
|
125
|
-
/* @__PURE__ */ d(
|
|
125
|
+
/* @__PURE__ */ d(J, { children: [
|
|
126
126
|
/* @__PURE__ */ n(m.Button, { variant: "secondary", onClick: q, children: r("cancelCta") }),
|
|
127
127
|
/* @__PURE__ */ n(m.Button, { type: "submit", isLoading: F, children: r(e ? "continueCta" : "addDeductionCta") })
|
|
128
128
|
] })
|
|
@@ -6,13 +6,13 @@ import { BaseComponent as _ } from "../../../Base/Base.js";
|
|
|
6
6
|
import { useBase as k } from "../../../Base/useBase.js";
|
|
7
7
|
import { Flex as w } from "../../../Common/Flex/Flex.js";
|
|
8
8
|
import "classnames";
|
|
9
|
-
import { componentEvents as a } from "../../../../shared/constants.js";
|
|
10
9
|
import { ActionsLayout as I } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
11
10
|
import u from "../../../Common/hooks/useNumberFormatter.js";
|
|
12
11
|
import M from "../../../../assets/icons/pencil.svg.js";
|
|
13
12
|
import U from "../../../../assets/icons/trashcan.svg.js";
|
|
14
13
|
import { HamburgerMenu as B } from "../../../Common/HamburgerMenu/HamburgerMenu.js";
|
|
15
14
|
import { useComponentDictionary as S, useI18n as Y } from "../../../../i18n/I18n.js";
|
|
15
|
+
import { componentEvents as a } from "../../../../shared/constants.js";
|
|
16
16
|
import { useComponentContext as q } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
17
17
|
import { useDataView as F } from "../../../Common/DataView/useDataView.js";
|
|
18
18
|
import { DataView as H } from "../../../Common/DataView/DataView.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BaseComponentInterface, CommonComponentInterface } from '../../../Base';
|
|
2
|
+
interface EmptyStateProps extends CommonComponentInterface<'Employee.Deductions'> {
|
|
3
|
+
employeeId: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function EmptyState(props: EmptyStateProps & BaseComponentInterface): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -7,18 +7,18 @@ import { BaseComponent as C } from "../../../Base/Base.js";
|
|
|
7
7
|
import { useBase as b } from "../../../Base/useBase.js";
|
|
8
8
|
import { Form as N } from "../../../Common/Form/Form.js";
|
|
9
9
|
import "classnames";
|
|
10
|
+
import { ActionsLayout as v } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
11
|
+
import { useComponentDictionary as F, useI18n as I } from "../../../../i18n/I18n.js";
|
|
10
12
|
import { componentEvents as s } from "../../../../shared/constants.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { useComponentDictionary as I, useI18n as Y } from "../../../../i18n/I18n.js";
|
|
14
|
-
import { useComponentContext as y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
13
|
+
import { useComponentContext as Y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
|
+
import { RadioGroupField as y } from "../../../Common/Fields/RadioGroupField/RadioGroupField.js";
|
|
15
15
|
const L = m.object({ includeDeductions: m.enum(["Yes", "No"]) });
|
|
16
16
|
function G(n) {
|
|
17
17
|
return /* @__PURE__ */ e(C, { ...n, children: /* @__PURE__ */ e(_, { ...n, children: n.children }) });
|
|
18
18
|
}
|
|
19
19
|
function _({ className: n, children: t, dictionary: u }) {
|
|
20
|
-
const { onEvent: i } = b(), { t: o } = D("Employee.Deductions"), r =
|
|
21
|
-
|
|
20
|
+
const { onEvent: i } = b(), { t: o } = D("Employee.Deductions"), r = Y();
|
|
21
|
+
F("Employee.Deductions", u), I("Employee.Deductions");
|
|
22
22
|
const c = f({
|
|
23
23
|
resolver: h(L),
|
|
24
24
|
defaultValues: { includeDeductions: "No" }
|
|
@@ -28,7 +28,7 @@ function _({ className: n, children: t, dictionary: u }) {
|
|
|
28
28
|
return /* @__PURE__ */ e("section", { className: n, children: /* @__PURE__ */ e(E, { ...c, children: /* @__PURE__ */ e(N, { onSubmit: c.handleSubmit(d), children: t || /* @__PURE__ */ p(a, { children: [
|
|
29
29
|
/* @__PURE__ */ e(r.Heading, { as: "h2", children: o("pageTitle") }),
|
|
30
30
|
/* @__PURE__ */ e(
|
|
31
|
-
|
|
31
|
+
y,
|
|
32
32
|
{
|
|
33
33
|
name: "includeDeductions",
|
|
34
34
|
isRequired: !0,
|
|
@@ -40,7 +40,7 @@ function _({ className: n, children: t, dictionary: u }) {
|
|
|
40
40
|
]
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
|
-
/* @__PURE__ */ e(
|
|
43
|
+
/* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(r.Button, { type: "submit", children: o("continueCta") }) })
|
|
44
44
|
] }) }) }) });
|
|
45
45
|
}
|
|
46
46
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const deductionsStateMachine: {
|
|
2
|
-
includeDeductions: import('robot3').MachineState<
|
|
3
|
-
viewDeductions: import('robot3').MachineState<
|
|
4
|
-
addDeduction: import('robot3').MachineState<
|
|
5
|
-
editDeduction: import('robot3').MachineState<
|
|
6
|
-
done: import('robot3').MachineState<
|
|
2
|
+
includeDeductions: import('robot3').MachineState<any>;
|
|
3
|
+
viewDeductions: import('robot3').MachineState<any>;
|
|
4
|
+
addDeduction: import('robot3').MachineState<any>;
|
|
5
|
+
editDeduction: import('robot3').MachineState<any>;
|
|
6
|
+
done: import('robot3').MachineState<any>;
|
|
7
7
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stateMachine.js","sources":["../../../../src/components/Employee/Deductions/stateMachine.ts"],"sourcesContent":["import { state, transition, reduce, state as final } from 'robot3'\nimport type { DeductionsContextInterface, EventPayloads } from './DeductionsComponents'\nimport { DeductionsListContextual, DeductionFormContextual } from './DeductionsComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType } from '@/types/Helpers'\n\n// Helper function to create consistent reducers\nconst createReducer =\n (props: Partial<DeductionsContextInterface>) => (ctx: DeductionsContextInterface) => ({\n ...ctx,\n ...props,\n })\n\nexport const deductionsStateMachine = {\n includeDeductions: state(\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_YES,\n 'addDeduction',\n reduce(\n createReducer({\n component: DeductionFormContextual,\n currentDeductionId: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_NO,\n 'done',\n reduce((ctx: DeductionsContextInterface) => {\n // Emit the completion event to notify parent onboarding flow\n ctx.onEvent(componentEvents.EMPLOYEE_DEDUCTION_DONE)\n return ctx\n }),\n ),\n ),\n viewDeductions: state(\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_ADD,\n 'addDeduction',\n reduce(\n createReducer({\n component: DeductionFormContextual,\n currentDeductionId: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_EDIT,\n 'editDeduction',\n reduce(\n (\n ctx: DeductionsContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.EMPLOYEE_DEDUCTION_EDIT>,\n ) => ({\n ...ctx,\n component: DeductionFormContextual,\n currentDeductionId: ev.payload.uuid,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_DELETED,\n 'viewDeductions',\n reduce(\n createReducer({\n component: DeductionsListContextual,\n }),\n ),\n ),\n transition(componentEvents.EMPLOYEE_DEDUCTION_DONE, 'done'),\n ),\n addDeduction: state(\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_CREATED,\n 'viewDeductions',\n reduce(\n createReducer({\n component: DeductionsListContextual,\n currentDeductionId: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_CANCEL,\n 'viewDeductions',\n reduce(\n createReducer({\n component: DeductionsListContextual,\n currentDeductionId: null,\n }),\n ),\n ),\n ),\n editDeduction: state(\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_UPDATED,\n 'viewDeductions',\n reduce(\n createReducer({\n component: DeductionsListContextual,\n currentDeductionId: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_CANCEL,\n 'viewDeductions',\n reduce(\n createReducer({\n component: DeductionsListContextual,\n currentDeductionId: null,\n }),\n ),\n ),\n ),\n done: final(),\n}\n"],"names":["createReducer","props","ctx","deductionsStateMachine","state","transition","componentEvents","reduce","DeductionFormContextual","ev","DeductionsListContextual","final"],"mappings":";;;AAOA,MAAMA,IACJ,CAACC,MAA+C,CAACC,OAAqC;AAAA,EACpF,GAAGA;AAAA,EACH,GAAGD;AACL,IAEWE,IAAyB;AAAA,EACpC,mBAAmBC;AAAA,IACjBC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWQ;AAAA,UACX,oBAAoB;AAAA,QAAA,CACrB;AAAA,MAAA;AAAA,IACH;AAAA,IAEFH;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAO,CAACL,OAENA,EAAI,QAAQI,EAAgB,uBAAuB,GAC5CJ,EACR;AAAA,IAAA;AAAA,EACH;AAAA,EAEF,gBAAgBE;AAAA,IACdC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWQ;AAAA,UACX,oBAAoB;AAAA,QAAA,CACrB;AAAA,MAAA;AAAA,IACH;AAAA,IAEFH;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CACEL,GACAO,OACI;AAAA,UACJ,GAAGP;AAAA,UACH,WAAWM;AAAA,UACX,oBAAoBC,EAAG,QAAQ;AAAA,QAAA;AAAA,MACjC;AAAA,IACF;AAAA,IAEFJ;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWU;AAAA,QAAA,CACZ;AAAA,MAAA;AAAA,IACH;AAAA,IAEFL,EAAWC,EAAgB,yBAAyB,MAAM;AAAA,EAAA;AAAA,EAE5D,cAAcF;AAAA,IACZC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWU;AAAA,UACX,oBAAoB;AAAA,QAAA,CACrB;AAAA,MAAA;AAAA,IACH;AAAA,IAEFL;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWU;AAAA,UACX,oBAAoB;AAAA,QAAA,CACrB;AAAA,MAAA;AAAA,IACH;AAAA,EACF;AAAA,EAEF,eAAeN;AAAA,IACbC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWU;AAAA,UACX,oBAAoB;AAAA,QAAA,CACrB;AAAA,MAAA;AAAA,IACH;AAAA,IAEFL;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWU;AAAA,UACX,oBAAoB;AAAA,QAAA,CACrB;AAAA,MAAA;AAAA,IACH;AAAA,EACF;AAAA,EAEF,MAAMC,EAAA;AACR;"}
|
|
1
|
+
{"version":3,"file":"stateMachine.js","sources":["../../../../src/components/Employee/Deductions/stateMachine.ts"],"sourcesContent":["import { state, transition, reduce, state as final } from 'robot3'\nimport type { DeductionsContextInterface, EventPayloads } from './DeductionsComponents'\nimport { DeductionsListContextual, DeductionFormContextual } from './DeductionsComponents'\nimport { componentEvents } from '@/shared/constants'\nimport type { MachineEventType, MachineTransition } from '@/types/Helpers'\n\n// Helper function to create consistent reducers\nconst createReducer =\n (props: Partial<DeductionsContextInterface>) => (ctx: DeductionsContextInterface) => ({\n ...ctx,\n ...props,\n })\n\nexport const deductionsStateMachine = {\n includeDeductions: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_YES,\n 'addDeduction',\n reduce(\n createReducer({\n component: DeductionFormContextual,\n currentDeductionId: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_INCLUDE_NO,\n 'done',\n reduce((ctx: DeductionsContextInterface) => {\n // Emit the completion event to notify parent onboarding flow\n ctx.onEvent(componentEvents.EMPLOYEE_DEDUCTION_DONE)\n return ctx\n }),\n ),\n ),\n viewDeductions: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_ADD,\n 'addDeduction',\n reduce(\n createReducer({\n component: DeductionFormContextual,\n currentDeductionId: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_EDIT,\n 'editDeduction',\n reduce(\n (\n ctx: DeductionsContextInterface,\n ev: MachineEventType<EventPayloads, typeof componentEvents.EMPLOYEE_DEDUCTION_EDIT>,\n ) => ({\n ...ctx,\n component: DeductionFormContextual,\n currentDeductionId: ev.payload.uuid,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_DELETED,\n 'viewDeductions',\n reduce(\n createReducer({\n component: DeductionsListContextual,\n }),\n ),\n ),\n transition(componentEvents.EMPLOYEE_DEDUCTION_DONE, 'done'),\n ),\n addDeduction: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_CREATED,\n 'viewDeductions',\n reduce(\n createReducer({\n component: DeductionsListContextual,\n currentDeductionId: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_CANCEL,\n 'viewDeductions',\n reduce(\n createReducer({\n component: DeductionsListContextual,\n currentDeductionId: null,\n }),\n ),\n ),\n ),\n editDeduction: state<MachineTransition>(\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_UPDATED,\n 'viewDeductions',\n reduce(\n createReducer({\n component: DeductionsListContextual,\n currentDeductionId: null,\n }),\n ),\n ),\n transition(\n componentEvents.EMPLOYEE_DEDUCTION_CANCEL,\n 'viewDeductions',\n reduce(\n createReducer({\n component: DeductionsListContextual,\n currentDeductionId: null,\n }),\n ),\n ),\n ),\n done: final(),\n}\n"],"names":["createReducer","props","ctx","deductionsStateMachine","state","transition","componentEvents","reduce","DeductionFormContextual","ev","DeductionsListContextual","final"],"mappings":";;;AAOA,MAAMA,IACJ,CAACC,MAA+C,CAACC,OAAqC;AAAA,EACpF,GAAGA;AAAA,EACH,GAAGD;AACL,IAEWE,IAAyB;AAAA,EACpC,mBAAmBC;AAAA,IACjBC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWQ;AAAA,UACX,oBAAoB;AAAA,QAAA,CACrB;AAAA,MAAA;AAAA,IACH;AAAA,IAEFH;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC,EAAO,CAACL,OAENA,EAAI,QAAQI,EAAgB,uBAAuB,GAC5CJ,EACR;AAAA,IAAA;AAAA,EACH;AAAA,EAEF,gBAAgBE;AAAA,IACdC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWQ;AAAA,UACX,oBAAoB;AAAA,QAAA,CACrB;AAAA,MAAA;AAAA,IACH;AAAA,IAEFH;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACE,CACEL,GACAO,OACI;AAAA,UACJ,GAAGP;AAAA,UACH,WAAWM;AAAA,UACX,oBAAoBC,EAAG,QAAQ;AAAA,QAAA;AAAA,MACjC;AAAA,IACF;AAAA,IAEFJ;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWU;AAAA,QAAA,CACZ;AAAA,MAAA;AAAA,IACH;AAAA,IAEFL,EAAWC,EAAgB,yBAAyB,MAAM;AAAA,EAAA;AAAA,EAE5D,cAAcF;AAAA,IACZC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWU;AAAA,UACX,oBAAoB;AAAA,QAAA,CACrB;AAAA,MAAA;AAAA,IACH;AAAA,IAEFL;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWU;AAAA,UACX,oBAAoB;AAAA,QAAA,CACrB;AAAA,MAAA;AAAA,IACH;AAAA,EACF;AAAA,EAEF,eAAeN;AAAA,IACbC;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWU;AAAA,UACX,oBAAoB;AAAA,QAAA,CACrB;AAAA,MAAA;AAAA,IACH;AAAA,IAEFL;AAAA,MACEC,EAAgB;AAAA,MAChB;AAAA,MACAC;AAAA,QACEP,EAAc;AAAA,UACZ,WAAWU;AAAA,UACX,oBAAoB;AAAA,QAAA,CACrB;AAAA,MAAA;AAAA,IACH;AAAA,EACF;AAAA,EAEF,MAAMC,EAAA;AACR;"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as r } from "react-i18next";
|
|
3
|
-
import { useDocumentList as
|
|
3
|
+
import { useDocumentList as s } from "./useDocumentList.js";
|
|
4
4
|
import "classnames";
|
|
5
|
-
import "
|
|
6
|
-
import { ActionsLayout as s } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
5
|
+
import { ActionsLayout as m } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
6
|
import { useComponentContext as c } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
-
function
|
|
9
|
-
const { t } = r("Employee.DocumentSigner"), { handleContinue:
|
|
10
|
-
return /* @__PURE__ */ o(
|
|
7
|
+
function C() {
|
|
8
|
+
const { t: n } = r("Employee.DocumentSigner"), { handleContinue: t, hasSignedAllForms: i } = s(), e = c();
|
|
9
|
+
return /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(e.Button, { onClick: t, isLoading: !1, isDisabled: !i, children: n("continueCta") }) });
|
|
11
10
|
}
|
|
12
11
|
export {
|
|
13
|
-
|
|
12
|
+
C as Actions
|
|
14
13
|
};
|
|
15
14
|
//# sourceMappingURL=Actions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.DocumentSigner')\n const { handleContinue, hasSignedAllForms } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue} isLoading={false} isDisabled={!hasSignedAllForms}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","useTranslation","handleContinue","hasSignedAllForms","useDocumentList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Actions.js","sources":["../../../../../src/components/Employee/DocumentSigner/DocumentList/Actions.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { useDocumentList } from './useDocumentList'\nimport { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Actions() {\n const { t } = useTranslation('Employee.DocumentSigner')\n const { handleContinue, hasSignedAllForms } = useDocumentList()\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n <Components.Button onClick={handleContinue} isLoading={false} isDisabled={!hasSignedAllForms}>\n {t('continueCta')}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["Actions","t","useTranslation","handleContinue","hasSignedAllForms","useDocumentList","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;AAKO,SAASA,IAAU;AACxB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChD,EAAE,gBAAAC,GAAgB,mBAAAC,EAAA,IAAsBC,EAAA,GACxCC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACC,UAAA,gBAAAC,EAACH,EAAW,QAAX,EAAkB,SAASH,GAAgB,WAAW,IAAO,YAAY,CAACC,GACxE,UAAAH,EAAE,aAAa,GAClB,GACF;AAEJ;"}
|
|
@@ -9,13 +9,14 @@ 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
|
+
import "react-i18next";
|
|
12
13
|
import "classnames";
|
|
13
|
-
function
|
|
14
|
+
function N(e) {
|
|
14
15
|
return /* @__PURE__ */ o(F, { ...e, children: /* @__PURE__ */ o(O, { ...e }) });
|
|
15
16
|
}
|
|
16
|
-
function O({ employeeId: e, className: s, children:
|
|
17
|
+
function O({ employeeId: e, className: s, children: t }) {
|
|
17
18
|
S("Employee.DocumentSigner");
|
|
18
|
-
const { onEvent:
|
|
19
|
+
const { onEvent: n } = L(), { data: u, error: c } = f({ employeeId: e }), i = u.formList, p = i.every((r) => !r.requiresSigning);
|
|
19
20
|
return /* @__PURE__ */ o("section", { className: s, children: /* @__PURE__ */ o(
|
|
20
21
|
h,
|
|
21
22
|
{
|
|
@@ -23,14 +24,14 @@ function O({ employeeId: e, className: s, children: n }) {
|
|
|
23
24
|
employeeForms: i,
|
|
24
25
|
hasSignedAllForms: p,
|
|
25
26
|
handleContinue: () => {
|
|
26
|
-
|
|
27
|
+
n(m.EMPLOYEE_FORMS_DONE);
|
|
27
28
|
},
|
|
28
29
|
handleRequestFormToSign: (r) => {
|
|
29
|
-
|
|
30
|
+
n(m.EMPLOYEE_VIEW_FORM_TO_SIGN, { uuid: r.uuid });
|
|
30
31
|
},
|
|
31
32
|
documentListError: c
|
|
32
33
|
},
|
|
33
|
-
children:
|
|
34
|
+
children: t || /* @__PURE__ */ l(g, { flexDirection: "column", children: [
|
|
34
35
|
/* @__PURE__ */ o(d, {}),
|
|
35
36
|
/* @__PURE__ */ o(E, {}),
|
|
36
37
|
/* @__PURE__ */ o(a, {})
|
|
@@ -39,6 +40,6 @@ function O({ employeeId: e, className: s, children: n }) {
|
|
|
39
40
|
) });
|
|
40
41
|
}
|
|
41
42
|
export {
|
|
42
|
-
|
|
43
|
+
N as DocumentList
|
|
43
44
|
};
|
|
44
45
|
//# 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;"}
|
|
@@ -3,9 +3,8 @@ 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
5
|
import "classnames";
|
|
6
|
-
import "../../../../shared/constants.js";
|
|
7
6
|
import { DocumentList as u } from "../../../Common/DocumentList/DocumentList.js";
|
|
8
|
-
function
|
|
7
|
+
function b() {
|
|
9
8
|
const { employeeForms: i, handleRequestFormToSign: n, documentListError: r } = s(), { t: e } = m("Employee.DocumentSigner");
|
|
10
9
|
return /* @__PURE__ */ o("section", { style: { width: "100%" }, children: /* @__PURE__ */ o(l, { flexDirection: "column", gap: 32, children: /* @__PURE__ */ o(
|
|
11
10
|
u,
|
|
@@ -34,6 +33,6 @@ function f() {
|
|
|
34
33
|
) }) });
|
|
35
34
|
}
|
|
36
35
|
export {
|
|
37
|
-
|
|
36
|
+
b as List
|
|
38
37
|
};
|
|
39
38
|
//# 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;"}
|
|
@@ -12,11 +12,10 @@ import "classnames";
|
|
|
12
12
|
import "dompurify";
|
|
13
13
|
import "../../../../contexts/LocaleProvider/useLocale.js";
|
|
14
14
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
15
|
-
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
16
15
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
17
|
-
const [
|
|
16
|
+
const [a, f] = t("DocumentListContext");
|
|
18
17
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
f as DocumentListProvider,
|
|
19
|
+
a as useDocumentList
|
|
21
20
|
};
|
|
22
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;"}
|
|
@@ -12,16 +12,17 @@ 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 "react-i18next";
|
|
15
16
|
import "classnames";
|
|
16
17
|
import { SignatureForm as R } from "../../../Common/SignatureForm/SignatureForm.js";
|
|
17
|
-
function
|
|
18
|
+
function X(r) {
|
|
18
19
|
return /* @__PURE__ */ o(A, { ...r, children: /* @__PURE__ */ o(j, { ...r }) });
|
|
19
20
|
}
|
|
20
|
-
function j({ employeeId: r, formId: s, className: u, children:
|
|
21
|
+
function j({ employeeId: r, formId: s, className: u, children: n }) {
|
|
21
22
|
G("Employee.DocumentSigner");
|
|
22
|
-
const { onEvent: e, baseSubmitHandler: a } = C(), { data: c } = x({ employeeId: r, formId: s }),
|
|
23
|
+
const { onEvent: e, baseSubmitHandler: a } = C(), { data: c } = x({ employeeId: r, formId: s }), t = c.form, {
|
|
23
24
|
data: { formPdf: f }
|
|
24
|
-
} = h({ employeeId: r, formId:
|
|
25
|
+
} = h({ employeeId: r, formId: t.uuid }), d = f.documentUrl, { mutateAsync: p, isPending: l } = P();
|
|
25
26
|
return /* @__PURE__ */ o("section", { className: u, children: /* @__PURE__ */ o(
|
|
26
27
|
w,
|
|
27
28
|
{
|
|
@@ -30,16 +31,16 @@ function j({ employeeId: r, formId: s, className: u, children: t }) {
|
|
|
30
31
|
handleBack: () => {
|
|
31
32
|
e(i.CANCEL);
|
|
32
33
|
},
|
|
33
|
-
form:
|
|
34
|
+
form: t,
|
|
34
35
|
isPending: l
|
|
35
36
|
},
|
|
36
37
|
children: /* @__PURE__ */ o(R, { onSubmit: async (g) => {
|
|
37
38
|
await a(g, async (m) => {
|
|
38
|
-
if (
|
|
39
|
+
if (t.uuid) {
|
|
39
40
|
const { form: S } = await p({
|
|
40
41
|
request: {
|
|
41
42
|
employeeId: r,
|
|
42
|
-
formId:
|
|
43
|
+
formId: t.uuid,
|
|
43
44
|
requestBody: {
|
|
44
45
|
signatureText: m.signature,
|
|
45
46
|
agree: m.confirmSignature
|
|
@@ -49,7 +50,7 @@ function j({ employeeId: r, formId: s, className: u, children: t }) {
|
|
|
49
50
|
e(i.EMPLOYEE_SIGN_FORM, S);
|
|
50
51
|
}
|
|
51
52
|
});
|
|
52
|
-
}, children: /* @__PURE__ */ o(M, { flexDirection: "column", children:
|
|
53
|
+
}, children: /* @__PURE__ */ o(M, { flexDirection: "column", children: n || /* @__PURE__ */ F(E, { children: [
|
|
53
54
|
/* @__PURE__ */ o(v, {}),
|
|
54
55
|
/* @__PURE__ */ o(B, {}),
|
|
55
56
|
/* @__PURE__ */ o(b, {}),
|
|
@@ -59,6 +60,6 @@ function j({ employeeId: r, formId: s, className: u, children: t }) {
|
|
|
59
60
|
) });
|
|
60
61
|
}
|
|
61
62
|
export {
|
|
62
|
-
|
|
63
|
+
X as SignatureForm
|
|
63
64
|
};
|
|
64
65
|
//# 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;"}
|
|
@@ -12,11 +12,10 @@ import "classnames";
|
|
|
12
12
|
import "dompurify";
|
|
13
13
|
import "../../../../contexts/LocaleProvider/useLocale.js";
|
|
14
14
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
15
|
-
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
16
15
|
import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
|
|
17
|
-
const [
|
|
16
|
+
const [d, s] = o("SignatureFormContext");
|
|
18
17
|
export {
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
s as SignatureFormProvider,
|
|
19
|
+
d as useSignatureForm
|
|
21
20
|
};
|
|
22
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,5 +1,5 @@
|
|
|
1
1
|
export declare const documentSignerMachine: {
|
|
2
|
-
index: import('robot3').MachineState<
|
|
3
|
-
signatureForm: import('robot3').MachineState<
|
|
4
|
-
done: import('robot3').MachineState<
|
|
2
|
+
index: import('robot3').MachineState<any>;
|
|
3
|
+
signatureForm: import('robot3').MachineState<any>;
|
|
4
|
+
done: import('robot3').MachineState<any>;
|
|
5
5
|
};
|
|
@@ -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,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
|
+
{"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, MachineTransition } from '@/types/Helpers'\n\nexport const documentSignerMachine = {\n index: state<MachineTransition>(\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<MachineTransition>(\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;"}
|
|
@@ -2,14 +2,13 @@ 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
4
|
import "classnames";
|
|
5
|
-
import "../../../shared/constants.js";
|
|
6
5
|
import { ActionsLayout as s } from "../../Common/ActionsLayout/ActionsLayout.js";
|
|
7
6
|
import { useComponentContext as p } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
-
function
|
|
7
|
+
function C() {
|
|
9
8
|
const { t } = r("Employee.EmployeeList"), { handleSkip: n, employees: e } = m(), i = p();
|
|
10
9
|
return e.length === 0 ? null : /* @__PURE__ */ o(s, { children: /* @__PURE__ */ o(i.Button, { onClick: n, isLoading: !1, children: t("continueCta") }) });
|
|
11
10
|
}
|
|
12
11
|
export {
|
|
13
|
-
|
|
12
|
+
C as Actions
|
|
14
13
|
};
|
|
15
14
|
//# 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;"}
|
|
@@ -9,10 +9,9 @@ import { Actions as k } from "./Actions.js";
|
|
|
9
9
|
import { BaseComponent as q } from "../../Base/Base.js";
|
|
10
10
|
import { useBase as j } from "../../Base/useBase.js";
|
|
11
11
|
import { Flex as H } from "../../Common/Flex/Flex.js";
|
|
12
|
-
import "classnames";
|
|
13
|
-
import { componentEvents as s, EmployeeOnboardingStatus as E } from "../../../shared/constants.js";
|
|
14
12
|
import { Loading as V } from "../../Common/Loading/Loading.js";
|
|
15
13
|
import { useI18n as z, useComponentDictionary as J } from "../../../i18n/I18n.js";
|
|
14
|
+
import { componentEvents as s, EmployeeOnboardingStatus as E } from "../../../shared/constants.js";
|
|
16
15
|
import { Head as K } from "./Head.js";
|
|
17
16
|
import { List as Q } from "./List.js";
|
|
18
17
|
import { useFlow as X } from "../../Flow/useFlow.js";
|
|
@@ -106,12 +105,12 @@ function $({ companyId: n, className: m, children: l, dictionary: h }) {
|
|
|
106
105
|
}
|
|
107
106
|
) });
|
|
108
107
|
}
|
|
109
|
-
const
|
|
108
|
+
const Oe = () => {
|
|
110
109
|
const { companyId: n, onEvent: m } = X();
|
|
111
110
|
return /* @__PURE__ */ o(Z, { companyId: n, onEvent: m });
|
|
112
111
|
};
|
|
113
112
|
export {
|
|
114
113
|
Z as EmployeeList,
|
|
115
|
-
|
|
114
|
+
Oe as EmployeeListContextual
|
|
116
115
|
};
|
|
117
116
|
//# 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 { useEmployeesList } 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 { keepPreviousData } from '@tanstack/react-query'\nimport type { OnboardingContextInterface } from '../OnboardingFlow/OnboardingFlowComponents'\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, Loading } 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, fetchStatus, isFetching } = useEmployeesList(\n {\n companyId,\n page: currentPage,\n per: itemsPerPage,\n },\n { placeholderData: keepPreviousData },\n )\n\n const { mutateAsync: deleteEmployeeMutation } = useEmployeesDeleteMutation()\n const { mutateAsync: updateEmployeeOnboardingStatusMutation } =\n useEmployeesUpdateOnboardingStatusMutation()\n\n if (fetchStatus === 'fetching' && !data) {\n return <Loading />\n }\n const { httpMeta, showEmployees: employeeList } = data!\n const employees = employeeList!\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 isFetching,\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","fetchStatus","isFetching","useEmployeesList","keepPreviousData","deleteEmployeeMutation","useEmployeesDeleteMutation","updateEmployeeOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","Loading","httpMeta","employeeList","employees","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":";;;;;;;;;;;;;;;;;;AA2BO,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,GAAM,aAAAC,GAAa,YAAAC,EAAA,IAAeC;AAAA,IACxC;AAAA,MACE,WAAAjB;AAAA,MACA,MAAMS;AAAA,MACN,KAAKG;AAAA,IAAA;AAAA,IAEP,EAAE,iBAAiBM,EAAA;AAAA,EAAiB,GAGhC,EAAE,aAAaC,EAAA,IAA2BC,EAAA,GAC1C,EAAE,aAAaC,EAAA,IACnBC,EAAA;AAEF,MAAIP,MAAgB,cAAc,CAACD;AACjC,6BAAQS,GAAA,EAAQ;AAElB,QAAM,EAAE,UAAAC,GAAU,eAAeC,EAAA,IAAiBX,GAC5CY,IAAYD,GAEZE,IAAa,OAAOH,EAAS,SAAS,QAAQ,IAAI,eAAe,KAAK,CAAC,GAEvEI,IAA2B,CAACC,MAAqB;AACrD,IAAAhB,EAAgBgB,CAAQ;AAAA,EAC1B,GACMC,IAAkB,MAAM;AAC5B,IAAApB,EAAe,CAAC;AAAA,EAClB,GACMqB,IAAqB,MAAM;AAC/B,IAAArB,EAAe,OAAY,KAAK,IAAIsB,IAAW,GAAG,CAAC,CAAC;AAAA,EACtD,GACMC,IAAiB,MAAM;AAC3B,IAAAvB,EAAe,OAAY,KAAK,IAAIsB,IAAW,GAAGL,CAAU,CAAC;AAAA,EAC/D,GACMO,IAAiB,MAAM;AAC3B,IAAAxB,EAAeiB,CAAU;AAAA,EAC3B,GACMQ,IAAe,OAAOC,MAAiB;AAC3C,UAAM7B,EAAkB6B,GAAM,OAAMC,MAAW;AAC7C,YAAMlB,EAAuB;AAAA,QAC3B,SAAS,EAAE,YAAYkB,EAAA;AAAA,MAAQ,CAChC,GAED/B,EAAQgC,EAAgB,kBAAkB,EAAE,YAAYD,GAAS;AAAA,IACnE,CAAC;AAAA,EACH,GAEME,IAAe,OAAOzB,MAAiB;AAC3C,UAAMP,EAAkBO,GAAM,OAAM0B,MAAc;AAChD,YAAMC,EAAuB;AAAA,QAC3B,YAAAD;AAAA,QACA,QAAQE,EAAyB;AAAA,MAAA,CAClC,GACDpC,EAAQgC,EAAgB,iBAAiB;AAAA,QACvC,YAAAE;AAAA,QACA,kBAAkBE,EAAyB;AAAA,MAAA,CAC5C;AAAA,IACH,CAAC;AAAA,EACH,GAEMC,IAA6B,OAAO7B,MAAiB;AACzD,UAAMP,EAAkBO,GAAM,OAAM0B,MAAc;AAChD,YAAMC,EAAuB;AAAA,QAC3B,YAAAD;AAAA,QACA,QAAQE,EAAyB;AAAA,MAAA,CAClC;AAAA,IACH,CAAC;AAAA,EACH,GACMD,IAAyB,OAAO3B,MAA2D;AAC/F,UAAMP,EAAkBO,GAAM,OAAO,EAAE,YAAA0B,GAAY,QAAAI,QAAa;AAC9D,YAAM,EAAE,0BAA0BC,EAAA,IAChC,MAAMxB,EAAuC;AAAA,QAC3C,SAAS,EAAE,YAAAmB,GAAY,aAAa,EAAE,kBAAkBI,IAAO;AAAA,MAAE,CAClE;AACH,MAAAtC,EAAQgC,EAAgB,oCAAoCO,CAAY;AAAA,IAC1E,CAAC;AAAA,EACH;AAWA,SACE,gBAAAhD,EAAC,aAAQ,WAAAI,GACP,UAAA,gBAAAJ;AAAA,IAACiD;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,YAPW,CAACV,GAAcW,MAAwC;AACxE,UAAAzC,EAAQgC,EAAgB,iBAAiB,EAAE,YAAYF,GAAM,kBAAAW,GAAkB;AAAA,QACjF;AAAA,QAMQ,WAfU,MAAM;AACtB,UAAAzC,EAAQgC,EAAgB,eAAe;AAAA,QACzC;AAAA,QAcQ,cAAAC;AAAA,QACA,cAAAJ;AAAA,QACA,WAAAT;AAAA,QACA,aAAAjB;AAAA,QACA,YAAAkB;AAAA,QACA,iBAAAG;AAAA,QACA,oBAAAC;AAAA,QACA,gBAAAE;AAAA,QACA,gBAAAC;AAAA,QACA,4BAAAS;AAAA,QACA,0BAAAf;AAAA,QACA,YAxBW,MAAM;AACvB,UAAAtB,EAAQgC,EAAgB,wBAAwB;AAAA,QAClD;AAAA,QAuBQ,YAAAtB;AAAA,MAAA;AAAA,MAGD,UAAAd,KAGC,gBAAA8C,EAACC,GAAA,EAAK,eAAc,UAClB,UAAA;AAAA,QAAA,gBAAApD,EAACqD,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,WAAArD,GAAW,SAAAM,EAAA,IAAYgD,EAAA;AAC/B,SAAO,gBAAAzD,EAACF,GAAA,EAAa,WAAAK,GAAsB,SAAAM,EAAA,CAAkB;AAC/D;"}
|
|
1
|
+
{"version":3,"file":"EmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/EmployeeList.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useEmployeesList } 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 { keepPreviousData } from '@tanstack/react-query'\nimport type { OnboardingContextInterface } from '../OnboardingFlow/OnboardingFlowComponents'\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, Loading } 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, fetchStatus, isFetching } = useEmployeesList(\n {\n companyId,\n page: currentPage,\n per: itemsPerPage,\n },\n { placeholderData: keepPreviousData },\n )\n\n const { mutateAsync: deleteEmployeeMutation } = useEmployeesDeleteMutation()\n const { mutateAsync: updateEmployeeOnboardingStatusMutation } =\n useEmployeesUpdateOnboardingStatusMutation()\n\n if (fetchStatus === 'fetching' && !data) {\n return <Loading />\n }\n const { httpMeta, showEmployees: employeeList } = data!\n const employees = employeeList!\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 isFetching,\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","fetchStatus","isFetching","useEmployeesList","keepPreviousData","deleteEmployeeMutation","useEmployeesDeleteMutation","updateEmployeeOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","Loading","httpMeta","employeeList","employees","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":"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"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e } 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
4
|
import "classnames";
|
|
5
|
-
import "../../../shared/constants.js";
|
|
6
5
|
import { useComponentContext as m } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
-
const
|
|
8
|
-
const { t
|
|
9
|
-
return /* @__PURE__ */
|
|
6
|
+
const c = () => {
|
|
7
|
+
const { t } = n("Employee.EmployeeList"), o = m();
|
|
8
|
+
return /* @__PURE__ */ e(r, { justifyContent: "space-between", alignItems: "center", children: /* @__PURE__ */ e(o.Heading, { as: "h2", children: t("title") }) });
|
|
10
9
|
};
|
|
11
10
|
export {
|
|
12
|
-
|
|
11
|
+
c as Head
|
|
13
12
|
};
|
|
14
13
|
//# sourceMappingURL=Head.js.map
|