@gusto/embedded-react-sdk 0.24.1 → 0.25.0
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 +69 -0
- package/dist/assets/icons/slash-circle.svg.js +10 -0
- package/dist/assets/icons/slash-circle.svg.js.map +1 -0
- package/dist/components/Base/Base.d.ts +1 -1
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/Fields/FileInputField/FileInputField.d.ts +5 -0
- package/dist/components/Common/Fields/FileInputField/FileInputField.js +34 -0
- package/dist/components/Common/Fields/FileInputField/FileInputField.js.map +1 -0
- package/dist/components/Common/Fields/FileInputField/index.d.ts +2 -0
- package/dist/components/Common/PaginationControl/PaginationControl.js +41 -40
- package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +1 -0
- package/dist/components/Common/SignatureForm/SignatureForm.js +12 -11
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
- package/dist/components/Common/UI/FileInput/FileInput.d.ts +2 -0
- package/dist/components/Common/UI/FileInput/FileInput.js +151 -0
- package/dist/components/Common/UI/FileInput/FileInput.js.map +1 -0
- package/dist/components/Common/UI/FileInput/FileInput.module.scss.js +34 -0
- package/dist/components/Common/UI/FileInput/FileInput.module.scss.js.map +1 -0
- package/dist/components/Common/UI/FileInput/FileInputTypes.d.ts +45 -0
- package/dist/components/Common/UI/FileInput/FileInputTypes.js +8 -0
- package/dist/components/Common/UI/FileInput/FileInputTypes.js.map +1 -0
- package/dist/components/Common/UI/FileInput/index.d.ts +4 -0
- package/dist/components/Common/UI/TextInput/TextInput.js +27 -23
- package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
- package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +1 -1
- package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +5 -4
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +2 -2
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -2
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -2
- package/dist/components/Company/FederalTaxes/Form.js +3 -2
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -8
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -6
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +2 -2
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +35 -33
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +30 -29
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +1 -0
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +3 -2
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +3 -2
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -2
- package/dist/components/Company/OnboardingOverview/context.js +4 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +2 -2
- package/dist/components/Company/PaySchedule/_parts/Head.js +9 -8
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +2 -2
- package/dist/components/Contractor/Address/useAddress.js +6 -5
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +31 -30
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +61 -59
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +34 -31
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +29 -10
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +3 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +33 -31
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +2 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +25 -19
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +86 -56
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.d.ts +1 -2
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +46 -21
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +6 -15
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +116 -99
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.module.scss.js +8 -0
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.module.scss.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.d.ts +8 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js +51 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatement.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.d.ts +11 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +157 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js +22 -0
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +46 -48
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +4 -3
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +4 -3
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +4 -3
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +58 -56
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +3 -2
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +34 -32
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +1 -0
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +8 -8
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +4 -3
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +4 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Flow/Flow.js +3 -2
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.d.ts +15 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js +142 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +18 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js.map +1 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/index.d.ts +2 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.d.ts +7 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js +88 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestList/index.d.ts +2 -0
- package/dist/components/Payroll/InformationRequests/InformationRequests.d.ts +6 -0
- package/dist/components/Payroll/InformationRequests/InformationRequests.js +55 -0
- package/dist/components/Payroll/InformationRequests/InformationRequests.js.map +1 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.d.ts +19 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.js +20 -0
- package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.js.map +1 -0
- package/dist/components/Payroll/InformationRequests/index.d.ts +3 -0
- package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.d.ts +13 -0
- package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.js +47 -0
- package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.js.map +1 -0
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +7 -6
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +3 -2
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +116 -130
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +5 -2
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +107 -99
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js +2 -4
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +21 -0
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +105 -0
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +41 -37
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +5 -4
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +151 -145
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +14 -12
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +174 -106
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +28 -28
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +2 -2
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +84 -102
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +24 -20
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +2 -0
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +51 -46
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.d.ts +2 -0
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +111 -45
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +137 -125
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +8 -4
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +117 -110
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +4 -2
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +282 -278
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewTypes.d.ts +6 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewTypes.js +5 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewTypes.js.map +1 -0
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +3 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +6 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.js +55 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesComponents.d.ts +19 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesComponents.js +19 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesComponents.js.map +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.d.ts +7 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +73 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js +10 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js.map +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/index.d.ts +2 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.d.ts +14 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +46 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/index.d.ts +2 -0
- package/dist/components/Payroll/RecoveryCases/index.d.ts +3 -0
- package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.d.ts +13 -0
- package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js +47 -0
- package/dist/components/Payroll/RecoveryCases/recoveryCasesStateMachine.js.map +1 -0
- package/dist/components/Payroll/helpers.d.ts +12 -0
- package/dist/components/Payroll/helpers.js +129 -117
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +2 -0
- package/dist/components/Payroll/index.js +18 -14
- package/dist/components/Payroll/index.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.d.ts +4 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +43 -31
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +27 -25
- 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 +5 -0
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js +17 -15
- package/dist/contexts/ComponentAdapter/createComponentsWithDefaults.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js +3 -3
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +1 -0
- package/dist/helpers/dateFormatting.js +1 -0
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/helpers/formattedStrings.d.ts +1 -0
- package/dist/helpers/formattedStrings.js +23 -18
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/helpers/responsive.js +1 -1
- package/dist/helpers/responsive.js.map +1 -1
- package/dist/i18n/I18n.js +3 -3
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +36 -32
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js +11 -11
- package/dist/i18n/en/Contractor.Payments.PaymentStatement.json.js +28 -0
- package/dist/i18n/en/Contractor.Payments.PaymentStatement.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +14 -14
- package/dist/i18n/en/Payroll.InformationRequestForm.json.js +18 -0
- package/dist/i18n/en/Payroll.InformationRequestForm.json.js.map +1 -0
- package/dist/i18n/en/Payroll.InformationRequestList.json.js +18 -0
- package/dist/i18n/en/Payroll.InformationRequestList.json.js.map +1 -0
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +27 -21
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollHistory.json.js +6 -6
- package/dist/i18n/en/Payroll.PayrollLanding.json.js +5 -3
- package/dist/i18n/en/Payroll.PayrollLanding.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +32 -28
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/Payroll.RecoveryCasesList.json.js +14 -0
- package/dist/i18n/en/Payroll.RecoveryCasesList.json.js.map +1 -0
- package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js +8 -0
- package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js.map +1 -0
- package/dist/i18n/en/common.json.d.ts +5 -0
- package/dist/i18n/en/common.json.js +4 -2
- package/dist/i18n/en/common.json.js.map +1 -1
- package/dist/shared/constants.d.ts +24 -0
- package/dist/shared/constants.js +70 -54
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +119 -3
- package/package.json +31 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,74 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.25.0
|
|
4
|
+
|
|
5
|
+
### Features & Enhancements
|
|
6
|
+
|
|
7
|
+
- Add functionality for information request form
|
|
8
|
+
- Add functionality to information request list
|
|
9
|
+
- Add FileInputField and adapter
|
|
10
|
+
- Add FileInput component
|
|
11
|
+
- Update payroll list to avoid wrapping text and improve button placement
|
|
12
|
+
- Update to display payroll blockers before submitting payroll
|
|
13
|
+
- Update to hide job titles in edit payroll
|
|
14
|
+
- Add payroll cancellation guards
|
|
15
|
+
- Add payment history view
|
|
16
|
+
- Add reusable usePagination hook
|
|
17
|
+
- Hide direct deposit for employees without account set up
|
|
18
|
+
- Add skeleton for recovery cases
|
|
19
|
+
- Add skeleton for information requests
|
|
20
|
+
- Add bank account number to preview
|
|
21
|
+
|
|
22
|
+
### Fixes
|
|
23
|
+
|
|
24
|
+
- Remove duplicate payroll alert on calculate payroll
|
|
25
|
+
- Update to show warning banner with correct dates for late payroll
|
|
26
|
+
- Show immediate loading state when Calculate payroll button is clicked
|
|
27
|
+
- Prevent double loading during PayrollConfiguration pagination
|
|
28
|
+
- Cancel payroll from overview causing error
|
|
29
|
+
- Update inputs to format currency correctly
|
|
30
|
+
- Add empty state to CreatePaymentPresentation for contractors
|
|
31
|
+
- Display correct amount on alert when payroll is submitted
|
|
32
|
+
- Change payroll deadline notice text to read "by" instead of "on"
|
|
33
|
+
- Fix pagination visibility based on totalCount
|
|
34
|
+
- Align payroll breadcrumbs with design
|
|
35
|
+
- Remove submission failed prefix from submission blockers
|
|
36
|
+
- Update copy on cancel payroll modal
|
|
37
|
+
- Fix alignment for pay stub text in table on payroll overview
|
|
38
|
+
- Prevent negative numbers in input fields
|
|
39
|
+
- Prevent duplicate loading state on payroll landing
|
|
40
|
+
|
|
41
|
+
### Chores & Maintenance
|
|
42
|
+
|
|
43
|
+
- Upgrade embedded api to 0.11.7
|
|
44
|
+
- Upgrade Storybook from 8.6.15 to 10.1.11
|
|
45
|
+
- Migrate from Ladle to Storybook
|
|
46
|
+
- FSM cleanup
|
|
47
|
+
- Bump @gusto/embedded-api from 0.11.5 to 0.11.6
|
|
48
|
+
- Bump typescript-eslint from 8.53.1 to 8.54.0
|
|
49
|
+
- Bump @storybook/addon-docs from 10.1.11 to 10.2.0
|
|
50
|
+
- Bump @storybook/addon-onboarding from 10.1.11 to 10.2.0
|
|
51
|
+
- Bump @playwright/test from 1.57.0 to 1.58.0
|
|
52
|
+
- Bump globals from 16.5.0 to 17.1.0
|
|
53
|
+
- Bump @storybook/react-vite from 10.1.11 to 10.2.0
|
|
54
|
+
- Bump eslint-plugin-storybook from 10.1.11 to 10.2.0
|
|
55
|
+
- Bump prettier from 3.7.4 to 3.8.1
|
|
56
|
+
- Bump sass-embedded from 1.97.1 to 1.97.3
|
|
57
|
+
- Bump lodash from 4.17.21 to 4.17.23
|
|
58
|
+
- Bump @storybook/addon-a11y from 10.1.11 to 10.2.0
|
|
59
|
+
- Bump i18next from 25.7.3 to 25.8.0
|
|
60
|
+
- Bump vite-plugin-stylelint from 6.0.2 to 6.0.4
|
|
61
|
+
- Bump @types/react from 19.2.7 to 19.2.9
|
|
62
|
+
- Bump react-error-boundary from 6.0.0 to 6.1.0
|
|
63
|
+
- Bump typescript-eslint from 8.51.0 to 8.54.0
|
|
64
|
+
- Bump @testing-library/react from 16.3.1 to 16.3.2
|
|
65
|
+
- Bump react-hook-form from 7.69.0 to 7.71.1
|
|
66
|
+
- Bump react-i18next from 16.5.1 to 16.5.3
|
|
67
|
+
- Bump @commitlint/cli from 20.2.0 to 20.3.1
|
|
68
|
+
- Bump @commitlint/config-conventional from 20.2.0 to 20.3.1
|
|
69
|
+
- Bump msw from 2.12.4 to 2.12.7
|
|
70
|
+
- Bump axe-core from 4.11.0 to 4.11.1
|
|
71
|
+
|
|
3
72
|
## 0.24.1
|
|
4
73
|
|
|
5
74
|
### Fixes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const i = ({
|
|
3
|
+
title: t,
|
|
4
|
+
titleId: l,
|
|
5
|
+
...r
|
|
6
|
+
}) => /* @__PURE__ */ e.createElement("svg", { width: "100%", height: "100%", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": l, ...r }, t ? /* @__PURE__ */ e.createElement("title", { id: l }, t) : null, /* @__PURE__ */ e.createElement("g", { clipPath: "url(#clip0_13347_1454)" }, /* @__PURE__ */ e.createElement("path", { d: "M3.28634 3.28668L12.713 12.7133M14.6663 8.00001C14.6663 11.6819 11.6816 14.6667 7.99967 14.6667C4.31778 14.6667 1.33301 11.6819 1.33301 8.00001C1.33301 4.31811 4.31778 1.33334 7.99967 1.33334C11.6816 1.33334 14.6663 4.31811 14.6663 8.00001Z", stroke: "currentColor", strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })), /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("clipPath", { id: "clip0_13347_1454" }, /* @__PURE__ */ e.createElement("rect", { width: 16, height: 16, fill: "white" }))));
|
|
7
|
+
export {
|
|
8
|
+
i as default
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=slash-circle.svg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slash-circle.svg.js","sources":["../../../src/assets/icons/slash-circle.svg?react"],"sourcesContent":["import * as React from \"react\";\nconst SvgSlashCircle = ({\n title,\n titleId,\n ...props\n}) => /* @__PURE__ */ React.createElement(\"svg\", { width: \"100%\", height: \"100%\", viewBox: \"0 0 16 16\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", \"aria-labelledby\": titleId, ...props }, title ? /* @__PURE__ */ React.createElement(\"title\", { id: titleId }, title) : null, /* @__PURE__ */ React.createElement(\"g\", { clipPath: \"url(#clip0_13347_1454)\" }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M3.28634 3.28668L12.713 12.7133M14.6663 8.00001C14.6663 11.6819 11.6816 14.6667 7.99967 14.6667C4.31778 14.6667 1.33301 11.6819 1.33301 8.00001C1.33301 4.31811 4.31778 1.33334 7.99967 1.33334C11.6816 1.33334 14.6663 4.31811 14.6663 8.00001Z\", stroke: \"currentColor\", strokeWidth: 1.5, strokeLinecap: \"round\", strokeLinejoin: \"round\" })), /* @__PURE__ */ React.createElement(\"defs\", null, /* @__PURE__ */ React.createElement(\"clipPath\", { id: \"clip0_13347_1454\" }, /* @__PURE__ */ React.createElement(\"rect\", { width: 16, height: 16, fill: \"white\" }))));\nexport default SvgSlashCircle;\n"],"names":["SvgSlashCircle","title","titleId","props","React"],"mappings":";AACK,MAACA,IAAiB,CAAC;AAAA,EACtB,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,MAAsB,gBAAAC,EAAM,cAAc,OAAO,EAAE,OAAO,QAAQ,QAAQ,QAAQ,SAAS,aAAa,MAAM,QAAQ,OAAO,8BAA8B,mBAAmBF,GAAS,GAAGC,EAAK,GAAIF,IAAwB,gBAAAG,EAAM,cAAc,SAAS,EAAE,IAAIF,KAAWD,CAAK,IAAI,MAAsB,gBAAAG,EAAM,cAAc,KAAK,EAAE,UAAU,yBAAwB,GAAoB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,GAAG,oPAAoP,QAAQ,gBAAgB,aAAa,KAAK,eAAe,SAAS,gBAAgB,QAAO,CAAE,CAAC,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,MAAsB,gBAAAA,EAAM,cAAc,YAAY,EAAE,IAAI,mBAAkB,GAAoB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,OAAO,IAAI,QAAQ,IAAI,MAAM,QAAO,CAAE,CAAC,CAAC,CAAC;"}
|
|
@@ -27,7 +27,7 @@ export interface BaseBoundariesProps {
|
|
|
27
27
|
children?: ReactNode;
|
|
28
28
|
FallbackComponent?: (props: FallbackProps) => JSX.Element;
|
|
29
29
|
LoaderComponent?: LoadingIndicatorContextProps['LoadingIndicator'];
|
|
30
|
-
onErrorBoundaryError?: (error:
|
|
30
|
+
onErrorBoundaryError?: (error: unknown, info: ErrorInfo) => void;
|
|
31
31
|
}
|
|
32
32
|
export declare const BaseBoundaries: ({ children, FallbackComponent, LoaderComponent: LoadingIndicatorFromProps, onErrorBoundaryError, }: BaseBoundariesProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
33
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Base.js","sources":["../../../src/components/Base/Base.tsx"],"sourcesContent":["import type { ReactNode, JSX, ErrorInfo } from 'react'\nimport { Suspense } from 'react'\nimport type { FallbackProps } from 'react-error-boundary'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { useTranslation } from 'react-i18next'\nimport { APIError } from '@gusto/embedded-api/models/errors/apierror'\nimport { SDKValidationError } from '@gusto/embedded-api/models/errors/sdkvalidationerror'\nimport { QueryErrorResetBoundary } from '@tanstack/react-query'\nimport type { EntityErrorObject } from '@gusto/embedded-api/models/components/entityerrorobject'\nimport { FadeIn } from '../Common/FadeIn/FadeIn'\nimport { BaseContext, type KnownErrors, type OnEventType } from './useBase'\nimport { useBaseSubmit } from './useBaseSubmit'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport { InternalError } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport type { ResourceDictionary, Resources } from '@/types/Helpers'\nimport { useLoadingIndicator } from '@/contexts/LoadingIndicatorProvider/useLoadingIndicator'\nimport type { LoadingIndicatorContextProps } from '@/contexts/LoadingIndicatorProvider/useLoadingIndicator'\nimport { renderErrorList } from '@/helpers/apiErrorToList'\n\nexport interface CommonComponentInterface<TResourceKey extends keyof Resources = keyof Resources> {\n children?: ReactNode\n className?: string\n defaultValues?: unknown\n dictionary?: ResourceDictionary<TResourceKey>\n}\n\n// Base component wrapper with error and suspense handling\nexport interface BaseComponentInterface<\n TResourceKey extends keyof Resources = keyof Resources,\n> extends CommonComponentInterface<TResourceKey> {\n FallbackComponent?: BaseBoundariesProps['FallbackComponent']\n LoaderComponent?: BaseBoundariesProps['LoaderComponent']\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport const BaseComponent = <TResourceKey extends keyof Resources = keyof Resources>({\n children,\n FallbackComponent = InternalError,\n LoaderComponent: LoadingIndicatorFromProps,\n onEvent,\n}: BaseComponentInterface<TResourceKey>) => {\n const { error, fieldErrors, baseSubmitHandler, setError } = useBaseSubmit()\n\n const { LoadingIndicator: LoadingIndicatorFromContext } = useLoadingIndicator()\n const LoaderComponent = LoadingIndicatorFromProps ?? LoadingIndicatorFromContext\n\n const onErrorBoundaryError = (error:
|
|
1
|
+
{"version":3,"file":"Base.js","sources":["../../../src/components/Base/Base.tsx"],"sourcesContent":["import type { ReactNode, JSX, ErrorInfo } from 'react'\nimport { Suspense } from 'react'\nimport type { FallbackProps } from 'react-error-boundary'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { useTranslation } from 'react-i18next'\nimport { APIError } from '@gusto/embedded-api/models/errors/apierror'\nimport { SDKValidationError } from '@gusto/embedded-api/models/errors/sdkvalidationerror'\nimport { QueryErrorResetBoundary } from '@tanstack/react-query'\nimport type { EntityErrorObject } from '@gusto/embedded-api/models/components/entityerrorobject'\nimport { FadeIn } from '../Common/FadeIn/FadeIn'\nimport { BaseContext, type KnownErrors, type OnEventType } from './useBase'\nimport { useBaseSubmit } from './useBaseSubmit'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport { InternalError } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport type { ResourceDictionary, Resources } from '@/types/Helpers'\nimport { useLoadingIndicator } from '@/contexts/LoadingIndicatorProvider/useLoadingIndicator'\nimport type { LoadingIndicatorContextProps } from '@/contexts/LoadingIndicatorProvider/useLoadingIndicator'\nimport { renderErrorList } from '@/helpers/apiErrorToList'\n\nexport interface CommonComponentInterface<TResourceKey extends keyof Resources = keyof Resources> {\n children?: ReactNode\n className?: string\n defaultValues?: unknown\n dictionary?: ResourceDictionary<TResourceKey>\n}\n\n// Base component wrapper with error and suspense handling\nexport interface BaseComponentInterface<\n TResourceKey extends keyof Resources = keyof Resources,\n> extends CommonComponentInterface<TResourceKey> {\n FallbackComponent?: BaseBoundariesProps['FallbackComponent']\n LoaderComponent?: BaseBoundariesProps['LoaderComponent']\n onEvent: OnEventType<EventType, unknown>\n}\n\nexport const BaseComponent = <TResourceKey extends keyof Resources = keyof Resources>({\n children,\n FallbackComponent = InternalError,\n LoaderComponent: LoadingIndicatorFromProps,\n onEvent,\n}: BaseComponentInterface<TResourceKey>) => {\n const { error, fieldErrors, baseSubmitHandler, setError } = useBaseSubmit()\n\n const { LoadingIndicator: LoadingIndicatorFromContext } = useLoadingIndicator()\n const LoaderComponent = LoadingIndicatorFromProps ?? LoadingIndicatorFromContext\n\n const onErrorBoundaryError = (error: unknown) => {\n onEvent(componentEvents.ERROR, error)\n }\n\n return (\n <BaseContext.Provider\n value={{\n error,\n fieldErrors,\n setError,\n onEvent,\n baseSubmitHandler,\n LoadingIndicator: LoaderComponent,\n }}\n >\n <BaseBoundaries\n FallbackComponent={FallbackComponent}\n LoaderComponent={LoaderComponent}\n onErrorBoundaryError={onErrorBoundaryError}\n >\n <BaseLayout error={error} fieldErrors={fieldErrors}>\n {children}\n </BaseLayout>\n </BaseBoundaries>\n </BaseContext.Provider>\n )\n}\n\ninterface BaseLayoutProps {\n children?: ReactNode\n error: KnownErrors | null\n fieldErrors: Array<EntityErrorObject> | null\n}\n\nexport const BaseLayout = ({ children, error, fieldErrors }: BaseLayoutProps) => {\n const Components = useComponentContext()\n const { t } = useTranslation()\n\n return (\n <FadeIn>\n {(error || fieldErrors) && (\n <Components.Alert label={t('status.errorEncountered')} status=\"error\">\n {fieldErrors && <Components.UnorderedList items={renderErrorList(fieldErrors)} />}\n {error && error instanceof APIError && <Components.Text>{error.message}</Components.Text>}\n {error && error instanceof SDKValidationError && (\n <Components.Text as=\"pre\">{error.pretty()}</Components.Text>\n )}\n </Components.Alert>\n )}\n {children}\n </FadeIn>\n )\n}\n\nexport interface BaseBoundariesProps {\n children?: ReactNode\n FallbackComponent?: (props: FallbackProps) => JSX.Element\n LoaderComponent?: LoadingIndicatorContextProps['LoadingIndicator']\n onErrorBoundaryError?: (error: unknown, info: ErrorInfo) => void\n}\n\nexport const BaseBoundaries = ({\n children,\n FallbackComponent = InternalError,\n LoaderComponent: LoadingIndicatorFromProps,\n onErrorBoundaryError,\n}: BaseBoundariesProps) => {\n const { LoadingIndicator: LoadingIndicatorFromContext } = useLoadingIndicator()\n const LoaderComponent = LoadingIndicatorFromProps ?? LoadingIndicatorFromContext\n\n return (\n <QueryErrorResetBoundary>\n {({ reset: resetQueries }) => (\n <ErrorBoundary\n FallbackComponent={FallbackComponent}\n onReset={resetQueries}\n onError={onErrorBoundaryError}\n >\n <Suspense fallback={<LoaderComponent />}>{children}</Suspense>\n </ErrorBoundary>\n )}\n </QueryErrorResetBoundary>\n )\n}\n"],"names":["BaseComponent","children","FallbackComponent","InternalError","LoadingIndicatorFromProps","onEvent","error","fieldErrors","baseSubmitHandler","setError","useBaseSubmit","LoadingIndicatorFromContext","useLoadingIndicator","LoaderComponent","onErrorBoundaryError","componentEvents","jsx","BaseContext","BaseBoundaries","BaseLayout","Components","useComponentContext","t","useTranslation","FadeIn","jsxs","renderErrorList","APIError","SDKValidationError","QueryErrorResetBoundary","resetQueries","ErrorBoundary","Suspense"],"mappings":";;;;;;;;;;;;;;;;AAoCO,MAAMA,IAAgB,CAAyD;AAAA,EACpF,UAAAC;AAAA,EACA,mBAAAC,IAAoBC;AAAA,EACpB,iBAAiBC;AAAA,EACjB,SAAAC;AACF,MAA4C;AAC1C,QAAM,EAAE,OAAAC,GAAO,aAAAC,GAAa,mBAAAC,GAAmB,UAAAC,EAAA,IAAaC,EAAA,GAEtD,EAAE,kBAAkBC,EAAA,IAAgCC,EAAA,GACpDC,IAAkBT,KAA6BO,GAE/CG,IAAuB,CAACR,MAAmB;AAC/C,IAAAD,EAAQU,EAAgB,OAAOT,CAAK;AAAA,EACtC;AAEA,SACE,gBAAAU;AAAA,IAACC,EAAY;AAAA,IAAZ;AAAA,MACC,OAAO;AAAA,QACL,OAAAX;AAAA,QACA,aAAAC;AAAA,QACA,UAAAE;AAAA,QACA,SAAAJ;AAAA,QACA,mBAAAG;AAAA,QACA,kBAAkBK;AAAA,MAAA;AAAA,MAGpB,UAAA,gBAAAG;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,mBAAAhB;AAAA,UACA,iBAAAW;AAAA,UACA,sBAAAC;AAAA,UAEA,UAAA,gBAAAE,EAACG,GAAA,EAAW,OAAAb,GAAc,aAAAC,GACvB,UAAAN,EAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN,GAQakB,IAAa,CAAC,EAAE,UAAAlB,GAAU,OAAAK,GAAO,aAAAC,QAAmC;AAC/E,QAAMa,IAAaC,EAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,EAAA;AAEd,2BACGC,GAAA,EACG,UAAA;AAAA,KAAAlB,KAASC,MACT,gBAAAkB,EAACL,EAAW,OAAX,EAAiB,OAAOE,EAAE,yBAAyB,GAAG,QAAO,SAC3D,UAAA;AAAA,MAAAf,uBAAgBa,EAAW,eAAX,EAAyB,OAAOM,EAAgBnB,CAAW,GAAG;AAAA,MAC9ED,KAASA,aAAiBqB,KAAY,gBAAAX,EAACI,EAAW,MAAX,EAAiB,YAAM,SAAQ;AAAA,MACtEd,KAASA,aAAiBsB,KACzB,gBAAAZ,EAACI,EAAW,MAAX,EAAgB,IAAG,OAAO,UAAAd,EAAM,OAAA,EAAO,CAAE;AAAA,IAAA,GAE9C;AAAA,IAEDL;AAAA,EAAA,GACH;AAEJ,GASaiB,IAAiB,CAAC;AAAA,EAC7B,UAAAjB;AAAA,EACA,mBAAAC,IAAoBC;AAAA,EACpB,iBAAiBC;AAAA,EACjB,sBAAAU;AACF,MAA2B;AACzB,QAAM,EAAE,kBAAkBH,EAAA,IAAgCC,EAAA,GACpDC,IAAkBT,KAA6BO;AAErD,2BACGkB,GAAA,EACE,UAAA,CAAC,EAAE,OAAOC,QACT,gBAAAd;AAAA,IAACe;AAAA,IAAA;AAAA,MACC,mBAAA7B;AAAA,MACA,SAAS4B;AAAA,MACT,SAAShB;AAAA,MAET,4BAACkB,GAAA,EAAS,UAAU,gBAAAhB,EAACH,GAAA,EAAgB,GAAK,UAAAZ,EAAA,CAAS;AAAA,IAAA;AAAA,EAAA,GAGzD;AAEJ;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { UseFieldProps } from '../hooks/useField';
|
|
2
|
+
import { FileInputProps } from '../../UI/FileInput/FileInputTypes';
|
|
3
|
+
export interface FileInputFieldProps extends Omit<FileInputProps, 'name' | 'value' | 'onChange' | 'isInvalid'>, UseFieldProps<File | null> {
|
|
4
|
+
}
|
|
5
|
+
export declare const FileInputField: React.FC<FileInputFieldProps>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { useField as d } from "../hooks/useField.js";
|
|
3
|
+
import { useComponentContext as x } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
4
|
+
const P = ({
|
|
5
|
+
rules: o,
|
|
6
|
+
defaultValue: t,
|
|
7
|
+
name: e,
|
|
8
|
+
errorMessage: n,
|
|
9
|
+
isRequired: r,
|
|
10
|
+
onChange: p,
|
|
11
|
+
transform: i,
|
|
12
|
+
description: m,
|
|
13
|
+
onBlur: s,
|
|
14
|
+
inputRef: l,
|
|
15
|
+
...u
|
|
16
|
+
}) => {
|
|
17
|
+
const f = x(), F = d({
|
|
18
|
+
name: e,
|
|
19
|
+
rules: o,
|
|
20
|
+
defaultValue: t,
|
|
21
|
+
errorMessage: n,
|
|
22
|
+
isRequired: r,
|
|
23
|
+
onChange: p,
|
|
24
|
+
transform: i,
|
|
25
|
+
description: m,
|
|
26
|
+
onBlur: s,
|
|
27
|
+
inputRef: l
|
|
28
|
+
});
|
|
29
|
+
return /* @__PURE__ */ c(f.FileInput, { ...u, ...F });
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
P as FileInputField
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=FileInputField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileInputField.js","sources":["../../../../../src/components/Common/Fields/FileInputField/FileInputField.tsx"],"sourcesContent":["import { useField, type UseFieldProps } from '@/components/Common/Fields/hooks/useField'\nimport type { FileInputProps } from '@/components/Common/UI/FileInput/FileInputTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport interface FileInputFieldProps\n extends\n Omit<FileInputProps, 'name' | 'value' | 'onChange' | 'isInvalid'>,\n UseFieldProps<File | null> {}\n\nexport const FileInputField: React.FC<FileInputFieldProps> = ({\n rules,\n defaultValue,\n name,\n errorMessage,\n isRequired,\n onChange,\n transform,\n description,\n onBlur,\n inputRef,\n ...fileInputProps\n}: FileInputFieldProps) => {\n const Components = useComponentContext()\n const fieldProps = useField({\n name,\n rules,\n defaultValue,\n errorMessage,\n isRequired,\n onChange,\n transform,\n description,\n onBlur,\n inputRef,\n })\n\n return <Components.FileInput {...fileInputProps} {...fieldProps} />\n}\n"],"names":["FileInputField","rules","defaultValue","name","errorMessage","isRequired","onChange","transform","description","onBlur","inputRef","fileInputProps","Components","useComponentContext","fieldProps","useField"],"mappings":";;;AASO,MAAMA,IAAgD,CAAC;AAAA,EAC5D,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAA2B;AACzB,QAAMC,IAAaC,EAAA,GACbC,IAAaC,EAAS;AAAA,IAC1B,MAAAZ;AAAA,IACA,OAAAF;AAAA,IACA,cAAAC;AAAA,IACA,cAAAE;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,EAAA,CACD;AAED,2BAAQE,EAAW,WAAX,EAAsB,GAAGD,GAAiB,GAAGG,GAAY;AACnE;"}
|
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
import { jsx as n, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { Flex as
|
|
2
|
+
import { useTranslation as f } from "react-i18next";
|
|
3
|
+
import { Flex as h } from "../Flex/Flex.js";
|
|
4
4
|
import e from "./PaginationControl.module.scss.js";
|
|
5
5
|
import { useComponentContext as r } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
6
|
import v from "../../../assets/icons/pagination_first.svg.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { InlineSpinner as
|
|
11
|
-
const L = ({
|
|
7
|
+
import I from "../../../assets/icons/pagination_previous.svg.js";
|
|
8
|
+
import S from "../../../assets/icons/pagination_next.svg.js";
|
|
9
|
+
import x from "../../../assets/icons/pagination_last.svg.js";
|
|
10
|
+
import { InlineSpinner as P } from "../InlineSpinner/InlineSpinner.js";
|
|
11
|
+
const N = 5, L = (i) => i === void 0 ? !0 : i === 0 ? !1 : i > N, B = ({
|
|
12
12
|
currentPage: i,
|
|
13
|
-
totalPages:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
totalPages: t,
|
|
14
|
+
totalCount: s,
|
|
15
|
+
isFetching: c,
|
|
16
|
+
handleFirstPage: m,
|
|
17
|
+
handlePreviousPage: p,
|
|
18
|
+
handleNextPage: d,
|
|
19
|
+
handleLastPage: g,
|
|
20
|
+
handleItemsPerPageChange: u,
|
|
21
|
+
itemsPerPage: b = 5
|
|
21
22
|
}) => {
|
|
22
|
-
const { t } =
|
|
23
|
-
return
|
|
23
|
+
const { t: o } = f("common"), a = r();
|
|
24
|
+
return L(s) ? /* @__PURE__ */ n("section", { className: e.paginationControl, "data-testid": "pagination-control", children: /* @__PURE__ */ l(h, { justifyContent: "space-between", alignItems: "center", children: [
|
|
24
25
|
/* @__PURE__ */ n("div", { className: e.paginationControlCount, children: /* @__PURE__ */ n("section", { children: /* @__PURE__ */ n(
|
|
25
26
|
a.Select,
|
|
26
27
|
{
|
|
27
|
-
label:
|
|
28
|
+
label: o("labels.paginationControlCountLabel"),
|
|
28
29
|
shouldVisuallyHideLabel: !0,
|
|
29
|
-
value:
|
|
30
|
-
onChange: (
|
|
31
|
-
|
|
30
|
+
value: b.toString(),
|
|
31
|
+
onChange: (C) => {
|
|
32
|
+
u(Number(C));
|
|
32
33
|
},
|
|
33
34
|
options: [
|
|
34
35
|
{ value: "5", label: "5" },
|
|
@@ -38,52 +39,52 @@ const L = ({
|
|
|
38
39
|
}
|
|
39
40
|
) }) }),
|
|
40
41
|
/* @__PURE__ */ l("div", { className: e.paginationControlButtons, children: [
|
|
41
|
-
|
|
42
|
+
c && /* @__PURE__ */ n(P, { ariaLabel: o("labels.paginationFetchingLabel") }),
|
|
42
43
|
/* @__PURE__ */ n(
|
|
43
44
|
a.ButtonIcon,
|
|
44
45
|
{
|
|
45
|
-
"aria-label":
|
|
46
|
+
"aria-label": o("icons.paginationFirst"),
|
|
46
47
|
isDisabled: i === 1,
|
|
47
|
-
onClick:
|
|
48
|
+
onClick: m,
|
|
48
49
|
children: /* @__PURE__ */ n(v, {})
|
|
49
50
|
}
|
|
50
51
|
),
|
|
51
52
|
/* @__PURE__ */ n(
|
|
52
53
|
a.ButtonIcon,
|
|
53
54
|
{
|
|
54
|
-
"aria-label":
|
|
55
|
+
"aria-label": o("icons.paginationPrev"),
|
|
55
56
|
"data-testid": "pagination-previous",
|
|
56
57
|
isDisabled: i === 1,
|
|
57
|
-
onClick:
|
|
58
|
-
children: /* @__PURE__ */ n(
|
|
58
|
+
onClick: p,
|
|
59
|
+
children: /* @__PURE__ */ n(I, {})
|
|
59
60
|
}
|
|
60
61
|
),
|
|
61
62
|
/* @__PURE__ */ n(
|
|
62
63
|
a.ButtonIcon,
|
|
63
64
|
{
|
|
64
|
-
"aria-label":
|
|
65
|
+
"aria-label": o("icons.paginationNext"),
|
|
65
66
|
"data-testid": "pagination-next",
|
|
66
|
-
isDisabled: i ===
|
|
67
|
-
onClick:
|
|
68
|
-
children: /* @__PURE__ */ n(
|
|
67
|
+
isDisabled: i === t,
|
|
68
|
+
onClick: d,
|
|
69
|
+
children: /* @__PURE__ */ n(S, {})
|
|
69
70
|
}
|
|
70
71
|
),
|
|
71
72
|
/* @__PURE__ */ n(
|
|
72
73
|
a.ButtonIcon,
|
|
73
74
|
{
|
|
74
|
-
"aria-label":
|
|
75
|
-
isDisabled: i ===
|
|
76
|
-
onClick:
|
|
77
|
-
children: /* @__PURE__ */ n(
|
|
75
|
+
"aria-label": o("icons.paginationLast"),
|
|
76
|
+
isDisabled: i === t,
|
|
77
|
+
onClick: g,
|
|
78
|
+
children: /* @__PURE__ */ n(x, {})
|
|
78
79
|
}
|
|
79
80
|
)
|
|
80
81
|
] })
|
|
81
|
-
] }) });
|
|
82
|
-
},
|
|
83
|
-
const
|
|
84
|
-
return
|
|
82
|
+
] }) }) : null;
|
|
83
|
+
}, G = (i) => {
|
|
84
|
+
const t = r();
|
|
85
|
+
return t.PaginationControl ? /* @__PURE__ */ n(t.PaginationControl, { ...i }) : /* @__PURE__ */ n(B, { ...i });
|
|
85
86
|
};
|
|
86
87
|
export {
|
|
87
|
-
|
|
88
|
+
G as PaginationControl
|
|
88
89
|
};
|
|
89
90
|
//# sourceMappingURL=PaginationControl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaginationControl.js","sources":["../../../../src/components/Common/PaginationControl/PaginationControl.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '../Flex/Flex'\nimport { InlineSpinner } from '../InlineSpinner'\nimport style from './PaginationControl.module.scss'\nimport type { PaginationControlProps, PaginationItemsPerPage } from './PaginationControlTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport PaginationFirstIcon from '@/assets/icons/pagination_first.svg?react'\nimport PaginationPrevIcon from '@/assets/icons/pagination_previous.svg?react'\nimport PaginationNextIcon from '@/assets/icons/pagination_next.svg?react'\nimport PaginationLastIcon from '@/assets/icons/pagination_last.svg?react'\n\nconst DefaultPaginationControl = ({\n currentPage,\n totalPages,\n isFetching,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n itemsPerPage = 5,\n}: PaginationControlProps) => {\n const { t } = useTranslation('common')\n const Components = useComponentContext()\n\n if (
|
|
1
|
+
{"version":3,"file":"PaginationControl.js","sources":["../../../../src/components/Common/PaginationControl/PaginationControl.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '../Flex/Flex'\nimport { InlineSpinner } from '../InlineSpinner'\nimport style from './PaginationControl.module.scss'\nimport type { PaginationControlProps, PaginationItemsPerPage } from './PaginationControlTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport PaginationFirstIcon from '@/assets/icons/pagination_first.svg?react'\nimport PaginationPrevIcon from '@/assets/icons/pagination_previous.svg?react'\nimport PaginationNextIcon from '@/assets/icons/pagination_next.svg?react'\nimport PaginationLastIcon from '@/assets/icons/pagination_last.svg?react'\n\nconst MINIMUM_PAGE_SIZE = 5\n\nconst shouldShowPagination = (totalCount: number | undefined): boolean => {\n if (totalCount === undefined) return true\n if (totalCount === 0) return false\n return totalCount > MINIMUM_PAGE_SIZE\n}\n\nconst DefaultPaginationControl = ({\n currentPage,\n totalPages,\n totalCount,\n isFetching,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n itemsPerPage = 5,\n}: PaginationControlProps) => {\n const { t } = useTranslation('common')\n const Components = useComponentContext()\n\n if (!shouldShowPagination(totalCount)) {\n return null\n }\n\n return (\n <section className={style.paginationControl} data-testid=\"pagination-control\">\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <div className={style.paginationControlCount}>\n <section>\n <Components.Select\n label={t('labels.paginationControlCountLabel')}\n shouldVisuallyHideLabel\n value={itemsPerPage.toString()}\n onChange={n => {\n handleItemsPerPageChange(Number(n) as PaginationItemsPerPage)\n }}\n options={[\n { value: '5', label: '5' },\n { value: '10', label: '10' },\n { value: '50', label: '50' },\n ]}\n />\n </section>\n </div>\n <div className={style.paginationControlButtons}>\n {isFetching && <InlineSpinner ariaLabel={t('labels.paginationFetchingLabel')} />}\n <Components.ButtonIcon\n aria-label={t('icons.paginationFirst')}\n isDisabled={currentPage === 1}\n onClick={handleFirstPage}\n >\n <PaginationFirstIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationPrev')}\n data-testid=\"pagination-previous\"\n isDisabled={currentPage === 1}\n onClick={handlePreviousPage}\n >\n <PaginationPrevIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationNext')}\n data-testid=\"pagination-next\"\n isDisabled={currentPage === totalPages}\n onClick={handleNextPage}\n >\n <PaginationNextIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationLast')}\n isDisabled={currentPage === totalPages}\n onClick={handleLastPage}\n >\n <PaginationLastIcon />\n </Components.ButtonIcon>\n </div>\n </Flex>\n </section>\n )\n}\n\nexport const PaginationControl = (props: PaginationControlProps) => {\n const Components = useComponentContext()\n\n return Components.PaginationControl ? (\n <Components.PaginationControl {...props} />\n ) : (\n <DefaultPaginationControl {...props} />\n )\n}\n"],"names":["MINIMUM_PAGE_SIZE","shouldShowPagination","totalCount","DefaultPaginationControl","currentPage","totalPages","isFetching","handleFirstPage","handlePreviousPage","handleNextPage","handleLastPage","handleItemsPerPageChange","itemsPerPage","t","useTranslation","Components","useComponentContext","jsx","style","jsxs","Flex","n","InlineSpinner","PaginationFirstIcon","PaginationPrevIcon","PaginationNextIcon","PaginationLastIcon","PaginationControl","props"],"mappings":";;;;;;;;;;AAWA,MAAMA,IAAoB,GAEpBC,IAAuB,CAACC,MACxBA,MAAe,SAAkB,KACjCA,MAAe,IAAU,KACtBA,IAAaF,GAGhBG,IAA2B,CAAC;AAAA,EAChC,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAH;AAAA,EACA,YAAAI;AAAA,EACA,iBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,cAAAC,IAAe;AACjB,MAA8B;AAC5B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAaC,EAAA;AAEnB,SAAKf,EAAqBC,CAAU,IAKlC,gBAAAe,EAAC,WAAA,EAAQ,WAAWC,EAAM,mBAAmB,eAAY,sBACvD,UAAA,gBAAAC,EAACC,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAC9C,UAAA;AAAA,IAAA,gBAAAH,EAAC,OAAA,EAAI,WAAWC,EAAM,wBACpB,4BAAC,WAAA,EACC,UAAA,gBAAAD;AAAA,MAACF,EAAW;AAAA,MAAX;AAAA,QACC,OAAOF,EAAE,oCAAoC;AAAA,QAC7C,yBAAuB;AAAA,QACvB,OAAOD,EAAa,SAAA;AAAA,QACpB,UAAU,CAAAS,MAAK;AACb,UAAAV,EAAyB,OAAOU,CAAC,CAA2B;AAAA,QAC9D;AAAA,QACA,SAAS;AAAA,UACP,EAAE,OAAO,KAAK,OAAO,IAAA;AAAA,UACrB,EAAE,OAAO,MAAM,OAAO,KAAA;AAAA,UACtB,EAAE,OAAO,MAAM,OAAO,KAAA;AAAA,QAAK;AAAA,MAC7B;AAAA,IAAA,GAEJ,EAAA,CACF;AAAA,IACA,gBAAAF,EAAC,OAAA,EAAI,WAAWD,EAAM,0BACnB,UAAA;AAAA,MAAAZ,KAAc,gBAAAW,EAACK,GAAA,EAAc,WAAWT,EAAE,gCAAgC,GAAG;AAAA,MAC9E,gBAAAI;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAYF,EAAE,uBAAuB;AAAA,UACrC,YAAYT,MAAgB;AAAA,UAC5B,SAASG;AAAA,UAET,4BAACgB,GAAA,CAAA,CAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEvB,gBAAAN;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAYF,EAAE,sBAAsB;AAAA,UACpC,eAAY;AAAA,UACZ,YAAYT,MAAgB;AAAA,UAC5B,SAASI;AAAA,UAET,4BAACgB,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEtB,gBAAAP;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAYF,EAAE,sBAAsB;AAAA,UACpC,eAAY;AAAA,UACZ,YAAYT,MAAgBC;AAAA,UAC5B,SAASI;AAAA,UAET,4BAACgB,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEtB,gBAAAR;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAYF,EAAE,sBAAsB;AAAA,UACpC,YAAYT,MAAgBC;AAAA,UAC5B,SAASK;AAAA,UAET,4BAACgB,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,IACtB,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF,IAzDO;AA2DX,GAEaC,IAAoB,CAACC,MAAkC;AAClE,QAAMb,IAAaC,EAAA;AAEnB,SAAOD,EAAW,oBAChB,gBAAAE,EAACF,EAAW,mBAAX,EAA8B,GAAGa,EAAA,CAAO,IAEzC,gBAAAX,EAACd,GAAA,EAA0B,GAAGyB,EAAA,CAAO;AAEzC;"}
|
|
@@ -2,29 +2,30 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { z as o } from "zod";
|
|
3
3
|
import { useForm as s, FormProvider as a } from "react-hook-form";
|
|
4
4
|
import { zodResolver as l } from "@hookform/resolvers/zod";
|
|
5
|
-
import
|
|
5
|
+
import e from "./SignatureForm.module.scss.js";
|
|
6
6
|
import { Form as u } from "../Form/Form.js";
|
|
7
7
|
import { Flex as c } from "../Flex/Flex.js";
|
|
8
|
-
import "react-i18next";
|
|
9
8
|
import "classnames";
|
|
9
|
+
import "../../../shared/constants.js";
|
|
10
|
+
import "react-i18next";
|
|
10
11
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
11
12
|
import "react";
|
|
12
|
-
const
|
|
13
|
+
const p = o.object({
|
|
13
14
|
signature: o.string().min(1),
|
|
14
15
|
confirmSignature: o.literal(!0)
|
|
15
|
-
}),
|
|
16
|
+
}), f = {
|
|
16
17
|
signature: ""
|
|
17
18
|
};
|
|
18
|
-
function
|
|
19
|
-
const
|
|
20
|
-
resolver: l(
|
|
21
|
-
defaultValues:
|
|
19
|
+
function V({ onSubmit: m, children: i, formProps: n }) {
|
|
20
|
+
const t = s({
|
|
21
|
+
resolver: l(p),
|
|
22
|
+
defaultValues: f,
|
|
22
23
|
...n
|
|
23
24
|
});
|
|
24
|
-
return /* @__PURE__ */ r(a, { ...
|
|
25
|
+
return /* @__PURE__ */ r(a, { ...t, children: /* @__PURE__ */ r(u, { onSubmit: t.handleSubmit(m), className: e.container, children: /* @__PURE__ */ r("div", { className: e.formFields, children: /* @__PURE__ */ r(c, { flexDirection: "column", gap: 20, children: i }) }) }) });
|
|
25
26
|
}
|
|
26
27
|
export {
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
V as SignatureForm,
|
|
29
|
+
p as SignatureFormSchema
|
|
29
30
|
};
|
|
30
31
|
//# sourceMappingURL=SignatureForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureForm.js","sources":["../../../../src/components/Common/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { FormProvider, useForm, type UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport styles from './SignatureForm.module.scss'\nimport { Form } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common'\n\nexport const SignatureFormSchema = z.object({\n signature: z.string().min(1),\n confirmSignature: z.literal(true),\n})\n\nconst signatureFormDefaultValues = {\n signature: '',\n}\n\nexport type SignatureFormInputs = z.infer<typeof SignatureFormSchema>\n\ninterface SignatureFormProps {\n onSubmit: (data: SignatureFormInputs) => void | Promise<void>\n children?: React.ReactNode\n formProps?: Partial<UseFormProps<SignatureFormInputs>>\n}\n\nexport function SignatureForm({ onSubmit, children, formProps }: SignatureFormProps) {\n const methods = useForm<SignatureFormInputs>({\n resolver: zodResolver(SignatureFormSchema),\n defaultValues: signatureFormDefaultValues,\n ...formProps,\n })\n\n return (\n <FormProvider {...methods}>\n <Form onSubmit={methods.handleSubmit(onSubmit)} className={styles.container}>\n <div className={styles.formFields}>\n <Flex flexDirection=\"column\" gap={20}>\n {children}\n </Flex>\n </div>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["SignatureFormSchema","z","signatureFormDefaultValues","SignatureForm","onSubmit","children","formProps","methods","useForm","zodResolver","jsx","FormProvider","Form","styles","Flex"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SignatureForm.js","sources":["../../../../src/components/Common/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { FormProvider, useForm, type UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport styles from './SignatureForm.module.scss'\nimport { Form } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common'\n\nexport const SignatureFormSchema = z.object({\n signature: z.string().min(1),\n confirmSignature: z.literal(true),\n})\n\nconst signatureFormDefaultValues = {\n signature: '',\n}\n\nexport type SignatureFormInputs = z.infer<typeof SignatureFormSchema>\n\ninterface SignatureFormProps {\n onSubmit: (data: SignatureFormInputs) => void | Promise<void>\n children?: React.ReactNode\n formProps?: Partial<UseFormProps<SignatureFormInputs>>\n}\n\nexport function SignatureForm({ onSubmit, children, formProps }: SignatureFormProps) {\n const methods = useForm<SignatureFormInputs>({\n resolver: zodResolver(SignatureFormSchema),\n defaultValues: signatureFormDefaultValues,\n ...formProps,\n })\n\n return (\n <FormProvider {...methods}>\n <Form onSubmit={methods.handleSubmit(onSubmit)} className={styles.container}>\n <div className={styles.formFields}>\n <Flex flexDirection=\"column\" gap={20}>\n {children}\n </Flex>\n </div>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["SignatureFormSchema","z","signatureFormDefaultValues","SignatureForm","onSubmit","children","formProps","methods","useForm","zodResolver","jsx","FormProvider","Form","styles","Flex"],"mappings":";;;;;;;;;;;;AAOO,MAAMA,IAAsBC,EAAE,OAAO;AAAA,EAC1C,WAAWA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC3B,kBAAkBA,EAAE,QAAQ,EAAI;AAClC,CAAC,GAEKC,IAA6B;AAAA,EACjC,WAAW;AACb;AAUO,SAASC,EAAc,EAAE,UAAAC,GAAU,UAAAC,GAAU,WAAAC,KAAiC;AACnF,QAAMC,IAAUC,EAA6B;AAAA,IAC3C,UAAUC,EAAYT,CAAmB;AAAA,IACzC,eAAeE;AAAA,IACf,GAAGI;AAAA,EAAA,CACJ;AAED,SACE,gBAAAI,EAACC,GAAA,EAAc,GAAGJ,GAChB,UAAA,gBAAAG,EAACE,GAAA,EAAK,UAAUL,EAAQ,aAAaH,CAAQ,GAAG,WAAWS,EAAO,WAChE,UAAA,gBAAAH,EAAC,OAAA,EAAI,WAAWG,EAAO,YACrB,UAAA,gBAAAH,EAACI,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAAT,EAAA,CACH,EAAA,CACF,EAAA,CACF,GACF;AAEJ;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import "../../../shared/constants.js";
|
|
3
|
-
import "react-i18next";
|
|
4
3
|
import "classnames";
|
|
4
|
+
import "react-i18next";
|
|
5
5
|
import { ActionsLayout as p } from "../ActionsLayout/ActionsLayout.js";
|
|
6
6
|
import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
7
|
import "react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as n, Fragment as s, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "../../../shared/constants.js";
|
|
3
|
-
import "react-i18next";
|
|
4
3
|
import "classnames";
|
|
4
|
+
import "react-i18next";
|
|
5
5
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { TextInputField as p } from "../Fields/TextInputField/TextInputField.js";
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { jsx as e, jsxs as f } from "react/jsx-runtime";
|
|
2
|
+
import { DropZone as G, FileTrigger as j, Button as k } from "react-aria-components";
|
|
3
|
+
import E from "classnames";
|
|
4
|
+
import { useTranslation as X, Trans as L } from "react-i18next";
|
|
5
|
+
import { useFieldIds as O } from "../hooks/useFieldIds.js";
|
|
6
|
+
import { FileInputDefaults as q } from "./FileInputTypes.js";
|
|
7
|
+
import i from "./FileInput.module.scss.js";
|
|
8
|
+
import { applyMissingDefaults as A } from "../../../../helpers/applyMissingDefaults.js";
|
|
9
|
+
import { FieldLayout as U } from "../../FieldLayout/FieldLayout.js";
|
|
10
|
+
import { ButtonIcon as V } from "../Button/ButtonIcon.js";
|
|
11
|
+
import W from "../../../../assets/icons/trashcan.svg.js";
|
|
12
|
+
import J from "../../../../assets/icons/icon-file-outline.svg.js";
|
|
13
|
+
import { Flex as F } from "../../Flex/Flex.js";
|
|
14
|
+
function K(n) {
|
|
15
|
+
return n.kind === "file";
|
|
16
|
+
}
|
|
17
|
+
function R(n) {
|
|
18
|
+
if (n === 0) return "0 Bytes";
|
|
19
|
+
const s = 1024, a = ["Bytes", "KB", "MB", "GB"], t = Math.floor(Math.log(n) / Math.log(s));
|
|
20
|
+
return `${parseFloat((n / Math.pow(s, t)).toFixed(0))} ${a[t]}`;
|
|
21
|
+
}
|
|
22
|
+
const Z = {
|
|
23
|
+
"image/jpeg": "JPG",
|
|
24
|
+
"image/jpg": "JPG",
|
|
25
|
+
"image/png": "PNG",
|
|
26
|
+
"image/gif": "GIF",
|
|
27
|
+
"image/webp": "WEBP",
|
|
28
|
+
"image/svg+xml": "SVG",
|
|
29
|
+
"application/pdf": "PDF",
|
|
30
|
+
"application/msword": "DOC",
|
|
31
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
|
|
32
|
+
"application/vnd.ms-excel": "XLS",
|
|
33
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
|
|
34
|
+
"text/plain": "TXT",
|
|
35
|
+
"text/csv": "CSV"
|
|
36
|
+
};
|
|
37
|
+
function N(n) {
|
|
38
|
+
if (!n || n.length === 0 || n.includes("*/*")) return null;
|
|
39
|
+
const s = n.map((t) => t.startsWith(".") ? t.slice(1).toUpperCase() : Z[t]).filter(Boolean);
|
|
40
|
+
return s.length === 0 ? null : [...new Set(s)].join(", ");
|
|
41
|
+
}
|
|
42
|
+
function le(n) {
|
|
43
|
+
const { t: s } = X("common"), a = A(n, q), {
|
|
44
|
+
label: t,
|
|
45
|
+
description: l,
|
|
46
|
+
errorMessage: h,
|
|
47
|
+
isRequired: x,
|
|
48
|
+
isInvalid: T,
|
|
49
|
+
isDisabled: c,
|
|
50
|
+
id: D,
|
|
51
|
+
value: m,
|
|
52
|
+
onChange: p,
|
|
53
|
+
onBlur: y,
|
|
54
|
+
accept: d,
|
|
55
|
+
className: B,
|
|
56
|
+
"aria-describedby": b
|
|
57
|
+
} = a, { inputId: g, errorMessageId: S, descriptionId: v, ariaDescribedBy: w } = O({
|
|
58
|
+
inputId: D,
|
|
59
|
+
errorMessage: h,
|
|
60
|
+
description: l,
|
|
61
|
+
ariaDescribedBy: b
|
|
62
|
+
}), M = (o) => {
|
|
63
|
+
const r = o?.[0] ?? null;
|
|
64
|
+
p(r);
|
|
65
|
+
}, P = async (o) => {
|
|
66
|
+
const r = o.items.find(K);
|
|
67
|
+
if (r) {
|
|
68
|
+
const I = await r.getFile();
|
|
69
|
+
p(I);
|
|
70
|
+
}
|
|
71
|
+
}, C = (o) => (d ?? ["*/*"]).some((u) => u === "*/*" ? !0 : u.startsWith(".") ? o.has("application/octet-stream") || o.has("Files") : o.has(u)) ? "copy" : "cancel", z = () => {
|
|
72
|
+
p(null);
|
|
73
|
+
};
|
|
74
|
+
return /* @__PURE__ */ e(
|
|
75
|
+
U,
|
|
76
|
+
{
|
|
77
|
+
label: t,
|
|
78
|
+
errorMessage: h,
|
|
79
|
+
isRequired: x,
|
|
80
|
+
htmlFor: g,
|
|
81
|
+
errorMessageId: S,
|
|
82
|
+
descriptionId: v,
|
|
83
|
+
className: B,
|
|
84
|
+
shouldVisuallyHideLabel: !0,
|
|
85
|
+
withErrorIcon: !1,
|
|
86
|
+
children: /* @__PURE__ */ e(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
className: i.root,
|
|
90
|
+
"data-disabled": c || void 0,
|
|
91
|
+
"data-invalid": T || void 0,
|
|
92
|
+
children: m ? /* @__PURE__ */ e(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
className: E(i.filePreview, { [i.disabled]: c }),
|
|
96
|
+
children: /* @__PURE__ */ f(F, { alignItems: "center", gap: 12, children: [
|
|
97
|
+
/* @__PURE__ */ e("div", { className: i.fileIcon, children: /* @__PURE__ */ e(J, { "aria-hidden": "true" }) }),
|
|
98
|
+
/* @__PURE__ */ e("div", { className: i.fileInfo, children: /* @__PURE__ */ f(F, { flexDirection: "column", gap: 0, children: [
|
|
99
|
+
/* @__PURE__ */ e("span", { className: i.fileName, children: m.name }),
|
|
100
|
+
/* @__PURE__ */ e("span", { className: i.fileSize, children: R(m.size) })
|
|
101
|
+
] }) }),
|
|
102
|
+
/* @__PURE__ */ e(
|
|
103
|
+
V,
|
|
104
|
+
{
|
|
105
|
+
"aria-label": s("fileInput.removeFile"),
|
|
106
|
+
onClick: z,
|
|
107
|
+
isDisabled: c,
|
|
108
|
+
children: /* @__PURE__ */ e(W, { "aria-hidden": "true", className: i.removeButton })
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
] })
|
|
112
|
+
}
|
|
113
|
+
) : /* @__PURE__ */ e(
|
|
114
|
+
G,
|
|
115
|
+
{
|
|
116
|
+
onDrop: P,
|
|
117
|
+
getDropOperation: C,
|
|
118
|
+
className: i.dropZone,
|
|
119
|
+
children: /* @__PURE__ */ e(j, { onSelect: M, acceptedFileTypes: d, children: /* @__PURE__ */ e(
|
|
120
|
+
k,
|
|
121
|
+
{
|
|
122
|
+
id: g,
|
|
123
|
+
isDisabled: c,
|
|
124
|
+
"aria-describedby": w,
|
|
125
|
+
onBlur: y,
|
|
126
|
+
className: i.trigger,
|
|
127
|
+
children: /* @__PURE__ */ f("span", { className: i.triggerContent, children: [
|
|
128
|
+
/* @__PURE__ */ e("span", { className: i.triggerText, children: /* @__PURE__ */ e(
|
|
129
|
+
L,
|
|
130
|
+
{
|
|
131
|
+
i18nKey: "fileInput.uploadInstructions",
|
|
132
|
+
ns: "common",
|
|
133
|
+
components: { clickToUpload: /* @__PURE__ */ e("span", { className: i.clickToUpload }) }
|
|
134
|
+
}
|
|
135
|
+
) }),
|
|
136
|
+
N(d) && /* @__PURE__ */ e("span", { className: i.hint, children: s("fileInput.acceptedTypes", { types: N(d) }) }),
|
|
137
|
+
l && /* @__PURE__ */ e("span", { id: v, className: i.hint, children: l })
|
|
138
|
+
] })
|
|
139
|
+
}
|
|
140
|
+
) })
|
|
141
|
+
}
|
|
142
|
+
)
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
export {
|
|
149
|
+
le as FileInput
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=FileInput.js.map
|