@gusto/embedded-react-sdk 0.21.0 → 0.23.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 +62 -0
- package/README.md +32 -17
- package/dist/assets/icons/eye.svg.js +10 -0
- package/dist/assets/icons/eye.svg.js.map +1 -0
- package/dist/assets/icons/icon-file-outline.svg.js +10 -0
- package/dist/assets/icons/icon-file-outline.svg.js.map +1 -0
- package/dist/assets/icons/icon-receipt-outline.svg.js +10 -0
- package/dist/assets/icons/icon-receipt-outline.svg.js.map +1 -0
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/index.d.ts +1 -1
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
- package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js.map +1 -1
- package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
- package/dist/components/Common/Fieldset/Fieldset.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.d.ts +1 -0
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js +14 -0
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -0
- package/dist/components/Common/FlowBreadcrumbs/index.d.ts +1 -0
- package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +1 -1
- package/dist/components/Common/ReorderableList/ReorderableItem.d.ts +1 -1
- package/dist/components/Common/ReorderableList/ReorderableItem.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableList.js +7 -7
- package/dist/components/Common/ReorderableList/ReorderableList.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
- package/dist/components/Common/UI/Badge/BadgeTypes.js.map +1 -1
- package/dist/components/Common/UI/Banner/BannerTypes.js.map +1 -1
- package/dist/components/Common/UI/Button/ButtonIcon.d.ts +1 -1
- package/dist/components/Common/UI/Button/ButtonIcon.js +10 -7
- package/dist/components/Common/UI/Button/ButtonIcon.js.map +1 -1
- package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -1
- package/dist/components/Common/UI/Checkbox/CheckboxTypes.js.map +1 -1
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +7 -7
- package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
- package/dist/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.js.map +1 -1
- package/dist/components/Common/UI/Radio/RadioTypes.js.map +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/Select/Select.module.scss.js +6 -6
- package/dist/components/Common/UI/Switch/SwitchTypes.js.map +1 -1
- package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
- package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
- package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +5 -5
- package/dist/components/Common/UI/TextArea/TextAreaTypes.js.map +1 -1
- package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +6 -5
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +5 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/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/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- 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/Form.js +5 -4
- package/dist/components/Company/Locations/LocationForm/Form.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/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +10 -9
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -6
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/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/Company/index.d.ts +2 -0
- package/dist/components/Company/index.js +20 -16
- package/dist/components/Company/index.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +7 -6
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +5 -6
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.d.ts +7 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +204 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +15 -9
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +140 -0
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.d.ts +39 -0
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +132 -0
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +11 -0
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +139 -0
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/helpers.d.ts +2 -0
- package/dist/components/Contractor/Payments/CreatePayment/helpers.js +6 -0
- package/dist/components/Contractor/Payments/CreatePayment/helpers.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.d.ts +2 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js +26 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +16 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +31 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/index.d.ts +3 -0
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +7 -0
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +122 -0
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.d.ts +8 -0
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js +26 -0
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistory.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +17 -15
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +114 -0
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.d.ts +9 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +49 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +12 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +116 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js +10 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.module.scss.js.map +1 -0
- package/dist/components/Contractor/Payments/types.d.ts +8 -0
- package/dist/components/Contractor/Profile/useContractorProfile.d.ts +26 -26
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Contractor/index.d.ts +1 -0
- package/dist/components/Contractor/index.js +4 -2
- package/dist/components/Contractor/index.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +2 -3
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +0 -3
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +62 -77
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +83 -50
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +56 -0
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +159 -0
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +3 -2
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.d.ts +22 -7
- package/dist/components/Employee/FederalTaxes/FederalForm.js +86 -32
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js +62 -46
- package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -4
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +25 -23
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +116 -106
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -6
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +6 -6
- package/dist/components/Employee/Profile/HomeAddress.js +9 -8
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +2 -2
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +9 -8
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +3 -4
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -4
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.d.ts +22 -7
- package/dist/components/Employee/Taxes/FederalForm.js +86 -32
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/Taxes.js +97 -81
- package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +3 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Flow/Flow.d.ts +3 -3
- package/dist/components/Flow/Flow.js +35 -31
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +46 -39
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.module.scss.js +8 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.module.scss.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +71 -72
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +21 -22
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.d.ts +2 -2
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js +19 -19
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +17 -16
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +36 -35
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +75 -68
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +66 -65
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +127 -103
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +254 -185
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/{FastAchThresholdExceeded.d.ts → FastAchSubmissionBlockerBanner.d.ts} +2 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +55 -0
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -0
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/index.d.ts +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +1 -1
- package/dist/components/Payroll/index.js +8 -6
- package/dist/components/Payroll/index.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +6 -7
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +4 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +9 -11
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/LocaleProvider/useLocale.d.ts +6 -3
- package/dist/contexts/LocaleProvider/useLocale.js +12 -9
- package/dist/contexts/LocaleProvider/useLocale.js.map +1 -1
- package/dist/helpers/currencyHelpers.d.ts +2 -0
- package/dist/helpers/currencyHelpers.js +6 -0
- package/dist/helpers/currencyHelpers.js.map +1 -0
- package/dist/helpers/formattedStrings.js +11 -12
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/i18n/I18n.js +10 -10
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +40 -0
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js +24 -0
- package/dist/i18n/en/Contractor.Payments.PaymentHistory.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js +36 -0
- package/dist/i18n/en/Contractor.Payments.PaymentsList.json.js.map +1 -0
- package/dist/i18n/en/Employee.Deductions.json.js +58 -46
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/i18n/en/Employee.FederalTaxes.json.js +49 -41
- package/dist/i18n/en/Employee.FederalTaxes.json.js.map +1 -1
- package/dist/i18n/en/Employee.Taxes.json.js +53 -45
- package/dist/i18n/en/Employee.Taxes.json.js.map +1 -1
- package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +1 -1
- package/dist/i18n/en/Payroll.PayrollList.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +35 -31
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/shared/constants.d.ts +18 -0
- package/dist/shared/constants.js +73 -59
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +182 -125
- package/package.json +18 -18
- package/dist/components/Contractor/Payments/Detail/DetailPresentation.d.ts +0 -19
- package/dist/components/Contractor/Payments/Overview/OverviewPresentation.d.ts +0 -18
- package/dist/components/Contractor/Payments/PaymentEdit/PaymentEditPresentation.d.ts +0 -6
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js +0 -52
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js.map +0 -1
- package/dist/i18n/en/ContractorPayment.ContractorPaymentCreatePayment.json.js +0 -32
- package/dist/i18n/en/ContractorPayment.ContractorPaymentCreatePayment.json.js.map +0 -1
- package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js +0 -24
- package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js.map +0 -1
- package/dist/i18n/en/ContractorPayment.ContractorPaymentOverview.json.js +0 -32
- package/dist/i18n/en/ContractorPayment.ContractorPaymentOverview.json.js.map +0 -1
- package/dist/i18n/en/ContractorPayment.ContractorPaymentPaymentHistory.json.js +0 -32
- package/dist/i18n/en/ContractorPayment.ContractorPaymentPaymentHistory.json.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReorderableList.js","sources":["../../../../src/components/Common/ReorderableList/ReorderableList.tsx"],"sourcesContent":["import { useRef, useState, useEffect, useCallback, useMemo } from 'react'\nimport classnames from 'classnames'\nimport { DndProvider } from 'react-dnd'\nimport { HTML5Backend } from 'react-dnd-html5-backend'\nimport type { ReactElement } from 'react'\nimport type { ReorderableListItem } from './ReorderableListTypes'\nimport styles from './ReorderableList.module.scss'\nimport { ReorderableItem } from './ReorderableItem'\nimport { DropZone } from './DropZone'\n\n// Helper functions\nfunction generateUniqueListId(prefix = 'reorderable-list'): string {\n return `${prefix}-${Math.random().toString(36).slice(2, 9)}`\n}\n\nfunction reorderArray<T>(array: T[], from: number, to: number): T[] {\n if (from === to || from < 0 || from >= array.length || to < 0 || to > array.length) {\n return [...array]\n }\n\n const newArray = [...array]\n const [removed] = newArray.splice(from, 1)\n\n if (removed === undefined) {\n return [...array]\n }\n\n newArray.splice(to, 0, removed)\n return newArray\n}\n\nfunction calculateNewOrder(\n currentOrder: number[],\n fromPosition: number,\n toPosition: number,\n): number[] {\n if (\n fromPosition === toPosition ||\n fromPosition < 0 ||\n fromPosition >= currentOrder.length ||\n toPosition < 0 ||\n toPosition > currentOrder.length\n ) {\n return [...currentOrder]\n }\n\n return reorderArray(currentOrder, fromPosition, toPosition)\n}\n\nfunction adjustTargetPosition(\n fromPosition: number,\n toPosition: number,\n source: 'keyboard' | 'dragdrop' = 'dragdrop',\n): number {\n // When dragging, adjust the target position if moving an element forward\n if (source === 'dragdrop' && fromPosition < toPosition) {\n return toPosition - 1\n }\n return toPosition\n}\n\ninterface ReorderableListAnimationConfig {\n duration?: number\n easing?: string\n disabled?: boolean\n}\n\ninterface ReorderableListProps {\n items: ReorderableListItem[]\n label: string\n onReorder?: (itemOrder: number[]) => void\n className?: string\n animationConfig?: ReorderableListAnimationConfig\n disabled?: boolean\n renderDragHandle?: (props: {\n id: string | number\n label: string\n isReordering: boolean\n isDragging: boolean\n }) => ReactElement\n dropZoneClassName?: string\n itemClassName?: string\n}\n\n// Default animation config\nconst DEFAULT_ANIMATION_CONFIG: ReorderableListAnimationConfig = {\n duration: 200,\n easing: 'ease-in-out',\n disabled: false,\n}\n\nexport function ReorderableList({\n items,\n label,\n onReorder,\n className,\n animationConfig = DEFAULT_ANIMATION_CONFIG,\n disabled = false,\n renderDragHandle,\n dropZoneClassName,\n itemClassName,\n}: ReorderableListProps) {\n const listId = useRef(generateUniqueListId()).current\n\n const [itemOrder, setItemOrder] = useState<number[]>(() =>\n Array.from({ length: items.length }, (_, i) => i),\n )\n const [activeDropZone, setActiveDropZone] = useState<number | null>(null)\n const [isDragging, setIsDragging] = useState(false)\n const [isReorderingActive, setIsReorderingActive] = useState(false)\n const [reorderingItemIndex, setReorderingItemIndex] = useState<number | null>(null)\n const pendingReorderRef = useRef<boolean>(false)\n const activeDropZonesRef = useRef<Record<number, boolean>>({})\n\n const mergedAnimationConfig = useMemo(\n () => ({\n ...DEFAULT_ANIMATION_CONFIG,\n ...animationConfig,\n }),\n [animationConfig],\n )\n\n useEffect(() => {\n if (items.length !== itemOrder.length) {\n setItemOrder(Array.from({ length: items.length }, (_, i) => i))\n }\n }, [items.length, itemOrder.length])\n\n // Debounced state setter for drop zones to prevent flickering\n const activateDropZone = useCallback((position: number) => {\n activeDropZonesRef.current = {}\n activeDropZonesRef.current[position] = true\n setActiveDropZone(position)\n }, [])\n\n const deactivateDropZone = useCallback((position: number) => {\n if (position in activeDropZonesRef.current) {\n activeDropZonesRef.current[position] = false\n }\n\n const activeDropZones = Object.entries(activeDropZonesRef.current)\n .filter(([_, isActive]) => isActive)\n .map(([pos]) => Number(pos))\n\n if (activeDropZones.length === 0) {\n setActiveDropZone(null)\n } else if (activeDropZones.length === 1) {\n setActiveDropZone(Number(activeDropZones[0]))\n }\n }, [])\n\n const moveItem = useCallback(\n (fromPosition: number, toPosition: number, source: 'keyboard' | 'dragdrop' = 'dragdrop') => {\n if (\n disabled ||\n fromPosition === toPosition ||\n fromPosition < 0 ||\n fromPosition >= itemOrder.length ||\n toPosition < 0 ||\n toPosition > itemOrder.length\n ) {\n return\n }\n\n pendingReorderRef.current = true\n const movedItemIndex = itemOrder[fromPosition]\n\n // Use utility function to calculate new order\n const newOrder = calculateNewOrder(\n itemOrder,\n fromPosition,\n adjustTargetPosition(fromPosition, toPosition, source),\n )\n\n setItemOrder(newOrder)\n\n // Use the configured animation duration\n const animationDuration = mergedAnimationConfig.disabled ? 0 : mergedAnimationConfig.duration\n\n setTimeout(() => {\n setIsDragging(false)\n pendingReorderRef.current = false\n activeDropZonesRef.current = {}\n setActiveDropZone(null)\n\n if (source === 'keyboard') {\n const newPosition = newOrder.findIndex(idx => idx === movedItemIndex)\n\n if (newPosition >= 0) {\n setReorderingItemIndex(newPosition)\n const dragButtons = document.querySelectorAll(\n `[data-list-id=\"${listId}\"] .${styles.dragHandle} button`,\n )\n\n if (newPosition < dragButtons.length) {\n // Use requestAnimationFrame for smoother focus handling\n requestAnimationFrame(() => {\n if (dragButtons[newPosition]) {\n const buttonToFocus = dragButtons[newPosition] as HTMLElement\n buttonToFocus.focus()\n }\n })\n }\n }\n }\n\n if (onReorder) {\n onReorder(newOrder)\n }\n }, animationDuration)\n },\n [itemOrder, listId, onReorder, disabled, mergedAnimationConfig],\n )\n\n // If the list is disabled, don't render the DnD functionality\n if (disabled) {\n return (\n <div\n role=\"list\"\n aria-label={label}\n className={classnames(styles.reorderableList, className, styles.disabled)}\n data-list-id={listId}\n data-testid=\"reorderable-list\"\n >\n {itemOrder.map(itemIndex => {\n const item = items[itemIndex]\n if (!item) return null\n\n return (\n <div\n key={`item-static-${item.id || itemIndex}`}\n role=\"listitem\"\n className={classnames(styles.reorderableItem, itemClassName)}\n >\n <div className={styles.contentContainer}>{item.content}</div>\n </div>\n )\n })}\n </div>\n )\n }\n\n return (\n <DndProvider backend={HTML5Backend}>\n <div\n role=\"list\"\n aria-label={label}\n className={classnames(styles.reorderableList, className)}\n data-list-id={listId}\n data-testid=\"reorderable-list\"\n style={{\n ...(!mergedAnimationConfig.disabled &&\n ({\n '--animation-duration': `${mergedAnimationConfig.duration}ms`,\n '--animation-easing': mergedAnimationConfig.easing,\n } as React.CSSProperties)),\n }}\n >\n <DropZone\n position={0}\n listId={listId}\n isActive={activeDropZone === 0}\n onActivate={() => {\n activateDropZone(0)\n }}\n onDeactivate={() => {\n deactivateDropZone(0)\n }}\n onDrop={(fromPosition: number) => {\n if (!pendingReorderRef.current) {\n moveItem(fromPosition, 0, 'dragdrop')\n }\n }}\n className={dropZoneClassName}\n />\n\n {itemOrder.map((itemIndex, position) => {\n const item = items[itemIndex]\n if (!item) return null\n\n return (\n <div key={`item-container-${item.id || itemIndex}-${position}`}>\n <ReorderableItem\n key={`item-${item.id || itemIndex}`}\n item={item}\n index={position}\n moveItem={moveItem}\n itemCount={items.length}\n itemIndex={itemIndex}\n listId={listId}\n isDraggingAny={isDragging}\n setIsDragging={setIsDragging}\n isReorderingActive={isReorderingActive}\n setIsReorderingActive={setIsReorderingActive}\n isCurrentlyReordering={isReorderingActive && reorderingItemIndex === position}\n setReorderingItemIndex={setReorderingItemIndex}\n renderDragHandle={renderDragHandle}\n className={itemClassName}\n />\n\n <DropZone\n position={position + 1}\n listId={listId}\n isActive={activeDropZone === position + 1}\n onActivate={() => {\n activateDropZone(position + 1)\n }}\n onDeactivate={() => {\n deactivateDropZone(position + 1)\n }}\n onDrop={(fromPosition: number) => {\n if (!pendingReorderRef.current) {\n moveItem(fromPosition, position + 1, 'dragdrop')\n }\n }}\n className={dropZoneClassName}\n />\n </div>\n )\n })}\n </div>\n </DndProvider>\n )\n}\n"],"names":["generateUniqueListId","prefix","reorderArray","array","from","to","newArray","removed","calculateNewOrder","currentOrder","fromPosition","toPosition","adjustTargetPosition","source","DEFAULT_ANIMATION_CONFIG","ReorderableList","items","label","onReorder","className","animationConfig","disabled","renderDragHandle","dropZoneClassName","itemClassName","listId","useRef","itemOrder","setItemOrder","useState","_","i","activeDropZone","setActiveDropZone","isDragging","setIsDragging","isReorderingActive","setIsReorderingActive","reorderingItemIndex","setReorderingItemIndex","pendingReorderRef","activeDropZonesRef","mergedAnimationConfig","useMemo","useEffect","activateDropZone","useCallback","position","deactivateDropZone","activeDropZones","isActive","pos","moveItem","movedItemIndex","newOrder","animationDuration","newPosition","idx","dragButtons","styles","jsx","classnames","itemIndex","item","DndProvider","HTML5Backend","jsxs","DropZone","ReorderableItem"],"mappings":";;;;;;;;AAWA,SAASA,EAAqBC,IAAS,oBAA4B;AACjE,SAAO,GAAGA,CAAM,IAAI,KAAK,OAAA,EAAS,SAAS,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC;AAC5D;AAEA,SAASC,EAAgBC,GAAYC,GAAcC,GAAiB;AAClE,MAAID,MAASC,KAAMD,IAAO,KAAKA,KAAQD,EAAM,UAAUE,IAAK,KAAKA,IAAKF,EAAM;AAC1E,WAAO,CAAC,GAAGA,CAAK;AAGlB,QAAMG,IAAW,CAAC,GAAGH,CAAK,GACpB,CAACI,CAAO,IAAID,EAAS,OAAOF,GAAM,CAAC;AAEzC,SAAIG,MAAY,SACP,CAAC,GAAGJ,CAAK,KAGlBG,EAAS,OAAOD,GAAI,GAAGE,CAAO,GACvBD;AACT;AAEA,SA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;AAAA,gBACA,UAAUO,MAAmBe,IAAW;AAAA,gBACxC,YAAY,MAAM;AAChB,kBAAAF,EAAiBE,IAAW,CAAC;AAAA,gBAC/B;AAAA,gBACA,cAAc,MAAM;AAClB,kBAAAC,EAAmBD,IAAW,CAAC;AAAA,gBACjC;AAAA,gBACA,QAAQ,CAACrC,MAAyB;AAChC,kBAAK8B,EAAkB,WACrBY,EAAS1C,GAAcqC,IAAW,GAAG,UAAU;AAAA,gBAEnD;AAAA,gBACA,WAAWxB;AAAA,cAAA;AAAA,YAAA;AAAA,UACb,KAnCQ,kBAAkBwC,EAAK,MAAMD,CAAS,IAAIf,CAAQ,EAoC5D,IAvCgB;AAAA,QAyCpB,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAEL;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"ReorderableList.js","sources":["../../../../src/components/Common/ReorderableList/ReorderableList.tsx"],"sourcesContent":["import { useRef, useState, useEffect, useCallback, useMemo } from 'react'\nimport classnames from 'classnames'\nimport { DndProvider } from 'react-dnd'\nimport { HTML5Backend } from 'react-dnd-html5-backend'\nimport type { ReactElement } from 'react'\nimport type { ReorderableListItem } from './ReorderableListTypes'\nimport styles from './ReorderableList.module.scss'\nimport { ReorderableItem } from './ReorderableItem'\nimport { DropZone } from './DropZone'\n\n// Helper functions\nfunction generateUniqueListId(prefix = 'reorderable-list'): string {\n return `${prefix}-${Math.random().toString(36).slice(2, 9)}`\n}\n\nfunction reorderArray<T>(array: T[], from: number, to: number): T[] {\n if (from === to || from < 0 || from >= array.length || to < 0 || to > array.length) {\n return [...array]\n }\n\n const newArray = [...array]\n const [removed] = newArray.splice(from, 1)\n\n if (removed === undefined) {\n return [...array]\n }\n\n newArray.splice(to, 0, removed)\n return newArray\n}\n\nfunction calculateNewOrder(\n currentOrder: number[],\n fromPosition: number,\n toPosition: number,\n): number[] {\n if (\n fromPosition === toPosition ||\n fromPosition < 0 ||\n fromPosition >= currentOrder.length ||\n toPosition < 0 ||\n toPosition > currentOrder.length\n ) {\n return [...currentOrder]\n }\n\n return reorderArray(currentOrder, fromPosition, toPosition)\n}\n\nfunction adjustTargetPosition(\n fromPosition: number,\n toPosition: number,\n source: 'keyboard' | 'dragdrop' = 'dragdrop',\n): number {\n // When dragging, adjust the target position if moving an element forward\n if (source === 'dragdrop' && fromPosition < toPosition) {\n return toPosition - 1\n }\n return toPosition\n}\n\ninterface ReorderableListAnimationConfig {\n duration?: number\n easing?: string\n disabled?: boolean\n}\n\ninterface ReorderableListProps {\n items: ReorderableListItem[]\n label: string\n onReorder?: (itemOrder: number[]) => void\n className?: string\n animationConfig?: ReorderableListAnimationConfig\n disabled?: boolean\n renderDragHandle?: (props: {\n id: string | number\n label: string\n isReordering: boolean\n isDragging: boolean\n }) => ReactElement\n dropZoneClassName?: string\n itemClassName?: string\n}\n\n// Default animation config\nconst DEFAULT_ANIMATION_CONFIG: ReorderableListAnimationConfig = {\n duration: 200,\n easing: 'ease-in-out',\n disabled: false,\n}\n\nexport function ReorderableList({\n items,\n label,\n onReorder,\n className,\n animationConfig = DEFAULT_ANIMATION_CONFIG,\n disabled = false,\n renderDragHandle,\n dropZoneClassName,\n itemClassName,\n}: ReorderableListProps) {\n const listId = useRef(generateUniqueListId()).current\n\n const [itemOrder, setItemOrder] = useState<number[]>(() =>\n Array.from({ length: items.length }, (_, i) => i),\n )\n const [activeDropZone, setActiveDropZone] = useState<number | null>(null)\n const [isDragging, setIsDragging] = useState(false)\n const [isReorderingActive, setIsReorderingActive] = useState(false)\n const [reorderingItemIndex, setReorderingItemIndex] = useState<number | null>(null)\n const pendingReorderRef = useRef<boolean>(false)\n const activeDropZonesRef = useRef<Record<number, boolean>>({})\n\n const mergedAnimationConfig = useMemo(\n () => ({\n ...DEFAULT_ANIMATION_CONFIG,\n ...animationConfig,\n }),\n [animationConfig],\n )\n\n useEffect(() => {\n if (items.length !== itemOrder.length) {\n setItemOrder(Array.from({ length: items.length }, (_, i) => i))\n }\n }, [items.length, itemOrder.length])\n\n // Debounced state setter for drop zones to prevent flickering\n const activateDropZone = useCallback((position: number) => {\n activeDropZonesRef.current = {}\n activeDropZonesRef.current[position] = true\n setActiveDropZone(position)\n }, [])\n\n const deactivateDropZone = useCallback((position: number) => {\n if (position in activeDropZonesRef.current) {\n activeDropZonesRef.current[position] = false\n }\n\n const activeDropZones = Object.entries(activeDropZonesRef.current)\n .filter(([_, isActive]) => isActive)\n .map(([pos]) => Number(pos))\n\n if (activeDropZones.length === 0) {\n setActiveDropZone(null)\n } else if (activeDropZones.length === 1) {\n setActiveDropZone(Number(activeDropZones[0]))\n }\n }, [])\n\n const moveItem = useCallback(\n (fromPosition: number, toPosition: number, source: 'keyboard' | 'dragdrop') => {\n if (\n disabled ||\n fromPosition === toPosition ||\n fromPosition < 0 ||\n fromPosition >= itemOrder.length ||\n toPosition < 0 ||\n toPosition > itemOrder.length\n ) {\n return\n }\n\n pendingReorderRef.current = true\n const movedItemIndex = itemOrder[fromPosition]\n\n // Use utility function to calculate new order\n const newOrder = calculateNewOrder(\n itemOrder,\n fromPosition,\n adjustTargetPosition(fromPosition, toPosition, source),\n )\n\n setItemOrder(newOrder)\n\n // Use the configured animation duration\n const animationDuration = mergedAnimationConfig.disabled ? 0 : mergedAnimationConfig.duration\n\n setTimeout(() => {\n setIsDragging(false)\n pendingReorderRef.current = false\n activeDropZonesRef.current = {}\n setActiveDropZone(null)\n\n if (source === 'keyboard') {\n const newPosition = newOrder.findIndex(idx => idx === movedItemIndex)\n\n if (newPosition >= 0) {\n setReorderingItemIndex(newPosition)\n const dragButtons = document.querySelectorAll(\n `[data-list-id=\"${listId}\"] .${styles.dragHandle} button`,\n )\n\n if (newPosition < dragButtons.length) {\n // Use requestAnimationFrame for smoother focus handling\n requestAnimationFrame(() => {\n if (dragButtons[newPosition]) {\n const buttonToFocus = dragButtons[newPosition] as HTMLElement\n buttonToFocus.focus()\n }\n })\n }\n }\n }\n\n if (onReorder) {\n onReorder(newOrder)\n }\n }, animationDuration)\n },\n [itemOrder, listId, onReorder, disabled, mergedAnimationConfig],\n )\n\n // If the list is disabled, don't render the DnD functionality\n if (disabled) {\n return (\n <div\n role=\"list\"\n aria-label={label}\n className={classnames(styles.reorderableList, className, styles.disabled)}\n data-list-id={listId}\n data-testid=\"reorderable-list\"\n >\n {itemOrder.map(itemIndex => {\n const item = items[itemIndex]\n if (!item) return null\n\n return (\n <div\n key={`item-static-${item.id || itemIndex}`}\n role=\"listitem\"\n className={classnames(styles.reorderableItem, itemClassName)}\n >\n <div className={styles.contentContainer}>{item.content}</div>\n </div>\n )\n })}\n </div>\n )\n }\n\n return (\n <DndProvider backend={HTML5Backend}>\n <div\n role=\"list\"\n aria-label={label}\n className={classnames(styles.reorderableList, className)}\n data-list-id={listId}\n data-testid=\"reorderable-list\"\n style={{\n ...(!mergedAnimationConfig.disabled &&\n ({\n '--animation-duration': `${mergedAnimationConfig.duration}ms`,\n '--animation-easing': mergedAnimationConfig.easing,\n } as React.CSSProperties)),\n }}\n >\n <DropZone\n position={0}\n listId={listId}\n isActive={activeDropZone === 0}\n onActivate={() => {\n activateDropZone(0)\n }}\n onDeactivate={() => {\n deactivateDropZone(0)\n }}\n onDrop={(fromPosition: number) => {\n if (!pendingReorderRef.current) {\n moveItem(fromPosition, 0, 'dragdrop')\n }\n }}\n className={dropZoneClassName}\n />\n\n {itemOrder.map((itemIndex, position) => {\n const item = items[itemIndex]\n if (!item) return null\n\n return (\n <div key={`item-container-${item.id || itemIndex}-${position}`}>\n <ReorderableItem\n key={`item-${item.id || itemIndex}`}\n item={item}\n index={position}\n moveItem={moveItem}\n itemCount={items.length}\n itemIndex={itemIndex}\n listId={listId}\n isDraggingAny={isDragging}\n setIsDragging={setIsDragging}\n isReorderingActive={isReorderingActive}\n setIsReorderingActive={setIsReorderingActive}\n isCurrentlyReordering={isReorderingActive && reorderingItemIndex === position}\n setReorderingItemIndex={setReorderingItemIndex}\n renderDragHandle={renderDragHandle}\n className={itemClassName}\n />\n\n <DropZone\n position={position + 1}\n listId={listId}\n isActive={activeDropZone === position + 1}\n onActivate={() => {\n activateDropZone(position + 1)\n }}\n onDeactivate={() => {\n deactivateDropZone(position + 1)\n }}\n onDrop={(fromPosition: number) => {\n if (!pendingReorderRef.current) {\n moveItem(fromPosition, position + 1, 'dragdrop')\n }\n }}\n className={dropZoneClassName}\n />\n </div>\n )\n })}\n </div>\n </DndProvider>\n )\n}\n"],"names":["generateUniqueListId","prefix","reorderArray","array","from","to","newArray","removed","calculateNewOrder","currentOrder","fromPosition","toPosition","adjustTargetPosition","source","DEFAULT_ANIMATION_CONFIG","ReorderableList","items","label","onReorder","className","animationConfig","disabled","renderDragHandle","dropZoneClassName","itemClassName","listId","useRef","itemOrder","setItemOrder","useState","_","i","activeDropZone","setActiveDropZone","isDragging","setIsDragging","isReorderingActive","setIsReorderingActive","reorderingItemIndex","setReorderingItemIndex","pendingReorderRef","activeDropZonesRef","mergedAnimationConfig","useMemo","useEffect","activateDropZone","useCallback","position","deactivateDropZone","activeDropZones","isActive","pos","moveItem","movedItemIndex","newOrder","animationDuration","newPosition","idx","dragButtons","styles","jsx","classnames","itemIndex","item","DndProvider","HTML5Backend","jsxs","DropZone","ReorderableItem"],"mappings":";;;;;;;;AAWA,SAASA,EAAqBC,IAAS,oBAA4B;AACjE,SAAO,GAAGA,CAAM,IAAI,KAAK,OAAA,EAAS,SAAS,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC;AAC5D;AAEA,SAASC,EAAgBC,GAAYC,GAAcC,GAAiB;AAClE,MAAID,MAASC,KAAMD,IAAO,KAAKA,KAAQD,EAAM,UAAUE,IAAK,KAAKA,IAAKF,EAAM;AAC1E,WAAO,CAAC,GAAGA,CAAK;AAGlB,QAAMG,IAAW,CAAC,GAAGH,CAAK,GACpB,CAACI,CAAO,IAAID,EAAS,OAAOF,GAAM,CAAC;AAEzC,SAAIG,MAAY,SACP,CAAC,GAAGJ,CAAK,KAGlBG,EAAS,OAAOD,GAAI,GAAGE,CAAO,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gBACrB,QAAAtB;AAAA,gBACA,UAAUO,MAAmBe,IAAW;AAAA,gBACxC,YAAY,MAAM;AAChB,kBAAAF,EAAiBE,IAAW,CAAC;AAAA,gBAC/B;AAAA,gBACA,cAAc,MAAM;AAClB,kBAAAC,EAAmBD,IAAW,CAAC;AAAA,gBACjC;AAAA,gBACA,QAAQ,CAACrC,MAAyB;AAChC,kBAAK8B,EAAkB,WACrBY,EAAS1C,GAAcqC,IAAW,GAAG,UAAU;AAAA,gBAEnD;AAAA,gBACA,WAAWxB;AAAA,cAAA;AAAA,YAAA;AAAA,UACb,KAnCQ,kBAAkBwC,EAAK,MAAMD,CAAS,IAAIf,CAAQ,EAoC5D,IAvCgB;AAAA,QAyCpB,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAEL;AAEJ;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import "../../../shared/constants.js";
|
|
3
3
|
import "classnames";
|
|
4
|
-
import { ActionsLayout as p } from "../ActionsLayout/ActionsLayout.js";
|
|
5
4
|
import "react-i18next";
|
|
5
|
+
import { ActionsLayout as p } from "../ActionsLayout/ActionsLayout.js";
|
|
6
6
|
import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
7
|
import "react";
|
|
8
8
|
function y({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as n, Fragment as s, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "../../../shared/constants.js";
|
|
3
3
|
import "classnames";
|
|
4
|
-
import { TextInputField as p } from "../Fields/TextInputField/TextInputField.js";
|
|
5
4
|
import "react-i18next";
|
|
5
|
+
import { TextInputField as p } from "../Fields/TextInputField/TextInputField.js";
|
|
6
6
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import { CheckboxField as a } from "../Fields/CheckboxField/CheckboxField.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeTypes.js","sources":["../../../../../src/components/Common/UI/Badge/BadgeTypes.ts"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react'\n\nexport interface BadgeProps
|
|
1
|
+
{"version":3,"file":"BadgeTypes.js","sources":["../../../../../src/components/Common/UI/Badge/BadgeTypes.ts"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react'\n\nexport interface BadgeProps extends Pick<\n HTMLAttributes<HTMLSpanElement>,\n 'className' | 'id' | 'aria-label'\n> {\n /**\n * Content to be displayed inside the badge\n */\n children: ReactNode\n /**\n * Visual style variant of the badge\n */\n status?: 'success' | 'warning' | 'error' | 'info'\n}\n\n/**\n * Default prop values for Badge component.\n */\nexport const BadgeDefaults = {\n status: 'info',\n} as const satisfies Partial<BadgeProps>\n"],"names":["BadgeDefaults"],"mappings":"AAmBO,MAAMA,IAAgB;AAAA,EAC3B,QAAQ;AACV;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerTypes.js","sources":["../../../../../src/components/Common/UI/Banner/BannerTypes.ts"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react'\n\nexport interface BannerProps
|
|
1
|
+
{"version":3,"file":"BannerTypes.js","sources":["../../../../../src/components/Common/UI/Banner/BannerTypes.ts"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react'\n\nexport interface BannerProps extends Pick<\n HTMLAttributes<HTMLDivElement>,\n 'className' | 'id' | 'aria-label'\n> {\n /**\n * Title content displayed in the colored header section\n */\n title: ReactNode\n /**\n * Content to be displayed in the main content area\n */\n children: ReactNode\n /**\n * Visual status variant of the banner\n */\n status?: 'warning' | 'error'\n}\n\n/**\n * Default prop values for Banner component.\n */\nexport const BannerDefaults = {\n status: 'warning',\n} as const satisfies Partial<BannerProps>\n"],"names":["BannerDefaults"],"mappings":"AAuBO,MAAMA,IAAiB;AAAA,EAC5B,QAAQ;AACV;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ButtonIconProps } from './ButtonTypes';
|
|
2
|
-
export declare function ButtonIcon(
|
|
2
|
+
export declare function ButtonIcon(rawProps: ButtonIconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import i from "./
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import a from "classnames";
|
|
3
|
+
import { ButtonIconDefaults as e } from "./ButtonTypes.js";
|
|
4
|
+
import { Button as i } from "./Button.js";
|
|
5
|
+
import c from "./ButtonIcon.module.scss.js";
|
|
6
|
+
import { applyMissingDefaults as f } from "../../../../helpers/applyMissingDefaults.js";
|
|
7
|
+
function x(o) {
|
|
8
|
+
const t = f(o, e), { children: r, variant: s, className: m, ...n } = t;
|
|
9
|
+
return /* @__PURE__ */ p(i, { ...n, variant: s, className: a(c.root, m), children: r });
|
|
7
10
|
}
|
|
8
11
|
export {
|
|
9
|
-
|
|
12
|
+
x as ButtonIcon
|
|
10
13
|
};
|
|
11
14
|
//# sourceMappingURL=ButtonIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon.js","sources":["../../../../../src/components/Common/UI/Button/ButtonIcon.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { type ButtonIconProps } from './ButtonTypes'\nimport { Button } from './Button'\nimport styles from './ButtonIcon.module.scss'\n\nexport function ButtonIcon({ variant, className, ...props }
|
|
1
|
+
{"version":3,"file":"ButtonIcon.js","sources":["../../../../../src/components/Common/UI/Button/ButtonIcon.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { ButtonIconDefaults, type ButtonIconProps } from './ButtonTypes'\nimport { Button } from './Button'\nimport styles from './ButtonIcon.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\n\nexport function ButtonIcon(rawProps: ButtonIconProps) {\n const resolvedProps = applyMissingDefaults(rawProps, ButtonIconDefaults)\n const { children, variant, className, ...props } = resolvedProps\n\n return (\n <Button {...props} variant={variant} className={classNames(styles.root, className)}>\n {children}\n </Button>\n )\n}\n"],"names":["ButtonIcon","rawProps","resolvedProps","applyMissingDefaults","ButtonIconDefaults","children","variant","className","props","jsx","Button","classNames","styles"],"mappings":";;;;;;AAMO,SAASA,EAAWC,GAA2B;AACpD,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAkB,GACjE,EAAE,UAAAC,GAAU,SAAAC,GAAS,WAAAC,GAAW,GAAGC,MAAUN;AAEnD,SACE,gBAAAO,EAACC,GAAA,EAAQ,GAAGF,GAAO,SAAAF,GAAkB,WAAWK,EAAWC,EAAO,MAAML,CAAS,GAC9E,UAAAF,EAAA,CACH;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTypes.js","sources":["../../../../../src/components/Common/UI/Button/ButtonTypes.ts"],"sourcesContent":["import type { Ref, ButtonHTMLAttributes, ReactNode, FocusEvent } from 'react'\n\nexport interface ButtonProps
|
|
1
|
+
{"version":3,"file":"ButtonTypes.js","sources":["../../../../../src/components/Common/UI/Button/ButtonTypes.ts"],"sourcesContent":["import type { Ref, ButtonHTMLAttributes, ReactNode, FocusEvent } from 'react'\n\nexport interface ButtonProps extends Pick<\n ButtonHTMLAttributes<HTMLButtonElement>,\n | 'name'\n | 'id'\n | 'className'\n | 'type'\n | 'onClick'\n | 'onKeyDown'\n | 'onKeyUp'\n | 'aria-label'\n | 'aria-labelledby'\n | 'aria-describedby'\n | 'form'\n | 'title'\n | 'tabIndex'\n> {\n /**\n * React ref for the button element\n */\n buttonRef?: Ref<HTMLButtonElement>\n /**\n * Visual style variant of the button\n */\n variant?: 'primary' | 'secondary' | 'tertiary' | 'error'\n /**\n * Shows a loading spinner and disables the button\n */\n isLoading?: boolean\n /**\n * Disables the button and prevents interaction\n */\n isDisabled?: boolean\n /**\n * Content to be rendered inside the button\n */\n children?: ReactNode\n /**\n * Handler for blur events\n */\n onBlur?: (e: FocusEvent) => void\n /**\n * Handler for focus events\n */\n onFocus?: (e: FocusEvent) => void\n}\n\nexport type ButtonIconProps = ButtonProps & {\n /**\n * Required aria-label for icon buttons to ensure accessibility\n */\n 'aria-label': string\n}\n\n/**\n * Default prop values for Button component.\n * These are used by the component adapter to automatically provide defaults.\n */\nexport const ButtonDefaults = {\n variant: 'primary',\n isLoading: false,\n isDisabled: false,\n} as const satisfies Partial<ButtonProps>\n\n/**\n * Default prop values for ButtonIcon component.\n */\nexport const ButtonIconDefaults = {\n variant: 'tertiary',\n isLoading: false,\n isDisabled: false,\n} as const satisfies Partial<ButtonIconProps>\n"],"names":["ButtonDefaults","ButtonIconDefaults"],"mappings":"AA2DO,MAAMA,IAAiB;AAAA,EAC5B,SAAS;AAAA,EACT,WAAW;AAAA,EACX,YAAY;AACd,GAKaC,IAAqB;AAAA,EAChC,SAAS;AAAA,EACT,WAAW;AAAA,EACX,YAAY;AACd;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxTypes.js","sources":["../../../../../src/components/Common/UI/Checkbox/CheckboxTypes.ts"],"sourcesContent":["import type { InputHTMLAttributes, Ref } from 'react'\nimport type { SharedHorizontalFieldLayoutProps } from '@/components/Common/HorizontalFieldLayout/HorizontalFieldLayoutTypes'\n\nexport interface CheckboxProps\n extends
|
|
1
|
+
{"version":3,"file":"CheckboxTypes.js","sources":["../../../../../src/components/Common/UI/Checkbox/CheckboxTypes.ts"],"sourcesContent":["import type { InputHTMLAttributes, Ref } from 'react'\nimport type { SharedHorizontalFieldLayoutProps } from '@/components/Common/HorizontalFieldLayout/HorizontalFieldLayoutTypes'\n\nexport interface CheckboxProps\n extends\n SharedHorizontalFieldLayoutProps,\n Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'id' | 'className'> {\n /**\n * Current checked state of the checkbox\n */\n value?: boolean\n /**\n * Callback when checkbox state changes\n */\n onChange?: (value: boolean) => void\n /**\n * React ref for the checkbox input element\n */\n inputRef?: Ref<HTMLInputElement>\n /**\n * Indicates if the checkbox is in an invalid state\n */\n isInvalid?: boolean\n /**\n * Disables the checkbox and prevents interaction\n */\n isDisabled?: boolean\n /**\n * Handler for blur events\n */\n onBlur?: () => void\n}\n\n/**\n * Default prop values for Checkbox component.\n */\nexport const CheckboxDefaults = {\n isInvalid: false,\n isDisabled: false,\n} as const satisfies Partial<CheckboxProps>\n"],"names":["CheckboxDefaults"],"mappings":"AAoCO,MAAMA,IAAmB;AAAA,EAC9B,WAAW;AAAA,EACX,YAAY;AACd;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroupTypes.js","sources":["../../../../../src/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.ts"],"sourcesContent":["import type { FieldsetHTMLAttributes, Ref } from 'react'\nimport type { SharedFieldLayoutProps } from '@/components/Common/FieldLayout/FieldLayoutTypes'\n\nexport interface CheckboxGroupOption {\n /**\n * Label text or content for the checkbox option\n */\n label: React.ReactNode\n /**\n * Value of the option that will be passed to onChange\n */\n value: string\n /**\n * Disables this specific checkbox option\n */\n isDisabled?: boolean\n /**\n * Optional description text for the checkbox option\n */\n description?: React.ReactNode\n}\n\nexport interface CheckboxGroupProps\n extends SharedFieldLayoutProps
|
|
1
|
+
{"version":3,"file":"CheckboxGroupTypes.js","sources":["../../../../../src/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.ts"],"sourcesContent":["import type { FieldsetHTMLAttributes, Ref } from 'react'\nimport type { SharedFieldLayoutProps } from '@/components/Common/FieldLayout/FieldLayoutTypes'\n\nexport interface CheckboxGroupOption {\n /**\n * Label text or content for the checkbox option\n */\n label: React.ReactNode\n /**\n * Value of the option that will be passed to onChange\n */\n value: string\n /**\n * Disables this specific checkbox option\n */\n isDisabled?: boolean\n /**\n * Optional description text for the checkbox option\n */\n description?: React.ReactNode\n}\n\nexport interface CheckboxGroupProps\n extends SharedFieldLayoutProps, Pick<FieldsetHTMLAttributes<HTMLFieldSetElement>, 'className'> {\n /**\n * Indicates if the checkbox group is in an invalid state\n */\n isInvalid?: boolean\n /**\n * Disables all checkbox options in the group\n */\n isDisabled?: boolean\n /**\n * Array of checkbox options to display\n */\n options: Array<CheckboxGroupOption>\n /**\n * Array of currently selected values\n */\n value?: string[]\n /**\n * Callback when selection changes\n */\n onChange?: (value: string[]) => void\n /**\n * React ref for the first checkbox input element\n */\n inputRef?: Ref<HTMLInputElement>\n}\n\n/**\n * Default prop values for CheckboxGroup component.\n */\nexport const CheckboxGroupDefaults = {\n isRequired: false,\n isInvalid: false,\n isDisabled: false,\n shouldVisuallyHideLabel: false,\n} as const satisfies Partial<CheckboxGroupProps>\n"],"names":["CheckboxGroupDefaults"],"mappings":"AAqDO,MAAMA,IAAwB;AAAA,EACnC,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,yBAAyB;AAC3B;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_container_zffe8_1", n = "_root_zffe8_5", t = "_popover_zffe8_99", e = "_icons_zffe8_231", _ = {
|
|
2
2
|
container: o,
|
|
3
|
-
root:
|
|
4
|
-
popover:
|
|
5
|
-
icons:
|
|
3
|
+
root: n,
|
|
4
|
+
popover: t,
|
|
5
|
+
icons: e
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
8
|
o as container,
|
|
9
9
|
_ as default,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
e as icons,
|
|
11
|
+
t as popover,
|
|
12
|
+
n as root
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=DatePicker.module.scss.js.map
|
|
@@ -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
|
|
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-invalid'\n | 'min'\n | 'max'\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":"AA0CO,MAAMA,IAAgB;AAAA,EAC3B,YAAY;AACd;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingSpinnerTypes.js","sources":["../../../../../src/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.ts"],"sourcesContent":["import type { HTMLAttributes } from 'react'\n\nexport interface LoadingSpinnerProps
|
|
1
|
+
{"version":3,"file":"LoadingSpinnerTypes.js","sources":["../../../../../src/components/Common/UI/LoadingSpinner/LoadingSpinnerTypes.ts"],"sourcesContent":["import type { HTMLAttributes } from 'react'\n\nexport interface LoadingSpinnerProps extends Pick<\n HTMLAttributes<HTMLDivElement>,\n 'className' | 'id' | 'aria-label'\n> {\n /**\n * Size of the spinner\n */\n size?: 'lg' | 'sm'\n /**\n * Display style of the spinner\n */\n style?: 'inline' | 'block'\n}\n\n/**\n * Default prop values for LoadingSpinner component.\n */\nexport const LoadingSpinnerDefaults = {\n size: 'lg',\n style: 'block',\n} as const satisfies Partial<LoadingSpinnerProps>\n"],"names":["LoadingSpinnerDefaults"],"mappings":"AAmBO,MAAMA,IAAyB;AAAA,EACpC,MAAM;AAAA,EACN,OAAO;AACT;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioTypes.js","sources":["../../../../../src/components/Common/UI/Radio/RadioTypes.ts"],"sourcesContent":["import type { InputHTMLAttributes, Ref } from 'react'\nimport type { SharedHorizontalFieldLayoutProps } from '@/components/Common/HorizontalFieldLayout/HorizontalFieldLayoutTypes'\n\nexport interface RadioProps\n extends
|
|
1
|
+
{"version":3,"file":"RadioTypes.js","sources":["../../../../../src/components/Common/UI/Radio/RadioTypes.ts"],"sourcesContent":["import type { InputHTMLAttributes, Ref } from 'react'\nimport type { SharedHorizontalFieldLayoutProps } from '@/components/Common/HorizontalFieldLayout/HorizontalFieldLayoutTypes'\n\nexport interface RadioProps\n extends\n SharedHorizontalFieldLayoutProps,\n Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'id' | 'className' | 'onBlur'> {\n /**\n * Current checked state of the radio button\n */\n value?: boolean\n /**\n * Callback when radio button state changes\n */\n onChange?: (checked: boolean) => void\n /**\n * React ref for the radio input element\n */\n inputRef?: Ref<HTMLInputElement>\n /**\n * Indicates that the field has an error\n */\n isInvalid?: boolean\n /**\n * Disables the radio button and prevents interaction\n */\n isDisabled?: boolean\n}\n\n/**\n * Default prop values for Radio component.\n */\nexport const RadioDefaults = {\n isInvalid: false,\n isDisabled: false,\n} as const satisfies Partial<RadioProps>\n"],"names":["RadioDefaults"],"mappings":"AAgCO,MAAMA,IAAgB;AAAA,EAC3B,WAAW;AAAA,EACX,YAAY;AACd;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupTypes.js","sources":["../../../../../src/components/Common/UI/RadioGroup/RadioGroupTypes.ts"],"sourcesContent":["import type { FieldsetHTMLAttributes, Ref } from 'react'\nimport type { SharedFieldLayoutProps } from '@/components/Common/FieldLayout/FieldLayoutTypes'\n\nexport interface RadioGroupOption {\n /**\n * Label text or content for the radio option\n */\n label: React.ReactNode\n /**\n * Value of the option that will be passed to onChange\n */\n value: string\n /**\n * Disables this specific radio option\n */\n isDisabled?: boolean\n /**\n * Optional description text for the radio option\n */\n description?: React.ReactNode\n}\n\nexport interface RadioGroupProps\n extends SharedFieldLayoutProps
|
|
1
|
+
{"version":3,"file":"RadioGroupTypes.js","sources":["../../../../../src/components/Common/UI/RadioGroup/RadioGroupTypes.ts"],"sourcesContent":["import type { FieldsetHTMLAttributes, Ref } from 'react'\nimport type { SharedFieldLayoutProps } from '@/components/Common/FieldLayout/FieldLayoutTypes'\n\nexport interface RadioGroupOption {\n /**\n * Label text or content for the radio option\n */\n label: React.ReactNode\n /**\n * Value of the option that will be passed to onChange\n */\n value: string\n /**\n * Disables this specific radio option\n */\n isDisabled?: boolean\n /**\n * Optional description text for the radio option\n */\n description?: React.ReactNode\n}\n\nexport interface RadioGroupProps\n extends SharedFieldLayoutProps, Pick<FieldsetHTMLAttributes<HTMLFieldSetElement>, 'className'> {\n /**\n * Indicates that the field has an error\n */\n isInvalid?: boolean\n /**\n * Disables all radio options in the group\n */\n isDisabled?: boolean\n /**\n * Array of radio options to display\n */\n options: Array<RadioGroupOption>\n /**\n * Currently selected value\n */\n value?: string\n /**\n * Initially selected value\n */\n defaultValue?: string\n /**\n * Callback when selection changes\n */\n onChange?: (value: string) => void\n /**\n * React ref for the first radio input element\n */\n inputRef?: Ref<HTMLInputElement>\n}\n\n/**\n * Default prop values for RadioGroup component.\n */\nexport const RadioGroupDefaults = {\n isRequired: false,\n isInvalid: false,\n isDisabled: false,\n shouldVisuallyHideLabel: false,\n} as const satisfies Partial<RadioGroupProps>\n"],"names":["RadioGroupDefaults"],"mappings":"AAyDO,MAAMA,IAAqB;AAAA,EAChC,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,yBAAyB;AAC3B;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_root_1d2dd_1", d = "_icons_1d2dd_17", s = "_popover_1d2dd_67", t = {
|
|
2
2
|
root: o,
|
|
3
|
-
icons:
|
|
4
|
-
popover:
|
|
3
|
+
icons: d,
|
|
4
|
+
popover: s
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
t as default,
|
|
8
|
+
d as icons,
|
|
9
|
+
s as popover,
|
|
10
10
|
o as root
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=Select.module.scss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwitchTypes.js","sources":["../../../../../src/components/Common/UI/Switch/SwitchTypes.ts"],"sourcesContent":["import type { InputHTMLAttributes, Ref } from 'react'\nimport type { SharedHorizontalFieldLayoutProps } from '@/components/Common/HorizontalFieldLayout/HorizontalFieldLayoutTypes'\n\nexport interface SwitchProps\n extends
|
|
1
|
+
{"version":3,"file":"SwitchTypes.js","sources":["../../../../../src/components/Common/UI/Switch/SwitchTypes.ts"],"sourcesContent":["import type { InputHTMLAttributes, Ref } from 'react'\nimport type { SharedHorizontalFieldLayoutProps } from '@/components/Common/HorizontalFieldLayout/HorizontalFieldLayoutTypes'\n\nexport interface SwitchProps\n extends\n SharedHorizontalFieldLayoutProps,\n Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'id'> {\n /**\n * Handler for blur events\n */\n onBlur?: () => void\n /**\n * Callback when switch state changes\n */\n onChange?: (checked: boolean) => void\n /**\n * Current checked state of the switch\n */\n value?: boolean\n /**\n * React ref for the switch input element\n */\n inputRef?: Ref<HTMLInputElement>\n /**\n * Indicates that the field has an error\n */\n isInvalid?: boolean\n /**\n * Disables the switch and prevents interaction\n */\n isDisabled?: boolean\n /**\n * Additional CSS class name for the switch container\n */\n className?: string\n /**\n * Label text for the switch\n */\n label: string\n}\n\n/**\n * Default prop values for Switch component.\n */\nexport const SwitchDefaults = {\n isInvalid: false,\n isDisabled: false,\n} as const satisfies Partial<SwitchProps>\n"],"names":["SwitchDefaults"],"mappings":"AA4CO,MAAMA,IAAiB;AAAA,EAC5B,WAAW;AAAA,EACX,YAAY;AACd;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableTypes.js","sources":["../../../../../src/components/Common/UI/Table/TableTypes.ts"],"sourcesContent":["import type { ReactNode, TableHTMLAttributes } from 'react'\n\nexport interface TableData {\n /**\n * Unique identifier for the table cell\n */\n key: string\n /**\n * Content to be displayed in the table cell\n */\n content: ReactNode\n}\n\nexport interface TableRow {\n /**\n * Unique identifier for the table row\n */\n key: string\n /**\n * Array of cells to be displayed in the row\n */\n data: TableData[]\n}\n\nexport interface TableProps
|
|
1
|
+
{"version":3,"file":"TableTypes.js","sources":["../../../../../src/components/Common/UI/Table/TableTypes.ts"],"sourcesContent":["import type { ReactNode, TableHTMLAttributes } from 'react'\n\nexport interface TableData {\n /**\n * Unique identifier for the table cell\n */\n key: string\n /**\n * Content to be displayed in the table cell\n */\n content: ReactNode\n}\n\nexport interface TableRow {\n /**\n * Unique identifier for the table row\n */\n key: string\n /**\n * Array of cells to be displayed in the row\n */\n data: TableData[]\n}\n\nexport interface TableProps extends Pick<\n TableHTMLAttributes<HTMLTableElement>,\n 'className' | 'aria-label' | 'id' | 'role' | 'aria-labelledby' | 'aria-describedby'\n> {\n /**\n * Array of header cells for the table\n */\n headers: TableData[]\n /**\n * Array of rows to be displayed in the table\n */\n rows: TableRow[]\n /**\n * Array of footer cells for the table\n */\n footer?: TableData[]\n /**\n * Content to display when the table has no rows\n */\n emptyState?: ReactNode\n /**\n * Visual style variant of the table\n */\n variant?: 'default' | 'minimal'\n /**\n * Whether the first column contains checkboxes (affects which column gets leading variant)\n */\n hasCheckboxColumn?: boolean\n}\n\n/**\n * Default prop values for Table component.\n */\nexport const TableDefaults = {\n variant: 'default',\n hasCheckboxColumn: false,\n} as const satisfies Partial<TableProps>\n"],"names":["TableDefaults"],"mappings":"AAyDO,MAAMA,IAAgB;AAAA,EAC3B,SAAS;AAAA,EACT,mBAAmB;AACrB;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_root_16h7m_1", t = "_tabsContainer_16h7m_4", n = "_dropdown_16h7m_87", r = {
|
|
2
2
|
root: o,
|
|
3
|
-
tabsContainer:
|
|
4
|
-
dropdown:
|
|
3
|
+
tabsContainer: t,
|
|
4
|
+
dropdown: n
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
r as default,
|
|
8
|
-
|
|
8
|
+
n as dropdown,
|
|
9
9
|
o as root,
|
|
10
|
-
|
|
10
|
+
t as tabsContainer
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=Tabs.module.scss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAreaTypes.js","sources":["../../../../../src/components/Common/UI/TextArea/TextAreaTypes.ts"],"sourcesContent":["import type { Ref, TextareaHTMLAttributes } from 'react'\nimport type { SharedFieldLayoutProps } from '@/components/Common/FieldLayout/FieldLayoutTypes'\n\nexport interface TextAreaProps\n extends
|
|
1
|
+
{"version":3,"file":"TextAreaTypes.js","sources":["../../../../../src/components/Common/UI/TextArea/TextAreaTypes.ts"],"sourcesContent":["import type { Ref, TextareaHTMLAttributes } from 'react'\nimport type { SharedFieldLayoutProps } from '@/components/Common/FieldLayout/FieldLayoutTypes'\n\nexport interface TextAreaProps\n extends\n SharedFieldLayoutProps,\n Pick<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n 'name' | 'id' | 'placeholder' | 'className' | 'rows' | 'cols'\n >,\n Pick<TextareaHTMLAttributes<HTMLTextAreaElement>, 'aria-describedby'> {\n /**\n * React ref for the textarea element\n */\n inputRef?: Ref<HTMLTextAreaElement>\n /**\n * Current value of the textarea\n */\n value?: string\n /**\n * Callback when textarea value changes\n */\n onChange?: (value: string) => void\n /**\n * Indicates that the field has an error\n */\n isInvalid?: boolean\n /**\n * Disables the textarea and prevents interaction\n */\n isDisabled?: boolean\n /**\n * Handler for blur events\n */\n onBlur?: () => void\n}\n\n/**\n * Default prop values for TextArea component.\n * These are used by the component adapter to automatically provide defaults.\n */\nexport const TextAreaDefaults = {\n isInvalid: false,\n isDisabled: false,\n rows: 4,\n} as const satisfies Partial<TextAreaProps>\n"],"names":["TextAreaDefaults"],"mappings":"AAyCO,MAAMA,IAAmB;AAAA,EAC9B,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,MAAM;AACR;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInputTypes.js","sources":["../../../../../src/components/Common/UI/TextInput/TextInputTypes.ts"],"sourcesContent":["import type { Ref, InputHTMLAttributes } from 'react'\nimport type { InputProps } from '../Input/InputTypes'\nimport type { SharedFieldLayoutProps } from '@/components/Common/FieldLayout/FieldLayoutTypes'\n\nexport interface TextInputProps\n extends
|
|
1
|
+
{"version":3,"file":"TextInputTypes.js","sources":["../../../../../src/components/Common/UI/TextInput/TextInputTypes.ts"],"sourcesContent":["import type { Ref, InputHTMLAttributes } from 'react'\nimport type { InputProps } from '../Input/InputTypes'\nimport type { SharedFieldLayoutProps } from '@/components/Common/FieldLayout/FieldLayoutTypes'\n\nexport interface TextInputProps\n extends\n SharedFieldLayoutProps,\n Pick<\n InputHTMLAttributes<HTMLInputElement>,\n 'name' | 'id' | 'placeholder' | 'className' | 'type'\n >,\n Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby'> {\n /**\n * React ref for the input element\n */\n inputRef?: Ref<HTMLInputElement>\n /**\n * Current value of the input\n */\n value?: string\n /**\n * Callback when input value changes\n */\n onChange?: (value: string) => void\n /**\n * Indicates that the field has an error\n */\n isInvalid?: boolean\n /**\n * Disables the input and prevents interaction\n */\n isDisabled?: boolean\n /**\n * Handler for blur events\n */\n onBlur?: () => void\n /**\n * Element to display at the start of the input\n */\n adornmentStart?: InputProps['adornmentStart']\n /**\n * Element to display at the end of the input\n */\n adornmentEnd?: InputProps['adornmentEnd']\n}\n\n/**\n * Default prop values for TextInput component.\n * These are used by the component adapter to automatically provide defaults.\n */\nexport const TextInputDefaults = {\n type: 'text',\n isInvalid: false,\n isDisabled: false,\n} as const satisfies Partial<TextInputProps>\n"],"names":["TextInputDefaults"],"mappings":"AAkDO,MAAMA,IAAoB;AAAA,EAC/B,MAAM;AAAA,EACN,WAAW;AAAA,EACX,YAAY;AACd;"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useCreateSignatory as
|
|
2
|
+
import { useTranslation as p } from "react-i18next";
|
|
3
|
+
import { useCreateSignatory as c } from "./useCreateSignatory.js";
|
|
4
4
|
import { Flex as o } from "../../../Common/Flex/Flex.js";
|
|
5
5
|
import { Grid as n } from "../../../Common/Grid/Grid.js";
|
|
6
|
+
import "classnames";
|
|
6
7
|
import { TextInputField as s } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
7
8
|
import { DatePickerField as u } from "../../../Common/Fields/DatePickerField/DatePickerField.js";
|
|
8
9
|
import { useComponentContext as g } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
@@ -12,8 +13,8 @@ import { usePlaceholderSSN as f, normalizeSSN as y } from "../../../../helpers/s
|
|
|
12
13
|
import { TitleSelect as b } from "../TitleSelect.js";
|
|
13
14
|
import { useMaskedTransform as S, commonMasks as D } from "../../../../helpers/mask.js";
|
|
14
15
|
import { SelectField as M } from "../../../Common/Fields/SelectField/SelectField.js";
|
|
15
|
-
const
|
|
16
|
-
const i = g(), { currentSignatory: t } =
|
|
16
|
+
const E = () => {
|
|
17
|
+
const i = g(), { currentSignatory: t } = c(), { t: e } = p("Company.AssignSignatory"), d = f(t?.hasSsn), m = S(D.phoneMask);
|
|
17
18
|
return /* @__PURE__ */ a(o, { flexDirection: "column", gap: 32, children: [
|
|
18
19
|
/* @__PURE__ */ a(o, { flexDirection: "column", gap: 12, children: [
|
|
19
20
|
/* @__PURE__ */ a("header", { children: [
|
|
@@ -135,6 +136,6 @@ const A = () => {
|
|
|
135
136
|
] });
|
|
136
137
|
};
|
|
137
138
|
export {
|
|
138
|
-
|
|
139
|
+
E as CreateSignatoryForm
|
|
139
140
|
};
|
|
140
141
|
//# sourceMappingURL=CreateSignatoryForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateSignatoryForm.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { z } from 'zod'\nimport { useCreateSignatory } from './useCreateSignatory'\nimport type { generateCreateSignatorySchema } from './Schema'\nimport { TextInputField, Grid, Flex, SelectField, DatePickerField } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\nimport { normalizeSSN, usePlaceholderSSN } from '@/helpers/ssn'\nimport { TitleSelect } from '@/components/Company/AssignSignatory/TitleSelect'\nimport { commonMasks, useMaskedTransform } from '@/helpers/mask'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport type CreateSignatoryInputs = z.infer<ReturnType<typeof generateCreateSignatorySchema>>\n\nexport const CreateSignatoryForm = () => {\n const Components = useComponentContext()\n const { currentSignatory } = useCreateSignatory()\n const { t } = useTranslation('Company.AssignSignatory')\n const placeholderSSN = usePlaceholderSSN(currentSignatory?.hasSsn)\n const transformPhone = useMaskedTransform(commonMasks.phoneMask)\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={12}>\n <header>\n <Components.Heading as=\"h2\">{t('signatoryDetails.title')}</Components.Heading>\n <Components.Text>{t('signatoryDetails.description')}</Components.Text>\n </header>\n\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"firstName\"\n label={t('signatoryDetails.firstName')}\n isRequired\n errorMessage={t('validations.firstName')}\n />\n <TextInputField\n name=\"lastName\"\n label={t('signatoryDetails.lastName')}\n isRequired\n errorMessage={t('validations.lastName')}\n />\n <TextInputField\n name=\"email\"\n label={t('signatoryDetails.email')}\n isRequired\n errorMessage={t('validations.email')}\n isDisabled={Boolean(currentSignatory)}\n />\n <TitleSelect />\n <TextInputField\n name=\"phone\"\n label={t('signatoryDetails.phone')}\n isRequired\n errorMessage={t('validations.phone')}\n transform={transformPhone}\n />\n <TextInputField\n name=\"ssn\"\n label={t('signatoryDetails.ssn')}\n errorMessage={t('validations.ssn', { ns: 'common' })}\n isRequired={!currentSignatory?.hasSsn}\n transform={normalizeSSN}\n placeholder={placeholderSSN}\n />\n <DatePickerField\n name=\"birthday\"\n label={t('signatoryDetails.birthday')}\n errorMessage={t('validations.dob')}\n isRequired\n />\n </Grid>\n </Flex>\n\n <Flex flexDirection=\"column\" gap={12}>\n <header>\n <Components.Heading as=\"h2\">{t('address.title')}</Components.Heading>\n <Components.Text>{t('address.description')}</Components.Text>\n </header>\n\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"street1\"\n label={t('address.street1')}\n isRequired\n errorMessage={t('validations.address.street1')}\n />\n <TextInputField name=\"street2\" label={t('address.street2')} />\n <TextInputField\n name=\"city\"\n label={t('address.city')}\n isRequired\n errorMessage={t('validations.address.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map((stateAbbr: (typeof STATES_ABBR)[number]) => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common' }),\n value: stateAbbr,\n }))}\n label={t('address.state')}\n placeholder={t('address.statePlaceholder')}\n errorMessage={t('validations.address.state')}\n isRequired\n />\n <TextInputField\n name=\"zip\"\n label={t('address.zip')}\n isRequired\n errorMessage={t('validations.address.zip')}\n />\n </Grid>\n </Flex>\n </Flex>\n )\n}\n"],"names":["CreateSignatoryForm","Components","useComponentContext","currentSignatory","useCreateSignatory","t","useTranslation","placeholderSSN","usePlaceholderSSN","transformPhone","useMaskedTransform","commonMasks","jsxs","Flex","jsx","Grid","TextInputField","TitleSelect","normalizeSSN","DatePickerField","SelectField","STATES_ABBR","stateAbbr"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CreateSignatoryForm.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { z } from 'zod'\nimport { useCreateSignatory } from './useCreateSignatory'\nimport type { generateCreateSignatorySchema } from './Schema'\nimport { TextInputField, Grid, Flex, SelectField, DatePickerField } from '@/components/Common'\nimport { STATES_ABBR } from '@/shared/constants'\nimport { normalizeSSN, usePlaceholderSSN } from '@/helpers/ssn'\nimport { TitleSelect } from '@/components/Company/AssignSignatory/TitleSelect'\nimport { commonMasks, useMaskedTransform } from '@/helpers/mask'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport type CreateSignatoryInputs = z.infer<ReturnType<typeof generateCreateSignatorySchema>>\n\nexport const CreateSignatoryForm = () => {\n const Components = useComponentContext()\n const { currentSignatory } = useCreateSignatory()\n const { t } = useTranslation('Company.AssignSignatory')\n const placeholderSSN = usePlaceholderSSN(currentSignatory?.hasSsn)\n const transformPhone = useMaskedTransform(commonMasks.phoneMask)\n\n return (\n <Flex flexDirection=\"column\" gap={32}>\n <Flex flexDirection=\"column\" gap={12}>\n <header>\n <Components.Heading as=\"h2\">{t('signatoryDetails.title')}</Components.Heading>\n <Components.Text>{t('signatoryDetails.description')}</Components.Text>\n </header>\n\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"firstName\"\n label={t('signatoryDetails.firstName')}\n isRequired\n errorMessage={t('validations.firstName')}\n />\n <TextInputField\n name=\"lastName\"\n label={t('signatoryDetails.lastName')}\n isRequired\n errorMessage={t('validations.lastName')}\n />\n <TextInputField\n name=\"email\"\n label={t('signatoryDetails.email')}\n isRequired\n errorMessage={t('validations.email')}\n isDisabled={Boolean(currentSignatory)}\n />\n <TitleSelect />\n <TextInputField\n name=\"phone\"\n label={t('signatoryDetails.phone')}\n isRequired\n errorMessage={t('validations.phone')}\n transform={transformPhone}\n />\n <TextInputField\n name=\"ssn\"\n label={t('signatoryDetails.ssn')}\n errorMessage={t('validations.ssn', { ns: 'common' })}\n isRequired={!currentSignatory?.hasSsn}\n transform={normalizeSSN}\n placeholder={placeholderSSN}\n />\n <DatePickerField\n name=\"birthday\"\n label={t('signatoryDetails.birthday')}\n errorMessage={t('validations.dob')}\n isRequired\n />\n </Grid>\n </Flex>\n\n <Flex flexDirection=\"column\" gap={12}>\n <header>\n <Components.Heading as=\"h2\">{t('address.title')}</Components.Heading>\n <Components.Text>{t('address.description')}</Components.Text>\n </header>\n\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"street1\"\n label={t('address.street1')}\n isRequired\n errorMessage={t('validations.address.street1')}\n />\n <TextInputField name=\"street2\" label={t('address.street2')} />\n <TextInputField\n name=\"city\"\n label={t('address.city')}\n isRequired\n errorMessage={t('validations.address.city')}\n />\n <SelectField\n name=\"state\"\n options={STATES_ABBR.map((stateAbbr: (typeof STATES_ABBR)[number]) => ({\n label: t(`statesHash.${stateAbbr}`, { ns: 'common' }),\n value: stateAbbr,\n }))}\n label={t('address.state')}\n placeholder={t('address.statePlaceholder')}\n errorMessage={t('validations.address.state')}\n isRequired\n />\n <TextInputField\n name=\"zip\"\n label={t('address.zip')}\n isRequired\n errorMessage={t('validations.address.zip')}\n />\n </Grid>\n </Flex>\n </Flex>\n )\n}\n"],"names":["CreateSignatoryForm","Components","useComponentContext","currentSignatory","useCreateSignatory","t","useTranslation","placeholderSSN","usePlaceholderSSN","transformPhone","useMaskedTransform","commonMasks","jsxs","Flex","jsx","Grid","TextInputField","TitleSelect","normalizeSSN","DatePickerField","SelectField","STATES_ABBR","stateAbbr"],"mappings":";;;;;;;;;;;;;;;AAaO,MAAMA,IAAs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MAAK,WAAU,OAAOX,EAAE,iBAAiB,GAAG;AAAA,QAC5D,gBAAAS;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,OAAOX,EAAE,cAAc;AAAA,YACvB,YAAU;AAAA,YACV,cAAcA,EAAE,0BAA0B;AAAA,UAAA;AAAA,QAAA;AAAA,QAE5C,gBAAAS;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,SAASC,EAAY,IAAI,CAACC,OAA6C;AAAA,cACrE,OAAOjB,EAAE,cAAciB,CAAS,IAAI,EAAE,IAAI,UAAU;AAAA,cACpD,OAAOA;AAAA,YAAA,EACP;AAAA,YACF,OAAOjB,EAAE,eAAe;AAAA,YACxB,aAAaA,EAAE,0BAA0B;AAAA,YACzC,cAAcA,EAAE,2BAA2B;AAAA,YAC3C,YAAU;AAAA,UAAA;AAAA,QAAA;AAAA,QAEZ,gBAAAS;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,OAAOX,EAAE,aAAa;AAAA,YACtB,YAAU;AAAA,YACV,cAAcA,EAAE,yBAAyB;AAAA,UAAA;AAAA,QAAA;AAAA,MAC3C,EAAA,CACF;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -11,11 +11,10 @@ import "classnames";
|
|
|
11
11
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
12
|
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
13
13
|
import "dompurify";
|
|
14
|
-
import "../../../../contexts/LocaleProvider/useLocale.js";
|
|
15
14
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
16
|
-
const [
|
|
15
|
+
const [d, s] = t("CreateSignatoryContext");
|
|
17
16
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
s as CreateSignatoryProvider,
|
|
18
|
+
d as useCreateSignatory
|
|
20
19
|
};
|
|
21
20
|
//# sourceMappingURL=useCreateSignatory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCreateSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport type CreateSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title' | 'phone' | 'birthday'> &\n Pick<\n NonNullable<Signatory['homeAddress']>,\n 'street1' | 'street2' | 'city' | 'state' | 'zip'\n > & {\n ssn?: string\n }\n>\ntype CreateSignatoryContextType = {\n isPending: boolean\n currentSignatory?: Signatory\n}\n\nconst [useCreateSignatory, CreateSignatoryProvider] =\n createCompoundContext<CreateSignatoryContextType>('CreateSignatoryContext')\n\nexport { useCreateSignatory, CreateSignatoryProvider }\n"],"names":["useCreateSignatory","CreateSignatoryProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useCreateSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\nexport type CreateSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title' | 'phone' | 'birthday'> &\n Pick<\n NonNullable<Signatory['homeAddress']>,\n 'street1' | 'street2' | 'city' | 'state' | 'zip'\n > & {\n ssn?: string\n }\n>\ntype CreateSignatoryContextType = {\n isPending: boolean\n currentSignatory?: Signatory\n}\n\nconst [useCreateSignatory, CreateSignatoryProvider] =\n createCompoundContext<CreateSignatoryContextType>('CreateSignatoryContext')\n\nexport { useCreateSignatory, CreateSignatoryProvider }\n"],"names":["useCreateSignatory","CreateSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
|
|
@@ -4,12 +4,13 @@ import { useFormContext as u } from "react-hook-form";
|
|
|
4
4
|
import { useTranslation as E } from "react-i18next";
|
|
5
5
|
import { Flex as S } from "../../../Common/Flex/Flex.js";
|
|
6
6
|
import { Grid as v } from "../../../Common/Grid/Grid.js";
|
|
7
|
+
import "classnames";
|
|
7
8
|
import { TextInputField as a } from "../../../Common/Fields/TextInputField/TextInputField.js";
|
|
8
9
|
import { useComponentContext as y } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
9
10
|
import "react";
|
|
10
11
|
import { nameValidation as l } from "../../../../helpers/validations.js";
|
|
11
12
|
import { TitleSelect as x } from "../TitleSelect.js";
|
|
12
|
-
const m = "email_mismatch",
|
|
13
|
+
const m = "email_mismatch", A = r.object({
|
|
13
14
|
firstName: l,
|
|
14
15
|
lastName: l,
|
|
15
16
|
email: r.string().min(1).email(),
|
|
@@ -18,7 +19,7 @@ const m = "email_mismatch", z = r.object({
|
|
|
18
19
|
}).refine((i) => i.email === i.confirmEmail, {
|
|
19
20
|
message: m,
|
|
20
21
|
path: ["confirmEmail"]
|
|
21
|
-
}),
|
|
22
|
+
}), D = () => {
|
|
22
23
|
const { t: i } = E("Company.AssignSignatory"), o = y(), {
|
|
23
24
|
setError: c,
|
|
24
25
|
clearErrors: f,
|
|
@@ -75,7 +76,7 @@ const m = "email_mismatch", z = r.object({
|
|
|
75
76
|
] });
|
|
76
77
|
};
|
|
77
78
|
export {
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
D as InviteSignatoryForm,
|
|
80
|
+
A as InviteSignatorySchema
|
|
80
81
|
};
|
|
81
82
|
//# sourceMappingURL=InviteSignatoryForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InviteSignatoryForm.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { TextInputField, Grid, Flex } from '@/components/Common'\nimport { nameValidation } from '@/helpers/validations'\nimport { TitleSelect } from '@/components/Company/AssignSignatory/TitleSelect'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nconst emailMismatchError = 'email_mismatch'\n\nexport const InviteSignatorySchema = z\n .object({\n firstName: nameValidation,\n lastName: nameValidation,\n email: z.string().min(1).email(),\n confirmEmail: z.string().min(1).email(),\n title: z.string().min(1),\n })\n .refine(data => data.email === data.confirmEmail, {\n message: emailMismatchError,\n path: ['confirmEmail'],\n })\n\nexport type InviteSignatoryInputs = z.infer<typeof InviteSignatorySchema>\n\nexport const InviteSignatoryForm = () => {\n const { t } = useTranslation('Company.AssignSignatory')\n const Components = useComponentContext()\n\n const {\n setError,\n clearErrors,\n formState: { errors, isSubmitted },\n watch,\n } = useFormContext()\n\n // Some workarounds here to also ensure that modifying the email field\n // sets and clears the confirm_email field error state\n const confirmEmail = watch('confirmEmail')\n\n const handleEmailChange = (value: string) => {\n if (isSubmitted) {\n if (value === confirmEmail) {\n clearErrors('confirmEmail')\n }\n\n if (value !== confirmEmail) {\n setError('confirmEmail', { message: emailMismatchError })\n }\n }\n }\n\n return (\n <Flex flexDirection=\"column\" gap={12}>\n <header>\n <Components.Heading as=\"h2\">{t('inviteSignatory.title')}</Components.Heading>\n <Components.Text>{t('inviteSignatory.description')}</Components.Text>\n </header>\n\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"email\"\n label={t('inviteSignatory.signatoryEmail')}\n isRequired\n errorMessage={t('validations.email')}\n onChange={handleEmailChange}\n />\n <TextInputField\n name=\"confirmEmail\"\n label={t('inviteSignatory.confirmEmail')}\n isRequired\n errorMessage={\n errors.confirmEmail?.message === emailMismatchError\n ? t('validations.emailMismatch')\n : t('validations.email')\n }\n />\n <TextInputField\n name=\"firstName\"\n label={t('inviteSignatory.firstName')}\n isRequired\n errorMessage={t('validations.firstName')}\n />\n <TextInputField\n name=\"lastName\"\n label={t('inviteSignatory.lastName')}\n isRequired\n errorMessage={t('validations.lastName')}\n />\n <TitleSelect />\n </Grid>\n </Flex>\n )\n}\n"],"names":["emailMismatchError","InviteSignatorySchema","z","nameValidation","data","InviteSignatoryForm","t","useTranslation","Components","useComponentContext","setError","clearErrors","errors","isSubmitted","watch","useFormContext","confirmEmail","handleEmailChange","value","jsxs","Flex","jsx","Grid","TextInputField","TitleSelect"],"mappings":"
|
|
1
|
+
{"version":3,"file":"InviteSignatoryForm.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { useFormContext } from 'react-hook-form'\nimport { useTranslation } from 'react-i18next'\nimport { TextInputField, Grid, Flex } from '@/components/Common'\nimport { nameValidation } from '@/helpers/validations'\nimport { TitleSelect } from '@/components/Company/AssignSignatory/TitleSelect'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nconst emailMismatchError = 'email_mismatch'\n\nexport const InviteSignatorySchema = z\n .object({\n firstName: nameValidation,\n lastName: nameValidation,\n email: z.string().min(1).email(),\n confirmEmail: z.string().min(1).email(),\n title: z.string().min(1),\n })\n .refine(data => data.email === data.confirmEmail, {\n message: emailMismatchError,\n path: ['confirmEmail'],\n })\n\nexport type InviteSignatoryInputs = z.infer<typeof InviteSignatorySchema>\n\nexport const InviteSignatoryForm = () => {\n const { t } = useTranslation('Company.AssignSignatory')\n const Components = useComponentContext()\n\n const {\n setError,\n clearErrors,\n formState: { errors, isSubmitted },\n watch,\n } = useFormContext()\n\n // Some workarounds here to also ensure that modifying the email field\n // sets and clears the confirm_email field error state\n const confirmEmail = watch('confirmEmail')\n\n const handleEmailChange = (value: string) => {\n if (isSubmitted) {\n if (value === confirmEmail) {\n clearErrors('confirmEmail')\n }\n\n if (value !== confirmEmail) {\n setError('confirmEmail', { message: emailMismatchError })\n }\n }\n }\n\n return (\n <Flex flexDirection=\"column\" gap={12}>\n <header>\n <Components.Heading as=\"h2\">{t('inviteSignatory.title')}</Components.Heading>\n <Components.Text>{t('inviteSignatory.description')}</Components.Text>\n </header>\n\n <Grid gridTemplateColumns={{ base: '1fr', small: ['1fr', '1fr'] }} gap={20}>\n <TextInputField\n name=\"email\"\n label={t('inviteSignatory.signatoryEmail')}\n isRequired\n errorMessage={t('validations.email')}\n onChange={handleEmailChange}\n />\n <TextInputField\n name=\"confirmEmail\"\n label={t('inviteSignatory.confirmEmail')}\n isRequired\n errorMessage={\n errors.confirmEmail?.message === emailMismatchError\n ? t('validations.emailMismatch')\n : t('validations.email')\n }\n />\n <TextInputField\n name=\"firstName\"\n label={t('inviteSignatory.firstName')}\n isRequired\n errorMessage={t('validations.firstName')}\n />\n <TextInputField\n name=\"lastName\"\n label={t('inviteSignatory.lastName')}\n isRequired\n errorMessage={t('validations.lastName')}\n />\n <TitleSelect />\n </Grid>\n </Flex>\n )\n}\n"],"names":["emailMismatchError","InviteSignatorySchema","z","nameValidation","data","InviteSignatoryForm","t","useTranslation","Components","useComponentContext","setError","clearErrors","errors","isSubmitted","watch","useFormContext","confirmEmail","handleEmailChange","value","jsxs","Flex","jsx","Grid","TextInputField","TitleSelect"],"mappings":";;;;;;;;;;;;AAQA,MAAMA,IAAqB,kBAEdC,IAAwBC,EAClC,OAAO;AAAA,EACN,WAAWC;AAAA,EACX,UAAUA;AAAA,EACV,OAAOD,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,MAAA;AAAA,EACzB,cAAcA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,MAAA;AAAA,EAChC,OAAOA,EAAE,OAAA,EAAS,IAAI,CAAC;AACzB,CAAC,EACA,OAAO,CAAAE,MAAQA,EAAK,UAAUA,EAAK,cAAc;AAAA,EAChD,SAASJ;AAAA,EACT,MAAM,CAAC,cAAc;AACvB,CA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7B,gBAAAe;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOjB,EAAE,2BAA2B;AAAA,UACpC,YAAU;AAAA,UACV,cAAcA,EAAE,uBAAuB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEzC,gBAAAe;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAOjB,EAAE,0BAA0B;AAAA,UACnC,YAAU;AAAA,UACV,cAAcA,EAAE,sBAAsB;AAAA,QAAA;AAAA,MAAA;AAAA,wBAEvCkB,GAAA,CAAA,CAAY;AAAA,IAAA,EAAA,CACf;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -11,11 +11,10 @@ import "classnames";
|
|
|
11
11
|
import "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
12
|
import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
13
13
|
import "dompurify";
|
|
14
|
-
import "../../../../contexts/LocaleProvider/useLocale.js";
|
|
15
14
|
import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
|
|
16
|
-
const [
|
|
15
|
+
const [S, c] = t("InviteSignatoryContext");
|
|
17
16
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
c as InviteSignatoryProvider,
|
|
18
|
+
S as useInviteSignatory
|
|
20
19
|
};
|
|
21
20
|
//# sourceMappingURL=useInviteSignatory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInviteSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype InviteSignatoryContextType = {\n isPending: boolean\n}\n\nexport type InviteSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title'> & {\n confirmEmail: string\n }\n>\n\nconst [useInviteSignatory, InviteSignatoryProvider] =\n createCompoundContext<InviteSignatoryContextType>('InviteSignatoryContext')\n\nexport { useInviteSignatory, InviteSignatoryProvider }\n"],"names":["useInviteSignatory","InviteSignatoryProvider","createCompoundContext"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useInviteSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype InviteSignatoryContextType = {\n isPending: boolean\n}\n\nexport type InviteSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title'> & {\n confirmEmail: string\n }\n>\n\nconst [useInviteSignatory, InviteSignatoryProvider] =\n createCompoundContext<InviteSignatoryContextType>('InviteSignatoryContext')\n\nexport { useInviteSignatory, InviteSignatoryProvider }\n"],"names":["useInviteSignatory","InviteSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
|
|
@@ -11,15 +11,14 @@ import "classnames";
|
|
|
11
11
|
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
12
|
import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
13
13
|
import "dompurify";
|
|
14
|
-
import "../../../contexts/LocaleProvider/useLocale.js";
|
|
15
14
|
import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
|
|
16
|
-
const
|
|
15
|
+
const d = {
|
|
17
16
|
createSignatory: "createSignatory",
|
|
18
17
|
inviteSignatory: "inviteSignatory"
|
|
19
|
-
}, [
|
|
18
|
+
}, [v, x] = t("AssignSignatoryContext");
|
|
20
19
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
x as AssignSignatoryProvider,
|
|
21
|
+
d as SignatoryAssignmentMode,
|
|
22
|
+
v as useAssignSignatory
|
|
24
23
|
};
|
|
25
24
|
//# sourceMappingURL=useAssignSignatory.js.map
|