@gusto/embedded-react-sdk 0.37.0 → 0.38.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/README.md +3 -0
- package/dist/UNSTABLE_Hooks.d.ts +1 -1
- package/dist/UNSTABLE_Hooks.js +65 -47
- package/dist/UNSTABLE_Hooks.js.map +1 -1
- package/dist/assets/icons/filter-funnel.svg.js +10 -0
- package/dist/assets/icons/filter-funnel.svg.js.map +1 -0
- package/dist/assets/icons/percent-circle.svg.js +10 -0
- package/dist/assets/icons/percent-circle.svg.js.map +1 -0
- package/dist/assets/icons/plus-circle.svg.js +1 -1
- package/dist/assets/icons/plus-circle.svg.js.map +1 -1
- package/dist/components/Base/Base.js +2 -3
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/createCompoundContext.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.d.ts +5 -3
- package/dist/components/Common/DataView/DataCards/DataCards.js +58 -39
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +9 -7
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.d.ts +4 -2
- package/dist/components/Common/DataView/DataTable/DataTable.js +95 -76
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataView.d.ts +4 -3
- package/dist/components/Common/DataView/DataView.js +24 -22
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Common/DataView/useDataView.d.ts +33 -6
- package/dist/components/Common/DataView/useDataView.js +23 -20
- package/dist/components/Common/DataView/useDataView.js.map +1 -1
- package/dist/components/Common/DataView/useSelectionState.d.ts +5 -0
- package/dist/components/Common/DataView/useSelectionState.js +8 -0
- package/dist/components/Common/DataView/useSelectionState.js.map +1 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.d.ts +19 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +94 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js +14 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js.map +1 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.d.ts +2 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayoutTypes.d.ts +40 -0
- package/dist/components/Common/DetailViewLayout/index.d.ts +3 -0
- package/dist/components/Common/EmptyData/EmptyData.d.ts +2 -1
- package/dist/components/Common/EmptyData/EmptyData.js +15 -13
- package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js +6 -4
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js +26 -24
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.d.ts +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js +32 -30
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.d.ts +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js +36 -34
- 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 +40 -38
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
- package/dist/components/Common/Fields/FileInputField/FileInputField.js +24 -22
- package/dist/components/Common/Fields/FileInputField/FileInputField.js.map +1 -1
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js +24 -22
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js +27 -25
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js +34 -32
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.d.ts +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.js +34 -32
- package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
- package/dist/components/Common/Fields/SwitchField/SwitchField.js +26 -24
- package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js +24 -22
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js.map +1 -1
- package/dist/components/Common/Fields/TextInputField/TextInputField.js +26 -24
- package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useField.d.ts +3 -2
- package/dist/components/Common/Fields/hooks/useField.js +37 -33
- package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.d.ts +2 -2
- package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.js +2 -2
- package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +21 -20
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +5 -0
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.d.ts +1 -1
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js +10 -8
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableList.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +10 -15
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +9 -12
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +14 -18
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Box/Box.d.ts +1 -1
- package/dist/components/Common/UI/Box/Box.js +9 -8
- package/dist/components/Common/UI/Box/Box.js.map +1 -1
- package/dist/components/Common/UI/Box/Box.module.scss.js +12 -8
- package/dist/components/Common/UI/Box/Box.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Box/BoxTypes.d.ts +2 -9
- package/dist/components/Common/UI/BoxHeader/BoxHeader.d.ts +2 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeader.js +23 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeader.js.map +1 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeader.module.scss.js +8 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeader.module.scss.js.map +1 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.d.ts +10 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.js +7 -0
- package/dist/components/Common/UI/BoxHeader/BoxHeaderTypes.js.map +1 -0
- package/dist/components/Common/UI/BoxHeader/index.d.ts +2 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +17 -17
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +5 -0
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js.map +1 -1
- package/dist/components/Common/UI/Button/Button.js +33 -29
- package/dist/components/Common/UI/Button/Button.js.map +1 -1
- package/dist/components/Common/UI/Button/Button.module.scss.js +5 -3
- package/dist/components/Common/UI/Button/Button.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Button/ButtonTypes.d.ts +4 -0
- package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -1
- package/dist/components/Common/UI/Checkbox/Checkbox.js +60 -49
- package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +10 -6
- package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.js +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.js +88 -69
- package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +13 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.d.ts +2 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js +72 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js.map +1 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.module.scss.js +30 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.module.scss.js.map +1 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePickerTypes.d.ts +14 -0
- package/dist/components/Common/UI/DateRangePicker/index.d.ts +2 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js +19 -12
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js.map +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +6 -4
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js.map +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.d.ts +6 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js +4 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js.map +1 -1
- package/dist/components/Common/UI/Heading/Heading.d.ts +1 -1
- package/dist/components/Common/UI/Heading/Heading.js +11 -9
- package/dist/components/Common/UI/Heading/Heading.js.map +1 -1
- package/dist/components/Common/UI/Heading/Heading.module.scss.js +15 -15
- package/dist/components/Common/UI/Heading/HeadingTypes.d.ts +1 -1
- package/dist/components/Common/UI/Input/Input.js.map +1 -1
- package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +94 -80
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/Select/Select.js +22 -22
- package/dist/components/Common/UI/Select/Select.js.map +1 -1
- package/dist/components/Common/UI/Select/SelectTypes.d.ts +1 -1
- package/dist/components/Common/UI/Table/Table.js +12 -12
- 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 +3 -3
- package/dist/components/Common/UI/Table/TableTypes.js +3 -3
- package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
- package/dist/components/Common/UI/TextArea/TextArea.js +1 -1
- package/dist/components/Common/UI/TextArea/TextArea.js.map +1 -1
- package/dist/components/Common/UI/TextInput/TextInput.js +13 -13
- package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
- package/dist/components/Common/index.d.ts +2 -0
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -11
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +2 -5
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +6 -9
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
- 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 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +13 -14
- 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/TitleSelect.js +2 -5
- package/dist/components/Company/AssignSignatory/TitleSelect.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 +8 -10
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -13
- 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 -10
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -10
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -8
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -4
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -15
- 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 +11 -15
- 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/FederalTaxes/Actions.js +7 -9
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +22 -26
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +7 -9
- 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 +7 -9
- 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 -7
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +8 -10
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +5 -7
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +15 -19
- 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 -8
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +15 -16
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -10
- 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/OnboardingOverview/Completed.js +12 -15
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +9 -12
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +6 -10
- 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 +94 -91
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +16 -18
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +47 -39
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +11 -14
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +19 -21
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +6 -5
- 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 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +33 -33
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -7
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js +14 -14
- package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.d.ts +2 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +3 -7
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +2 -4
- 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 +33 -34
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -3
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +10 -13
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -5
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +135 -126
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +72 -71
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +18 -21
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +83 -84
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +17 -19
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +10 -10
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +67 -79
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js +10 -12
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +47 -49
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +63 -66
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js +4 -4
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
- package/dist/components/Contractor/Profile/useContractorProfile.js +31 -30
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.d.ts +2 -2
- package/dist/components/Contractor/Submit/Submit.js +44 -46
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +12 -14
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Compensation.js +80 -77
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +27 -28
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +22 -23
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Dashboard/BasicDetailsView.d.ts +13 -0
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +107 -0
- package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -0
- package/dist/components/Employee/Dashboard/Dashboard.d.ts +5 -0
- package/dist/components/Employee/Dashboard/Dashboard.js +146 -0
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +5 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.js +12 -0
- package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -0
- package/dist/components/Employee/Dashboard/DashboardFlow.d.ts +5 -0
- package/dist/components/Employee/Dashboard/DashboardFlow.js +25 -0
- package/dist/components/Employee/Dashboard/DashboardFlow.js.map +1 -0
- package/dist/components/Employee/Dashboard/DocumentsView.d.ts +7 -0
- package/dist/components/Employee/Dashboard/DocumentsView.js +51 -0
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -0
- package/dist/components/Employee/Dashboard/JobAndPayView.d.ts +22 -0
- package/dist/components/Employee/Dashboard/JobAndPayView.js +211 -0
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -0
- package/dist/components/Employee/Dashboard/TaxesView.d.ts +13 -0
- package/dist/components/Employee/Dashboard/TaxesView.js +97 -0
- package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +3 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +8 -0
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -0
- package/dist/components/Employee/Dashboard/hooks/index.d.ts +9 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.d.ts +20 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js +29 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeBasicDetails.js.map +1 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +30 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +52 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.d.ts +16 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js +22 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeForms.js.map +1 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.d.ts +20 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js +24 -0
- package/dist/components/Employee/Dashboard/hooks/useEmployeeTaxes.js.map +1 -0
- package/dist/components/Employee/Dashboard/index.d.ts +14 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +57 -53
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +17 -18
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +11 -12
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +18 -19
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +6 -7
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -8
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +10 -14
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -6
- 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/EmploymentEligibility/EmploymentEligibility.js +22 -22
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibility.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +24 -26
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +12 -14
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
- 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/EmployeeDocuments/EmployeeDocumentsPresentation.js +6 -9
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.d.ts +3 -7
- package/dist/components/Employee/EmployeeList/EmployeeList.js +45 -95
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeListView.d.ts +15 -0
- package/dist/components/Employee/EmployeeList/EmployeeListView.js +130 -0
- package/dist/components/Employee/EmployeeList/EmployeeListView.js.map +1 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeList.d.ts +9 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js +81 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js.map +1 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.d.ts +17 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js +193 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js.map +1 -0
- package/dist/components/Employee/EmployeeList/index.d.ts +3 -0
- package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +36 -23
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +114 -19
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +7 -9
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +10 -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 +14 -15
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +4 -4
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +14 -8
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +10 -11
- 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 +6 -8
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -8
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +12 -13
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +44 -43
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -10
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +9 -10
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +7 -9
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +14 -16
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +9 -10
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +10 -12
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +3 -4
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +8 -10
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +8 -10
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +10 -12
- 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/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +48 -48
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +14 -17
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +37 -33
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.d.ts +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +57 -45
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +8 -11
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
- package/dist/components/Employee/index.d.ts +3 -0
- package/dist/components/Employee/index.js +38 -34
- package/dist/components/Employee/index.js.map +1 -1
- package/dist/components/Flow/Flow.js +20 -23
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +16 -18
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +18 -20
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +3 -4
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +8 -10
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlow.js +14 -14
- package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.d.ts +2 -2
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +21 -20
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +2 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +57 -55
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +8 -11
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.d.ts +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +85 -74
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.module.scss.js +7 -7
- package/dist/components/Payroll/GrossUpModal/GrossUpModalTypes.d.ts +0 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js +24 -18
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +2 -0
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +28 -22
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +92 -84
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +30 -32
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +17 -24
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +21 -21
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +3 -3
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +13 -13
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -8
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +12 -13
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +11 -14
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +194 -190
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +69 -69
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +4 -3
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +102 -76
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +2 -2
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +235 -238
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.module.scss.js +7 -7
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.d.ts +11 -0
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +63 -30
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +2 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +43 -41
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/index.d.ts +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.d.ts +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +62 -51
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js +13 -6
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +22 -20
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js +35 -14
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +80 -69
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +0 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +59 -66
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +5 -4
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +97 -105
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +98 -64
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +11 -3
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +225 -123
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +10 -8
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +106 -105
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +222 -213
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +7 -10
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +103 -114
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +16 -18
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +2 -4
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +11 -13
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -5
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlow.d.ts +1 -1
- package/dist/components/Payroll/Transition/TransitionFlow.js +29 -27
- package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +1 -0
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +67 -63
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +12 -14
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js +5 -5
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js +13 -13
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlert.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js +44 -55
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
- package/dist/components/Payroll/helpers.d.ts +6 -1
- package/dist/components/Payroll/helpers.js +81 -74
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.d.ts +2 -2
- package/dist/components/Payroll/usePreparedPayrollData.js +7 -8
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js +6 -9
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.d.ts +1 -2
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.d.ts +48 -0
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js +94 -0
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +24 -23
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js +22 -17
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +31 -30
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +27 -26
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js +28 -27
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +24 -23
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.d.ts +5 -4
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +28 -27
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/index.d.ts +5 -5
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.d.ts +3 -0
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.js +15 -0
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.d.ts +4 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js +14 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.d.ts +17 -0
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js +21 -0
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js +8 -8
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.d.ts +22 -0
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js +11 -0
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/withOptions.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/withOptions.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +3 -5
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.d.ts +48 -42
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js +48 -79
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/index.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +13 -15
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js +109 -110
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +16 -18
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +13 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js +31 -25
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.d.ts +5 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js +27 -27
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/index.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +8 -22
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js +81 -84
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.js +172 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.module.scss.js +14 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.module.scss.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.d.ts +23 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.js +37 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/index.d.ts +7 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.d.ts +55 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.js +54 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.d.ts +69 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.js +180 -0
- package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/usePayScheduleForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.js +69 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/SignCompanyForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/fields.d.ts +9 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/fields.js +14 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/fields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/index.d.ts +7 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/signCompanyFormSchema.d.ts +25 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/signCompanyFormSchema.js +24 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/signCompanyFormSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.d.ts +57 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.js +101 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignCompanyForm/useSignCompanyForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.js +71 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.d.ts +5 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.js +179 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/SignEmployeeI9Form.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/fields.d.ts +53 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/fields.js +164 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/fields.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/index.d.ts +9 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/signEmployeeFormSchema.d.ts +150 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/signEmployeeFormSchema.js +152 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.d.ts +151 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.js +172 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +15 -17
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/index.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.d.ts +9 -10
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js +85 -83
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.d.ts +8 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js +18 -17
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/index.d.ts +10 -7
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +46 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +46 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +49 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js +55 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionFormTypes.d.ts +25 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +73 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +122 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js +8 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListTypes.d.ts +17 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js +46 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.d.ts +7 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js +29 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js +66 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelectorTypes.d.ts +6 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.js +25 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +29 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +103 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/index.d.ts +3 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.d.ts +14 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js +290 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.test.d.ts +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.d.ts +8 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +71 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js +12 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.module.scss.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +206 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +20 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/index.d.ts +6 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js +35 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js +35 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js +35 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js +35 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/index.d.ts +25 -0
- package/dist/components/UNSTABLE_TimeOff/index.js +27 -0
- package/dist/components/UNSTABLE_TimeOff/index.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTableTypes.d.ts +26 -0
- package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/index.d.ts +4 -0
- package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.d.ts +30 -0
- package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.js +97 -0
- package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/shared/holidayHelpers.test.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +66 -62
- 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 +10 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +28 -21
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +4 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +10 -12
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.d.ts +10 -2
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
- package/dist/contexts/ThemeProvider/theme.d.ts +2 -0
- package/dist/contexts/ThemeProvider/theme.js +4 -2
- package/dist/contexts/ThemeProvider/theme.js.map +1 -1
- package/dist/contexts/ThemeProvider/useTheme.js.map +1 -1
- package/dist/helpers/breadcrumbHelpers.d.ts +14 -0
- package/dist/helpers/breadcrumbHelpers.js +35 -26
- package/dist/helpers/breadcrumbHelpers.js.map +1 -1
- package/dist/helpers/buildQueryErrorHandling.d.ts +22 -0
- package/dist/helpers/buildQueryErrorHandling.js +11 -0
- package/dist/helpers/buildQueryErrorHandling.js.map +1 -0
- package/dist/{components/UNSTABLE_Hooks → helpers}/collectErrors.d.ts +1 -1
- package/dist/{components/UNSTABLE_Hooks → helpers}/collectErrors.js +1 -1
- package/dist/helpers/collectErrors.js.map +1 -0
- package/dist/helpers/dateFormatting.d.ts +2 -0
- package/dist/helpers/dateFormatting.js +38 -33
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/helpers/formattedStrings.js +40 -33
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/hooks/useCompanyPaymentSpeed.d.ts +6 -0
- package/dist/hooks/useCompanyPaymentSpeed.js +19 -0
- package/dist/hooks/useCompanyPaymentSpeed.js.map +1 -0
- package/dist/hooks/useCompanyPaymentSpeed.test.d.ts +1 -0
- package/dist/hooks/useDateRangeFilter/useDateRangeFilter.d.ts +20 -0
- package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js +38 -0
- package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js.map +1 -0
- package/dist/hooks/useDateRangeFilter/useDateRangeFilter.test.d.ts +1 -0
- package/dist/{components/UNSTABLE_Hooks → hooks}/useErrorHandling.d.ts +2 -2
- package/dist/{components/UNSTABLE_Hooks → hooks}/useErrorHandling.js +1 -1
- package/dist/hooks/useErrorHandling.js.map +1 -0
- package/dist/hooks/useErrorHandling.test.d.ts +1 -0
- package/dist/hooks/usePagination/usePagination.d.ts +2 -0
- package/dist/hooks/usePagination/usePagination.js +32 -29
- package/dist/hooks/usePagination/usePagination.js.map +1 -1
- package/dist/i18n/I18n.js +21 -21
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +6 -6
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +24 -0
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +32 -0
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +28 -0
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +28 -0
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +38 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +52 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffRequests.json.js +21 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffRequests.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +36 -34
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
- package/dist/i18n/en/Employee.Dashboard.json.js +26 -0
- package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -0
- package/dist/i18n/en/Employee.EmployeeList.json.js +22 -20
- package/dist/i18n/en/Employee.EmployeeList.json.js.map +1 -1
- package/dist/i18n/en/Employee.ManagementEmployeeList.json.js +40 -0
- package/dist/i18n/en/Employee.ManagementEmployeeList.json.js.map +1 -0
- package/dist/i18n/en/Payroll.GrossUpModal.json.js +16 -14
- package/dist/i18n/en/Payroll.GrossUpModal.json.js.map +1 -1
- package/dist/i18n/en/Payroll.OffCycle.json.js +1 -1
- package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +5 -5
- package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +38 -34
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +29 -25
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollHistory.json.js +12 -12
- package/dist/i18n/en/Payroll.PayrollList.json.js +30 -22
- package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +64 -58
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/Payroll.TransitionCreation.json.js +9 -9
- package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js +8 -8
- package/dist/i18n/en/UNSTABLE.PayScheduleForm.json.js +24 -0
- package/dist/i18n/en/UNSTABLE.PayScheduleForm.json.js.map +1 -0
- package/dist/i18n/en/UNSTABLE.SignCompanyForm.json.js +20 -0
- package/dist/i18n/en/UNSTABLE.SignCompanyForm.json.js.map +1 -0
- package/dist/i18n/en/UNSTABLE.SignEmployeeForm.json.js +22 -0
- package/dist/i18n/en/UNSTABLE.SignEmployeeForm.json.js.map +1 -0
- package/dist/i18n/en/UNSTABLE.SignEmployeeI9Form.json.js +70 -0
- package/dist/i18n/en/UNSTABLE.SignEmployeeI9Form.json.js.map +1 -0
- package/dist/i18n/en/common.json.d.ts +3 -1
- package/dist/i18n/en/common.json.js +5 -5
- package/dist/index.js +18 -16
- package/dist/index.js.map +1 -1
- package/dist/shared/constants.d.ts +56 -0
- package/dist/shared/constants.js +100 -70
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +817 -12
- package/dist/{components/UNSTABLE_Hooks/types.d.ts → types/sdkHooks.d.ts} +29 -5
- package/docs/reference/endpoint-inventory.json +659 -391
- package/package.json +33 -24
- package/dist/components/Employee/EmployeeList/Actions.d.ts +0 -1
- package/dist/components/Employee/EmployeeList/Actions.js +0 -16
- package/dist/components/Employee/EmployeeList/Actions.js.map +0 -1
- package/dist/components/Employee/EmployeeList/Head.d.ts +0 -1
- package/dist/components/Employee/EmployeeList/Head.js +0 -15
- package/dist/components/Employee/EmployeeList/Head.js.map +0 -1
- package/dist/components/Employee/EmployeeList/List.d.ts +0 -2
- package/dist/components/Employee/EmployeeList/List.js +0 -125
- package/dist/components/Employee/EmployeeList/List.js.map +0 -1
- package/dist/components/Employee/EmployeeList/List.module.scss.js +0 -8
- package/dist/components/Employee/EmployeeList/List.module.scss.js.map +0 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.module.scss.js +0 -8
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.module.scss.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/collectErrors.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.d.ts +0 -26
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js +0 -24
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.d.ts +0 -3
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js +0 -14
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.d.ts +0 -6
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js +0 -14
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/types.d.ts +0 -27
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.d.ts +0 -4
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js +0 -9
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/useErrorHandling.js.map +0 -1
- package/dist/helpers/requiredIf.d.ts +0 -13
- package/dist/helpers/requiredIf.js +0 -8
- package/dist/helpers/requiredIf.js.map +0 -1
- /package/dist/components/UNSTABLE_Hooks/form/{deriveFieldsMetadata.test.d.ts → buildFormSchema.test.d.ts} +0 -0
- /package/dist/components/UNSTABLE_Hooks/{useErrorHandling.test.d.ts → hooks/useCompensationForm/compensationSchemaParity.test.d.ts} +0 -0
package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEmployeeDetailsForm.js","sources":["../../../../../src/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.tsx"],"sourcesContent":["import { useForm } from 'react-hook-form'\nimport type { UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport { useEmployeesGet } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useEmployeesCreateMutation } from '@gusto/embedded-api/react-query/employeesCreate'\nimport { useEmployeesUpdateMutation } from '@gusto/embedded-api/react-query/employeesUpdate'\nimport { useEmployeesUpdateOnboardingStatusMutation } from '@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus'\nimport { RFCDate } from '@gusto/embedded-api/types/rfcdate'\nimport type { HookSubmitResult } from '../../types'\nimport { useErrorHandling } from '../../useErrorHandling'\nimport { deriveFieldsMetadata } from '../../form/deriveFieldsMetadata'\nimport { createGetFormSubmissionValues } from '../../form/getFormSubmissionValues'\nimport type { RequiredFields } from '../../form/resolveRequiredFields'\nimport {\n createEmployeeDetailsSchema,\n type EmployeeDetailsFormData,\n type EmployeeDetailsFormOutputs,\n type EmployeeDetailsField,\n} from './employeeDetailsSchema'\nimport {\n FirstNameField,\n MiddleInitialField,\n LastNameField,\n EmailField,\n DateOfBirthField,\n SsnField,\n SelfOnboardingField,\n} from './fields'\nimport { EmployeeOnboardingStatus } from '@/shared/constants'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { SDKInternalError } from '@/types/sdkError'\nimport { removeNonDigits } from '@/helpers/formattedStrings'\n\nexport type EmployeeDetailsRequiredFields = RequiredFields<EmployeeDetailsField>\n\nexport interface EmployeeDetailsSubmitCallbacks {\n onEmployeeCreated?: (employee: Employee) => void\n onEmployeeUpdated?: (employee: Employee) => void\n onOnboardingStatusUpdated?: (status: unknown) => void\n}\n\nexport interface UseEmployeeDetailsFormProps {\n companyId: string\n employeeId?: string\n withSelfOnboardingField?: boolean\n requiredFields?: EmployeeDetailsRequiredFields\n defaultValues?: Partial<EmployeeDetailsFormData>\n validationMode?: UseFormProps['mode']\n shouldFocusError?: boolean\n}\n\nconst isCurrentlySelfOnboarding = (employee?: Employee) => {\n if (!employee?.onboardingStatus) return false\n const selfOnboardingStatuses: string[] = [\n EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE,\n EmployeeOnboardingStatus.SELF_ONBOARDING_INVITED,\n EmployeeOnboardingStatus.SELF_ONBOARDING_INVITED_STARTED,\n EmployeeOnboardingStatus.SELF_ONBOARDING_INVITED_OVERDUE,\n EmployeeOnboardingStatus.SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE,\n EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n ]\n return selfOnboardingStatuses.includes(employee.onboardingStatus)\n}\n\nconst canToggleSelfOnboarding = (employee?: Employee) => {\n if (!employee) return true\n return (\n employee.onboardingStatus === EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE ||\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE\n )\n}\n\nexport function useEmployeeDetailsForm({\n companyId,\n employeeId,\n withSelfOnboardingField = true,\n requiredFields,\n defaultValues: partnerDefaults,\n validationMode = 'onSubmit',\n shouldFocusError = true,\n}: UseEmployeeDetailsFormProps) {\n const employeeQuery = useEmployeesGet({ employeeId: employeeId ?? '' }, { enabled: !!employeeId })\n\n const employee = employeeQuery.data?.employee\n\n const isCreateMode = !employeeId\n const isSelfOnboardingToggleable = canToggleSelfOnboarding(employee)\n\n const mode = isCreateMode ? 'create' : 'update'\n\n const schema = createEmployeeDetailsSchema({\n mode,\n requiredFields,\n hasSsn: employee?.hasSsn,\n })\n\n const resolvedDefaults: EmployeeDetailsFormData = {\n firstName: employee?.firstName ?? partnerDefaults?.firstName ?? '',\n middleInitial: employee?.middleInitial ?? partnerDefaults?.middleInitial ?? '',\n lastName: employee?.lastName ?? partnerDefaults?.lastName ?? '',\n email: employee?.email ?? partnerDefaults?.email ?? '',\n dateOfBirth: employee?.dateOfBirth ?? partnerDefaults?.dateOfBirth ?? '',\n ssn: partnerDefaults?.ssn ?? '',\n selfOnboarding: partnerDefaults?.selfOnboarding ?? isCurrentlySelfOnboarding(employee),\n }\n\n const formMethods = useForm<EmployeeDetailsFormData, unknown, EmployeeDetailsFormOutputs>({\n resolver: zodResolver(schema),\n mode: validationMode,\n shouldFocusError,\n defaultValues: resolvedDefaults,\n values: resolvedDefaults,\n resetOptions: { keepDirtyValues: true },\n })\n\n const createEmployeeMutation = useEmployeesCreateMutation()\n const updateEmployeeMutation = useEmployeesUpdateMutation()\n const updateOnboardingStatusMutation = useEmployeesUpdateOnboardingStatusMutation()\n\n const isPending =\n createEmployeeMutation.isPending ||\n updateEmployeeMutation.isPending ||\n updateOnboardingStatusMutation.isPending\n\n const { baseSubmitHandler, error: submitError, setError } = useBaseSubmit('EmployeeDetailsForm')\n\n const queries = employeeId ? [employeeQuery] : []\n const errorHandling = useErrorHandling(queries, { error: submitError, setError })\n\n const baseMetadata = deriveFieldsMetadata(schema)\n const fieldsMetadata = {\n ...baseMetadata,\n ssn: { ...baseMetadata.ssn, hasRedactedValue: employee?.hasSsn ?? false },\n }\n\n const onSubmit = async (\n callbacks?: EmployeeDetailsSubmitCallbacks,\n ): Promise<HookSubmitResult<Employee> | undefined> => {\n let submitResult: HookSubmitResult<Employee> | undefined\n\n await new Promise<void>(resolve => {\n void formMethods.handleSubmit(\n async (data: EmployeeDetailsFormOutputs) => {\n await baseSubmitHandler(data, async payload => {\n const { selfOnboarding, dateOfBirth, ssn, ...body } = payload\n\n const cleanedSsn = ssn ? removeNonDigits(ssn) : undefined\n const hasSsnInput = cleanedSsn && cleanedSsn.length > 0\n\n let updatedEmployee: Employee\n\n if (isCreateMode) {\n const result = await createEmployeeMutation.mutateAsync({\n request: {\n companyId,\n requestBody: {\n ...body,\n selfOnboarding,\n dateOfBirth: dateOfBirth ? new RFCDate(new Date(dateOfBirth)) : undefined,\n ssn: hasSsnInput ? cleanedSsn : undefined,\n },\n },\n })\n\n if (!result.employee) {\n throw new SDKInternalError('Employee creation failed')\n }\n\n updatedEmployee = result.employee\n callbacks?.onEmployeeCreated?.(updatedEmployee)\n } else {\n if (!employee) {\n throw new SDKInternalError('Employee data is not available')\n }\n\n if (isSelfOnboardingToggleable) {\n const currentIsSelfOnboarding =\n employee.onboardingStatus ===\n EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE\n\n if (selfOnboarding !== currentIsSelfOnboarding) {\n const { employeeOnboardingStatus } =\n await updateOnboardingStatusMutation.mutateAsync({\n request: {\n employeeId: employee.uuid,\n requestBody: {\n onboardingStatus: selfOnboarding\n ? EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE\n : EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n },\n },\n })\n\n callbacks?.onOnboardingStatusUpdated?.(employeeOnboardingStatus)\n }\n }\n\n const result = await updateEmployeeMutation.mutateAsync({\n request: {\n employeeId: employee.uuid,\n requestBody: {\n version: employee.version as string,\n ...body,\n dateOfBirth: dateOfBirth || undefined,\n ssn: hasSsnInput ? cleanedSsn : undefined,\n },\n },\n })\n\n if (!result.employee) {\n throw new SDKInternalError('Employee update failed')\n }\n\n updatedEmployee = result.employee\n callbacks?.onEmployeeUpdated?.(updatedEmployee)\n }\n\n submitResult = {\n mode: isCreateMode ? 'create' : 'update',\n data: updatedEmployee,\n }\n })\n resolve()\n },\n () => {\n resolve()\n },\n )()\n })\n\n return submitResult\n }\n\n const isDataLoading = employeeId ? employeeQuery.isLoading : false\n\n if (isDataLoading || (employeeId && !employee)) {\n return { isLoading: true as const, errorHandling }\n }\n\n return {\n isLoading: false as const,\n data: {\n employee: employee ?? null,\n },\n status: {\n isPending,\n mode: isCreateMode ? ('create' as const) : ('update' as const),\n },\n actions: { onSubmit },\n errorHandling,\n form: {\n Fields: {\n FirstName: FirstNameField,\n MiddleInitial: MiddleInitialField,\n LastName: LastNameField,\n Email: EmailField,\n DateOfBirth: DateOfBirthField,\n Ssn: SsnField,\n SelfOnboarding:\n withSelfOnboardingField && isSelfOnboardingToggleable ? SelfOnboardingField : undefined,\n },\n fieldsMetadata,\n hookFormInternals: { formMethods },\n getFormSubmissionValues: createGetFormSubmissionValues(formMethods, schema),\n },\n }\n}\n\nexport type UseEmployeeDetailsFormResult = ReturnType<typeof useEmployeeDetailsForm>\nexport type UseEmployeeDetailsFormReady = Extract<UseEmployeeDetailsFormResult, { data: object }>\nexport type EmployeeDetailsFieldsMetadata = UseEmployeeDetailsFormReady['form']['fieldsMetadata']\nexport type EmployeeDetailsFormFields = UseEmployeeDetailsFormReady['form']['Fields']\n"],"names":["isCurrentlySelfOnboarding","employee","EmployeeOnboardingStatus","canToggleSelfOnboarding","useEmployeeDetailsForm","companyId","employeeId","withSelfOnboardingField","requiredFields","partnerDefaults","validationMode","shouldFocusError","employeeQuery","useEmployeesGet","isCreateMode","isSelfOnboardingToggleable","schema","createEmployeeDetailsSchema","resolvedDefaults","formMethods","useForm","zodResolver","createEmployeeMutation","useEmployeesCreateMutation","updateEmployeeMutation","useEmployeesUpdateMutation","updateOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","isPending","baseSubmitHandler","submitError","setError","useBaseSubmit","errorHandling","useErrorHandling","baseMetadata","deriveFieldsMetadata","fieldsMetadata","onSubmit","callbacks","submitResult","resolve","data","payload","selfOnboarding","dateOfBirth","ssn","body","cleanedSsn","removeNonDigits","hasSsnInput","updatedEmployee","result","RFCDate","SDKInternalError","currentIsSelfOnboarding","employeeOnboardingStatus","FirstNameField","MiddleInitialField","LastNameField","EmailField","DateOfBirthField","SsnField","SelfOnboardingField","createGetFormSubmissionValues"],"mappings":";;;;;;;;;;;;;;;;AAoDA,MAAMA,KAA4B,CAACC,MAC5BA,GAAU,mBAC0B;AAAA,EACvCC,EAAyB;AAAA,EACzBA,EAAyB;AAAA,EACzBA,EAAyB;AAAA,EACzBA,EAAyB;AAAA,EACzBA,EA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IAAgB,WAAsB;AAAA,IAAA;AAAA,IAE9C,SAAS,EAAE,UAAAwB,EAAA;AAAA,IACX,eAAAL;AAAA,IACA,MAAM;AAAA,MACJ,QAAQ;AAAA,QACN,WAAWwB;AAAA,QACX,eAAeC;AAAA,QACf,UAAUC;AAAA,QACV,OAAOC;AAAA,QACP,aAAaC;AAAA,QACb,KAAKC;AAAA,QACL,gBACEvD,KAA2BQ,IAA6BgD,IAAsB;AAAA,MAAA;AAAA,MAElF,gBAAA1B;AAAA,MACA,mBAAmB,EAAE,aAAAlB,EAAA;AAAA,MACrB,yBAAyB6C,EAA8B7C,GAAaH,CAAM;AAAA,IAAA;AAAA,EAC5E;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"useEmployeeDetailsForm.js","sources":["../../../../../src/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { useForm } from 'react-hook-form'\nimport type { UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport { useEmployeesGet } from '@gusto/embedded-api/react-query/employeesGet'\nimport { useEmployeesCreateMutation } from '@gusto/embedded-api/react-query/employeesCreate'\nimport { useEmployeesUpdateMutation } from '@gusto/embedded-api/react-query/employeesUpdate'\nimport { useEmployeesUpdateOnboardingStatusMutation } from '@gusto/embedded-api/react-query/employeesUpdateOnboardingStatus'\nimport { RFCDate } from '@gusto/embedded-api/types/rfcdate'\nimport { useDeriveFieldsMetadata } from '../../form/useDeriveFieldsMetadata'\nimport { createGetFormSubmissionValues } from '../../form/getFormSubmissionValues'\nimport {\n createEmployeeDetailsSchema,\n type EmployeeDetailsOptionalFieldsToRequire,\n type EmployeeDetailsFormData,\n type EmployeeDetailsFormOutputs,\n} from './employeeDetailsSchema'\nimport {\n FirstNameField,\n MiddleInitialField,\n LastNameField,\n EmailField,\n DateOfBirthField,\n SsnField,\n SelfOnboardingField,\n} from './fields'\nimport { useErrorHandling } from '@/hooks/useErrorHandling'\nimport type { HookSubmitResult } from '@/types/sdkHooks'\nimport { EmployeeOnboardingStatus } from '@/shared/constants'\nimport { useBaseSubmit } from '@/components/Base/useBaseSubmit'\nimport { SDKInternalError } from '@/types/sdkError'\nimport { removeNonDigits } from '@/helpers/formattedStrings'\n\nexport type { EmployeeDetailsOptionalFieldsToRequire } from './employeeDetailsSchema'\n\nexport interface EmployeeDetailsSubmitCallbacks {\n onEmployeeCreated?: (employee: Employee) => void\n onEmployeeUpdated?: (employee: Employee) => void\n onOnboardingStatusUpdated?: (status: unknown) => void\n}\n\nexport interface UseEmployeeDetailsFormProps {\n companyId: string\n employeeId?: string\n withSelfOnboardingField?: boolean\n optionalFieldsToRequire?: EmployeeDetailsOptionalFieldsToRequire\n defaultValues?: Partial<EmployeeDetailsFormData>\n validationMode?: UseFormProps['mode']\n shouldFocusError?: boolean\n}\n\nconst isCurrentlySelfOnboarding = (employee?: Employee) => {\n if (!employee?.onboardingStatus) return false\n const selfOnboardingStatuses: string[] = [\n EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE,\n EmployeeOnboardingStatus.SELF_ONBOARDING_INVITED,\n EmployeeOnboardingStatus.SELF_ONBOARDING_INVITED_STARTED,\n EmployeeOnboardingStatus.SELF_ONBOARDING_INVITED_OVERDUE,\n EmployeeOnboardingStatus.SELF_ONBOARDING_COMPLETED_BY_EMPLOYEE,\n EmployeeOnboardingStatus.SELF_ONBOARDING_AWAITING_ADMIN_REVIEW,\n ]\n return selfOnboardingStatuses.includes(employee.onboardingStatus)\n}\n\nconst canToggleSelfOnboarding = (employee?: Employee) => {\n if (!employee) return true\n return (\n employee.onboardingStatus === EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE ||\n employee.onboardingStatus === EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE\n )\n}\n\nexport function useEmployeeDetailsForm({\n companyId,\n employeeId,\n withSelfOnboardingField = true,\n optionalFieldsToRequire,\n defaultValues: partnerDefaults,\n validationMode = 'onSubmit',\n shouldFocusError = true,\n}: UseEmployeeDetailsFormProps) {\n const employeeQuery = useEmployeesGet({ employeeId: employeeId ?? '' }, { enabled: !!employeeId })\n\n const employee = employeeQuery.data?.employee\n\n const isCreateMode = !employeeId\n const isSelfOnboardingToggleable = canToggleSelfOnboarding(employee)\n\n const mode = isCreateMode ? 'create' : 'update'\n\n const [schema, metadataConfig] = useMemo(\n () => createEmployeeDetailsSchema({ mode, optionalFieldsToRequire, hasSsn: employee?.hasSsn }),\n [mode, optionalFieldsToRequire, employee?.hasSsn],\n )\n\n const resolvedDefaults: EmployeeDetailsFormData = {\n firstName: employee?.firstName ?? partnerDefaults?.firstName ?? '',\n middleInitial: employee?.middleInitial ?? partnerDefaults?.middleInitial ?? '',\n lastName: employee?.lastName ?? partnerDefaults?.lastName ?? '',\n email: employee?.email ?? partnerDefaults?.email ?? '',\n dateOfBirth: employee?.dateOfBirth ?? partnerDefaults?.dateOfBirth ?? '',\n ssn: partnerDefaults?.ssn ?? '',\n selfOnboarding: partnerDefaults?.selfOnboarding ?? isCurrentlySelfOnboarding(employee),\n }\n\n const formMethods = useForm<EmployeeDetailsFormData, unknown, EmployeeDetailsFormOutputs>({\n resolver: zodResolver(schema),\n mode: validationMode,\n shouldFocusError,\n defaultValues: resolvedDefaults,\n values: resolvedDefaults,\n resetOptions: { keepDirtyValues: true },\n })\n\n const createEmployeeMutation = useEmployeesCreateMutation()\n const updateEmployeeMutation = useEmployeesUpdateMutation()\n const updateOnboardingStatusMutation = useEmployeesUpdateOnboardingStatusMutation()\n\n const isPending =\n createEmployeeMutation.isPending ||\n updateEmployeeMutation.isPending ||\n updateOnboardingStatusMutation.isPending\n\n const { baseSubmitHandler, error: submitError, setError } = useBaseSubmit('EmployeeDetailsForm')\n\n const queries = employeeId ? [employeeQuery] : []\n const errorHandling = useErrorHandling(queries, { error: submitError, setError })\n\n const fieldsMetadata = useDeriveFieldsMetadata(metadataConfig, formMethods.control)\n\n const onSubmit = async (\n callbacks?: EmployeeDetailsSubmitCallbacks,\n ): Promise<HookSubmitResult<Employee> | undefined> => {\n let submitResult: HookSubmitResult<Employee> | undefined\n\n await new Promise<void>(resolve => {\n void formMethods.handleSubmit(\n async (data: EmployeeDetailsFormOutputs) => {\n await baseSubmitHandler(data, async payload => {\n const { selfOnboarding, dateOfBirth, ssn, ...body } = payload\n\n const cleanedSsn = ssn ? removeNonDigits(ssn) : undefined\n const hasSsnInput = cleanedSsn && cleanedSsn.length > 0\n\n let updatedEmployee: Employee\n\n if (isCreateMode) {\n const result = await createEmployeeMutation.mutateAsync({\n request: {\n companyId,\n requestBody: {\n ...body,\n selfOnboarding,\n dateOfBirth: dateOfBirth ? new RFCDate(new Date(dateOfBirth)) : undefined,\n ssn: hasSsnInput ? cleanedSsn : undefined,\n },\n },\n })\n\n if (!result.employee) {\n throw new SDKInternalError('Employee creation failed')\n }\n\n updatedEmployee = result.employee\n callbacks?.onEmployeeCreated?.(updatedEmployee)\n } else {\n if (!employee) {\n throw new SDKInternalError('Employee data is not available')\n }\n\n if (isSelfOnboardingToggleable) {\n const currentIsSelfOnboarding =\n employee.onboardingStatus ===\n EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE\n\n if (selfOnboarding !== currentIsSelfOnboarding) {\n const { employeeOnboardingStatus } =\n await updateOnboardingStatusMutation.mutateAsync({\n request: {\n employeeId: employee.uuid,\n requestBody: {\n onboardingStatus: selfOnboarding\n ? EmployeeOnboardingStatus.SELF_ONBOARDING_PENDING_INVITE\n : EmployeeOnboardingStatus.ADMIN_ONBOARDING_INCOMPLETE,\n },\n },\n })\n\n callbacks?.onOnboardingStatusUpdated?.(employeeOnboardingStatus)\n }\n }\n\n const result = await updateEmployeeMutation.mutateAsync({\n request: {\n employeeId: employee.uuid,\n requestBody: {\n version: employee.version as string,\n ...body,\n dateOfBirth: dateOfBirth || undefined,\n ssn: hasSsnInput ? cleanedSsn : undefined,\n },\n },\n })\n\n if (!result.employee) {\n throw new SDKInternalError('Employee update failed')\n }\n\n updatedEmployee = result.employee\n callbacks?.onEmployeeUpdated?.(updatedEmployee)\n }\n\n submitResult = {\n mode: isCreateMode ? 'create' : 'update',\n data: updatedEmployee,\n }\n })\n resolve()\n },\n () => {\n resolve()\n },\n )()\n })\n\n return submitResult\n }\n\n const isDataLoading = employeeId ? employeeQuery.isLoading : false\n\n if (isDataLoading || (employeeId && !employee)) {\n return { isLoading: true as const, errorHandling }\n }\n\n return {\n isLoading: false as const,\n data: {\n employee: employee ?? null,\n },\n status: {\n isPending,\n mode: isCreateMode ? ('create' as const) : ('update' as const),\n },\n actions: { onSubmit },\n errorHandling,\n form: {\n Fields: {\n FirstName: FirstNameField,\n MiddleInitial: MiddleInitialField,\n LastName: LastNameField,\n Email: EmailField,\n DateOfBirth: DateOfBirthField,\n Ssn: SsnField,\n SelfOnboarding:\n withSelfOnboardingField && isSelfOnboardingToggleable ? SelfOnboardingField : undefined,\n },\n fieldsMetadata,\n hookFormInternals: { formMethods },\n getFormSubmissionValues: createGetFormSubmissionValues(formMethods, schema),\n },\n }\n}\n\nexport type UseEmployeeDetailsFormResult = ReturnType<typeof useEmployeeDetailsForm>\nexport type UseEmployeeDetailsFormReady = Extract<UseEmployeeDetailsFormResult, { data: object }>\nexport type EmployeeDetailsFieldsMetadata = UseEmployeeDetailsFormReady['form']['fieldsMetadata']\nexport type EmployeeDetailsFormFields = UseEmployeeDetailsFormReady['form']['Fields']\n"],"names":["isCurrentlySelfOnboarding","employee","EmployeeOnboardingStatus","canToggleSelfOnboarding","useEmployeeDetailsForm","companyId","employeeId","withSelfOnboardingField","optionalFieldsToRequire","partnerDefaults","validationMode","shouldFocusError","employeeQuery","useEmployeesGet","isCreateMode","isSelfOnboardingToggleable","mode","schema","metadataConfig","useMemo","createEmployeeDetailsSchema","resolvedDefaults","formMethods","useForm","zodResolver","createEmployeeMutation","useEmployeesCreateMutation","updateEmployeeMutation","useEmployeesUpdateMutation","updateOnboardingStatusMutation","useEmployeesUpdateOnboardingStatusMutation","isPending","baseSubmitHandler","submitError","setError","useBaseSubmit","errorHandling","useErrorHandling","fieldsMetadata","useDeriveFieldsMetadata","onSubmit","callbacks","submitResult","resolve","data","payload","selfOnboarding","dateOfBirth","ssn","body","cleanedSsn","removeNonDigits","hasSsnInput","updatedEmployee","result","RFCDate","SDKInternalError","currentIsSelfOnboarding","employeeOnboardingStatus","FirstNameField","MiddleInitialField","LastNameField","EmailField","DateOfBirthField","SsnField","SelfOnboardingField","createGetFormSubmissionValues"],"mappings":";;;;;;;;;;;;;;;;;AAoDA,MAAMA,KAA4B,CAACC,MAC5BA,GAAU,mBAC0B;AAAA,EACvCC,EAAyB;AAAA,EACzBA,EAAyB;AAAA,EACzBA,EAAyB;AAAA,EACzBA,EAAyB;AAAA,EACzBA,EAAyB;AAAA,EACzBA,EAAyB;AAAA,EAEG,SAASD,EAAS,gBAAgB,IATxB,IAYpCE,KAA0B,CAACF,MAC1BA,IAEHA,EAAS,qBAAqBC,EAAyB,+BACvDD,EAAS,qBAAqBC,EAAyB,iCAHnC;AAOjB,SAASE,GAAuB;AAAA,EACrC,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,yBAAAC,IAA0B;AAAA,EAC1B,yBAAAC;AAAA,EACA,eAAeC;AAAA,EACf,gBAAAC,IAAiB;AAAA,EACjB,kBAAAC,IAAmB;AACrB,GAAgC;AAC9B,QAAMC,IAAgBC,EAAgB,EAAE,YAAYP,KAAc,GAAA,GAAM,EAAE,SAAS,CAAC,CAACA,GAAY,GAE3FL,IAAWW,EAAc,MAAM,UAE/BE,IAAe,CAACR,GAChBS,IAA6BZ,GAAwBF,CAAQ,GAE7De,IAAOF,IAAe,WAAW,UAEjC,CAACG,GAAQC,CAAc,IAAIC;AAAA,IAC/B,MAAMC,EAA4B,EAAE,MAAAJ,GAAM,yBAAAR,GAAyB,QAAQP,GAAU,QAAQ;AAAA,IAC7F,CAACe,GAAMR,G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D,cAAAH,IAAkBC,EAAO,UACzBb,GAAW,oBAAoBY,CAAe;AAAA,YAChD;AAEA,YAAAX,IAAe;AAAA,cACb,MAAM5B,IAAe,WAAW;AAAA,cAChC,MAAMuC;AAAA,YAAA;AAAA,UAEV,CAAC,GACDV,EAAA;AAAA,QACF;AAAA,QACA,MAAM;AACJ,UAAAA,EAAA;AAAA,QACF;AAAA,MAAA,EACF;AAAA,IACF,CAAC,GAEMD;AAAA,EACT;AAIA,UAFsBpC,IAAaM,EAAc,YAAY,OAEvCN,KAAc,CAACL,IAC5B,EAAE,WAAW,IAAe,eAAAmC,EAAA,IAG9B;AAAA,IACL,WAAW;AAAA,IACX,MAAM;AAAA,MACJ,UAAUnC,KAAY;AAAA,IAAA;AAAA,IAExB,QAAQ;AAAA,MACN,WAAA8B;AAAA,MACA,MAAMjB,IAAgB,WAAsB;AAAA,IAAA;AAAA,IAE9C,SAAS,EAAE,UAAA0B,EAAA;AAAA,IACX,eAAAJ;AAAA,IACA,MAAM;AAAA,MACJ,QAAQ;AAAA,QACN,WAAWuB;AAAA,QACX,eAAeC;AAAA,QACf,UAAUC;AAAA,QACV,OAAOC;AAAA,QACP,aAAaC;AAAA,QACb,KAAKC;AAAA,QACL,gBACEzD,KAA2BQ,IAA6BkD,KAAsB;AAAA,MAAA;AAAA,MAElF,gBAAA3B;AAAA,MACA,mBAAmB,EAAE,aAAAhB,EAAA;AAAA,MACrB,yBAAyB4C,EAA8B5C,GAAaL,CAAM;AAAA,IAAA;AAAA,EAC5E;AAEJ;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UsePayScheduleFormProps } from './usePayScheduleForm';
|
|
2
|
+
import { BaseComponentInterface } from '../../../Base';
|
|
3
|
+
export interface PayScheduleFormProps extends UsePayScheduleFormProps, Omit<BaseComponentInterface, 'defaultValues'> {
|
|
4
|
+
}
|
|
5
|
+
export declare function PayScheduleForm({ FallbackComponent, ...props }: PayScheduleFormProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { jsx as a, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { useState as v } from "react";
|
|
3
|
+
import { useTranslation as b } from "react-i18next";
|
|
4
|
+
import { SDKFormProvider as A } from "../../form/SDKFormProvider.js";
|
|
5
|
+
import { usePayScheduleForm as C } from "./usePayScheduleForm.js";
|
|
6
|
+
import n from "./PayScheduleForm.module.scss.js";
|
|
7
|
+
import { useComponentContext as N } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
8
|
+
import { BaseBoundaries as U, BaseLayout as p } from "../../../Base/Base.js";
|
|
9
|
+
import "../../../Base/useBase.js";
|
|
10
|
+
import { Form as w } from "../../../Common/Form/Form.js";
|
|
11
|
+
import { Flex as D } from "../../../Common/Flex/Flex.js";
|
|
12
|
+
import { Grid as I } from "../../../Common/Grid/Grid.js";
|
|
13
|
+
import { ActionsLayout as F } from "../../../Common/ActionsLayout/ActionsLayout.js";
|
|
14
|
+
import { componentEvents as f } from "../../../../shared/constants.js";
|
|
15
|
+
import { useI18n as T, useComponentDictionary as L } from "../../../../i18n/I18n.js";
|
|
16
|
+
import { useDateFormatter as Q } from "../../../../hooks/useDateFormatter.js";
|
|
17
|
+
function x({ onEvent: c, dictionary: m, ...h }) {
|
|
18
|
+
T("UNSTABLE.PayScheduleForm"), L("UNSTABLE.PayScheduleForm", m);
|
|
19
|
+
const { t: e } = b("UNSTABLE.PayScheduleForm"), o = N(), E = Q(), r = C(h), [u, P] = v(0);
|
|
20
|
+
if (r.isLoading)
|
|
21
|
+
return /* @__PURE__ */ a(p, { isLoading: !0, error: r.errorHandling.errors });
|
|
22
|
+
const { Fields: i } = r.form, { payPeriodPreview: y, payPreviewLoading: g, paymentSpeedDays: R } = r.data, S = async () => {
|
|
23
|
+
const t = await r.actions.onSubmit();
|
|
24
|
+
t && c(
|
|
25
|
+
t.mode === "create" ? f.PAY_SCHEDULE_CREATED : f.PAY_SCHEDULE_UPDATED,
|
|
26
|
+
t.data
|
|
27
|
+
);
|
|
28
|
+
}, l = y?.[u];
|
|
29
|
+
return /* @__PURE__ */ a(p, { error: r.errorHandling.errors, children: /* @__PURE__ */ a(A, { formHookResult: r, children: /* @__PURE__ */ d(
|
|
30
|
+
w,
|
|
31
|
+
{
|
|
32
|
+
onSubmit: (t) => {
|
|
33
|
+
t.preventDefault(), S();
|
|
34
|
+
},
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ a(o.Heading, { as: "h2", children: r.status.mode === "create" ? e("addTitle") : e("editTitle") }),
|
|
37
|
+
/* @__PURE__ */ a("div", { className: n.payScheduleContainer, children: /* @__PURE__ */ d(I, { gap: 32, gridTemplateColumns: { base: "1fr", small: "1fr 1fr" }, children: [
|
|
38
|
+
/* @__PURE__ */ a("div", { className: n.payScheduleForm, children: /* @__PURE__ */ d(D, { flexDirection: "column", children: [
|
|
39
|
+
/* @__PURE__ */ a(
|
|
40
|
+
i.CustomName,
|
|
41
|
+
{
|
|
42
|
+
label: e("labels.name"),
|
|
43
|
+
validationMessages: {
|
|
44
|
+
REQUIRED: e("fieldValidations.customName.REQUIRED")
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ a(
|
|
49
|
+
i.Frequency,
|
|
50
|
+
{
|
|
51
|
+
label: e("labels.frequency"),
|
|
52
|
+
getOptionLabel: (t) => e(`frequencies.${t}`, t),
|
|
53
|
+
validationMessages: {
|
|
54
|
+
REQUIRED: e("fieldValidations.frequency.REQUIRED")
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
),
|
|
58
|
+
i.CustomTwicePerMonth && /* @__PURE__ */ a(
|
|
59
|
+
i.CustomTwicePerMonth,
|
|
60
|
+
{
|
|
61
|
+
label: e("labels.frequencyOptions"),
|
|
62
|
+
description: e("descriptions.frequencyOptionsDescription")
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ a(
|
|
66
|
+
i.AnchorPayDate,
|
|
67
|
+
{
|
|
68
|
+
label: e("labels.firstPayDate"),
|
|
69
|
+
description: e("descriptions.anchorPayDateDescription", {
|
|
70
|
+
count: R
|
|
71
|
+
}),
|
|
72
|
+
validationMessages: {
|
|
73
|
+
REQUIRED: e("fieldValidations.anchorPayDate.REQUIRED")
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ a(
|
|
78
|
+
i.AnchorEndOfPayPeriod,
|
|
79
|
+
{
|
|
80
|
+
label: e("labels.firstPayPeriodEndDate"),
|
|
81
|
+
description: e("descriptions.anchorEndOfPayPeriodDescription"),
|
|
82
|
+
validationMessages: {
|
|
83
|
+
REQUIRED: e("fieldValidations.anchorEndOfPayPeriod.REQUIRED")
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
i.Day1 ? /* @__PURE__ */ a(
|
|
88
|
+
i.Day1,
|
|
89
|
+
{
|
|
90
|
+
label: e("labels.firstPayDayOfTheMonth"),
|
|
91
|
+
validationMessages: {
|
|
92
|
+
REQUIRED: e("fieldValidations.day1.REQUIRED"),
|
|
93
|
+
DAY_RANGE: e("fieldValidations.day1.DAY_RANGE")
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
) : /* @__PURE__ */ a("div", { className: n.visuallyHidden }),
|
|
97
|
+
i.Day2 ? /* @__PURE__ */ a(
|
|
98
|
+
i.Day2,
|
|
99
|
+
{
|
|
100
|
+
label: e("labels.lastPayDayOfTheMonth"),
|
|
101
|
+
validationMessages: {
|
|
102
|
+
REQUIRED: e("fieldValidations.day2.REQUIRED"),
|
|
103
|
+
DAY_RANGE: e("fieldValidations.day2.DAY_RANGE")
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
) : /* @__PURE__ */ a("div", { className: n.visuallyHidden })
|
|
107
|
+
] }) }),
|
|
108
|
+
/* @__PURE__ */ a(D, { flexDirection: "column", gap: 4, justifyContent: "center", alignItems: "center", children: y && l ? /* @__PURE__ */ d("div", { className: n.calendarContainer, children: [
|
|
109
|
+
!g && /* @__PURE__ */ a(
|
|
110
|
+
o.Select,
|
|
111
|
+
{
|
|
112
|
+
label: e("labels.preview"),
|
|
113
|
+
isRequired: !0,
|
|
114
|
+
options: y.map((t, s) => ({
|
|
115
|
+
value: String(s),
|
|
116
|
+
label: E.formatPayPeriodRange(
|
|
117
|
+
t.startDate.toString(),
|
|
118
|
+
t.endDate.toString()
|
|
119
|
+
)
|
|
120
|
+
})),
|
|
121
|
+
value: String(u),
|
|
122
|
+
onChange: (t) => {
|
|
123
|
+
const s = Number(t);
|
|
124
|
+
isNaN(s) || P(s);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
/* @__PURE__ */ a(
|
|
129
|
+
o.CalendarPreview,
|
|
130
|
+
{
|
|
131
|
+
dateRange: {
|
|
132
|
+
start: new Date(l.startDate.toString()),
|
|
133
|
+
end: new Date(l.endDate.toString()),
|
|
134
|
+
label: e("payPreview.payPeriod")
|
|
135
|
+
},
|
|
136
|
+
highlightDates: [
|
|
137
|
+
{
|
|
138
|
+
date: new Date(l.checkDate.toString()),
|
|
139
|
+
highlightColor: "primary",
|
|
140
|
+
label: e("payPreview.payday")
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
date: new Date(l.runPayrollBy.toString()),
|
|
144
|
+
highlightColor: "secondary",
|
|
145
|
+
label: e("payPreview.payrollDeadline")
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
u
|
|
150
|
+
)
|
|
151
|
+
] }) : /* @__PURE__ */ a("div", { className: n.calendarContainer, children: /* @__PURE__ */ a(
|
|
152
|
+
o.Alert,
|
|
153
|
+
{
|
|
154
|
+
status: "info",
|
|
155
|
+
label: e("previewAlert.title"),
|
|
156
|
+
disableScrollIntoView: !0,
|
|
157
|
+
children: /* @__PURE__ */ a(o.Text, { children: e("previewAlert.description") })
|
|
158
|
+
}
|
|
159
|
+
) }) })
|
|
160
|
+
] }) }),
|
|
161
|
+
/* @__PURE__ */ a(F, { children: /* @__PURE__ */ a(o.Button, { type: "submit", isLoading: r.status.isPending, children: e("saveCta") }) })
|
|
162
|
+
]
|
|
163
|
+
}
|
|
164
|
+
) }) });
|
|
165
|
+
}
|
|
166
|
+
function X({ FallbackComponent: c, ...m }) {
|
|
167
|
+
return /* @__PURE__ */ a(U, { componentName: "UNSTABLE.PayScheduleForm", FallbackComponent: c, children: /* @__PURE__ */ a(x, { ...m }) });
|
|
168
|
+
}
|
|
169
|
+
export {
|
|
170
|
+
X as PayScheduleForm
|
|
171
|
+
};
|
|
172
|
+
//# sourceMappingURL=PayScheduleForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayScheduleForm.js","sources":["../../../../../src/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { SDKFormProvider } from '../../form/SDKFormProvider'\nimport { usePayScheduleForm } from './usePayScheduleForm'\nimport type { UsePayScheduleFormProps } from './usePayScheduleForm'\nimport style from './PayScheduleForm.module.scss'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { BaseBoundaries, BaseLayout, type BaseComponentInterface } from '@/components/Base'\nimport { Form } from '@/components/Common/Form'\nimport { Flex, Grid, ActionsLayout } from '@/components/Common'\nimport { componentEvents } from '@/shared/constants'\nimport { useComponentDictionary, useI18n } from '@/i18n'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\nexport interface PayScheduleFormProps\n extends UsePayScheduleFormProps, Omit<BaseComponentInterface, 'defaultValues'> {}\n\nfunction PayScheduleFormRoot({ onEvent, dictionary, ...hookProps }: PayScheduleFormProps) {\n useI18n('UNSTABLE.PayScheduleForm')\n useComponentDictionary('UNSTABLE.PayScheduleForm', dictionary)\n const { t } = useTranslation('UNSTABLE.PayScheduleForm')\n const Components = useComponentContext()\n const dateFormatter = useDateFormatter()\n const paySchedule = usePayScheduleForm(hookProps)\n\n const [selectedPayPeriodIndex, setSelectedPayPeriodIndex] = useState(0)\n\n if (paySchedule.isLoading) {\n return <BaseLayout isLoading error={paySchedule.errorHandling.errors} />\n }\n\n const { Fields } = paySchedule.form\n const { payPeriodPreview, payPreviewLoading, paymentSpeedDays } = paySchedule.data\n\n const handleSubmit = async () => {\n const result = await paySchedule.actions.onSubmit()\n if (result) {\n onEvent(\n result.mode === 'create'\n ? componentEvents.PAY_SCHEDULE_CREATED\n : componentEvents.PAY_SCHEDULE_UPDATED,\n result.data,\n )\n }\n }\n\n const selectedPeriod = payPeriodPreview?.[selectedPayPeriodIndex]\n\n return (\n <BaseLayout error={paySchedule.errorHandling.errors}>\n <SDKFormProvider formHookResult={paySchedule}>\n <Form\n onSubmit={e => {\n e.preventDefault()\n void handleSubmit()\n }}\n >\n <Components.Heading as=\"h2\">\n {paySchedule.status.mode === 'create' ? t('addTitle') : t('editTitle')}\n </Components.Heading>\n\n <div className={style.payScheduleContainer}>\n <Grid gap={32} gridTemplateColumns={{ base: '1fr', small: '1fr 1fr' }}>\n <div className={style.payScheduleForm}>\n <Flex flexDirection=\"column\">\n <Fields.CustomName\n label={t('labels.name')}\n validationMessages={{\n REQUIRED: t('fieldValidations.customName.REQUIRED'),\n }}\n />\n\n <Fields.Frequency\n label={t('labels.frequency')}\n getOptionLabel={freq => t(`frequencies.${freq}`, freq)}\n validationMessages={{\n REQUIRED: t('fieldValidations.frequency.REQUIRED'),\n }}\n />\n\n {Fields.CustomTwicePerMonth && (\n <Fields.CustomTwicePerMonth\n label={t('labels.frequencyOptions')}\n description={t('descriptions.frequencyOptionsDescription')}\n />\n )}\n\n <Fields.AnchorPayDate\n label={t('labels.firstPayDate')}\n description={t('descriptions.anchorPayDateDescription', {\n count: paymentSpeedDays,\n })}\n validationMessages={{\n REQUIRED: t('fieldValidations.anchorPayDate.REQUIRED'),\n }}\n />\n\n <Fields.AnchorEndOfPayPeriod\n label={t('labels.firstPayPeriodEndDate')}\n description={t('descriptions.anchorEndOfPayPeriodDescription')}\n validationMessages={{\n REQUIRED: t('fieldValidations.anchorEndOfPayPeriod.REQUIRED'),\n }}\n />\n\n {Fields.Day1 ? (\n <Fields.Day1\n label={t('labels.firstPayDayOfTheMonth')}\n validationMessages={{\n REQUIRED: t('fieldValidations.day1.REQUIRED'),\n DAY_RANGE: t('fieldValidations.day1.DAY_RANGE'),\n }}\n />\n ) : (\n <div className={style.visuallyHidden} />\n )}\n\n {Fields.Day2 ? (\n <Fields.Day2\n label={t('labels.lastPayDayOfTheMonth')}\n validationMessages={{\n REQUIRED: t('fieldValidations.day2.REQUIRED'),\n DAY_RANGE: t('fieldValidations.day2.DAY_RANGE'),\n }}\n />\n ) : (\n <div className={style.visuallyHidden} />\n )}\n </Flex>\n </div>\n\n <Flex flexDirection=\"column\" gap={4} justifyContent=\"center\" alignItems=\"center\">\n {payPeriodPreview && selectedPeriod ? (\n <div className={style.calendarContainer}>\n {!payPreviewLoading && (\n <Components.Select\n label={t('labels.preview')}\n isRequired\n options={payPeriodPreview.map((period, index) => ({\n value: String(index),\n label: dateFormatter.formatPayPeriodRange(\n period.startDate.toString(),\n period.endDate.toString(),\n ),\n }))}\n value={String(selectedPayPeriodIndex)}\n onChange={(value: string) => {\n const numericValue = Number(value)\n if (!isNaN(numericValue)) {\n setSelectedPayPeriodIndex(numericValue)\n }\n }}\n />\n )}\n <Components.CalendarPreview\n key={selectedPayPeriodIndex}\n dateRange={{\n start: new Date(selectedPeriod.startDate.toString()),\n end: new Date(selectedPeriod.endDate.toString()),\n label: t('payPreview.payPeriod'),\n }}\n highlightDates={[\n {\n date: new Date(selectedPeriod.checkDate.toString()),\n highlightColor: 'primary',\n label: t('payPreview.payday'),\n },\n {\n date: new Date(selectedPeriod.runPayrollBy.toString()),\n highlightColor: 'secondary',\n label: t('payPreview.payrollDeadline'),\n },\n ]}\n />\n </div>\n ) : (\n <div className={style.calendarContainer}>\n <Components.Alert\n status=\"info\"\n label={t('previewAlert.title')}\n disableScrollIntoView\n >\n <Components.Text>{t('previewAlert.description')}</Components.Text>\n </Components.Alert>\n </div>\n )}\n </Flex>\n </Grid>\n </div>\n\n <ActionsLayout>\n <Components.Button type=\"submit\" isLoading={paySchedule.status.isPending}>\n {t('saveCta')}\n </Components.Button>\n </ActionsLayout>\n </Form>\n </SDKFormProvider>\n </BaseLayout>\n )\n}\n\nexport function PayScheduleForm({ FallbackComponent, ...props }: PayScheduleFormProps) {\n return (\n <BaseBoundaries componentName=\"UNSTABLE.PayScheduleForm\" FallbackComponent={FallbackComponent}>\n <PayScheduleFormRoot {...props} />\n </BaseBoundaries>\n )\n}\n"],"names":["PayScheduleFormRoot","onEvent","dictionary","hookProps","useI18n","useComponentDictionary","t","useTranslation","Components","useComponentContext","dateFormatter","useDateFormatter","paySchedule","usePayScheduleForm","selectedPayPeriodIndex","setSelectedPayPeriodIndex","useState","BaseLayout","Fields","payPeriodPreview","payPreviewLoading","paymentSpeedDays","handleSubmit","result","componentEvents","selectedPeriod","jsx","SDKFormProvider","jsxs","Form","e","style","Grid","Flex","freq","period","index","value","numericValue","ActionsLayout","PayScheduleForm","FallbackComponent","props","BaseBoundaries"],"mappings":";;;;;;;;;;;;;;;;AAiBA,SAASA,EAAoB,EAAE,SAAAC,GAAS,YAAAC,GAAY,GAAGC,KAAmC;AACxF,EAAAC,EAAQ,0BAA0B,GAClCC,EAAuB,4BAA4BH,CAAU;AAC7D,QAAM,EAAE,GAAAI,EAAA,IAAMC,EAAe,0BAA0B,GACjDC,IAAaC,EAAA,GACbC,IAAgBC,EAAA,GAChBC,IAAcC,EAAmBV,CAAS,GAE1C,CAACW,GAAwBC,CAAyB,IAAIC,EAAS,CAAC;AAEtE,MAAIJ,EAAY;AACd,6BAAQK,GAAA,EAAW,WAAS,IAAC,OAAOL,EAAY,cAAc,QAAQ;AAGxE,QAAM,EAAE,QAAAM,MAAWN,EAAY,MACzB,EAA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BACrD,gBAAgB;AAAA,oBAChB,OAAOnB,EAAE,4BAA4B;AAAA,kBAAA;AAAA,gBACvC;AAAA,cACF;AAAA,cAjBKQ;AAAA,YAAA;AAAA,UAkBP,GACF,IAEA,gBAAAY,EAAC,OAAA,EAAI,WAAWK,EAAM,mBACpB,UAAA,gBAAAL;AAAA,YAAClB,EAAW;AAAA,YAAX;AAAA,cACC,QAAO;AAAA,cACP,OAAOF,EAAE,oBAAoB;AAAA,cAC7B,uBAAqB;AAAA,cAErB,4BAACE,EAAW,MAAX,EAAiB,UAAAF,EAAE,0BAA0B,EAAA,CAAE;AAAA,YAAA;AAAA,UAAA,GAEpD,EAAA,CAEJ;AAAA,QAAA,EAAA,CACF,EAAA,CACF;AAAA,QAEA,gBAAAoB,EAACa,GAAA,EACC,UAAA,gBAAAb,EAAClB,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAWI,EAAY,OAAO,WAC5D,UAAAN,EAAE,SAAS,GACd,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAEJ,EAAA,CACF;AAEJ;AAEO,SAASkC,EAAgB,EAAE,mBAAAC,GAAmB,GAAGC,KAA+B;AACrF,SACE,gBAAAhB,EAACiB,KAAe,eAAc,4BAA2B,mBAAAF,GACvD,UAAA,gBAAAf,EAAC1B,GAAA,EAAqB,GAAG0C,EAAA,CAAO,EAAA,CAClC;AAEJ;"}
|
package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.module.scss.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const a = "_payScheduleContainer_masn5_1", e = "_payScheduleForm_masn5_5", n = "_visuallyHidden_masn5_9", l = "_calendarContainer_masn5_13", d = {
|
|
2
|
+
payScheduleContainer: a,
|
|
3
|
+
payScheduleForm: e,
|
|
4
|
+
visuallyHidden: n,
|
|
5
|
+
calendarContainer: l
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
l as calendarContainer,
|
|
9
|
+
d as default,
|
|
10
|
+
a as payScheduleContainer,
|
|
11
|
+
e as payScheduleForm,
|
|
12
|
+
n as visuallyHidden
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=PayScheduleForm.module.scss.js.map
|
package/dist/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/PayScheduleForm.module.scss.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PayScheduleForm.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TextInputHookFieldProps } from '../../form/fields/TextInputHookField';
|
|
2
|
+
import { SelectHookFieldProps } from '../../form/fields/SelectHookField';
|
|
3
|
+
import { RadioGroupHookFieldProps } from '../../form/fields/RadioGroupHookField';
|
|
4
|
+
import { DatePickerHookFieldProps } from '../../form/fields/DatePickerHookField';
|
|
5
|
+
import { NumberInputHookFieldProps } from '../../form/fields/NumberInputHookField';
|
|
6
|
+
import { PayScheduleErrorCodes, PayScheduleFrequency } from './payScheduleSchema';
|
|
7
|
+
import { HookFieldProps } from '../../../../types/sdkHooks';
|
|
8
|
+
export type RequiredValidation = typeof PayScheduleErrorCodes.REQUIRED;
|
|
9
|
+
export type DayValidation = (typeof PayScheduleErrorCodes)['REQUIRED' | 'DAY_RANGE'];
|
|
10
|
+
export type CustomNameFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>;
|
|
11
|
+
export declare function CustomNameField(props: CustomNameFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export type FrequencyFieldProps = HookFieldProps<SelectHookFieldProps<RequiredValidation, PayScheduleFrequency>>;
|
|
13
|
+
export declare function FrequencyField(props: FrequencyFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export type CustomTwicePerMonthFieldProps = HookFieldProps<RadioGroupHookFieldProps<never, string>>;
|
|
15
|
+
export declare function CustomTwicePerMonthField(props: CustomTwicePerMonthFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export type AnchorPayDateFieldProps = HookFieldProps<DatePickerHookFieldProps<RequiredValidation>>;
|
|
17
|
+
export declare function AnchorPayDateField(props: AnchorPayDateFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export type AnchorEndOfPayPeriodFieldProps = HookFieldProps<DatePickerHookFieldProps<RequiredValidation>>;
|
|
19
|
+
export declare function AnchorEndOfPayPeriodField(props: AnchorEndOfPayPeriodFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export type Day1FieldProps = HookFieldProps<NumberInputHookFieldProps<DayValidation>>;
|
|
21
|
+
export declare function Day1Field(props: Day1FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export type Day2FieldProps = HookFieldProps<NumberInputHookFieldProps<DayValidation>>;
|
|
23
|
+
export declare function Day2Field(props: Day2FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { NumberInputHookField as n } from "../../form/fields/NumberInputHookField.js";
|
|
3
|
+
import { DatePickerHookField as r } from "../../form/fields/DatePickerHookField.js";
|
|
4
|
+
import { RadioGroupHookField as t } from "../../form/fields/RadioGroupHookField.js";
|
|
5
|
+
import { SelectHookField as i } from "../../form/fields/SelectHookField.js";
|
|
6
|
+
import { TextInputHookField as m } from "../../form/fields/TextInputHookField.js";
|
|
7
|
+
function F(e) {
|
|
8
|
+
return /* @__PURE__ */ o(m, { ...e, name: "customName" });
|
|
9
|
+
}
|
|
10
|
+
function p(e) {
|
|
11
|
+
return /* @__PURE__ */ o(i, { ...e, name: "frequency" });
|
|
12
|
+
}
|
|
13
|
+
function y(e) {
|
|
14
|
+
return /* @__PURE__ */ o(t, { ...e, name: "customTwicePerMonth" });
|
|
15
|
+
}
|
|
16
|
+
function P(e) {
|
|
17
|
+
return /* @__PURE__ */ o(r, { ...e, name: "anchorPayDate" });
|
|
18
|
+
}
|
|
19
|
+
function h(e) {
|
|
20
|
+
return /* @__PURE__ */ o(r, { ...e, name: "anchorEndOfPayPeriod" });
|
|
21
|
+
}
|
|
22
|
+
function k(e) {
|
|
23
|
+
return /* @__PURE__ */ o(n, { ...e, name: "day1", min: 1, max: 31 });
|
|
24
|
+
}
|
|
25
|
+
function s(e) {
|
|
26
|
+
return /* @__PURE__ */ o(n, { ...e, name: "day2", min: 1, max: 31 });
|
|
27
|
+
}
|
|
28
|
+
export {
|
|
29
|
+
h as AnchorEndOfPayPeriodField,
|
|
30
|
+
P as AnchorPayDateField,
|
|
31
|
+
F as CustomNameField,
|
|
32
|
+
y as CustomTwicePerMonthField,
|
|
33
|
+
k as Day1Field,
|
|
34
|
+
s as Day2Field,
|
|
35
|
+
p as FrequencyField
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=fields.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sources":["../../../../../src/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/fields.tsx"],"sourcesContent":["import type { TextInputHookFieldProps } from '../../form/fields/TextInputHookField'\nimport type { SelectHookFieldProps } from '../../form/fields/SelectHookField'\nimport type { RadioGroupHookFieldProps } from '../../form/fields/RadioGroupHookField'\nimport type { DatePickerHookFieldProps } from '../../form/fields/DatePickerHookField'\nimport type { NumberInputHookFieldProps } from '../../form/fields/NumberInputHookField'\nimport {\n TextInputHookField,\n SelectHookField,\n RadioGroupHookField,\n DatePickerHookField,\n NumberInputHookField,\n} from '../../form/fields'\nimport type { PayScheduleErrorCodes, PayScheduleFrequency } from './payScheduleSchema'\nimport type { HookFieldProps } from '@/types/sdkHooks'\n\nexport type RequiredValidation = typeof PayScheduleErrorCodes.REQUIRED\nexport type DayValidation = (typeof PayScheduleErrorCodes)['REQUIRED' | 'DAY_RANGE']\n\nexport type CustomNameFieldProps = HookFieldProps<TextInputHookFieldProps<RequiredValidation>>\n\nexport function CustomNameField(props: CustomNameFieldProps) {\n return <TextInputHookField {...props} name=\"customName\" />\n}\n\nexport type FrequencyFieldProps = HookFieldProps<\n SelectHookFieldProps<RequiredValidation, PayScheduleFrequency>\n>\n\nexport function FrequencyField(props: FrequencyFieldProps) {\n return <SelectHookField {...props} name=\"frequency\" />\n}\n\nexport type CustomTwicePerMonthFieldProps = HookFieldProps<RadioGroupHookFieldProps<never, string>>\n\nexport function CustomTwicePerMonthField(props: CustomTwicePerMonthFieldProps) {\n return <RadioGroupHookField {...props} name=\"customTwicePerMonth\" />\n}\n\nexport type AnchorPayDateFieldProps = HookFieldProps<DatePickerHookFieldProps<RequiredValidation>>\n\nexport function AnchorPayDateField(props: AnchorPayDateFieldProps) {\n return <DatePickerHookField {...props} name=\"anchorPayDate\" />\n}\n\nexport type AnchorEndOfPayPeriodFieldProps = HookFieldProps<\n DatePickerHookFieldProps<RequiredValidation>\n>\n\nexport function AnchorEndOfPayPeriodField(props: AnchorEndOfPayPeriodFieldProps) {\n return <DatePickerHookField {...props} name=\"anchorEndOfPayPeriod\" />\n}\n\nexport type Day1FieldProps = HookFieldProps<NumberInputHookFieldProps<DayValidation>>\n\nexport function Day1Field(props: Day1FieldProps) {\n return <NumberInputHookField {...props} name=\"day1\" min={1} max={31} />\n}\n\nexport type Day2FieldProps = HookFieldProps<NumberInputHookFieldProps<DayValidation>>\n\nexport function Day2Field(props: Day2FieldProps) {\n return <NumberInputHookField {...props} name=\"day2\" min={1} max={31} />\n}\n"],"names":["CustomNameField","props","jsx","TextInputHookField","FrequencyField","SelectHookField","CustomTwicePerMonthField","RadioGroupHookField","AnchorPayDateField","DatePickerHookField","AnchorEndOfPayPeriodField","Day1Field","NumberInputHookField","Day2Field"],"mappings":";;;;;;AAoBO,SAASA,EAAgBC,GAA6B;AAC3D,SAAO,gBAAAC,EAACC,GAAA,EAAoB,GAAGF,GAAO,MAAK,cAAa;AAC1D;AAMO,SAASG,EAAeH,GAA4B;AACzD,SAAO,gBAAAC,EAACG,GAAA,EAAiB,GAAGJ,GAAO,MAAK,aAAY;AACtD;AAIO,SAASK,EAAyBL,GAAsC;AAC7E,SAAO,gBAAAC,EAACK,GAAA,EAAqB,GAAGN,GAAO,MAAK,uBAAsB;AACpE;AAIO,SAASO,EAAmBP,GAAgC;AACjE,SAAO,gBAAAC,EAACO,GAAA,EAAqB,GAAGR,GAAO,MAAK,iBAAgB;AAC9D;AAMO,SAASS,EAA0BT,GAAuC;AAC/E,SAAO,gBAAAC,EAACO,GAAA,EAAqB,GAAGR,GAAO,MAAK,wBAAuB;AACrE;AAIO,SAASU,EAAUV,GAAuB;AAC/C,SAAO,gBAAAC,EAACU,KAAsB,GAAGX,GAAO,MAAK,QAAO,KAAK,GAAG,KAAK,GAAA,CAAI;AACvE;AAIO,SAASY,EAAUZ,GAAuB;AAC/C,SAAO,gBAAAC,EAACU,KAAsB,GAAGX,GAAO,MAAK,QAAO,KAAK,GAAG,KAAK,GAAA,CAAI;AACvE;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "./types/i18next.d.ts"
|
|
2
|
+
export { usePayScheduleForm } from './usePayScheduleForm';
|
|
3
|
+
export type { PayScheduleOptionalFieldsToRequire, UsePayScheduleFormProps, UsePayScheduleFormResult, UsePayScheduleFormReady, PayScheduleFieldsMetadata, PayScheduleFormFields, } from './usePayScheduleForm';
|
|
4
|
+
export { PayScheduleForm } from './PayScheduleForm';
|
|
5
|
+
export type { PayScheduleFormProps } from './PayScheduleForm';
|
|
6
|
+
export { createPayScheduleSchema, PayScheduleErrorCodes, type PayScheduleErrorCode, type PayScheduleFormData, type PayScheduleFormOutputs, type PayScheduleField, type PayScheduleFrequency, } from './payScheduleSchema';
|
|
7
|
+
export type { RequiredValidation as PayScheduleRequiredValidation, DayValidation, CustomNameFieldProps, FrequencyFieldProps, CustomTwicePerMonthFieldProps, AnchorPayDateFieldProps, AnchorEndOfPayPeriodFieldProps, Day1FieldProps, Day2FieldProps, } from './fields';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { OptionalFieldsToRequire } from '../../form/buildFormSchema';
|
|
3
|
+
export declare const PayScheduleErrorCodes: {
|
|
4
|
+
readonly REQUIRED: "REQUIRED";
|
|
5
|
+
readonly DAY_RANGE: "DAY_RANGE";
|
|
6
|
+
};
|
|
7
|
+
export type PayScheduleErrorCode = (typeof PayScheduleErrorCodes)[keyof typeof PayScheduleErrorCodes];
|
|
8
|
+
declare const FREQUENCY_VALUES: readonly ["Every week", "Every other week", "Twice per month", "Monthly"];
|
|
9
|
+
export type PayScheduleFrequency = (typeof FREQUENCY_VALUES)[number];
|
|
10
|
+
declare const fieldValidators: {
|
|
11
|
+
customName: z.ZodString;
|
|
12
|
+
frequency: z.ZodEnum<{
|
|
13
|
+
"Every week": "Every week";
|
|
14
|
+
"Every other week": "Every other week";
|
|
15
|
+
"Twice per month": "Twice per month";
|
|
16
|
+
Monthly: "Monthly";
|
|
17
|
+
}>;
|
|
18
|
+
customTwicePerMonth: z.ZodString;
|
|
19
|
+
anchorPayDate: z.ZodPipe<z.ZodTransform<string | null, unknown>, z.ZodNullable<z.ZodISODate>>;
|
|
20
|
+
anchorEndOfPayPeriod: z.ZodPipe<z.ZodTransform<string | null, unknown>, z.ZodNullable<z.ZodISODate>>;
|
|
21
|
+
day1: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
22
|
+
day2: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
23
|
+
};
|
|
24
|
+
export type PayScheduleField = keyof typeof fieldValidators;
|
|
25
|
+
export type PayScheduleFormData = {
|
|
26
|
+
[K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>;
|
|
27
|
+
};
|
|
28
|
+
export type PayScheduleFormOutputs = PayScheduleFormData;
|
|
29
|
+
declare function needsDay1(data: PayScheduleFormData): boolean;
|
|
30
|
+
declare function needsDay2(data: PayScheduleFormData): boolean;
|
|
31
|
+
declare const requiredFieldsConfig: {
|
|
32
|
+
customTwicePerMonth: "never";
|
|
33
|
+
day1: typeof needsDay1;
|
|
34
|
+
day2: typeof needsDay2;
|
|
35
|
+
};
|
|
36
|
+
export type PayScheduleOptionalFieldsToRequire = OptionalFieldsToRequire<typeof requiredFieldsConfig>;
|
|
37
|
+
interface PayScheduleSchemaOptions {
|
|
38
|
+
mode?: 'create' | 'update';
|
|
39
|
+
optionalFieldsToRequire?: PayScheduleOptionalFieldsToRequire;
|
|
40
|
+
}
|
|
41
|
+
export declare function createPayScheduleSchema(options?: PayScheduleSchemaOptions): import('../../form').BuildFormSchemaResult<{
|
|
42
|
+
customName: z.ZodString;
|
|
43
|
+
frequency: z.ZodEnum<{
|
|
44
|
+
"Every week": "Every week";
|
|
45
|
+
"Every other week": "Every other week";
|
|
46
|
+
"Twice per month": "Twice per month";
|
|
47
|
+
Monthly: "Monthly";
|
|
48
|
+
}>;
|
|
49
|
+
customTwicePerMonth: z.ZodString;
|
|
50
|
+
anchorPayDate: z.ZodPipe<z.ZodTransform<string | null, unknown>, z.ZodNullable<z.ZodISODate>>;
|
|
51
|
+
anchorEndOfPayPeriod: z.ZodPipe<z.ZodTransform<string | null, unknown>, z.ZodNullable<z.ZodISODate>>;
|
|
52
|
+
day1: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
53
|
+
day2: z.ZodPipe<z.ZodTransform<number, unknown>, z.ZodNumber>;
|
|
54
|
+
}>;
|
|
55
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { z as o } from "zod";
|
|
2
|
+
import { buildFormSchema as d } from "../../form/buildFormSchema.js";
|
|
3
|
+
import { coerceNaN as n, coerceToISODate as t } from "../../form/preprocessors.js";
|
|
4
|
+
const c = {
|
|
5
|
+
REQUIRED: "REQUIRED",
|
|
6
|
+
DAY_RANGE: "DAY_RANGE"
|
|
7
|
+
}, m = ["Every week", "Every other week", "Twice per month", "Monthly"], a = {
|
|
8
|
+
customName: o.string(),
|
|
9
|
+
frequency: o.enum(m),
|
|
10
|
+
customTwicePerMonth: o.string(),
|
|
11
|
+
anchorPayDate: o.preprocess(t, o.iso.date().nullable()),
|
|
12
|
+
anchorEndOfPayPeriod: o.preprocess(t, o.iso.date().nullable()),
|
|
13
|
+
day1: o.preprocess(n(0), o.number()),
|
|
14
|
+
day2: o.preprocess(n(0), o.number())
|
|
15
|
+
};
|
|
16
|
+
function u(e) {
|
|
17
|
+
const r = e.frequency, s = e.customTwicePerMonth;
|
|
18
|
+
return r === "Monthly" || r === "Twice per month" && s === "custom";
|
|
19
|
+
}
|
|
20
|
+
function i(e) {
|
|
21
|
+
const r = e.frequency, s = e.customTwicePerMonth;
|
|
22
|
+
return r === "Twice per month" && s === "custom";
|
|
23
|
+
}
|
|
24
|
+
const y = {
|
|
25
|
+
customTwicePerMonth: "never",
|
|
26
|
+
day1: u,
|
|
27
|
+
day2: i
|
|
28
|
+
};
|
|
29
|
+
function E(e, r) {
|
|
30
|
+
u(e) && (e.day1 < 1 || e.day1 > 31) && r.addIssue({
|
|
31
|
+
code: o.ZodIssueCode.custom,
|
|
32
|
+
path: ["day1"],
|
|
33
|
+
message: e.day1 < 1 ? c.REQUIRED : c.DAY_RANGE
|
|
34
|
+
}), i(e) && (e.day2 < 1 || e.day2 > 31) && r.addIssue({
|
|
35
|
+
code: o.ZodIssueCode.custom,
|
|
36
|
+
path: ["day2"],
|
|
37
|
+
message: e.day2 < 1 ? c.REQUIRED : c.DAY_RANGE
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function R(e = {}) {
|
|
41
|
+
const { mode: r = "create", optionalFieldsToRequire: s } = e;
|
|
42
|
+
return d(a, {
|
|
43
|
+
requiredFieldsConfig: y,
|
|
44
|
+
requiredErrorCode: c.REQUIRED,
|
|
45
|
+
mode: r,
|
|
46
|
+
optionalFieldsToRequire: s,
|
|
47
|
+
superRefine: E
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
c as PayScheduleErrorCodes,
|
|
52
|
+
R as createPayScheduleSchema
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=payScheduleSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payScheduleSchema.js","sources":["../../../../../src/components/UNSTABLE_Hooks/hooks/usePayScheduleForm/payScheduleSchema.ts"],"sourcesContent":["import { z } from 'zod'\nimport {\n buildFormSchema,\n type RequiredFieldConfig,\n type OptionalFieldsToRequire,\n} from '../../form/buildFormSchema'\nimport { coerceNaN, coerceToISODate } from '../../form/preprocessors'\n\n// ── Error codes ────────────────────────────────────────────────────────\n\nexport const PayScheduleErrorCodes = {\n REQUIRED: 'REQUIRED',\n DAY_RANGE: 'DAY_RANGE',\n} as const\n\nexport type PayScheduleErrorCode =\n (typeof PayScheduleErrorCodes)[keyof typeof PayScheduleErrorCodes]\n\n// ── Field validators ───────────────────────────────────────────────────\n\nconst FREQUENCY_VALUES = ['Every week', 'Every other week', 'Twice per month', 'Monthly'] as const\nexport type PayScheduleFrequency = (typeof FREQUENCY_VALUES)[number]\n\nconst fieldValidators = {\n customName: z.string(),\n frequency: z.enum(FREQUENCY_VALUES),\n customTwicePerMonth: z.string(),\n anchorPayDate: z.preprocess(coerceToISODate, z.iso.date().nullable()),\n anchorEndOfPayPeriod: z.preprocess(coerceToISODate, z.iso.date().nullable()),\n day1: z.preprocess(coerceNaN(0), z.number()),\n day2: z.preprocess(coerceNaN(0), z.number()),\n}\n\nexport type PayScheduleField = keyof typeof fieldValidators\n\nexport type PayScheduleFormData = {\n [K in keyof typeof fieldValidators]: z.infer<(typeof fieldValidators)[K]>\n}\nexport type PayScheduleFormOutputs = PayScheduleFormData\n\n// ── Required fields config ─────────────────────────────────────────────\n\nfunction needsDay1(data: PayScheduleFormData): boolean {\n const freq = data.frequency\n const custom = data.customTwicePerMonth\n return freq === 'Monthly' || (freq === 'Twice per month' && custom === 'custom')\n}\n\nfunction needsDay2(data: PayScheduleFormData): boolean {\n const freq = data.frequency\n const custom = data.customTwicePerMonth\n return freq === 'Twice per month' && custom === 'custom'\n}\n\nconst requiredFieldsConfig = {\n customTwicePerMonth: 'never',\n day1: needsDay1,\n day2: needsDay2,\n} satisfies RequiredFieldConfig<typeof fieldValidators>\n\n/**\n * coerceNaN(0) maps empty inputs to 0, which `isEmpty` does not catch\n * (it only recognizes undefined/null/blank-string). This superRefine\n * enforces the 1–31 range when the field is applicable, which also\n * rejects the 0 sentinel from empty inputs.\n */\nfunction validateDayRanges(data: PayScheduleFormData, ctx: z.RefinementCtx) {\n if (needsDay1(data) && (data.day1 < 1 || data.day1 > 31)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['day1'],\n message: data.day1 < 1 ? PayScheduleErrorCodes.REQUIRED : PayScheduleErrorCodes.DAY_RANGE,\n })\n }\n if (needsDay2(data) && (data.day2 < 1 || data.day2 > 31)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: ['day2'],\n message: data.day2 < 1 ? PayScheduleErrorCodes.REQUIRED : PayScheduleErrorCodes.DAY_RANGE,\n })\n }\n}\n\n// ── Schema factory ─────────────────────────────────────────────────────\n\nexport type PayScheduleOptionalFieldsToRequire = OptionalFieldsToRequire<\n typeof requiredFieldsConfig\n>\n\ninterface PayScheduleSchemaOptions {\n mode?: 'create' | 'update'\n optionalFieldsToRequire?: PayScheduleOptionalFieldsToRequire\n}\n\nexport function createPayScheduleSchema(options: PayScheduleSchemaOptions = {}) {\n const { mode = 'create', optionalFieldsToRequire } = options\n\n return buildFormSchema(fieldValidators, {\n requiredFieldsConfig,\n requiredErrorCode: PayScheduleErrorCodes.REQUIRED,\n mode,\n optionalFieldsToRequire,\n superRefine: validateDayRanges,\n })\n}\n"],"names":["PayScheduleErrorCodes","FREQUENCY_VALUES","fieldValidators","z","coerceToISODate","coerceNaN","needsDay1","data","freq","custom","needsDay2","requiredFieldsConfig","validateDayRanges","ctx","createPayScheduleSchema","options","mode","optionalFieldsToRequire","buildFormSchema"],"mappings":";;;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AAK,OAAO,IAAIP,EAAsB,WAAWA,EAAsB;AAAA,EAAA,CACjF;AAEL;AAaO,SAASc,EAAwBC,IAAoC,IAAI;AAC9E,QAAM,EAAE,MAAAC,IAAO,UAAU,yBAAAC,EAAA,IAA4BF;AAErD,SAAOG,EAAgBhB,GAAiB;AAAA,IACtC,sBAAAS;AAAA,IACA,mBAAmBX,EAAsB;AAAA,IACzC,MAAAgB;AAAA,IACA,yBAAAC;AAAA,IACA,aAAaL;AAAA,EAAA,CACd;AACH;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { UseFormProps } from 'react-hook-form';
|
|
2
|
+
import { PaySchedule } from '@gusto/embedded-api/models/components/payschedule';
|
|
3
|
+
import { PaySchedulePreviewPayPeriod } from '@gusto/embedded-api/models/components/payschedulepreviewpayperiod';
|
|
4
|
+
import { PayScheduleOptionalFieldsToRequire, PayScheduleFormData } from './payScheduleSchema';
|
|
5
|
+
import { CustomNameField, FrequencyField, CustomTwicePerMonthField, AnchorPayDateField, AnchorEndOfPayPeriodField, Day1Field, Day2Field } from './fields';
|
|
6
|
+
import { HookSubmitResult } from '../../../../types/sdkHooks';
|
|
7
|
+
export type { PayScheduleOptionalFieldsToRequire } from './payScheduleSchema';
|
|
8
|
+
export interface UsePayScheduleFormProps {
|
|
9
|
+
companyId: string;
|
|
10
|
+
payScheduleId?: string;
|
|
11
|
+
optionalFieldsToRequire?: PayScheduleOptionalFieldsToRequire;
|
|
12
|
+
defaultValues?: Partial<PayScheduleFormData>;
|
|
13
|
+
validationMode?: UseFormProps['mode'];
|
|
14
|
+
shouldFocusError?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function usePayScheduleForm({ companyId, payScheduleId, optionalFieldsToRequire, defaultValues: partnerDefaults, validationMode, shouldFocusError, }: UsePayScheduleFormProps): {
|
|
17
|
+
isLoading: true;
|
|
18
|
+
errorHandling: import('../../../../types/sdkHooks').HookErrorHandling;
|
|
19
|
+
data?: undefined;
|
|
20
|
+
status?: undefined;
|
|
21
|
+
actions?: undefined;
|
|
22
|
+
form?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
isLoading: false;
|
|
25
|
+
data: {
|
|
26
|
+
paySchedule: PaySchedule | null;
|
|
27
|
+
payPeriodPreview: PaySchedulePreviewPayPeriod[] | null;
|
|
28
|
+
payPreviewLoading: boolean;
|
|
29
|
+
paymentSpeedDays: number;
|
|
30
|
+
};
|
|
31
|
+
status: {
|
|
32
|
+
isPending: boolean;
|
|
33
|
+
mode: "create" | "update";
|
|
34
|
+
};
|
|
35
|
+
actions: {
|
|
36
|
+
onSubmit: () => Promise<HookSubmitResult<PaySchedule> | undefined>;
|
|
37
|
+
};
|
|
38
|
+
errorHandling: import('../../../../types/sdkHooks').HookErrorHandling;
|
|
39
|
+
form: {
|
|
40
|
+
Fields: {
|
|
41
|
+
CustomName: typeof CustomNameField;
|
|
42
|
+
Frequency: typeof FrequencyField;
|
|
43
|
+
CustomTwicePerMonth: typeof CustomTwicePerMonthField | undefined;
|
|
44
|
+
AnchorPayDate: typeof AnchorPayDateField;
|
|
45
|
+
AnchorEndOfPayPeriod: typeof AnchorEndOfPayPeriodField;
|
|
46
|
+
Day1: typeof Day1Field | undefined;
|
|
47
|
+
Day2: typeof Day2Field | undefined;
|
|
48
|
+
};
|
|
49
|
+
fieldsMetadata: {
|
|
50
|
+
customName: import('../../../../types/sdkHooks').FieldMetadata;
|
|
51
|
+
frequency: import('../../../../types/sdkHooks').FieldMetadataWithOptions<"Every week" | "Every other week" | "Twice per month" | "Monthly">;
|
|
52
|
+
customTwicePerMonth: import('../../../../types/sdkHooks').FieldMetadataWithOptions<string>;
|
|
53
|
+
anchorPayDate: import('../../../../types/sdkHooks').FieldMetadata;
|
|
54
|
+
anchorEndOfPayPeriod: import('../../../../types/sdkHooks').FieldMetadata;
|
|
55
|
+
day1: import('../../../../types/sdkHooks').FieldMetadata;
|
|
56
|
+
day2: import('../../../../types/sdkHooks').FieldMetadata;
|
|
57
|
+
};
|
|
58
|
+
hookFormInternals: {
|
|
59
|
+
formMethods: import('react-hook-form').UseFormReturn<PayScheduleFormData, unknown, PayScheduleFormData>;
|
|
60
|
+
};
|
|
61
|
+
getFormSubmissionValues: () => PayScheduleFormData | undefined;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export type UsePayScheduleFormResult = ReturnType<typeof usePayScheduleForm>;
|
|
65
|
+
export type UsePayScheduleFormReady = Extract<UsePayScheduleFormResult, {
|
|
66
|
+
data: object;
|
|
67
|
+
}>;
|
|
68
|
+
export type PayScheduleFieldsMetadata = UsePayScheduleFormReady['form']['fieldsMetadata'];
|
|
69
|
+
export type PayScheduleFormFields = UsePayScheduleFormReady['form']['Fields'];
|