@gusto/embedded-react-sdk 0.46.0 → 0.46.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +117 -0
- package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -1
- package/dist/components/Common/DataView/DataCards/DataCards.js +14 -13
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
- package/dist/components/Common/DataView/DataTable/DataTable.js +85 -80
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js +8 -0
- package/dist/components/Common/DataView/DataTable/DataTable.module.scss.js.map +1 -0
- package/dist/components/Common/DataView/DataView.d.ts +1 -0
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Common/DataView/useDataView.d.ts +10 -1
- package/dist/components/Common/DataView/useDataView.js +20 -17
- package/dist/components/Common/DataView/useDataView.js.map +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.js +10 -10
- package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +9 -9
- package/dist/components/Common/PaginationControl/PaginationControl.js +11 -10
- package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js +11 -10
- package/dist/components/Common/UI/DescriptionList/DescriptionList.js.map +1 -1
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +4 -4
- package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -1
- package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js +51 -48
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Common/VisuallyHidden/VisuallyHidden.d.ts +1 -1
- package/dist/components/Common/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/shared/useSignCompanyForm/fields.js +4 -4
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +5 -6
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/fields.js +5 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +5 -6
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +33 -34
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.d.ts +9 -0
- package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.js +76 -0
- package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.js.map +1 -0
- package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.module.scss.js +8 -0
- package/dist/components/Employee/Compensation/management/AddAnotherJob/AddAnotherJob.module.scss.js.map +1 -0
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js +60 -202
- package/dist/components/Employee/Compensation/management/EditCompensation/EditCompensation.js.map +1 -1
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.d.ts +25 -0
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js +79 -0
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.js.map +1 -0
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.module.scss.js +8 -0
- package/dist/components/Employee/Compensation/management/EditPendingCompensation/EditPendingCompensation.module.scss.js.map +1 -0
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.d.ts +18 -0
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js +171 -0
- package/dist/components/Employee/Compensation/management/ManagementCompensationFormBody.js.map +1 -0
- package/dist/components/Employee/Compensation/management/index.d.ts +3 -0
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.d.ts +6 -1
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js +67 -209
- package/dist/components/Employee/Compensation/onboarding/EditCompensation/EditCompensation.js.map +1 -1
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js +36 -36
- package/dist/components/Employee/Compensation/onboarding/JobsList/JobsListPresentation.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.d.ts +18 -0
- package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js +169 -0
- package/dist/components/Employee/Compensation/shared/AddCompensationFormBody.js.map +1 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.d.ts +16 -0
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js +36 -30
- package/dist/components/Employee/Compensation/shared/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.d.ts +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js +4 -4
- package/dist/components/Employee/Compensation/shared/useCompensationForm/fields.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js +213 -191
- package/dist/components/Employee/Compensation/shared/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/Employee/Compensation/shared/useJobForm/fields.js +6 -6
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.d.ts +6 -5
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +162 -131
- package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
- package/dist/components/Employee/Dashboard/BasicDetailsView.js +74 -88
- package/dist/components/Employee/Dashboard/BasicDetailsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/Dashboard.js +86 -72
- package/dist/components/Employee/Dashboard/Dashboard.js.map +1 -1
- package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +3 -3
- package/dist/components/Employee/Dashboard/DashboardComponents.js +138 -101
- package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
- package/dist/components/Employee/Dashboard/DocumentsView.js +17 -10
- package/dist/components/Employee/Dashboard/DocumentsView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.js +359 -313
- package/dist/components/Employee/Dashboard/JobAndPayView.js.map +1 -1
- package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js +5 -3
- package/dist/components/Employee/Dashboard/JobAndPayView.module.scss.js.map +1 -1
- package/dist/components/Employee/Dashboard/TaxesView.js +114 -101
- package/dist/components/Employee/Dashboard/TaxesView.js.map +1 -1
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js +147 -148
- package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.d.ts +6 -0
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js +37 -36
- package/dist/components/Employee/Dashboard/getPendingCompensationChanges.js.map +1 -1
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.d.ts +2 -2
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js +34 -35
- package/dist/components/Employee/Dashboard/hooks/useEmployeeCompensation.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js +57 -57
- package/dist/components/Employee/Deductions/DeductionsForm/StandardDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.d.ts +14 -5
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js +55 -36
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/childSupportGarnishmentFormSchema.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/fields.js +8 -8
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js +18 -18
- package/dist/components/Employee/Deductions/shared/useChildSupportGarnishmentForm/useChildSupportGarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/shared/useDeductionForm/fields.js +4 -4
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.d.ts +3 -3
- package/dist/components/Employee/Deductions/shared/useDeductionForm/useDeductionForm.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/Documents/shared/useSignEmployeeForm/fields.js +1 -1
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js +37 -40
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.d.ts +1 -2
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js +64 -71
- package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -1
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.d.ts +2 -0
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js +25 -0
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlow.js.map +1 -0
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.d.ts +13 -0
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js +37 -0
- package/dist/components/Employee/EmployeeListFlow/EmployeeListFlowComponents.js.map +1 -0
- package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.d.ts +6 -0
- package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js +69 -0
- package/dist/components/Employee/EmployeeListFlow/employeeListStateMachine.js.map +1 -0
- package/dist/components/Employee/EmployeeListFlow/index.d.ts +3 -0
- package/dist/components/Employee/FederalTaxes/shared/useFederalTaxesForm/fields.js +4 -4
- package/dist/components/Employee/HomeAddress/management/HomeAddress.js +15 -12
- package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.d.ts +2 -1
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +170 -157
- package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -1
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +56 -55
- package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +20 -20
- package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useBankForm/fields.js +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.d.ts +1 -1
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js +4 -4
- package/dist/components/Employee/PaymentMethod/shared/useSplitPaymentsForm/splitFieldFactory.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/fields.js +8 -8
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js +5 -5
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.d.ts +0 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js +11 -12
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/homeAddressSchema.test.d.ts +1 -0
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +6 -1
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +95 -94
- package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/fields.js +4 -4
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.d.ts +6 -1
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +87 -86
- package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js +18 -18
- package/dist/components/Employee/StateTaxes/shared/EmployeeStateTaxesView.js.map +1 -1
- package/dist/components/Employee/StateTaxes/shared/useEmployeeStateTaxesForm/fieldComponents.js +8 -8
- package/dist/components/Employee/Taxes/useTaxes.js +3 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddress.js +14 -11
- package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.d.ts +2 -1
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +96 -89
- package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -1
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +61 -60
- package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -1
- package/dist/components/Employee/exports/employeeManagement.d.ts +2 -0
- package/dist/components/Employee/exports/employeeManagement.js +18 -16
- package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
- package/dist/components/Employee/index.d.ts +2 -0
- package/dist/components/Employee/index.js +32 -30
- package/dist/components/Employee/index.js.map +1 -1
- package/dist/components/Flow/FlowHeader.js +34 -31
- package/dist/components/Flow/FlowHeader.js.map +1 -1
- package/dist/components/Flow/useFlow.d.ts +12 -0
- package/dist/components/Flow/useFlow.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +2 -3
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +2 -3
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyList.js +92 -69
- package/dist/components/TimeOff/PolicyList/PolicyList.js.map +1 -1
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js +23 -23
- package/dist/components/TimeOff/PolicyList/PolicyListPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js +73 -56
- package/dist/components/TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +58 -58
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +91 -87
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormTypes.d.ts +2 -0
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +91 -125
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +60 -91
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.module.scss.js +4 -4
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +0 -16
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +139 -225
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.d.ts +7 -3
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +78 -54
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -1
- package/dist/components/TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.test.d.ts +1 -0
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js +12 -11
- package/dist/components/TimeOff/TimeOffPolicyDetail/EditEmployeeBalanceModal.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js +177 -147
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetail.js.map +1 -1
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js +34 -34
- package/dist/components/TimeOff/TimeOffPolicyDetail/TimeOffPolicyDetailPresentation.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.d.ts +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js +38 -36
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -1
- package/dist/components/TimeOff/shared/EmployeeTable/EmployeeTableTypes.d.ts +2 -0
- package/dist/helpers/breadcrumbHelpers.d.ts +1 -1
- package/dist/helpers/breadcrumbHelpers.js.map +1 -1
- package/dist/helpers/federalEin.d.ts +1 -0
- package/dist/helpers/federalEin.js.map +1 -1
- package/dist/helpers/mask.d.ts +8 -4
- package/dist/helpers/mask.js.map +1 -1
- package/dist/helpers/rem.d.ts +2 -1
- package/dist/helpers/rem.js.map +1 -1
- package/dist/hooks/useAsyncError.d.ts +1 -0
- package/dist/hooks/useAsyncError.js.map +1 -1
- package/dist/hooks/useForkRef/useForkRef.d.ts +1 -0
- package/dist/hooks/useForkRef/useForkRef.js.map +1 -1
- package/dist/i18n/I18n.d.ts +9 -1
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +14 -14
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +16 -22
- package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +17 -15
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -1
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +9 -9
- package/dist/i18n/en/Employee.Compensation.json.js +66 -58
- package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
- package/dist/i18n/en/Employee.Dashboard.json.js +28 -24
- package/dist/i18n/en/Employee.Dashboard.json.js.map +1 -1
- package/dist/i18n/en/Employee.HomeAddress.Management.json.js +12 -10
- package/dist/i18n/en/Employee.HomeAddress.Management.json.js.map +1 -1
- package/dist/i18n/en/Employee.ManagementEmployeeList.json.js +32 -30
- package/dist/i18n/en/Employee.ManagementEmployeeList.json.js.map +1 -1
- package/dist/i18n/en/Employee.PaymentMethod.json.js +25 -25
- package/dist/i18n/en/Employee.StateTaxes.json.js +12 -10
- package/dist/i18n/en/Employee.StateTaxes.json.js.map +1 -1
- package/dist/i18n/en/Employee.WorkAddress.Management.json.js +16 -14
- package/dist/i18n/en/Employee.WorkAddress.Management.json.js.map +1 -1
- package/dist/i18n/en/common.json.d.ts +14 -0
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +33 -32
- package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
- package/dist/partner-hook-utils/types.d.ts +4 -0
- package/dist/shared/constants.d.ts +2 -0
- package/dist/shared/constants.js +13 -12
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/hooks.d.ts +1 -1
- package/dist/types/i18next.d.ts +30 -29
- package/dist/types/observability.d.ts +1 -1
- package/docs/reference/endpoint-inventory.json +24 -8
- package/package.json +30 -27
- package/dist/components/Employee/Dashboard/CompensationCard.d.ts +0 -13
|
@@ -10,6 +10,7 @@ export type DataViewProps<T> = {
|
|
|
10
10
|
onSelect?: useDataViewPropReturn<T>['onSelect'];
|
|
11
11
|
onSelectAll?: useDataViewPropReturn<T>['onSelectAll'];
|
|
12
12
|
getIsItemSelected?: (item: T) => boolean;
|
|
13
|
+
hideSelectAll?: useDataViewPropReturn<T>['hideSelectAll'];
|
|
13
14
|
breakAt?: string;
|
|
14
15
|
breakpoints?: useContainerBreakpointsProps['breakpoints'];
|
|
15
16
|
footer?: useDataViewPropReturn<T>['footer'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataView.js","sources":["../../../../src/components/Common/DataView/DataView.tsx"],"sourcesContent":["import { useMemo, useRef } from 'react'\nimport { PaginationControl } from '../PaginationControl/PaginationControl'\nimport type { TableProps } from '../UI/Table/TableTypes'\nimport styles from './DataView.module.scss'\nimport { DataTable } from './DataTable/DataTable'\nimport type { useDataViewPropReturn, SelectionMode } from './useDataView'\nimport { DataCards } from './DataCards/DataCards'\nimport type { useContainerBreakpointsProps } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport useContainerBreakpoints from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\n\nexport type DataViewProps<T> = {\n columns: useDataViewPropReturn<T>['columns']\n data: T[]\n pagination?: useDataViewPropReturn<T>['pagination']\n label: string\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n onSelectAll?: useDataViewPropReturn<T>['onSelectAll']\n getIsItemSelected?: (item: T) => boolean\n breakAt?: string\n breakpoints?: useContainerBreakpointsProps['breakpoints']\n footer?: useDataViewPropReturn<T>['footer']\n isFetching?: boolean\n isWithinBox?: TableProps['isWithinBox']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n selectionMode?: SelectionMode\n}\n\nexport const DataView = <T,>({\n pagination,\n isFetching,\n breakAt = 'small',\n breakpoints: customBreakpoints,\n footer,\n isWithinBox,\n emptyState,\n selectionMode,\n onSelectAll,\n ...dataViewProps\n}: DataViewProps<T>) => {\n const containerRef = useRef<HTMLElement | null>(null)\n const breakpoints = useContainerBreakpoints({\n ref: containerRef,\n breakpoints: customBreakpoints,\n })\n\n // Wait for breakpoints to be detected before rendering\n const isBreakpointsDetected = breakpoints.length > 0\n const isMobile = !breakpoints.includes(breakAt)\n\n const Component = useMemo(() => {\n return isMobile ? DataCards : DataTable\n }, [isMobile])\n\n return (\n <div\n data-testid=\"data-view\"\n className={styles.dataViewContainer}\n ref={ref => {\n containerRef.current = ref\n }}\n >\n {isBreakpointsDetected && (\n <Component\n {...dataViewProps}\n onSelectAll={onSelectAll}\n footer={footer}\n isWithinBox={isWithinBox}\n emptyState={emptyState}\n selectionMode={selectionMode}\n />\n )}\n {pagination && <PaginationControl {...pagination} isFetching={isFetching} />}\n </div>\n )\n}\n"],"names":["DataView","pagination","isFetching","breakAt","customBreakpoints","footer","isWithinBox","emptyState","selectionMode","onSelectAll","dataViewProps","containerRef","useRef","breakpoints","useContainerBreakpoints","isBreakpointsDetected","isMobile","Component","useMemo","DataCards","DataTable","jsxs","styles","ref","jsx","PaginationControl"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"DataView.js","sources":["../../../../src/components/Common/DataView/DataView.tsx"],"sourcesContent":["import { useMemo, useRef } from 'react'\nimport { PaginationControl } from '../PaginationControl/PaginationControl'\nimport type { TableProps } from '../UI/Table/TableTypes'\nimport styles from './DataView.module.scss'\nimport { DataTable } from './DataTable/DataTable'\nimport type { useDataViewPropReturn, SelectionMode } from './useDataView'\nimport { DataCards } from './DataCards/DataCards'\nimport type { useContainerBreakpointsProps } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport useContainerBreakpoints from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\n\nexport type DataViewProps<T> = {\n columns: useDataViewPropReturn<T>['columns']\n data: T[]\n pagination?: useDataViewPropReturn<T>['pagination']\n label: string\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n onSelectAll?: useDataViewPropReturn<T>['onSelectAll']\n getIsItemSelected?: (item: T) => boolean\n hideSelectAll?: useDataViewPropReturn<T>['hideSelectAll']\n breakAt?: string\n breakpoints?: useContainerBreakpointsProps['breakpoints']\n footer?: useDataViewPropReturn<T>['footer']\n isFetching?: boolean\n isWithinBox?: TableProps['isWithinBox']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n selectionMode?: SelectionMode\n}\n\nexport const DataView = <T,>({\n pagination,\n isFetching,\n breakAt = 'small',\n breakpoints: customBreakpoints,\n footer,\n isWithinBox,\n emptyState,\n selectionMode,\n onSelectAll,\n ...dataViewProps\n}: DataViewProps<T>) => {\n const containerRef = useRef<HTMLElement | null>(null)\n const breakpoints = useContainerBreakpoints({\n ref: containerRef,\n breakpoints: customBreakpoints,\n })\n\n // Wait for breakpoints to be detected before rendering\n const isBreakpointsDetected = breakpoints.length > 0\n const isMobile = !breakpoints.includes(breakAt)\n\n const Component = useMemo(() => {\n return isMobile ? DataCards : DataTable\n }, [isMobile])\n\n return (\n <div\n data-testid=\"data-view\"\n className={styles.dataViewContainer}\n ref={ref => {\n containerRef.current = ref\n }}\n >\n {isBreakpointsDetected && (\n <Component\n {...dataViewProps}\n onSelectAll={onSelectAll}\n footer={footer}\n isWithinBox={isWithinBox}\n emptyState={emptyState}\n selectionMode={selectionMode}\n />\n )}\n {pagination && <PaginationControl {...pagination} isFetching={isFetching} />}\n </div>\n )\n}\n"],"names":["DataView","pagination","isFetching","breakAt","customBreakpoints","footer","isWithinBox","emptyState","selectionMode","onSelectAll","dataViewProps","containerRef","useRef","breakpoints","useContainerBreakpoints","isBreakpointsDetected","isMobile","Component","useMemo","DataCards","DataTable","jsxs","styles","ref","jsx","PaginationControl"],"mappings":";;;;;;;AA6BO,MAAMA,IAAW,CAAK;AAAA,EAC3B,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,aAAaC;AAAA,EACb,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,aAAAC;AAAA,EACA,GAAGC;AACL,MAAwB;AACtB,QAAMC,IAAeC,EAA2B,IAAI,GAC9CC,IAAcC,EAAwB;AAAA,IAC1C,KAAKH;AAAA,IACL,aAAaP;AAAA,EAAA,CACd,GAGKW,IAAwBF,EAAY,SAAS,GAC7CG,IAAW,CAACH,EAAY,SAASV,CAAO,GAExCc,IAAYC,EAAQ,MACjBF,IAAWG,IAAYC,GAC7B,CAACJ,CAAQ,CAAC;AAEb,SACE,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,WAAWC,EAAO;AAAA,MAClB,KAAK,CAAAC,MAAO;AACV,QAAAZ,EAAa,UAAUY;AAAA,MACzB;AAAA,MAEC,UAAA;AAAA,QAAAR,KACC,gBAAAS;AAAA,UAACP;AAAA,UAAA;AAAA,YACE,GAAGP;AAAA,YACJ,aAAAD;AAAA,YACA,QAAAJ;AAAA,YACA,aAAAC;AAAA,YACA,YAAAC;AAAA,YACA,eAAAC;AAAA,UAAA;AAAA,QAAA;AAAA,QAGHP,KAAc,gBAAAuB,EAACC,GAAA,EAAmB,GAAGxB,GAAY,YAAAC,EAAA,CAAwB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGhF;"}
|
|
@@ -4,10 +4,12 @@ type DataViewColumn<T> = {
|
|
|
4
4
|
key: keyof T;
|
|
5
5
|
title: string | React.ReactNode;
|
|
6
6
|
render?: (item: T) => React.ReactNode;
|
|
7
|
+
justify?: 'start' | 'end';
|
|
7
8
|
} | {
|
|
8
9
|
key?: string;
|
|
9
10
|
title: string | React.ReactNode;
|
|
10
11
|
render: (item: T) => React.ReactNode;
|
|
12
|
+
justify?: 'start' | 'end';
|
|
11
13
|
};
|
|
12
14
|
type FooterKeys<T> = keyof T | string;
|
|
13
15
|
type BaseDataViewProps<T> = {
|
|
@@ -18,6 +20,12 @@ type BaseDataViewProps<T> = {
|
|
|
18
20
|
emptyState?: () => React.ReactNode;
|
|
19
21
|
footer?: () => Partial<Record<FooterKeys<T>, React.ReactNode>>;
|
|
20
22
|
isFetching?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* When true, hides the select-all header checkbox (DataTable) and the
|
|
25
|
+
* select-all row (DataCards). Only meaningful with `selectionMode: 'multiple'`.
|
|
26
|
+
* Per-row checkboxes are unaffected.
|
|
27
|
+
*/
|
|
28
|
+
hideSelectAll?: boolean;
|
|
21
29
|
};
|
|
22
30
|
type NoSelectionProps = {
|
|
23
31
|
onSelect?: undefined;
|
|
@@ -56,10 +64,11 @@ export type useDataViewPropReturn<T> = {
|
|
|
56
64
|
onSelect?: (item: T, checked: boolean) => void;
|
|
57
65
|
onSelectAll?: (checked: boolean, visibleData: T[]) => void;
|
|
58
66
|
getIsItemSelected?: (item: T) => boolean;
|
|
67
|
+
hideSelectAll?: boolean;
|
|
59
68
|
emptyState?: () => React.ReactNode;
|
|
60
69
|
footer?: () => Partial<Record<FooterKeys<T>, React.ReactNode>>;
|
|
61
70
|
isFetching?: boolean;
|
|
62
71
|
selectionMode?: SelectionMode;
|
|
63
72
|
};
|
|
64
|
-
export declare const useDataView: <T>({ columns, data, itemMenu, onSelect, onSelectAll, getIsItemSelected, pagination, emptyState, footer, isFetching, selectionMode, }: useDataViewProp<T>) => useDataViewPropReturn<T>;
|
|
73
|
+
export declare const useDataView: <T>({ columns, data, itemMenu, onSelect, onSelectAll, getIsItemSelected, hideSelectAll, pagination, emptyState, footer, isFetching, selectionMode, }: useDataViewProp<T>) => useDataViewPropReturn<T>;
|
|
65
74
|
export {};
|
|
@@ -1,42 +1,45 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
const
|
|
1
|
+
import { useMemo as j } from "react";
|
|
2
|
+
const q = ({
|
|
3
3
|
columns: r,
|
|
4
4
|
data: w,
|
|
5
5
|
itemMenu: V,
|
|
6
6
|
onSelect: p,
|
|
7
7
|
onSelectAll: s,
|
|
8
8
|
getIsItemSelected: u,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
hideSelectAll: P,
|
|
10
|
+
pagination: a,
|
|
11
|
+
emptyState: x,
|
|
12
|
+
footer: D,
|
|
13
|
+
isFetching: b,
|
|
14
|
+
selectionMode: f
|
|
15
|
+
}) => j(() => ({
|
|
16
|
+
pagination: a,
|
|
16
17
|
data: w,
|
|
17
18
|
columns: r,
|
|
18
19
|
itemMenu: V,
|
|
19
20
|
onSelect: p,
|
|
20
21
|
onSelectAll: s,
|
|
21
22
|
getIsItemSelected: u,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
hideSelectAll: P,
|
|
24
|
+
emptyState: x,
|
|
25
|
+
footer: D,
|
|
26
|
+
isFetching: b,
|
|
27
|
+
selectionMode: f
|
|
26
28
|
}), [
|
|
27
|
-
|
|
29
|
+
a,
|
|
28
30
|
w,
|
|
29
31
|
r,
|
|
30
32
|
V,
|
|
31
33
|
p,
|
|
32
34
|
s,
|
|
33
35
|
u,
|
|
34
|
-
|
|
36
|
+
P,
|
|
35
37
|
x,
|
|
36
38
|
D,
|
|
37
|
-
b
|
|
39
|
+
b,
|
|
40
|
+
f
|
|
38
41
|
]);
|
|
39
42
|
export {
|
|
40
|
-
|
|
43
|
+
q as useDataView
|
|
41
44
|
};
|
|
42
45
|
//# sourceMappingURL=useDataView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDataView.js","sources":["../../../../src/components/Common/DataView/useDataView.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\nexport type SelectionMode = 'multiple' | 'single'\n\ntype DataViewColumn<T> =\n | {\n key: keyof T\n title: string | React.ReactNode\n render?: (item: T) => React.ReactNode\n }\n | {\n key?: string\n title: string | React.ReactNode\n render: (item: T) => React.ReactNode\n }\n\ntype FooterKeys<T> = keyof T | string\n\ntype BaseDataViewProps<T> = {\n columns: DataViewColumn<T>[]\n data: T[]\n pagination?: PaginationControlProps\n itemMenu?: (item: T) => React.ReactNode\n emptyState?: () => React.ReactNode\n footer?: () => Partial<Record<FooterKeys<T>, React.ReactNode>>\n isFetching?: boolean\n}\n\ntype NoSelectionProps = {\n onSelect?: undefined\n onSelectAll?: undefined\n getIsItemSelected?: undefined\n selectionMode?: undefined\n}\n\ntype SingleSelectionProps<T> = {\n selectionMode: 'single'\n onSelect: (item: T, checked: boolean) => void\n onSelectAll?: undefined\n getIsItemSelected?: (item: T) => boolean\n}\n\ntype MultipleSelectionProps<T> = {\n selectionMode?: 'multiple'\n onSelect: (item: T, checked: boolean) => void\n /**\n * Called when the select-all checkbox is toggled.\n * The header checkbox state reflects only the currently visible `data` array.\n * With pagination, consumers decide whether to select all data or only the visible page.\n * `visibleData` is the current page's data array for reference.\n */\n onSelectAll?: (checked: boolean, visibleData: T[]) => void\n /**\n * Required for multi-select. Returns whether a given item is currently selected.\n * Use a stable identifier from the item (e.g. item.id) rather than array index.\n */\n getIsItemSelected: (item: T) => boolean\n}\n\nexport type useDataViewProp<T> = BaseDataViewProps<T> &\n (NoSelectionProps | SingleSelectionProps<T> | MultipleSelectionProps<T>)\n\nexport type useDataViewPropReturn<T> = {\n pagination?: PaginationControlProps\n data: T[]\n columns: DataViewColumn<T>[]\n itemMenu?: (item: T) => React.ReactNode\n onSelect?: (item: T, checked: boolean) => void\n onSelectAll?: (checked: boolean, visibleData: T[]) => void\n getIsItemSelected?: (item: T) => boolean\n emptyState?: () => React.ReactNode\n footer?: () => Partial<Record<FooterKeys<T>, React.ReactNode>>\n isFetching?: boolean\n selectionMode?: SelectionMode\n}\n\nexport const useDataView = <T>({\n columns,\n data,\n itemMenu,\n onSelect,\n onSelectAll,\n getIsItemSelected,\n pagination,\n emptyState,\n footer,\n isFetching,\n selectionMode,\n}: useDataViewProp<T>): useDataViewPropReturn<T> => {\n const dataViewProps = useMemo(() => {\n return {\n pagination,\n data,\n columns,\n itemMenu,\n onSelect,\n onSelectAll,\n getIsItemSelected,\n emptyState,\n footer,\n isFetching,\n selectionMode,\n }\n }, [\n pagination,\n data,\n columns,\n itemMenu,\n onSelect,\n onSelectAll,\n getIsItemSelected,\n emptyState,\n footer,\n isFetching,\n selectionMode,\n ])\n\n return dataViewProps\n}\n"],"names":["useDataView","columns","data","itemMenu","onSelect","onSelectAll","getIsItemSelected","pagination","emptyState","footer","isFetching","selectionMode","useMemo"],"mappings":";
|
|
1
|
+
{"version":3,"file":"useDataView.js","sources":["../../../../src/components/Common/DataView/useDataView.ts"],"sourcesContent":["import { useMemo } from 'react'\nimport type { PaginationControlProps } from '@/components/Common/PaginationControl/PaginationControlTypes'\n\nexport type SelectionMode = 'multiple' | 'single'\n\ntype DataViewColumn<T> =\n | {\n key: keyof T\n title: string | React.ReactNode\n render?: (item: T) => React.ReactNode\n justify?: 'start' | 'end'\n }\n | {\n key?: string\n title: string | React.ReactNode\n render: (item: T) => React.ReactNode\n justify?: 'start' | 'end'\n }\n\ntype FooterKeys<T> = keyof T | string\n\ntype BaseDataViewProps<T> = {\n columns: DataViewColumn<T>[]\n data: T[]\n pagination?: PaginationControlProps\n itemMenu?: (item: T) => React.ReactNode\n emptyState?: () => React.ReactNode\n footer?: () => Partial<Record<FooterKeys<T>, React.ReactNode>>\n isFetching?: boolean\n /**\n * When true, hides the select-all header checkbox (DataTable) and the\n * select-all row (DataCards). Only meaningful with `selectionMode: 'multiple'`.\n * Per-row checkboxes are unaffected.\n */\n hideSelectAll?: boolean\n}\n\ntype NoSelectionProps = {\n onSelect?: undefined\n onSelectAll?: undefined\n getIsItemSelected?: undefined\n selectionMode?: undefined\n}\n\ntype SingleSelectionProps<T> = {\n selectionMode: 'single'\n onSelect: (item: T, checked: boolean) => void\n onSelectAll?: undefined\n getIsItemSelected?: (item: T) => boolean\n}\n\ntype MultipleSelectionProps<T> = {\n selectionMode?: 'multiple'\n onSelect: (item: T, checked: boolean) => void\n /**\n * Called when the select-all checkbox is toggled.\n * The header checkbox state reflects only the currently visible `data` array.\n * With pagination, consumers decide whether to select all data or only the visible page.\n * `visibleData` is the current page's data array for reference.\n */\n onSelectAll?: (checked: boolean, visibleData: T[]) => void\n /**\n * Required for multi-select. Returns whether a given item is currently selected.\n * Use a stable identifier from the item (e.g. item.id) rather than array index.\n */\n getIsItemSelected: (item: T) => boolean\n}\n\nexport type useDataViewProp<T> = BaseDataViewProps<T> &\n (NoSelectionProps | SingleSelectionProps<T> | MultipleSelectionProps<T>)\n\nexport type useDataViewPropReturn<T> = {\n pagination?: PaginationControlProps\n data: T[]\n columns: DataViewColumn<T>[]\n itemMenu?: (item: T) => React.ReactNode\n onSelect?: (item: T, checked: boolean) => void\n onSelectAll?: (checked: boolean, visibleData: T[]) => void\n getIsItemSelected?: (item: T) => boolean\n hideSelectAll?: boolean\n emptyState?: () => React.ReactNode\n footer?: () => Partial<Record<FooterKeys<T>, React.ReactNode>>\n isFetching?: boolean\n selectionMode?: SelectionMode\n}\n\nexport const useDataView = <T>({\n columns,\n data,\n itemMenu,\n onSelect,\n onSelectAll,\n getIsItemSelected,\n hideSelectAll,\n pagination,\n emptyState,\n footer,\n isFetching,\n selectionMode,\n}: useDataViewProp<T>): useDataViewPropReturn<T> => {\n const dataViewProps = useMemo(() => {\n return {\n pagination,\n data,\n columns,\n itemMenu,\n onSelect,\n onSelectAll,\n getIsItemSelected,\n hideSelectAll,\n emptyState,\n footer,\n isFetching,\n selectionMode,\n }\n }, [\n pagination,\n data,\n columns,\n itemMenu,\n onSelect,\n onSelectAll,\n getIsItemSelected,\n hideSelectAll,\n emptyState,\n footer,\n isFetching,\n selectionMode,\n ])\n\n return dataViewProps\n}\n"],"names":["useDataView","columns","data","itemMenu","onSelect","onSelectAll","getIsItemSelected","hideSelectAll","pagination","emptyState","footer","isFetching","selectionMode","useMemo"],"mappings":";AAsFO,MAAMA,IAAc,CAAI;AAAA,EAC7B,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,QAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AACF,MACwBC,EAAQ,OACrB;AAAA,EACL,YAAAL;AAAA,EACA,MAAAN;AAAA,EACA,SAAAD;AAAA,EACA,UAAAE;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAE;AAAA,EACA,QAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AAAA,IAED;AAAA,EACDJ;AAAA,EACAN;AAAA,EACAD;AAAA,EACAE;AAAA,EACAC;AAAA,EACAC;AAAA,EACAC;AAAA,EACAC;AAAA,EACAE;AAAA,EACAC;AAAA,EACAC;AAAA,EACAC;AAAA,CACD;"}
|
|
@@ -5,8 +5,8 @@ import n from "./DocumentViewer.module.scss.js";
|
|
|
5
5
|
import h from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
|
|
6
6
|
import { useComponentContext as u } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
7
|
function k({
|
|
8
|
-
url:
|
|
9
|
-
title:
|
|
8
|
+
url: r,
|
|
9
|
+
title: a,
|
|
10
10
|
downloadInstructions: m,
|
|
11
11
|
viewDocumentLabel: d,
|
|
12
12
|
headingLevel: l = "h3"
|
|
@@ -14,17 +14,17 @@ function k({
|
|
|
14
14
|
const o = u(), t = p(null), f = h({
|
|
15
15
|
ref: t
|
|
16
16
|
}).includes("small");
|
|
17
|
-
if (!
|
|
17
|
+
if (!r) return null;
|
|
18
18
|
const c = {
|
|
19
|
-
src: `${
|
|
20
|
-
title:
|
|
19
|
+
src: `${r}#toolbar=0&navpanes=0`,
|
|
20
|
+
title: a,
|
|
21
21
|
type: "application/pdf"
|
|
22
22
|
};
|
|
23
|
-
return /* @__PURE__ */ e("div", { className: n.container, ref: t, children: f ? /* @__PURE__ */ e("embed", { ...c, className: n.embedPdf }) : /* @__PURE__ */ e("div", { className: n.smallEmbedPdfContainer, children: /* @__PURE__ */ s(i, { gap: 20, children: [
|
|
24
|
-
/* @__PURE__ */ e("embed", { ...c, className: n.smallEmbedPdf }),
|
|
23
|
+
return /* @__PURE__ */ e("div", { className: n.container, ref: t, children: f ? /* @__PURE__ */ e("embed", { ...c, className: n.embedPdf }, r) : /* @__PURE__ */ e("div", { className: n.smallEmbedPdfContainer, children: /* @__PURE__ */ s(i, { gap: 20, children: [
|
|
24
|
+
/* @__PURE__ */ e("embed", { ...c, className: n.smallEmbedPdf }, r),
|
|
25
25
|
/* @__PURE__ */ s(i, { flexDirection: "column", gap: 8, children: [
|
|
26
26
|
/* @__PURE__ */ s("div", { children: [
|
|
27
|
-
|
|
27
|
+
a && /* @__PURE__ */ e(o.Heading, { as: l, className: n.heading, children: a }),
|
|
28
28
|
m && /* @__PURE__ */ e(o.Text, { className: n.downloadInstructions, children: m })
|
|
29
29
|
] }),
|
|
30
30
|
/* @__PURE__ */ e(
|
|
@@ -32,10 +32,10 @@ function k({
|
|
|
32
32
|
{
|
|
33
33
|
className: "react-aria-Button",
|
|
34
34
|
"data-variant": "secondary",
|
|
35
|
-
href:
|
|
35
|
+
href: r,
|
|
36
36
|
target: "_blank",
|
|
37
37
|
rel: "noopener noreferrer",
|
|
38
|
-
download: `${
|
|
38
|
+
download: `${a || "document"}.pdf`,
|
|
39
39
|
children: d
|
|
40
40
|
}
|
|
41
41
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentViewer.js","sources":["../../../../src/components/Common/DocumentViewer/DocumentViewer.tsx"],"sourcesContent":["import { useRef } from 'react'\nimport { Flex } from '../Flex/Flex'\nimport styles from './DocumentViewer.module.scss'\nimport { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\ninterface DocumentViewerProps {\n url?: string | null\n title?: string\n downloadInstructions?: string\n viewDocumentLabel: string\n headingLevel?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n}\n\nexport function DocumentViewer({\n url,\n title,\n downloadInstructions,\n viewDocumentLabel,\n headingLevel = 'h3',\n}: DocumentViewerProps) {\n const Components = useComponentContext()\n const containerRef = useRef<HTMLDivElement>(null)\n const matches = useContainerBreakpoints({\n ref: containerRef,\n })\n\n const isContainerWidthSmallOrGreater = matches.includes('small')\n\n if (!url) return null\n\n const commonEmbeddedPdfProps = {\n src: `${url}#toolbar=0&navpanes=0`,\n title,\n type: 'application/pdf',\n }\n\n return (\n <div className={styles.container} ref={containerRef}>\n {isContainerWidthSmallOrGreater ? (\n <embed {...commonEmbeddedPdfProps} className={styles.embedPdf} />\n ) : (\n <div className={styles.smallEmbedPdfContainer}>\n <Flex gap={20}>\n <embed {...commonEmbeddedPdfProps} className={styles.smallEmbedPdf} />\n <Flex flexDirection=\"column\" gap={8}>\n <div>\n {title && (\n <Components.Heading as={headingLevel} className={styles.heading}>\n {title}\n </Components.Heading>\n )}\n {downloadInstructions && (\n <Components.Text className={styles.downloadInstructions}>\n {downloadInstructions}\n </Components.Text>\n )}\n </div>\n <Components.Link\n className=\"react-aria-Button\"\n data-variant=\"secondary\"\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n download={`${title || 'document'}.pdf`}\n >\n {viewDocumentLabel}\n </Components.Link>\n </Flex>\n </Flex>\n </div>\n )}\n </div>\n )\n}\n"],"names":["DocumentViewer","url","title","downloadInstructions","viewDocumentLabel","headingLevel","Components","useComponentContext","containerRef","useRef","isContainerWidthSmallOrGreater","useContainerBreakpoints","commonEmbeddedPdfProps","jsx","styles","jsxs","Flex"],"mappings":";;;;;;AAaO,SAASA,EAAe;AAAA,EAC7B,KAAAC;AAAA,EACA,OAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,cAAAC,IAAe;AACjB,GAAwB;AACtB,QAAMC,IAAaC,EAAA,GACbC,IAAeC,EAAuB,IAAI,GAK1CC,IAJUC,EAAwB;AAAA,IACtC,KAAKH;AAAA,EAAA,CACN,EAE8C,SAAS,OAAO;AAE/D,MAAI,CAACP,EAAK,QAAO;AAEjB,QAAMW,IAAyB;AAAA,IAC7B,KAAK,GAAGX,CAAG;AAAA,IACX,OAAAC;AAAA,IACA,MAAM;AAAA,EAAA;
|
|
1
|
+
{"version":3,"file":"DocumentViewer.js","sources":["../../../../src/components/Common/DocumentViewer/DocumentViewer.tsx"],"sourcesContent":["import { useRef } from 'react'\nimport { Flex } from '../Flex/Flex'\nimport styles from './DocumentViewer.module.scss'\nimport { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\ninterface DocumentViewerProps {\n url?: string | null\n title?: string\n downloadInstructions?: string\n viewDocumentLabel: string\n headingLevel?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n}\n\nexport function DocumentViewer({\n url,\n title,\n downloadInstructions,\n viewDocumentLabel,\n headingLevel = 'h3',\n}: DocumentViewerProps) {\n const Components = useComponentContext()\n const containerRef = useRef<HTMLDivElement>(null)\n const matches = useContainerBreakpoints({\n ref: containerRef,\n })\n\n const isContainerWidthSmallOrGreater = matches.includes('small')\n\n if (!url) return null\n\n const commonEmbeddedPdfProps = {\n src: `${url}#toolbar=0&navpanes=0`,\n title,\n type: 'application/pdf',\n }\n\n // Keying the `<embed>` on the URL forces React to remount the element when\n // the URL changes (e.g. after signing replaces an unsigned PDF). Without\n // this, React reuses the existing DOM node, the browser's PDF plugin\n // doesn't reload the new src, and the viewer renders blank until a manual\n // reload.\n return (\n <div className={styles.container} ref={containerRef}>\n {isContainerWidthSmallOrGreater ? (\n <embed key={url} {...commonEmbeddedPdfProps} className={styles.embedPdf} />\n ) : (\n <div className={styles.smallEmbedPdfContainer}>\n <Flex gap={20}>\n <embed key={url} {...commonEmbeddedPdfProps} className={styles.smallEmbedPdf} />\n <Flex flexDirection=\"column\" gap={8}>\n <div>\n {title && (\n <Components.Heading as={headingLevel} className={styles.heading}>\n {title}\n </Components.Heading>\n )}\n {downloadInstructions && (\n <Components.Text className={styles.downloadInstructions}>\n {downloadInstructions}\n </Components.Text>\n )}\n </div>\n <Components.Link\n className=\"react-aria-Button\"\n data-variant=\"secondary\"\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n download={`${title || 'document'}.pdf`}\n >\n {viewDocumentLabel}\n </Components.Link>\n </Flex>\n </Flex>\n </div>\n )}\n </div>\n )\n}\n"],"names":["DocumentViewer","url","title","downloadInstructions","viewDocumentLabel","headingLevel","Components","useComponentContext","containerRef","useRef","isContainerWidthSmallOrGreater","useContainerBreakpoints","commonEmbeddedPdfProps","jsx","styles","jsxs","Flex"],"mappings":";;;;;;AAaO,SAASA,EAAe;AAAA,EAC7B,KAAAC;AAAA,EACA,OAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,cAAAC,IAAe;AACjB,GAAwB;AACtB,QAAMC,IAAaC,EAAA,GACbC,IAAeC,EAAuB,IAAI,GAK1CC,IAJUC,EAAwB;AAAA,IACtC,KAAKH;AAAA,EAAA,CACN,EAE8C,SAAS,OAAO;AAE/D,MAAI,CAACP,EAAK,QAAO;AAEjB,QAAMW,IAAyB;AAAA,IAC7B,KAAK,GAAGX,CAAG;AAAA,IACX,OAAAC;AAAA,IACA,MAAM;AAAA,EAAA;AAQR,SACE,gBAAAW,EAAC,OAAA,EAAI,WAAWC,EAAO,WAAW,KAAKN,GACpC,UAAAE,IACC,gBAAAG,EAAC,SAAA,EAAiB,GAAGD,GAAwB,WAAWE,EAAO,SAAA,GAAnDb,CAA6D,IAEzE,gBAAAY,EAAC,OAAA,EAAI,WAAWC,EAAO,wBACrB,UAAA,gBAAAC,EAACC,GAAA,EAAK,KAAK,IACT,UAAA;AAAA,IAAA,gBAAAH,EAAC,WAAiB,GAAGD,GAAwB,WAAWE,EAAO,iBAAnDb,CAAkE;AAAA,IAC9E,gBAAAc,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAD,EAAC,OAAA,EACE,UAAA;AAAA,QAAAb,KACC,gBAAAW,EAACP,EAAW,SAAX,EAAmB,IAAID,GAAc,WAAWS,EAAO,SACrD,UAAAZ,EAAA,CACH;AAAA,QAEDC,uBACEG,EAAW,MAAX,EAAgB,WAAWQ,EAAO,sBAChC,UAAAX,EAAA,CACH;AAAA,MAAA,GAEJ;AAAA,MACA,gBAAAU;AAAA,QAACP,EAAW;AAAA,QAAX;AAAA,UACC,WAAU;AAAA,UACV,gBAAa;AAAA,UACb,MAAML;AAAA,UACN,QAAO;AAAA,UACP,KAAI;AAAA,UACJ,UAAU,GAAGC,KAAS,UAAU;AAAA,UAE/B,UAAAE;AAAA,QAAA;AAAA,MAAA;AAAA,IACH,EAAA,CACF;AAAA,EAAA,EAAA,CACF,GACF,GAEJ;AAEJ;"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
const n = "
|
|
1
|
+
const n = "_container_19ba7_1", d = "_embedPdf_19ba7_4", a = "_smallEmbedPdfContainer_19ba7_10", e = "_smallEmbedPdf_19ba7_10", o = "_heading_19ba7_25", s = "_downloadInstructions_19ba7_28", t = {
|
|
2
2
|
container: n,
|
|
3
|
-
embedPdf:
|
|
4
|
-
smallEmbedPdfContainer:
|
|
5
|
-
smallEmbedPdf:
|
|
6
|
-
heading:
|
|
3
|
+
embedPdf: d,
|
|
4
|
+
smallEmbedPdfContainer: a,
|
|
5
|
+
smallEmbedPdf: e,
|
|
6
|
+
heading: o,
|
|
7
7
|
downloadInstructions: s
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
10
|
n as container,
|
|
11
11
|
t as default,
|
|
12
12
|
s as downloadInstructions,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
d as embedPdf,
|
|
14
|
+
o as heading,
|
|
15
|
+
e as smallEmbedPdf,
|
|
16
|
+
a as smallEmbedPdfContainer
|
|
17
17
|
};
|
|
18
18
|
//# sourceMappingURL=DocumentViewer.module.scss.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as n, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as f } from "react-i18next";
|
|
3
|
-
import { Flex as
|
|
3
|
+
import { Flex as v } from "../Flex/Flex.js";
|
|
4
4
|
import e from "./PaginationControl.module.scss.js";
|
|
5
5
|
import { useComponentContext as r } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
|
-
import
|
|
6
|
+
import h from "../../../assets/icons/pagination_first.svg.js";
|
|
7
7
|
import I from "../../../assets/icons/pagination_previous.svg.js";
|
|
8
8
|
import S from "../../../assets/icons/pagination_next.svg.js";
|
|
9
9
|
import x from "../../../assets/icons/pagination_last.svg.js";
|
|
@@ -15,13 +15,13 @@ const N = 5, L = (i) => i === void 0 ? !0 : i === 0 ? !1 : i > N, B = ({
|
|
|
15
15
|
isFetching: c,
|
|
16
16
|
handleFirstPage: m,
|
|
17
17
|
handlePreviousPage: p,
|
|
18
|
-
handleNextPage:
|
|
19
|
-
handleLastPage:
|
|
20
|
-
handleItemsPerPageChange:
|
|
18
|
+
handleNextPage: u,
|
|
19
|
+
handleLastPage: d,
|
|
20
|
+
handleItemsPerPageChange: g,
|
|
21
21
|
itemsPerPage: b = 5
|
|
22
22
|
}) => {
|
|
23
23
|
const { t: o } = f("common"), a = r();
|
|
24
|
-
return L(s) ? /* @__PURE__ */ n("section", { className: e.paginationControl, "data-testid": "pagination-control", children: /* @__PURE__ */ l(
|
|
24
|
+
return L(s) ? /* @__PURE__ */ n("section", { className: e.paginationControl, "data-testid": "pagination-control", children: /* @__PURE__ */ l(v, { justifyContent: "space-between", alignItems: "center", children: [
|
|
25
25
|
/* @__PURE__ */ n("div", { className: e.paginationControlCount, children: /* @__PURE__ */ n("section", { children: /* @__PURE__ */ n(
|
|
26
26
|
a.Select,
|
|
27
27
|
{
|
|
@@ -29,11 +29,12 @@ const N = 5, L = (i) => i === void 0 ? !0 : i === 0 ? !1 : i > N, B = ({
|
|
|
29
29
|
shouldVisuallyHideLabel: !0,
|
|
30
30
|
value: b.toString(),
|
|
31
31
|
onChange: (C) => {
|
|
32
|
-
|
|
32
|
+
g(Number(C));
|
|
33
33
|
},
|
|
34
34
|
options: [
|
|
35
35
|
{ value: "5", label: "5" },
|
|
36
36
|
{ value: "10", label: "10" },
|
|
37
|
+
{ value: "25", label: "25" },
|
|
37
38
|
{ value: "50", label: "50" }
|
|
38
39
|
]
|
|
39
40
|
}
|
|
@@ -46,7 +47,7 @@ const N = 5, L = (i) => i === void 0 ? !0 : i === 0 ? !1 : i > N, B = ({
|
|
|
46
47
|
"aria-label": o("icons.paginationFirst"),
|
|
47
48
|
isDisabled: i === 1,
|
|
48
49
|
onClick: m,
|
|
49
|
-
children: /* @__PURE__ */ n(
|
|
50
|
+
children: /* @__PURE__ */ n(h, {})
|
|
50
51
|
}
|
|
51
52
|
),
|
|
52
53
|
/* @__PURE__ */ n(
|
|
@@ -65,7 +66,7 @@ const N = 5, L = (i) => i === void 0 ? !0 : i === 0 ? !1 : i > N, B = ({
|
|
|
65
66
|
"aria-label": o("icons.paginationNext"),
|
|
66
67
|
"data-testid": "pagination-next",
|
|
67
68
|
isDisabled: i === t,
|
|
68
|
-
onClick:
|
|
69
|
+
onClick: u,
|
|
69
70
|
children: /* @__PURE__ */ n(S, {})
|
|
70
71
|
}
|
|
71
72
|
),
|
|
@@ -74,7 +75,7 @@ const N = 5, L = (i) => i === void 0 ? !0 : i === 0 ? !1 : i > N, B = ({
|
|
|
74
75
|
{
|
|
75
76
|
"aria-label": o("icons.paginationLast"),
|
|
76
77
|
isDisabled: i === t,
|
|
77
|
-
onClick:
|
|
78
|
+
onClick: d,
|
|
78
79
|
children: /* @__PURE__ */ n(x, {})
|
|
79
80
|
}
|
|
80
81
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaginationControl.js","sources":["../../../../src/components/Common/PaginationControl/PaginationControl.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '../Flex/Flex'\nimport { InlineSpinner } from '../InlineSpinner'\nimport style from './PaginationControl.module.scss'\nimport type { PaginationControlProps, PaginationItemsPerPage } from './PaginationControlTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport PaginationFirstIcon from '@/assets/icons/pagination_first.svg?react'\nimport PaginationPrevIcon from '@/assets/icons/pagination_previous.svg?react'\nimport PaginationNextIcon from '@/assets/icons/pagination_next.svg?react'\nimport PaginationLastIcon from '@/assets/icons/pagination_last.svg?react'\n\nconst MINIMUM_PAGE_SIZE = 5\n\nconst shouldShowPagination = (totalCount: number | undefined): boolean => {\n if (totalCount === undefined) return true\n if (totalCount === 0) return false\n return totalCount > MINIMUM_PAGE_SIZE\n}\n\nconst DefaultPaginationControl = ({\n currentPage,\n totalPages,\n totalCount,\n isFetching,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n itemsPerPage = 5,\n}: PaginationControlProps) => {\n const { t } = useTranslation('common')\n const Components = useComponentContext()\n\n if (!shouldShowPagination(totalCount)) {\n return null\n }\n\n return (\n <section className={style.paginationControl} data-testid=\"pagination-control\">\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <div className={style.paginationControlCount}>\n <section>\n <Components.Select\n label={t('labels.paginationControlCountLabel')}\n shouldVisuallyHideLabel\n value={itemsPerPage.toString()}\n onChange={n => {\n handleItemsPerPageChange(Number(n) as PaginationItemsPerPage)\n }}\n options={[\n { value: '5', label: '5' },\n { value: '10', label: '10' },\n { value: '50', label: '50' },\n ]}\n />\n </section>\n </div>\n <div className={style.paginationControlButtons}>\n {isFetching && <InlineSpinner ariaLabel={t('labels.paginationFetchingLabel')} />}\n <Components.ButtonIcon\n aria-label={t('icons.paginationFirst')}\n isDisabled={currentPage === 1}\n onClick={handleFirstPage}\n >\n <PaginationFirstIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationPrev')}\n data-testid=\"pagination-previous\"\n isDisabled={currentPage === 1}\n onClick={handlePreviousPage}\n >\n <PaginationPrevIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationNext')}\n data-testid=\"pagination-next\"\n isDisabled={currentPage === totalPages}\n onClick={handleNextPage}\n >\n <PaginationNextIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationLast')}\n isDisabled={currentPage === totalPages}\n onClick={handleLastPage}\n >\n <PaginationLastIcon />\n </Components.ButtonIcon>\n </div>\n </Flex>\n </section>\n )\n}\n\nexport const PaginationControl = (props: PaginationControlProps) => {\n const Components = useComponentContext()\n\n return Components.PaginationControl ? (\n <Components.PaginationControl {...props} />\n ) : (\n <DefaultPaginationControl {...props} />\n )\n}\n"],"names":["MINIMUM_PAGE_SIZE","shouldShowPagination","totalCount","DefaultPaginationControl","currentPage","totalPages","isFetching","handleFirstPage","handlePreviousPage","handleNextPage","handleLastPage","handleItemsPerPageChange","itemsPerPage","t","useTranslation","Components","useComponentContext","jsx","style","jsxs","Flex","n","InlineSpinner","PaginationFirstIcon","PaginationPrevIcon","PaginationNextIcon","PaginationLastIcon","PaginationControl","props"],"mappings":";;;;;;;;;;AAWA,MAAMA,IAAoB,GAEpBC,IAAuB,CAACC,MACxBA,MAAe,SAAkB,KACjCA,MAAe,IAAU,KACtBA,IAAaF,GAGhBG,IAA2B,CAAC;AAAA,EAChC,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAH;AAAA,EACA,YAAAI;AAAA,EACA,iBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,cAAAC,IAAe;AACjB,MAA8B;AAC5B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAaC,EAAA;AAEnB,SAAKf,EAAqBC,CAAU,IAKlC,gBAAAe,EAAC,WAAA,EAAQ,WAAWC,EAAM,mBAAmB,eAAY,sBACvD,UAAA,gBAAAC,EAACC,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAC9C,UAAA;AAAA,IAAA,gBAAAH,EAAC,OAAA,EAAI,WAAWC,EAAM,wBACpB,4BAAC,WAAA,EACC,UAAA,gBAAAD;AAAA,MAACF,EAAW;AAAA,MAAX;AAAA,QACC,OAAOF,EAAE,oCAAoC;AAAA,QAC7C,yBAAuB;AAAA,QACvB,OAAOD,EAAa,SAAA;AAAA,QACpB,UAAU,CAAAS,MAAK;AACb,UAAAV,EAAyB,OAAOU,CAAC,CAA2B;AAAA,QAC9D;AAAA,QACA,SAAS;AAAA,UACP,EAAE,OAAO,KAAK,OAAO,IAAA;AAAA,UACrB,EAAE,OAAO,MAAM,OAAO,KAAA;AAAA,UACtB,EAAE,OAAO,MAAM,OAAO,KAAA;AAAA,QAAK;AAAA,MAC7B;AAAA,IAAA,GAEJ,EAAA,CACF;AAAA,IACA,gBAAAF,EAAC,OAAA,EAAI,WAAWD,EAAM,0BACnB,UAAA;AAAA,MAAAZ,KAAc,gBAAAW,EAACK,GAAA,EAAc,WAAWT,EAAE,gCAAgC,GAAG;AAAA,MAC9E,gBAAAI;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAYF,EAAE,uBAAuB;AAAA,UACrC,YAAYT,MAAgB;AAAA,UAC5B,SAASG;AAAA,UAET,4BAACgB,GAAA,CAAA,CAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEvB,gBAAAN;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAYF,EAAE,sBAAsB;AAAA,UACpC,eAAY;AAAA,UACZ,YAAYT,MAAgB;AAAA,UAC5B,SAASI;AAAA,UAET,4BAACgB,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEtB,gBAAAP;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAYF,EAAE,sBAAsB;AAAA,UACpC,eAAY;AAAA,UACZ,YAAYT,MAAgBC;AAAA,UAC5B,SAASI;AAAA,UAET,4BAACgB,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEtB,gBAAAR;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAYF,EAAE,sBAAsB;AAAA,UACpC,YAAYT,MAAgBC;AAAA,UAC5B,SAASK;AAAA,UAET,4BAACgB,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,IACtB,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF,
|
|
1
|
+
{"version":3,"file":"PaginationControl.js","sources":["../../../../src/components/Common/PaginationControl/PaginationControl.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '../Flex/Flex'\nimport { InlineSpinner } from '../InlineSpinner'\nimport style from './PaginationControl.module.scss'\nimport type { PaginationControlProps, PaginationItemsPerPage } from './PaginationControlTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport PaginationFirstIcon from '@/assets/icons/pagination_first.svg?react'\nimport PaginationPrevIcon from '@/assets/icons/pagination_previous.svg?react'\nimport PaginationNextIcon from '@/assets/icons/pagination_next.svg?react'\nimport PaginationLastIcon from '@/assets/icons/pagination_last.svg?react'\n\nconst MINIMUM_PAGE_SIZE = 5\n\nconst shouldShowPagination = (totalCount: number | undefined): boolean => {\n if (totalCount === undefined) return true\n if (totalCount === 0) return false\n return totalCount > MINIMUM_PAGE_SIZE\n}\n\nconst DefaultPaginationControl = ({\n currentPage,\n totalPages,\n totalCount,\n isFetching,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n itemsPerPage = 5,\n}: PaginationControlProps) => {\n const { t } = useTranslation('common')\n const Components = useComponentContext()\n\n if (!shouldShowPagination(totalCount)) {\n return null\n }\n\n return (\n <section className={style.paginationControl} data-testid=\"pagination-control\">\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <div className={style.paginationControlCount}>\n <section>\n <Components.Select\n label={t('labels.paginationControlCountLabel')}\n shouldVisuallyHideLabel\n value={itemsPerPage.toString()}\n onChange={n => {\n handleItemsPerPageChange(Number(n) as PaginationItemsPerPage)\n }}\n options={[\n { value: '5', label: '5' },\n { value: '10', label: '10' },\n { value: '25', label: '25' },\n { value: '50', label: '50' },\n ]}\n />\n </section>\n </div>\n <div className={style.paginationControlButtons}>\n {isFetching && <InlineSpinner ariaLabel={t('labels.paginationFetchingLabel')} />}\n <Components.ButtonIcon\n aria-label={t('icons.paginationFirst')}\n isDisabled={currentPage === 1}\n onClick={handleFirstPage}\n >\n <PaginationFirstIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationPrev')}\n data-testid=\"pagination-previous\"\n isDisabled={currentPage === 1}\n onClick={handlePreviousPage}\n >\n <PaginationPrevIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationNext')}\n data-testid=\"pagination-next\"\n isDisabled={currentPage === totalPages}\n onClick={handleNextPage}\n >\n <PaginationNextIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationLast')}\n isDisabled={currentPage === totalPages}\n onClick={handleLastPage}\n >\n <PaginationLastIcon />\n </Components.ButtonIcon>\n </div>\n </Flex>\n </section>\n )\n}\n\nexport const PaginationControl = (props: PaginationControlProps) => {\n const Components = useComponentContext()\n\n return Components.PaginationControl ? (\n <Components.PaginationControl {...props} />\n ) : (\n <DefaultPaginationControl {...props} />\n )\n}\n"],"names":["MINIMUM_PAGE_SIZE","shouldShowPagination","totalCount","DefaultPaginationControl","currentPage","totalPages","isFetching","handleFirstPage","handlePreviousPage","handleNextPage","handleLastPage","handleItemsPerPageChange","itemsPerPage","t","useTranslation","Components","useComponentContext","jsx","style","jsxs","Flex","n","InlineSpinner","PaginationFirstIcon","PaginationPrevIcon","PaginationNextIcon","PaginationLastIcon","PaginationControl","props"],"mappings":";;;;;;;;;;AAWA,MAAMA,IAAoB,GAEpBC,IAAuB,CAACC,MACxBA,MAAe,SAAkB,KACjCA,MAAe,IAAU,KACtBA,IAAaF,GAGhBG,IAA2B,CAAC;AAAA,EAChC,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAH;AAAA,EACA,YAAAI;AAAA,EACA,iBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,cAAAC,IAAe;AACjB,MAA8B;AAC5B,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAaC,EAAA;AAEnB,SAAKf,EAAqBC,CAAU,IAKlC,gBAAAe,EAAC,WAAA,EAAQ,WAAWC,EAAM,mBAAmB,eAAY,sBACvD,UAAA,gBAAAC,EAACC,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAC9C,UAAA;AAAA,IAAA,gBAAAH,EAAC,OAAA,EAAI,WAAWC,EAAM,wBACpB,4BAAC,WAAA,EACC,UAAA,gBAAAD;AAAA,MAACF,EAAW;AAAA,MAAX;AAAA,QACC,OAAOF,EAAE,oCAAoC;AAAA,QAC7C,yBAAuB;AAAA,QACvB,OAAOD,EAAa,SAAA;AAAA,QACpB,UAAU,CAAAS,MAAK;AACb,UAAAV,EAAyB,OAAOU,CAAC,CAA2B;AAAA,QAC9D;AAAA,QACA,SAAS;AAAA,UACP,EAAE,OAAO,KAAK,OAAO,IAAA;AAAA,UACrB,EAAE,OAAO,MAAM,OAAO,KAAA;AAAA,UACtB,EAAE,OAAO,MAAM,OAAO,KAAA;AAAA,UACtB,EAAE,OAAO,MAAM,OAAO,KAAA;AAAA,QAAK;AAAA,MAC7B;AAAA,IAAA,GAEJ,EAAA,CACF;AAAA,IACA,gBAAAF,EAAC,OAAA,EAAI,WAAWD,EAAM,0BACnB,UAAA;AAAA,MAAAZ,KAAc,gBAAAW,EAACK,GAAA,EAAc,WAAWT,EAAE,gCAAgC,GAAG;AAAA,MAC9E,gBAAAI;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAYF,EAAE,uBAAuB;AAAA,UACrC,YAAYT,MAAgB;AAAA,UAC5B,SAASG;AAAA,UAET,4BAACgB,GAAA,CAAA,CAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEvB,gBAAAN;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAYF,EAAE,sBAAsB;AAAA,UACpC,eAAY;AAAA,UACZ,YAAYT,MAAgB;AAAA,UAC5B,SAASI;AAAA,UAET,4BAACgB,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEtB,gBAAAP;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAYF,EAAE,sBAAsB;AAAA,UACpC,eAAY;AAAA,UACZ,YAAYT,MAAgBC;AAAA,UAC5B,SAASI;AAAA,UAET,4BAACgB,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEtB,gBAAAR;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAYF,EAAE,sBAAsB;AAAA,UACpC,YAAYT,MAAgBC;AAAA,UAC5B,SAASK;AAAA,UAET,4BAACgB,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,IACtB,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF,IA1DO;AA4DX,GAEaC,IAAoB,CAACC,MAAkC;AAClE,QAAMb,IAAaC,EAAA;AAEnB,SAAOD,EAAW,oBAChB,gBAAAE,EAACF,EAAW,mBAAX,EAA8B,GAAGa,EAAA,CAAO,IAEzC,gBAAAX,EAACd,GAAA,EAA0B,GAAGyB,EAAA,CAAO;AAEzC;"}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as s, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import y from "classnames";
|
|
3
|
-
import { DescriptionListDefaults as
|
|
3
|
+
import { DescriptionListDefaults as x } from "./DescriptionListTypes.js";
|
|
4
4
|
import i from "./DescriptionList.module.scss.js";
|
|
5
5
|
import { applyMissingDefaults as D } from "../../../../helpers/applyMissingDefaults.js";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import { useComponentContext as A } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
+
function j(a) {
|
|
8
|
+
const m = D(a, x), { items: p, layout: c, showSeparators: l, className: d } = m, n = A(), u = (r) => (Array.isArray(r) ? r : [r]).map((e, o) => /* @__PURE__ */ s("dt", { children: /* @__PURE__ */ s(n.Text, { as: "span", weight: "medium", children: e }) }, o)), f = (r) => (Array.isArray(r) ? r : [r]).map((e, o) => /* @__PURE__ */ s("dd", { children: /* @__PURE__ */ s(n.Text, { as: "span", variant: "supporting", children: e }) }, o));
|
|
9
|
+
return /* @__PURE__ */ s(
|
|
9
10
|
"dl",
|
|
10
11
|
{
|
|
11
|
-
className: y(i.root,
|
|
12
|
+
className: y(i.root, l && i.withSeparators, d),
|
|
12
13
|
"data-layout": c,
|
|
13
|
-
children:
|
|
14
|
-
|
|
14
|
+
children: p.map((r, t) => /* @__PURE__ */ h("div", { className: i.item, children: [
|
|
15
|
+
u(r.term),
|
|
15
16
|
f(r.description)
|
|
16
|
-
] },
|
|
17
|
+
] }, t))
|
|
17
18
|
}
|
|
18
19
|
);
|
|
19
20
|
}
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
j as DescriptionList
|
|
22
23
|
};
|
|
23
24
|
//# sourceMappingURL=DescriptionList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DescriptionList.js","sources":["../../../../../src/components/Common/UI/DescriptionList/DescriptionList.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport type { ReactNode } from 'react'\nimport { type DescriptionListProps, DescriptionListDefaults } from './DescriptionListTypes'\nimport styles from './DescriptionList.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\n\nexport function DescriptionList(rawProps: DescriptionListProps) {\n const resolvedProps = applyMissingDefaults(rawProps, DescriptionListDefaults)\n const { items, layout, showSeparators, className } = resolvedProps\n\n const renderTerms = (term: ReactNode | ReactNode[]) => {\n const terms = Array.isArray(term) ? term : [term]\n return terms.map((t, i) => <dt key={i}
|
|
1
|
+
{"version":3,"file":"DescriptionList.js","sources":["../../../../../src/components/Common/UI/DescriptionList/DescriptionList.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport type { ReactNode } from 'react'\nimport { type DescriptionListProps, DescriptionListDefaults } from './DescriptionListTypes'\nimport styles from './DescriptionList.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function DescriptionList(rawProps: DescriptionListProps) {\n const resolvedProps = applyMissingDefaults(rawProps, DescriptionListDefaults)\n const { items, layout, showSeparators, className } = resolvedProps\n\n const Components = useComponentContext()\n\n const renderTerms = (term: ReactNode | ReactNode[]) => {\n const terms = Array.isArray(term) ? term : [term]\n return terms.map((t, i) => (\n <dt key={i}>\n <Components.Text as=\"span\" weight=\"medium\">\n {t}\n </Components.Text>\n </dt>\n ))\n }\n\n const renderDescriptions = (description: ReactNode | ReactNode[]) => {\n const descriptions = Array.isArray(description) ? description : [description]\n return descriptions.map((d, i) => (\n <dd key={i}>\n <Components.Text as=\"span\" variant=\"supporting\">\n {d}\n </Components.Text>\n </dd>\n ))\n }\n\n return (\n <dl\n className={classNames(styles.root, showSeparators && styles.withSeparators, className)}\n data-layout={layout}\n >\n {items.map((item, index) => (\n <div key={index} className={styles.item}>\n {renderTerms(item.term)}\n {renderDescriptions(item.description)}\n </div>\n ))}\n </dl>\n )\n}\n"],"names":["DescriptionList","rawProps","resolvedProps","applyMissingDefaults","DescriptionListDefaults","items","layout","showSeparators","className","Components","useComponentContext","renderTerms","term","t","i","jsx","renderDescriptions","description","d","classNames","styles","item","index","jsxs"],"mappings":";;;;;;AAOO,SAASA,EAAgBC,GAAgC;AAC9D,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAuB,GACtE,EAAE,OAAAC,GAAO,QAAAC,GAAQ,gBAAAC,GAAgB,WAAAC,MAAcN,GAE/CO,IAAaC,EAAA,GAEbC,IAAc,CAACC,OACL,MAAM,QAAQA,CAAI,IAAIA,IAAO,CAACA,CAAI,GACnC,IAAI,CAACC,GAAGC,MACnB,gBAAAC,EAAC,QACC,UAAA,gBAAAA,EAACN,EAAW,MAAX,EAAgB,IAAG,QAAO,QAAO,UAC/B,UAAAI,EAAA,CACH,KAHOC,CAIT,CACD,GAGGE,IAAqB,CAACC,OACL,MAAM,QAAQA,CAAW,IAAIA,IAAc,CAACA,CAAW,GACxD,IAAI,CAACC,GAAGJ,MAC1B,gBAAAC,EAAC,QACC,UAAA,gBAAAA,EAACN,EAAW,MAAX,EAAgB,IAAG,QAAO,SAAQ,cAChC,UAAAS,EAAA,CACH,KAHOJ,CAIT,CACD;AAGH,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWI,EAAWC,EAAO,MAAMb,KAAkBa,EAAO,gBAAgBZ,CAAS;AAAA,MACrF,eAAaF;AAAA,MAEZ,UAAAD,EAAM,IAAI,CAACgB,GAAMC,MAChB,gBAAAC,EAAC,OAAA,EAAgB,WAAWH,EAAO,MAChC,UAAA;AAAA,QAAAT,EAAYU,EAAK,IAAI;AAAA,QACrBL,EAAmBK,EAAK,WAAW;AAAA,MAAA,EAAA,GAF5BC,CAGV,CACD;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const t = "
|
|
1
|
+
const t = "_root_17ept_1", o = "_item_17ept_4", e = "_withSeparators_17ept_23", r = {
|
|
2
2
|
root: t,
|
|
3
3
|
item: o,
|
|
4
|
-
withSeparators:
|
|
4
|
+
withSeparators: e
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
r as default,
|
|
8
8
|
o as item,
|
|
9
9
|
t as root,
|
|
10
|
-
|
|
10
|
+
e as withSeparators
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=DescriptionList.module.scss.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InputHTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
-
export interface InputProps extends Pick<InputHTMLAttributes<HTMLInputElement>, 'className' | 'id' | 'name' | 'placeholder' | 'type' | 'value' | 'onChange' | 'onBlur' | 'aria-describedby' | 'aria-labelledby' | 'aria-invalid' | 'min' | 'max' | 'maxLength'> {
|
|
2
|
+
export interface InputProps extends Pick<InputHTMLAttributes<HTMLInputElement>, 'className' | 'id' | 'name' | 'placeholder' | 'type' | 'value' | 'onChange' | 'onBlur' | 'onFocus' | 'aria-describedby' | 'aria-labelledby' | 'aria-invalid' | 'min' | 'max' | 'maxLength'> {
|
|
3
3
|
/**
|
|
4
4
|
* Ref for the input element
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputTypes.js","sources":["../../../../../src/components/Common/UI/Input/InputTypes.ts"],"sourcesContent":["import type { InputHTMLAttributes, ReactNode, Ref } from 'react'\n\nexport interface InputProps extends Pick<\n InputHTMLAttributes<HTMLInputElement>,\n | 'className'\n | 'id'\n | 'name'\n | 'placeholder'\n | 'type'\n | 'value'\n | 'onChange'\n | 'onBlur'\n | 'aria-describedby'\n | 'aria-labelledby'\n | 'aria-invalid'\n | 'min'\n | 'max'\n | 'maxLength'\n> {\n /**\n * Ref for the input element\n */\n inputRef?: Ref<HTMLInputElement>\n\n /**\n * Content to display at the start of the input\n */\n adornmentStart?: ReactNode\n\n /**\n * Content to display at the end of the input\n */\n adornmentEnd?: ReactNode\n\n /**\n * Whether the input is disabled\n */\n isDisabled?: boolean\n}\n\n/**\n * Default prop values for Input component.\n * These are used by the component adapter to automatically provide defaults.\n */\nexport const InputDefaults = {\n isDisabled: false,\n} as const satisfies Partial<InputProps>\n"],"names":["InputDefaults"],"mappings":"
|
|
1
|
+
{"version":3,"file":"InputTypes.js","sources":["../../../../../src/components/Common/UI/Input/InputTypes.ts"],"sourcesContent":["import type { InputHTMLAttributes, ReactNode, Ref } from 'react'\n\nexport interface InputProps extends Pick<\n InputHTMLAttributes<HTMLInputElement>,\n | 'className'\n | 'id'\n | 'name'\n | 'placeholder'\n | 'type'\n | 'value'\n | 'onChange'\n | 'onBlur'\n | 'onFocus'\n | 'aria-describedby'\n | 'aria-labelledby'\n | 'aria-invalid'\n | 'min'\n | 'max'\n | 'maxLength'\n> {\n /**\n * Ref for the input element\n */\n inputRef?: Ref<HTMLInputElement>\n\n /**\n * Content to display at the start of the input\n */\n adornmentStart?: ReactNode\n\n /**\n * Content to display at the end of the input\n */\n adornmentEnd?: ReactNode\n\n /**\n * Whether the input is disabled\n */\n isDisabled?: boolean\n}\n\n/**\n * Default prop values for Input component.\n * These are used by the component adapter to automatically provide defaults.\n */\nexport const InputDefaults = {\n isDisabled: false,\n} as const satisfies Partial<InputProps>\n"],"names":["InputDefaults"],"mappings":"AA6CO,MAAMA,IAAgB;AAAA,EAC3B,YAAY;AACd;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { NumberField as
|
|
2
|
+
import { useMemo as M } from "react";
|
|
3
|
+
import { NumberField as O, Group as P } from "react-aria-components";
|
|
4
4
|
import { useFieldIds as k } from "../hooks/useFieldIds.js";
|
|
5
5
|
import { FieldLayout as z } from "../../FieldLayout/FieldLayout.js";
|
|
6
6
|
import { useLocale as A } from "../../../../contexts/LocaleProvider/useLocale.js";
|
|
@@ -8,82 +8,85 @@ import { Input as C } from "../Input/Input.js";
|
|
|
8
8
|
function Y({
|
|
9
9
|
name: y,
|
|
10
10
|
format: r,
|
|
11
|
-
inputRef:
|
|
12
|
-
id:
|
|
13
|
-
value:
|
|
11
|
+
inputRef: p,
|
|
12
|
+
id: b,
|
|
13
|
+
value: f,
|
|
14
14
|
description: i,
|
|
15
|
-
errorMessage:
|
|
16
|
-
isRequired:
|
|
17
|
-
placeholder:
|
|
18
|
-
isInvalid:
|
|
19
|
-
isDisabled:
|
|
20
|
-
onChange:
|
|
21
|
-
onBlur:
|
|
15
|
+
errorMessage: u,
|
|
16
|
+
isRequired: m,
|
|
17
|
+
placeholder: I,
|
|
18
|
+
isInvalid: F,
|
|
19
|
+
isDisabled: l,
|
|
20
|
+
onChange: h,
|
|
21
|
+
onBlur: g,
|
|
22
22
|
label: N,
|
|
23
23
|
min: t,
|
|
24
24
|
max: n,
|
|
25
|
-
shouldVisuallyHideLabel:
|
|
26
|
-
adornmentStart:
|
|
27
|
-
adornmentEnd:
|
|
28
|
-
className:
|
|
29
|
-
maximumFractionDigits:
|
|
30
|
-
minimumFractionDigits:
|
|
31
|
-
...
|
|
25
|
+
shouldVisuallyHideLabel: v,
|
|
26
|
+
adornmentStart: D,
|
|
27
|
+
adornmentEnd: w,
|
|
28
|
+
className: x,
|
|
29
|
+
maximumFractionDigits: B,
|
|
30
|
+
minimumFractionDigits: E,
|
|
31
|
+
...a
|
|
32
32
|
}) {
|
|
33
|
-
const { locale:
|
|
34
|
-
inputId:
|
|
35
|
-
errorMessage:
|
|
33
|
+
const { locale: s, currency: o } = A(), { inputId: d, errorMessageId: L, descriptionId: S, ariaDescribedBy: T } = k({
|
|
34
|
+
inputId: b,
|
|
35
|
+
errorMessage: u,
|
|
36
36
|
description: i
|
|
37
|
-
}), V = typeof t == "string" ? Number(t) : t, j = typeof n == "string" ? Number(n) : n, G =
|
|
37
|
+
}), V = typeof t == "string" ? Number(t) : t, j = typeof n == "string" ? Number(n) : n, G = M(() => new Intl.NumberFormat(s, {
|
|
38
38
|
style: "currency",
|
|
39
39
|
currency: o
|
|
40
|
-
}).formatToParts(0).find((
|
|
40
|
+
}).formatToParts(0).find((c) => c.type === "currency")?.value, [o, s]);
|
|
41
41
|
return /* @__PURE__ */ e(
|
|
42
42
|
z,
|
|
43
43
|
{
|
|
44
44
|
label: N,
|
|
45
45
|
description: i,
|
|
46
|
-
errorMessage:
|
|
47
|
-
isRequired:
|
|
46
|
+
errorMessage: u,
|
|
47
|
+
isRequired: m,
|
|
48
48
|
htmlFor: d,
|
|
49
|
-
errorMessageId:
|
|
50
|
-
descriptionId:
|
|
51
|
-
shouldVisuallyHideLabel:
|
|
52
|
-
className:
|
|
49
|
+
errorMessageId: L,
|
|
50
|
+
descriptionId: S,
|
|
51
|
+
shouldVisuallyHideLabel: v,
|
|
52
|
+
className: x,
|
|
53
53
|
withErrorIcon: !1,
|
|
54
|
-
...
|
|
54
|
+
...a,
|
|
55
55
|
children: /* @__PURE__ */ e(
|
|
56
|
-
|
|
56
|
+
O,
|
|
57
57
|
{
|
|
58
|
-
value:
|
|
58
|
+
value: f,
|
|
59
59
|
name: y,
|
|
60
60
|
formatOptions: {
|
|
61
61
|
style: "decimal",
|
|
62
|
-
minimumFractionDigits: r === "currency" ? 2 :
|
|
63
|
-
maximumFractionDigits: r === "currency" ? 2 :
|
|
62
|
+
minimumFractionDigits: r === "currency" ? 2 : E,
|
|
63
|
+
maximumFractionDigits: r === "currency" ? 2 : B,
|
|
64
64
|
currency: o,
|
|
65
65
|
currencyDisplay: "symbol"
|
|
66
66
|
},
|
|
67
|
-
isInvalid:
|
|
68
|
-
isDisabled:
|
|
69
|
-
isRequired:
|
|
67
|
+
isInvalid: F,
|
|
68
|
+
isDisabled: l,
|
|
69
|
+
isRequired: m,
|
|
70
70
|
validationBehavior: "aria",
|
|
71
|
-
onChange:
|
|
72
|
-
onBlur:
|
|
71
|
+
onChange: h,
|
|
72
|
+
onBlur: g,
|
|
73
73
|
"aria-labelledby": " ",
|
|
74
74
|
minValue: V,
|
|
75
75
|
maxValue: j,
|
|
76
|
-
...
|
|
77
|
-
children: /* @__PURE__ */ e(
|
|
76
|
+
...a,
|
|
77
|
+
children: /* @__PURE__ */ e(P, { children: /* @__PURE__ */ e(
|
|
78
78
|
C,
|
|
79
79
|
{
|
|
80
|
-
adornmentStart:
|
|
81
|
-
adornmentEnd:
|
|
80
|
+
adornmentStart: D || (r === "currency" ? G : null),
|
|
81
|
+
adornmentEnd: w || (r === "percent" ? "%" : null),
|
|
82
82
|
id: d,
|
|
83
|
-
inputRef:
|
|
84
|
-
placeholder:
|
|
85
|
-
"aria-describedby":
|
|
86
|
-
isDisabled:
|
|
83
|
+
inputRef: p,
|
|
84
|
+
placeholder: I,
|
|
85
|
+
"aria-describedby": T,
|
|
86
|
+
isDisabled: l,
|
|
87
|
+
onFocus: (c) => {
|
|
88
|
+
c.currentTarget.select();
|
|
89
|
+
}
|
|
87
90
|
}
|
|
88
91
|
) })
|
|
89
92
|
}
|