@gusto/embedded-react-sdk 0.15.0 → 0.17.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 +42 -0
- package/dist/components/Base/Base.js +4 -4
- package/dist/components/Common/EmptyData/EmptyData.js +10 -10
- package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js +5 -3
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
- package/dist/components/Common/FieldDescription/FieldDescription.module.scss.js +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.d.ts +2 -0
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +54 -0
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -0
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +44 -0
- package/dist/components/Common/FlowBreadcrumbs/index.d.ts +3 -0
- package/dist/components/Common/SignatureForm/SignatureForm.js +10 -12
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +2 -3
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -8
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.d.ts +2 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +52 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js.map +1 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.module.scss.js +16 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.module.scss.js.map +1 -0
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +41 -0
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js +8 -0
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js.map +1 -0
- package/dist/components/Common/UI/Breadcrumbs/index.d.ts +3 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.d.ts +2 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js +16 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js.map +1 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +10 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js.map +1 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.d.ts +10 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js +5 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js.map +1 -0
- package/dist/components/Common/UI/DescriptionList/index.d.ts +3 -0
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +5 -7
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +2 -4
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +6 -8
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +15 -16
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -5
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +2 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +9 -11
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +9 -10
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +3 -5
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -7
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +4 -6
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -5
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/AccountView.js +22 -17
- package/dist/components/Company/BankAccount/BankAccountList/AccountView.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +2 -3
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +6 -7
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -3
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +8 -10
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -5
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +7 -9
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -5
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +6 -7
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +2 -4
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +4 -4
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -10
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +7 -8
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +7 -8
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +2 -4
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +5 -7
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +8 -10
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -5
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +9 -9
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +2 -3
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -5
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js +10 -10
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js +16 -10
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +2 -3
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -7
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +6 -8
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +4 -5
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +2 -3
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +2 -3
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +17 -17
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +7 -8
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +8 -8
- package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -7
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +3 -5
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +7 -9
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +6 -7
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +4 -4
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +37 -37
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +10 -12
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -4
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
- package/dist/components/Contractor/Profile/useContractorProfile.js +3 -4
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +19 -20
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +12 -13
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +14 -14
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +9 -10
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +31 -32
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +8 -8
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +10 -10
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +22 -23
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +2 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +2 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -5
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +2 -4
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -5
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +6 -7
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +2 -4
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +2 -3
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +10 -10
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -5
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +5 -6
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +10 -11
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -5
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +2 -3
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +3 -5
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +4 -4
- package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +79 -78
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +11 -13
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +7 -7
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -7
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +5 -6
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +6 -7
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +5 -6
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +23 -25
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +4 -5
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +5 -6
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -5
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +6 -7
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +10 -11
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +4 -5
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Flow/Flow.js +45 -24
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Flow/useFlow.d.ts +10 -1
- package/dist/components/Flow/useFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.d.ts +1 -1
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js +16 -16
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +20 -21
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +15 -16
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +97 -82
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +5 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +88 -84
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +39 -40
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +27 -27
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +6 -6
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +20 -19
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +5 -3
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +65 -45
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/index.d.ts +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +233 -96
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +10 -10
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +8 -9
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +12 -12
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +1 -2
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +41 -45
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +1 -2
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +93 -95
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.d.ts +1 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +12 -26
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +1 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +40 -44
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +3 -4
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +46 -42
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +4 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -3
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/helpers/breadcrumbHelpers.d.ts +33 -0
- package/dist/helpers/breadcrumbHelpers.js +46 -0
- package/dist/helpers/breadcrumbHelpers.js.map +1 -0
- package/dist/helpers/breadcrumbHelpers.test.d.ts +1 -0
- package/dist/helpers/dateFormatting.d.ts +4 -0
- package/dist/helpers/dateFormatting.js +30 -14
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/i18n/I18n.d.ts +1 -1
- package/dist/i18n/I18n.js +32 -23
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +2 -2
- package/dist/i18n/en/Employee.PaymentMethod.json.js +70 -66
- package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollBlocker.json.js +28 -0
- package/dist/i18n/en/Payroll.PayrollBlocker.json.js.map +1 -0
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +28 -24
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +28 -26
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollFlow.json.js +8 -0
- package/dist/i18n/en/Payroll.PayrollFlow.json.js.map +1 -0
- package/dist/i18n/en/Payroll.PayrollLanding.json.js +2 -2
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +60 -56
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollReceipts.json.js +16 -12
- package/dist/i18n/en/Payroll.PayrollReceipts.json.js.map +1 -1
- package/dist/shared/constants.d.ts +3 -0
- package/dist/shared/constants.js +11 -9
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +160 -149
- package/package.json +8 -8
- package/dist/i18n/en/Payroll.RunPayroll.json.js +0 -8
- package/dist/i18n/en/Payroll.RunPayroll.json.js.map +0 -1
- package/dist/i18n/en/PayrollBlocker.json.js +0 -24
- package/dist/i18n/en/PayrollBlocker.json.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { TextInput as m } from "../../../components/Common/UI/TextInput/TextInput.js";
|
|
3
3
|
import { NumberInput as t } from "../../../components/Common/UI/NumberInput/NumberInput.js";
|
|
4
4
|
import { CheckboxGroup as i } from "../../../components/Common/UI/CheckboxGroup/CheckboxGroup.js";
|
|
@@ -8,54 +8,58 @@ import { DatePicker as f } from "../../../components/Common/UI/DatePicker/DatePi
|
|
|
8
8
|
import { Radio as n } from "../../../components/Common/UI/Radio/Radio.js";
|
|
9
9
|
import { RadioGroup as a } from "../../../components/Common/UI/RadioGroup/RadioGroup.js";
|
|
10
10
|
import { Select as d } from "../../../components/Common/UI/Select/Select.js";
|
|
11
|
-
import { Switch as
|
|
12
|
-
import { Button as
|
|
13
|
-
import { ButtonIcon as
|
|
11
|
+
import { Switch as s } from "../../../components/Common/UI/Switch/Switch.js";
|
|
12
|
+
import { Button as u } from "../../../components/Common/UI/Button/Button.js";
|
|
13
|
+
import { ButtonIcon as c } from "../../../components/Common/UI/Button/ButtonIcon.js";
|
|
14
14
|
import { Alert as b } from "../../../components/Common/UI/Alert/Alert.js";
|
|
15
15
|
import { Card as x } from "../../../components/Common/UI/Card/Card.js";
|
|
16
|
-
import { Badge as
|
|
17
|
-
import { Link as
|
|
18
|
-
import { Menu as
|
|
19
|
-
import { Table as
|
|
20
|
-
import { OrderedList as
|
|
21
|
-
import { UnorderedList as
|
|
16
|
+
import { Badge as B } from "../../../components/Common/UI/Badge/Badge.js";
|
|
17
|
+
import { Link as l } from "../../../components/Common/UI/Link/Link.js";
|
|
18
|
+
import { Menu as C } from "../../../components/Common/UI/Menu/Menu.js";
|
|
19
|
+
import { Table as g } from "../../../components/Common/UI/Table/Table.js";
|
|
20
|
+
import { OrderedList as L } from "../../../components/Common/UI/List/OrderedList.js";
|
|
21
|
+
import { UnorderedList as k } from "../../../components/Common/UI/List/UnorderedList.js";
|
|
22
22
|
import { Heading as T } from "../../../components/Common/UI/Heading/Heading.js";
|
|
23
23
|
import { Text as h } from "../../../components/Common/UI/Text/Text.js";
|
|
24
|
-
import { CalendarPreview as
|
|
25
|
-
import { ProgressBar as
|
|
24
|
+
import { CalendarPreview as D } from "../../../components/Common/UI/CalendarPreview/CalendarPreview.js";
|
|
25
|
+
import { ProgressBar as I } from "../../../components/Common/UI/ProgressBar/ProgressBar.js";
|
|
26
|
+
import { Breadcrumbs as P } from "../../../components/Common/UI/Breadcrumbs/Breadcrumbs.js";
|
|
26
27
|
import { Tabs as S } from "../../../components/Common/UI/Tabs/Tabs.js";
|
|
27
28
|
import { Dialog as w } from "../../../components/Common/UI/Dialog/Dialog.js";
|
|
28
|
-
import { LoadingSpinner as
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
29
|
+
import { LoadingSpinner as G } from "../../../components/Common/UI/LoadingSpinner/LoadingSpinner.js";
|
|
30
|
+
import { DescriptionList as R } from "../../../components/Common/UI/DescriptionList/DescriptionList.js";
|
|
31
|
+
const fr = {
|
|
32
|
+
Alert: (r) => /* @__PURE__ */ o(b, { ...r }),
|
|
33
|
+
Badge: (r) => /* @__PURE__ */ o(B, { ...r }),
|
|
34
|
+
Button: (r) => /* @__PURE__ */ o(u, { ...r }),
|
|
35
|
+
ButtonIcon: (r) => /* @__PURE__ */ o(c, { ...r }),
|
|
36
|
+
Card: (r) => /* @__PURE__ */ o(x, { ...r }),
|
|
37
|
+
TextInput: (r) => /* @__PURE__ */ o(m, { ...r }),
|
|
38
|
+
Checkbox: (r) => /* @__PURE__ */ o(p, { ...r }),
|
|
39
|
+
CheckboxGroup: (r) => /* @__PURE__ */ o(i, { ...r }),
|
|
40
|
+
ComboBox: (r) => /* @__PURE__ */ o(e, { ...r }),
|
|
41
|
+
DatePicker: (r) => /* @__PURE__ */ o(f, { ...r }),
|
|
42
|
+
OrderedList: (r) => /* @__PURE__ */ o(L, { ...r }),
|
|
43
|
+
UnorderedList: (r) => /* @__PURE__ */ o(k, { ...r }),
|
|
44
|
+
NumberInput: (r) => /* @__PURE__ */ o(t, { ...r }),
|
|
45
|
+
Radio: (r) => /* @__PURE__ */ o(n, { ...r }),
|
|
46
|
+
RadioGroup: (r) => /* @__PURE__ */ o(a, { ...r }),
|
|
47
|
+
Select: (r) => /* @__PURE__ */ o(d, { ...r }),
|
|
48
|
+
Switch: (r) => /* @__PURE__ */ o(s, { ...r }),
|
|
49
|
+
Link: (r) => /* @__PURE__ */ o(l, { ...r }),
|
|
50
|
+
Menu: (r) => /* @__PURE__ */ o(C, { ...r }),
|
|
51
|
+
Table: (r) => /* @__PURE__ */ o(g, { ...r }),
|
|
52
|
+
Heading: (r) => /* @__PURE__ */ o(T, { ...r }),
|
|
53
|
+
Text: (r) => /* @__PURE__ */ o(h, { ...r }),
|
|
54
|
+
CalendarPreview: (r) => /* @__PURE__ */ o(D, { ...r }),
|
|
55
|
+
ProgressBar: (r) => /* @__PURE__ */ o(I, { ...r }),
|
|
56
|
+
Breadcrumbs: (r) => /* @__PURE__ */ o(P, { ...r }),
|
|
57
|
+
Tabs: (r) => /* @__PURE__ */ o(S, { ...r }),
|
|
58
|
+
Dialog: (r) => /* @__PURE__ */ o(w, { ...r }),
|
|
59
|
+
LoadingSpinner: (r) => /* @__PURE__ */ o(G, { ...r }),
|
|
60
|
+
DescriptionList: (r) => /* @__PURE__ */ o(R, { ...r })
|
|
57
61
|
};
|
|
58
62
|
export {
|
|
59
|
-
|
|
63
|
+
fr as defaultComponents
|
|
60
64
|
};
|
|
61
65
|
//# 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 { 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 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 { 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 { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport { LoadingSpinner } from '@/components/Common/UI/LoadingSpinner'\n\nexport const defaultComponents: ComponentsContextType = {\n Alert: (props: AlertProps) => <Alert {...props} />,\n Badge: (props: BadgeProps) => <Badge {...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 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 Tabs: (props: TabsProps) => <Tabs {...props} />,\n Dialog: (props: DialogProps) => <Dialog {...props} />,\n LoadingSpinner: (props: LoadingSpinnerProps) => <LoadingSpinner {...props} />,\n}\n"],"names":["defaultComponents","props","jsx","Alert","Badge","Button","ButtonIcon","Card","TextInput","Checkbox","CheckboxGroup","ComboBox","DatePicker","OrderedList","UnorderedList","NumberInput","Radio","RadioGroup","Select","Switch","Link","Menu","Table","Heading","Text","CalendarPreview","ProgressBar","Tabs","Dialog","LoadingSpinner"],"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 { 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 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 { 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 Button: (props: ButtonProps) => <Button {...props} />,\n ButtonIcon: (props: ButtonIconProps) => <ButtonIcon {...props} />,\n Card: (props: CardProps) => <Card {...props} />,\n TextInput: (props: TextInputProps) => <TextInput {...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 LoadingSpinner: (props: LoadingSpinnerProps) => <LoadingSpinner {...props} />,\n DescriptionList: (props: DescriptionListProps) => <DescriptionList {...props} />,\n}\n"],"names":["defaultComponents","props","jsx","Alert","Badge","Button","ButtonIcon","Card","TextInput","Checkbox","CheckboxGroup","ComboBox","DatePicker","OrderedList","UnorderedList","NumberInput","Radio","RadioGroup","Select","Switch","Link","Menu","Table","Heading","Text","CalendarPreview","ProgressBar","Breadcrumbs","Tabs","Dialog","LoadingSpinner","DescriptionList"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6DO,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,YAAY,CAACA,MAA2B,gBAAAC,EAACI,GAAA,EAAY,GAAGL,GAAO;AAAA,EAC/D,MAAM,CAACA,MAAqB,gBAAAC,EAACK,GAAA,EAAM,GAAGN,GAAO;AAAA,EAC7C,WAAW,CAACA,MAA0B,gBAAAC,EAACM,GAAA,EAAW,GAAGP,GAAO;AAAA,EAC5D,UAAU,CAACA,MAAyB,gBAAAC,EAACO,GAAA,EAAU,GAAGR,GAAO;AAAA,EACzD,eAAe,CAACA,MAA8B,gBAAAC,EAACQ,GAAA,EAAe,GAAGT,GAAO;AAAA,EACxE,UAAU,CAACA,MAAyB,gBAAAC,EAACS,GAAA,EAAU,GAAGV,GAAO;AAAA,EACzD,YAAY,CAACA,MAA2B,gBAAAC,EAACU,GAAA,EAAY,GAAGX,GAAO;AAAA,EAC/D,aAAa,CAACA,MAA4B,gBAAAC,EAACW,GAAA,EAAa,GAAGZ,GAAO;AAAA,EAClE,eAAe,CAACA,MAA8B,gBAAAC,EAACY,GAAA,EAAe,GAAGb,GAAO;AAAA,EACxE,aAAa,CAACA,MAA4B,gBAAAC,EAACa,GAAA,EAAa,GAAGd,GAAO;AAAA,EAClE,OAAO,CAACA,MAAsB,gBAAAC,EAACc,GAAA,EAAO,GAAGf,GAAO;AAAA,EAChD,YAAY,CAACA,MAA2B,gBAAAC,EAACe,GAAA,EAAY,GAAGhB,GAAO;AAAA,EAC/D,QAAQ,CAACA,MAAuB,gBAAAC,EAACgB,GAAA,EAAQ,GAAGjB,GAAO;AAAA,EACnD,QAAQ,CAACA,MAAuB,gBAAAC,EAACiB,GAAA,EAAQ,GAAGlB,GAAO;AAAA,EACnD,MAAM,CAACA,MAAqB,gBAAAC,EAACkB,GAAA,EAAM,GAAGnB,GAAO;AAAA,EAC7C,MAAM,CAACA,MAAqB,gBAAAC,EAACmB,GAAA,EAAM,GAAGpB,GAAO;AAAA,EAC7C,OAAO,CAACA,MAAsB,gBAAAC,EAACoB,GAAA,EAAO,GAAGrB,GAAO;AAAA,EAChD,SAAS,CAACA,MAAwB,gBAAAC,EAACqB,GAAA,EAAS,GAAGtB,GAAO;AAAA,EACtD,MAAM,CAACA,MAAqB,gBAAAC,EAACsB,GAAA,EAAM,GAAGvB,GAAO;AAAA,EAC7C,iBAAiB,CAACA,MAAgC,gBAAAC,EAACuB,GAAA,EAAiB,GAAGxB,GAAO;AAAA,EAC9E,aAAa,CAACA,MAA4B,gBAAAC,EAACwB,GAAA,EAAa,GAAGzB,GAAO;AAAA,EAClE,aAAa,CAACA,MAA4B,gBAAAC,EAACyB,GAAA,EAAa,GAAG1B,GAAO;AAAA,EAClE,MAAM,CAACA,MAAqB,gBAAAC,EAAC0B,GAAA,EAAM,GAAG3B,GAAO;AAAA,EAC7C,QAAQ,CAACA,MAAuB,gBAAAC,EAAC2B,GAAA,EAAQ,GAAG5B,GAAO;AAAA,EACnD,gBAAgB,CAACA,MAA+B,gBAAAC,EAAC4B,GAAA,EAAgB,GAAG7B,GAAO;AAAA,EAC3E,iBAAiB,CAACA,MAAgC,gBAAAC,EAAC6B,GAAA,EAAiB,GAAG9B,EAAA,CAAO;AAChF;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { ProgressBarProps } from '../../components/Common/UI/ProgressBar/ProgressBarTypes';
|
|
2
|
+
export type { BreadcrumbsProps } from '../../components/Common/UI/Breadcrumbs/BreadcrumbsTypes';
|
|
2
3
|
export type { ButtonProps, ButtonIconProps } from '../../components/Common/UI/Button/ButtonTypes';
|
|
3
4
|
export type { CardProps } from '../../components/Common/UI/Card/CardTypes';
|
|
4
5
|
export type { CheckboxProps } from '../../components/Common/UI/Checkbox/CheckboxTypes';
|
|
@@ -22,3 +23,4 @@ export type { PaginationControlProps } from '../../components/Common/PaginationC
|
|
|
22
23
|
export type { TextProps } from '../../components/Common/UI/Text/TextTypes';
|
|
23
24
|
export type { CalendarPreviewProps } from '../../components/Common/UI/CalendarPreview/CalendarPreviewTypes';
|
|
24
25
|
export type { DialogProps } from '../../components/Common/UI/Dialog/DialogTypes';
|
|
26
|
+
export type { DescriptionListProps } from '../../components/Common/UI/DescriptionList/DescriptionListTypes';
|
|
@@ -22,9 +22,11 @@ import { PaginationControlProps } from '../../components/Common/PaginationContro
|
|
|
22
22
|
import { TextProps } from '../../components/Common/UI/Text/TextTypes';
|
|
23
23
|
import { CalendarPreviewProps } from '../../components/Common/UI/CalendarPreview/CalendarPreviewTypes';
|
|
24
24
|
import { ProgressBarProps } from '../../components/Common/UI/ProgressBar/ProgressBarTypes';
|
|
25
|
+
import { BreadcrumbsProps } from '../../components/Common/UI/Breadcrumbs/BreadcrumbsTypes';
|
|
25
26
|
import { TabsProps } from '../../components/Common/UI/Tabs/TabsTypes';
|
|
26
27
|
import { DialogProps } from '../../components/Common/UI/Dialog/DialogTypes';
|
|
27
28
|
import { LoadingSpinnerProps } from '../../components/Common/UI/LoadingSpinner/LoadingSpinnerTypes';
|
|
29
|
+
import { DescriptionListProps } from '../../components/Common/UI/DescriptionList/DescriptionListTypes';
|
|
28
30
|
export interface ComponentsContextType {
|
|
29
31
|
Alert: (props: AlertProps) => JSX.Element | null;
|
|
30
32
|
Badge: (props: BadgeProps) => JSX.Element | null;
|
|
@@ -51,9 +53,11 @@ export interface ComponentsContextType {
|
|
|
51
53
|
Text: (props: TextProps) => JSX.Element | null;
|
|
52
54
|
CalendarPreview: (props: CalendarPreviewProps) => JSX.Element | null;
|
|
53
55
|
ProgressBar: (props: ProgressBarProps) => JSX.Element | null;
|
|
56
|
+
Breadcrumbs: (props: BreadcrumbsProps) => JSX.Element | null;
|
|
54
57
|
Tabs: (props: TabsProps) => JSX.Element | null;
|
|
55
58
|
Dialog: (props: DialogProps) => JSX.Element | null;
|
|
56
59
|
LoadingSpinner: (props: LoadingSpinnerProps) => JSX.Element | null;
|
|
60
|
+
DescriptionList: (props: DescriptionListProps) => JSX.Element | null;
|
|
57
61
|
}
|
|
58
62
|
export declare const ComponentsContext: import('react').Context<ComponentsContextType | null>;
|
|
59
63
|
export declare const useComponentContext: () => ComponentsContextType;
|
|
@@ -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 { 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 { 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 { TabsProps } from '@/components/Common/UI/Tabs/TabsTypes'\nimport type { DialogProps } from '@/components/Common/UI/Dialog/DialogTypes'\nimport type { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\n\nexport interface ComponentsContextType {\n Alert: (props: AlertProps) => JSX.Element | null\n Badge: (props: BadgeProps) => 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 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 Text: (props: TextProps) => JSX.Element | null\n CalendarPreview: (props: CalendarPreviewProps) => JSX.Element | null\n ProgressBar: (props: ProgressBarProps) => JSX.Element | null\n Tabs: (props: TabsProps) => JSX.Element | null\n Dialog: (props: DialogProps) => JSX.Element | null\n LoadingSpinner: (props: LoadingSpinnerProps) => 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 { 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 { 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 { LoadingSpinnerProps } from '@/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes'\nimport type { DescriptionListProps } from '@/components/Common/UI/DescriptionList/DescriptionListTypes'\n\nexport interface ComponentsContextType {\n Alert: (props: AlertProps) => JSX.Element | null\n Badge: (props: BadgeProps) => 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 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 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 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":";AAgEO,MAAMA,IAAoBC,EAA4C,IAAI,GAEpEC,IAAsB,MAAM;AACvC,QAAMC,IAAUC,EAAWJ,CAAiB;AAC5C,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,8DAA8D;AAEhF,SAAOA;AACT;"}
|
|
@@ -10,11 +10,10 @@ import { SDKI18next as t } from "./SDKI18next.js";
|
|
|
10
10
|
import "classnames";
|
|
11
11
|
import "../../shared/constants.js";
|
|
12
12
|
import { InternalError as y } from "../../components/Common/InternalError/InternalError.js";
|
|
13
|
-
import "../ComponentAdapter/useComponentContext.js";
|
|
14
13
|
import { LocaleProvider as L } from "../LocaleProvider/LocaleProvider.js";
|
|
15
14
|
import "../LocaleProvider/useLocale.js";
|
|
16
15
|
import { ThemeProvider as U } from "../ThemeProvider/ThemeProvider.js";
|
|
17
|
-
const
|
|
16
|
+
const z = (a) => {
|
|
18
17
|
const {
|
|
19
18
|
children: c,
|
|
20
19
|
config: e,
|
|
@@ -43,6 +42,6 @@ const H = (a) => {
|
|
|
43
42
|
}, [n]), /* @__PURE__ */ r(P, { value: C(s), children: /* @__PURE__ */ r(x, { value: f, children: /* @__PURE__ */ r(h, { FallbackComponent: y, children: /* @__PURE__ */ r(U, { theme: l, children: /* @__PURE__ */ r(L, { locale: d, currency: p, children: /* @__PURE__ */ r(v, { i18n: t, children: /* @__PURE__ */ r(I, { url: e.baseUrl, headers: e.headers, hooks: e.hooks, children: c }) }, n) }) }) }) }) });
|
|
44
43
|
};
|
|
45
44
|
export {
|
|
46
|
-
|
|
45
|
+
z as GustoProviderCustomUIAdapter
|
|
47
46
|
};
|
|
48
47
|
//# sourceMappingURL=GustoProviderCustomUIAdapter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GustoProviderCustomUIAdapter.js","sources":["../../../src/contexts/GustoProvider/GustoProviderCustomUIAdapter.tsx"],"sourcesContent":["import type React from 'react'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { I18nextProvider } from 'react-i18next'\nimport type { QueryClient } from '@tanstack/react-query'\nimport { useEffect } from 'react'\nimport { ComponentsProvider } from '../ComponentAdapter/ComponentsProvider'\nimport type { ComponentsContextType } from '../ComponentAdapter/useComponentContext'\nimport { createComponents } from '../ComponentAdapter/createComponentsWithDefaults'\nimport { ApiProvider } from '../ApiProvider/ApiProvider'\nimport { LoadingIndicatorProvider } from '../LoadingIndicatorProvider/LoadingIndicatorProvider'\nimport type { LoadingIndicatorContextProps } from '../LoadingIndicatorProvider/useLoadingIndicator'\nimport { SDKI18next } from './SDKI18next'\nimport { InternalError } from '@/components/Common'\nimport { LocaleProvider } from '@/contexts/LocaleProvider'\nimport { ThemeProvider } from '@/contexts/ThemeProvider'\nimport type { GustoSDKTheme } from '@/contexts/ThemeProvider/theme'\nimport type { ResourceDictionary, SupportedLanguages } from '@/types/Helpers'\nimport type { SDKHooks } from '@/types/hooks'\n\nexport interface APIConfig {\n baseUrl: string\n headers?: HeadersInit\n hooks?: SDKHooks\n}\n\nexport interface GustoProviderProps {\n config: APIConfig\n dictionary?: ResourceDictionary\n lng?: string\n locale?: string\n currency?: string\n theme?: GustoSDKTheme\n queryClient?: QueryClient\n components: ComponentsContextType\n LoaderComponent?: LoadingIndicatorContextProps['LoadingIndicator']\n}\n\nexport interface GustoProviderCustomUIAdapterProps extends GustoProviderProps {\n children?: React.ReactNode\n}\n\n/**\n * A provider that accepts UI component adapters through the components prop\n */\nconst GustoProviderCustomUIAdapter: React.FC<GustoProviderCustomUIAdapterProps> = props => {\n const {\n children,\n config,\n dictionary,\n lng = 'en',\n locale = 'en-US',\n currency = 'USD',\n theme,\n components,\n LoaderComponent,\n } = props\n\n // Handle dictionary resources\n if (dictionary) {\n for (const language in dictionary) {\n const lang = language as SupportedLanguages\n for (const ns in dictionary[lang]) {\n // Adding resources overrides to i18next instance - initial load will override common namespace and add component specific dictionaries provided by partners\n SDKI18next.addResourceBundle(\n lang,\n ns,\n (dictionary[lang] as Record<string, unknown>)[ns],\n true,\n true,\n )\n }\n }\n }\n\n // Handle language change\n useEffect(() => {\n void (async () => {\n await SDKI18next.changeLanguage(lng)\n })()\n }, [lng])\n\n return (\n <ComponentsProvider value={createComponents(components)}>\n <LoadingIndicatorProvider value={LoaderComponent}>\n <ErrorBoundary FallbackComponent={InternalError}>\n <ThemeProvider theme={theme}>\n <LocaleProvider locale={locale} currency={currency}>\n <I18nextProvider i18n={SDKI18next} key={lng}>\n <ApiProvider url={config.baseUrl} headers={config.headers} hooks={config.hooks}>\n {children}\n </ApiProvider>\n </I18nextProvider>\n </LocaleProvider>\n </ThemeProvider>\n </ErrorBoundary>\n </LoadingIndicatorProvider>\n </ComponentsProvider>\n )\n}\n\nexport { GustoProviderCustomUIAdapter }\n"],"names":["GustoProviderCustomUIAdapter","props","children","config","dictionary","lng","locale","currency","theme","components","LoaderComponent","language","lang","ns","SDKI18next","useEffect","ComponentsProvider","createComponents","LoadingIndicatorProvider","jsx","ErrorBoundary","InternalError","ThemeProvider","LocaleProvider","I18nextProvider","ApiProvider"],"mappings":"
|
|
1
|
+
{"version":3,"file":"GustoProviderCustomUIAdapter.js","sources":["../../../src/contexts/GustoProvider/GustoProviderCustomUIAdapter.tsx"],"sourcesContent":["import type React from 'react'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { I18nextProvider } from 'react-i18next'\nimport type { QueryClient } from '@tanstack/react-query'\nimport { useEffect } from 'react'\nimport { ComponentsProvider } from '../ComponentAdapter/ComponentsProvider'\nimport type { ComponentsContextType } from '../ComponentAdapter/useComponentContext'\nimport { createComponents } from '../ComponentAdapter/createComponentsWithDefaults'\nimport { ApiProvider } from '../ApiProvider/ApiProvider'\nimport { LoadingIndicatorProvider } from '../LoadingIndicatorProvider/LoadingIndicatorProvider'\nimport type { LoadingIndicatorContextProps } from '../LoadingIndicatorProvider/useLoadingIndicator'\nimport { SDKI18next } from './SDKI18next'\nimport { InternalError } from '@/components/Common'\nimport { LocaleProvider } from '@/contexts/LocaleProvider'\nimport { ThemeProvider } from '@/contexts/ThemeProvider'\nimport type { GustoSDKTheme } from '@/contexts/ThemeProvider/theme'\nimport type { ResourceDictionary, SupportedLanguages } from '@/types/Helpers'\nimport type { SDKHooks } from '@/types/hooks'\n\nexport interface APIConfig {\n baseUrl: string\n headers?: HeadersInit\n hooks?: SDKHooks\n}\n\nexport interface GustoProviderProps {\n config: APIConfig\n dictionary?: ResourceDictionary\n lng?: string\n locale?: string\n currency?: string\n theme?: GustoSDKTheme\n queryClient?: QueryClient\n components: ComponentsContextType\n LoaderComponent?: LoadingIndicatorContextProps['LoadingIndicator']\n}\n\nexport interface GustoProviderCustomUIAdapterProps extends GustoProviderProps {\n children?: React.ReactNode\n}\n\n/**\n * A provider that accepts UI component adapters through the components prop\n */\nconst GustoProviderCustomUIAdapter: React.FC<GustoProviderCustomUIAdapterProps> = props => {\n const {\n children,\n config,\n dictionary,\n lng = 'en',\n locale = 'en-US',\n currency = 'USD',\n theme,\n components,\n LoaderComponent,\n } = props\n\n // Handle dictionary resources\n if (dictionary) {\n for (const language in dictionary) {\n const lang = language as SupportedLanguages\n for (const ns in dictionary[lang]) {\n // Adding resources overrides to i18next instance - initial load will override common namespace and add component specific dictionaries provided by partners\n SDKI18next.addResourceBundle(\n lang,\n ns,\n (dictionary[lang] as Record<string, unknown>)[ns],\n true,\n true,\n )\n }\n }\n }\n\n // Handle language change\n useEffect(() => {\n void (async () => {\n await SDKI18next.changeLanguage(lng)\n })()\n }, [lng])\n\n return (\n <ComponentsProvider value={createComponents(components)}>\n <LoadingIndicatorProvider value={LoaderComponent}>\n <ErrorBoundary FallbackComponent={InternalError}>\n <ThemeProvider theme={theme}>\n <LocaleProvider locale={locale} currency={currency}>\n <I18nextProvider i18n={SDKI18next} key={lng}>\n <ApiProvider url={config.baseUrl} headers={config.headers} hooks={config.hooks}>\n {children}\n </ApiProvider>\n </I18nextProvider>\n </LocaleProvider>\n </ThemeProvider>\n </ErrorBoundary>\n </LoadingIndicatorProvider>\n </ComponentsProvider>\n )\n}\n\nexport { GustoProviderCustomUIAdapter }\n"],"names":["GustoProviderCustomUIAdapter","props","children","config","dictionary","lng","locale","currency","theme","components","LoaderComponent","language","lang","ns","SDKI18next","useEffect","ComponentsProvider","createComponents","LoadingIndicatorProvider","jsx","ErrorBoundary","InternalError","ThemeProvider","LocaleProvider","I18nextProvider","ApiProvider"],"mappings":";;;;;;;;;;;;;;;AA4CA,MAAMA,IAA4E,CAAAC,MAAS;AACzF,QAAM;AAAA,IACJ,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,QAAAC,IAAS;AAAA,IACT,UAAAC,IAAW;AAAA,IACX,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,EAAA,IACET;AAGJ,MAAIG;AACF,eAAWO,KAAYP,GAAY;AACjC,YAAMQ,IAAOD;AACb,iBAAWE,KAAMT,EAAWQ,CAAI;AAE9B,QAAAE,EAAW;AAAA,UACTF;AAAA,UACAC;AAAA,UACCT,EAAWQ,CAAI,EAA8BC,CAAE;AAAA,UAChD;AAAA,UACA;AAAA,QAAA;AAAA,IAGN;AAIF,SAAAE,EAAU,MAAM;AACd,KAAM,YACJ,MAAMD,EAAW,eAAeT,CAAG;AAAA,EAEvC,GAAG,CAACA,CAAG,CAAC,qBAGLW,GAAA,EAAmB,OAAOC,EAAiBR,CAAU,GACpD,4BAACS,GAAA,EAAyB,OAAOR,GAC/B,UAAA,gBAAAS,EAACC,GAAA,EAAc,mBAAmBC,GAChC,UAAA,gBAAAF,EAACG,KAAc,OAAAd,GACb,UAAA,gBAAAW,EAACI,KAAe,QAAAjB,GAAgB,UAAAC,GAC9B,4BAACiB,GAAA,EAAgB,MAAMV,GACrB,UAAA,gBAAAK,EAACM,GAAA,EAAY,KAAKtB,EAAO,SAAS,SAASA,EAAO,SAAS,OAAOA,EAAO,OACtE,UAAAD,GACH,EAAA,GAHsCG,CAIxC,GACF,EAAA,CACF,GACF,GACF,EAAA,CACF;AAEJ;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { BreadcrumbNodes, BreadcrumbTrail } from '../components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Builds a complete breadcrumb trail map from a hierarchical node structure.
|
|
4
|
+
*
|
|
5
|
+
* Takes a tree structure of breadcrumb nodes and generates a map where each state
|
|
6
|
+
* has its complete breadcrumb trail from root to that state. This is useful for
|
|
7
|
+
* initializing breadcrumb navigation in state machines or multi-step flows.
|
|
8
|
+
*/
|
|
9
|
+
export declare const buildBreadcrumbs: (nodes: BreadcrumbNodes) => BreadcrumbTrail;
|
|
10
|
+
/**
|
|
11
|
+
* Resolves template variables in breadcrumb labels using values from a context object.
|
|
12
|
+
*
|
|
13
|
+
* Supports Handlebars-style template syntax ({{variableName}}) for dynamic breadcrumb labels.
|
|
14
|
+
* Variables enclosed in double braces are replaced with their corresponding values from the context.
|
|
15
|
+
* Non-template strings are returned as-is.
|
|
16
|
+
*/
|
|
17
|
+
export declare const resolveBreadcrumbVariables: (variables: Record<string, string> | undefined, context: Record<string, unknown>) => Record<string, unknown>;
|
|
18
|
+
/**
|
|
19
|
+
* Updates the breadcrumb trail for a specific state with resolved variables.
|
|
20
|
+
*
|
|
21
|
+
* This function is typically used in state machine transitions to update breadcrumb
|
|
22
|
+
* navigation when moving between states. It preserves all existing breadcrumb trails
|
|
23
|
+
* for other states and only updates the trail for the specified state by resolving
|
|
24
|
+
* any template variables for that state's breadcrumb.
|
|
25
|
+
|
|
26
|
+
*/
|
|
27
|
+
export declare const updateBreadcrumbs: <T extends {
|
|
28
|
+
breadcrumbs?: BreadcrumbTrail;
|
|
29
|
+
currentBreadcrumb?: string;
|
|
30
|
+
}>(stateName: string, context: T, variables?: Record<string, string>) => Omit<T, "breadcrumbs" | "currentBreadcrumb"> & {
|
|
31
|
+
breadcrumbs: BreadcrumbTrail;
|
|
32
|
+
currentBreadcrumbId: string;
|
|
33
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const l = (r) => {
|
|
2
|
+
const e = {};
|
|
3
|
+
for (const [n, s] of Object.entries(r)) {
|
|
4
|
+
const o = [];
|
|
5
|
+
let t = s;
|
|
6
|
+
for (; t; ) {
|
|
7
|
+
o.unshift(t.item);
|
|
8
|
+
const c = t.parent;
|
|
9
|
+
t = c ? r[c] ?? null : null;
|
|
10
|
+
}
|
|
11
|
+
e[n] = o;
|
|
12
|
+
}
|
|
13
|
+
return e;
|
|
14
|
+
}, u = (r, e) => {
|
|
15
|
+
if (!r)
|
|
16
|
+
return {};
|
|
17
|
+
const n = {};
|
|
18
|
+
for (const [s, o] of Object.entries(r)) {
|
|
19
|
+
const t = o.match(/{{(.*?)}}/);
|
|
20
|
+
if (t?.[1]) {
|
|
21
|
+
const c = t[1].trim();
|
|
22
|
+
n[s] = e[c] ?? "";
|
|
23
|
+
} else
|
|
24
|
+
n[s] = o;
|
|
25
|
+
}
|
|
26
|
+
return n;
|
|
27
|
+
}, i = (r, e, n) => {
|
|
28
|
+
const s = e.breadcrumbs ?? {}, t = (s[r] ?? []).map((c) => c.id === r && n ? {
|
|
29
|
+
...c,
|
|
30
|
+
variables: u(n, e)
|
|
31
|
+
} : c);
|
|
32
|
+
return {
|
|
33
|
+
...e,
|
|
34
|
+
breadcrumbs: {
|
|
35
|
+
...s,
|
|
36
|
+
[r]: t
|
|
37
|
+
},
|
|
38
|
+
currentBreadcrumbId: r
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
l as buildBreadcrumbs,
|
|
43
|
+
u as resolveBreadcrumbVariables,
|
|
44
|
+
i as updateBreadcrumbs
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=breadcrumbHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbHelpers.js","sources":["../../src/helpers/breadcrumbHelpers.ts"],"sourcesContent":["import type {\n BreadcrumbNode,\n BreadcrumbNodes,\n BreadcrumbTrail,\n FlowBreadcrumb,\n} from '@/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes'\n\n/**\n * Builds a complete breadcrumb trail map from a hierarchical node structure.\n *\n * Takes a tree structure of breadcrumb nodes and generates a map where each state\n * has its complete breadcrumb trail from root to that state. This is useful for\n * initializing breadcrumb navigation in state machines or multi-step flows.\n */\nexport const buildBreadcrumbs = (nodes: BreadcrumbNodes): BreadcrumbTrail => {\n const map: Record<string, FlowBreadcrumb[]> = {}\n\n for (const [state, node] of Object.entries(nodes)) {\n const trail: FlowBreadcrumb[] = []\n let current: BreadcrumbNode | null = node\n\n while (current) {\n trail.unshift(current.item)\n const parentKey: string | null = current.parent\n current = parentKey ? (nodes[parentKey] ?? null) : null\n }\n\n map[state] = trail\n }\n\n return map\n}\n\n/**\n * Resolves template variables in breadcrumb labels using values from a context object.\n *\n * Supports Handlebars-style template syntax ({{variableName}}) for dynamic breadcrumb labels.\n * Variables enclosed in double braces are replaced with their corresponding values from the context.\n * Non-template strings are returned as-is.\n */\nexport const resolveBreadcrumbVariables = (\n variables: Record<string, string> | undefined,\n context: Record<string, unknown>,\n): Record<string, unknown> => {\n if (!variables) {\n return {}\n }\n\n const resolved: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(variables)) {\n const match = value.match(/{{(.*?)}}/)\n if (match?.[1]) {\n const ctxKey = match[1].trim()\n resolved[key] = context[ctxKey] ?? ''\n } else {\n resolved[key] = value\n }\n }\n return resolved\n}\n\n/**\n * Updates the breadcrumb trail for a specific state with resolved variables.\n *\n * This function is typically used in state machine transitions to update breadcrumb\n * navigation when moving between states. It preserves all existing breadcrumb trails\n * for other states and only updates the trail for the specified state by resolving\n * any template variables for that state's breadcrumb.\n\n */\nexport const updateBreadcrumbs = <\n T extends { breadcrumbs?: BreadcrumbTrail; currentBreadcrumb?: string },\n>(\n stateName: string,\n context: T,\n variables?: Record<string, string>,\n): Omit<T, 'breadcrumbs' | 'currentBreadcrumb'> & {\n breadcrumbs: BreadcrumbTrail\n currentBreadcrumbId: string\n} => {\n const allBreadcrumbs = context.breadcrumbs ?? {}\n const trail = allBreadcrumbs[stateName] ?? []\n const resolvedTrail = trail.map(breadcrumb => {\n if (breadcrumb.id === stateName && variables) {\n return {\n ...breadcrumb,\n variables: resolveBreadcrumbVariables(variables, context as Record<string, unknown>),\n }\n }\n return breadcrumb\n })\n return {\n ...context,\n breadcrumbs: {\n ...allBreadcrumbs,\n [stateName]: resolvedTrail,\n },\n currentBreadcrumbId: stateName,\n }\n}\n"],"names":["buildBreadcrumbs","nodes","map","state","node","trail","current","parentKey","resolveBreadcrumbVariables","variables","context","resolved","key","value","match","ctxKey","updateBreadcrumbs","stateName","allBreadcrumbs","resolvedTrail","breadcrumb"],"mappings":"AAcO,MAAMA,IAAmB,CAACC,MAA4C;AAC3E,QAAMC,IAAwC,CAAA;AAE9C,aAAW,CAACC,GAAOC,CAAI,KAAK,OAAO,QAAQH,CAAK,GAAG;AACjD,UAAMI,IAA0B,CAAA;AAChC,QAAIC,IAAiCF;AAErC,WAAOE,KAAS;AACd,MAAAD,EAAM,QAAQC,EAAQ,IAAI;AAC1B,YAAMC,IAA2BD,EAAQ;AACzC,MAAAA,IAAUC,IAAaN,EAAMM,CAAS,KAAK,OAAQ;AAAA,IACrD;AAEA,IAAAL,EAAIC,CAAK,IAAIE;AAAA,EACf;AAEA,SAAOH;AACT,GASaM,IAA6B,CACxCC,GACAC,MAC4B;AAC5B,MAAI,CAACD;AACH,WAAO,CAAA;AAGT,QAAME,IAAoC,CAAA;AAC1C,aAAW,CAACC,GAAKC,CAAK,KAAK,OAAO,QAAQJ,CAAS,GAAG;AACpD,UAAMK,IAAQD,EAAM,MAAM,WAAW;AACrC,QAAIC,IAAQ,CAAC,GAAG;AACd,YAAMC,IAASD,EAAM,CAAC,EAAE,KAAA;AACxB,MAAAH,EAASC,CAAG,IAAIF,EAAQK,CAAM,KAAK;AAAA,IACrC;AACE,MAAAJ,EAASC,CAAG,IAAIC;AAAA,EAEpB;AACA,SAAOF;AACT,GAWaK,IAAoB,CAG/BC,GACAP,GACAD,MAIG;AACH,QAAMS,IAAiBR,EAAQ,eAAe,CAAA,GAExCS,KADQD,EAAeD,CAAS,KAAK,CAAA,GACf,IAAI,CAAAG,MAC1BA,EAAW,OAAOH,KAAaR,IAC1B;AAAA,IACL,GAAGW;AAAA,IACH,WAAWZ,EAA2BC,GAAWC,CAAkC;AAAA,EAAA,IAGhFU,CACR;AACD,SAAO;AAAA,IACL,GAAGV;AAAA,IACH,aAAa;AAAA,MACX,GAAGQ;AAAA,MACH,CAACD,CAAS,GAAGE;AAAA,IAAA;AAAA,IAEf,qBAAqBF;AAAA,EAAA;AAEzB;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export declare const formatDateNamedWeekdayShortPlusDate: (date?: string, locale?: string) => string;
|
|
2
|
+
export declare const formatDateTimeWithTimezone: (date?: string | Date, locale?: string) => {
|
|
3
|
+
time: string;
|
|
4
|
+
date: string;
|
|
5
|
+
};
|
|
2
6
|
export declare const formatDateToStringDate: (date: Date) => string | null | undefined;
|
|
3
7
|
/**
|
|
4
8
|
* Parses YYYY-MM-DD string to local Date, avoiding timezone issues from `new Date(dateString)`.
|
|
@@ -1,31 +1,47 @@
|
|
|
1
|
-
const
|
|
1
|
+
const m = (t, r) => {
|
|
2
2
|
if (!t) return "";
|
|
3
|
-
const
|
|
4
|
-
return
|
|
3
|
+
const e = u(t);
|
|
4
|
+
return e ? e.toLocaleDateString(r, {
|
|
5
5
|
weekday: "short",
|
|
6
6
|
month: "short",
|
|
7
7
|
day: "numeric"
|
|
8
8
|
}) : "";
|
|
9
|
+
}, l = (t, r) => {
|
|
10
|
+
if (!t) return { time: "", date: "" };
|
|
11
|
+
const e = typeof t == "string" ? new Date(t) : t;
|
|
12
|
+
if (isNaN(e.getTime())) return { time: "", date: "" };
|
|
13
|
+
const o = e.toLocaleTimeString(r, {
|
|
14
|
+
hour: "numeric",
|
|
15
|
+
minute: "2-digit",
|
|
16
|
+
hour12: !0,
|
|
17
|
+
timeZoneName: "short"
|
|
18
|
+
}), n = e.toLocaleDateString(r, {
|
|
19
|
+
weekday: "short",
|
|
20
|
+
month: "short",
|
|
21
|
+
day: "numeric"
|
|
22
|
+
});
|
|
23
|
+
return { time: o, date: n };
|
|
9
24
|
}, c = (t) => isNaN(t.getTime()) ? null : t.toISOString().split("T")[0], u = (t) => {
|
|
10
25
|
if (!t || !/^\d{4}-\d{2}-\d{2}$/.test(t))
|
|
11
26
|
return null;
|
|
12
|
-
const
|
|
13
|
-
if (
|
|
27
|
+
const r = t.split("-");
|
|
28
|
+
if (r.length !== 3)
|
|
14
29
|
return null;
|
|
15
|
-
const
|
|
16
|
-
return
|
|
30
|
+
const e = r.map(Number), o = e[0], n = e[1], i = e[2];
|
|
31
|
+
return o === void 0 || n === void 0 || i === void 0 || isNaN(o) || isNaN(n) || isNaN(i) || n < 1 || n > 12 || i < 1 || i > 31 ? null : new Date(o, n - 1, i);
|
|
17
32
|
}, N = (t) => {
|
|
18
33
|
if (!t || isNaN(t.getTime()))
|
|
19
34
|
return null;
|
|
20
|
-
const
|
|
21
|
-
if (!
|
|
22
|
-
const
|
|
23
|
-
if (
|
|
24
|
-
const
|
|
25
|
-
return isNaN(
|
|
35
|
+
const r = t.toISOString(), [e] = r.split("T");
|
|
36
|
+
if (!e) return null;
|
|
37
|
+
const o = e.split("-");
|
|
38
|
+
if (o.length !== 3) return null;
|
|
39
|
+
const n = o.map(Number), i = n[0], s = n[1], a = n[2];
|
|
40
|
+
return isNaN(i) || isNaN(s) || isNaN(a) || s < 1 || s > 12 || a < 1 || a > 31 ? null : new Date(i, s - 1, a);
|
|
26
41
|
};
|
|
27
42
|
export {
|
|
28
|
-
|
|
43
|
+
m as formatDateNamedWeekdayShortPlusDate,
|
|
44
|
+
l as formatDateTimeWithTimezone,
|
|
29
45
|
c as formatDateToStringDate,
|
|
30
46
|
N as normalizeDateToLocal,
|
|
31
47
|
u as parseDateStringToLocal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateFormatting.js","sources":["../../src/helpers/dateFormatting.ts"],"sourcesContent":["export const formatDateNamedWeekdayShortPlusDate = (date?: string, locale?: string) => {\n if (!date) return ''\n const parsedDate = parseDateStringToLocal(date)\n if (!parsedDate) return ''\n return parsedDate.toLocaleDateString(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n })\n}\n\nexport const formatDateToStringDate = (date: Date) => {\n // Handle invalid dates gracefully\n if (isNaN(date.getTime())) {\n return null\n }\n return date.toISOString().split('T')[0]\n}\n\n/**\n * Parses YYYY-MM-DD string to local Date, avoiding timezone issues from `new Date(dateString)`.\n */\nexport const parseDateStringToLocal = (dateString: string): Date | null => {\n if (!dateString || !/^\\d{4}-\\d{2}-\\d{2}$/.test(dateString)) {\n return null\n }\n\n const parts = dateString.split('-')\n if (parts.length !== 3) {\n return null\n }\n\n const numbers = parts.map(Number)\n const year = numbers[0]\n const month = numbers[1]\n const day = numbers[2]\n if (year === undefined || month === undefined || day === undefined) {\n return null\n }\n\n // Validate date components\n if (isNaN(year) || isNaN(month) || isNaN(day) || month < 1 || month > 12 || day < 1 || day > 31) {\n return null\n }\n\n // Create Date in local timezone (month is 0-indexed)\n return new Date(year, month - 1, day)\n}\n\n/**\n * Normalizes Date to local midnight, handling timezone issues from any adapter.\n */\nexport const normalizeDateToLocal = (date: Date | null): Date | null => {\n if (!date || isNaN(date.getTime())) {\n return null\n }\n\n // Use ISO string to get the intended date, then parse components\n const isoString = date.toISOString()\n const [datePart] = isoString.split('T')\n if (!datePart) return null\n\n const parts = datePart.split('-')\n if (parts.length !== 3) return null\n const numbers = parts.map(Number)\n const year = numbers[0]!\n const month = numbers[1]!\n const day = numbers[2]!\n if (isNaN(year) || isNaN(month) || isNaN(day) || month < 1 || month > 12 || day < 1 || day > 31) {\n return null\n }\n\n return new Date(year, month - 1, day)\n}\n"],"names":["formatDateNamedWeekdayShortPlusDate","date","locale","parsedDate","parseDateStringToLocal","
|
|
1
|
+
{"version":3,"file":"dateFormatting.js","sources":["../../src/helpers/dateFormatting.ts"],"sourcesContent":["export const formatDateNamedWeekdayShortPlusDate = (date?: string, locale?: string) => {\n if (!date) return ''\n const parsedDate = parseDateStringToLocal(date)\n if (!parsedDate) return ''\n return parsedDate.toLocaleDateString(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n })\n}\n\nexport const formatDateTimeWithTimezone = (date?: string | Date, locale?: string) => {\n if (!date) return { time: '', date: '' }\n const parsedDate = typeof date === 'string' ? new Date(date) : date\n if (isNaN(parsedDate.getTime())) return { time: '', date: '' }\n\n const time = parsedDate.toLocaleTimeString(locale, {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n timeZoneName: 'short',\n })\n\n const dateString = parsedDate.toLocaleDateString(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n })\n\n return { time, date: dateString }\n}\n\nexport const formatDateToStringDate = (date: Date) => {\n // Handle invalid dates gracefully\n if (isNaN(date.getTime())) {\n return null\n }\n return date.toISOString().split('T')[0]\n}\n\n/**\n * Parses YYYY-MM-DD string to local Date, avoiding timezone issues from `new Date(dateString)`.\n */\nexport const parseDateStringToLocal = (dateString: string): Date | null => {\n if (!dateString || !/^\\d{4}-\\d{2}-\\d{2}$/.test(dateString)) {\n return null\n }\n\n const parts = dateString.split('-')\n if (parts.length !== 3) {\n return null\n }\n\n const numbers = parts.map(Number)\n const year = numbers[0]\n const month = numbers[1]\n const day = numbers[2]\n if (year === undefined || month === undefined || day === undefined) {\n return null\n }\n\n // Validate date components\n if (isNaN(year) || isNaN(month) || isNaN(day) || month < 1 || month > 12 || day < 1 || day > 31) {\n return null\n }\n\n // Create Date in local timezone (month is 0-indexed)\n return new Date(year, month - 1, day)\n}\n\n/**\n * Normalizes Date to local midnight, handling timezone issues from any adapter.\n */\nexport const normalizeDateToLocal = (date: Date | null): Date | null => {\n if (!date || isNaN(date.getTime())) {\n return null\n }\n\n // Use ISO string to get the intended date, then parse components\n const isoString = date.toISOString()\n const [datePart] = isoString.split('T')\n if (!datePart) return null\n\n const parts = datePart.split('-')\n if (parts.length !== 3) return null\n const numbers = parts.map(Number)\n const year = numbers[0]!\n const month = numbers[1]!\n const day = numbers[2]!\n if (isNaN(year) || isNaN(month) || isNaN(day) || month < 1 || month > 12 || day < 1 || day > 31) {\n return null\n }\n\n return new Date(year, month - 1, day)\n}\n"],"names":["formatDateNamedWeekdayShortPlusDate","date","locale","parsedDate","parseDateStringToLocal","formatDateTimeWithTimezone","time","dateString","formatDateToStringDate","parts","numbers","year","month","day","normalizeDateToLocal","isoString","datePart"],"mappings":"AAAO,MAAMA,IAAsC,CAACC,GAAeC,MAAoB;AACrF,MAAI,CAACD,EAAM,QAAO;AAClB,QAAME,IAAaC,EAAuBH,CAAI;AAC9C,SAAKE,IACEA,EAAW,mBAAmBD,GAAQ;AAAA,IAC3C,SAAS;AAAA,IACT,OAAO;AAAA,IACP,KAAK;AAAA,EAAA,CACN,IALuB;AAM1B,GAEaG,IAA6B,CAACJ,GAAsBC,MAAoB;AACnF,MAAI,CAACD,EAAM,QAAO,EAAE,MAAM,IAAI,MAAM,GAAA;AACpC,QAAME,IAAa,OAAOF,KAAS,WAAW,IAAI,KAAKA,CAAI,IAAIA;AAC/D,MAAI,MAAME,EAAW,SAAS,UAAU,EAAE,MAAM,IAAI,MAAM,GAAA;AAE1D,QAAMG,IAAOH,EAAW,mBAAmBD,GAAQ;AAAA,IACjD,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,cAAc;AAAA,EAAA,CACf,GAEKK,IAAaJ,EAAW,mBAAmBD,GAAQ;AAAA,IACvD,SAAS;AAAA,IACT,OAAO;AAAA,IACP,KAAK;AAAA,EAAA,CACN;AAED,SAAO,EAAE,MAAAI,GAAM,MAAMC,EAAA;AACvB,GAEaC,IAAyB,CAACP,MAEjC,MAAMA,EAAK,QAAA,CAAS,IACf,OAEFA,EAAK,YAAA,EAAc,MAAM,GAAG,EAAE,CAAC,GAM3BG,IAAyB,CAACG,MAAoC;AACzE,MAAI,CAACA,KAAc,CAAC,sBAAsB,KAAKA,CAAU;AACvD,WAAO;AAGT,QAAME,IAAQF,EAAW,MAAM,GAAG;AAClC,MAAIE,EAAM,WAAW;AACnB,WAAO;AAGT,QAAMC,IAAUD,EAAM,IAAI,MAAM,GAC1BE,IAAOD,EAAQ,CAAC,GAChBE,IAAQF,EAAQ,CAAC,GACjBG,IAAMH,EAAQ,CAAC;AAMrB,SALIC,MAAS,UAAaC,MAAU,UAAaC,MAAQ,UAKrD,MAAMF,CAAI,KAAK,MAAMC,CAAK,KAAK,MAAMC,CAAG,KAAKD,IAAQ,KAAKA,IAAQ,MAAMC,IAAM,KAAKA,IAAM,KACpF,OAIF,IAAI,KAAKF,GAAMC,IAAQ,GAAGC,CAAG;AACtC,GAKaC,IAAuB,CAACb,MAAmC;AACtE,MAAI,CAACA,KAAQ,MAAMA,EAAK,QAAA,CAAS;AAC/B,WAAO;AAIT,QAAMc,IAAYd,EAAK,YAAA,GACjB,CAACe,CAAQ,IAAID,EAAU,MAAM,GAAG;AACtC,MAAI,CAACC,EAAU,QAAO;AAEtB,QAAMP,IAAQO,EAAS,MAAM,GAAG;AAChC,MAAIP,EAAM,WAAW,EAAG,QAAO;AAC/B,QAAMC,IAAUD,EAAM,IAAI,MAAM,GAC1BE,IAAOD,EAAQ,CAAC,GAChBE,IAAQF,EAAQ,CAAC,GACjBG,IAAMH,EAAQ,CAAC;AACrB,SAAI,MAAMC,CAAI,KAAK,MAAMC,CAAK,KAAK,MAAMC,CAAG,KAAKD,IAAQ,KAAKA,IAAQ,MAAMC,IAAM,KAAKA,IAAM,KACpF,OAGF,IAAI,KAAKF,GAAMC,IAAQ,GAAGC,CAAG;AACtC;"}
|
package/dist/i18n/I18n.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ export declare const defaultNS = "common";
|
|
|
5
5
|
* Hook that allows component to load custom dictionary
|
|
6
6
|
* @param @private {string} ns - Namespace - should match component name exactly - not exposed to consumers
|
|
7
7
|
*/
|
|
8
|
-
export declare const useI18n: (
|
|
8
|
+
export declare const useI18n: (namespaces: keyof CustomTypeOptions["resources"] | Array<keyof CustomTypeOptions["resources"]> | null) => void;
|
|
9
9
|
export declare const useComponentDictionary: <K extends keyof Resources>(ns: keyof CustomTypeOptions["resources"], resource?: ResourceDictionary<K> | null) => void;
|
package/dist/i18n/I18n.js
CHANGED
|
@@ -1,41 +1,50 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { LRUCache as
|
|
4
|
-
const P = "common",
|
|
5
|
-
let
|
|
1
|
+
import p from "../_virtual/dynamic-import-helper.js";
|
|
2
|
+
import { useTranslation as a } from "react-i18next";
|
|
3
|
+
import { LRUCache as y } from "../helpers/LRUCache.js";
|
|
4
|
+
const P = "common", m = new y(50), c = ({ lng: e = "en", ns: o }) => {
|
|
5
|
+
let r = !0, n = !1, t;
|
|
6
6
|
const i = (async () => {
|
|
7
7
|
try {
|
|
8
|
-
t = (await
|
|
8
|
+
t = (await p(/* @__PURE__ */ Object.assign({ "./en/Company.AddBank.json": () => import("./en/Company.AddBank.json.js"), "./en/Company.Addresses.json": () => import("./en/Company.Addresses.json.js"), "./en/Company.AssignSignatory.json": () => import("./en/Company.AssignSignatory.json.js"), "./en/Company.BankAccount.json": () => import("./en/Company.BankAccount.json.js"), "./en/Company.DocumentList.json": () => import("./en/Company.DocumentList.json.js"), "./en/Company.FederalTaxes.json": () => import("./en/Company.FederalTaxes.json.js"), "./en/Company.Industry.json": () => import("./en/Company.Industry.json.js"), "./en/Company.Locations.json": () => import("./en/Company.Locations.json.js"), "./en/Company.OnboardingOverview.json": () => import("./en/Company.OnboardingOverview.json.js"), "./en/Company.PaySchedule.json": () => import("./en/Company.PaySchedule.json.js"), "./en/Company.SignatureForm.json": () => import("./en/Company.SignatureForm.json.js"), "./en/Company.StateTaxes.json": () => import("./en/Company.StateTaxes.json.js"), "./en/Contractor.Address.json": () => import("./en/Contractor.Address.json.js"), "./en/Contractor.ContractorList.json": () => import("./en/Contractor.ContractorList.json.js"), "./en/Contractor.NewHireReport.json": () => import("./en/Contractor.NewHireReport.json.js"), "./en/Contractor.PaymentMethod.json": () => import("./en/Contractor.PaymentMethod.json.js"), "./en/Contractor.Profile.json": () => import("./en/Contractor.Profile.json.js"), "./en/Contractor.Submit.json": () => import("./en/Contractor.Submit.json.js"), "./en/Employee.BankAccount.json": () => import("./en/Employee.BankAccount.json.js"), "./en/Employee.Compensation.json": () => import("./en/Employee.Compensation.json.js"), "./en/Employee.Deductions.json": () => import("./en/Employee.Deductions.json.js"), "./en/Employee.DocumentSigner.json": () => import("./en/Employee.DocumentSigner.json.js"), "./en/Employee.EmployeeList.json": () => import("./en/Employee.EmployeeList.json.js"), "./en/Employee.FederalTaxes.json": () => import("./en/Employee.FederalTaxes.json.js"), "./en/Employee.HomeAddress.json": () => import("./en/Employee.HomeAddress.json.js"), "./en/Employee.Landing.json": () => import("./en/Employee.Landing.json.js"), "./en/Employee.OnboardingSummary.json": () => import("./en/Employee.OnboardingSummary.json.js"), "./en/Employee.PaySchedules.json": () => import("./en/Employee.PaySchedules.json.js"), "./en/Employee.PaymentMethod.json": () => import("./en/Employee.PaymentMethod.json.js"), "./en/Employee.Profile.json": () => import("./en/Employee.Profile.json.js"), "./en/Employee.SplitPaycheck.json": () => import("./en/Employee.SplitPaycheck.json.js"), "./en/Employee.StateTaxes.json": () => import("./en/Employee.StateTaxes.json.js"), "./en/Employee.Taxes.json": () => import("./en/Employee.Taxes.json.js"), "./en/Payroll.PayrollBlocker.json": () => import("./en/Payroll.PayrollBlocker.json.js"), "./en/Payroll.PayrollConfiguration.json": () => import("./en/Payroll.PayrollConfiguration.json.js"), "./en/Payroll.PayrollEditEmployee.json": () => import("./en/Payroll.PayrollEditEmployee.json.js"), "./en/Payroll.PayrollFlow.json": () => import("./en/Payroll.PayrollFlow.json.js"), "./en/Payroll.PayrollHistory.json": () => import("./en/Payroll.PayrollHistory.json.js"), "./en/Payroll.PayrollLanding.json": () => import("./en/Payroll.PayrollLanding.json.js"), "./en/Payroll.PayrollList.json": () => import("./en/Payroll.PayrollList.json.js"), "./en/Payroll.PayrollOverview.json": () => import("./en/Payroll.PayrollOverview.json.js"), "./en/Payroll.PayrollReceipts.json": () => import("./en/Payroll.PayrollReceipts.json.js"), "./en/Payroll.PayrollSchedule.json": () => import("./en/Payroll.PayrollSchedule.json.js"), "./en/common.json": () => import("./en/common.json.js") }), `./${e}/${o}.json`, 3)).default, r = !1;
|
|
9
9
|
} catch {
|
|
10
|
-
|
|
10
|
+
n = !0, r = !1;
|
|
11
11
|
}
|
|
12
12
|
})();
|
|
13
13
|
return () => {
|
|
14
|
-
if (e)
|
|
15
|
-
throw i;
|
|
16
14
|
if (r)
|
|
15
|
+
throw i;
|
|
16
|
+
if (n)
|
|
17
17
|
throw new Error(`Error loading translation for component: ${o}`);
|
|
18
18
|
return t;
|
|
19
19
|
};
|
|
20
|
-
}, C = (
|
|
21
|
-
const { i18n: o } =
|
|
22
|
-
if (!
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
|
|
20
|
+
}, C = (e) => {
|
|
21
|
+
const { i18n: o } = a();
|
|
22
|
+
if (!e) return;
|
|
23
|
+
const r = Array.isArray(e) ? e : [e];
|
|
24
|
+
for (const n of r) {
|
|
25
|
+
const t = `${o.resolvedLanguage}:${n}`;
|
|
26
|
+
m.get(t) === null && m.put(t, c({ lng: o.resolvedLanguage, ns: n }));
|
|
27
|
+
const s = m.get(t);
|
|
28
|
+
if (s) {
|
|
29
|
+
const i = s();
|
|
30
|
+
o.addResourceBundle(
|
|
31
|
+
o.resolvedLanguage ?? "en",
|
|
32
|
+
n,
|
|
33
|
+
i,
|
|
34
|
+
!0,
|
|
35
|
+
!1
|
|
36
|
+
);
|
|
37
|
+
}
|
|
29
38
|
}
|
|
30
|
-
},
|
|
31
|
-
const { i18n:
|
|
39
|
+
}, f = (e, o) => {
|
|
40
|
+
const { i18n: r } = a();
|
|
32
41
|
if (o)
|
|
33
|
-
for (const
|
|
34
|
-
|
|
42
|
+
for (const n in o)
|
|
43
|
+
r.addResourceBundle(n, e, o[n], !0, !0);
|
|
35
44
|
};
|
|
36
45
|
export {
|
|
37
46
|
P as defaultNS,
|
|
38
|
-
|
|
47
|
+
f as useComponentDictionary,
|
|
39
48
|
C as useI18n
|
|
40
49
|
};
|
|
41
50
|
//# sourceMappingURL=I18n.js.map
|