@gusto/embedded-react-sdk 0.24.0 → 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 +80 -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/SignatureFormFields.js +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.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/ProgressBar/ProgressBar.js +4 -4
- 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/AssignSignatorySelection.js +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +12 -12
- 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/InviteSignatoryForm.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 +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 +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +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/Form.js +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +35 -33
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +29 -28
- 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/context.js +4 -3
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
- 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/Form.js +1 -1
- package/dist/components/Contractor/Address/useAddress.js +6 -5
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +16 -15
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -2
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +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 +24 -22
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +38 -19
- 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 +26 -25
- 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 +115 -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 +40 -43
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +14 -14
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +10 -9
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +11 -10
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +11 -10
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.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/useSignatureForm.js +4 -3
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +57 -56
- package/dist/components/Employee/EmployeeList/EmployeeList.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/FederalForm.js +7 -7
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -2
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +8 -8
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
- 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/FederalForm.js +7 -7
- package/dist/components/Employee/Taxes/useTaxes.js +4 -3
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +9 -9
- 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/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 +137 -131
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +16 -15
- 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 +85 -104
- 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 +136 -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/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 +6 -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 +25 -1
- package/dist/shared/constants.js +72 -55
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +120 -3
- package/package.json +31 -20
|
@@ -1,23 +1,27 @@
|
|
|
1
|
-
import { PayrollConfiguration as
|
|
1
|
+
import { PayrollConfiguration as e } from "./PayrollConfiguration/PayrollConfiguration.js";
|
|
2
2
|
import { PayrollEditEmployee as t } from "./PayrollEditEmployee/PayrollEditEmployee.js";
|
|
3
|
-
import { PayrollHistory as
|
|
3
|
+
import { PayrollHistory as m } from "./PayrollHistory/PayrollHistory.js";
|
|
4
4
|
import { PayrollLanding as p } from "./PayrollLanding/PayrollLanding.js";
|
|
5
|
-
import { PayrollList as
|
|
5
|
+
import { PayrollList as x } from "./PayrollList/PayrollList.js";
|
|
6
6
|
import { PayrollOverview as P } from "./PayrollOverview/PayrollOverview.js";
|
|
7
|
-
import { PayrollFlow as
|
|
8
|
-
import { PayrollReceipts as
|
|
9
|
-
import { ConfirmWireDetails as
|
|
10
|
-
import {
|
|
7
|
+
import { PayrollFlow as n } from "./PayrollFlow/PayrollFlow.js";
|
|
8
|
+
import { PayrollReceipts as v } from "./PayrollReceipts/PayrollReceipts.js";
|
|
9
|
+
import { ConfirmWireDetails as R } from "./ConfirmWireDetails/ConfirmWireDetails.js";
|
|
10
|
+
import { RecoveryCases as g } from "./RecoveryCases/RecoveryCases.js";
|
|
11
|
+
import { PayrollBlocker as w } from "./PayrollBlocker/PayrollBlocker.js";
|
|
12
|
+
import { InformationRequests as L } from "./InformationRequests/InformationRequests.js";
|
|
11
13
|
export {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
R as ConfirmWireDetails,
|
|
15
|
+
L as InformationRequests,
|
|
16
|
+
w as PayrollBlocker,
|
|
17
|
+
e as PayrollConfiguration,
|
|
15
18
|
t as PayrollEditEmployee,
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
n as PayrollFlow,
|
|
20
|
+
m as PayrollHistory,
|
|
18
21
|
p as PayrollLanding,
|
|
19
|
-
|
|
22
|
+
x as PayrollList,
|
|
20
23
|
P as PayrollOverview,
|
|
21
|
-
|
|
24
|
+
v as PayrollReceipts,
|
|
25
|
+
g as RecoveryCases
|
|
22
26
|
};
|
|
23
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -6,12 +6,15 @@ interface UsePreparedPayrollDataParams {
|
|
|
6
6
|
payrollId: string;
|
|
7
7
|
employeeUuids?: string[];
|
|
8
8
|
sortBy?: PayrollPrepareSortBy;
|
|
9
|
+
onDataReady?: (preparedPayroll: PayrollPrepared) => void;
|
|
9
10
|
}
|
|
10
11
|
interface UsePreparedPayrollDataReturn {
|
|
11
12
|
handlePreparePayroll: () => Promise<void>;
|
|
12
13
|
preparedPayroll: PayrollPrepared | undefined;
|
|
13
14
|
paySchedule: PayScheduleObject | undefined;
|
|
14
15
|
isLoading: boolean;
|
|
16
|
+
isPaginating: boolean;
|
|
17
|
+
hasInitialData: boolean;
|
|
15
18
|
}
|
|
16
|
-
export declare const usePreparedPayrollData: ({ companyId, payrollId, employeeUuids, sortBy, }: UsePreparedPayrollDataParams) => UsePreparedPayrollDataReturn;
|
|
19
|
+
export declare const usePreparedPayrollData: ({ companyId, payrollId, employeeUuids, sortBy, onDataReady, }: UsePreparedPayrollDataParams) => UsePreparedPayrollDataReturn;
|
|
17
20
|
export {};
|
|
@@ -1,58 +1,70 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
import { usePayrollsPrepareMutation as
|
|
3
|
-
import { usePaySchedulesGet as
|
|
1
|
+
import { useState as g, useRef as b, useMemo as L, useCallback as D, useEffect as j } from "react";
|
|
2
|
+
import { usePayrollsPrepareMutation as q } from "@gusto/embedded-api/react-query/payrollsPrepare";
|
|
3
|
+
import { usePaySchedulesGet as w } from "@gusto/embedded-api/react-query/paySchedulesGet";
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "react-error-boundary";
|
|
6
6
|
import "react-i18next";
|
|
7
7
|
import "@gusto/embedded-api/models/errors/apierror";
|
|
8
8
|
import "@gusto/embedded-api/models/errors/sdkvalidationerror";
|
|
9
9
|
import "@tanstack/react-query";
|
|
10
|
-
import { useBase as
|
|
10
|
+
import { useBase as M } from "../Base/useBase.js";
|
|
11
11
|
import "../../shared/constants.js";
|
|
12
12
|
import "classnames";
|
|
13
13
|
import "../../contexts/ComponentAdapter/useComponentContext.js";
|
|
14
|
+
import "../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
14
15
|
import "dompurify";
|
|
15
|
-
const
|
|
16
|
-
companyId:
|
|
17
|
-
payrollId:
|
|
18
|
-
employeeUuids:
|
|
19
|
-
sortBy:
|
|
16
|
+
const F = ({
|
|
17
|
+
companyId: r,
|
|
18
|
+
payrollId: s,
|
|
19
|
+
employeeUuids: a,
|
|
20
|
+
sortBy: l,
|
|
21
|
+
onDataReady: n
|
|
20
22
|
}) => {
|
|
21
|
-
const { mutateAsync:
|
|
23
|
+
const { mutateAsync: p, isPending: u } = q(), [t, d] = g(), e = b(!1), { baseSubmitHandler: c } = M(), P = L(() => a?.join(",") ?? "", [a]), { data: m, isLoading: y } = w(
|
|
22
24
|
{
|
|
23
|
-
companyId:
|
|
24
|
-
payScheduleId:
|
|
25
|
+
companyId: r,
|
|
26
|
+
payScheduleId: t?.payPeriod?.payScheduleUuid || ""
|
|
25
27
|
},
|
|
26
28
|
{
|
|
27
|
-
enabled: !!
|
|
29
|
+
enabled: !!t?.payPeriod?.payScheduleUuid
|
|
28
30
|
}
|
|
29
|
-
),
|
|
30
|
-
await
|
|
31
|
-
const
|
|
31
|
+
), o = D(async () => {
|
|
32
|
+
await c(null, async () => {
|
|
33
|
+
const i = await p({
|
|
32
34
|
request: {
|
|
33
|
-
companyId:
|
|
34
|
-
payrollId:
|
|
35
|
-
sortBy:
|
|
35
|
+
companyId: r,
|
|
36
|
+
payrollId: s,
|
|
37
|
+
sortBy: l,
|
|
36
38
|
requestBody: {
|
|
37
|
-
employeeUuids:
|
|
39
|
+
employeeUuids: a
|
|
38
40
|
}
|
|
39
41
|
}
|
|
40
42
|
});
|
|
41
|
-
d(
|
|
43
|
+
d(i.payrollPrepared), i.payrollPrepared && (e.current = !0, n?.(i.payrollPrepared));
|
|
42
44
|
});
|
|
43
|
-
}, [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
}, [
|
|
46
|
+
r,
|
|
47
|
+
s,
|
|
48
|
+
p,
|
|
49
|
+
P,
|
|
50
|
+
c,
|
|
51
|
+
l,
|
|
52
|
+
n
|
|
53
|
+
]);
|
|
54
|
+
j(() => {
|
|
55
|
+
o();
|
|
56
|
+
}, [o]);
|
|
57
|
+
const h = u && !e.current, f = u && e.current, S = h || y;
|
|
48
58
|
return {
|
|
49
|
-
handlePreparePayroll:
|
|
50
|
-
preparedPayroll:
|
|
51
|
-
paySchedule:
|
|
52
|
-
isLoading:
|
|
59
|
+
handlePreparePayroll: o,
|
|
60
|
+
preparedPayroll: t,
|
|
61
|
+
paySchedule: m?.payScheduleObject,
|
|
62
|
+
isLoading: S,
|
|
63
|
+
isPaginating: f,
|
|
64
|
+
hasInitialData: e.current
|
|
53
65
|
};
|
|
54
66
|
};
|
|
55
67
|
export {
|
|
56
|
-
|
|
68
|
+
F as usePreparedPayrollData
|
|
57
69
|
};
|
|
58
70
|
//# sourceMappingURL=usePreparedPayrollData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePreparedPayrollData.js","sources":["../../../src/components/Payroll/usePreparedPayrollData.ts"],"sourcesContent":["import { useState, useEffect, useCallback } from 'react'\nimport { usePayrollsPrepareMutation } from '@gusto/embedded-api/react-query/payrollsPrepare'\nimport { usePaySchedulesGet } from '@gusto/embedded-api/react-query/paySchedulesGet'\nimport type { PayrollPrepared } from '@gusto/embedded-api/models/components/payrollprepared'\nimport type { PayScheduleObject } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayrollPrepareSortBy } from '@gusto/embedded-api/models/components/payrollpreparesortby'\nimport { useBase } from '../Base'\n\ninterface UsePreparedPayrollDataParams {\n companyId: string\n payrollId: string\n employeeUuids?: string[]\n sortBy?: PayrollPrepareSortBy\n}\n\ninterface UsePreparedPayrollDataReturn {\n handlePreparePayroll: () => Promise<void>\n preparedPayroll: PayrollPrepared | undefined\n paySchedule: PayScheduleObject | undefined\n isLoading: boolean\n}\n\nexport const usePreparedPayrollData = ({\n companyId,\n payrollId,\n employeeUuids,\n sortBy,\n}: UsePreparedPayrollDataParams): UsePreparedPayrollDataReturn => {\n const { mutateAsync: preparePayroll, isPending: isPreparePayrollPending } =\n usePayrollsPrepareMutation()\n const [preparedPayroll, setPreparedPayroll] = useState<PayrollPrepared | undefined>()\n const { baseSubmitHandler } = useBase()\n\n const { data: payScheduleData, isLoading: isPayScheduleLoading } = usePaySchedulesGet(\n {\n companyId,\n payScheduleId: preparedPayroll?.payPeriod?.payScheduleUuid || '',\n },\n {\n enabled: !!preparedPayroll?.payPeriod?.payScheduleUuid,\n },\n )\n\n const handlePreparePayroll = useCallback(async () => {\n await baseSubmitHandler(null, async () => {\n const result = await preparePayroll({\n request: {\n companyId,\n payrollId,\n sortBy,\n requestBody: {\n employeeUuids,\n },\n },\n })\n setPreparedPayroll(result.payrollPrepared)\n })\n }, [companyId
|
|
1
|
+
{"version":3,"file":"usePreparedPayrollData.js","sources":["../../../src/components/Payroll/usePreparedPayrollData.ts"],"sourcesContent":["import { useState, useEffect, useCallback, useRef, useMemo } from 'react'\nimport { usePayrollsPrepareMutation } from '@gusto/embedded-api/react-query/payrollsPrepare'\nimport { usePaySchedulesGet } from '@gusto/embedded-api/react-query/paySchedulesGet'\nimport type { PayrollPrepared } from '@gusto/embedded-api/models/components/payrollprepared'\nimport type { PayScheduleObject } from '@gusto/embedded-api/models/components/payscheduleobject'\nimport type { PayrollPrepareSortBy } from '@gusto/embedded-api/models/components/payrollpreparesortby'\nimport { useBase } from '../Base'\n\ninterface UsePreparedPayrollDataParams {\n companyId: string\n payrollId: string\n employeeUuids?: string[]\n sortBy?: PayrollPrepareSortBy\n onDataReady?: (preparedPayroll: PayrollPrepared) => void\n}\n\ninterface UsePreparedPayrollDataReturn {\n handlePreparePayroll: () => Promise<void>\n preparedPayroll: PayrollPrepared | undefined\n paySchedule: PayScheduleObject | undefined\n isLoading: boolean\n isPaginating: boolean\n hasInitialData: boolean\n}\n\nexport const usePreparedPayrollData = ({\n companyId,\n payrollId,\n employeeUuids,\n sortBy,\n onDataReady,\n}: UsePreparedPayrollDataParams): UsePreparedPayrollDataReturn => {\n const { mutateAsync: preparePayroll, isPending: isPreparePayrollPending } =\n usePayrollsPrepareMutation()\n const [preparedPayroll, setPreparedPayroll] = useState<PayrollPrepared | undefined>()\n const hasInitialDataRef = useRef(false)\n const { baseSubmitHandler } = useBase()\n\n const employeeUuidsKey = useMemo(() => employeeUuids?.join(',') ?? '', [employeeUuids])\n\n const { data: payScheduleData, isLoading: isPayScheduleLoading } = usePaySchedulesGet(\n {\n companyId,\n payScheduleId: preparedPayroll?.payPeriod?.payScheduleUuid || '',\n },\n {\n enabled: !!preparedPayroll?.payPeriod?.payScheduleUuid,\n },\n )\n\n const handlePreparePayroll = useCallback(async () => {\n await baseSubmitHandler(null, async () => {\n const result = await preparePayroll({\n request: {\n companyId,\n payrollId,\n sortBy,\n requestBody: {\n employeeUuids,\n },\n },\n })\n setPreparedPayroll(result.payrollPrepared)\n if (result.payrollPrepared) {\n hasInitialDataRef.current = true\n onDataReady?.(result.payrollPrepared)\n }\n })\n }, [\n companyId,\n payrollId,\n preparePayroll,\n employeeUuidsKey,\n baseSubmitHandler,\n sortBy,\n onDataReady,\n ])\n\n useEffect(() => {\n void handlePreparePayroll()\n }, [handlePreparePayroll])\n\n const isInitialLoading = isPreparePayrollPending && !hasInitialDataRef.current\n const isPaginating = isPreparePayrollPending && hasInitialDataRef.current\n const isLoading = isInitialLoading || isPayScheduleLoading\n\n return {\n handlePreparePayroll,\n preparedPayroll,\n paySchedule: payScheduleData?.payScheduleObject,\n isLoading,\n isPaginating,\n hasInitialData: hasInitialDataRef.current,\n }\n}\n"],"names":["usePreparedPayrollData","companyId","payrollId","employeeUuids","sortBy","onDataReady","preparePayroll","isPreparePayrollPending","usePayrollsPrepareMutation","preparedPayroll","setPreparedPayroll","useState","hasInitialDataRef","useRef","baseSubmitHandler","useBase","employeeUuidsKey","useMemo","payScheduleData","isPayScheduleLoading","usePaySchedulesGet","handlePreparePayroll","useCallback","result","useEffect","isInitialLoading","isPaginating","isLoading"],"mappings":";;;;;;;;;;;;;;;AAyBO,MAAMA,IAAyB,CAAC;AAAA,EACrC,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AACF,MAAkE;AAChE,QAAM,EAAE,aAAaC,GAAgB,WAAWC,EAAA,IAC9CC,EAAA,GACI,CAACC,GAAiBC,CAAkB,IAAIC,EAAA,GACxCC,IAAoBC,EAAO,EAAK,GAChC,EAAE,mBAAAC,EAAA,IAAsBC,EAAA,GAExBC,IAAmBC,EAAQ,MAAMd,GAAe,KAAK,GAAG,KAAK,IAAI,CAACA,CAAa,CAAC,GAEhF,EAAE,MAAMe,GAAiB,WAAWC,MAAyBC;AAAA,IACjE;AAAA,MACE,WAAAnB;AAAA,MACA,eAAeQ,GAAiB,WAAW,mBAAmB;AAAA,IAAA;AAAA,IAEhE;AAAA,MACE,SAAS,CAAC,CAACA,GAAiB,WAAW;AAAA,IAAA;AAAA,EACzC,GAGIY,IAAuBC,EAAY,YAAY;AACnD,UAAMR,EAAkB,MAAM,YAAY;AACxC,YAAMS,IAAS,MAAMjB,EAAe;AAAA,QAClC,SAAS;AAAA,UACP,WAAAL;AAAA,UACA,WAAAC;AAAA,UACA,QAAAE;AAAA,UACA,aAAa;AAAA,YACX,eAAAD;AAAA,UAAA;AAAA,QACF;AAAA,MACF,CACD;AACD,MAAAO,EAAmBa,EAAO,eAAe,GACrCA,EAAO,oBACTX,EAAkB,UAAU,IAC5BP,IAAckB,EAAO,eAAe;AAAA,IAExC,CAAC;AAAA,EACH,GAAG;AAAA,IACDtB;AAAA,IACAC;AAAA,IACAI;AAAA,IACAU;AAAA,IACAF;AAAA,IACAV;AAAA,IACAC;AAAA,EAAA,CACD;AAED,EAAAmB,EAAU,MAAM;AACd,IAAKH,EAAA;AAAA,EACP,GAAG,CAACA,CAAoB,CAAC;AAEzB,QAAMI,IAAmBlB,KAA2B,CAACK,EAAkB,SACjEc,IAAenB,KAA2BK,EAAkB,SAC5De,IAAYF,KAAoBN;AAEtC,SAAO;AAAA,IACL,sBAAAE;AAAA,IACA,iBAAAZ;AAAA,IACA,aAAaS,GAAiB;AAAA,IAC9B,WAAAS;AAAA,IACA,cAAAD;AAAA,IACA,gBAAgBd,EAAkB;AAAA,EAAA;AAEtC;"}
|
|
@@ -4,25 +4,25 @@ import { TextArea as t } from "../../../components/Common/UI/TextArea/TextArea.j
|
|
|
4
4
|
import { NumberInput as i } from "../../../components/Common/UI/NumberInput/NumberInput.js";
|
|
5
5
|
import { CheckboxGroup as e } from "../../../components/Common/UI/CheckboxGroup/CheckboxGroup.js";
|
|
6
6
|
import { ComboBox as p } from "../../../components/Common/UI/ComboBox/ComboBox.js";
|
|
7
|
-
import { Checkbox as
|
|
8
|
-
import { DatePicker as
|
|
7
|
+
import { Checkbox as n } from "../../../components/Common/UI/Checkbox/Checkbox.js";
|
|
8
|
+
import { DatePicker as a } from "../../../components/Common/UI/DatePicker/DatePicker.js";
|
|
9
9
|
import { Radio as f } from "../../../components/Common/UI/Radio/Radio.js";
|
|
10
10
|
import { RadioGroup as d } from "../../../components/Common/UI/RadioGroup/RadioGroup.js";
|
|
11
|
-
import { Select as
|
|
12
|
-
import { Switch as
|
|
11
|
+
import { Select as u } from "../../../components/Common/UI/Select/Select.js";
|
|
12
|
+
import { Switch as s } from "../../../components/Common/UI/Switch/Switch.js";
|
|
13
13
|
import { Button as c } from "../../../components/Common/UI/Button/Button.js";
|
|
14
|
-
import { ButtonIcon as
|
|
15
|
-
import { Alert as
|
|
16
|
-
import { Card as
|
|
17
|
-
import { Badge as
|
|
14
|
+
import { ButtonIcon as l } from "../../../components/Common/UI/Button/ButtonIcon.js";
|
|
15
|
+
import { Alert as b } from "../../../components/Common/UI/Alert/Alert.js";
|
|
16
|
+
import { Card as x } from "../../../components/Common/UI/Card/Card.js";
|
|
17
|
+
import { Badge as B } from "../../../components/Common/UI/Badge/Badge.js";
|
|
18
18
|
import { Banner as C } from "../../../components/Common/UI/Banner/Banner.js";
|
|
19
19
|
import { Link as g } from "../../../components/Common/UI/Link/Link.js";
|
|
20
20
|
import { Menu as L } from "../../../components/Common/UI/Menu/Menu.js";
|
|
21
21
|
import { Table as T } from "../../../components/Common/UI/Table/Table.js";
|
|
22
22
|
import { OrderedList as k } from "../../../components/Common/UI/List/OrderedList.js";
|
|
23
|
-
import { UnorderedList as
|
|
24
|
-
import { Heading as
|
|
25
|
-
import { Text as
|
|
23
|
+
import { UnorderedList as I } from "../../../components/Common/UI/List/UnorderedList.js";
|
|
24
|
+
import { Heading as h } from "../../../components/Common/UI/Heading/Heading.js";
|
|
25
|
+
import { Text as D } from "../../../components/Common/UI/Text/Text.js";
|
|
26
26
|
import { CalendarPreview as P } from "../../../components/Common/UI/CalendarPreview/CalendarPreview.js";
|
|
27
27
|
import { ProgressBar as S } from "../../../components/Common/UI/ProgressBar/ProgressBar.js";
|
|
28
28
|
import { Breadcrumbs as w } from "../../../components/Common/UI/Breadcrumbs/Breadcrumbs.js";
|
|
@@ -31,31 +31,32 @@ import { Dialog as G } from "../../../components/Common/UI/Dialog/Dialog.js";
|
|
|
31
31
|
import { Modal as M } from "../../../components/Common/UI/Modal/Modal.js";
|
|
32
32
|
import { LoadingSpinner as R } from "../../../components/Common/UI/LoadingSpinner/LoadingSpinner.js";
|
|
33
33
|
import { DescriptionList as v } from "../../../components/Common/UI/DescriptionList/DescriptionList.js";
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
import { FileInput as F } from "../../../components/Common/UI/FileInput/FileInput.js";
|
|
35
|
+
const br = {
|
|
36
|
+
Alert: (r) => /* @__PURE__ */ o(b, { ...r }),
|
|
37
|
+
Badge: (r) => /* @__PURE__ */ o(B, { ...r }),
|
|
37
38
|
Banner: (r) => /* @__PURE__ */ o(C, { ...r }),
|
|
38
39
|
Button: (r) => /* @__PURE__ */ o(c, { ...r }),
|
|
39
|
-
ButtonIcon: (r) => /* @__PURE__ */ o(
|
|
40
|
-
Card: (r) => /* @__PURE__ */ o(
|
|
40
|
+
ButtonIcon: (r) => /* @__PURE__ */ o(l, { ...r }),
|
|
41
|
+
Card: (r) => /* @__PURE__ */ o(x, { ...r }),
|
|
41
42
|
TextInput: (r) => /* @__PURE__ */ o(m, { ...r }),
|
|
42
43
|
TextArea: (r) => /* @__PURE__ */ o(t, { ...r }),
|
|
43
|
-
Checkbox: (r) => /* @__PURE__ */ o(
|
|
44
|
+
Checkbox: (r) => /* @__PURE__ */ o(n, { ...r }),
|
|
44
45
|
CheckboxGroup: (r) => /* @__PURE__ */ o(e, { ...r }),
|
|
45
46
|
ComboBox: (r) => /* @__PURE__ */ o(p, { ...r }),
|
|
46
|
-
DatePicker: (r) => /* @__PURE__ */ o(
|
|
47
|
+
DatePicker: (r) => /* @__PURE__ */ o(a, { ...r }),
|
|
47
48
|
OrderedList: (r) => /* @__PURE__ */ o(k, { ...r }),
|
|
48
|
-
UnorderedList: (r) => /* @__PURE__ */ o(
|
|
49
|
+
UnorderedList: (r) => /* @__PURE__ */ o(I, { ...r }),
|
|
49
50
|
NumberInput: (r) => /* @__PURE__ */ o(i, { ...r }),
|
|
50
51
|
Radio: (r) => /* @__PURE__ */ o(f, { ...r }),
|
|
51
52
|
RadioGroup: (r) => /* @__PURE__ */ o(d, { ...r }),
|
|
52
|
-
Select: (r) => /* @__PURE__ */ o(
|
|
53
|
-
Switch: (r) => /* @__PURE__ */ o(
|
|
53
|
+
Select: (r) => /* @__PURE__ */ o(u, { ...r }),
|
|
54
|
+
Switch: (r) => /* @__PURE__ */ o(s, { ...r }),
|
|
54
55
|
Link: (r) => /* @__PURE__ */ o(g, { ...r }),
|
|
55
56
|
Menu: (r) => /* @__PURE__ */ o(L, { ...r }),
|
|
56
57
|
Table: (r) => /* @__PURE__ */ o(T, { ...r }),
|
|
57
|
-
Heading: (r) => /* @__PURE__ */ o(
|
|
58
|
-
Text: (r) => /* @__PURE__ */ o(
|
|
58
|
+
Heading: (r) => /* @__PURE__ */ o(h, { ...r }),
|
|
59
|
+
Text: (r) => /* @__PURE__ */ o(D, { ...r }),
|
|
59
60
|
CalendarPreview: (r) => /* @__PURE__ */ o(P, { ...r }),
|
|
60
61
|
ProgressBar: (r) => /* @__PURE__ */ o(S, { ...r }),
|
|
61
62
|
Breadcrumbs: (r) => /* @__PURE__ */ o(w, { ...r }),
|
|
@@ -63,9 +64,10 @@ const cr = {
|
|
|
63
64
|
Dialog: (r) => /* @__PURE__ */ o(G, { ...r }),
|
|
64
65
|
Modal: (r) => /* @__PURE__ */ o(M, { ...r }),
|
|
65
66
|
LoadingSpinner: (r) => /* @__PURE__ */ o(R, { ...r }),
|
|
66
|
-
DescriptionList: (r) => /* @__PURE__ */ o(v, { ...r })
|
|
67
|
+
DescriptionList: (r) => /* @__PURE__ */ o(v, { ...r }),
|
|
68
|
+
FileInput: (r) => /* @__PURE__ */ o(F, { ...r })
|
|
67
69
|
};
|
|
68
70
|
export {
|
|
69
|
-
|
|
71
|
+
br as defaultComponents
|
|
70
72
|
};
|
|
71
73
|
//# sourceMappingURL=defaultComponentAdapter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultComponentAdapter.js","sources":["../../../../src/contexts/ComponentAdapter/adapters/defaultComponentAdapter.tsx"],"sourcesContent":["// This is used to set the default adapter and can already be ommitted by using the\n// `GustoProviderCustomUIAdapter` component. That means this is a safe file to use\n// non type imports from the UI directory so the lint rule is disabled for this file.\n/* eslint-disable no-restricted-imports */\nimport type { ComponentsContextType } from '../useComponentContext'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInput } from '@/components/Common/UI/TextInput'\nimport type { TextAreaProps } from '@/components/Common/UI/TextArea/TextAreaTypes'\nimport { TextArea } from '@/components/Common/UI/TextArea'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport { NumberInput } from '@/components/Common/UI/NumberInput'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroup } from '@/components/Common/UI/CheckboxGroup'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport { ComboBox } from '@/components/Common/UI/ComboBox/ComboBox'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { Checkbox } from '@/components/Common/UI/Checkbox'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport { DatePicker } from '@/components/Common/UI/DatePicker'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { Radio } from '@/components/Common/UI/Radio'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroup } from '@/components/Common/UI/RadioGroup'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport { Select } from '@/components/Common/UI/Select'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { Switch } from '@/components/Common/UI/Switch'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { Button } from '@/components/Common/UI/Button'\nimport { ButtonIcon } from '@/components/Common/UI/Button/ButtonIcon'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { Alert } from '@/components/Common/UI/Alert/Alert'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport { Card } from '@/components/Common/UI/Card/Card'\nimport { Badge } from '@/components/Common/UI/Badge/Badge'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport { Banner } from '@/components/Common/UI/Banner/Banner'\nimport type { BannerProps } from '@/components/Common/UI/Banner/BannerTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport { Link } from '@/components/Common/UI/Link'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { Menu } from '@/components/Common/UI/Menu'\nimport type { TableProps } from '@/components/Common/UI/Table'\nimport { Table } from '@/components/Common/UI/Table'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List'\nimport { OrderedList, UnorderedList } from '@/components/Common/UI/List'\nimport { Heading } from '@/components/Common/UI/Heading'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport { Text } from '@/components/Common/UI/Text'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { CalendarPreview } from '@/components/Common/UI/CalendarPreview'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar'\nimport { ProgressBar } from '@/components/Common/UI/ProgressBar'\nimport type { BreadcrumbsProps } from '@/components/Common/UI/Breadcrumbs'\nimport { Breadcrumbs } from '@/components/Common/UI/Breadcrumbs'\nimport type { TabsProps } from '@/components/Common/UI/Tabs/TabsTypes'\nimport { Tabs } from '@/components/Common/UI/Tabs'\nimport type { DialogProps } from '@/components/Common/UI/Dialog/DialogTypes'\nimport { Dialog } from '@/components/Common/UI/Dialog'\nimport type { ModalProps } from '@/components/Common/UI/Modal/ModalTypes'\nimport { Modal } from '@/components/Common/UI/Modal'\nimport type { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport { LoadingSpinner } from '@/components/Common/UI/LoadingSpinner'\nimport type { DescriptionListProps } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\nimport { DescriptionList } from '@/components/Common/UI/DescriptionList'\n\nexport const defaultComponents: ComponentsContextType = {\n Alert: (props: AlertProps) => <Alert {...props} />,\n Badge: (props: BadgeProps) => <Badge {...props} />,\n Banner: (props: BannerProps) => <Banner {...props} />,\n Button: (props: ButtonProps) => <Button {...props} />,\n ButtonIcon: (props: ButtonIconProps) => <ButtonIcon {...props} />,\n Card: (props: CardProps) => <Card {...props} />,\n TextInput: (props: TextInputProps) => <TextInput {...props} />,\n TextArea: (props: TextAreaProps) => <TextArea {...props} />,\n Checkbox: (props: CheckboxProps) => <Checkbox {...props} />,\n CheckboxGroup: (props: CheckboxGroupProps) => <CheckboxGroup {...props} />,\n ComboBox: (props: ComboBoxProps) => <ComboBox {...props} />,\n DatePicker: (props: DatePickerProps) => <DatePicker {...props} />,\n OrderedList: (props: OrderedListProps) => <OrderedList {...props} />,\n UnorderedList: (props: UnorderedListProps) => <UnorderedList {...props} />,\n NumberInput: (props: NumberInputProps) => <NumberInput {...props} />,\n Radio: (props: RadioProps) => <Radio {...props} />,\n RadioGroup: (props: RadioGroupProps) => <RadioGroup {...props} />,\n Select: (props: SelectProps) => <Select {...props} />,\n Switch: (props: SwitchProps) => <Switch {...props} />,\n Link: (props: LinkProps) => <Link {...props} />,\n Menu: (props: MenuProps) => <Menu {...props} />,\n Table: (props: TableProps) => <Table {...props} />,\n Heading: (props: HeadingProps) => <Heading {...props} />,\n Text: (props: TextProps) => <Text {...props} />,\n CalendarPreview: (props: CalendarPreviewProps) => <CalendarPreview {...props} />,\n ProgressBar: (props: ProgressBarProps) => <ProgressBar {...props} />,\n Breadcrumbs: (props: BreadcrumbsProps) => <Breadcrumbs {...props} />,\n Tabs: (props: TabsProps) => <Tabs {...props} />,\n Dialog: (props: DialogProps) => <Dialog {...props} />,\n Modal: (props: ModalProps) => <Modal {...props} />,\n LoadingSpinner: (props: LoadingSpinnerProps) => <LoadingSpinner {...props} />,\n DescriptionList: (props: DescriptionListProps) => <DescriptionList {...props} />,\n}\n"],"names":["defaultComponents","props","jsx","Alert","Badge","Banner","Button","ButtonIcon","Card","TextInput","TextArea","Checkbox","CheckboxGroup","ComboBox","DatePicker","OrderedList","UnorderedList","NumberInput","Radio","RadioGroup","Select","Switch","Link","Menu","Table","Heading","Text","CalendarPreview","ProgressBar","Breadcrumbs","Tabs","Dialog","Modal","LoadingSpinner","DescriptionList"],"mappings":"
|
|
1
|
+
{"version":3,"file":"defaultComponentAdapter.js","sources":["../../../../src/contexts/ComponentAdapter/adapters/defaultComponentAdapter.tsx"],"sourcesContent":["// This is used to set the default adapter and can already be ommitted by using the\n// `GustoProviderCustomUIAdapter` component. That means this is a safe file to use\n// non type imports from the UI directory so the lint rule is disabled for this file.\n/* eslint-disable no-restricted-imports */\nimport type { ComponentsContextType } from '../useComponentContext'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInput } from '@/components/Common/UI/TextInput'\nimport type { TextAreaProps } from '@/components/Common/UI/TextArea/TextAreaTypes'\nimport { TextArea } from '@/components/Common/UI/TextArea'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport { NumberInput } from '@/components/Common/UI/NumberInput'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroup } from '@/components/Common/UI/CheckboxGroup'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport { ComboBox } from '@/components/Common/UI/ComboBox/ComboBox'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { Checkbox } from '@/components/Common/UI/Checkbox'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport { DatePicker } from '@/components/Common/UI/DatePicker'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { Radio } from '@/components/Common/UI/Radio'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroup } from '@/components/Common/UI/RadioGroup'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport { Select } from '@/components/Common/UI/Select'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { Switch } from '@/components/Common/UI/Switch'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { Button } from '@/components/Common/UI/Button'\nimport { ButtonIcon } from '@/components/Common/UI/Button/ButtonIcon'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { Alert } from '@/components/Common/UI/Alert/Alert'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport { Card } from '@/components/Common/UI/Card/Card'\nimport { Badge } from '@/components/Common/UI/Badge/Badge'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport { Banner } from '@/components/Common/UI/Banner/Banner'\nimport type { BannerProps } from '@/components/Common/UI/Banner/BannerTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport { Link } from '@/components/Common/UI/Link'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { Menu } from '@/components/Common/UI/Menu'\nimport type { TableProps } from '@/components/Common/UI/Table'\nimport { Table } from '@/components/Common/UI/Table'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List'\nimport { OrderedList, UnorderedList } from '@/components/Common/UI/List'\nimport { Heading } from '@/components/Common/UI/Heading'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport { Text } from '@/components/Common/UI/Text'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { CalendarPreview } from '@/components/Common/UI/CalendarPreview'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar'\nimport { ProgressBar } from '@/components/Common/UI/ProgressBar'\nimport type { BreadcrumbsProps } from '@/components/Common/UI/Breadcrumbs'\nimport { Breadcrumbs } from '@/components/Common/UI/Breadcrumbs'\nimport type { TabsProps } from '@/components/Common/UI/Tabs/TabsTypes'\nimport { Tabs } from '@/components/Common/UI/Tabs'\nimport type { DialogProps } from '@/components/Common/UI/Dialog/DialogTypes'\nimport { Dialog } from '@/components/Common/UI/Dialog'\nimport type { ModalProps } from '@/components/Common/UI/Modal/ModalTypes'\nimport { Modal } from '@/components/Common/UI/Modal'\nimport type { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport { LoadingSpinner } from '@/components/Common/UI/LoadingSpinner'\nimport type { DescriptionListProps } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\nimport { DescriptionList } from '@/components/Common/UI/DescriptionList'\nimport type { FileInputProps } from '@/components/Common/UI/FileInput/FileInputTypes'\nimport { FileInput } from '@/components/Common/UI/FileInput'\n\nexport const defaultComponents: ComponentsContextType = {\n Alert: (props: AlertProps) => <Alert {...props} />,\n Badge: (props: BadgeProps) => <Badge {...props} />,\n Banner: (props: BannerProps) => <Banner {...props} />,\n Button: (props: ButtonProps) => <Button {...props} />,\n ButtonIcon: (props: ButtonIconProps) => <ButtonIcon {...props} />,\n Card: (props: CardProps) => <Card {...props} />,\n TextInput: (props: TextInputProps) => <TextInput {...props} />,\n TextArea: (props: TextAreaProps) => <TextArea {...props} />,\n Checkbox: (props: CheckboxProps) => <Checkbox {...props} />,\n CheckboxGroup: (props: CheckboxGroupProps) => <CheckboxGroup {...props} />,\n ComboBox: (props: ComboBoxProps) => <ComboBox {...props} />,\n DatePicker: (props: DatePickerProps) => <DatePicker {...props} />,\n OrderedList: (props: OrderedListProps) => <OrderedList {...props} />,\n UnorderedList: (props: UnorderedListProps) => <UnorderedList {...props} />,\n NumberInput: (props: NumberInputProps) => <NumberInput {...props} />,\n Radio: (props: RadioProps) => <Radio {...props} />,\n RadioGroup: (props: RadioGroupProps) => <RadioGroup {...props} />,\n Select: (props: SelectProps) => <Select {...props} />,\n Switch: (props: SwitchProps) => <Switch {...props} />,\n Link: (props: LinkProps) => <Link {...props} />,\n Menu: (props: MenuProps) => <Menu {...props} />,\n Table: (props: TableProps) => <Table {...props} />,\n Heading: (props: HeadingProps) => <Heading {...props} />,\n Text: (props: TextProps) => <Text {...props} />,\n CalendarPreview: (props: CalendarPreviewProps) => <CalendarPreview {...props} />,\n ProgressBar: (props: ProgressBarProps) => <ProgressBar {...props} />,\n Breadcrumbs: (props: BreadcrumbsProps) => <Breadcrumbs {...props} />,\n Tabs: (props: TabsProps) => <Tabs {...props} />,\n Dialog: (props: DialogProps) => <Dialog {...props} />,\n Modal: (props: ModalProps) => <Modal {...props} />,\n LoadingSpinner: (props: LoadingSpinnerProps) => <LoadingSpinner {...props} />,\n DescriptionList: (props: DescriptionListProps) => <DescriptionList {...props} />,\n FileInput: (props: FileInputProps) => <FileInput {...props} />,\n}\n"],"names":["defaultComponents","props","jsx","Alert","Badge","Banner","Button","ButtonIcon","Card","TextInput","TextArea","Checkbox","CheckboxGroup","ComboBox","DatePicker","OrderedList","UnorderedList","NumberInput","Radio","RadioGroup","Select","Switch","Link","Menu","Table","Heading","Text","CalendarPreview","ProgressBar","Breadcrumbs","Tabs","Dialog","Modal","LoadingSpinner","DescriptionList","FileInput"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqEO,MAAMA,KAA2C;AAAA,EACtD,OAAO,CAACC,MAAsB,gBAAAC,EAACC,GAAA,EAAO,GAAGF,GAAO;AAAA,EAChD,OAAO,CAACA,MAAsB,gBAAAC,EAACE,GAAA,EAAO,GAAGH,GAAO;AAAA,EAChD,QAAQ,CAACA,MAAuB,gBAAAC,EAACG,GAAA,EAAQ,GAAGJ,GAAO;AAAA,EACnD,QAAQ,CAACA,MAAuB,gBAAAC,EAACI,GAAA,EAAQ,GAAGL,GAAO;AAAA,EACnD,YAAY,CAACA,MAA2B,gBAAAC,EAACK,GAAA,EAAY,GAAGN,GAAO;AAAA,EAC/D,MAAM,CAACA,MAAqB,gBAAAC,EAACM,GAAA,EAAM,GAAGP,GAAO;AAAA,EAC7C,WAAW,CAACA,MAA0B,gBAAAC,EAACO,GAAA,EAAW,GAAGR,GAAO;AAAA,EAC5D,UAAU,CAACA,MAAyB,gBAAAC,EAACQ,GAAA,EAAU,GAAGT,GAAO;AAAA,EACzD,UAAU,CAACA,MAAyB,gBAAAC,EAACS,GAAA,EAAU,GAAGV,GAAO;AAAA,EACzD,eAAe,CAACA,MAA8B,gBAAAC,EAACU,GAAA,EAAe,GAAGX,GAAO;AAAA,EACxE,UAAU,CAACA,MAAyB,gBAAAC,EAACW,GAAA,EAAU,GAAGZ,GAAO;AAAA,EACzD,YAAY,CAACA,MAA2B,gBAAAC,EAACY,GAAA,EAAY,GAAGb,GAAO;AAAA,EAC/D,aAAa,CAACA,MAA4B,gBAAAC,EAACa,GAAA,EAAa,GAAGd,GAAO;AAAA,EAClE,eAAe,CAACA,MAA8B,gBAAAC,EAACc,GAAA,EAAe,GAAGf,GAAO;AAAA,EACxE,aAAa,CAACA,MAA4B,gBAAAC,EAACe,GAAA,EAAa,GAAGhB,GAAO;AAAA,EAClE,OAAO,CAACA,MAAsB,gBAAAC,EAACgB,GAAA,EAAO,GAAGjB,GAAO;AAAA,EAChD,YAAY,CAACA,MAA2B,gBAAAC,EAACiB,GAAA,EAAY,GAAGlB,GAAO;AAAA,EAC/D,QAAQ,CAACA,MAAuB,gBAAAC,EAACkB,GAAA,EAAQ,GAAGnB,GAAO;AAAA,EACnD,QAAQ,CAACA,MAAuB,gBAAAC,EAACmB,GAAA,EAAQ,GAAGpB,GAAO;AAAA,EACnD,MAAM,CAACA,MAAqB,gBAAAC,EAACoB,GAAA,EAAM,GAAGrB,GAAO;AAAA,EAC7C,MAAM,CAACA,MAAqB,gBAAAC,EAACqB,GAAA,EAAM,GAAGtB,GAAO;AAAA,EAC7C,OAAO,CAACA,MAAsB,gBAAAC,EAACsB,GAAA,EAAO,GAAGvB,GAAO;AAAA,EAChD,SAAS,CAACA,MAAwB,gBAAAC,EAACuB,GAAA,EAAS,GAAGxB,GAAO;AAAA,EACtD,MAAM,CAACA,MAAqB,gBAAAC,EAACwB,GAAA,EAAM,GAAGzB,GAAO;AAAA,EAC7C,iBAAiB,CAACA,MAAgC,gBAAAC,EAACyB,GAAA,EAAiB,GAAG1B,GAAO;AAAA,EAC9E,aAAa,CAACA,MAA4B,gBAAAC,EAAC0B,GAAA,EAAa,GAAG3B,GAAO;AAAA,EAClE,aAAa,CAACA,MAA4B,gBAAAC,EAAC2B,GAAA,EAAa,GAAG5B,GAAO;AAAA,EAClE,MAAM,CAACA,MAAqB,gBAAAC,EAAC4B,GAAA,EAAM,GAAG7B,GAAO;AAAA,EAC7C,QAAQ,CAACA,MAAuB,gBAAAC,EAAC6B,GAAA,EAAQ,GAAG9B,GAAO;AAAA,EACnD,OAAO,CAACA,MAAsB,gBAAAC,EAAC8B,GAAA,EAAO,GAAG/B,GAAO;AAAA,EAChD,gBAAgB,CAACA,MAA+B,gBAAAC,EAAC+B,GAAA,EAAgB,GAAGhC,GAAO;AAAA,EAC3E,iBAAiB,CAACA,MAAgC,gBAAAC,EAACgC,GAAA,EAAiB,GAAGjC,GAAO;AAAA,EAC9E,WAAW,CAACA,MAA0B,gBAAAC,EAACiC,GAAA,EAAW,GAAGlC,EAAA,CAAO;AAC9D;"}
|
|
@@ -30,3 +30,4 @@ export type { DescriptionListProps } from '../../components/Common/UI/Descriptio
|
|
|
30
30
|
export type { TextAreaProps } from '../../components/Common/UI/TextArea/TextAreaTypes';
|
|
31
31
|
export type { TabsProps } from '../../components/Common/UI/Tabs/TabsTypes';
|
|
32
32
|
export type { LoadingSpinnerProps } from '../../components/Common/UI/LoadingSpinner/LoadingSpinnerTypes';
|
|
33
|
+
export type { FileInputProps } from '../../components/Common/UI/FileInput/FileInputTypes';
|
|
@@ -15,6 +15,7 @@ import { TextProps } from '../../components/Common/UI/Text/TextTypes';
|
|
|
15
15
|
import { TextInputProps } from '../../components/Common/UI/TextInput/TextInputTypes';
|
|
16
16
|
import { DialogProps } from '../../components/Common/UI/Dialog/DialogTypes';
|
|
17
17
|
import { LoadingSpinnerProps } from '../../components/Common/UI/LoadingSpinner/LoadingSpinnerTypes';
|
|
18
|
+
import { FileInputProps } from '../../components/Common/UI/FileInput/FileInputTypes';
|
|
18
19
|
export declare const componentCreators: {
|
|
19
20
|
readonly Alert: (customComponent: (props: AlertProps) => React.ReactElement | null) => {
|
|
20
21
|
(props: AlertProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
|
|
@@ -80,6 +81,10 @@ export declare const componentCreators: {
|
|
|
80
81
|
(props: LoadingSpinnerProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
|
|
81
82
|
displayName: string;
|
|
82
83
|
};
|
|
84
|
+
readonly FileInput: (customComponent: (props: FileInputProps) => React.ReactElement | null) => {
|
|
85
|
+
(props: FileInputProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
|
|
86
|
+
displayName: string;
|
|
87
|
+
};
|
|
83
88
|
};
|
|
84
89
|
/**
|
|
85
90
|
* Creates components with automatic default prop handling.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defaultComponents as
|
|
1
|
+
import { defaultComponents as m } from "./adapters/defaultComponentAdapter.js";
|
|
2
2
|
import { applyMissingDefaults as f } from "../../helpers/applyMissingDefaults.js";
|
|
3
3
|
import { AlertDefaults as s } from "../../components/Common/UI/Alert/AlertTypes.js";
|
|
4
4
|
import { BadgeDefaults as l } from "../../components/Common/UI/Badge/BadgeTypes.js";
|
|
@@ -10,11 +10,12 @@ import { MenuDefaults as B } from "../../components/Common/UI/Menu/MenuTypes.js"
|
|
|
10
10
|
import { RadioDefaults as C } from "../../components/Common/UI/Radio/RadioTypes.js";
|
|
11
11
|
import { RadioGroupDefaults as b } from "../../components/Common/UI/RadioGroup/RadioGroupTypes.js";
|
|
12
12
|
import { SwitchDefaults as g } from "../../components/Common/UI/Switch/SwitchTypes.js";
|
|
13
|
-
import { TableDefaults as
|
|
14
|
-
import { TextDefaults as
|
|
15
|
-
import { TextInputDefaults as
|
|
16
|
-
import { DialogDefaults as
|
|
13
|
+
import { TableDefaults as I } from "../../components/Common/UI/Table/TableTypes.js";
|
|
14
|
+
import { TextDefaults as T } from "../../components/Common/UI/Text/TextTypes.js";
|
|
15
|
+
import { TextInputDefaults as k } from "../../components/Common/UI/TextInput/TextInputTypes.js";
|
|
16
|
+
import { DialogDefaults as G } from "../../components/Common/UI/Dialog/DialogTypes.js";
|
|
17
17
|
import { LoadingSpinnerDefaults as R } from "../../components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js";
|
|
18
|
+
import { FileInputDefaults as S } from "../../components/Common/UI/FileInput/FileInputTypes.js";
|
|
18
19
|
function o(a, t) {
|
|
19
20
|
return (e) => {
|
|
20
21
|
const r = (n) => {
|
|
@@ -36,22 +37,23 @@ const i = {
|
|
|
36
37
|
Radio: o(C, "Radio"),
|
|
37
38
|
RadioGroup: o(b, "RadioGroup"),
|
|
38
39
|
Switch: o(g, "Switch"),
|
|
39
|
-
Table: o(
|
|
40
|
-
Text: o(
|
|
41
|
-
TextInput: o(
|
|
42
|
-
Dialog: o(
|
|
40
|
+
Table: o(I, "Table"),
|
|
41
|
+
Text: o(T, "Text"),
|
|
42
|
+
TextInput: o(k, "TextInput"),
|
|
43
|
+
Dialog: o(G, "Dialog"),
|
|
43
44
|
LoadingSpinner: o(
|
|
44
45
|
R,
|
|
45
46
|
"LoadingSpinner"
|
|
46
|
-
)
|
|
47
|
+
),
|
|
48
|
+
FileInput: o(S, "FileInput")
|
|
47
49
|
};
|
|
48
|
-
function
|
|
49
|
-
const t = { ...
|
|
50
|
+
function P(a = {}) {
|
|
51
|
+
const t = { ...m };
|
|
50
52
|
for (const [e, r] of Object.entries(a)) {
|
|
51
53
|
const n = e;
|
|
52
54
|
if (e in i) {
|
|
53
|
-
const
|
|
54
|
-
t[n] =
|
|
55
|
+
const u = i[e];
|
|
56
|
+
t[n] = u(r);
|
|
55
57
|
} else
|
|
56
58
|
t[n] = r;
|
|
57
59
|
}
|
|
@@ -59,6 +61,6 @@ function H(a = {}) {
|
|
|
59
61
|
}
|
|
60
62
|
export {
|
|
61
63
|
i as componentCreators,
|
|
62
|
-
|
|
64
|
+
P as createComponents
|
|
63
65
|
};
|
|
64
66
|
//# sourceMappingURL=createComponentsWithDefaults.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createComponentsWithDefaults.js","sources":["../../../src/contexts/ComponentAdapter/createComponentsWithDefaults.ts"],"sourcesContent":["import type React from 'react'\nimport type { ComponentsContextType } from './useComponentContext'\nimport { defaultComponents } from './adapters/defaultComponentAdapter'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\n// Import prop types and their defaults\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { AlertDefaults } from '@/components/Common/UI/Alert/AlertTypes'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport { BadgeDefaults } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { BannerProps } from '@/components/Common/UI/Banner/BannerTypes'\nimport { BannerDefaults } from '@/components/Common/UI/Banner/BannerTypes'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { ButtonDefaults, ButtonIconDefaults } from '@/components/Common/UI/Button/ButtonTypes'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { CheckboxDefaults } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroupDefaults } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { MenuDefaults } from '@/components/Common/UI/Menu/MenuTypes'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { RadioDefaults } from '@/components/Common/UI/Radio/RadioTypes'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroupDefaults } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { SwitchDefaults } from '@/components/Common/UI/Switch/SwitchTypes'\nimport type { TableProps } from '@/components/Common/UI/Table/TableTypes'\nimport { TableDefaults } from '@/components/Common/UI/Table/TableTypes'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { TextDefaults } from '@/components/Common/UI/Text/TextTypes'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInputDefaults } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport type { DialogProps } from '@/components/Common/UI/Dialog/DialogTypes'\nimport { DialogDefaults } from '@/components/Common/UI/Dialog/DialogTypes'\nimport type { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport { LoadingSpinnerDefaults } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\n\nfunction composeWithDefaults<TProps>(defaults: Partial<TProps>, componentName: string) {\n return (customComponent: (props: TProps) => React.ReactElement | null) => {\n const wrappedComponent = (props: TProps) => {\n const propsWithDefaults = applyMissingDefaults(props, defaults)\n return customComponent(propsWithDefaults)\n }\n wrappedComponent.displayName = `withAutoDefault(${componentName})`\n return wrappedComponent\n }\n}\n\n// Component creators with defaults\nexport const componentCreators = {\n Alert: composeWithDefaults<AlertProps>(AlertDefaults, 'Alert'),\n Badge: composeWithDefaults<BadgeProps>(BadgeDefaults, 'Badge'),\n Banner: composeWithDefaults<BannerProps>(BannerDefaults, 'Banner'),\n Button: composeWithDefaults<ButtonProps>(ButtonDefaults, 'Button'),\n ButtonIcon: composeWithDefaults<ButtonIconProps>(ButtonIconDefaults, 'ButtonIcon'),\n Checkbox: composeWithDefaults<CheckboxProps>(CheckboxDefaults, 'Checkbox'),\n CheckboxGroup: composeWithDefaults<CheckboxGroupProps>(CheckboxGroupDefaults, 'CheckboxGroup'),\n Menu: composeWithDefaults<MenuProps>(MenuDefaults, 'Menu'),\n Radio: composeWithDefaults<RadioProps>(RadioDefaults, 'Radio'),\n RadioGroup: composeWithDefaults<RadioGroupProps>(RadioGroupDefaults, 'RadioGroup'),\n Switch: composeWithDefaults<SwitchProps>(SwitchDefaults, 'Switch'),\n Table: composeWithDefaults<TableProps>(TableDefaults, 'Table'),\n Text: composeWithDefaults<TextProps>(TextDefaults, 'Text'),\n TextInput: composeWithDefaults<TextInputProps>(TextInputDefaults, 'TextInput'),\n Dialog: composeWithDefaults<DialogProps>(DialogDefaults, 'Dialog'),\n LoadingSpinner: composeWithDefaults<LoadingSpinnerProps>(\n LoadingSpinnerDefaults,\n 'LoadingSpinner',\n ),\n} as const\n\n/**\n * Creates components with automatic default prop handling.\n * Supports both partial (GustoProvider) and full (GustoProviderCustomUIAdapter) component sets.\n */\nexport function createComponents(\n providedComponents: Partial<ComponentsContextType> = {},\n): ComponentsContextType {\n const components = { ...defaultComponents }\n\n for (const [componentName, providedComponent] of Object.entries(providedComponents)) {\n const typedComponentName = componentName as keyof ComponentsContextType\n\n if (componentName in componentCreators) {\n const creatorKey = componentName as keyof typeof componentCreators\n const creator = componentCreators[creatorKey]\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n components[typedComponentName] = creator(providedComponent as any) as any\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n components[typedComponentName] = providedComponent as any\n }\n }\n\n return components\n}\n"],"names":["composeWithDefaults","defaults","componentName","customComponent","wrappedComponent","props","propsWithDefaults","applyMissingDefaults","componentCreators","AlertDefaults","BadgeDefaults","BannerDefaults","ButtonDefaults","ButtonIconDefaults","CheckboxDefaults","CheckboxGroupDefaults","MenuDefaults","RadioDefaults","RadioGroupDefaults","SwitchDefaults","TableDefaults","TextDefaults","TextInputDefaults","DialogDefaults","LoadingSpinnerDefaults","createComponents","providedComponents","components","defaultComponents","providedComponent","typedComponentName","creator"],"mappings":"
|
|
1
|
+
{"version":3,"file":"createComponentsWithDefaults.js","sources":["../../../src/contexts/ComponentAdapter/createComponentsWithDefaults.ts"],"sourcesContent":["import type React from 'react'\nimport type { ComponentsContextType } from './useComponentContext'\nimport { defaultComponents } from './adapters/defaultComponentAdapter'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\n// Import prop types and their defaults\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport { AlertDefaults } from '@/components/Common/UI/Alert/AlertTypes'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport { BadgeDefaults } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { BannerProps } from '@/components/Common/UI/Banner/BannerTypes'\nimport { BannerDefaults } from '@/components/Common/UI/Banner/BannerTypes'\nimport type { ButtonProps, ButtonIconProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport { ButtonDefaults, ButtonIconDefaults } from '@/components/Common/UI/Button/ButtonTypes'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport { CheckboxDefaults } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport { CheckboxGroupDefaults } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport { MenuDefaults } from '@/components/Common/UI/Menu/MenuTypes'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport { RadioDefaults } from '@/components/Common/UI/Radio/RadioTypes'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { RadioGroupDefaults } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport { SwitchDefaults } from '@/components/Common/UI/Switch/SwitchTypes'\nimport type { TableProps } from '@/components/Common/UI/Table/TableTypes'\nimport { TableDefaults } from '@/components/Common/UI/Table/TableTypes'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport { TextDefaults } from '@/components/Common/UI/Text/TextTypes'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport { TextInputDefaults } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport type { DialogProps } from '@/components/Common/UI/Dialog/DialogTypes'\nimport { DialogDefaults } from '@/components/Common/UI/Dialog/DialogTypes'\nimport type { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport { LoadingSpinnerDefaults } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport type { FileInputProps } from '@/components/Common/UI/FileInput/FileInputTypes'\nimport { FileInputDefaults } from '@/components/Common/UI/FileInput/FileInputTypes'\n\nfunction composeWithDefaults<TProps>(defaults: Partial<TProps>, componentName: string) {\n return (customComponent: (props: TProps) => React.ReactElement | null) => {\n const wrappedComponent = (props: TProps) => {\n const propsWithDefaults = applyMissingDefaults(props, defaults)\n return customComponent(propsWithDefaults)\n }\n wrappedComponent.displayName = `withAutoDefault(${componentName})`\n return wrappedComponent\n }\n}\n\n// Component creators with defaults\nexport const componentCreators = {\n Alert: composeWithDefaults<AlertProps>(AlertDefaults, 'Alert'),\n Badge: composeWithDefaults<BadgeProps>(BadgeDefaults, 'Badge'),\n Banner: composeWithDefaults<BannerProps>(BannerDefaults, 'Banner'),\n Button: composeWithDefaults<ButtonProps>(ButtonDefaults, 'Button'),\n ButtonIcon: composeWithDefaults<ButtonIconProps>(ButtonIconDefaults, 'ButtonIcon'),\n Checkbox: composeWithDefaults<CheckboxProps>(CheckboxDefaults, 'Checkbox'),\n CheckboxGroup: composeWithDefaults<CheckboxGroupProps>(CheckboxGroupDefaults, 'CheckboxGroup'),\n Menu: composeWithDefaults<MenuProps>(MenuDefaults, 'Menu'),\n Radio: composeWithDefaults<RadioProps>(RadioDefaults, 'Radio'),\n RadioGroup: composeWithDefaults<RadioGroupProps>(RadioGroupDefaults, 'RadioGroup'),\n Switch: composeWithDefaults<SwitchProps>(SwitchDefaults, 'Switch'),\n Table: composeWithDefaults<TableProps>(TableDefaults, 'Table'),\n Text: composeWithDefaults<TextProps>(TextDefaults, 'Text'),\n TextInput: composeWithDefaults<TextInputProps>(TextInputDefaults, 'TextInput'),\n Dialog: composeWithDefaults<DialogProps>(DialogDefaults, 'Dialog'),\n LoadingSpinner: composeWithDefaults<LoadingSpinnerProps>(\n LoadingSpinnerDefaults,\n 'LoadingSpinner',\n ),\n FileInput: composeWithDefaults<FileInputProps>(FileInputDefaults, 'FileInput'),\n} as const\n\n/**\n * Creates components with automatic default prop handling.\n * Supports both partial (GustoProvider) and full (GustoProviderCustomUIAdapter) component sets.\n */\nexport function createComponents(\n providedComponents: Partial<ComponentsContextType> = {},\n): ComponentsContextType {\n const components = { ...defaultComponents }\n\n for (const [componentName, providedComponent] of Object.entries(providedComponents)) {\n const typedComponentName = componentName as keyof ComponentsContextType\n\n if (componentName in componentCreators) {\n const creatorKey = componentName as keyof typeof componentCreators\n const creator = componentCreators[creatorKey]\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n components[typedComponentName] = creator(providedComponent as any) as any\n } else {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n components[typedComponentName] = providedComponent as any\n }\n }\n\n return components\n}\n"],"names":["composeWithDefaults","defaults","componentName","customComponent","wrappedComponent","props","propsWithDefaults","applyMissingDefaults","componentCreators","AlertDefaults","BadgeDefaults","BannerDefaults","ButtonDefaults","ButtonIconDefaults","CheckboxDefaults","CheckboxGroupDefaults","MenuDefaults","RadioDefaults","RadioGroupDefaults","SwitchDefaults","TableDefaults","TextDefaults","TextInputDefaults","DialogDefaults","LoadingSpinnerDefaults","FileInputDefaults","createComponents","providedComponents","components","defaultComponents","providedComponent","typedComponentName","creator"],"mappings":";;;;;;;;;;;;;;;;;;AAsCA,SAASA,EAA4BC,GAA2BC,GAAuB;AACrF,SAAO,CAACC,MAAkE;AACxE,UAAMC,IAAmB,CAACC,MAAkB;AAC1C,YAAMC,IAAoBC,EAAqBF,GAAOJ,CAAQ;AAC9D,aAAOE,EAAgBG,CAAiB;AAAA,IAC1C;AACA,WAAAF,EAAiB,cAAc,mBAAmBF,CAAa,KACxDE;AAAA,EACT;AACF;AAGO,MAAMI,IAAoB;AAAA,EAC/B,OAAOR,EAAgCS,GAAe,OAAO;AAAA,EAC7D,OAAOT,EAAgCU,GAAe,OAAO;AAAA,EAC7D,QAAQV,EAAiCW,GAAgB,QAAQ;AAAA,EACjE,QAAQX,EAAiCY,GAAgB,QAAQ;AAAA,EACjE,YAAYZ,EAAqCa,GAAoB,YAAY;AAAA,EACjF,UAAUb,EAAmCc,GAAkB,UAAU;AAAA,EACzE,eAAed,EAAwCe,GAAuB,eAAe;AAAA,EAC7F,MAAMf,EAA+BgB,GAAc,MAAM;AAAA,EACzD,OAAOhB,EAAgCiB,GAAe,OAAO;AAAA,EAC7D,YAAYjB,EAAqCkB,GAAoB,YAAY;AAAA,EACjF,QAAQlB,EAAiCmB,GAAgB,QAAQ;AAAA,EACjE,OAAOnB,EAAgCoB,GAAe,OAAO;AAAA,EAC7D,MAAMpB,EAA+BqB,GAAc,MAAM;AAAA,EACzD,WAAWrB,EAAoCsB,GAAmB,WAAW;AAAA,EAC7E,QAAQtB,EAAiCuB,GAAgB,QAAQ;AAAA,EACjE,gBAAgBvB;AAAA,IACdwB;AAAA,IACA;AAAA,EAAA;AAAA,EAEF,WAAWxB,EAAoCyB,GAAmB,WAAW;AAC/E;AAMO,SAASC,EACdC,IAAqD,IAC9B;AACvB,QAAMC,IAAa,EAAE,GAAGC,EAAA;AAExB,aAAW,CAAC3B,GAAe4B,CAAiB,KAAK,OAAO,QAAQH,CAAkB,GAAG;AACnF,UAAMI,IAAqB7B;AAE3B,QAAIA,KAAiBM,GAAmB;AAEtC,YAAMwB,IAAUxB,EADGN,CACyB;AAE5C,MAAA0B,EAAWG,CAAkB,IAAIC,EAAQF,CAAwB;AAAA,IACnE;AAEE,MAAAF,EAAWG,CAAkB,IAAID;AAAA,EAErC;AAEA,SAAOF;AACT;"}
|
|
@@ -30,6 +30,7 @@ import { DialogProps } from '../../components/Common/UI/Dialog/DialogTypes';
|
|
|
30
30
|
import { ModalProps } from '../../components/Common/UI/Modal/ModalTypes';
|
|
31
31
|
import { LoadingSpinnerProps } from '../../components/Common/UI/LoadingSpinner/LoadingSpinnerTypes';
|
|
32
32
|
import { DescriptionListProps } from '../../components/Common/UI/DescriptionList/DescriptionListTypes';
|
|
33
|
+
import { FileInputProps } from '../../components/Common/UI/FileInput/FileInputTypes';
|
|
33
34
|
import { PayrollLoadingProps } from '../../components/Common/PayrollLoading/PayrollLoadingTypes';
|
|
34
35
|
export interface ComponentsContextType {
|
|
35
36
|
Alert: (props: AlertProps) => JSX.Element | null;
|
|
@@ -66,6 +67,7 @@ export interface ComponentsContextType {
|
|
|
66
67
|
Modal: (props: ModalProps) => JSX.Element | null;
|
|
67
68
|
LoadingSpinner: (props: LoadingSpinnerProps) => JSX.Element | null;
|
|
68
69
|
DescriptionList: (props: DescriptionListProps) => JSX.Element | null;
|
|
70
|
+
FileInput: (props: FileInputProps) => JSX.Element | null;
|
|
69
71
|
}
|
|
70
72
|
export declare const ComponentsContext: import('react').Context<ComponentsContextType | null>;
|
|
71
73
|
export declare const useComponentContext: () => ComponentsContextType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const n =
|
|
3
|
-
const t =
|
|
1
|
+
import { useContext as o, createContext as e } from "react";
|
|
2
|
+
const n = e(null), s = () => {
|
|
3
|
+
const t = o(n);
|
|
4
4
|
if (!t)
|
|
5
5
|
throw new Error("useComponentContext must be used within a ComponentsProvider");
|
|
6
6
|
return t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useComponentContext.js","sources":["../../../src/contexts/ComponentAdapter/useComponentContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { JSX } from 'react'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport type { TextAreaProps } from '@/components/Common/UI/TextArea/TextAreaTypes'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport type { ButtonIconProps, ButtonProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { BannerProps } from '@/components/Common/UI/Banner/BannerTypes'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport type { TableProps } from '@/components/Common/UI/Table/TableTypes'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List/ListTypes'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar/ProgressBarTypes'\nimport type { BreadcrumbsProps } from '@/components/Common/UI/Breadcrumbs/BreadcrumbsTypes'\nimport type { TabsProps } from '@/components/Common/UI/Tabs/TabsTypes'\nimport type { DialogProps } from '@/components/Common/UI/Dialog/DialogTypes'\nimport type { ModalProps } from '@/components/Common/UI/Modal/ModalTypes'\nimport type { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport type { DescriptionListProps } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\nimport type { PayrollLoadingProps } from '@/components/Common/PayrollLoading/PayrollLoadingTypes'\n\nexport interface ComponentsContextType {\n Alert: (props: AlertProps) => JSX.Element | null\n Badge: (props: BadgeProps) => JSX.Element | null\n Banner: (props: BannerProps) => JSX.Element | null\n Button: (props: ButtonProps) => JSX.Element | null\n ButtonIcon: (props: ButtonIconProps) => JSX.Element | null\n Card: (props: CardProps) => JSX.Element | null\n Checkbox: (props: CheckboxProps) => JSX.Element | null\n CheckboxGroup: (props: CheckboxGroupProps) => JSX.Element | null\n ComboBox: (props: ComboBoxProps) => JSX.Element | null\n DatePicker: (props: DatePickerProps) => JSX.Element | null\n OrderedList: (props: OrderedListProps) => JSX.Element | null\n UnorderedList: (props: UnorderedListProps) => JSX.Element | null\n NumberInput: (props: NumberInputProps) => JSX.Element | null\n Radio: (props: RadioProps) => JSX.Element | null\n RadioGroup: (props: RadioGroupProps) => JSX.Element | null\n Select: (props: SelectProps) => JSX.Element | null\n Switch: (props: SwitchProps) => JSX.Element | null\n TextInput: (props: TextInputProps) => JSX.Element | null\n TextArea: (props: TextAreaProps) => JSX.Element | null\n Link: (props: LinkProps) => JSX.Element | null\n Menu: (props: MenuProps) => JSX.Element | null\n Table: (props: TableProps) => JSX.Element | null\n Heading: (props: HeadingProps) => JSX.Element | null\n PaginationControl?: (props: PaginationControlProps) => JSX.Element | null\n PayrollLoading?: (props: PayrollLoadingProps) => JSX.Element | null\n Text: (props: TextProps) => JSX.Element | null\n CalendarPreview: (props: CalendarPreviewProps) => JSX.Element | null\n ProgressBar: (props: ProgressBarProps) => JSX.Element | null\n Breadcrumbs: (props: BreadcrumbsProps) => JSX.Element | null\n Tabs: (props: TabsProps) => JSX.Element | null\n Dialog: (props: DialogProps) => JSX.Element | null\n Modal: (props: ModalProps) => JSX.Element | null\n LoadingSpinner: (props: LoadingSpinnerProps) => JSX.Element | null\n DescriptionList: (props: DescriptionListProps) => JSX.Element | null\n}\n\nexport const ComponentsContext = createContext<ComponentsContextType | null>(null)\n\nexport const useComponentContext = () => {\n const context = useContext(ComponentsContext)\n if (!context) {\n throw new Error('useComponentContext must be used within a ComponentsProvider')\n }\n return context\n}\n"],"names":["ComponentsContext","createContext","useComponentContext","context","useContext"],"mappings":";
|
|
1
|
+
{"version":3,"file":"useComponentContext.js","sources":["../../../src/contexts/ComponentAdapter/useComponentContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { JSX } from 'react'\nimport type { TextInputProps } from '@/components/Common/UI/TextInput/TextInputTypes'\nimport type { TextAreaProps } from '@/components/Common/UI/TextArea/TextAreaTypes'\nimport type { NumberInputProps } from '@/components/Common/UI/NumberInput/NumberInputTypes'\nimport type { CheckboxGroupProps } from '@/components/Common/UI/CheckboxGroup/CheckboxGroupTypes'\nimport type { ComboBoxProps } from '@/components/Common/UI/ComboBox/ComboBoxTypes'\nimport type { CheckboxProps } from '@/components/Common/UI/Checkbox/CheckboxTypes'\nimport type { DatePickerProps } from '@/components/Common/UI/DatePicker/DatePickerTypes'\nimport type { RadioProps } from '@/components/Common/UI/Radio/RadioTypes'\nimport type { RadioGroupProps } from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport type { SelectProps } from '@/components/Common/UI/Select/SelectTypes'\nimport type { SwitchProps } from '@/components/Common/UI/Switch/SwitchTypes'\nimport type { ButtonIconProps, ButtonProps } from '@/components/Common/UI/Button/ButtonTypes'\nimport type { AlertProps } from '@/components/Common/UI/Alert/AlertTypes'\nimport type { CardProps } from '@/components/Common/UI/Card/CardTypes'\nimport type { LinkProps } from '@/components/Common/UI/Link/LinkTypes'\nimport type { BadgeProps } from '@/components/Common/UI/Badge/BadgeTypes'\nimport type { BannerProps } from '@/components/Common/UI/Banner/BannerTypes'\nimport type { MenuProps } from '@/components/Common/UI/Menu/MenuTypes'\nimport type { TableProps } from '@/components/Common/UI/Table/TableTypes'\nimport type { OrderedListProps, UnorderedListProps } from '@/components/Common/UI/List/ListTypes'\nimport type { HeadingProps } from '@/components/Common/UI/Heading/HeadingTypes'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\nimport type { TextProps } from '@/components/Common/UI/Text/TextTypes'\nimport type { CalendarPreviewProps } from '@/components/Common/UI/CalendarPreview/CalendarPreviewTypes'\nimport type { ProgressBarProps } from '@/components/Common/UI/ProgressBar/ProgressBarTypes'\nimport type { BreadcrumbsProps } from '@/components/Common/UI/Breadcrumbs/BreadcrumbsTypes'\nimport type { TabsProps } from '@/components/Common/UI/Tabs/TabsTypes'\nimport type { DialogProps } from '@/components/Common/UI/Dialog/DialogTypes'\nimport type { ModalProps } from '@/components/Common/UI/Modal/ModalTypes'\nimport type { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport type { DescriptionListProps } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\nimport type { FileInputProps } from '@/components/Common/UI/FileInput/FileInputTypes'\nimport type { PayrollLoadingProps } from '@/components/Common/PayrollLoading/PayrollLoadingTypes'\n\nexport interface ComponentsContextType {\n Alert: (props: AlertProps) => JSX.Element | null\n Badge: (props: BadgeProps) => JSX.Element | null\n Banner: (props: BannerProps) => JSX.Element | null\n Button: (props: ButtonProps) => JSX.Element | null\n ButtonIcon: (props: ButtonIconProps) => JSX.Element | null\n Card: (props: CardProps) => JSX.Element | null\n Checkbox: (props: CheckboxProps) => JSX.Element | null\n CheckboxGroup: (props: CheckboxGroupProps) => JSX.Element | null\n ComboBox: (props: ComboBoxProps) => JSX.Element | null\n DatePicker: (props: DatePickerProps) => JSX.Element | null\n OrderedList: (props: OrderedListProps) => JSX.Element | null\n UnorderedList: (props: UnorderedListProps) => JSX.Element | null\n NumberInput: (props: NumberInputProps) => JSX.Element | null\n Radio: (props: RadioProps) => JSX.Element | null\n RadioGroup: (props: RadioGroupProps) => JSX.Element | null\n Select: (props: SelectProps) => JSX.Element | null\n Switch: (props: SwitchProps) => JSX.Element | null\n TextInput: (props: TextInputProps) => JSX.Element | null\n TextArea: (props: TextAreaProps) => JSX.Element | null\n Link: (props: LinkProps) => JSX.Element | null\n Menu: (props: MenuProps) => JSX.Element | null\n Table: (props: TableProps) => JSX.Element | null\n Heading: (props: HeadingProps) => JSX.Element | null\n PaginationControl?: (props: PaginationControlProps) => JSX.Element | null\n PayrollLoading?: (props: PayrollLoadingProps) => JSX.Element | null\n Text: (props: TextProps) => JSX.Element | null\n CalendarPreview: (props: CalendarPreviewProps) => JSX.Element | null\n ProgressBar: (props: ProgressBarProps) => JSX.Element | null\n Breadcrumbs: (props: BreadcrumbsProps) => JSX.Element | null\n Tabs: (props: TabsProps) => JSX.Element | null\n Dialog: (props: DialogProps) => JSX.Element | null\n Modal: (props: ModalProps) => JSX.Element | null\n LoadingSpinner: (props: LoadingSpinnerProps) => JSX.Element | null\n DescriptionList: (props: DescriptionListProps) => JSX.Element | null\n FileInput: (props: FileInputProps) => JSX.Element | null\n}\n\nexport const ComponentsContext = createContext<ComponentsContextType | null>(null)\n\nexport const useComponentContext = () => {\n const context = useContext(ComponentsContext)\n if (!context) {\n throw new Error('useComponentContext must be used within a ComponentsProvider')\n }\n return context\n}\n"],"names":["ComponentsContext","createContext","useComponentContext","context","useContext"],"mappings":";AA0EO,MAAMA,IAAoBC,EAA4C,IAAI,GAEpEC,IAAsB,MAAM;AACvC,QAAMC,IAAUC,EAAWJ,CAAiB;AAC5C,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,8DAA8D;AAEhF,SAAOA;AACT;"}
|
|
@@ -27,5 +27,6 @@ export declare const formatDateToStringDate: (date: Date) => string | null;
|
|
|
27
27
|
* Normalizes Date to local midnight, handling timezone issues from any adapter.
|
|
28
28
|
*/
|
|
29
29
|
export declare const normalizeDateToLocal: (date: Date | null) => Date | null;
|
|
30
|
+
export declare const MS_PER_HOUR: number;
|
|
30
31
|
export declare const getHoursUntil: (deadline?: Date | string | null) => number | null;
|
|
31
32
|
export declare const getDaysUntil: (deadline?: Date | string | null) => number | null;
|