@gusto/embedded-react-sdk 0.37.0 → 0.38.0-rc.1
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 +45 -0
- package/README.md +3 -0
- package/dist/UNSTABLE_Hooks.d.ts +1 -1
- package/dist/UNSTABLE_Hooks.js +34 -38
- package/dist/UNSTABLE_Hooks.js.map +1 -1
- package/dist/assets/icons/filter-funnel.svg.js +10 -0
- package/dist/assets/icons/filter-funnel.svg.js.map +1 -0
- package/dist/components/Base/Base.js +2 -3
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/createCompoundContext.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.js +42 -36
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -1
- package/dist/components/Common/DataView/DataTable/DataTable.js +77 -68
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.d.ts +17 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +100 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js +10 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.module.scss.js.map +1 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.d.ts +2 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayoutTypes.d.ts +40 -0
- package/dist/components/Common/DetailViewLayout/index.d.ts +3 -0
- package/dist/components/Common/EmptyData/EmptyData.d.ts +2 -1
- package/dist/components/Common/EmptyData/EmptyData.js +15 -13
- package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js +6 -4
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js +26 -24
- package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.d.ts +1 -1
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js +32 -30
- package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.d.ts +1 -1
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js +36 -34
- package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.d.ts +1 -1
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js +40 -38
- package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
- package/dist/components/Common/Fields/FileInputField/FileInputField.js +24 -22
- package/dist/components/Common/Fields/FileInputField/FileInputField.js.map +1 -1
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js +24 -22
- package/dist/components/Common/Fields/MultiSelectComboBoxField/MultiSelectComboBoxField.js.map +1 -1
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js +27 -25
- package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js +34 -32
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.d.ts +1 -1
- package/dist/components/Common/Fields/SelectField/SelectField.js +34 -32
- package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
- package/dist/components/Common/Fields/SwitchField/SwitchField.js +26 -24
- package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js +24 -22
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js.map +1 -1
- package/dist/components/Common/Fields/TextInputField/TextInputField.js +26 -24
- package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
- package/dist/components/Common/Fields/hooks/useField.d.ts +3 -2
- package/dist/components/Common/Fields/hooks/useField.js +37 -33
- package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +21 -20
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +5 -0
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.d.ts +1 -1
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js +10 -8
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableList.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +10 -15
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -14
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +14 -19
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +17 -17
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +5 -0
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js.map +1 -1
- package/dist/components/Common/UI/Button/Button.js +33 -29
- package/dist/components/Common/UI/Button/Button.js.map +1 -1
- package/dist/components/Common/UI/Button/Button.module.scss.js +5 -3
- package/dist/components/Common/UI/Button/Button.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Button/ButtonTypes.d.ts +4 -0
- package/dist/components/Common/UI/Button/ButtonTypes.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.js +88 -69
- package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +13 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.d.ts +2 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js +74 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.js.map +1 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.module.scss.js +30 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePicker.module.scss.js.map +1 -0
- package/dist/components/Common/UI/DateRangePicker/DateRangePickerTypes.d.ts +14 -0
- package/dist/components/Common/UI/DateRangePicker/index.d.ts +2 -0
- package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +2 -2
- package/dist/components/Common/UI/Heading/Heading.d.ts +1 -1
- package/dist/components/Common/UI/Heading/Heading.js +11 -9
- package/dist/components/Common/UI/Heading/Heading.js.map +1 -1
- package/dist/components/Common/UI/Heading/HeadingTypes.d.ts +1 -1
- package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +94 -80
- package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js +1 -1
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Common/index.d.ts +2 -0
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +7 -11
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -10
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -11
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +6 -9
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -5
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -9
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +13 -14
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +2 -5
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -7
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -11
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -13
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -5
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -13
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +12 -15
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -8
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -8
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -15
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -5
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +3 -5
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +8 -11
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -19
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +6 -8
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -10
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +8 -11
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -8
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +10 -14
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +8 -11
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +5 -7
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +15 -19
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -5
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +6 -9
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +17 -19
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -10
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -5
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +12 -15
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +9 -12
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +6 -10
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -5
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +59 -59
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +16 -19
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +36 -33
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +11 -14
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +19 -21
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +2 -0
- package/dist/components/Company/PaySchedule/usePaySchedule.js +5 -7
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -8
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -9
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -8
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +3 -7
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +6 -8
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +5 -7
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +33 -34
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +2 -3
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +10 -14
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -5
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +135 -126
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +31 -30
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +18 -21
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +2 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +3 -4
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +17 -19
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +6 -8
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +2 -4
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +2 -5
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
- package/dist/components/Contractor/Profile/useContractorProfile.js +31 -31
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.d.ts +2 -2
- package/dist/components/Contractor/Submit/Submit.js +44 -46
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +12 -14
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Compensation.js +49 -49
- package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +27 -28
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +23 -25
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +57 -54
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +17 -19
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +11 -13
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +18 -19
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +6 -7
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -9
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +10 -14
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -5
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js +24 -26
- package/dist/components/Employee/DocumentSigner/EmploymentEligibility/EmploymentEligibilityPresentation.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +9 -11
- package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +11 -15
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -5
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js +6 -9
- package/dist/components/Employee/EmployeeDocuments/EmployeeDocumentsPresentation.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.d.ts +2 -5
- package/dist/components/Employee/EmployeeList/EmployeeList.js +45 -95
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeListView.d.ts +15 -0
- package/dist/components/Employee/EmployeeList/EmployeeListView.js +130 -0
- package/dist/components/Employee/EmployeeList/EmployeeListView.js.map +1 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeList.d.ts +9 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js +81 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeList.js.map +1 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.d.ts +17 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js +193 -0
- package/dist/components/Employee/EmployeeList/ManagementEmployeeListView.js.map +1 -0
- package/dist/components/Employee/EmployeeList/index.d.ts +3 -0
- package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +36 -23
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +114 -19
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +7 -10
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +10 -13
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +3 -5
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +14 -15
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +4 -4
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.d.ts +1 -0
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +14 -8
- package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +10 -11
- package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +8 -11
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -8
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +13 -14
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js +44 -43
- package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -10
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +9 -10
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +1 -0
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +5 -7
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +8 -11
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +14 -17
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +9 -10
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +10 -13
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +3 -5
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +8 -11
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +3 -5
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +8 -11
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +10 -13
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +3 -5
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js +48 -48
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployee.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js +14 -17
- package/dist/components/Employee/Terminations/TerminateEmployee/TerminateEmployeePresentation.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.d.ts +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js +37 -33
- package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlowComponents.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.d.ts +1 -0
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +57 -45
- package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -1
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js +8 -11
- package/dist/components/Employee/Terminations/TerminationSummary/TerminationSummaryPresentation.js.map +1 -1
- package/dist/components/Employee/index.d.ts +1 -0
- package/dist/components/Employee/index.js +38 -36
- package/dist/components/Employee/index.js.map +1 -1
- package/dist/components/Flow/Flow.js +20 -23
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +16 -18
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +18 -20
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
- package/dist/components/InformationRequests/InformationRequests.js +3 -4
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +8 -10
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlow.js +14 -14
- package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.d.ts +2 -2
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +21 -20
- package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.d.ts +2 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js +57 -55
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelection.js.map +1 -1
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js +8 -11
- package/dist/components/Payroll/Dismissal/DismissalPayPeriodSelection/DismissalPayPeriodSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.d.ts +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +85 -75
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
- package/dist/components/Payroll/GrossUpModal/GrossUpModal.module.scss.js +7 -7
- package/dist/components/Payroll/GrossUpModal/GrossUpModalTypes.d.ts +0 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.d.ts +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js +24 -18
- package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.d.ts +2 -0
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +28 -22
- package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +92 -84
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js +30 -32
- package/dist/components/Payroll/OffCycleCreation/OffCycleCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +18 -26
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.d.ts +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js +21 -21
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormTypes.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.d.ts +3 -3
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js +13 -13
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/useOffCyclePayPeriodDateValidation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -9
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +12 -14
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +11 -14
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +12 -12
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +194 -190
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +69 -69
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +2 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +102 -76
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +235 -238
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.module.scss.js +7 -7
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.d.ts +11 -0
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +63 -30
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +2 -1
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +43 -41
- package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/index.d.ts +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.d.ts +1 -1
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +62 -51
- package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js +13 -6
- package/dist/components/Payroll/PayrollFlow/OffCycleFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.js +22 -20
- package/dist/components/Payroll/PayrollFlow/PayrollExecutionFlowContextual.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/TransitionFlowContextual.js +35 -14
- package/dist/components/Payroll/PayrollFlow/TransitionFlowContextual.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +80 -69
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +0 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +59 -66
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +5 -4
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +96 -105
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +98 -64
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +9 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +223 -123
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +16 -12
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +106 -105
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +2 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +231 -222
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +7 -10
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +2 -4
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +11 -13
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +2 -5
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlow.d.ts +1 -1
- package/dist/components/Payroll/Transition/TransitionFlow.js +29 -27
- package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
- package/dist/components/Payroll/Transition/TransitionFlowComponents.d.ts +1 -0
- package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js +67 -63
- package/dist/components/Payroll/TransitionCreation/TransitionCreation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js +12 -14
- package/dist/components/Payroll/TransitionCreation/TransitionCreationPresentation.js.map +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.d.ts +1 -1
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js +5 -5
- package/dist/components/Payroll/TransitionCreation/TransitionCreationTypes.js.map +1 -1
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js +44 -55
- package/dist/components/Payroll/TransitionPayrollAlert/TransitionPayrollAlertPresentation.js.map +1 -1
- package/dist/components/Payroll/helpers.d.ts +5 -0
- package/dist/components/Payroll/helpers.js +81 -74
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +2 -4
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js +6 -9
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataContext.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/FormFieldsMetadataProvider.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.d.ts +1 -2
- package/dist/components/UNSTABLE_Hooks/form/SDKFormProvider.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.d.ts +48 -0
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js +94 -0
- package/dist/components/UNSTABLE_Hooks/form/buildFormSchema.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/form/deriveFieldsMetadata.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js +24 -24
- package/dist/components/UNSTABLE_Hooks/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js +22 -17
- package/dist/components/UNSTABLE_Hooks/form/fields/DatePickerHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js +31 -31
- package/dist/components/UNSTABLE_Hooks/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js +27 -27
- package/dist/components/UNSTABLE_Hooks/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js +28 -28
- package/dist/components/UNSTABLE_Hooks/form/fields/SelectHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.d.ts +3 -2
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js +24 -24
- package/dist/components/UNSTABLE_Hooks/form/fields/SwitchHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.d.ts +5 -4
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js +30 -30
- package/dist/components/UNSTABLE_Hooks/form/fields/TextInputHookField.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/getFieldWithOptions.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/index.d.ts +5 -2
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.d.ts +3 -0
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.js +15 -0
- package/dist/components/UNSTABLE_Hooks/form/preprocessors.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.d.ts +4 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js +13 -0
- package/dist/components/UNSTABLE_Hooks/form/resolveFieldError.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.d.ts +17 -0
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js +21 -0
- package/dist/components/UNSTABLE_Hooks/form/useDeriveFieldsMetadata.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js +6 -6
- package/dist/components/UNSTABLE_Hooks/form/useFieldErrorMessage.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.d.ts +22 -0
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js +11 -0
- package/dist/components/UNSTABLE_Hooks/form/useHookFieldResolution.js.map +1 -0
- package/dist/components/UNSTABLE_Hooks/form/withOptions.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/form/withOptions.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js +7 -9
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/CompensationForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.d.ts +48 -42
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js +48 -79
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchema.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/compensationSchemaParity.test.d.ts +1 -0
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/fields.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/index.d.ts +2 -2
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.d.ts +13 -15
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js +109 -110
- package/dist/components/UNSTABLE_Hooks/hooks/useCompensationForm/useCompensationForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js +17 -19
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/EmployeeDetailsForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.d.ts +13 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js +31 -25
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/employeeDetailsSchema.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.d.ts +5 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js +27 -27
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/fields.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/index.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.d.ts +8 -22
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js +81 -84
- package/dist/components/UNSTABLE_Hooks/hooks/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js +16 -18
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/WorkAddressForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/fields.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/index.d.ts +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.d.ts +9 -10
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js +85 -83
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.d.ts +8 -4
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js +18 -17
- package/dist/components/UNSTABLE_Hooks/hooks/useWorkAddressForm/workAddressSchema.js.map +1 -1
- package/dist/components/UNSTABLE_Hooks/index.d.ts +7 -7
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +46 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +46 -0
- package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js +88 -0
- package/dist/components/UNSTABLE_TimeOff/HolidaySelectionForm/HolidaySelectionForm.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.d.ts +6 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.js +50 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyDetailsForm/PolicyDetailsForm.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js +73 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyList.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js +122 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js +8 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListPresentation.module.scss.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyList/PolicyListTypes.d.ts +17 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js +46 -0
- package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/PolicyTypeSelector/PolicyTypeSelector.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.js +25 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlow.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.d.ts +29 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +103 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/index.d.ts +3 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.d.ts +14 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js +290 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.test.d.ts +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/SelectHolidaysPresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/SelectHolidaysPresentation.js +55 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/SelectHolidaysPresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/SelectHolidaysTypes.d.ts +25 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectHolidays/index.d.ts +3 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyType.d.ts +7 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyType.js +27 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyType.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyTypePresentation.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyTypePresentation.js +66 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyTypePresentation.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/SelectPolicyTypeTypes.d.ts +6 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectPolicyType/index.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/shared/EmployeeTable/EmployeeTable.d.ts +2 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/shared/EmployeeTable/EmployeeTableTypes.d.ts +26 -0
- package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/shared/EmployeeTable/index.d.ts +4 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js +35 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidayEmployees/ViewHolidayEmployees.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js +35 -0
- package/dist/components/UNSTABLE_TimeOff/ViewHolidaySchedule/ViewHolidaySchedule.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js +35 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyDetails/ViewPolicyDetails.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.d.ts +5 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js +35 -0
- package/dist/components/UNSTABLE_TimeOff/ViewPolicyEmployees/ViewPolicyEmployees.js.map +1 -0
- package/dist/components/UNSTABLE_TimeOff/index.d.ts +25 -0
- package/dist/components/UNSTABLE_TimeOff/index.js +27 -0
- package/dist/components/UNSTABLE_TimeOff/index.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +48 -46
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +10 -13
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.d.ts +10 -2
- package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
- package/dist/contexts/ThemeProvider/useTheme.js.map +1 -1
- package/dist/helpers/breadcrumbHelpers.d.ts +14 -0
- package/dist/helpers/breadcrumbHelpers.js +35 -26
- package/dist/helpers/breadcrumbHelpers.js.map +1 -1
- package/dist/{components/UNSTABLE_Hooks → helpers}/collectErrors.d.ts +1 -1
- package/dist/{components/UNSTABLE_Hooks → helpers}/collectErrors.js +1 -1
- package/dist/helpers/collectErrors.js.map +1 -0
- package/dist/hooks/useCompanyPaymentSpeed.d.ts +6 -0
- package/dist/hooks/useCompanyPaymentSpeed.js +19 -0
- package/dist/hooks/useCompanyPaymentSpeed.js.map +1 -0
- package/dist/hooks/useCompanyPaymentSpeed.test.d.ts +1 -0
- package/dist/hooks/useDateRangeFilter/useDateRangeFilter.d.ts +20 -0
- package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js +38 -0
- package/dist/hooks/useDateRangeFilter/useDateRangeFilter.js.map +1 -0
- package/dist/hooks/useDateRangeFilter/useDateRangeFilter.test.d.ts +1 -0
- package/dist/{components/UNSTABLE_Hooks → hooks}/useErrorHandling.d.ts +2 -2
- package/dist/{components/UNSTABLE_Hooks → hooks}/useErrorHandling.js +1 -1
- package/dist/hooks/useErrorHandling.js.map +1 -0
- package/dist/hooks/useErrorHandling.test.d.ts +1 -0
- package/dist/hooks/usePagination/usePagination.d.ts +2 -0
- package/dist/hooks/usePagination/usePagination.js +32 -29
- package/dist/hooks/usePagination/usePagination.js.map +1 -1
- package/dist/i18n/I18n.js +24 -24
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +6 -6
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +24 -0
- package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js +32 -0
- package/dist/i18n/en/Company.TimeOff.EmployeeTable.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js +26 -0
- package/dist/i18n/en/Company.TimeOff.HolidayPolicy.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js +28 -0
- package/dist/i18n/en/Company.TimeOff.SelectPolicyType.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js +38 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicies.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js +52 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffPolicyDetails.json.js.map +1 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffRequests.json.js +21 -0
- package/dist/i18n/en/Company.TimeOff.TimeOffRequests.json.js.map +1 -0
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +36 -34
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
- package/dist/i18n/en/Employee.EmployeeList.json.js +22 -20
- package/dist/i18n/en/Employee.EmployeeList.json.js.map +1 -1
- package/dist/i18n/en/Employee.ManagementEmployeeList.json.js +40 -0
- package/dist/i18n/en/Employee.ManagementEmployeeList.json.js.map +1 -0
- package/dist/i18n/en/Payroll.GrossUpModal.json.js +16 -14
- package/dist/i18n/en/Payroll.GrossUpModal.json.js.map +1 -1
- package/dist/i18n/en/Payroll.OffCycle.json.js +1 -1
- package/dist/i18n/en/Payroll.OffCyclePayPeriodDateForm.json.js +5 -5
- package/dist/i18n/en/Payroll.OffCycleTaxWithholding.json.js +5 -5
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +38 -34
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +29 -25
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollHistory.json.js +12 -12
- package/dist/i18n/en/Payroll.PayrollList.json.js +28 -20
- package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +64 -58
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/Payroll.TransitionCreation.json.js +9 -9
- package/dist/i18n/en/Payroll.TransitionPayrollAlert.json.js +8 -8
- package/dist/index.js +18 -16
- package/dist/index.js.map +1 -1
- package/dist/shared/constants.d.ts +46 -0
- package/dist/shared/constants.js +99 -74
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +508 -12
- package/dist/{components/UNSTABLE_Hooks/types.d.ts → types/sdkHooks.d.ts} +28 -2
- package/docs/reference/endpoint-inventory.json +608 -418
- package/package.json +29 -20
- package/dist/components/Employee/EmployeeList/Actions.d.ts +0 -1
- package/dist/components/Employee/EmployeeList/Actions.js +0 -16
- package/dist/components/Employee/EmployeeList/Actions.js.map +0 -1
- package/dist/components/Employee/EmployeeList/Head.d.ts +0 -1
- package/dist/components/Employee/EmployeeList/Head.js +0 -15
- package/dist/components/Employee/EmployeeList/Head.js.map +0 -1
- package/dist/components/Employee/EmployeeList/List.d.ts +0 -2
- package/dist/components/Employee/EmployeeList/List.js +0 -125
- package/dist/components/Employee/EmployeeList/List.js.map +0 -1
- package/dist/components/Employee/EmployeeList/List.module.scss.js +0 -8
- package/dist/components/Employee/EmployeeList/List.module.scss.js.map +0 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.module.scss.js +0 -8
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.module.scss.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/collectErrors.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js +0 -24
- package/dist/components/UNSTABLE_Hooks/form/composeFormSchema.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js +0 -14
- package/dist/components/UNSTABLE_Hooks/form/resolveRequiredFields.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/form/types.d.ts +0 -27
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.d.ts +0 -4
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js +0 -9
- package/dist/components/UNSTABLE_Hooks/form/useFieldsMetadata.js.map +0 -1
- package/dist/components/UNSTABLE_Hooks/useErrorHandling.js.map +0 -1
- package/dist/helpers/requiredIf.js +0 -8
- package/dist/helpers/requiredIf.js.map +0 -1
- /package/dist/components/UNSTABLE_Hooks/{useErrorHandling.test.d.ts → form/buildFormSchema.test.d.ts} +0 -0
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useTranslation as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { useComponentContext as
|
|
5
|
-
import { componentEvents as
|
|
6
|
-
import { useI18n as
|
|
7
|
-
import { useLocale as
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as g } from "react-i18next";
|
|
3
|
+
import { useRef as h, useMemo as k } from "react";
|
|
4
|
+
import { useComponentContext as B } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
5
|
+
import { componentEvents as N } from "../../../shared/constants.js";
|
|
6
|
+
import { useI18n as d } from "../../../i18n/I18n.js";
|
|
7
|
+
import { useLocale as u } from "../../../contexts/LocaleProvider/useLocale.js";
|
|
8
8
|
import R from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
|
|
9
9
|
import { useDateFormatter as V } from "../../../hooks/useDateFormatter.js";
|
|
10
|
-
function
|
|
10
|
+
function j({
|
|
11
11
|
breadcrumbs: a,
|
|
12
12
|
currentBreadcrumbId: p,
|
|
13
13
|
onEvent: s
|
|
14
14
|
}) {
|
|
15
|
-
const i =
|
|
15
|
+
const i = h(null), f = R({ ref: i }).length === 1, { Breadcrumbs: m } = B(), { locale: v } = u(), l = V(), c = a.reduce(
|
|
16
16
|
(t, e) => (e.namespace && t.push(e.namespace), t),
|
|
17
17
|
[]
|
|
18
18
|
);
|
|
19
|
-
|
|
20
|
-
const { t: o } =
|
|
19
|
+
d(c);
|
|
20
|
+
const { t: o } = g(), C = k(
|
|
21
21
|
() => a.map((t) => {
|
|
22
22
|
const e = t.variables ? {
|
|
23
23
|
...t.variables,
|
|
24
|
-
startDate: typeof t.variables.startDate == "string" ?
|
|
25
|
-
endDate: typeof t.variables.endDate == "string" ?
|
|
24
|
+
startDate: typeof t.variables.startDate == "string" ? l.formatShortWithYear(t.variables.startDate) : t.variables.startDate,
|
|
25
|
+
endDate: typeof t.variables.endDate == "string" ? l.formatShortWithYear(t.variables.endDate) : t.variables.endDate
|
|
26
26
|
} : void 0, n = t.namespace ? o(t.label, {
|
|
27
27
|
ns: t.namespace,
|
|
28
28
|
defaultValue: t.label,
|
|
@@ -30,23 +30,24 @@ function Y({
|
|
|
30
30
|
}) : o(t.label, {
|
|
31
31
|
defaultValue: t.label,
|
|
32
32
|
...e
|
|
33
|
-
});
|
|
33
|
+
}), D = t.isNavigable !== void 0 ? t.isNavigable : !!t.onNavigate;
|
|
34
34
|
return {
|
|
35
35
|
id: t.id,
|
|
36
|
-
label: n
|
|
36
|
+
label: n,
|
|
37
|
+
isClickable: D
|
|
37
38
|
};
|
|
38
39
|
}),
|
|
39
|
-
[a, o,
|
|
40
|
+
[a, o, v]
|
|
40
41
|
);
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
+
return /* @__PURE__ */ r("div", { ref: i, children: /* @__PURE__ */ r(
|
|
42
43
|
m,
|
|
43
44
|
{
|
|
44
45
|
isSmallContainer: f,
|
|
45
|
-
breadcrumbs:
|
|
46
|
+
breadcrumbs: C,
|
|
46
47
|
currentBreadcrumbId: p,
|
|
47
48
|
onClick: (t) => {
|
|
48
49
|
const e = a.find((n) => n.id === t);
|
|
49
|
-
s && e && s(
|
|
50
|
+
s && e?.onNavigate && s(N.BREADCRUMB_NAVIGATE, {
|
|
50
51
|
key: t,
|
|
51
52
|
onNavigate: e.onNavigate
|
|
52
53
|
});
|
|
@@ -55,6 +56,6 @@ function Y({
|
|
|
55
56
|
) });
|
|
56
57
|
}
|
|
57
58
|
export {
|
|
58
|
-
|
|
59
|
+
j as FlowBreadcrumbs
|
|
59
60
|
};
|
|
60
61
|
//# sourceMappingURL=FlowBreadcrumbs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlowBreadcrumbs.js","sources":["../../../../src/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.tsx"],"sourcesContent":["import type { CustomTypeOptions } from 'i18next'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo, useRef } from 'react'\nimport type { FlowBreadcrumbsProps } from './FlowBreadcrumbsTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { componentEvents } from '@/shared/constants'\nimport { useI18n } from '@/i18n/I18n'\nimport { useLocale } from '@/contexts/LocaleProvider/useLocale'\nimport { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\nexport function FlowBreadcrumbs({\n breadcrumbs,\n currentBreadcrumbId,\n onEvent,\n}: FlowBreadcrumbsProps) {\n const breadcrumbContainerRef = useRef<HTMLDivElement | null>(null)\n const breakpoints = useContainerBreakpoints({ ref: breadcrumbContainerRef })\n // Small if we only contain the base breakpoint\n const isSmallContainer = breakpoints.length === 1\n\n const { Breadcrumbs } = useComponentContext()\n const { locale } = useLocale()\n const dateFormatter = useDateFormatter()\n const namespaces = breadcrumbs.reduce<Array<keyof CustomTypeOptions['resources']>>(\n (acc, breadcrumb) => {\n if (breadcrumb.namespace) {\n acc.push(breadcrumb.namespace as keyof CustomTypeOptions['resources'])\n }\n return acc\n },\n [],\n )\n useI18n(namespaces)\n const { t } = useTranslation()\n const parsedBreadcrumbs = useMemo(\n () =>\n breadcrumbs.map(breadcrumb => {\n const formattedVariables = breadcrumb.variables\n ? {\n ...breadcrumb.variables,\n startDate:\n typeof breadcrumb.variables.startDate === 'string'\n ? dateFormatter.formatShortWithYear(breadcrumb.variables.startDate)\n : breadcrumb.variables.startDate,\n endDate:\n typeof breadcrumb.variables.endDate === 'string'\n ? dateFormatter.formatShortWithYear(breadcrumb.variables.endDate)\n : breadcrumb.variables.endDate,\n }\n : undefined\n\n const translatedLabel = breadcrumb.namespace\n ? (t(breadcrumb.label, {\n ns: breadcrumb.namespace,\n defaultValue: breadcrumb.label,\n ...formattedVariables,\n } as never) as unknown as string)\n : (t(breadcrumb.label, {\n defaultValue: breadcrumb.label,\n ...formattedVariables,\n } as never) as unknown as string)\n return {\n id: breadcrumb.id,\n label: translatedLabel,\n }\n }),\n [breadcrumbs, t, locale],\n )\n\n const handleBreadcrumbClick = (breadcrumbId: string) => {\n const breadcrumb = breadcrumbs.find(breadcrumb => breadcrumb.id === breadcrumbId)\n if (onEvent && breadcrumb) {\n onEvent(componentEvents.BREADCRUMB_NAVIGATE, {\n key: breadcrumbId,\n onNavigate: breadcrumb.onNavigate,\n })\n }\n }\n return (\n <div ref={breadcrumbContainerRef}>\n <Breadcrumbs\n isSmallContainer={isSmallContainer}\n breadcrumbs={parsedBreadcrumbs}\n currentBreadcrumbId={currentBreadcrumbId}\n onClick={handleBreadcrumbClick}\n />\n </div>\n )\n}\n"],"names":["FlowBreadcrumbs","breadcrumbs","currentBreadcrumbId","onEvent","breadcrumbContainerRef","useRef","isSmallContainer","useContainerBreakpoints","Breadcrumbs","useComponentContext","locale","useLocale","dateFormatter","useDateFormatter","namespaces","acc","breadcrumb","useI18n","t","useTranslation","parsedBreadcrumbs","useMemo","formattedVariables","translatedLabel","jsx","breadcrumbId","componentEvents"],"mappings":";;;;;;;;;AAWO,SAASA,EAAgB;AAAA,EAC9B,aAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,SAAAC;AACF,GAAyB;AACvB,QAAMC,IAAyBC,EAA8B,IAAI,GAG3DC,IAFcC,EAAwB,EAAE,KAAKH,GAAwB,EAEtC,WAAW,GAE1C,EAAE,aAAAI,EAAA,IAAgBC,EAAA,GAClB,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAgBC,EAAA,GAChBC,IAAab,EAAY;AAAA,IAC7B,CAACc,GAAKC,OACAA,EAAW,aACbD,EAAI,KAAKC,EAAW,SAAiD,GAEhED;AAAA,IAET,CAAA;AAAA,EAAC;AAEH,EAAAE,EAAQH,CAAU;AAClB,QAAM,EAAE,GAAAI,EAAA,IAAMC,EAAA,GACRC,IAAoBC;AAAA,IACxB,MACEpB,EAAY,IAAI,CAAAe,MAAc;AAC5B,YAAMM,IAAqBN,EAAW,YAClC;AAAA,QACE,GAAGA,EAAW;AAAA,QACd,WACE,OAAOA,EAAW,UAAU,aAAc,WACtCJ,EAAc,oBAAoBI,EAAW,UAAU,SAAS,IAChEA,EAAW,UAAU;AAAA,QAC3B,SACE,OAAOA,EAAW,UAAU,WAAY,WACpCJ,EAAc,oBAAoBI,EAAW,UAAU,OAAO,IAC9DA,EAAW,UAAU;AAAA,MAAA,IAE7B,QAEEO,IAAkBP,EAAW,YAC9BE,EAAEF,EAAW,OAAO;AAAA,QACnB,IAAIA,EAAW;AAAA,QACf,cAAcA,EAAW;AAAA,QACzB,GAAGM;AAAA,MAAA,CACK,IACTJ,EAAEF,EAAW,OAAO;AAAA,QACnB,cAAcA,EAAW;AAAA,QACzB,GAAGM;AAAA,MAAA,CACK;
|
|
1
|
+
{"version":3,"file":"FlowBreadcrumbs.js","sources":["../../../../src/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.tsx"],"sourcesContent":["import type { CustomTypeOptions } from 'i18next'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo, useRef } from 'react'\nimport type { FlowBreadcrumbsProps } from './FlowBreadcrumbsTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { componentEvents } from '@/shared/constants'\nimport { useI18n } from '@/i18n/I18n'\nimport { useLocale } from '@/contexts/LocaleProvider/useLocale'\nimport { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\nexport function FlowBreadcrumbs({\n breadcrumbs,\n currentBreadcrumbId,\n onEvent,\n}: FlowBreadcrumbsProps) {\n const breadcrumbContainerRef = useRef<HTMLDivElement | null>(null)\n const breakpoints = useContainerBreakpoints({ ref: breadcrumbContainerRef })\n // Small if we only contain the base breakpoint\n const isSmallContainer = breakpoints.length === 1\n\n const { Breadcrumbs } = useComponentContext()\n const { locale } = useLocale()\n const dateFormatter = useDateFormatter()\n const namespaces = breadcrumbs.reduce<Array<keyof CustomTypeOptions['resources']>>(\n (acc, breadcrumb) => {\n if (breadcrumb.namespace) {\n acc.push(breadcrumb.namespace as keyof CustomTypeOptions['resources'])\n }\n return acc\n },\n [],\n )\n useI18n(namespaces)\n const { t } = useTranslation()\n const parsedBreadcrumbs = useMemo(\n () =>\n breadcrumbs.map(breadcrumb => {\n const formattedVariables = breadcrumb.variables\n ? {\n ...breadcrumb.variables,\n startDate:\n typeof breadcrumb.variables.startDate === 'string'\n ? dateFormatter.formatShortWithYear(breadcrumb.variables.startDate)\n : breadcrumb.variables.startDate,\n endDate:\n typeof breadcrumb.variables.endDate === 'string'\n ? dateFormatter.formatShortWithYear(breadcrumb.variables.endDate)\n : breadcrumb.variables.endDate,\n }\n : undefined\n\n const translatedLabel = breadcrumb.namespace\n ? (t(breadcrumb.label, {\n ns: breadcrumb.namespace,\n defaultValue: breadcrumb.label,\n ...formattedVariables,\n } as never) as unknown as string)\n : (t(breadcrumb.label, {\n defaultValue: breadcrumb.label,\n ...formattedVariables,\n } as never) as unknown as string)\n const isClickable =\n breadcrumb.isNavigable !== undefined ? breadcrumb.isNavigable : !!breadcrumb.onNavigate\n\n return {\n id: breadcrumb.id,\n label: translatedLabel,\n isClickable,\n }\n }),\n [breadcrumbs, t, locale],\n )\n\n const handleBreadcrumbClick = (breadcrumbId: string) => {\n const breadcrumb = breadcrumbs.find(breadcrumb => breadcrumb.id === breadcrumbId)\n if (onEvent && breadcrumb?.onNavigate) {\n onEvent(componentEvents.BREADCRUMB_NAVIGATE, {\n key: breadcrumbId,\n onNavigate: breadcrumb.onNavigate,\n })\n }\n }\n return (\n <div ref={breadcrumbContainerRef}>\n <Breadcrumbs\n isSmallContainer={isSmallContainer}\n breadcrumbs={parsedBreadcrumbs}\n currentBreadcrumbId={currentBreadcrumbId}\n onClick={handleBreadcrumbClick}\n />\n </div>\n )\n}\n"],"names":["FlowBreadcrumbs","breadcrumbs","currentBreadcrumbId","onEvent","breadcrumbContainerRef","useRef","isSmallContainer","useContainerBreakpoints","Breadcrumbs","useComponentContext","locale","useLocale","dateFormatter","useDateFormatter","namespaces","acc","breadcrumb","useI18n","t","useTranslation","parsedBreadcrumbs","useMemo","formattedVariables","translatedLabel","isClickable","jsx","breadcrumbId","componentEvents"],"mappings":";;;;;;;;;AAWO,SAASA,EAAgB;AAAA,EAC9B,aAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,SAAAC;AACF,GAAyB;AACvB,QAAMC,IAAyBC,EAA8B,IAAI,GAG3DC,IAFcC,EAAwB,EAAE,KAAKH,GAAwB,EAEtC,WAAW,GAE1C,EAAE,aAAAI,EAAA,IAAgBC,EAAA,GAClB,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAgBC,EAAA,GAChBC,IAAab,EAAY;AAAA,IAC7B,CAACc,GAAKC,OACAA,EAAW,aACbD,EAAI,KAAKC,EAAW,SAAiD,GAEhED;AAAA,IAET,CAAA;AAAA,EAAC;AAEH,EAAAE,EAAQH,CAAU;AAClB,QAAM,EAAE,GAAAI,EAAA,IAAMC,EAAA,GACRC,IAAoBC;AAAA,IACxB,MACEpB,EAAY,IAAI,CAAAe,MAAc;AAC5B,YAAMM,IAAqBN,EAAW,YAClC;AAAA,QACE,GAAGA,EAAW;AAAA,QACd,WACE,OAAOA,EAAW,UAAU,aAAc,WACtCJ,EAAc,oBAAoBI,EAAW,UAAU,SAAS,IAChEA,EAAW,UAAU;AAAA,QAC3B,SACE,OAAOA,EAAW,UAAU,WAAY,WACpCJ,EAAc,oBAAoBI,EAAW,UAAU,OAAO,IAC9DA,EAAW,UAAU;AAAA,MAAA,IAE7B,QAEEO,IAAkBP,EAAW,YAC9BE,EAAEF,EAAW,OAAO;AAAA,QACnB,IAAIA,EAAW;AAAA,QACf,cAAcA,EAAW;AAAA,QACzB,GAAGM;AAAA,MAAA,CACK,IACTJ,EAAEF,EAAW,OAAO;AAAA,QACnB,cAAcA,EAAW;AAAA,QACzB,GAAGM;AAAA,MAAA,CACK,GACRE,IACJR,EAAW,gBAAgB,SAAYA,EAAW,cAAc,CAAC,CAACA,EAAW;AAE/E,aAAO;AAAA,QACL,IAAIA,EAAW;AAAA,QACf,OAAOO;AAAA,QACP,aAAAC;AAAA,MAAA;AAAA,IAEJ,CAAC;AAAA,IACH,CAACvB,GAAaiB,GAAGR,CAAM;AAAA,EAAA;AAYzB,SACE,gBAAAe,EAAC,OAAA,EAAI,KAAKrB,GACR,UAAA,gBAAAqB;AAAA,IAACjB;AAAA,IAAA;AAAA,MACC,kBAAAF;AAAA,MACA,aAAac;AAAA,MACb,qBAAAlB;AAAA,MACA,SAfwB,CAACwB,MAAyB;AACtD,cAAMV,IAAaf,EAAY,KAAK,CAAAe,MAAcA,EAAW,OAAOU,CAAY;AAChF,QAAIvB,KAAWa,GAAY,cACzBb,EAAQwB,EAAgB,qBAAqB;AAAA,UAC3C,KAAKD;AAAA,UACL,YAAYV,EAAW;AAAA,QAAA,CACxB;AAAA,MAEL;AAAA,IAOe;AAAA,EAAA,GAEb;AAEJ;"}
|
|
@@ -21,6 +21,11 @@ export interface FlowBreadcrumb {
|
|
|
21
21
|
* Event handler for breadcrumb navigation
|
|
22
22
|
*/
|
|
23
23
|
onNavigate?: (context: unknown) => unknown;
|
|
24
|
+
/**
|
|
25
|
+
* When false, the breadcrumb is rendered as non-clickable even if onNavigate is defined.
|
|
26
|
+
* Defaults to true when onNavigate is present, false otherwise.
|
|
27
|
+
*/
|
|
28
|
+
isNavigable?: boolean;
|
|
24
29
|
}
|
|
25
30
|
export interface BreadcrumbNode {
|
|
26
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const createBreadcrumbNavigateTransition: <TContext>() => (targetState: string) => import('robot3').Transition<"breadcrumb/navigate">;
|
|
1
|
+
export declare const createBreadcrumbNavigateTransition: <TContext>() => (targetState: string, canNavigate?: (ctx: TContext) => boolean) => import('robot3').Transition<"breadcrumb/navigate">;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { transition as
|
|
2
|
-
import { componentEvents as
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
n((a, o) => o.payload.key === r),
|
|
1
|
+
import { transition as n, guard as t, reduce as i } from "robot3";
|
|
2
|
+
import { componentEvents as m } from "../../../shared/constants.js";
|
|
3
|
+
const d = () => (a, e) => n(
|
|
4
|
+
m.BREADCRUMB_NAVIGATE,
|
|
5
|
+
a,
|
|
7
6
|
t(
|
|
8
|
-
(
|
|
7
|
+
(r, o) => o.payload.key === a && (e?.(r) ?? !0)
|
|
8
|
+
),
|
|
9
|
+
i(
|
|
10
|
+
(r, o) => o.payload.onNavigate(r)
|
|
9
11
|
)
|
|
10
12
|
);
|
|
11
13
|
export {
|
|
12
|
-
|
|
14
|
+
d as createBreadcrumbNavigateTransition
|
|
13
15
|
};
|
|
14
16
|
//# sourceMappingURL=breadcrumbTransitionHelpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumbTransitionHelpers.js","sources":["../../../../src/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.ts"],"sourcesContent":["import { guard, reduce, transition } from 'robot3'\nimport { componentEvents } from '@/shared/constants'\n\ntype BreadcrumbNavigateEvent<TContext> = {\n payload: {\n key: string\n onNavigate: (ctx: TContext) => TContext\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters\nexport const createBreadcrumbNavigateTransition = <TContext>() => {\n return (targetState: string) =>\n transition(\n componentEvents.BREADCRUMB_NAVIGATE,\n targetState,\n guard((ctx: TContext, ev: { payload: { key: string } })
|
|
1
|
+
{"version":3,"file":"breadcrumbTransitionHelpers.js","sources":["../../../../src/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.ts"],"sourcesContent":["import { guard, reduce, transition } from 'robot3'\nimport { componentEvents } from '@/shared/constants'\n\ntype BreadcrumbNavigateEvent<TContext> = {\n payload: {\n key: string\n onNavigate: (ctx: TContext) => TContext\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters\nexport const createBreadcrumbNavigateTransition = <TContext>() => {\n return (targetState: string, canNavigate?: (ctx: TContext) => boolean) =>\n transition(\n componentEvents.BREADCRUMB_NAVIGATE,\n targetState,\n guard(\n (ctx: TContext, ev: { payload: { key: string } }) =>\n ev.payload.key === targetState && (canNavigate?.(ctx) ?? true),\n ),\n reduce(\n (ctx: TContext, ev: BreadcrumbNavigateEvent<TContext>): TContext =>\n ev.payload.onNavigate(ctx),\n ),\n )\n}\n"],"names":["createBreadcrumbNavigateTransition","targetState","canNavigate","transition","componentEvents","guard","ctx","ev","reduce"],"mappings":";;AAWO,MAAMA,IAAqC,MACzC,CAACC,GAAqBC,MAC3BC;AAAA,EACEC,EAAgB;AAAA,EAChBH;AAAA,EACAI;AAAA,IACE,CAACC,GAAeC,MACdA,EAAG,QAAQ,QAAQN,MAAgBC,IAAcI,CAAG,KAAK;AAAA,EAAA;AAAA,EAE7DE;AAAA,IACE,CAACF,GAAeC,MACdA,EAAG,QAAQ,WAAWD,CAAG;AAAA,EAAA;AAC7B;"}
|
|
@@ -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') => {\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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QAAQuC,EAAK,MAAMD,CAAS;AAAA,YAAA;AAAA,YAiBnC,gBAAAF;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,UAAUpB,IAAW;AAAA,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
|
+
{"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(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,CA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,cAdN,QAAQuC,EAAK,MAAMD,CAAS;AAAA,YAAA;AAAA,YAiBnC,gBAAAF;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,UAAUpB,IAAW;AAAA,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;"}
|
|
@@ -2,30 +2,25 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { z as o } from "zod";
|
|
3
3
|
import { useForm as s, FormProvider as a } from "react-hook-form";
|
|
4
4
|
import { zodResolver as l } from "@hookform/resolvers/zod";
|
|
5
|
-
import
|
|
5
|
+
import t from "./SignatureForm.module.scss.js";
|
|
6
6
|
import { Form as u } from "../Form/Form.js";
|
|
7
7
|
import { Flex as c } from "../Flex/Flex.js";
|
|
8
|
-
|
|
9
|
-
import "../../../shared/constants.js";
|
|
10
|
-
import "react-i18next";
|
|
11
|
-
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
12
|
-
import "react";
|
|
13
|
-
const p = o.object({
|
|
8
|
+
const f = o.object({
|
|
14
9
|
signature: o.string().min(1),
|
|
15
10
|
confirmSignature: o.literal(!0)
|
|
16
|
-
}),
|
|
11
|
+
}), d = {
|
|
17
12
|
signature: ""
|
|
18
13
|
};
|
|
19
|
-
function
|
|
20
|
-
const
|
|
21
|
-
resolver: l(
|
|
22
|
-
defaultValues:
|
|
14
|
+
function b({ onSubmit: m, children: i, formProps: n }) {
|
|
15
|
+
const e = s({
|
|
16
|
+
resolver: l(f),
|
|
17
|
+
defaultValues: d,
|
|
23
18
|
...n
|
|
24
19
|
});
|
|
25
|
-
return /* @__PURE__ */ r(a, { ...
|
|
20
|
+
return /* @__PURE__ */ r(a, { ...e, children: /* @__PURE__ */ r(u, { onSubmit: e.handleSubmit(m), className: t.container, children: /* @__PURE__ */ r("div", { className: t.formFields, children: /* @__PURE__ */ r(c, { flexDirection: "column", gap: 20, children: i }) }) }) });
|
|
26
21
|
}
|
|
27
22
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
b as SignatureForm,
|
|
24
|
+
f as SignatureFormSchema
|
|
30
25
|
};
|
|
31
26
|
//# sourceMappingURL=SignatureForm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureForm.js","sources":["../../../../src/components/Common/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { FormProvider, useForm, type UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport styles from './SignatureForm.module.scss'\nimport { Form } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common'\n\nexport const SignatureFormSchema = z.object({\n signature: z.string().min(1),\n confirmSignature: z.literal(true),\n})\n\nconst signatureFormDefaultValues = {\n signature: '',\n}\n\nexport type SignatureFormInputs = z.infer<typeof SignatureFormSchema>\n\ninterface SignatureFormProps {\n onSubmit: (data: SignatureFormInputs) => void | Promise<void>\n children?: React.ReactNode\n formProps?: Partial<UseFormProps<SignatureFormInputs>>\n}\n\nexport function SignatureForm({ onSubmit, children, formProps }: SignatureFormProps) {\n const methods = useForm<SignatureFormInputs>({\n resolver: zodResolver(SignatureFormSchema),\n defaultValues: signatureFormDefaultValues,\n ...formProps,\n })\n\n return (\n <FormProvider {...methods}>\n <Form onSubmit={methods.handleSubmit(onSubmit)} className={styles.container}>\n <div className={styles.formFields}>\n <Flex flexDirection=\"column\" gap={20}>\n {children}\n </Flex>\n </div>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["SignatureFormSchema","z","signatureFormDefaultValues","SignatureForm","onSubmit","children","formProps","methods","useForm","zodResolver","jsx","FormProvider","Form","styles","Flex"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SignatureForm.js","sources":["../../../../src/components/Common/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { FormProvider, useForm, type UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport styles from './SignatureForm.module.scss'\nimport { Form } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common'\n\nexport const SignatureFormSchema = z.object({\n signature: z.string().min(1),\n confirmSignature: z.literal(true),\n})\n\nconst signatureFormDefaultValues = {\n signature: '',\n}\n\nexport type SignatureFormInputs = z.infer<typeof SignatureFormSchema>\n\ninterface SignatureFormProps {\n onSubmit: (data: SignatureFormInputs) => void | Promise<void>\n children?: React.ReactNode\n formProps?: Partial<UseFormProps<SignatureFormInputs>>\n}\n\nexport function SignatureForm({ onSubmit, children, formProps }: SignatureFormProps) {\n const methods = useForm<SignatureFormInputs>({\n resolver: zodResolver(SignatureFormSchema),\n defaultValues: signatureFormDefaultValues,\n ...formProps,\n })\n\n return (\n <FormProvider {...methods}>\n <Form onSubmit={methods.handleSubmit(onSubmit)} className={styles.container}>\n <div className={styles.formFields}>\n <Flex flexDirection=\"column\" gap={20}>\n {children}\n </Flex>\n </div>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["SignatureFormSchema","z","signatureFormDefaultValues","SignatureForm","onSubmit","children","formProps","methods","useForm","zodResolver","jsx","FormProvider","Form","styles","Flex"],"mappings":";;;;;;;AAOO,MAAMA,IAAsBC,EAAE,OAAO;AAAA,EAC1C,WAAWA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC3B,kBAAkBA,EAAE,QAAQ,EAAI;AAClC,CAAC,GAEKC,IAA6B;AAAA,EACjC,WAAW;AACb;AAUO,SAASC,EAAc,EAAE,UAAAC,GAAU,UAAAC,GAAU,WAAAC,KAAiC;AACnF,QAAMC,IAAUC,EAA6B;AAAA,IAC3C,UAAUC,EAAYT,CAAmB;AAAA,IACzC,eAAeE;AAAA,IACf,GAAGI;AAAA,EAAA,CACJ;AAED,SACE,gBAAAI,EAACC,GAAA,EAAc,GAAGJ,GAChB,UAAA,gBAAAG,EAACE,GAAA,EAAK,UAAUL,EAAQ,aAAaH,CAAQ,GAAG,WAAWS,EAAO,WAChE,UAAA,gBAAAH,EAAC,OAAA,EAAI,WAAWG,EAAO,YACrB,UAAA,gBAAAH,EAACI,GAAA,EAAK,eAAc,UAAS,KAAK,IAC/B,UAAAT,EAAA,CACH,EAAA,CACF,EAAA,CACF,GACF;AAEJ;"}
|
|
@@ -1,23 +1,19 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
|
|
5
|
-
import "react-i18next";
|
|
6
|
-
import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
-
import "react";
|
|
8
|
-
function y({
|
|
1
|
+
import { jsxs as s, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { ActionsLayout as m } from "../ActionsLayout/ActionsLayout.js";
|
|
3
|
+
import { useComponentContext as u } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
4
|
+
function f({
|
|
9
5
|
onBack: t,
|
|
10
6
|
backLabel: r,
|
|
11
|
-
submitLabel:
|
|
12
|
-
isLoading:
|
|
7
|
+
submitLabel: e,
|
|
8
|
+
isLoading: i = !1
|
|
13
9
|
}) {
|
|
14
|
-
const o =
|
|
15
|
-
return /* @__PURE__ */ m
|
|
10
|
+
const o = u();
|
|
11
|
+
return /* @__PURE__ */ s(m, { children: [
|
|
16
12
|
t && /* @__PURE__ */ n(o.Button, { variant: "secondary", type: "button", onClick: t, children: r }),
|
|
17
|
-
/* @__PURE__ */ n(o.Button, { type: "submit", isLoading:
|
|
13
|
+
/* @__PURE__ */ n(o.Button, { type: "submit", isLoading: i, children: e })
|
|
18
14
|
] });
|
|
19
15
|
}
|
|
20
16
|
export {
|
|
21
|
-
|
|
17
|
+
f as SignatureFormActions
|
|
22
18
|
};
|
|
23
19
|
//# sourceMappingURL=SignatureFormActions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureFormActions.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormActions.tsx"],"sourcesContent":["import { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface SignatureFormActionsProps {\n onBack?: () => void\n backLabel: string\n submitLabel: string\n isLoading?: boolean\n}\n\nexport function SignatureFormActions({\n onBack,\n backLabel,\n submitLabel,\n isLoading = false,\n}: SignatureFormActionsProps) {\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {onBack && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onBack}>\n {backLabel}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isLoading}>\n {submitLabel}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["SignatureFormActions","onBack","backLabel","submitLabel","isLoading","Components","useComponentContext","ActionsLayout","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SignatureFormActions.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormActions.tsx"],"sourcesContent":["import { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface SignatureFormActionsProps {\n onBack?: () => void\n backLabel: string\n submitLabel: string\n isLoading?: boolean\n}\n\nexport function SignatureFormActions({\n onBack,\n backLabel,\n submitLabel,\n isLoading = false,\n}: SignatureFormActionsProps) {\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {onBack && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onBack}>\n {backLabel}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isLoading}>\n {submitLabel}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["SignatureFormActions","onBack","backLabel","submitLabel","isLoading","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;AAUO,SAASA,EAAqB;AAAA,EACnC,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC,IAAY;AACd,GAA8B;AAC5B,QAAMC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACE,UAAA;AAAA,IAAAN,KACC,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASJ,GAC3D,UAAAC,EAAA,CACH;AAAA,sBAEDG,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAAD,GAC9B,UAAAD,EAAA,CACH;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1,41 +1,36 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
-
import "react";
|
|
8
|
-
import { CheckboxField as a } from "../Fields/CheckboxField/CheckboxField.js";
|
|
9
|
-
function b({
|
|
10
|
-
signatureLabel: e,
|
|
1
|
+
import { jsxs as s, Fragment as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { TextInputField as a } from "../Fields/TextInputField/TextInputField.js";
|
|
3
|
+
import { CheckboxField as u } from "../Fields/CheckboxField/CheckboxField.js";
|
|
4
|
+
function p({
|
|
5
|
+
signatureLabel: r,
|
|
11
6
|
signatureDescription: i = "",
|
|
12
7
|
signatureError: t = "",
|
|
13
8
|
confirmationLabel: o,
|
|
14
|
-
confirmationError:
|
|
9
|
+
confirmationError: n = ""
|
|
15
10
|
}) {
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */
|
|
18
|
-
|
|
11
|
+
return /* @__PURE__ */ s(m, { children: [
|
|
12
|
+
/* @__PURE__ */ e(
|
|
13
|
+
a,
|
|
19
14
|
{
|
|
20
15
|
name: "signature",
|
|
21
|
-
label:
|
|
16
|
+
label: r,
|
|
22
17
|
description: i,
|
|
23
18
|
errorMessage: t,
|
|
24
19
|
isRequired: !0
|
|
25
20
|
}
|
|
26
21
|
),
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
22
|
+
/* @__PURE__ */ e(
|
|
23
|
+
u,
|
|
29
24
|
{
|
|
30
25
|
name: "confirmSignature",
|
|
31
26
|
isRequired: !0,
|
|
32
27
|
label: o,
|
|
33
|
-
errorMessage:
|
|
28
|
+
errorMessage: n
|
|
34
29
|
}
|
|
35
30
|
)
|
|
36
31
|
] });
|
|
37
32
|
}
|
|
38
33
|
export {
|
|
39
|
-
|
|
34
|
+
p as SignatureFormFields
|
|
40
35
|
};
|
|
41
36
|
//# sourceMappingURL=SignatureFormFields.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureFormFields.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormFields.tsx"],"sourcesContent":["import { TextInputField, CheckboxField } from '@/components/Common'\n\ninterface SignatureFormFieldsProps {\n signatureLabel: string\n signatureDescription?: string\n signatureError?: string\n confirmationLabel: string\n confirmationError?: string\n}\n\nexport function SignatureFormFields({\n signatureLabel,\n signatureDescription = '',\n signatureError = '',\n confirmationLabel,\n confirmationError = '',\n}: SignatureFormFieldsProps) {\n return (\n <>\n <TextInputField\n name=\"signature\"\n label={signatureLabel}\n description={signatureDescription}\n errorMessage={signatureError}\n isRequired\n />\n <CheckboxField\n name=\"confirmSignature\"\n isRequired\n label={confirmationLabel}\n errorMessage={confirmationError}\n />\n </>\n )\n}\n"],"names":["SignatureFormFields","signatureLabel","signatureDescription","signatureError","confirmationLabel","confirmationError","jsxs","Fragment","jsx","TextInputField","CheckboxField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SignatureFormFields.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormFields.tsx"],"sourcesContent":["import { TextInputField, CheckboxField } from '@/components/Common'\n\ninterface SignatureFormFieldsProps {\n signatureLabel: string\n signatureDescription?: string\n signatureError?: string\n confirmationLabel: string\n confirmationError?: string\n}\n\nexport function SignatureFormFields({\n signatureLabel,\n signatureDescription = '',\n signatureError = '',\n confirmationLabel,\n confirmationError = '',\n}: SignatureFormFieldsProps) {\n return (\n <>\n <TextInputField\n name=\"signature\"\n label={signatureLabel}\n description={signatureDescription}\n errorMessage={signatureError}\n isRequired\n />\n <CheckboxField\n name=\"confirmSignature\"\n isRequired\n label={confirmationLabel}\n errorMessage={confirmationError}\n />\n </>\n )\n}\n"],"names":["SignatureFormFields","signatureLabel","signatureDescription","signatureError","confirmationLabel","confirmationError","jsxs","Fragment","jsx","TextInputField","CheckboxField"],"mappings":";;;AAUO,SAASA,EAAoB;AAAA,EAClC,gBAAAC;AAAA,EACA,sBAAAC,IAAuB;AAAA,EACvB,gBAAAC,IAAiB;AAAA,EACjB,mBAAAC;AAAA,EACA,mBAAAC,IAAoB;AACtB,GAA6B;AAC3B,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOR;AAAA,QACP,aAAaC;AAAA,QACb,cAAcC;AAAA,QACd,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAK;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAON;AAAA,QACP,cAAcC;AAAA,MAAA;AAAA,IAAA;AAAA,EAChB,GACF;AAEJ;"}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import h from "classnames";
|
|
3
3
|
import { Flex as u } from "../../Flex/Flex.js";
|
|
4
|
-
import { BreadcrumbsDefaults as
|
|
5
|
-
import
|
|
4
|
+
import { BreadcrumbsDefaults as C } from "./BreadcrumbsTypes.js";
|
|
5
|
+
import i from "./Breadcrumbs.module.scss.js";
|
|
6
6
|
import { applyMissingDefaults as x } from "../../../../helpers/applyMissingDefaults.js";
|
|
7
|
-
function
|
|
8
|
-
const
|
|
7
|
+
function P(f) {
|
|
8
|
+
const p = x(f, C), {
|
|
9
9
|
className: s,
|
|
10
10
|
breadcrumbs: n,
|
|
11
|
-
currentBreadcrumbId:
|
|
12
|
-
"aria-label":
|
|
13
|
-
onClick:
|
|
11
|
+
currentBreadcrumbId: c,
|
|
12
|
+
"aria-label": t,
|
|
13
|
+
onClick: r,
|
|
14
14
|
isSmallContainer: b
|
|
15
|
-
} =
|
|
16
|
-
return b && a &&
|
|
15
|
+
} = p, o = n.findIndex((e) => e.id === c), a = o > 0 ? n[o - 1] : null, k = a?.isClickable !== !1;
|
|
16
|
+
return b && a && r && k ? /* @__PURE__ */ l(u, { flexDirection: "column", children: /* @__PURE__ */ l("nav", { "aria-label": t, className: s, children: /* @__PURE__ */ l(
|
|
17
17
|
"button",
|
|
18
18
|
{
|
|
19
19
|
type: "button",
|
|
20
|
-
className:
|
|
20
|
+
className: i.smallBack,
|
|
21
21
|
onClick: () => {
|
|
22
|
-
|
|
22
|
+
r(a.id);
|
|
23
23
|
},
|
|
24
24
|
children: a.label
|
|
25
25
|
}
|
|
26
|
-
) }) }) : /* @__PURE__ */ l(u, { flexDirection: "column", children: /* @__PURE__ */ l("nav", { "aria-label":
|
|
27
|
-
const m = e.id ===
|
|
26
|
+
) }) }) : /* @__PURE__ */ l(u, { flexDirection: "column", children: /* @__PURE__ */ l("nav", { "aria-label": t, className: s, children: /* @__PURE__ */ l("ol", { className: i.list, children: n.map((e) => {
|
|
27
|
+
const m = e.id === c, d = e.isClickable !== !1 && !m && r;
|
|
28
28
|
return /* @__PURE__ */ l(
|
|
29
29
|
"li",
|
|
30
30
|
{
|
|
31
|
-
className: h(
|
|
31
|
+
className: h(i.item, d && i.clickable),
|
|
32
32
|
"aria-current": m ? "step" : !1,
|
|
33
33
|
children: d ? /* @__PURE__ */ l(
|
|
34
34
|
"button",
|
|
35
35
|
{
|
|
36
36
|
type: "button",
|
|
37
|
-
className:
|
|
37
|
+
className: i.link,
|
|
38
38
|
onClick: () => {
|
|
39
|
-
|
|
39
|
+
r(e.id);
|
|
40
40
|
},
|
|
41
41
|
children: e.label
|
|
42
42
|
}
|
|
@@ -47,6 +47,6 @@ function I(p) {
|
|
|
47
47
|
}) }) }) });
|
|
48
48
|
}
|
|
49
49
|
export {
|
|
50
|
-
|
|
50
|
+
P as Breadcrumbs
|
|
51
51
|
};
|
|
52
52
|
//# sourceMappingURL=Breadcrumbs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumbs.js","sources":["../../../../../src/components/Common/UI/Breadcrumbs/Breadcrumbs.tsx"],"sourcesContent":["import classnames from 'classnames'\nimport { Flex } from '../../Flex'\nimport { type BreadcrumbsProps, BreadcrumbsDefaults } from './BreadcrumbsTypes'\nimport styles from './Breadcrumbs.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\n\nexport function Breadcrumbs(rawProps: BreadcrumbsProps) {\n const resolvedProps = applyMissingDefaults(rawProps, BreadcrumbsDefaults)\n const {\n className,\n breadcrumbs,\n currentBreadcrumbId,\n 'aria-label': ariaLabel,\n onClick,\n isSmallContainer,\n } = resolvedProps\n\n const currentIndex = breadcrumbs.findIndex(b => b.id === currentBreadcrumbId)\n const previousBreadcrumb = currentIndex > 0 ? breadcrumbs[currentIndex - 1] : null\n\n if (isSmallContainer && previousBreadcrumb && onClick) {\n return (\n <Flex flexDirection=\"column\">\n <nav aria-label={ariaLabel} className={className}>\n <button\n type=\"button\"\n className={styles.smallBack}\n onClick={() => {\n onClick(previousBreadcrumb.id)\n }}\n >\n {previousBreadcrumb.label}\n </button>\n </nav>\n </Flex>\n )\n }\n\n return (\n <Flex flexDirection=\"column\">\n <nav aria-label={ariaLabel} className={className}>\n <ol className={styles.list}>\n {breadcrumbs.map(breadcrumb => {\n const isCurrentbreadcrumb = breadcrumb.id === currentBreadcrumbId\n const isClickable = !isCurrentbreadcrumb && onClick\n\n return (\n <li\n key={breadcrumb.id}\n className={classnames(styles.item, isClickable && styles.clickable)}\n aria-current={isCurrentbreadcrumb ? 'step' : false}\n >\n {isClickable ? (\n <button\n type=\"button\"\n className={styles.link}\n onClick={() => {\n onClick(breadcrumb.id)\n }}\n >\n {breadcrumb.label}\n </button>\n ) : (\n <span>{breadcrumb.label}</span>\n )}\n </li>\n )\n })}\n </ol>\n </nav>\n </Flex>\n )\n}\n"],"names":["Breadcrumbs","rawProps","resolvedProps","applyMissingDefaults","BreadcrumbsDefaults","className","breadcrumbs","currentBreadcrumbId","ariaLabel","onClick","isSmallContainer","currentIndex","b","previousBreadcrumb","jsx","Flex","styles","breadcrumb","isCurrentbreadcrumb","isClickable","classnames"],"mappings":";;;;;;AAMO,SAASA,EAAYC,GAA4B;AACtD,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAmB,GAClE;AAAA,IACJ,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,cAAcC;AAAA,IACd,SAAAC;AAAA,IACA,kBAAAC;AAAA,EAAA,IACER,GAEES,IAAeL,EAAY,UAAU,CAAAM,MAAKA,EAAE,OAAOL,CAAmB,GACtEM,IAAqBF,IAAe,IAAIL,EAAYK,IAAe,CAAC,IAAI;
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.js","sources":["../../../../../src/components/Common/UI/Breadcrumbs/Breadcrumbs.tsx"],"sourcesContent":["import classnames from 'classnames'\nimport { Flex } from '../../Flex'\nimport { type BreadcrumbsProps, BreadcrumbsDefaults } from './BreadcrumbsTypes'\nimport styles from './Breadcrumbs.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\n\nexport function Breadcrumbs(rawProps: BreadcrumbsProps) {\n const resolvedProps = applyMissingDefaults(rawProps, BreadcrumbsDefaults)\n const {\n className,\n breadcrumbs,\n currentBreadcrumbId,\n 'aria-label': ariaLabel,\n onClick,\n isSmallContainer,\n } = resolvedProps\n\n const currentIndex = breadcrumbs.findIndex(b => b.id === currentBreadcrumbId)\n const previousBreadcrumb = currentIndex > 0 ? breadcrumbs[currentIndex - 1] : null\n\n const isPreviousBreadcrumbClickable = previousBreadcrumb?.isClickable !== false\n\n if (isSmallContainer && previousBreadcrumb && onClick && isPreviousBreadcrumbClickable) {\n return (\n <Flex flexDirection=\"column\">\n <nav aria-label={ariaLabel} className={className}>\n <button\n type=\"button\"\n className={styles.smallBack}\n onClick={() => {\n onClick(previousBreadcrumb.id)\n }}\n >\n {previousBreadcrumb.label}\n </button>\n </nav>\n </Flex>\n )\n }\n\n return (\n <Flex flexDirection=\"column\">\n <nav aria-label={ariaLabel} className={className}>\n <ol className={styles.list}>\n {breadcrumbs.map(breadcrumb => {\n const isCurrentbreadcrumb = breadcrumb.id === currentBreadcrumbId\n const isClickable = breadcrumb.isClickable !== false && !isCurrentbreadcrumb && onClick\n\n return (\n <li\n key={breadcrumb.id}\n className={classnames(styles.item, isClickable && styles.clickable)}\n aria-current={isCurrentbreadcrumb ? 'step' : false}\n >\n {isClickable ? (\n <button\n type=\"button\"\n className={styles.link}\n onClick={() => {\n onClick(breadcrumb.id)\n }}\n >\n {breadcrumb.label}\n </button>\n ) : (\n <span>{breadcrumb.label}</span>\n )}\n </li>\n )\n })}\n </ol>\n </nav>\n </Flex>\n )\n}\n"],"names":["Breadcrumbs","rawProps","resolvedProps","applyMissingDefaults","BreadcrumbsDefaults","className","breadcrumbs","currentBreadcrumbId","ariaLabel","onClick","isSmallContainer","currentIndex","b","previousBreadcrumb","isPreviousBreadcrumbClickable","jsx","Flex","styles","breadcrumb","isCurrentbreadcrumb","isClickable","classnames"],"mappings":";;;;;;AAMO,SAASA,EAAYC,GAA4B;AACtD,QAA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AAW;AAAA,UAAA;AAAA,QAAA,IAGd,gBAAAH,EAAC,QAAA,EAAM,UAAAG,EAAW,MAAA,CAAM;AAAA,MAAA;AAAA,MAfrBA,EAAW;AAAA,IAAA;AAAA,EAmBtB,CAAC,EAAA,CACH,EAAA,CACF,GACF;AAEJ;"}
|
|
@@ -2,6 +2,11 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
export interface Breadcrumb {
|
|
3
3
|
id: string;
|
|
4
4
|
label: ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* When false, the breadcrumb is rendered as plain text even if onClick is provided.
|
|
7
|
+
* Defaults to true.
|
|
8
|
+
*/
|
|
9
|
+
isClickable?: boolean;
|
|
5
10
|
}
|
|
6
11
|
export interface BreadcrumbsProps {
|
|
7
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbsTypes.js","sources":["../../../../../src/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.ts"],"sourcesContent":["import type { ReactNode } from 'react'\n\nexport interface Breadcrumb {\n id: string\n label: ReactNode\n}\nexport interface BreadcrumbsProps {\n /**\n * Array of breadcrumbs\n */\n breadcrumbs: Breadcrumb[]\n /**\n * Current breadcrumb id\n */\n currentBreadcrumbId?: string\n /**\n * Accessibility label for the breadcrumbs\n */\n 'aria-label'?: string\n /**\n * Additional CSS class name for the breadcrumbs container\n */\n className?: string\n /**\n * Event handler for breadcrumb navigation\n */\n onClick?: (id: string) => void\n /**\n * Passed to the breadcrumbs when the container size is small (640px and below)\n * At this size, the breadcrumb typically does not have sufficient size to render\n * completely. In our implementation, we switch to a condensed mobile version of\n * the breadcrumbs\n */\n isSmallContainer?: boolean\n}\n\n/**\n * Default prop values for Breadcrumbs component.\n */\nexport const BreadcrumbsDefaults = {\n isSmallContainer: false,\n 'aria-label': 'Breadcrumbs',\n} as const satisfies Partial<BreadcrumbsProps>\n"],"names":["BreadcrumbsDefaults"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BreadcrumbsTypes.js","sources":["../../../../../src/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.ts"],"sourcesContent":["import type { ReactNode } from 'react'\n\nexport interface Breadcrumb {\n id: string\n label: ReactNode\n /**\n * When false, the breadcrumb is rendered as plain text even if onClick is provided.\n * Defaults to true.\n */\n isClickable?: boolean\n}\nexport interface BreadcrumbsProps {\n /**\n * Array of breadcrumbs\n */\n breadcrumbs: Breadcrumb[]\n /**\n * Current breadcrumb id\n */\n currentBreadcrumbId?: string\n /**\n * Accessibility label for the breadcrumbs\n */\n 'aria-label'?: string\n /**\n * Additional CSS class name for the breadcrumbs container\n */\n className?: string\n /**\n * Event handler for breadcrumb navigation\n */\n onClick?: (id: string) => void\n /**\n * Passed to the breadcrumbs when the container size is small (640px and below)\n * At this size, the breadcrumb typically does not have sufficient size to render\n * completely. In our implementation, we switch to a condensed mobile version of\n * the breadcrumbs\n */\n isSmallContainer?: boolean\n}\n\n/**\n * Default prop values for Breadcrumbs component.\n */\nexport const BreadcrumbsDefaults = {\n isSmallContainer: false,\n 'aria-label': 'Breadcrumbs',\n} as const satisfies Partial<BreadcrumbsProps>\n"],"names":["BreadcrumbsDefaults"],"mappings":"AA4CO,MAAMA,IAAsB;AAAA,EACjC,kBAAkB;AAAA,EAClB,cAAc;AAChB;"}
|
|
@@ -1,41 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { Button as
|
|
3
|
-
import
|
|
4
|
-
import { ButtonDefaults as
|
|
5
|
-
import
|
|
6
|
-
import { applyMissingDefaults as
|
|
7
|
-
function
|
|
8
|
-
const
|
|
1
|
+
import { jsxs as h, jsx as v } from "react/jsx-runtime";
|
|
2
|
+
import { Button as B } from "react-aria-components";
|
|
3
|
+
import P from "classnames";
|
|
4
|
+
import { ButtonDefaults as D } from "./ButtonTypes.js";
|
|
5
|
+
import r from "./Button.module.scss.js";
|
|
6
|
+
import { applyMissingDefaults as N } from "../../../../helpers/applyMissingDefaults.js";
|
|
7
|
+
function F(n) {
|
|
8
|
+
const a = N(n, D), {
|
|
9
9
|
isLoading: o,
|
|
10
|
-
isDisabled:
|
|
11
|
-
variant:
|
|
12
|
-
buttonRef:
|
|
13
|
-
className:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
isDisabled: i,
|
|
11
|
+
variant: e,
|
|
12
|
+
buttonRef: l,
|
|
13
|
+
className: m,
|
|
14
|
+
icon: s,
|
|
15
|
+
children: c,
|
|
16
|
+
onBlur: d,
|
|
17
|
+
onFocus: p,
|
|
18
|
+
onClick: t,
|
|
18
19
|
...f
|
|
19
|
-
} =
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
|
|
20
|
+
} = a;
|
|
21
|
+
return /* @__PURE__ */ h(
|
|
22
|
+
B,
|
|
22
23
|
{
|
|
23
24
|
...f,
|
|
24
|
-
className: ({ defaultClassName:
|
|
25
|
-
ref:
|
|
26
|
-
onBlur:
|
|
27
|
-
onFocus:
|
|
28
|
-
isDisabled:
|
|
29
|
-
"data-variant":
|
|
25
|
+
className: ({ defaultClassName: u }) => P(r.root, u, m),
|
|
26
|
+
ref: l,
|
|
27
|
+
onBlur: d,
|
|
28
|
+
onFocus: p,
|
|
29
|
+
isDisabled: i || o,
|
|
30
|
+
"data-variant": e,
|
|
30
31
|
"data-loading": o || void 0,
|
|
31
|
-
onPress:
|
|
32
|
-
|
|
32
|
+
onPress: t ? () => {
|
|
33
|
+
t({});
|
|
33
34
|
} : void 0,
|
|
34
|
-
children:
|
|
35
|
+
children: [
|
|
36
|
+
s && /* @__PURE__ */ v("span", { className: r.icon, children: s }),
|
|
37
|
+
c
|
|
38
|
+
]
|
|
35
39
|
}
|
|
36
40
|
);
|
|
37
41
|
}
|
|
38
42
|
export {
|
|
39
|
-
|
|
43
|
+
F as Button
|
|
40
44
|
};
|
|
41
45
|
//# sourceMappingURL=Button.js.map
|